* gcc-interface/decl.c (change_qualified_type): New static function.
[official-gcc.git] / gcc / ada / ChangeLog
blobc29b5ad0ff7ce09f136e3acb2fc513efcc8d86a7
1 2014-05-18  Eric Botcazou  <ebotcazou@adacore.com>
3         * gcc-interface/decl.c (change_qualified_type): New static function.
4         (gnat_to_gnu_entity): Use it throughout to add qualifiers on types.
5         <E_Array_Type>: Set TYPE_VOLATILE on the array type directly.
6         <E_Array_Subtype>: Likewise.
7         Do not set flags on an UNCONSTRAINED_ARRAY_TYPE directly.
8         (gnat_to_gnu_component_type): Likewise.
9         (gnat_to_gnu_param): Likewise.
11 2014-05-18  Eric Botcazou  <ebotcazou@adacore.com>
13         * fe.h (Set_Present_Expr): Move around.
14         (End_Location): New macro.
15         * gcc-interface/trans.c (Case_Statement_to_gnu): Use End_Location.
17 2014-05-18  Eric Botcazou  <ebotcazou@adacore.com>
19         * gcc-interface/decl.c (gnat_to_gnu_entity): Use Underlying_Type in
20         lieu of more verbose construct.
21         * gcc-interface/trans.c (Call_to_gnu): Likewise.
22         (gnat_to_gnu): Likewise.  Remove obsolete code.
24 2014-05-18  Eric Botcazou  <ebotcazou@adacore.com>
26         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Subtype>: Do not
27         consider that regular packed arrays can never be superflat.
29 2014-05-17  Trevor Saunders  <tsaunders@mozilla.com>
31         * gcc-interface/ada-tree.h: Remove usage of variable_size gty
32         annotation.
33         * gcc-interface/decl.c (annotate_value): Adjust.
34         * gcc-interface/trans.c (Attribute_to_gnu): Likewise.
35         (push_range_check_info): Likewise.
36         (Loop_Statement_to_gnu): Likewise.
37         (Subprogram_Body_to_gnu): Likewise.
38         (Compilation_Unit_to_gnu): Likewise.
39         (start_stmt_group): Likewise.
40         * gcc-interface/utils.c (init_gnat_utils): Likewise.
41         (gnat_pushlevel): Likewise.
42         (maybe_pad_type): Likewise.
44 2014-05-14  Eric Botcazou  <ebotcazou@adacore.com>
46         * seh_init.c: Fix copyright year.
48 2014-05-14  Bernd Edlinger  <bernd.edlinger@hotmail.de>
50         * seh_init.c (__gnat_map_SEH): Compile also when __CYGWIN__ and __SEH__
51         are defined.  Move include windows.h before system.h.
52         * s-oscons-tmplt.c (DTR_CONTROL_ENABLE, RTS_CONTROL_ENABLE): Compile
53         also when __CYGWIN__ is defined.  Include windef.h before winbase.h.
55 2014-05-14  Richard Sandiford  <r.sandiford@uk.ibm.com>
57         * gcc-interface/decl.c (gnat_to_gnu_entity): Convert integer_one_node
58         to the appropriate type.
59         * gcc-interface/trans.c (gnat_to_gnu): Likewise.
60         (pos_to_constructor): Likewise.
62 2014-05-13  Eric Botcazou  <ebotcazou@adacore.com>
64         * gcc-interface/decl.c (annotate_value): Fix thinko in latest change.
66 2014-05-06  Kenneth Zadeck  <zadeck@naturalbridge.com>
67             Mike Stump  <mikestump@comcast.net>
68             Richard Sandiford  <rdsandiford@googlemail.com>
70         * gcc-interface/cuintp.c (UI_From_gnu): Use wide-int interfaces.
71         * gcc-interface/decl.c (gnat_to_gnu_entity): Use TYPE_SIGN.
72         (annotate_value): Use wide-int interfaces.
73         * gcc-interface/utils.c (get_nonnull_operand): Use tree_fits_uhwi_p.
75 2014-04-28  Richard Henderson  <rth@redhat.com>
77         * gcc-interface/Makefile.in: Support aarch64-linux.
79 2014-04-28  Eric Botcazou  <ebotcazou@adacore.com>
81         * exp_dbug.ads (Get_External_Name): Add 'False' default to Has_Suffix,
82         add 'Suffix' parameter and adjust comment.
83         (Get_External_Name_With_Suffix): Delete.
84         * exp_dbug.adb (Get_External_Name_With_Suffix): Merge into...
85         (Get_External_Name): ...here.  Add 'False' default to Has_Suffix, add
86         'Suffix' parameter.
87         (Get_Encoded_Name): Remove 2nd argument in call to Get_External_Name.
88         Call Get_External_Name instead of Get_External_Name_With_Suffix.
89         (Get_Secondary_DT_External_Name): Likewise.
90         * exp_cg.adb (Write_Call_Info): Likewise.
91         * exp_disp.adb (Export_DT): Likewise.
92         (Import_DT): Likewise.
93         * comperr.ads (Compiler_Abort): Remove Code parameter and add From_GCC
94         parameter with False default.
95         * comperr.adb (Compiler_Abort): Likewise.  Adjust accordingly.
96         * types.h (Fat_Pointer): Rename into...
97         (String_Pointer): ...this.  Add comment on interfacing rules.
98         * fe.h (Compiler_Abort): Adjust for above renaming.
99         (Error_Msg_N): Likewise.
100         (Error_Msg_NE): Likewise.
101         (Get_External_Name): Likewise.  Add third parameter.
102         (Get_External_Name_With_Suffix): Delete.
103         * gcc-interface/decl.c (STDCALL_PREFIX): Define.
104         (create_concat_name): Adjust call to Get_External_Name, remove call to
105         Get_External_Name_With_Suffix, use STDCALL_PREFIX, adjust for renaming.
106         * gcc-interface/trans.c (post_error): Likewise.
107         (post_error_ne): Likewise.
108         * gcc-interface/misc.c (internal_error_function): Likewise.
110 2014-04-28  Richard Biener  <rguenther@suse.de>
112         PR middle-end/60092
113         * gcc-interface/utils.c: Define flag_isoc11.
115 2014-04-26  Eric Botcazou  <ebotcazou@adacore.com>
117         * gnatvsn.ads (Library_Version): Bump to 4.10.
119 2014-04-23  Eric Botcazou  <ebotcazou@adacore.com>
121         Revert
122         2014-04-22  Richard Henderson  <rth@redhat.com>
124         * gcc-interface/Makefile.in: Support aarch64-linux.
126         2014-04-22  Eric Botcazou  <ebotcazou@adacore.com>
128         * fe.h (Compiler_Abort): Replace Fat_Pointer with String_Pointer.
129         (Error_Msg_N): Likewise.
130         (Error_Msg_NE): Likewise.
131         (Get_External_Name_With_Suffix): Likewise.
132         * types.h (Fat_Pointer): Delete.
133         (String_Pointer): New type.
134         (DECLARE_STRING_POINTER): New macro.
135         * gcc-interface/decl.c (create_concat_name): Adjust.
136         * gcc-interface/trans.c (post_error): Likewise.
137         (post_error_ne): Likewise.
138         * gcc-interface/misc.c (internal_error_function): Likewise.
140 2014-04-22  Richard Henderson  <rth@redhat.com>
142         * gcc-interface/Makefile.in: Support aarch64-linux.
144         * init.c [__linux__] (HAVE_GNAT_ALTERNATE_STACK): New define.
145         (__gnat_alternate_stack): Enable for all linux except ia64.
147 2014-04-22  Eric Botcazou  <ebotcazou@adacore.com>
149         * fe.h (Compiler_Abort): Replace Fat_Pointer with String_Pointer.
150         (Error_Msg_N): Likewise.
151         (Error_Msg_NE): Likewise.
152         (Get_External_Name_With_Suffix): Likewise.
153         * types.h (Fat_Pointer): Delete.
154         (String_Pointer): New type.
155         (DECLARE_STRING_POINTER): New macro.
156         * gcc-interface/decl.c (create_concat_name): Adjust.
157         * gcc-interface/trans.c (post_error): Likewise.
158         (post_error_ne): Likewise.
159         * gcc-interface/misc.c (internal_error_function): Likewise.
161 2014-04-15  Eric Botcazou  <ebotcazou@adacore.com>
162             Pierre-Marie de Rodat  <derodat@adacore.com>
164         * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create a mere
165         scalar constant instead of a reference for renaming of scalar literal.
166         Do not create a new object for constant renaming except for a function
167         call.  Make sure a VAR_DECL is created for the renaming pointer.
168         * gcc-interface/trans.c (constant_decl_with_initializer_p): New.
169         (fold_constant_decl_in_expr): New function.
170         (Identifier_to_gnu): Use constant_decl_with_initializer_p.
171         For a constant renaming, try to fold a constant DECL in the result.
172         (lvalue_required_p) <N_Object_Renaming_Declaration>: Always return 1.
173         (Identifier_to_gnu): Reference the renamed object of constant renaming
174         pointers directly.
175         * gcc-interface/utils.c (invalidate_global_renaming_pointers): Do not
176         invalidate constant renaming pointers.
178 2014-04-15  Eric Botcazou  <ebotcazou@adacore.com>
180         * gcc-interface/utils.c (type_for_vector_element_p): New predicate.
181         (build_vector_type_for_size): New function.
182         (build_vector_type_for_array): Likewise.
183         (unchecked_convert): Build an intermediate vector type to convert
184         from a generic array type to a vector type.
185         (handle_vector_size_attribute): Reimplement.
186         (handle_vector_type_attribute): Likewise.
188 2014-04-15  Eric Botcazou  <ebotcazou@adacore.com>
190         * gcc-interface/decl.c (prepend_one_attribute_pragma): Call
191         Is_OK_Static_Expression in lieu of Is_Static_Expression to
192         detect valid arguments.
194 2014-04-15  Eric Botcazou  <ebotcazou@adacore.com>
196         * gcc-interface/trans.c (gnat_gimplify_stmt): Propagate loop hints.
198 2014-04-14  Paolo Carlini  <paolo.carlini@oracle.com>
200         * gcc-interface/decl.c (gnat_to_gnu_entity): Use TYPE_IDENTIFIER.
201         (components_to_record): Likewise.
202         * gcc-interface/utils.c (make_aligning_type): Likewise.
203         (maybe_pad_type): Likewise.
204         (finish_record_type): Likewise.
205         (rest_of_record_type_compilation): Likewise.
207 2014-04-14  Eric Botcazou  <ebotcazou@adacore.com>
209         * snames.ads-tmpl (Name_Ivdep): New pragma-related name.
210         * sem_prag.adb (Analyze_Pragma) <Pragma_Loop_Optimize>: Add support
211         for Ivdep hint.
212         * gnat_rm.texi (Implementation Defined Pragmas): Document new Ivdep
213         hint for Loop_Optimize.
214         * gnat_ugn.texi (Vectorization of loops): Mention new Ivdep hint.
215         * gcc-interface/trans.c (Pragma_to_gnu) <Pragma_Loop_Optimize>: Deal
216         with new Ivdep hint.
217         * gcc-interface/ada-tree.h (LOOP_STMT_IVDEP): New macro.
218         * gcc-interface/trans.c (Pragma_to_gnu) <Pragma_Loop_Optimize>: Deal
219         with new Ivdep hint.
220         (gnat_gimplify_stmt) <LOOP_STMT>: Propagate loop hints.
222 2014-04-14  Eric Botcazou  <ebotcazou@adacore.com>
223             Robert Dewar  <dewar@adacore.com>
225         * opt.ads (Suppress_Back_Annotation): Remove as unused.
226         * fe.h (Back_Annotate_Rep_Info): Likewise.
227         (Global_Discard_Names): Likewise.
228         (List_Representation_Info): Declare.
229         * types.h (Uint_Minus_1): Likewise.
230         * repinfo.ads: Document back-annotation change.
231         * gcc-interface/gigi.h (init_gnat_decl): Declare.
232         (destroy_gnat_decl): Likewise.
233         * gcc-interface/decl.c (annotate_value): Do not create the cache of
234         annotated values here but...
235         <CALL_EXPR>: Only inline the call if -gnatR3 is specified or we are
236         in ASIS mode.
237         (init_gnat_decl): ...here instead.  New function.
238         (destroy_gnat_decl): Likewise.
239         * gcc-interface/trans.c (gigi): Call {init|destroy}_gnat_decl.
240         * gcc-interface/utils.c (init_gnat_utils): Minor reformatting.
242 2014-04-14  Eric Botcazou  <ebotcazou@adacore.com>
244         * gcc-interface/decl.c (create_field_decl_from): Finalize non-constant
245         offset for the field, if any.
247 2014-04-09  Eric Botcazou  <ebotcazou@adacore.com>
248             Svante Signell  <svante.signell@gmail.com>
250         PR ada/54040
251         PR ada/59346
252         * s-osinte-x32.adb: New file.
253         * s-linux.ads (Time): New section.
254         * s-linux-alpha.ads (Time): Likewise.
255         * s-linux-android.ads (Time: Likewise.
256         * s-linux-hppa.ads (Time): Likewise.
257         * s-linux-mipsel.ads (Time): Likewise.
258         * s-linux-sparc.ads (Time): Likewise.
259         * s-linux-x32.ads (Time): Likewise.
260         * s-osprim-x32.ads (timespec): Adjust.
261         (Clock): Likewise.
262         (To_Timespec): Likewise.
263         * s-osinte-linux.ads (Time): Define local subtypes for those defined
264         in System.Linux.
265         * s-taprop-linux.adb (Monotonic_Clock): Do not define timeval.
266         * s-osinte-hpux.ads (timespec): Revert POSIX breakage.
267         * s-osinte-kfreebsd-gnu.ads (timespec): Likewise.
268         * s-osinte-solaris-posix.ads (timespec): Likewise.
269         * s-osinte-posix.adb (To_Timespec): Likewise.
270         * gcc-interface/Makefile.in (x32/Linux): Use s-osinte-x32.adb.
272 2014-04-08  Eric Botcazou  <ebotcazou@adacore.com>
274         PR ada/60411
275         * gcc-interface/Makefile.in (arm% linux-android): Switch to EHABI.
276         * s-linux-android.ads: New file.
277         * s-intman-android.adb: Likewise.
278         * s-osinte-android.ads: Adjust.
279         * sigtramp-armdroid.c: Likewise.
280         * sigtramp.h: Add Android support.
282 2014-04-07  Eric Botcazou  <ebotcazou@adacore.com>
284         * gcc-interface/Makefile.in (alpha-vms): Add missing line.
286 2014-03-30  Eric Botcazou  <ebotcazou@adacore.com>
288         PR ada/60703
289         * system-linux-alpha.ads: Adjust for Ada 2005.
290         * system-linux-mips.ads: Likewise.
291         * system-linux-mips64el.ads: Likewise.
292         * system-linux-mipsel.ads: Likewise.
293         * system-linux-s390.ads: Likewise.
294         * system-linux-s390x.ads: Likewise.
295         * system-linux-sparc.ads: Likewise.
296         * system-linux-sparcv9.ads: Likewise.
297         * system-rtems.ads: Likewise.
298         * system-vxworks-arm.ads: Likewise.
300 2014-03-16  Andreas Schwab  <schwab@linux-m68k.org>
302         PR ada/39172
303         * gcc-interface/Makefile.in (target_cpu_default): Revert
304         2013-10-11 change.
306 2014-03-13  Eric Botcazou  <ebotcazou@adacore.com>
308         PR ada/51483
309         * cstand.adb (Register_Float_Type): Add 'precision' parameter and use
310         it to set the RM size.  Use directly 'size' for the Esize.
311         (Create_Back_End_Float_Types): Adjust call to above.
312         * get_targ.ads (Register_Type_Proc): Add 'precision' parameter.
313         * set_targ.ads (FPT_Mode_Entry): Add 'precision' component.
314         (Write_Target_Dependent_Values): Adjust comment.
315         * set_targ.adb (Register_Float_Type): Add 'precision' parameter and
316         deal with it.
317         (Write_Target_Dependent_Values): Write the precision in lieu of size.
318         (Initialization): Read the precision in lieu of size and compute the
319         size from the precision and the alignment.
320         * gcc-interface/gigi.h (enumerate_modes): Add integer parameter.
321         * gcc-interface/misc.c (enumerate_modes): Likewise.  Do not register
322         types for vector modes, pass the size in addition to the precision.
324 2014-03-10  Eric Botcazou  <ebotcazou@adacore.com>
326         * gcc-interface/Make-lang.in (ADA_DEPFILES): Fix typo.
328 2014-03-07  Doug Rupp  <rupp@adacore.com>
330         PR ada/60411
331         * system-linux-armel.ads (Backend_Overflow_Checks): Set to True.
332         (Support_64_Bit_Divides): Removed, no longer used.
333         (ZCX_By_Default): Enabled.
335 2014-02-25  Doug Rupp  <rupp@adacore.com>
337         * gcc-interface/Makefile.in (arm-linux):
338         (EH_MECHANISM): Use ARM unwinder (-arm)
339         (LIBGNAT_TARGET_PAIRS: Override defaults with a-exexpr-gcc.adb and
340         s-excmac-arm.ads.
341         (EXTRA_LIBGNAT_OBJS): Add raise-gcc.o
342         (EXTRA_GNATRTL_NONTASKING_OBJS): Add g-cppexc.o s-excmac.o.
343         (arm-wrs-vxworks): Add EH_MECHANISM=-gcc for kernel mode.
344         (EXTRA_LIBGNAT_OBJS): Add sigtramp-armvxw.o
345         Add dependencies for sigtramp-armvxw.o.
347 2014-02-25  Eric Botcazou  <ebotcazou@adacore.com>
349         * gcc-interface/trans.c (Pragma_to_gnu): Deal with Warning_As_Error.
351 2014-02-25  Robert Dewar  <dewar@adacore.com>
353         * rtsfind.adb (Is_RTE): Protect against entity with no scope
354         field (previously this call blew up on the Standard entity).
355         * sem_attr.adb (Analyze_Attribute, case Access): Remove
356         test for No_Abort_Statements, this is now handled in
357         Set_Entity_With_Checks.
358         * exp_ch6.adb, sem_ch10.adb, sem_ch4.adb, sem_ch8.adb, sem_res.adb:
359         Change name Set_Entity_With_Style_Check => Set_Entity_With_Checks.
360         * sem_util.ads, sem_util.adb: Change name Set_Entity_With_Style_Check =>
361         Set_Entity_With_Checks.
362         (Set_Entity_With_Checks): Add checks for No_Dynamic_Attachment,
363         Add checks for No_Abort_Statements.
365 2014-02-25  Robert Dewar  <dewar@adacore.com>
367         * exp_ch9.adb (Expand_Entry_Barrier): Add comment that call to
368         Check_Restriction is OK.
370 2014-02-25  Ed Schonberg  <schonberg@adacore.com>
372         * sem_ch3.adb (Process_Full_View): Better error message when
373         the full view of  a private type without discriminants is an
374         unconstrained type.
375         * sem_ch7.adb (Uninstall_Declarations): Ditto.
377 2014-02-25  Eric Botcazou  <ebotcazou@adacore.com>
379         * sigtramp-armvxw.c: Also restore r0.
381 2014-02-25  Robert Dewar  <dewar@adacore.com>
383         * errout.adb (Error_Msg_Internal): Warning_Msg_Char set
384         unconditionally (Set_Msg_Insertion_Warning): Warning_Msg_Char
385         set unconditionally.
386         * erroutc.adb (Get_Warning_Tag): Does not give a leading space
387         any more (Output_Msg_Text): Rewritten with new convention on
388         output of warnings that are treated as errors.
389         * erroutc.ads (Error_Msg_Object): Warn_Chr is always set even
390         if Warn is False.
391         * gnat_rm.texi: Updates to documentation on pragma
392         Warning_As_Error.
393         * warnsw.adb (Set_Dot_Warning_Switch): -gnatw.e should not
394         set Warning_Doc_Switch.
395         * lib-writ.ads: Add documentation note on ALI file generation
396         for C.
397         * exp_ch6.adb (Expand_Call): Remove check for No_Abort_Statements
398         (belongs in Sem).
399         * sem_attr.adb (Resolve_Attribute, case Access):
400         Abort_Task'Access violates the No_Abort_Statements restriction.
401         * sem_res.adb (Resolve_Call): Check restriction
402         No_Abort_Statements for call to Abort_Task or a renaming of it.
404 2014-02-25  Robert Dewar  <dewar@adacore.com>
406         * sem_ch3.adb (Array_Type_Declaration): Check for case of using
407         type name as index.
408         * lib.ads: Minor reformatting.
409         * einfo.ads: Minor reformatting.
411 2014-02-25  Doug Rupp  <rupp@adacore.com>
413         * sem_mech.adb (Set_Mechanisms): For convention Fortran on VMS
414         use Short_Descriptor(S) as the argument passing mechanism.
416 2014-02-25  Eric Botcazou  <ebotcazou@adacore.com>
418         * sigtramp-ppcvxw.c (CFI_COMMON_REGS): Also include r0.
420 2014-02-25  Robert Dewar  <dewar@adacore.com>
422         * atree.ads (Warnings_Treated_As_Errors): New variable.
423         * errout.adb (Error_Msg_Internal): Set Warn_Err flag in
424         error object (Initialize): Initialize Warnings_As_Errors_Count
425         (Write_Error_Summary): Include count of warnings treated as errors.
426         * erroutc.adb (Warning_Treated_As_Error): New function.
427         (Matches): Function moved to outer level of package.
428         * erroutc.ads (Error_Msg_Object): Add Warn_Err flag.
429         (Warning_Treated_As_Error): New function.
430         * gnat_rm.texi: Document pragma Treat_Warning_As_Error.
431         * opt.adb: Add handling of Warnings_As_Errors_Count[_Config].
432         * opt.ads (Config_Switches_Type): Add entry for
433         Warnings_As_Errors_Count.
434         (Warnings_As_Errors_Count): New variable.
435         (Warnings_As_Errors): New array.
436         * par-prag.adb: Add dummy entry for Warning_As_Error.
437         * sem_prag.adb (Analyze_Pragma): Implement new pragma
438         Warning_As_Error.
439         * snames.ads-tmpl: Add entries for Warning_As_Error pragma.
441 2014-02-25  Eric Botcazou  <ebotcazou@adacore.com>
443         * sigtramp.h: Fix minor inaccuracy.
445 2014-02-25  Ben Brosgol  <brosgol@adacore.com>
447         * gnat_ugn.texi: Added description of kill command.
449 2014-02-25  Robert Dewar  <dewar@adacore.com>
451         * gnat_rm.texi (Address_Clauses): Add a section discussing the
452         problem of address clauses causing unexpected initialization,
453         including the effect of Initialize_Scalars.
455 2014-02-25  Robert Dewar  <dewar@adacore.com>
457         * errout.adb: Various changes for better msgs for anonmous access
458         subprogram types.
459         * erroutc.ads, erroutc.adb (Buffer_Ends_With): Version with character
460         argument.
461         (Buffer_Remove): Version with character argument.
462         * sem_attr.adb (Resolve_Attribute, case Access): Better handling
463         of mismatching conventions for access-to-subprogram case.
464         * sem_prag.adb (Set_Convention_From_Pragma): Deal with anonymous
465         access types in record.
466         * sem_util.ads, sem_util.adb (Set_Convention): Handle anonymous access
467         types, including in records.
469 2014-02-25  Doug Rupp  <rupp@adacore.com>
471         * sigtramp-ppcvxw.c, sigtramp.h, sigtramp-armvxw.c: Comment
472         enhancements and corrections.
474 2014-02-25  Robert Dewar  <dewar@adacore.com>
476         * gnat_rm.texi: New section "Conventions and Anonymous Access Types"
478 2014-02-25  Robert Dewar  <dewar@adacore.com>
480         * gnat_rm.texi: First set of documentation additions for
481         predefined RM units.
482         * checks.adb: Minor reformatting.
483         * sem_elab.adb (Check_Task_Activation): Minor fix to error
484         message.
485         * sem_util.adb: Minor reformatting.
487 2014-02-25  Arnaud Charlet  <charlet@adacore.com>
489         * usage.adb (Usage): Add help on -gnateC.
490         * switch-c.adb (Scan_Front_End_Switches): Add handling of -gnateC.
491         * opt.ads (Generate_CodePeer_Messages): New flag.
492         * gnat_ugn.texi: Document new switch -gnateC.
494 2014-02-25  Ben Brosgol  <brosgol@adacore.com>
496         * gnat_rm.texi: Corrected minor typos in Implementation Defined
497         Aspects.
498         * opt.ads: Minor reformatting.
500 2014-02-25  Robert Dewar  <dewar@adacore.com>
502         * binde.adb: Change messages to mention -gnatel instead of -gnatwl.
503         * gnat_ugn.texi: Update documentation of -gnatwl Add documentation
504         of -gnatel/-gnateL.
505         * opt.ads (Warn_Info_Messages): New flag.
506         * sem_elab.adb: Use Elab_Warnings, Elab_Info_Messages to control
507         messages.
508         * sem_prag.adb: Use Elab_Warnings, Elab_Info_Messages to control
509         messages.
510         * switch-m.ad, switch-c.adb: Recognize new -gnatel/EL switches.
511         * usage.adb: Add documentation of -gnatel/-gnateL Update
512         documentation of -gnatwl/-gnatwL.
513         * warnsw.adb: New handling of Elab_Warnings, Elab_Info_Messages
514         * warnsw.ads (Elab_Info_Messages): New field in Warning_Record
516 2014-02-25  Robert Dewar  <dewar@adacore.com>
518         * einfo.ads, einfo.adb (Has_Shift_Operator): New flag.
519         * gnat_rm.texi: Document pragma Provide_Shift_Operators.
520         * interfac.ads: Minor code reorganization (add pragma
521         Compiler_Unit_Warning).
522         * par-prag.adb: Add dummy entry for Provide_Shift_Operators.
523         * sem_ch3.adb (Build_Derived_Numeric_Type): Copy
524         Has_Shift_Operator flag.
525         * sem_intr.adb (Check_Intrinsic_Subprogram): Make sure
526         Check_Shift is always called (Check_Shift): Set Has_Shift_Operator.
527         * sem_prag.adb: Implement pragma Provide_Shift_Operators.
528         * snames.ads-tmpl: Add entries for pragma Provide_Shift_Operators
529         Add entry for Name_Amount.
530         * checks.adb (Selected_Range_Checks): When checking for a null
531         range, make sure we use the base type, and not the subtype for
532         deciding a range is null.
533         * sem_ch5.adb (Analyze_Loop_Parameter_Specification): Check
534         for suspicious loop bound which is outside the range of the
535         loop subtype.
536         * gnat_ugn.texi: Add documentation section "Determining the
537         Chosen Elaboration Order"
538         * sem_ch13.adb (UC_Entry): Add field Act_Unit
539         (Validate_Unchecked_Conversion): Store Act_Unit
540         (Validate_Unchecked_Conversions): Test Warnings_Off in Act_Unit
541         * treepr.adb: Minor reformatting.
543 2014-02-25  Arnaud Charlet  <charlet@adacore.com>
545         * usage.adb: Minor: fix typo.
547 2014-02-25  Robert Dewar  <dewar@adacore.com>
549         * lib.ads, s-bitops.adb, s-bitops.ads, s-conca5.adb, gnat_rm.texi,
550         s-conca5.ads, s-conca7.adb, s-conca7.ads, s-crc32.adb, s-crc32.ads,
551         s-conca9.adb, s-conca9.ads, g-dyntab.adb, s-crtl.ads, g-dyntab.ads,
552         s-excdeb.adb, s-addope.adb, s-addope.ads, s-carun8.adb, s-carun8.ads,
553         g-htable.adb, g-htable.ads, g-hesora.adb, g-hesora.ads, s-conca2.adb,
554         s-conca2.ads, a-comlin.adb, a-chlat1.ads, a-comlin.ads, errout.ads,
555         a-except.adb, s-conca4.adb, a-except.ads, s-conca4.ads, s-conca6.adb,
556         s-conca6.ads, g-spchge.adb, g-spchge.ads, g-u3spch.adb, g-u3spch.ads,
557         a-strhas.ads, restrict.adb, aspects.adb, aspects.ads, s-conca8.adb,
558         s-conca8.ads, back_end.adb, par-prag.adb, g-byorma.adb, g-byorma.ads,
559         a-elchha.adb, a-elchha.ads, g-speche.adb, g-speche.ads, s-casuti.adb,
560         s-assert.adb, s-casuti.ads, s-assert.ads, a-clrefi.adb, a-clrefi.ads,
561         s-conca3.adb, s-conca3.ads, a-ioexce.ads: Implement pragma
562         Compiler_Unit_Warning, change Compiler_Unit everywhere to
563         Compiler_Unit_Warning.
565 2014-02-25  Sergey Rybin  <rybin@adacore.com frybin>
567         * sem_prag.adb (Analyze_Depends_In_Decl_Part): Do not normalize
568         in ASIS mode aggregates that are used as aspect definitions.
570 2014-02-25  Robert Dewar  <dewar@adacore.com>
572         * exp_ch7.adb, sem_util.adb, sem_util.ads, exp_ch6.adb: Minor
573         reformatting.
575 2014-02-25  Ed Schonberg  <schonberg@adacore.com>
577         * freeze.adb (Freeze_Entity): If the return type of a function
578         is a limited view, and the non-limited view has not been seen yet,
579         defer freezing to some later point.
581 2014-02-25  Robert Dewar  <dewar@adacore.com>
583         * sem_ch3.adb: Minor reformatting.
585 2014-02-25  Robert Dewar  <dewar@adacore.com>
587         * s-excdeb.ads, s-except.ads, s-exctab.adb, s-exctab.ads, s-finmas.ads,
588         s-htable.adb, s-htable.ads, s-imenne.adb, s-imenne.ads, s-imgenu.adb,
589         s-imgenu.ads, s-mastop.adb, s-mastop.ads, s-memory-vms_64.adb,
590         s-memory-vms_64.ads, s-memory.adb, s-memory.ads, s-os_lib.adb,
591         s-os_lib.ads, s-parame.adb, s-parame.ads, s-purexc.ads, s-restri.adb,
592         s-restri.ads, s-rident.ads, s-secsta.adb, s-secsta.ads, s-soflin.adb,
593         s-soflin.ads, s-sopco3.adb, s-sopco3.ads, s-sopco4.adb, s-sopco4.ads,
594         s-sopco5.adb, s-sopco5.ads, s-spsufi.ads, s-stache.adb, s-stache.ads,
595         s-stalib.adb, s-stalib.ads, s-stoele.adb, s-stoele.ads, s-strcom.adb,
596         s-strcom.ads, s-strhas.adb, s-string.adb, s-string.ads, s-strops.adb,
597         s-strops.ads, s-ststop.adb, s-ststop.ads, s-traceb.adb, s-traceb.ads,
598         s-traent.adb, s-traent.ads, s-unstyp.ads, s-utf_32.adb, s-utf_32.ads,
599         s-wchcnv.adb, s-wchcnv.ads, s-wchcon.adb, s-wchcon.ads, s-wchjis.adb,
600         s-wchjis.ads, sem_ch11.adb, sem_ch4.adb, sem_ch5.adb, sem_prag.adb,
601         snames.ads-tmpl: Change Compiler_Unit everywhere to
602         Compiler_Unit_Warning.
604 2014-02-25  Hristian Kirtchev  <kirtchev@adacore.com>
606         * exp_ch6.adb (Add_Or_Save_Precondition): New routine.
607         (Collect_Body_Postconditions_In_Decls): New routine.
608         (Collect_Body_Postconditions_Of_Kind): Factor out code. Handle
609         postcondition aspects or pragmas that appear on a subprogram
610         body stub.
611         (Collect_Spec_Preconditions): Factor out code. Handle
612         precondition aspects or pragmas that appear on a subprogram
613         body stub.
614         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): The analysis of
615         aspects that apply to a subprogram body stub is no longer delayed,
616         the aspects are analyzed on the spot.
617         (SPARK_Aspect_Error):
618         Aspects that apply to a subprogram declaration cannot appear in
619         a subunit.
620         * sem_ch10.adb Remove with and use clause for Sem_Ch13.
621         (Analyze_Proper_Body): Add local variable Comp_Unit. Unum
622         is now a local variable. Code cleanup. Analysis related to
623         the aspects of a subprogram body stub is now carried out by
624         Analyze_Subprogram_Body_Helper. Do not propagate the aspects
625         and/or pragmas of a subprogram body stub to the proper body
626         as this is no longer needed. Do not analyze the aspects of a
627         subprogram stub when the corresponding source unit is missing.
628         (Analyze_Protected_Body_Stub): Flag the illegal use of aspects
629         on a stub.
630         (Analyze_Task_Body_Stub): Flag the illegal use of
631         aspects on a stub.
632         (Optional_Subunit): Add local variable Unum.
633         * sem_ch13.adb (Insert_Delayed_Pragma): Do not analyze a generated
634         pragma when it applies to a subprogram body stub.
635         * sem_prag.adb (Analyze_Pragma): Pragmas Contract_Cases,
636         Depends and Global can now apply to a subprogram body stub as
637         long as it acts as its own spec.
638         (Analyze_Refined_Pragma):
639         Code reformatting. Refinement pragmas cannot apply to a subunit.
641 2014-02-25  Hristian Kirtchev  <kirtchev@adacore.com>
643         * einfo.ads Update the usage of flag
644         Uses_Sec_Stack. Uses_Sec_Stack now applies to E_Loop entities.
645         * exp_ch5.adb (Expand_Iterator_Loop): The temporary for a cursor
646         now starts with the letter 'C'. This makes reading expanded
647         code easier.
648         * exp_ch7.adb (Establish_Transient_Scope): Add local variable
649         Iter_Loop. Signal that an Ada 2012 iterator loop requires
650         secondary stack management when creating a transient scope for
651         an element reference.
652         * exp_util.adb (Process_Statements_For_Controlled_Objects):
653         When wrapping the statements of a loop, pass the E_Loop entity
654         to the wrapping machinery.
655         (Wrap_Statements_In_Block): Add
656         formal parameter Scop along with comment on usage. Add local
657         variables Block_Id, Block_Nod and Iter_Loop. Mark the generated
658         block as requiring secondary stack management when the block is
659         created inside an Ada 2012 iterator loop. This ensures that any
660         reference objects are reclaimed on each iteration of the loop.
661         * sem_ch5.adb (Analyze_Loop_Statement): Mark the generated block
662         tasked with the handling of container iterators as requiring
663         secondary stack management. This ensures that iterators are
664         reclaimed when the loop terminates or is exited in any fashion.
665         * sem_util.adb (Add_Block_Identifier): New routine.
666         (Find_Enclosing_Iterator_Loop): New routine.
667         * sem_util.ads (Add_Block_Identifier): New routine.
668         (Find_Enclosing_Iterator_Loop): New routine.
670 2014-02-25  Robert Dewar  <dewar@adacore.com>
672         * sinfo.ads: Minor reformatting.
674 2014-02-25  Tristan Gingold  <gingold@adacore.com>
676         * s-expllu.ads, s-expuns.ads, s-expmod.ads: Minor comment fix.
678 2014-02-25  Pascal Obry  <obry@adacore.com>
680         * sinput-l.adb, osint.adb, osint.ads: Add Prep_Suffix to factorize code.
682 2014-02-25  Tristan Gingold  <gingold@adacore.com>
684         * sem_ch10.adb: Minor comment fix.
686 2014-02-25  Bob Duff  <duff@adacore.com>
688         * s-tasdeb.adb: Misc cleanup of this package,
689         including printing addresses in hexadecimal.
690         (Write): Fix minor bug when taking 'Address of an empty string.
692 2014-02-25  Ed Schonberg  <schonberg@adacore.com>
694         * sem_prag.adb (Analyze_Part_Of): Reject state refinement in a
695         public child unit when it does not refer to the abstract state
696         of a public ancestor.
698 2014-02-25  Yannick Moy  <moy@adacore.com>
700         * sem_prag.adb (Analyze_Pragma/Pragma_Validity_Checks): Ignore pragma
701         Validity_Checks in GNATprove and CodePeer modes.
703 2014-02-25  Pascal Obry  <obry@adacore.com>
705         * prj-attr.adb, projects.texi, snames.ads-tmpl: Add package Install's
706         Artifacts attribute.
708 2014-02-25  Yannick Moy  <moy@adacore.com>
710         * sem_prag.adb: Minor reformatting to get consistent messages.
712 2014-02-25  Robert Dewar  <dewar@adacore.com>
714         * checks.adb: Minor reformatting.
715         * sinfo.ads (Do_Range_Check): Document that this flag is never
716         passed to the back end.
718 2014-02-25  Yannick Moy  <moy@adacore.com>
720         * sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_prag.adb, sem_attr.adb,
721         sem_ch6.adb: Remove useless references to SPARK RM in error messages.
723 2014-02-25  Hristian Kirtchev  <kirtchev@adacore.com>
725         * sem_res.adb (Appears_In_Check): New routine.
726         (Resolve_Entity_Name): Remove local variables Prev and
727         Usage_OK. Par is now a constant. Remove the parent chain traversal
728         as the placement of a volatile object with enabled property
729         Async_Writers and/or Effective_Reads must appear immediately
730         within a legal construct.
732 2014-02-25  Hristian Kirtchev  <kirtchev@adacore.com>
734         * checks.adb (Apply_Selected_Range_Checks):
735         Alphabetize local constants and variables. Add comments.
736         Always insert a range check that requires runtime evaluation into
737         the tree.
739 2014-02-25  Robert Dewar  <dewar@adacore.com>
741         * sem_attr.adb, sem_ch6.adb, par-ch3.adb: Minor reformatting.
743 2014-02-25  Bob Duff  <duff@adacore.com>
745         * s-tassta.adb (Finalize_Global_Tasks): Limit the number of loop
746         iterations while waiting for independent tasks to terminate;
747         if an independent task does not terminate, we do not want to
748         hang here. In that case, the thread will be terminated when the
749         process exits.
750         * s-taprop-linux.adb (Abort_Task): Fix Assert to allow for ESRCH.
752 2014-02-25  Ed Schonberg  <schonberg@adacore.com>
754         * sem_prag.adb (Check_SPARK_Aspect_For_ASIS): New subprogram,
755         used to perform pre-analysis of the expression for SPARK
756         aspects that have a non-standard syntax, such as GLobal and
757         Initializes. The procedure applies to the original expression
758         in an aspect specification, prior to the analysis of the
759         corresponding pragma, in order to provide semantic information
760         for ASIS navigation purposes.
761         (Analyze_Global_In_Decl_List, Analyze_Initializes_In_Decl_Part):
762         Call new subprogram.
764 2014-02-25  Yannick Moy  <moy@adacore.com>
766         * sem_prag.adb: Remove obsolete reference to SPARK RM in error message.
768 2014-02-25  Doug Rupp  <rupp@adacore.com>
770         * init.c (HAVE_GNAT_ADJUST_CONTEXT_FOR_RAISE): Enable for ARM.
771         (__gnat_adjust_context_for_raise): Bump the PC by 2.
773 2014-02-25  Ed Schonberg  <schonberg@adacore.com>
775         * par-ch3.adb (P_Basic_Declarative_Items): In the case of a
776         misplaced IS, add a statement sequence to improper body only if
777         one has not been parsed already.
779 2014-02-25  Ed Schonberg  <schonberg@adacore.com>
781         * sem_attr.adb (Analyze_Attribute, case 'Update): Check for
782         mismatch when multidimensional array is updated with a single
783         index.
785 2014-02-25  Yannick Moy  <moy@adacore.com>
787         * sem_ch3.adb, sem_ch5.adb, sem_prag.adb, sem_attr.adb, errout.ads,
788         sem_ch6.adb: Mark most references to SPARK RM in error messages
789         for removal.
791 2014-02-24  Ed Schonberg  <schonberg@adacore.com>
793         * par-ch3.adb (P_Basic_Declarative_Items): If an improper body
794         appears in a list of basic declarations, complete the tree with
795         an empty statement list, to prevent cascaded errors and crashes
796         if semantic analysis is attempted.
798 2014-02-24  Thomas Quinot  <quinot@adacore.com>
800         * g-sercom-mingw.adb (Open): Fix incorrect test for error return
801         value.
802         * erroutc.adb: Minor reformatting.
804 2014-02-24  Hristian Kirtchev  <kirtchev@adacore.com>
806         * sem_prag.adb (Check_Clause_Syntax): Account
807         for a solitary input item in a dependency list.
809 2014-02-24  Yannick Moy  <moy@adacore.com>
811         * gnat1drv.adb (Adjust_Global_Switches): Do not
812         use validity checks at all in GNATprove_Mode.
814 2014-02-24  Robert Dewar  <dewar@adacore.com>
816         * g-sercom-mingw.adb, g-sercom-linux.adb, sem_prag.adb, freeze.adb,
817         atree.adb, atree.ads: Minor reformatting.
819 2014-02-24  Hristian Kirtchev  <kirtchev@adacore.com>
821         * sem_ch6.adb (Analyze_Subprogram_Body_Contract): Do not enforce
822         global and dependence refinement when SPARK_Mode is off.
823         * sem_ch7.adb (Analyze_Package_Body_Contract): Do not enforce
824         state refinement when SPARK_Mode is off.
825         * sem_ch13.adb (Analyze_Aspect_Specifications): Add local
826         variable Decl. Insert the generated pragma for Refined_State
827         after a potential pragma SPARK_Mode.
828         * sem_prag.adb (Analyze_Depends_In_Decl_Part): Add local
829         constant Deps. Remove local variable Expr. Check the syntax
830         of pragma Depends when SPARK_Mode is off. Factor out the
831         processing for extra parenthesis around individual clauses.
832         (Analyze_Global_In_Decl_List): Items is now a constant. Check
833         the syntax of pragma Global when SPARK_Mode is off.
834         (Analyze_Initializes_In_Decl_Part): Check the syntax of pragma
835         Initializes when SPARK_Mode is off.
836         (Analyze_Part_Of): Check
837         the syntax of the encapsulating state when SPARK_Mode is off.
838         (Analyze_Pragma): Check the syntax of pragma Abstract_State when
839         SPARK_Mode is off. Move the declaration order check with respect
840         to pragma Initializes to the end of the processing. Do not verify
841         the declaration order for pragma Initial_Condition when SPARK_Mode
842         is off. Do not complain about a useless package refinement when
843         SPARK_Mode is off.
844         (Analyze_Refined_Depends_In_Decl_Part): Refs
845         is now a constant. Check the syntax of pragma Refined_Depends
846         when SPARK_Mode is off.
847         (Analyze_Refined_Global_In_Decl_Part):
848         Check the syntax of pragma Refined_Global when SPARK_Mode is off.
849         (Analyze_Refined_State_In_Decl_Part): Check the syntax of pragma
850         Refined_State when SPARK_Mode is off.
851         (Check_Dependence_List_Syntax): New routine.
852         (Check_Global_List_Syntax): New routine.
853         (Check_Initialization_List_Syntax): New routine.
854         (Check_Item_Syntax): New routine.
855         (Check_State_Declaration_Syntax): New routine.
856         (Check_Refinement_List_Syntax): New routine.
857         (Has_Extra_Parentheses): Moved to the top level of Sem_Prag.
859 2014-02-24  Robert Dewar  <dewar@adacore.com>
861         * a-tags.adb, s-os_lib.adb: Minor reformatting.
863 2014-02-24  Thomas Quinot  <quinot@adacore.com>
865         * g-sercom-mingw.adb, g-sercom-linux.adb (Raise_Error): Include
866         strerror message, not just numeric errno value.
868 2014-02-24  Doug Rupp  <rupp@adacore.com>
870         * raise-gcc.c (exception_class_eq): Make endian neutral.
872 2014-02-24  Ed Schonberg  <schonberg@adacore.com>
874         * atree.ads, atree,adb (Copy_Separate_Tree): Remove Syntax_Only
875         flag, and reset Etype and Analyzed attributes unconditionally
876         when copying a tree that may be partly analyzed.
877         * freeze.adb: Change calls to Copy_Separate_Tree accordingly.
878         * sem_ch6.adb (Check_Inline_Pragma): If the Inline pragma appears
879         within a subprogram body and applies to it, remove it from the
880         body before making a copy of it, to prevent spurious errors when
881         analyzing the copied body.
883 2014-02-24  Thomas Quinot  <quinot@adacore.com>
885         * s-os_lib.adb (Errno_Message): Do not depend on Integer'Image.
886         * s-oscons-tmplt.c: On VxWorks, include adaint.h only after
887         vxWorks.h has been included.  Also ensure that file attributes
888         related definitions are output even in cases where socket support
889         is not enabled.
890         * a-tags.adb: Code clean up.
891         * Make-generated.in (OSCONS_CPP, OSCONS_EXTRACT): Use -iquote
892         instead of -I to add the main ada source directory to the header
893         search path, in order to avoid conflict between our own "types.h"
894         and VxWork's <types.h>.
896 2014-02-24  Robert Dewar  <dewar@adacore.com>
898         * atree.ads, atree.adb (Copy_Separate_Tree): Add Syntax_Only parameter.
899         * debug.adb: Remove documentation of -gnatd.X, no longer used.
900         * freeze.adb (Wrap_Imported_Subprogram): Fixed and activated.
902 2014-02-24  Bob Duff  <duff@adacore.com>
904         * gnat_ugn.texi: Improve documentation of gnatpp.
906 2014-02-24  Thomas Quinot  <quinot@adacore.com>
908         * g-stheme.adb, g-socthi-vms.adb, g-socthi-vms.ads,
909         g-socthi-vxworks.adb, g-socthi-vxworks.ads, g-stseme.adb,
910         g-socthi-mingw.adb, g-socthi-mingw.ads, g-socthi.adb,
911         g-socthi.ads, g-socket.adb (Host_Error_Message): Return a string, not
912         a chars_ptr, because on Windows this is a renaming of
913         Socket_Error_Message.
915 2014-02-24  Robert Dewar  <dewar@adacore.com>
917         * a-direct.adb, sem_ch5.adb, a-cfdlli.adb, a-cfhase.adb, a-tags.adb,
918         s-filatt.ads, a-cforma.adb, sem_ch6.adb, g-socthi-mingw.adb,
919         a-cfhama.adb, a-cforse.adb, a-cofove.adb: Minor reformatting and code
920         reorganization.
922 2014-02-24  Thomas Quinot  <quinot@adacore.com>
924         * Make-generated.in (OSCONS_CPP, OSCONS_EXTRACT): Make sure
925         that the source directory containing s-oscons-tmplt.c is on the
926         include path, so that all internal header files are available.
928 2014-02-24  Ed Schonberg  <schonberg@adacore.com>
930         * sem_ch5.adb (Analyze_Loop_Parameter_Specification): If the
931         domain of iteration is an attribute reference 'Old, this is an
932         Ada 2012 iterator and the loop must be rewritten as such.
934 2014-02-24  Thomas Quinot  <quinot@adacore.com>
936         * s-fileio.adb (Errno_Message): Remove, use shared version from
937         s-os_lib instead.
938         * s-crtrun.ads, Makefile.rtl: Remove now unused unit.
939         * g-stseme (Socket_Error_Message): Reimplement in terms of new
940         s-os_lib function.
941         * g-socthi.ads, g-socthi.adb: Change profile of
942         Socket_Error_Message to return String to allow the above.
943         * g-socket.adb, g-socthi-mingw.adb, g-socthi-mingw.ads,
944         * g-socthi-vms.adb, g-socthi-vms.ads, g-socthi-vxworks.adb,
945         * g-socthi-vxworks.ads: Update to account for the above profile
946         change.
947         * a-tags.adb: Use strlen builtin binding provided by s-crtl.
948         * s-crtl.ads (strncpy): New procedure.
949         * s-os_lib.adb (Copy_Attributes): Import just once (strncpy):
950         Use import from s-crtl.
951         * a-envvar.adb, osint.adb: Use imports of C runtime functions
952         from s-crtl instead of re-importing locally.
954 2014-02-24  Hristian Kirtchev  <kirtchev@adacore.com>
956         * sem_prag.adb (Analyze_Global_Item): Emit the
957         variable related checks concerning volatile objects only when
958         SPARK_Mode is on.
960 2014-02-24  Robert Dewar  <dewar@adacore.com>
962         * sem_ch5.adb (Analyze_Iterator_Specification): use
963         Error_Msg_Ada_2012_Feature.
965 2014-02-24  Jose Ruiz  <ruiz@adacore.com>
967         * s-rident.ads (Profile_Info): For Ravenscar, the restrictions
968         No_Local_Timing_Events and No_Specific_Termination_Handlers
969         must be set, according to the Ravenscar profile definition
970         in D.13(6/3).
972 2014-02-24  Ed Schonberg  <schonberg@adacore.com>
974         * sem_ch6.adb (Analyze_Expression_Function): If this is a
975         completion, freeze return type and its designated type if needed.
977 2014-02-24  Thomas Quinot  <quinot@adacore.com>
979         * sem_ch13.adb (Analyze_Attribute_Definition_Clause, case
980         'Address): When moving initialization statements to a freeze
981         entity, keep them under a single node (i.e. do not unwrap
982         expressions with actions), and set the Initialization_Statements
983         attribute again so that processing of a later pragma Import can
984         still remove them.
986 2014-02-24  Claire Dross  <dross@adacore.com>
988         * a-cfdlli.adb, a-cfdlli.ads, a-cfhama.adb, a-cfhama.ads,
989         a-cfhase.adb, a-cfhase.ads, a-cforma.adb, a-cforma.ads,
990         a-cforse.adb, a-cforse.ads, a-cofove.adb, a-cofove.ads: Rename
991         Left/Right to First_To_Previous/Current_To_Last.
993 2014-02-24  Thomas Quinot  <quinot@adacore.com>
995         * adaint.h (struct file_attributes): New component "error"
996         (__gnat_error_attributes): Accessor for the above.
997         * adaint.c (__gnat_error_attributes): New subprogram
998         (__gnat_stat): Fix returned value (expect errno value)
999         (__gnat_stat_to_attr): Add management of error component (set to
1000         stat errno value, except for missing files where it is set to 0,
1001         and exists is set to 0).
1002         * osint.ads (File_Attributes_Size): Update per change above,
1003         also clarify documentation.
1004         * s-filatt.ads: New file, binding to file attributes related
1005         functions.
1006         * Makefile.rtl (s-filatt): New runtime unit.
1007         * s-crtl.ads (strlen): Expose binding to GCC builtin (falls back
1008         to library function if not available on target).
1009         * s-os_lib.ads, s-os_lib.adb (Errno_Message): New subprogram.
1010         * s-oscons-tmplt.c (SIZEOF_struct_file_attributes,
1011         SIZEOF_struct_dirent_alloc): New constants.
1012         * Make-generated.in (s-oscons.ads): Now requires adaint.h.
1013         * a-direct.adb (Fetch_Next_Entry): Fix incorrect buffer sizes.
1014         Perform appropriate error checking if stat fails (do not just
1015         ignore existing files if stat fails)
1016         * gcc-interface/Make-lang.in (GNAT_ADA_OBJS, GNATBIND_OBJS): Update
1017         dependencies.
1019 2014-02-24  Hristian Kirtchev  <kirtchev@adacore.com>
1021         * sem_prag.adb (Analyze_Global_Item): Move the check concerning
1022         the use of volatile objects as global items in a function to
1023         the variable related checks section.
1024         * sem_util.adb (Async_Readers_Enabled): Directly call
1025         Has_Enabled_Property.
1026         (Async_Writers_Enabled): Directly call Has_Enabled_Property.
1027         (Effective_Reads_Enabled): Directly call Has_Enabled_Property.
1028         (Effective_Writes_Enabled): Directly call Has_Enabled_Property.
1029         (Has_Enabled_Property): Rename formal parameter State_Id to Item_Id.
1030         Update the comment on usage. State_Has_Enabled_Property how handles
1031         the original logic of the routine. Add processing for variables.
1032         (State_Has_Enabled_Property): New routine.
1033         (Variable_Has_Enabled_Property): New routine.
1035 2014-02-24  Robert Dewar  <dewar@adacore.com>
1037         * sinfo.ads, sem_ch12.adb, sem_res.adb, sem_ch4.adb, par-ch12.adb:
1038         Minor reformatting.
1039         * atree.ads, atree.adb (Node35): New function.
1040         (Set_Node35): New procedure.
1041         * debug.adb: Define new debug flag -gnatd.X.
1042         * einfo.ads, einfo.adb (Import_Pragma): New field.
1043         * freeze.adb (Wrap_Imported_Procedure): New procedure (not
1044         really active yet, has to be activated with -gnatd.X.
1045         * sem_prag.adb (Set_Imported): Set new Import_Pragma
1046         field (Set_Imported): Don't set Is_Public (see
1047         Freeze.Wrap_Imported_Subprogram)
1048         * par-ch3.adb (P_Component_List): Handle unexpected null component.
1050 2014-02-24  Yannick Moy  <moy@adacore.com>
1052         * sem_ch3.adb: Correct reference to SPARK RM in error messages.
1053         * gnat_rm.texi: Correct documentation of attribute Update.
1055 2014-02-24  Ed Schonberg  <schonberg@adacore.com>
1057         * sem_ch5.adb (Analyze_Iterator_Specification): Reject container
1058         iterator in older versions of Ada.
1060 2014-02-24  Gary Dismukes  <dismukes@adacore.com>
1062         * sem_ch5.adb, sem_aux.ads, sem_ch12.adb, gnat_ugn.texi, par.adb,
1063         par-ch12.adb: Change spelling 'parametrization' to 'parameterization'.
1065 2014-02-24  Ed Schonberg  <schonberg@adacore.com>
1067         * sinfo.ads, sinfo.adb: New attribute Generalized_Indexing, for
1068         indexed_components that are instances of Ada 2012 container
1069         indexing operations. Analysis and resolution of such nodes
1070         is performed on the attribute, and the original source is
1071         preserved for ASIS operations. If expansion is enabled, the
1072         indexed component is replaced by the value of this attribute,
1073         which is in a call to an Indexing aspect, in most case wrapped
1074         in a dereference operation.
1075         * sem_ch4.adb (Analyze_Indexed_Component): Create
1076         Generalized_Indexing attribute when appropriate.
1077         (Analyze_Call): If prefix is not overloadable and has an indexing
1078         aspect, transform into an indexed component so it can be analyzed
1079         as a potential container indexing.
1080         (Analyze_Expression): If node is an indexed component with a
1081         Generalized_ Indexing, do not re-analyze.
1082         * sem_res.adb (Resolve_Generalized_Indexing): Complete resolution
1083         of an indexed_component that has been transformed into a container
1084         indexing operation.
1085         (Resolve_Indexed_Component): Call the above when required.
1086         (Resolve): Do not insert an explicit dereference operation on
1087         an indexed_component whose type has an implicit dereference:
1088         the operation is inserted when resolving the related
1089         Generalized_Indexing.
1091 2014-02-24  Olivier Ramonat  <ramonat@adacore.com>
1093         * gnat_rm.texi, gnat_ugn.texi: Replace Ada Compiler by Ada Development
1094         Environment.
1096 2014-02-24  Hristian Kirtchev  <kirtchev@adacore.com>
1098         * sem_prag.adb (Check_Constituent_Usage): Remove leading spaces in
1099         error messages.
1100         (Inconsistent_Mode_Error): Remove leading spaces in error messages.
1101         Merge the expected and available mode errors.
1102         (Report_Unused_Constituents): Remove leading spaces in error messages.
1103         (Report_Unused_States): Remove leading spaces in error messages.
1105 2014-02-24  Thomas Quinot  <quinot@adacore.com>
1107         * par_sco.adb (Traverse_One): Refine categorization of statement
1108         SCOs.
1110 2014-02-24  Robert Dewar  <dewar@adacore.com>
1112         * aspects.ads, aspects.adb: Remove aspects Ada_2005 and Ada_2012,
1113         Pure_05, Pure_12 and Preelaborate_05.
1114         * gnat_rm.texi: Update accordingly.
1115         * sem_prag.adb: Document one argument form of Ada_05/Ada_2005
1116         pragmas Document one argument form of Ada_12/Ada_2012 pragmas
1117         Recognize one argument form of these pragmas only in GNAT mode
1118         (-gnatg).
1120 2014-02-24  Ed Schonberg  <schonberg@adacore.com>
1122         * s-dimmks.ads: Replace symbol for temperature, previously the
1123         Greek letter Theta, by the ASCII @ sign.
1124         * s-diflio.ads: ditto.
1126 2014-02-24  Robert Dewar  <dewar@adacore.com>
1128         * exp_ch4.adb: Minor code reorganization (use OR for boolean
1129         variables).
1130         * sem_ch3.adb, sem_prag.adb, freeze.adb: Minor reformatting.
1132 2014-02-24  Ben Brosgol  <brosgol@adacore.com>
1134         * gnat_ugn.texi, projects.texi: Added the necessary conditionalization
1135         so that references to gnatmem and ASIS tools do not appear in the FSF
1136         edition of the GNAT User's Guide.
1138 2014-02-24  Yannick Moy  <moy@adacore.com>
1140         * freeze.adb (Freeze_Entity): Do not issue warning
1141         for pre/post being ignored on imported subprogram in GNATprove
1142         mode.
1144 2014-02-24  Robert Dewar  <dewar@adacore.com>
1146         * exp_ch5.adb, sem_ch5.adb, sem_type.adb, sem_res.adb, sem_attr.adb,
1147         stand.ads, sem_eval.adb: Minor reformatting.
1149 2014-02-24  Yannick Moy  <moy@adacore.com>
1151         * sem_prag.adb: Minor rewording in error message.
1153 2014-02-24  Johannes Kanig  <kanig@adacore.com>
1155         * exp_util.adb (Expand_Subtype_From_Expr): Do not expand subtypes in
1156         GNATprove_mode, gnat2why doesn't need nor use these types.
1158 2014-02-24  Gary Dismukes  <dismukes@adacore.com>
1160         * exp_ch4.adb (Expand_N_Op_Expon): On the AAMP
1161         target, in the case of signed integer exponentiation that uses a
1162         run-time routine, always select the Exp_* versions, since overflow
1163         checking is automatically done by AAMP arithmetic instructions.
1165 2014-02-24  Hristian Kirtchev  <kirtchev@adacore.com>
1167         * sem_ch13.adb (Analyze_Aspect_Specifications):
1168         When the related context is a package instace, insert pragma
1169         Abstract_State after all internally-generated renamings related
1170         to the instance "header".
1172 2014-02-24  Ed Schonberg  <schonberg@adacore.com>
1174         * sem_ch3.adb (Analyze_Declarations): Analyze Contract of abstract
1175         subprograms.
1176         * sem_disp.adb (Check_Dispatching_Context): A non-dispatching
1177         call to an abstract subprogram is legal if it appears in a
1178         pre/postcondition of another abstract operation.
1180 2014-02-24  Sergey Rybin  <rybin@adacore.com frybin>
1182         * gnat_ugn.texi: Misc updates.
1184 2014-02-24  Hristian Kirtchev  <kirtchev@adacore.com>
1186         * exp_prag.adb (Expand_Old): Set the type of the generated temporary.
1188 2014-02-24  Gary Dismukes  <dismukes@adacore.com>
1190         * layout.adb (Layout_Variant_Record): Instantiate
1191         Generic_Check_Choices and call Check_Choices before calling
1192         Build_Discr_Checking_Funcs, since we need Others_Discrete_Choices
1193         set to prevent generating incorrect discriminant-checking
1194         functions for 'others' variants (functions that unconditionally
1195         return True rather than accounting for the values covered by the
1196         'others' choice).
1197         * sem_eval.ads (Subtypes_Statically_Compatible): Add formal
1198         Formal_Derived_Matching.
1199         (Subtypes_Statically_Match): Add formal Formal_Derived_Matching.
1200         * sem_eval.adb (Subtypes_Statically_Compatible): Pass new
1201         Formal_Derived_Matching formal to Subtypes_Statically_Match.
1202         (Subtypes_Statically_Match): Suppress the Object_Size matching
1203         test in the case where Formal_Derived_Matching is True.
1204         * sem_ch12.adb (Validate_Derived_Type_Instance): Pass
1205         True for Formal_Derived_Matching_Formal on the call to
1206         Subtypes_Statically_Compatible.
1208 2014-02-23  Eric Botcazou  <ebotcazou@adacore.com>
1210         * gcc-interface/Make-lang.in (ADA_TOOLS_FLAGS_TO_PASS): Robustify.
1212 2014-02-23  Eric Botcazou  <ebotcazou@adacore.com>
1214         * gcc-interface/utils2.c (build_simple_component_ref): Fix formatting.
1215         Look through a conversion between original and packable version to get
1216         the base object.
1217         (build_component_ref): Rework comment and fix formatting.
1219 2014-02-20  Sergey Rybin  <rybin@adacore.com frybin>
1221         * gnat_ugn.texi, vms_data.ads (gnatelim): Add description of
1222         project-specific options.
1224 2014-02-20  Ed Schonberg  <schonberg@adacore.com>
1226         * a-cbdlli.adb (Insert): When capacity exceeded, raise Capacity_Error,
1227         not Constraint_Error.
1228         * a-cbmutr.adb (Append_Child, Insert_Child, Prepend_Child): Ditto.
1229         * sem_ch5.adb: Code clean up.
1231 2014-02-20  Hristian Kirtchev  <kirtchev@adacore.com>
1233         * sem_prag.adb (Usage_Error): Remove local
1234         constant Typ. Remove the specialized diagnostics for unconstrained
1235         or tagged items as those are not part of the explicit input set
1236         of the related subprogram and should not be flagged.
1238 2014-02-20  Ed Schonberg  <schonberg@adacore.com>
1240         * sem_attr.adb: Add guard to preserve all errors.
1242 2014-02-20  Vincent Celier  <celier@adacore.com>
1244         * switch-m.adb (Normalize_Compiler_Switches): Take into account
1245         switches that are recorded in ALI files: -gnateA, -gnateE,
1246         -gnateF, -gnateinn, -gnateu, -gnateV and -gnateY.
1248 2014-02-20  Ed Schonberg  <schonberg@adacore.com>
1250         * sem_ch5.adb (Analyze_Iterator_Specification): Check legality
1251         of an element iterator form over a formal container with an
1252         Iterable aspect.
1253         * exp_ch5.adb (Build_Formal_Container_Iteration): Utility
1254         to create declaration and loop statements for both forms of
1255         container iterators.
1256         (Expand_Formal_Container_Element_Iterator): New procedure
1257         to handle loops of the form  "for E of C" when C is a formal
1258         container.
1259         (Expand_Formal_Container_Iterator): Code cleanup.
1261 2014-02-20  Hristian Kirtchev  <kirtchev@adacore.com>
1263         * sem_prag.adb (Add_Item_To_Name_Buffer): New routine.
1264         (Analyze_Contract_Case): Remove the use of
1265         "may". Replace "aspect Contract_Cases" to avoid categorization
1266         of aspect vs pragma.
1267         (Analyze_External_Property_In_Decl_Part): Remove the use of "formal".
1268         (Analyze_Global_Item): Remove
1269         the use of "formal", specify the subprogram.  Split the
1270         error message about a state with visible refinement into
1271         two. Remove the use of "global" from "volatile global item".
1272         (Analyze_Initialization_Item): Ensure that the SPARK RM reference
1273         is on one line.
1274         (Analyze_Input_Output): Update the call to
1275         Check_Mode. Specify the duplicated item. Reword the error
1276         message concerning an input of a null output list. Use "\"
1277         for error message continuation.
1278         (Analyze_Part_Of): Remove
1279         the use of "may". Use "\" for error message continuation.
1280         (Analyze_Refined_Depends_In_Decl_Part): Update the error
1281         message concerning a useless refinement to match the format
1282         of Refined_Global.
1283         (Analyze_Refined_Global_In_Decl_Part): Reword the error message
1284         concerning a useless refinement.
1285         (Analyze_Refinement_Clause): Use "\" for error message continuation.
1286         (Check_Constituent_Usage): Use "\" for error message continuation.
1287         (Check_Dependency_Clause): Use "\" for error message continuation.
1288         (Check_Matching_Constituent): Use "\" for error message continuation.
1289         (Check_Missing_Part_Of): Use "\" for error message continuation.
1290         (Check_Mode): Renamed to
1291         Check_Role. Update the comment on usage. Redo the error reporting
1292         to use Role_Error.
1293         (Check_Mode_Restriction_In_Enclosing_Context): Use "\" for error
1294         message continuation.
1295         (Find_Mode): Renamed to Find_Role. Update the parameter profile along
1296         with comment on usage. Update all occurrences of Is_Input and Is_Output.
1297         (Inconsistent_Mode_Error): Use "\" for error message continuation.
1298         (Input_Match): Use "\" for error message continuation.
1299         (Role_Error): New routine.
1300         (Set_Convention_From_Pragma): Use "\" for error message continuation.
1301         (Usage_Error): Add local variable Error_Msg. Build specialized error
1302         message showcasing the offending item kind. Redo the diagnostics for
1303         unconstrained types.
1305 2014-02-20  Ed Schonberg  <schonberg@adacore.com>
1307         * exp_util.adb (Is_Iterated_Container): Use high-level primitives
1308         to determine whether a type is a container type, rather than
1309         examining only its type declaration, so that subtypes and derived
1310         types are handled properly.
1312 2014-02-20  Sergey Rybin  <rybin@adacore.com frybin>
1314         * gnat_ugn.texi: gnatmetric: add description of project-specific
1315         options.
1317 2014-02-20  Ed Schonberg  <schonberg@adacore.com>
1319         * sem_attr.adb (Analyze_Attribute, case 'Update): Verify that
1320         all choices in an association for a record type have the same
1321         type, as is done for record aggregates.
1323 2014-02-20  Robert Dewar  <dewar@adacore.com>
1325         * a-cborma.adb, a-cbhama.adb, a-cbdlli.adb, a-cbmutr.adb: Use pragma
1326         Unmodified rather than Warnings (Off). Make comments
1327         uniform in the four affected units.
1329 2014-02-20  Robert Dewar  <dewar@adacore.com>
1331         * sem_ch13.adb (Analyze_Attribute_Definition_Clause, case
1332         Object_Size): For non-scalar types allow any value that is a
1333         multiple of 8.
1334         * gnat_rm.texi: Document Object_Size for composites more clearly.
1336 2014-02-20  Yannick Moy  <moy@adacore.com>
1338         * sem_util.ads, sem_util.adb (Default_Initialization): Remove function.
1340 2014-02-20  Ed Schonberg  <schonberg@adacore.com>
1342         * stand.ads: Raise_Type: new predefined entity, used as the type
1343         of a Raise_Expression prior to resolution.
1344         * cstand.adb: Build entity for Raise_Type.
1345         * sem_ch11.adb (Analyze_Raise_Expression): use Raise_Type as the
1346         initial type of the node.
1347         * sem_type.adb (Covers): Raise_Type is compatible with all
1348         other types.
1349         * sem_res.adb (Resolve): Remove special handling of Any_Type on
1350         Raise_Expression nodes.
1351         (Resolve_Raise_Expression): Signal ambiguity if the type of the
1352         context is still Raise_Type.
1354 2014-02-20  Robert Dewar  <dewar@adacore.com>
1356         * sem_ch12.adb (Validate_Access_Type_Instance): Add message if
1357         mismatching predicates.
1358         * sem_ch6.adb (Check_Conformance): Give better messages on
1359         predicate mismatch.
1360         * sem_eval.adb (Predicates_Match): Move to spec.
1361         * sem_eval.ads (Predicates_Match): Moved here from body.
1363 2014-02-20  Ed Schonberg  <schonberg@adacore.com>
1365         * a-cbmutr.adb: Use default value in Insert_Child.
1367 2014-02-20  Vincent Celier  <celier@adacore.com>
1369         * gnatcmd.adb, make.adb, prj-makr.adb, clean.adb: Call
1370         Stringt.Initialize in all project aware tools.
1372 2014-02-20  Doug Rupp  <rupp@adacore.com>
1374         * gnat_ugn.texi: Document gnatbind -X option.
1375         * vms_data.ads: Minor warnings documentation reformatting.
1377 2014-02-20  Ed Schonberg  <schonberg@adacore.com>
1379         * exp_ch3.adb (Expand_Freeze_Array_Type): Only create invariant
1380         procedure for a base type.
1382 2014-02-20  Robert Dewar  <dewar@adacore.com>
1384         * sem_ch4.adb (Analyze_Case_Expression): Get type from first
1385         expression with type info.
1386         * sem_ch13.adb: Minor reformatting.
1387         * sem_eval.adb (Subtypes_Statically_Match): Make sure we return
1388         False if predicates do not match on the two types.
1390 2014-02-20  Arnaud Charlet  <charlet@adacore.com>
1392         * sem_prag.adb (Analyze_Pragma [pragma Attach_Handler]):
1393         In Relaxed_RM_Semantics mode, allow any static integer value,
1394         for compatibility with other compilers.
1396 2014-02-20  Vincent Celier  <celier@adacore.com>
1398         * errutil.adb (Initialize): Properly initialize entry in table
1399         Warnings when warnings are suppressed.
1401 2014-02-20  Robert Dewar  <dewar@adacore.com>
1403         * s-os_lib.ads: Add warning about non-portability of Rename_File.
1404         * sem_util.ads, sem_util.adb (Is_Junk_Name): New function.
1405         * sem_warn.adb: Use Is_Junk_Name to suppress some warnings.
1406         * gnat_ugn.texi: Document no warnings on junk variable names.
1407         * layout.adb: Minor code reorganization (use Ekind_In).
1408         * stringt.adb: Move initialization of Null_String_Id to Initialize
1409         routine.
1411 2014-02-20  Ed Schonberg  <schonberg@adacore.com>
1413         * sem_ch13.adb: Initialize optional Element_Id.
1415 2014-02-20  Robert Dewar  <dewar@adacore.com>
1417         * s-os_lib.ads (Rename_File): Minor commment addition.
1419 2014-02-20  Thomas Quinot  <quinot@adacore.com>
1421         * einfo.ads: Minor reformatting.
1423 2014-02-20  Hristian Kirtchev  <kirtchev@adacore.com>
1425         * aspects.adb (Exchange_Aspects): New routine.
1426         * aspects.ads (Exchange_Aspects): New routine.
1427         * atree.adb (Rewrite): Do not check whether the save node has
1428         aspects as it never will, instead check the node about to be clobbered.
1429         * einfo.adb (Write_Field25_Name): Abstract_States can appear in
1430         entities of generic packages.
1431         * sem_ch6.adb (Analyze_Expression_Function): Fix the parent
1432         pointer of an aspect specification list after rewriting takes place.
1433         * sem_ch7.adb (Analyze_Package_Body_Helper): Swap the aspect
1434         specifications of the generic template and the copy used for analysis.
1435         * sem_ch12.adb (Analyze_Generic_Package_Declaration): Swap
1436         the aspect specifications of the generic template and the
1437         copy used for analysis.
1438         (Analyze_Package_Instantiation): Propagate the aspect specifications
1439         from the generic template to the instantiation.
1440         (Build_Instance_Compilation_Unit_Nodes): Propagate the aspect
1441         specifications from the generic template to the instantiation.
1442         * sem_ch13.adb (Analyze_Aspect_Specifications): Handle aspects
1443         Abstract_State, Initializes and Initial_Condition when they
1444         apply to a package instantiation.
1446 2014-02-20  Robert Dewar  <dewar@adacore.com>
1448         * stringt.adb: Add call to Initialize in package initialization.
1450 2014-02-20  Robert Dewar  <dewar@adacore.com>
1452         * a-crbtgk.adb, a-cihama.adb, a-coinve.adb, a-ciorse.adb, a-crbtgo.adb,
1453         a-cidlli.adb, a-cimutr.adb, a-cihase.adb, a-cohama.adb, a-coorse.adb,
1454         a-chtgke.adb, a-chtgop.adb, a-comutr.adb, a-ciorma.adb, a-cobove.adb,
1455         a-convec.adb, a-cohase.adb, a-chtgbk.adb, a-chtgbo.adb: Minor
1456         reformatting.
1458 2014-02-20  Bob Duff  <duff@adacore.com>
1460         * s-os_lib.ads: Minor: Remove incorrect comment.
1462 2014-02-20  Robert Dewar  <dewar@adacore.com>
1464         * sem_elab.adb (Check_Elab_Assign): Clearer warning message.
1466 2014-02-20  Ed Schonberg  <schonberg@adacore.com>
1468         * a-cborma.adb (Assign): When creating a node without a specified
1469         element, insert an uninitialized element in the map, because
1470         the instance may provide an element type with a default
1471         initialization, e.g a scalar with a Default_Value aspect.
1472         * a-cbhama.adb (Assign_Key): Remove useless Allocate procedure.
1473         (Insert): In the version without explicit element, provide an
1474         uninitialized element, as above.
1475         * a-cbdlli.adb (Append): In the version without explicit element,
1476         provide an uninitalized element, as above.
1477         (Allocate): Remove unused version.
1479 2014-02-20  Robert Dewar  <dewar@adacore.com>
1481         * sem_elab.adb: Minor code reorganization (use Nkind_In).
1482         * stringt.adb: Remove temporary pragma Warnings (Off).
1483         * stringt.ads: Add pragma Elaborate_Body to ensure initialization
1484         of Null_String_Id.
1486 2014-02-20  Matthew Heaney  <heaney@adacore.com>
1488         * a-chtgbk.adb (Replace): Use correct offset when calculating bucket
1489         index.
1491 2014-02-20  Ed Schonberg  <schonberg@adacore.com>
1493         * sem_ch5.adb (Analyze_Iterator_Specification): Initialize
1494         properly the cursor type for subsequent volatile testing in SPARK
1495         mode, when domain is a formal container with an Iterabe aspect.
1497 2014-02-20  Robert Dewar  <dewar@adacore.com>
1499         * errout.adb (Set_Warnings_Mode_Off): Add Reason argument.
1500         (Set_Specific_Warning_Off): Add Reason argument.
1501         * errout.ads (Set_Warnings_Mode_Off): Add Reason argument.
1502         (Set_Specific_Warning_Off): Add Reason argument.
1503         * erroutc.adb (Warnings_Entry): Add Reason field
1504         (Specific_Warning_Entry): Add Reason field.
1505         (Warnings_Suppressed): return String_Id for Reason.
1506         (Warning_Specifically_Suppressed): return String_Id for Reason.
1507         * erroutc.ads (Warnings_Entry): Add Reason field.
1508         (Specific_Warning_Entry): Add Reason field.
1509         (Set_Specific_Warning_Off): Add Reason argument.
1510         (Set_Warnings_Mode_Off): Add Reason argument.
1511         (Warnings_Suppressed): return String_Id for Reason.
1512         (Warning_Specifically_Suppressed): return String_Id for Reason.
1513         * errutil.adb (Warnings_Suppressed): returns String_Id for Reason
1514         (Warning_Specifically_Suppressed): returns String_Id for Reason
1515         * gnat_rm.texi: Document that Warning parameter is string literal
1516         or a concatenation of string literals.
1517         * par-prag.adb: New handling for Reason argument.
1518         * sem_prag.adb (Analyze_Pragma, case Warning): New handling
1519         for Reason argument.
1520         * sem_util.ads, sem_util.adb (Get_Reason_String): New procedure.
1521         * sem_warn.ads (Warnings_Off_Entry): Add reason field.
1522         * stringt.adb: Set Null_String_Id.
1523         * stringt.ads (Null_String_Id): New constant.
1525 2014-02-20  Robert Dewar  <dewar@adacore.com>
1527         * einfo.ads: Minor comment addition: Etype of package is
1528         Standard_Void_Type.
1529         * checks.adb, exp_aggr.adb, exp_atag.adb, exp_attr.adb, exp_ch13.adb,
1530         exp_ch2.adb, exp_ch3.adb, exp_ch4.adb, exp_ch5.adb, exp_ch6.adb,
1531         exp_ch7.adb, exp_ch9.adb, exp_dbug.adb, exp_disp.adb, exp_imgv.adb,
1532         exp_intr.adb, exp_prag.adb, exp_sel.adb, exp_strm.adb, exp_util.adb,
1533         freeze.adb, rtsfind.adb, sem_aggr.adb, sem_attr.adb, sem_ch10.adb,
1534         sem_ch12.adb, sem_ch13.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
1535         sem_ch6.adb, sem_ch8.adb, sem_dim.adb, sem_prag.adb, sem_res.adb,
1536         sem_util.adb, tbuild.adb, tbuild.ads: Remove New_Reference_To.
1537         Replace all calls with calls to New_Occurrence_Of.
1539 2014-02-20  Robert Dewar  <dewar@adacore.com>
1541         * par-util.adb (Ignore, case of right paren): Make this a
1542         serious error.
1544 2014-02-19  Robert Dewar  <dewar@adacore.com>
1546         * sem_ch5.adb, sem_prag.adb, sem_attr.adb: Minor reformatting.
1547         * debug.adb: Remove -gnatd.X switch, no longer used.
1548         * styleg.adb (Check_Then): Remove check of -gnatd.X, check is
1549         now always made.
1551 2014-02-19  Bob Duff  <duff@adacore.com>
1553         * g-socket.ads: Minor: Correct some comments.
1555 2014-02-19  Ed Schonberg  <schonberg@adacore.com>
1557         * sem_ch5.adb: Inhibit iterator rewriting in ASIS mode.
1559 2014-02-19  Arnaud Charlet  <charlet@adacore.com>
1561         * sem_ch13.adb (Analyze_Aspect_Specifications): Do not generate
1562         an error on out of range priorities if Relaxed_RM_Semantics.
1563         * sem_prag.adb (Analyze_Pragma): Ditto.
1565 2014-02-19  Bob Duff  <duff@adacore.com>
1567         * sem_attr.adb (Resolve_Attribute): Detect the case of F'Access
1568         where F denotes the renaming of an enumeration literal, and
1569         issue a specialized error message.
1571 2014-02-19  Matthew Heaney  <heaney@adacore.com>
1573         * a-chtgop.ads (Checked_Index): New operation.
1574         (Next): Changed mode of hash table.
1575         * a-chtgop.adb (Adjust, Delete_Node_Sans_Free): Detect tampering
1576         (Generic_Read, Reserve_Capacity): Ditto.
1577         (Generic_Equal): Detect tampering.
1578         (Next): Changed mode of hash table, detect tampering.
1579         * a-chtgke.ads (Checked_Index, Checked_Equivalent_Keys): New
1580         operation.
1581         (Find): Changed mode of hash table.
1582         * a-chtgke.adb (Checked_Equivalent_Keys): New operation
1583         (Delete_Key_Sans_Free, Generic_Conditional_Insert): Detect
1584         tampering.
1585         (Find): Changed mode of hash table, check for tampering.
1586         (Generic_Replace_Element): Check for tampering.
1587         * a-chtgbk.ads (Checked_Index, Checked_Equivalent_Keys): New operation.
1588         * a-chtgbk.adb (Checked_Index, Checked_Equivalent_Keys): New
1589         operation (Delete_Key_Sans_Free, Generic_Conditional_Insert):
1590         Detect tampering.
1591         (Find, Generic_Replace_Element): Check for tampering.
1592         * a-chtgbo.ads (Checked_Index): New operation.
1593         * a-chtgbo.adb (Checked_Index): New operation
1594         (Delete_Node_Sans_Free, Generic_Equal): Detect tampering.
1595         (Generic_Read, Next): Ditto.
1596         * a-cohase.adb, a-cihase.adb (Is_In): Changed mode of hash
1597         table (Difference, Intersection): Use variable view of
1598         source, detect tampering (Find, Is_Subset, Overlap): Use
1599         variable view of container (Symmetric_Difference, Union):
1600         Detect tampering (Vet): Use Checked_Index to detect tampering
1601         (Constant_Reference, Element, Find): Use variable view of
1602         container.
1603         (Update_Element_Preserving_Key): Detect tampering.
1604         * a-cbhase.adb (Difference, Find, Is_In): Use variable view
1605         of container.
1606         (Is_Subset): Ditto.
1607         (Equivalent_Sets, Overlap): Use Node's Next component.
1608         (Vet): Use Checked_Index to detect tampering.
1609         (Constant_Reference, Element, Find): Use variable view of container.
1610         (Update_Element_Preserving_Key): Detect tampering.
1611         * a-cohama.adb, a-cihama.adb, a-cbhama.adb (Constant_Reference,
1612         Element, Find): Use variable view of container.
1613         (Reference): Rename hash table component.
1614         (Vet): Use Checked_Index to detect tampering.
1616 2014-02-19  Arnaud Charlet  <charlet@adacore.com>
1618         * adabkend.adb (Scan_Compiler_Arguments): Add missing handling
1619         of -nostdinc.
1621 2014-02-19  Thomas Quinot  <quinot@adacore.com>
1623         * tbuild.adb (New_Occurrence_Of, New_Rerefence_To): Guard
1624         against calls without Def_Id.
1626 2014-02-19  Claire Dross  <dross@adacore.com>
1628         * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads, a-cforse.ads,
1629         a-cofove.ads: Add global annotations to subprograms.
1631 2014-02-19  Hristian Kirtchev  <kirtchev@adacore.com>
1633         * sem_prag.adb (Analyze_Initial_Condition_In_Decl_Part): Remove
1634         constants Errors, Pack_Id and Pack_Init. Remove variable Vars.
1635         Initial_Condition no longer requires the presence of pragma
1636         Initialized. Do not try to diagnose whether all variables mentioned in
1637         pragma Initializes also appear in Initial_Condition.
1638         (Collect_Variables): Removed.
1639         (Match_Variable): Removed.
1640         (Match_Variables): Removed.
1641         (Report_Unused_Variables): Removed.
1643 2014-02-19  Thomas Quinot  <quinot@adacore.com>
1645         * gnat_rm.texi (pragma Stream_Convert): Minor rewording.
1647 2014-02-19  Robert Dewar  <dewar@adacore.com>
1649         * sem_util.adb, sem_util.ads, prj-conf.adb, s-os_lib.adb: Minor
1650         reformatting.
1652 2014-02-19  Vincent Celier  <celier@adacore.com>
1654         * prj-part.adb (Parse_Single_Project): Use the fully resolved
1655         project path, with all symbolic links resolved, to check if the
1656         same project is imported with a different unresolved path.
1657         * prj-tree.ads (Project_Name_And_Node): Component Canonical_Path
1658         changed to Resolved_Path to reflect that all symbolic links
1659         are resolved.
1661 2014-02-19  Ed Schonberg  <schonberg@adacore.com>
1663         * sem_util.ads, sem_util.adb (Get_Cursor_Type): Moved to sem_util
1664         from sem_ch13, for use elsewhere.
1665         * sem_ch13.adb (Get_Cursor_Type): Moved to sem_util.
1666         * sem_ch5.adb (Analyze_Iterator_Specification): Set properly the
1667         cursor type on the loop variable when the iteration is over o
1668         formal container.
1670 2014-02-19  Vincent Celier  <celier@adacore.com>
1672         * prj-conf.adb (Add_Default_GNAT_Naming_Scheme): Add declaration
1673         for an empty Target (Check_Target): Never fail when an empty
1674         target is declared in the configuration project.
1676 2014-02-19  Ed Schonberg  <schonberg@adacore.com>
1678         * sem_prag.adb (Check_Arg_Is_Local_Name): Argument is local if
1679         the pragma comes fron a predicate aspect and the context is a
1680         record declaration within the scope that declares the type.
1682 2014-02-19  Robert Dewar  <dewar@adacore.com>
1684         * gnat_rm.texi: Minor clarifications.
1685         * expander.adb, sem_aggr.adb: Add comments.
1687 2014-02-19  Ed Schonberg  <schonberg@adacore.com>
1689         * sem_prag.adb (Check_Arg_Is_Local_Name): For an aspect that
1690         applies to a subprogram body, the name is the current scope,
1691         rather than being declared in the current scope.
1692         (Analyze_Pragma, case No_Return): Handle properly a No_Return
1693         aspect applied to a subprogram body.
1695 2014-02-19  Ed Schonberg  <schonberg@adacore.com>
1697         * sem_ch13.adb (Resolve_Iterable_Operation): Improve resolution
1698         of overloaded subprograms, and fix bug in handling of primitive
1699         operation Element.
1701 2014-02-19  Pascal Obry  <obry@adacore.com>
1703         * s-os_lib.adb: Minor reformatting.
1705 2014-02-19  Yannick Moy  <moy@adacore.com>
1707         * expander.adb (Expand): Do nothing inside generics.
1708         * sem_aggr.adb (Aggregate_Constraint_Checks): Do nothing inside
1709         generics.
1711 2014-02-19  Yannick Moy  <moy@adacore.com>
1713         * exp_ch2.adb: Remove useless 'with' of unit Uintp.
1715 2014-02-19  Robert Dewar  <dewar@adacore.com>
1717         * sem_ch3.adb, style.adb, sem_prag.adb, sem_ch13.adb: Minor reformatting
1718         * a-sequio.adb: Remove useless pragma Extensions_Allowed (no
1719         longer needed).
1721 2014-02-19  Claire Dross  <dross@adacore.com>
1723         * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
1724         a-cforse.ads, a-cofove.ads: Add Iterable aspect to formal containers.
1726 2014-02-19  Hristian Kirtchev  <kirtchev@adacore.com>
1728         * sem_ch3.adb (Analyze_Declarations): Analyze
1729         a package contract at the end of the private declarations (if
1730         applicable), otherwise analyze it and the end of the visible
1731         declarations.
1733 2014-02-19  Ed Schonberg  <schonberg@adacore.com>
1735         * style.adb (Missing_Overriding): If subprogram is an
1736         instantiation, place warning on the instance node itself,
1737         without mention of the original generic. Do not emit message
1738         if explicit Ada version is older than the introduction of the
1739         overriding indicator.
1741 2014-02-19  Yannick Moy  <moy@adacore.com>
1743         * gnat_rm.texi: Doc clarifications.
1745 2014-02-19  Yannick Moy  <moy@adacore.com>
1747         * exp_util.adb (Remove_Side_Effects): Do not remove side-effects
1748         inside a generic.
1750 2014-02-19  Ed Schonberg  <schonberg@adacore.com>
1752         * sem_ch13.adb (Get_Cursor_Type): Obtain cursor type from
1753         specified First primitive, rather than by name.
1754         (Validate_Iterable_Aspect, Resolve_Iterable_Operation): Use it,
1755         and extend error checking for missing primitives and incorrect
1756         signatures.
1758 2014-02-19  Ed Schonberg  <schonberg@adacore.com>
1760         * sem_ch3.adb (Check_Pragma_Implemented): Detect additional
1761         errors when a Synchronization aspect on an overriding protected
1762         operation does not match the given aspect on the overridden
1763         operation of an ancestor interface.
1765 2014-02-19  Hristian Kirtchev  <kirtchev@adacore.com>
1767         * sem_prag.adb (Check_Loop_Pragma_Grouping): New routine.
1768         (Check_Loop_Pragma_Placement): Update
1769         comment on usage. Remove local variables Orig_Stmt and
1770         Within_Same_Sequence. Check that the current Loop_Invariant or
1771         Loop_Variant pragma is grouped together with other such pragmas.
1772         (Is_Loop_Pragma): New routine.
1773         (Prev_In_Loop): Removed.
1775 2014-02-19  Robert Dewar  <dewar@adacore.com>
1777         * par-ch6.adb (P_Return): For extended return, end column lines
1778         up with RETURN.
1779         * par.adb: Minor documentation clarification.
1781 2014-02-19  Yannick Moy  <moy@adacore.com>
1783         * sem_prag.adb (Check_Loop_Pragma_Placement): Add check
1784         that Loop_Invariant and Loop_Variant appear consecutively.
1785         * gnat_rm.texi Update documentation of Loop_Invariant and
1786         Loop_Variant pragmas.
1788 2014-02-19  Robert Dewar  <dewar@adacore.com>
1790         * debug.adb: Document -gnatd.X.
1791         * par-ch5.adb (P_If_Statement): Always check THEN, even if not
1792         first token
1793         (Check_Then_Column): Ditto.
1794         * styleg.adb (Check_Then): Allow THEN on line after IF.
1795         (Check_Then): Check THEN placement under control of -gnatd.X
1796         * styleg.ads (Check_Then): Now called even if THEN is not first
1797         token on line.
1798         * stylesw.ads (Style_Check_If_Then_Layout): Document new
1799         relaxed rules.
1800         * gnat_ugn.texi: For -gnatyi, THEN can now be on line after IF.
1802 2014-02-19  Robert Dewar  <dewar@adacore.com>
1804         * a-cfhama.adb, a-cfhase.adb, a-cforse.adb, a-cofove.adb, a-ngcefu.adb,
1805         a-teioed.adb, a-wtedit.adb, a-ztedit.adb, exp_ch5.adb, inline.adb,
1806         prj-pp.adb, prj-tree.adb, sem_ch12.adb, sem_ch8.adb,
1807         vms_conv.adb: Fix bad layout of IF statements
1809 2014-02-19  Robert Dewar  <dewar@adacore.com>
1811         * exp_util.adb (Side_Effect_Free): Scalar if expressions can be SEF.
1813 2014-02-19  Robert Dewar  <dewar@adacore.com>
1815         * exp_util.adb: Update comments.
1817 2014-02-19  Doug Rupp  <rupp@adacore.com>
1819         * bindgen.adb (Gen_Adainit) [VMS] New global Float_Format.
1820         * init.c (__gl_float_format): [VMS] New global.
1821         (__gnat_set_features): Call FP_CONTROL to set FPSR for the float
1822         representation in effect.
1824 2014-02-19  Hristian Kirtchev  <kirtchev@adacore.com>
1826         * exp_ch6.adb Add with and use clause for Exp_Prag.
1827         (Expand_Contract_Cases): Relocated to Exp_Prag.
1828         * exp_ch6.ads (Expand_Contract_Cases): Relocated to Exp_Prag.
1829         * exp_prag.adb Add with and use clauses for Checks and Validsw.
1830         (Expand_Contract_Cases): Relocated from Exp_Ch6. Update the
1831         structure of the expanded code to showcase the evaluation of
1832         attribute 'Old prefixes. Add local variable Old_Evals. Expand
1833         any attribute 'Old references found within a consequence. Add
1834         circuitry to evaluate the prefixes of attribute 'Old that
1835         belong to a selected consequence.
1836         (Expand_Old_In_Consequence): New routine.
1837         * exp_prag.ads (Expand_Contract_Cases): Relocated from Exp_Ch6.
1838         * sem_attr.adb (Check_Use_In_Contract_Cases): Warn that a
1839         potentially unevaluated prefix is always evaluated.
1841 2014-02-19  Robert Dewar  <dewar@adacore.com>
1843         * exp_attr.adb (Expand_Min_Max_Attribute): Use Insert_Declaration
1844         (Expand_Min_Max_Attribute): Use Matching_Standard_Type.
1845         * exp_ch4.adb (Expand_N_Expression_With_Actions): Remove special
1846         handling for the case of Modify_Tree_For_C, this approach did
1847         not work.
1848         * exp_util.adb (Matching_Standard_Type): New function
1849         (Side_Effect_Free): New top level functions (from
1850         Remove_Side_Effects).
1851         * exp_util.ads (Side_Effect_Free): New top level functions
1852         (moved from body).
1853         * sinfo.ads: Minor comment updates.
1855 2014-02-19  Ed Schonberg  <schonberg@adacore.com>
1857         * exp_ch6.adb (Expand_Simple_Function_Return): If return
1858         type is unconstrained and uses the secondary stack, mark the
1859         enclosing function accordingly, to ensure that the value is not
1860         prematurely removed.
1862 2014-02-19  Hristian Kirtchev  <kirtchev@adacore.com>
1864         * par.adb Alphabetize the routines in Par.Sync.
1865         (Resync_Past_Malformed_Aspect): New routine.
1866         * par-ch13.adb (Get_Aspect_Specifications): Alphabetize local
1867         variables. Code and comment reformatting. Detect missing
1868         parentheses on aspects [Refined_]Global and [Refined_]Depends
1869         with a non-null definition.
1870         * par-sync.adb: Alphabetize all routines in this separate unit.
1871         (Resync_Past_Malformed_Aspect): New routine.
1873 2014-02-19  Robert Dewar  <dewar@adacore.com>
1875         * sem_eval.ads, sem_eval.adb (Subtypes_Statically_Match): Return False
1876         if Esize values do not match.
1878 2014-02-19  Yannick Moy  <moy@adacore.com>
1880         * sinfo.ads: Minor comment update.
1882 2014-02-19  Hristian Kirtchev  <kirtchev@adacore.com>
1884         * atree.ads: Minor reformatting (change Entity_Info to Einfo).
1886 2014-02-19  Thomas Quinot  <quinot@adacore.com>
1888         * exp_ch7.adb (Find_Node_To_Be_Wrapped): An assignment statement
1889         that has the No_Ctrl_Actions flag is a suitable node to be
1890         wrapped if the assigned expression has no finalization actions.
1891         * sem_eval.adb (Eval_Entity_Name): For a compile time known
1892         boolean value, mark the corresponding condition SCO as constant.
1894 2014-02-19  Robert Dewar  <dewar@adacore.com>
1896         * exp_util.adb: Minor reformatting.
1897         * exp_util.ads (Matching_Standard_Type): New function.
1898         * exp_ch7.adb: Minor reformatting.
1900 2014-02-19  Ed Schonberg  <schonberg@adacore.com>
1902         * sem_ch13.adb (Get_Cursor_Type): Use scope of iterable type
1903         to find declaration for Cursor, to handle properly the case of
1904         a discriminated iterable type.
1906 2014-02-19  Vincent Celier  <celier@adacore.com>
1908         * gnatcmd.adb (GNATCmd): Always replace the object dirs of
1909         imported library projects with the library ALI dirs, when setting
1910         the object paths.
1911         * prj-env.ads (Ada_Objects_Path): Correct comments about
1912         argument Including_Libraries.
1914 2014-02-19  Gary Dismukes  <dismukes@adacore.com>
1916         * gnat_rm.texi: Minor spelling fixes.
1918 2014-02-19  Doug Rupp  <rupp@adacore.com>
1920         * init.c: Remove unneeded code.
1921         * fe.h (Float_Format): New macro
1922         * gcc-interface/trans.c (gigi): On VMS, set vms_float_format.
1924 2014-02-19  Hristian Kirtchev  <kirtchev@adacore.com>
1926         * sem_prag.adb (Check_Refined_Global_Item):
1927         A state or variable acts as a constituent only it is part of an
1928         encapsulating state and the state has visible refinement.
1930 2014-02-19  Ed Schonberg  <schonberg@adacore.com>
1932         * sem_ch6.adb (Analyze_Subprogram_Contract): Do not warn on a
1933         postcondition for a function when the expression does not mention
1934         'Result but the function has in-out parameters.
1936 2014-02-19  Robert Dewar  <dewar@adacore.com>
1938         * gnat_rm.texi: Add documentation on Value_Size forcing biased
1939         representation.
1941 2014-02-19  Hristian Kirtchev  <kirtchev@adacore.com>
1943         * lib-xref.ads Remove the small table of letter and symbol usage as we
1944         already have one.
1946 2014-02-19  Hristian Kirtchev  <kirtchev@adacore.com>
1948         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Emit specific error
1949         messages depending on the offending misplaced aspect specifications.
1950         (Diagnose_Misplaced_Aspect_Specifications): New routine.
1952 2014-02-19  Ed Schonberg  <schonberg@adacore.com>
1954         * sem_ch13.adb (Get_Cursor): Utility to retrieve cursor type
1955         for iterable aspect primitives.
1956         (Resolve_Iterable_Operation): Use expected signature of iterable
1957         aspect to resolve primitive when overloading is present.
1958         (Validate_Iterable_Aspect, Analyze_Aspects_At_Freeze_Point): use it.
1959         (Check_Signature): Removed.
1961 2014-02-19  Yannick Moy  <moy@adacore.com>
1963         * sem_ch10.adb (Analyze_Proper_Body): Issue error on missing
1964         subunit in GNATprove_Mode.
1965         * sinfo.ads (GNATprove_Mode): Document error issued in GNATprove_Mode.
1967 2014-02-19  Hristian Kirtchev  <kirtchev@adacore.com>
1969         * lib-xref.ads Alphabetize the contents of table
1970         Xref_Entity_Letters. Add an entry in table Xref_Entity_Letters
1971         for E_Abstract_State. List all letters and symbols in use.
1972         * sem_prag.adb (Analyze_Abstract_State): Update all calls
1973         to Create_Abstract_State to reflect the new signature.
1974         (Create_Abstract_State): Change subprogram profile and update
1975         the comment on usage. Use the proper location of the state
1976         declaration when creating a new abstract state entity. Do not
1977         generate an external name, but simply reuse the name coming from
1978         the state declaration.
1980 2014-02-19  Robert Dewar  <dewar@adacore.com>
1982         * exp_ch4.adb (Expand_N_Expression_With_Actions): Make sure
1983         declarations get properly inserted in Modify_Tree_For_C mode.
1984         * sinfo.ads: Minor comment addition.
1986 2014-02-19  Robert Dewar  <dewar@adacore.com>
1988         * par-ch9.adb, exp_ch5.adb, sem_ch5.adb, exp_attr.adb, sem_util.adb,
1989         sem_util.ads, sem_ch13.adb, sem_ch13.ads: Minor reformatting.
1991 2014-02-19  Ed Schonberg  <schonberg@adacore.com>
1993         * style.adb (Missing_Overriding): Warning does not apply in
1994         language versions prior to Ada 2005.
1995         * snames.ads-tmpl: Add Name_Iterable and Attribute_Iterable.
1996         * sem_attr.adb: Add Attribute_Iterable where needed.
1997         * exp_attr.adb: ditto.
1998         * exp_ch5.adb (Expand_Formal_Container_Loop): New procedure to
1999         handle loops and quantified expressions over types that have an
2000         iterable aspect.  Called from Expand_Iterator_Loop.
2001         * sem_ch5.adb (Analyze_Iterator_Specification): Recognize types
2002         with Iterable aspect.
2003         * sem_ch13.adb (Validate_Iterable_Aspect): Verify that the
2004         subprograms specified in the Iterable aspect have the proper
2005         signature involving container and cursor.
2006         (Check_Aspect_At_Freeze_Point): Analyze value of iterable aspect.
2007         * sem_ch13.ads (Validate_Iterable_Aspect): New subprogram.
2008         * sem_util.ads, sem_util.adb (Get_Iterable_Type_Primitive):
2009         New procedure to retrieve one of the primitives First, Last,
2010         or Has_Element, from the value of the iterable aspect of a
2011         formal container.
2012         (Is_Container_Element): Predicate to recognize expressions
2013         that denote an element of one of the predefined containers,
2014         for possible optimization.  This subprogram is not currently
2015         used, pending ARG discussions on the legality of the proposed
2016         optimization. Worth preserving for eventual use.
2017         (Is_Iterator): Recognize formal container types.
2018         * aspects.ads, aspects.adb: Add Aspect_Iterable where needed.
2020 2014-02-19  Robert Dewar  <dewar@adacore.com>
2022         * exp_attr.adb (Expand_Min_Max_Attribute): New procedure
2023         (Expand_N_Attribute_Reference): Use this procedure for Min and Max.
2024         * exp_ch4.adb (Expand_N_Expression_With_Actions): Remove object
2025         declarations from list of actions.
2026         * output.ads, output.adb (Delete_Last_Char): New procedure.
2027         * sinfo.ads: Document handling of Mod and expression with actions
2028         in Modify_Tree_For_C mode.
2030 2014-02-19  Ed Schonberg  <schonberg@adacore.com>
2032         * par-ch9.adb (P_Task): Add a null statement to produce a
2033         well-formed task body when due to a previous syntax error the
2034         statement list is empty.
2036 2014-02-19  Hristian Kirtchev  <kirtchev@adacore.com>
2038         * sem_prag.adb (Check_Dependency_Clause): Account
2039         for the case where a state with a non-null refinement matches a
2040         null output list. Comment reformatting.
2041         (Inputs_Match): Copy a solitary input to avoid an assertion failure
2042         when trying to match the same input in multiple clauses.
2044 2014-02-19  Gary Dismukes  <dismukes@adacore.com>
2046         * sem_attr.adb: Minor typo fix.
2048 2014-02-18  Robert Dewar  <dewar@adacore.com>
2050         * cstand.adb (Build_Signed_Integer_Type): Minor change of formal
2051         from Int to Nat (Build_Unsigned_Integer_Type): New procedure
2052         (Create_Standard): Create new unsigned types.
2053         * exp_ch4.adb (Expand_N_Op_Mod): Expand mod in Modify_Tree_For_C
2054         mode (Expand_N_Reference): Removed, problematic and not needed
2055         for now.
2056         * exp_ch4.ads (Expand_N_Reference): Removed, problematic and
2057         not needed for now.
2058         * exp_util.ads, exp_util.adb (Power_Of_Two): New function.
2059         * expander.adb: Remove call to Expand_N_Reference (problematic,
2060         and not needed now).
2061         * sem_aux.ads, sem_aux.adb (Corresponding_Unsigned_Type): New function.
2062         * stand.adb: Read and write unsigned type entities.
2063         * stand.ads: Add new unsigned types.
2065 2014-02-18  Hristian Kirtchev  <kirtchev@adacore.com>
2067         * sem_ch4.adb (Analyze_Call): Do not mark a function call
2068         as being inside an assertion expression as the flag is now removed.
2069         (Check_Ghost_Subprogram_Call): Do not query the
2070         In_Assertion_Expression flag as it is now removed, instead use
2071         a predicate function.
2072         * sem_elab.adb (Check_Internal_Call_Continue): Do not query the
2073         In_Assertion_Expression flag as it is now removed, instead use
2074         a predicate function.
2075         * sem_prag.ads: Add new table Assertion_Expression_Pragma.
2076         * sem_util.adb Add with and use clause for Sem_Prag.
2077         (In_Assertion_Expression_Pragma): New routine.
2078         * sem_util.ads (In_Assertion_Expression_Pragma): New routine.
2079         * sinfo.adb (In_Assertion_Expression): Removed.
2080         (Set_In_Assertion_Expression): Removed.
2081         * sinfo.ads Remove flag In_Assertion_Expression along with its
2082         use in nodes.
2083         (In_Assertion_Expression): Removed along with
2084         pragma Inline.  (Set_In_Assertion_Expression): Removed along
2085         with pragma Inline.
2087 2014-02-18  Sergey Rybin  <rybin@adacore.com frybin>
2089         * gnat_ugn.texi: gnatpp section: add note that '-j' cannot be
2090         used together with '-r', '-rf' or '-rnb' options.
2092 2014-02-18  Hristian Kirtchev  <kirtchev@adacore.com>
2094         * sem_attr.adb (Analyze_Attribute): Comment
2095         and code reformatting. Use separate routines to check the
2096         legality of attribute 'Old in certain pragmas. Verify
2097         the use of 'Old, 'Result and locally declared entities
2098         within the prefix of 'Old.
2099         (Check_References_In_Prefix): New routine.
2100         (Check_Use_In_Contract_Cases): New routine.
2101         (Check_Use_In_Test_Case): New routine.
2103 2014-02-18  Vincent Celier  <celier@adacore.com>
2105         * sem_aux.adb (Is_By_Reference_Type): For each components of
2106         a record type, check also if the component is volatile as it
2107         may have an aspect that makes it volatile. If it is, then the
2108         record type is a by reference type.
2110 2014-02-18  Robert Dewar  <dewar@adacore.com>
2112         * exp_attr.adb: Minor reformatting.
2113         * exp_ch4.ads, exp_ch4.adb (Expand_N_Reference): New procedure.
2114         * exp_util.adb (Remove_Side_Effects): Add conditional expressions
2115         as another case where we don't generate N_Reference nodes for
2116         primitive types.
2117         * expander.adb (Expand): Add call to Expand_N_Reference.
2119 2014-02-06  Hristian Kirtchev  <kirtchev@adacore.com>
2121         * sem_prag.adb (Analyze_Refined_Pragma): Remove
2122         local variable Pack_Spec. Refinement pragmas may now apply to
2123         bodies of both visible and private subprograms.
2125 2014-02-06  Robert Dewar  <dewar@adacore.com>
2127         * exp_attr.adb (Expand_Loop_Entry_Attribute):
2128         Minor change (Attr => N) (Expand_Pred_Succ): New name
2129         Expand_Pred_Succ_Attribute (Expand_N_Attribute_Reference, case
2130         Max): Expand into if expression if Modify_Tree_For_C mode.
2131         (Expand_N_Attribute_Reference, case Min): ditto
2132         * sinfo.ads: Modify_Tree_For_C takes care of expanding Min and
2133         Max attributes.
2135 2014-02-06  Ed Schonberg  <schonberg@adacore.com>
2137         * sem_ch3.adb (Analyze_Object_Declaration): Do not generate
2138         predicate check if this is an internal declaration with
2139         No_Initialization set, as for an expanded aggregate component.
2141 2014-02-06  Doug Rupp  <rupp@adacore.com>
2143         * init.c (__gnat_default_resignal_p) [VMS]: Test for and resignal
2144         conditions with severity of "SUCCESS" or "INFORMATIONAL".
2146 2014-02-06  Yannick Moy  <moy@adacore.com>
2148         * sem_prag.adb (Analyze_Pragma): Analyze pragma
2149         Debug rewritten node before rewriting it as a null statement in
2150         GNATprove mode.
2152 2014-02-06  Robert Dewar  <dewar@adacore.com>
2154         * sem_attr.adb (Min_Max): New procedure.
2155         (Max_Alignment_For_Allocation_Max_Size_In_Storage_Elements): New
2156         procedure.
2158 2014-02-06  Sergey Rybin  <rybin@adacore.com frybin>
2160         * gnat_ugn.texi, vms_data.ads: Add documentation of '-t' option for
2161         gnatmetric/gnatpp.
2163 2014-02-06  Hristian Kirtchev  <kirtchev@adacore.com>
2165         * sem_prag.adb (Analyze_Abstract_State): Update
2166         all calls to Create_Abstract_State to pass the proper state
2167         "declaration".
2168         (Create_Abstract_State): Add new formal parameter
2169         State_Decl along with comment on usage. Establish a link between
2170         the abstract state entity and the state declaration.
2172 2014-02-06  Robert Dewar  <dewar@adacore.com>
2174         * sem_attr.adb (Analyze_Attribute, case Max): Check for improper
2175         comparison of unordered enumeration type.
2176         (Analyze_Attribute, case Max): Check for improper comparison of
2177         unordered enumeration type.
2178         * sem_res.adb (Bad_Unordered_Enumeration_Reference): Moved to
2179         sem_util.adb.
2180         * sem_util.ads, sem_util.adb (Bad_Unordered_Enumeration_Reference):
2181         Moved here from Sem_Res.
2183 2014-02-06  Robert Dewar  <dewar@adacore.com>
2185         * sem_ch3.adb, sem_prag.adb, sem_res.adb, lib-xref.adb: Minor
2186         reformatting.
2188 2014-02-06  Hristian Kirtchev  <kirtchev@adacore.com>
2190         * sem_ch6.adb (Process_Formals): Error message reformatting.
2192 2014-02-06  Hristian Kirtchev  <kirtchev@adacore.com>
2194         * sem_ch3.adb (Handle_Late_Controlled_Primitive): Add local
2195         variable Spec. Do not inherit the null indicator from the
2196         subprogram body when generating the spec.
2198 2014-02-06  Robert Dewar  <dewar@adacore.com>
2200         * casing.adb (Determine_Casing): Consider SPARK_Mode to be
2201         mixed case.
2203 2014-02-06  Ed Schonberg  <schonberg@adacore.com>
2205         * exp_ch6.adb (Is_Build_In_Place_Function): Predicate is false
2206         when the function has a foreign convention, but not if only the
2207         limited return type has such a convention.
2209 2014-02-06  Hristian Kirtchev  <kirtchev@adacore.com>
2211         * sem_ch3.adb (Handle_Late_Controlled_Primitive): Remove local
2212         variable Spec. Comment reformatting. Use Copy_Separate_Tree
2213         rather than New_Copy_Tree when building the corresponding
2214         subprogram declaration.
2216 2014-02-06  Hristian Kirtchev  <kirtchev@adacore.com>
2218         * sem_prag.adb (Analyze_Global_Item): Remove
2219         the mode-related checks on abstract states with enabled external
2220         properties.
2221         (Property_Error): Removed.
2223 2014-02-06  Javier Miranda  <miranda@adacore.com>
2225         * lib-xref.adb (Generate_Reference): When
2226         generating the reference to the first private entity take care
2227         of handling swapped entities.
2229 2014-02-06  Sergey Rybin  <rybin@adacore.com frybin>
2231         * gnat_ugn.texi, vms_data.ads: Add documentation of -j option for
2232         gnatmetric.
2234 2014-02-06  Robert Dewar  <dewar@adacore.com>
2236         * exp_ch4.adb (Expand_N_Shift_Left): Handle shift counts greater
2237         than the word size when operating in Modify_Tree_For_C mode.
2238         * sinfo.ads: Add documentation section on Modify_Tree_For_C mode.
2240 2014-02-06  Robert Dewar  <dewar@adacore.com>
2242         * erroutc.adb (Warning_Specifically_Suppressed.Matches):
2243         compare is case insensitive.
2244         * gnat_rm.texi: Document that string compare for Warnings Off
2245         is now case insensitive.
2247 2014-02-06  Eric Botcazou  <ebotcazou@adacore.com>
2249         * gnat_rm.texi: Small wording tweak.
2251 2014-02-06  Pascal Obry  <obry@adacore.com>
2253         * prj-attr.adb, projects.texi, snames.ads-tmpl: Add Included_Patterns
2254         and Included_Artifact_Patterns attribute definitions.
2256 2014-02-06  Yannick Moy  <moy@adacore.com>
2258         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Set
2259         SPARK_Mode pragma component for all subprograms, including stubs.
2261 2014-02-06  Hristian Kirtchev  <kirtchev@adacore.com>
2263         * sem_ch10.adb (Analyze_Package_Body_Stub): Maintain
2264         the configuration options of the enclosing context in a
2265         stack-like fasion.
2266         (Analyze_Subprogram_Body_Stub): Maintain the
2267         configuration options of the enclosing context in a stack-like
2268         fashion.
2270 2014-02-06  Robert Dewar  <dewar@adacore.com>
2272         * debug.adb: -gnatd.u sets Modify_Tree_For C
2273         * exp_ch4.adb (Expand_N_Op_Rotate_Left): Expand out
2274         if Modify_Tree_For_C (Expand_N_Op_Rotate_Right): ditto.
2275         (Expand_N_Op_Arithmetic_Right_Shift): ditto.
2276         * exp_intr.adb (Expand_Shift): Call expander so we do
2277         Modify_Tree_For_C expansions.
2278         * gnat1drv.adb (Adjust_Global_Switches): Set Modify_Tree_For_C
2279         if -gnatd.u set.
2281 2014-02-06  Fedor Rybin  <frybin@adacore.com>
2283         * prj-proc.ads (Tree_Loaded_Callback): new type Callback used
2284         after the phase 1 of the processing of each aggregated project
2285         to get access to project trees of aggregated projects.
2286         (Process_Project_Tree_Phase_1): new parameter On_New_Tree_Loaded
2287         If specified, On_New_Tree_Loaded is called after each aggregated
2288         project has been processed succesfully.
2289         (Process): new parameter On_New_Tree_Loaded.
2290         * prj-proc.adb (Process_Aggregated_Projects): On_New_Tree_Loaded
2291         callback added after processing of each aggregated project.
2292         (Recursive_Process): new parameter On_New_Tree_Loaded.
2293         (Process): new parameter On_New_Tree_Loaded.
2294         (Process_Project_Tree_Phase_1): new parameter On_New_Tree_Loaded.
2295         * prj-conf.ads (Parse_Project_And_Apply_Config): new parameter
2296         On_New_Tree_Loaded.
2297         * prj-conf.adb (Parse_Project_And_Apply_Config): new parameter
2298         On_New_Tree_Loaded.
2300 2014-02-06  Bob Duff  <duff@adacore.com>
2302         * gnat_ugn.texi: Implement --insert-blank-lines and
2303         --preserve-blank-lines switches.
2305 2014-02-06  Sergey Rybin  <rybin@adacore.com frybin>
2307         * gnat_ugn.texi, vms_data.ads: Add documentation of -j option for
2308         gnatelim.
2310 2014-02-06  Eric Botcazou  <ebotcazou@adacore.com>
2312         * gnat_rm.texi (Pragma Optimize_Alignment): Document the effect
2313         of the pragma on individual objects.
2315 2014-02-06  Hristian Kirtchev  <kirtchev@adacore.com>
2317         * einfo.adb Node29 is now used as BIP_Initialization_Call.
2318         (BIP_Initialization_Call): New routine.
2319         (Set_BIP_Initialization_Call): New routine.
2320         (Write_Field29_Name): Add an entry for constants and variables.
2321         * einfo.ads Add new attribute BIP_Initialization_Call and update
2322         its usage in nodes.
2323         (BIP_Initialization_Call): New routine along with pragma Inline.
2324         (Set_BIP_Initialization_Call): New routine along with pragma Inline.
2325         * exp_ch6.adb (Make_Build_In_Place_Call_In_Object_Declaration):
2326         Add local declaration Res_Decl. Capture the build-in-place
2327         initialization call when the related object declaration has
2328         created a transient block.
2329         * exp_ch7.adb (Process_Transient_Objects): Add local variable
2330         Fin_Insrt. Recognize a scenario where an object declaration acts
2331         as a transient context and is initialized by a build-in-place
2332         function call.
2334 2014-02-06  Pascal Obry  <obry@adacore.com>
2336         * prj-util.adb (For_Interface_Sources): Fix handling of required
2337         bodies for aggregate libs.
2339 2014-02-06  Robert Dewar  <dewar@adacore.com>
2341         * nlists.ads: Minor comment clarifications.
2343 2014-02-06  Robert Dewar  <dewar@adacore.com>
2345         * gnat1drv.adb (Adjust_Global_Switches): Set Modify_Tree_For_C
2346         if gnatd.V set.
2347         * opt.ads (Modify_Tree_For_C): New flag.
2348         * output.ads, output.adb (Last_Char): New function.
2350 2014-02-06  Pascal Obry  <obry@adacore.com>
2352         * projects.texi, prj-env.adb (Initialize_Default_Project_Path): Add
2353         share/gpr for cross-builds.
2355 2014-02-06  Robert Dewar  <dewar@adacore.com>
2357         * exp_util.ads, checks.adb, sem_prag.adb, prj-util.adb, sem_ch13.adb:
2358         Minor reformatting and code clean ups.
2360 2014-02-06  Pascal Obry  <obry@adacore.com>
2362         * prj-util.adb (For_Interface_Sources): Skip non compilable languages.
2363         * prj.ads: Minor typo fix in comment.
2365 2014-02-06  Hristian Kirtchev  <kirtchev@adacore.com>
2367         * sem_prag.adb (Analyze_Depends_In_Decl_Part): Add
2368         local variable Expr. Flag clauses with extra parenthesis as this
2369         is not allowed by the syntax of the pragma. Code reformatting.
2371 2014-02-06  Hristian Kirtchev  <kirtchev@adacore.com>
2373         * exp_attr.adb (Expand_N_Attribute_Reference): Alphabetize
2374         variables. Rename variabme Tnn to Temp. Do not create a temporary
2375         if assertions are disabled. Find enclosing routine _Postconditions
2376         and insert the temporary that captures the value of the prefix
2377         before the routine.
2378         * exp_ch6.adb (Build_Postconditions_Procedure):
2379         Insert the generated _Postconditions routine
2380         before the first source declaration of the related
2381         subprogram.
2382         (Insert_After_Last_Declaration): Removed.
2383         (Insert_Before_First_Source_Declaration): New routine.
2385 2014-02-06  Ed Schonberg  <schonberg@adacore.com>
2387         * exp_util.adb, exp_util.ads (Within_Internal_Subprogram):
2388         Utility to determine whether current expansion is for the body
2389         of a predefined primitive operation.
2390         (Make_Predicate_Check): Use Within_Internal_Subpgram
2391         * checks.adb (Apply_Predicate_Check): Use
2392         Within_Internal_Subprogram
2393         * sem_ch13.adb (Freeze_Entity_Checks): Ditto.
2395 2014-02-06  Pascal Obry  <obry@adacore.com>
2397         * prj.ads, prj-util.adb: Minor reformatting.
2399 2014-02-06  Ed Schonberg  <schonberg@adacore.com>
2401         * exp_ch6.adb (Expand_Subprogram_Contract, Append_Enabled_Item):
2402         Take into account the Split_PPC flag to ensure that conjuncts
2403         in a composite postcondition aspect are tested in source order.
2405 2014-02-06  Hristian Kirtchev  <kirtchev@adacore.com>
2407         * sem_ch6.adb (Analyze_Generic_Subprogram_Body): Flag illegal
2408         use of SPARK_Mode.
2409         * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration): Flag
2410         illegal use of SPARK_Mode.
2411         (Instantiate_Subprogram_Body): Flag illegal use of SPARK_Mode.
2412         * sem_prag.adb (Analyze_Pragma): Code reformatting.
2413         * sem_util.adb Add with and use clause for Aspects.
2414         (Check_SPARK_Mode_In_Generic): New routine.
2415         * sem_util.ads (Check_SPARK_Mode_In_Generic): New routine.
2417 2014-02-06  Thomas Quinot  <quinot@adacore.com>
2419         * a-calend.adb (Formatting_Operations.Split): Ensure that
2420         Time_Error is raised for invalid time values.
2422 2014-02-06  Arnaud Charlet  <charlet@adacore.com>
2424         * sem_prag.adb (Analyze_Pragma): Rewrite as a null statement
2425         in GNATprove_Mode.
2427 2014-02-06  Robert Dewar  <dewar@adacore.com>
2429         * einfo.ads, einfo.adb (Is_Discriminant_Check_Function): New flag.
2430         * exp_ch3.adb (Build_Dcheck_Function): Set
2431         Is_Discriminant_Check_Function.
2433 2014-02-06  Hristian Kirtchev  <kirtchev@adacore.com>
2435         * exp_ch7.adb (Is_Subprogram_Call): Inspect
2436         the original tree in certain cases where a construct has been
2437         factored out and replaced by a reference to a temporary.
2439 2014-02-06  Ed Schonberg  <schonberg@adacore.com>
2441         * sem_ch3.adb (Process_Full_View): Fix typo in the order of
2442         parameters when propagating predicate function to full view.
2443         (Find_Type_Of_Object): Freeze base type of object type to catch
2444         premature use of discriminated private type without a full view.
2446 2014-02-06  Robert Dewar  <dewar@adacore.com>
2448         * sprint.adb: Minor reformatting.
2450 2014-02-06  Hristian Kirtchev  <kirtchev@adacore.com>
2452         * exp_ch4.adb (Process_Transient_Object): Add local variable
2453         Temp_Ins. When the transient object is initialized by an
2454         aggregate, the hook must capture the object after the last
2455         component assignment takes place.
2456         * exp_ch7.adb (Detect_Subprogram_Call): Expose the subprogram to
2457         routine Is_Subprogram_Call.
2458         (Is_Subprogram_Call): Inspect an
2459         aggregate that has been heavily expanded for subprogram calls.
2460         (Process_Transient_Objects): Add local variables Expr, Ptr_Id
2461         and Temp_Ins.  Remove the nested declare block and adjust the
2462         indentation. When the transient object is initialized by an
2463         aggregate, the hook must capture the object after the last
2464         component assignment takes place.
2466 2014-02-06  Hristian Kirtchev  <kirtchev@adacore.com>
2468         * sem_prag.adb (Analyze_Global_Item): Detect illegal uses of
2469         external states with enabled properties that do not match the
2470         global mode.
2471         (Property_Error): New routine.
2472         * sem_res.adb (Property_Error): New routine.
2473         (Resolve_Actuals): Detect illegal uses of external variables with
2474         enabled properties in procedure calls that do not match the mode of
2475         the corresponding formal parameter.
2477 2014-02-06  Hristian Kirtchev  <kirtchev@adacore.com>
2479         * sem_util.adb (Has_Enabled_Property): Rename
2480         formal parameter Prop_Nam to Property. Update the comment on usage
2481         and all occurrences in the body. Add local variable Prop_Nam. When
2482         inspecting a property with an expression, the property name
2483         appears as the first choice of the component association.
2485 2014-02-04  Robert Dewar  <dewar@adacore.com>
2487         * exp_ch5.adb, einfo.ads, freeze.adb, sem_ch8.adb: Minor reformatting.
2489 2014-02-04  Gary Dismukes  <dismukes@adacore.com>
2491         * sem_aggr.adb: Change "runtime" to "run time" in warning message,
2492         for consistency with other messages.
2494 2014-02-04  Ed Schonberg  <schonberg@adacore.com>
2496         * exp_ch5.adb  (Expand_Iterator_Loop):  For a container element
2497         iterator, indicate that the element is a constant if the container
2498         type does not have a variable indexing aspect.
2499         * sem_ch8.adb (Analyze_Object_Renaming): If the entity is already
2500         marked as constant, do not reset its Ekind, to ensure that
2501         container elements in an element loop are not modified if the
2502         container (e.g. a hashed set) only has a constant indexing aspect.
2504 2014-02-04  Arnaud Charlet  <charlet@adacore.com>
2506         * g-souinf.ads: Subprograms in this unit are actually not pure.
2507         * freeze.adb (Freeze_Subprogram): Do not reset Is_Pure for Intrinsics.
2508         * einfo.ads (Is_Pure): Update doc to match implementation.
2510 2014-02-04  Gary Dismukes  <dismukes@adacore.com>
2512         * exp_ch13.adb: Minor spelling fix.
2514 2014-02-04  Robert Dewar  <dewar@adacore.com>
2516         * opt.ads: Minor comment update.
2518 2014-02-04  Robert Dewar  <dewar@adacore.com>
2520         * exp_ch4.adb (Expand_N_Expression_With_Actions): Use Rewrite
2521         instead of Replace.
2523 2014-02-04  Ed Schonberg  <schonberg@adacore.com>
2525         * sem_aggr.adb (Resolve_Array_Aggregate): Suppress warnings
2526         on null expressions if component type is non-null, when the
2527         corresponding association covers an empty range of index values.
2529 2014-02-04  Robert Dewar  <dewar@adacore.com>
2531         * sinfo.ads: Further comments on N_Expression_With_Actions node.
2533 2014-02-04  Hristian Kirtchev  <kirtchev@adacore.com>
2535         * sem_prag.adb (Analyze_Refined_Depends_In_Decl_Part): Remove global
2536         variables Out_Items and Ref_Global. Remove local constant
2537         Body_Id along with dummy variables D1, D2, D3, D4, D5, D6, D7
2538         and D8. Remove the useless collection of global items as this
2539         was a leftover from an earlier version of the routine. Move
2540         several routines out to avoid deep nesting and indentation.
2541         (Inputs_Match): Add formal parameter Dep_Clause. Rename formal
2542         parameter Do_Checks to Post_Errors. Update the comment on usage.
2543         (Is_Matching_Input): Renamed to Input_Match. Add formal parameters
2544         Ref_Inputs and Do_Checks. Rename formal parameter Do_Checks
2545         to Post_Errors. Update the comment on usage. Account for the
2546         case where a self referential state may have a null input_list.
2547         (Is_Self_Referential): New routine.
2549 2014-02-04  Ed Schonberg  <schonberg@adacore.com>
2551         * sem_ch13.adb (Analyze_Attribute_Definition_Clause): If the
2552         entity renames an expression, as in the case of an object of
2553         an unconstrained type initialized by a function call, defer the
2554         rewriting of the expression to the expander.
2555         * exp_ch13.adb (Expand_N_Attribute_Definition_Clause, case
2556         'Alignment): If the entity renames an expression, introduce
2557         temporary to capture value, and rewrite original declaration to
2558         use temporary.
2560 2014-02-04  Gary Dismukes  <dismukes@adacore.com>
2562         * g-comlin.adb: Minor typo fix.
2564 2014-02-04  Ed Schonberg  <schonberg@adacore.com>
2566         * freeze.adb (Freeze_All): Types derived from a formal
2567         access_to_classwide type do not have a finalization master.
2569 2014-02-04  Robert Dewar  <dewar@adacore.com>
2571         * sprint.adb: Minor reformatting.
2573 2014-02-04  Robert Dewar  <dewar@adacore.com>
2575         * exp_ch4.adb (Expand_N_Expression_With_Actions): Eliminate
2576         cases where Actions is a null list.
2577         * sinfo.ads (N_Expression_With_Actions): Actions can be
2578         temporarily empty during semantic analysis, but must be non-empty
2579         in the final expanded tree.
2581 2014-01-31  Robert Dewar  <dewar@adacore.com>
2583         * exp_ch9.adb: Minor reformatting.
2585 2014-01-31  Emmanuel Briot  <briot@adacore.com>
2587         * g-comlin.adb (Set_Command_Line): Take the switches
2588         configuration from the Command_Line_Config.
2590 2014-01-31  Hristian Kirtchev  <kirtchev@adacore.com>
2592         * sem_prag.adb (Analyze_Refinement_Clause): Guard against a malformed
2593         refinement clause.
2595 2014-01-31  Vincent Celier  <celier@adacore.com>
2597         * projects.texi: Add more documentation about others used as an
2598         index in indexed attributes.
2600 2014-01-31  Robert Dewar  <dewar@adacore.com>
2602         * gnat_ugn.texi: Minor update.
2603         * gnat_rm.texi: Add example to Restriction_Warnings documentation.
2604         * exp_util.adb: Minor reformatting.
2606 2014-01-31  Ed Schonberg  <schonberg@adacore.com>
2608         * exp_ch9.adb (Expand_Entry_Barrier): Warn if the barrier
2609         depends on data that is not private to the protected object,
2610         and potentially modifiable in unsynchronized fashion.
2612 2014-01-31  Yannick Moy  <moy@adacore.com>
2614         * erroutc.adb (Validate_Specific_Warnings): Remove special case for
2615         GNATprove_Mode.
2617 2014-01-31  Robert Dewar  <dewar@adacore.com>
2619         * prj-attr.ads (First_Attribute_Of): Returns Empty_Attribute
2620         for Unknown_Package.
2621         * sem_ch6.adb, sem_attr.adb: Minor comment addition.
2623 2014-01-31  Hristian Kirtchev  <kirtchev@adacore.com>
2625         * exp_util.adb (Build_Allocate_Deallocate_Proc): Rewrite
2626         the logic that generates a runtime check to determine the
2627         controlled status of the object about to be allocated or
2628         deallocated. Class-wide types now always use a runtime check
2629         even if they appear as generic actuals.
2630         (Find_Object): Detect
2631         a special case that involves interface class-wide types because
2632         the object appears as a complex expression.
2634 2014-01-31  Ed Schonberg  <schonberg@adacore.com>
2636         * sem_ch6.adb (Process_Formals): In Ada2012 mode, place
2637         subprogram with an incomplete untagged formals on the list of
2638         private dependents, to verify that the type is properly completed
2639         in the private part.
2640         * sem_attr.adb: Code clean up.
2642 2014-01-31  Robert Dewar  <dewar@adacore.com>
2644         * exp_ch6.adb: Minor reformatting.
2646 2014-01-31  Vincent Celier  <celier@adacore.com>
2648         * prj-attr.adb (First_Attribute_Of): Return Unknown_Attribute
2649         when Pkg is unknown.
2651 2014-01-31  Hristian Kirtchev  <kirtchev@adacore.com>
2653         * sem_res.adb (Resolve_Entity_Name): Comment
2654         reformatting. Allow volatile objects in various generated checks.
2656 2014-01-31  Ed Schonberg  <schonberg@adacore.com>
2658         * sem_attr.adb (Analyze_Attribute, case 'Update): For a record
2659         component association, set the etype of the identifier, for
2660         SPARK use.
2662 2014-01-31  Ed Schonberg  <schonberg@adacore.com>
2664         * exp_ch6.adb (Has_Visibility_Of_Subprogram): If type is not
2665         declared in a package, not checks can apply to the subprogram.
2667 2014-01-31  Robert Dewar  <dewar@adacore.com>
2669         * erroutc.adb (Validate_Specific_Warnings): Warnings are
2670         controlled -gnatw.W.
2671         * gnat_ugn.texi: Document new warnings controlled by -gnatw.w.
2672         * opt.ads (Warn_On_Warnings_Off): Now controls more cases.
2674 2014-01-31  Arnaud Charlet  <charlet@adacore.com>
2676         * exp_disp.adb: Update comments.
2678 2014-01-31  Yannick Moy  <moy@adacore.com>
2680         * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration,
2681         Save_Global_References): Guard access to expression in aspect.
2683 2014-01-31  Yannick Moy  <moy@adacore.com>
2685         * sem_prag.adb (Analyze_Pragma/Pragma_SPARK_Mode):
2686         Issue an error when the pragma is applied to a generic unit,
2687         a generic declaration, or inside a generic.
2689 2014-01-31  Yannick Moy  <moy@adacore.com>
2691         * sem_ch8.adb (Analyze_Subprogram_Renaming): Set SPARK_Mode on renaming
2692         entity.
2694 2014-01-31  Robert Dewar  <dewar@adacore.com>
2696         * exp_ch9.adb, s-tassta.adb, s-tposen.adb, s-tposen.ads: Minor
2697         reformatting.
2699 2014-01-31  Tristan Gingold  <gingold@adacore.com>
2701         * exp_disp.adb: Add a historic note.
2703 2014-01-31  Robert Dewar  <dewar@adacore.com>
2705         * sem_warn.adb (Warn_On_Useless_Assignments): Add call to
2706         Process_Deferred_References.
2708 2014-01-31  Yannick Moy  <moy@adacore.com>
2710         * erroutc.adb (Validate_Specific_Warnings): Do not issue a message for
2711         ineffective pragma Warnings(Off) in GNATprove_Mode.
2713 2014-01-31  Bob Duff  <duff@adacore.com>
2715         * s-taskin.ads: Minor comment fix.
2716         * s-tassta.adb (Abort_Dependents): Don't abort all dependents;
2717         just direct dependents. If this is actually an abort, each task
2718         will take care of aborting its dependents, so all dependents will
2719         get aborted, as before. However, when this is called the second
2720         time from Vulnerable_Complete_Master "for convenience" (i.e. to
2721         kill off tasks waiting at terminate alternatives), aborting
2722         indirect dependents is wrong, because it causes some unrelated
2723         tasks to get aborted.
2725 2014-01-31  Robert Dewar  <dewar@adacore.com>
2727         * sem_ch4.adb: Minor reformatting.
2729 2014-01-31  Robert Dewar  <dewar@adacore.com>
2731         * exp_ch2.adb: New calling sequence for Is_LHS.
2732         * frontend.adb: Add call to Process_Deferred_References.
2733         * lib-xref.ads, lib-xref.adb (Process_Deferred_References): New.
2734         (Deferred_References): New table.
2735         * sem_ch8.adb (Find_Direct_Name): Make deferred reference table
2736         entries.
2737         (Find_Expanded_Name): Ditto.
2738         * sem_res.adb: New calling sequence for Is_LHS.
2739         * sem_util.ads, sem_util.adb (Is_LHS): New calling sequence.
2740         * sem_warn.adb: Call Process_Deferred_References before issuing
2741         warnings.
2743 2014-01-31  Tristan Gingold  <gingold@adacore.com>
2745         * exp_util.adb (Corresponding_Runtime_Package): Restrict the
2746         use of System_Tasking_Protected_Objects_Single_Entry.
2747         * exp_ch9.adb (Build_Simple_Entry_Call): Remove Mode parameter
2748         of Protected_Single_Entry_Call.
2749         (Expand_N_Timed_Entry_Call): Remove single_entry case.
2750         * exp_disp.adb (Make_Disp_Asynchronous_Select_Body): Remove
2751         single_entry case.
2752         (Make_Disp_Timed_Select_Body): Likewise.
2753         * rtsfind.ads (RE_Timed_Protected_Single_Entry_Call): Remove.
2754         * s-tposen.adb (Send_Program_Error, PO_Do_Or_Queue): Remove
2755         Self_Id parameter.
2756         (Wakeup_Entry_Caller): Remove Self_ID and New_State parameters.
2757         (Wait_For_Completion_With_Timeout): Remove.
2758         (Protected_Single_Entry_Call): Remove Mode parameter
2759         (always Simple_Call).
2760         (Service_Entry): Remove Self_Id constant (not used anymore).
2761         (Timed_Protected_Single_Entry_Call): Remove.
2762         * s-tposen.ads (Timed_Protected_Single_Entry_Call): Remove.
2763         (Protected_Single_Entry_Call): Remove Mode parameter.
2765 2014-01-29  Hristian Kirtchev  <kirtchev@adacore.com>
2767         * einfo.adb (Get_Pragma): Handle the retrieval of pragma Refined_Post.
2768         * einfo.ads (Get_Pragma): Update the comment on special pragmas
2769         handled by this routine.
2770         * sem_prag.adb (Analyze_Pragma): Add a legal pragma Refined_Post
2771         to the contract of the related subprogram body.
2772         * sem_util.adb (Add_Contract_Item): Handle the insertion of
2773         pragma Refined_Post into the contract of a subprogram body.
2774         * sinfo.ads Update the documentation of node N_Contract.
2775         * sem_res.adb (Resolve_Entity_Name): Add a guard
2776         to detect abstract states and variables only when checking the
2777         SPARK 2014 rules concerning volatile object placement.
2779 2014-01-29  Ed Schonberg  <schonberg@adacore.com>
2781         * sem_ch4.adb (Find_Equality_Types, Try_One_Interp): within an instance,
2782         null is compatible with any access type.
2784 2014-01-29  Hristian Kirtchev  <kirtchev@adacore.com>
2786         * sem_util.adb (Find_Placement_In_State_Space): Assume that the default
2787         placement is not in a package.
2789 2014-01-29  Hristian Kirtchev  <kirtchev@adacore.com>
2791         * sem_util.adb (Has_Enabled_Property): Compare the character field of
2792         the sole property.
2794 2014-01-29  Robert Dewar  <dewar@adacore.com>
2796         * sem_intr.adb, a-ztexio.ads, sinfo.ads, sem_res.adb, gnatlink.adb,
2797         vms_conv.adb, a-except.ads, a-except-2005.ads, a-teioed.adb,
2798         sem_warn.ads, treepr.ads, erroutc.ads, a-excach.adb: Minor reformatting.
2800 2014-01-29  Robert Dewar  <dewar@adacore.com>
2802         * sem_util.ads, sem_util.adb (In_Pragma_Expression): New function.
2803         * sem_warn.adb (Check_References): Suppress warnings if inside
2804         Initial_Condition pragma.
2806 2014-01-29  Hristian Kirtchev  <kirtchev@adacore.com>
2808         * sem_prag.adb (Check_Missing_Part_Of): List all values of
2809         State_Space_Kind for readability reasons. Do not emit an error on
2810         a private item when the enclosing package lacks aspect/pragma
2811         Abstract_State. Do not emit an error on a private package
2812         instantiation when the corresponding generic template lacks
2813         visible state.
2814         (Has_Visible_State): New routine.
2815         * sem_util.adb (Find_Placement_In_State_Space): The visible
2816         declarations of any kind of child units in general act as proper
2817         placement location.
2819 2014-01-29  Robert Dewar  <dewar@adacore.com>
2821         * a-except-2005.adb, a-except.adb, a-excpol-abort.adb, a-exstat.adb,
2822         ali.adb, a-numaux.ads, a-numaux-darwin.ads, a-numaux-libc-x86.ads,
2823         a-numaux-vms.ads, a-numaux-vxworks.ads, a-numaux-x86.ads, aspects.ads,
2824         a-taside.adb, a-teioed.adb, a-textio.adb, a-textio.ads, atree.adb,
2825         atree.ads, a-witeio.adb, a-witeio.ads, a-wtedit.adb, a-ztedit.adb,
2826         a-ztexio.adb, bcheck.adb, binde.adb, checks.adb, comperr.adb,
2827         cstand.adb, debug_a.adb, einfo.ads, errout.adb, erroutc.adb,
2828         eval_fat.adb, exp_aggr.adb, exp_attr.adb, exp_ch11.adb, exp_ch3.adb,
2829         exp_ch4.adb, exp_ch5.adb, exp_ch6.adb, exp_ch9.adb, exp_dbug.adb,
2830         exp_disp.adb, exp_fixd.adb, exp_imgv.adb, exp_intr.adb, exp_util.adb,
2831         freeze.adb, frontend.adb, g-comlin.ads, g-mbdira.adb, gnat1drv.adb,
2832         gprep.adb, g-spipat.adb, i-cpp.ads, i-vxwork.ads, i-vxwork-x86.ads,
2833         krunch.ads, layout.adb, lib-load.adb, lib-writ.adb, lib-writ.ads,
2834         live.adb, namet.ads, osint.adb, osint-c.adb, output.ads, par.adb,
2835         par-ch10.adb, par-ch13.adb, par-ch3.adb, par-ch4.adb, par-ch5.adb,
2836         par-ch6.adb, par-ch9.adb, par-endh.adb, par-labl.adb, par-prag.adb,
2837         par-sync.adb, par-tchk.adb, par-util.adb, prj.adb, repinfo.adb,
2838         rtsfind.adb, s-arit64.adb, s-asthan-vms-alpha.adb,
2839         s-asthan-vms-ia64.adb, s-bignum.adb, scans.adb, scng.adb, s-dimmks.ads,
2840         sem_aggr.adb, sem_attr.adb, sem_aux.adb, sem_cat.adb, sem_ch10.adb,
2841         sem_ch12.adb, sem_ch13.adb, sem_ch13.ads, sem_ch3.adb, sem_ch4.adb,
2842         sem_ch5.adb, sem_ch6.adb, sem_ch8.adb, sem_disp.adb, sem_elab.adb,
2843         sem_elim.adb, sem_eval.adb, sem_intr.adb, sem_prag.adb, sem_res.adb,
2844         sem_type.adb, sem_util.adb, sem_warn.adb, set_targ.adb, s-fatgen.adb,
2845         s-fatgen.ads, s-fileio.adb, s-imgcha.adb, s-imgrea.adb, sinfo.ads,
2846         sinput-c.adb, snames.ads-tmpl, s-os_lib.adb, sprint.adb,
2847         s-regpat.adb, s-secsta.adb, s-stalib.ads,
2848         s-stchop.adb, s-stoele.ads, stand.ads, s-taprop-solaris.adb,
2849         s-tasdeb-vms.adb, s-tasini.adb, s-tassta.adb, s-valdec.adb,
2850         s-valuti.adb, s-wchjis.adb, s-wchwts.adb, system.ads, system-vms_64.ads,
2851         system-vms-ia64.ads, treepr.adb, types.ads, uintp.adb, uname.adb,
2852         urealp.adb, usage.adb, vxaddr2line.adb: Minor reformatting.
2854 2014-01-29  Robert Dewar  <dewar@adacore.com>
2856         * expander.adb: Minor reformatting.
2858 2014-01-29  Javier Miranda  <miranda@adacore.com>
2860         * exp_ch3.adb (Predefined_Primitive_Bodies): Adding documentation to
2861         previous patch.
2863 2014-01-29  Javier Miranda  <miranda@adacore.com>
2865         * exp_ch3.adb (Predefined_Primitive_Bodies): Complete the code
2866         that checks if an interface types defines the predefined "="
2867         function because the compiler was erroneously not generating the
2868         predefined "=" primitive as soon as the name of some interface
2869         primitive is "=" (formals were not checked).
2871 2014-01-29  Ed Schonberg  <schonberg@adacore.com>
2873         * expander.adb (Expander): In GNATprove mode, do not process
2874         transient scopes: they are in general not created in this mode,
2875         and an attempt to examine them will lead to constraint errors when
2876         processing configuration pragmas that have analyzable expressions.
2878 2014-01-29  Vincent Celier  <celier@adacore.com>
2880         * clean.adb (Gnatclean): Fail if main project is an aggregate
2881         project or if there is an aggregate library project in the
2882         project tree.
2883         * gnatcmd.adb: Fail if the main project is an aggregate project
2884         or if there is an aggegate library project in the project tree.
2885         * make.adb (Initialize): : Fail if main project is an aggregate
2886         project or if there is an aggregate library project in the
2887         project tree.
2888         * makeutl.ads (Aggregate_Libraries_In): New Boolean function.
2889         * prj-makr.adb (Initialize): Fail if the main project is an
2890         aggregate project or an aggregate library project.
2892 2014-01-29  Vincent Celier  <celier@adacore.com>
2894         * prj-part.adb (Check_Import_Aggregate): New procedure
2895         to check if an imported project is an aggregate project.
2896         (Parse_Single_Project): Call Check_Import_Aggregate
2897         * projects.texi: Document that aggregate projects cannot be
2898         extended or imported.
2900 2014-01-29  Robert Dewar  <dewar@adacore.com>
2902         * exp_ch9.adb, sem_ch7.ads, s-regexp.adb, sem_ch13.adb: Minor
2903         reformatting and code clean up.
2904         * gnat_ugn.texi: Add documentation section on Atomic Variables
2905         and Optimization.
2907 2014-01-29  Hristian Kirtchev  <kirtchev@adacore.com>
2909         * einfo.adb Flag264 is now unused.
2910         (Has_Body_References): Removed.
2911         (Set_Has_Body_References): Removed.
2912         (Write_Entity_Flags): Remove the output for flag Has_Body_References.
2913         * einfo.ads Update the comment on usage of attribute
2914         Body_References. Remove attribute Has_Body_References and its
2915         usage in nodes.
2916         (Has_Body_References): Removed along with pragma Inline.
2917         (Set_Has_Body_References): Removed along with pragma Inline.
2918         * sem_prag.adb (Analyze_Global_Item): Move the call to
2919         Record_Possible_Body_Reference in the state related checks
2920         section. Add a comment intended function.
2921         (Analyze_Input_Output): Move the call to Record_Possible_Body_Reference
2922         in the state related checks section. Add a comment intended function.
2923         (Analyze_Refinement_Clause): Cleanup the illegal body reference
2924         reporting. Add a comment on timing of error reporting.
2925         (Record_Possible_Body_Reference): Reimplement the routine.
2927 2014-01-29  Vincent Celier  <celier@adacore.com>
2929         * makeutl.adb (Mains.Find_File_Add_Extension): Only look for specs for
2930         unit-based languages.
2931         (Mains.Complete_Mains.Do_Complete): Use the source file project
2932         tree when calling Find_File_Add_Extension. Use the correct
2933         project name when reporting an error.
2935 2014-01-29  Hristian Kirtchev  <kirtchev@adacore.com>
2937         * aspects.adb Add an entry for aspect Part_Of in table
2938         Canonical_Aspect.
2939         * aspects.ads Add an entry for aspect Part_Of in tables Aspect_Id,
2940         Aspect_Argument, Aspect_Names and Aspect_Delay.
2941         * atree.h Define Elist9.
2942         * atree.adb (Elist9): New routine.
2943         (Set_Elist9): New routine.
2944         * atree.ads (Elist9): New routine.
2945         (Set_Elist9): New routine.
2946         * einfo.adb Add Part_Of_Constituents and Encapsulating_State to
2947         the list of node usage.  Remove Refined_State from the list of
2948         node usage.
2949         (Encapsulating_State): New routine.
2950         (Get_Pragma):
2951         Handle pragma Part_Of; (Part_Of_Constituents): New routine.
2952         (Refined_State): Removed.
2953         (Set_Encapsulating_State): New routine.
2954         (Set_Part_Of_Constituents): New routine.
2955         (Set_Refined_State): Removed.
2956         (Write_Field9_Name): Add an entry
2957         for Part_Of_Constituents (Write_Field10_Name): Add an entry for
2958         Encapsulating_State. Remove the entry for Refined_State.
2959         * einfo.ads Add new attributes Encapsulating_State
2960         and Part_Of_Constituents alond with their usage in
2961         entities. Remove attribute Refined_State along with its
2962         usage in entities.
2963         (Encapsulating_State): New routine and
2964         pragma Inline.  (Get_Pragma): Update the comment on usage.
2965         (Part_Of_Constituents): New routine and pragma Inline.
2966         (Refined_State): Removed along with pragma Inline.
2967         (Set_Encapsulating_State): New routine and pragma Inline.
2968         (Set_Part_Of_Constituents): New routine and pragma Inline.
2969         (Set_Refined_State): Removed along with pragma Inline.
2970         * par-prag.adb Pragma Part_Of does not need any special processing
2971         by the parser.
2972         * sem_ch3.adb (Analyze_Declarations): Remove local variables
2973         Body_Id and Prag. Call separate routines to analyze the
2974         contract of a package [body].
2975         (Analyze_Object_Contract):
2976         Update the comment on usage. Remove local variables
2977         Items and Nam. Use Get_Pragma rather than traversing the
2978         classification list.  Verify whether the lack of indicator
2979         Part_Of agrees with the placement of the variable in state space.
2980         (Analyze_Object_Declaration): Initialize the encapsulating state
2981         of a variable.  (Requires_State_Refinement): Moved to sem_util.
2982         * sem_ch7.adb (Analyze_Package_Body_Contract): New routine.
2983         (Analyze_Package_Contract): New routine.
2984         * sem_ch7.ads (Analyze_Package_Body_Contract): New routine.
2985         (Analyze_Package_Contract): New routine.
2986         * sem_ch10.adb (Decorate_State): Initialize the encapsulating
2987         state and Part_Of constituents.
2988         * sem_ch13.adb (Analyze_Aspect_Specifications):
2989         Add processing for aspect Part_Of. Update all
2990         calls to Decorate_Delayed_Aspect_And_Pragma.
2991         (Check_Aspect_At_Freeze_Point): Aspect Part_Of does
2992         not need any special processing at freeze time.
2993         (Decorate_Delayed_Aspect_And_Pragma): Renamed to
2994         Decorate_Aspect_And_Pragma.  Add formal parameter Delayed and
2995         update the associated comment.
2996         * sem_prag.adb Add an entry for pragma Part_Of in table Sig_Flags.
2997         (Analyze_Abstract_State): Add new global variable State_Id. Remove
2998         local constants Errors and Loc. Remove local variables Is_Null
2999         and State_Nam. Create the entity of the abstract state on the
3000         spot, before all remaining checks are performed. Verify that a
3001         missing Part_Of option agrees with the placement of the abstract
3002         state within the state space.
3003         (Analyze_Depends_In_Decl_Part):
3004         Add new global variables Constits_Seen and States_Seen. Check
3005         that a state and a corresponding constituent do not appear
3006         in pragma [Refined_]Depends.
3007         (Analyze_Global_In_Decl_Part):
3008         Add new global variables Constits_Seen and States_Seen. Check
3009         that a state and a corresponding constituent do not appear
3010         in pragma [Refined_]Global.
3011         (Analyze_Global_Item):
3012         Remove the now obsolete code that deals with Part_Of.
3013         Add the entity of the global item to the list of processed
3014         items.  (Analyze_Initializes_In_Decl_Part): Add new global
3015         variables Constits_Seen and States_Seen. Check that a state
3016         and a corresponding constituent do not appear in pragma
3017         Initializes.
3018         (Analyze_Initialization_Item): Add the entity
3019         of the initialization item to the list of processed items.
3020         (Analyze_Input_Item): Add the entity of the initialization
3021         item to the list of processed items.
3022         (Analyze_Input_Output):
3023         Remove the now obsolete code that deals with Part_Of.  Add the
3024         entity of the input/output to the list of processed items.
3025         (Analyze_Part_Of): New routine.
3026         (Analyze_Part_Of_Option): Remove
3027         local constant Par_State. Add local constant Encaps and local
3028         variables Encaps_Id and Legal. Use Analyze_Part of to analyze
3029         the option. Turn the related state into a Part_Of constituent
3030         if the option is legal.
3031         (Analyze_Pragma): Add processing
3032         for pragma Part_Of.
3033         (Analyze_Refined_State_In_Decl_Part):
3034         Remove global constants Pack_Body and Spec_Id. Remove
3035         global variables Abstr_States and Hidden_States. Add new
3036         global variables Available_States, Body_Id, Body_States and
3037         Spec_Id. Add new local constant Body_Decl. Reimplement the
3038         logic that extracts the states available for refinement from
3039         the related package and the body hidden states of the said
3040         package.
3041         (Analyze_Refinement_Clause): Add local variable Part_Of_Constits.
3042         (Check_Applicable_Policy): Alphabetize body.
3043         (Check_Dependency_Clause): Replace Refined_State
3044         with Encapsulating_State.
3045         (Check_Matching_Constituent):
3046         Reimplement the logic that determines whether an item is a valid
3047         / invalid constituent of the current refined state. Return when
3048         a construct does not denote a valid abstract state. Extract the
3049         list of Part_Of constituents for further analysis. Check that all
3050         Part_Of constituents of a state have been used in its refinement.
3051         (Check_Matching_State): Update the comment on usage. Operate
3052         on the list of available states.
3053         (Check_Missing_Part_Of): New routine.
3054         (Check_Refined_Global_Item): Replace Refined_State
3055         with Encapsulating_State.
3056         (Check_State_And_Constituent_Use): New routine.
3057         (Create_Abstract_State): New routine.
3058         (Is_Matching_Input): Replace Refined_State with Encapsulating_State.
3059         (Is_Part_Of): Removed.
3060         (Collect_Body_States): New routine.
3061         (Collect_Constituent): Replace Refined_State with Encapsulating_State.
3062         (Collect_Hidden_States): Removed.
3063         (Report_Unrefined_States): Change the profile of the procedure along
3064         with the comment on usage.
3065         (Report_Unused_Constituents): New routine.
3066         (Report_Unused_Hidden_States): Removed.
3067         (Report_Unused_States): New routine.
3068         * sem_prag.ads (Check_Missing_Part_Of): New routine.
3069         * sem_util.adb (Add_Contract_Item): Pragma Part_Of can now
3070         appear in the classification pragmas of a package instantiation
3071         or a variable.
3072         (Find_Placement_In_State_Space): New routine.
3073         (Is_Child): Removed.
3074         (Is_Child_Or_Sibling): Remove formal
3075         parameter Private_Child. Remove the private child checks.
3076         (Requires_State_Refinement): Moved from sem_ch3.
3077         * sem_util.ads Add new type State_Space_Kind along with
3078         comment on its usage and values.
3079         (Add_Contract_Item): Update the comment on usage.
3080         (Find_Body_Discriminal): Alphabetize spec.
3081         (Find_Placement_In_State_Space): New routine.
3082         (Is_Child_Or_Sibling): Remove formal parameter Private_Child
3083         and update the comment on usage.
3084         (Requires_State_Refinement): Moved from sem_ch3.
3085         * sinfo.ads: Update the documentation of N_Contract.
3086         * snames.ads-tmpl The predefined name for Part_Of is now used
3087         to denote a pragma. Add Pragma_Id for Part_Of.
3089 2014-01-29  Emmanuel Briot  <briot@adacore.com>
3091         * s-regexp.adb (Create_Secondary_Table): Automatically grow the state
3092         machine as needed.
3093         (Dump): New subprogram.
3095 2014-01-29  Tristan Gingold  <gingold@adacore.com>
3097         * exp_ch9.adb (Expand_N_Protected_Type_Declaration): Add
3098         Expand_Entry_Declaration to factorize code.
3100 2014-01-29  Ed Schonberg  <schonberg@adacore.com>
3102         * checks.adb: minor clarification.
3103         * sem_ch7.adb (Declare_Inherited_Private_Subprograms): Limit
3104         search for primitive operations to the entities that immediately
3105         follow the type declaration.
3107 2014-01-29  Tristan Gingold  <gingold@adacore.com>
3109         * exp_ch9.adb (Build_Protected_Entry): Do not call
3110         Complete_Entry_Body anymore.
3111         * rtsfind.ads (RE_Complete_Single_Entry_Body): Remove.
3112         * s-tposen.ads, s-tposen.adb (Complete_Single_Entry_Body): Remove.
3114 2014-01-29  Pierre-Marie Derodat  <derodat@adacore.com>
3116         * s-os_lib.adb, s-os_lib.ads (Normalize_Pathname): Return an empty
3117         string when the Name input bigger than allowed. Adapt the function
3118         specification.
3120 2014-01-29  Ed Schonberg  <schonberg@adacore.com>
3122         * checks.adb (Install_Null_Excluding_Check): Do not emit warning
3123         if expression is within a case_expression of if_expression.
3125 2014-01-29  Robert Dewar  <dewar@adacore.com>
3127         * exp_ch9.adb, inline.ads: Minor reformatting.
3129 2014-01-29  Tristan Gingold  <gingold@adacore.com>
3131         * exp_ch9.adb (Is_Exception_Safe): Return true if no exceptions.
3133 2014-01-29  Yannick Moy  <moy@adacore.com>
3135         * inline.ads (Pending_Body_Info): Add SPARK_Mode and
3136         SPARK_Mode_Pragma components to be able to analyze generic
3137         instance.
3138         * sem_ch12.adb (Analyze_Package_Instantiation,
3139         Inline_Instance_Body, Need_Subprogram_Instance_Body,
3140         Load_Parent_Of_Generic): Pass in SPARK_Mode from instantiation
3141         for future analysis of the instance.
3142         (Instantiate_Package_Body,
3143         Instantiate_Subprogram_Body, Set_Instance_Inv): Set SPARK_Mode
3144         from instantiation to analyze the instance.
3146 2014-01-29  Robert Dewar  <dewar@adacore.com>
3148         * sem_ch7.adb, sem_prag.adb, sem_ch4.adb, sem_ch6.adb: Minor code
3149         reorganization.
3151 2014-01-29  Yannick Moy  <moy@adacore.com>
3153         * gnat_rm.texi: Update description of SPARK_Mode pragma.
3155 2014-01-29  Tristan Gingold  <gingold@adacore.com>
3157         * exp_ch9.adb (Expand_N_Protected_Body): Remove Num_Entries.
3159 2014-01-29  Thomas Quinot  <quinot@adacore.com>
3161         * sem_ch4.adb (Find_Component_In_Instance): Update comment.
3163 2014-01-29  Ed Schonberg  <schonberg@adacore.com>
3165         * exp_util.adb (Build_Task_Image_Prefix): Indicate that the
3166         resulting string is an internal entity. and thus requires no
3167         initialization. This is relevant when Initialize_ Scalars is
3168         enabled, because the resultant spurious initialization may lead to
3169         secondary stack anomalies that produce a mangled name for a task.
3171 2014-01-29  Yannick Moy  <moy@adacore.com>
3173         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): SPARK_Mode
3174         not inherited from spec anymore. Check consistency
3175         rules after processing of declarations.
3176         * sem_ch7.adb (Analyze_Package_Body_Helper): SPARK_Mode not inherited
3177         from spec anymore. Check consistency rules after processing of
3178         declarations.
3179         (Analyze_Package_Declaration): Set SPARK_Mode only for non-generic
3180         packages.
3181         * sem_prag.adb (Analyze_Pragma/Pragma_SPARK_Mode): Implement new
3182         consistency rules.
3184 2014-01-27  Robert Dewar  <dewar@adacore.com>
3186         * sem_res.adb (Resolve_Comparison_Op): Add type name/location
3187         to unordered msg.
3188         (Resolve_Range): Add type name/location to unordered msg.
3190 2014-01-27  Claire Dross  <dross@adacore.com>
3192         * a-cofove.adb/s (Copy): Add precondition so that Copy (Source,
3193         Capacity) is only called with Capacity >= Length (Source) and
3194         Capacity in Capacity_Range.
3195         * a-cfdlli.adb/s, a-cfhase.adb/s, a-cfhama.adb/s, a-cforse.adb/s,
3196         a-cforma.adb/s (Copy): Add precondition so that Copy (Source, Capacity)
3197         is only called with Capacity >= Source.Capacity. Raise Capacity_Error
3198         in the code is this is not the case.
3200 2014-01-27  Thomas Quinot  <quinot@adacore.com>
3202         * sem_ch4.adb (Analyze_Selected_Component): Fix handling of
3203         selected component in an instance where the component of the
3204         actual is not visibile at instantiation.
3206 2014-01-27  Ed Schonberg  <schonberg@adacore.com>
3208         * sem_ch6.adb: sem_ch6.adb (Set_Actual_Subtypes): If the type
3209         has a dynamic predicate, generate freeze node for Actual_Subtype
3210         at once, because the declaration of the corresponding predicate
3211         function will make reference to it.
3213 2014-01-27  Tristan Gingold  <gingold@adacore.com>
3215         * exp_ch7.adb, exp_ch9.adb: Adjust comments.
3217 2014-01-27  Robert Dewar  <dewar@adacore.com>
3219         * exp_ch4.adb (Expand_N_Op_Expon): Remove unsigned type test
3220         for 2**X optimization.
3222 2014-01-27  Ed Schonberg  <schonberg@adacore.com>
3224         * a-suenst.adb: strings.utf_encoding.strings (Decode): Check
3225         explicitly whether value is in range of Character, because the
3226         library is typically compiled with range checks disabled, and
3227         we cannot rely on the implicit check on the argument of 'Val.
3229 2014-01-27  Vincent Celier  <celier@adacore.com>
3231         * a-ciorma.adb, a-cihama.adb (Assign): Copy the Source to the Target,
3232         not the Target to itself.
3234 2014-01-27  Robert Dewar  <dewar@adacore.com>
3236         * vms_conv.ads, ali.adb, sem_ch6.ads, opt.ads, vms_cmds.ads: Minor
3237         changes to avoid incorrect use of unordered enum types.
3239 2014-01-27  Thomas Quinot  <quinot@adacore.com>
3241         * sem_ch4.adb: Minor reformatting.
3243 2014-01-27  Robert Dewar  <dewar@adacore.com>
3245         * scn.adb (Check_End_Of_Line): Removed.
3246         (Error_Long_Line): Removed.
3247         (Determine_License): Use versions of above routines from Scanner.
3248         * scng.adb (Check_End_Of_Line): Moved to spec.
3249         (Error_Long_Line): Removed, no longer used.
3250         * scng.ads (Check_End_Of_Line): Moved here from body.
3252 2014-01-27  Tristan Gingold  <gingold@adacore.com>
3254         * exp_ch7.adb (Build_Cleanup_Statements): Call
3255         Build_Protected_Subprogram_Call_Cleanup to insert the cleanup
3256         for protected body.
3257         * exp_ch9.adb (Build_Protected_Subprogram_Body): Likewise.
3258          Remove Service_Name variable.
3259         (Build_Protected_SUbprogam_Call_Cleanup): New procedure that
3260         factorize code from the above subprograms.
3261         * exp_ch9.ads (Build_Protected_Subprogram_Call_Cleanup): New procedure.
3263 2014-01-27  Hristian Kirtchev  <kirtchev@adacore.com>
3265         * einfo.adb (Has_Option): Reimplemented.
3266         * sem_prag.adb (Analyze_Refinement_Clause): Add global
3267         variables AR_Constit, AW_Constit, ER_Constit, EW_Constit,
3268         External_Constit_Seen and State. Add local variables Body_Ref,
3269         Body_Ref_Elmt and Extra_State. Reimplement part of the logic to
3270         avoid a cumbersome while pool. Verify the legality of an external
3271         state and relevant properties.
3272         (Check_External_Property): New routine.
3273         (Check_Matching_State): Remove parameter profile
3274         and update comment on usage.
3275         (Collect_Constituent): Store the
3276         relevant external property of a constituent.
3277         * sem_util.adb (Async_Readers_Enabled): Update the call to
3278         Has_Enabled_Property.
3279         (Async_Writers_Enabled): Update the call to Has_Enabled_Property.
3280         (Effective_Reads_Enabled): Update the call to Has_Enabled_Property.
3281         (Effective_Writes_Enabled): Update the call to Has_Enabled_Property.
3282         (Has_Enabled_Property): Rename formal parameter Extern to State_Id.
3283         Update comment on usage. Reimplement the logic to recognize the various
3284         formats of properties.
3286 2014-01-27  Ed Schonberg  <schonberg@adacore.com>
3288         * par-ch5.adb: Minor reformatting.
3290 2014-01-27  Tristan Gingold  <gingold@adacore.com>
3292         * s-tposen.ads: Harmonize style and comments.
3294 2014-01-27  Vincent Celier  <celier@adacore.com>
3296         * projects.texi: Document that shared library projects, by
3297         default, cannot import projects that are not shared library
3298         projects.
3300 2014-01-27  Robert Dewar  <dewar@adacore.com>
3302         * sem_ch8.adb (Find_Selected_Component): Use Replace instead
3303         of Rewrite.
3305 2014-01-27  Ed Schonberg  <schonberg@adacore.com>
3307         * a-suenco.adb, a-suenst.adb (Decode): Raise encoding error if
3308         any other exception is raised.
3309         (Convert): If both Input_Scheme and Output_Scheme are UTF_8 it is
3310         still necessary to perform a conversion in order to remove overlong
3311         encodings.
3313 2014-01-27  Robert Dewar  <dewar@adacore.com>
3315         * exp_smem.adb: Minor reformatting.
3317 2014-01-27  Thomas Quinot  <quinot@adacore.com>
3319         * a-calfor.ads: Fix incorrect reference to operator "-" in comment.
3321 2014-01-27  Ed Schonberg  <schonberg@adacore.com>
3323         * sem_res.adb (Make_Call_Into_Operator): In ASIS mode, relocate
3324         nodes for operands to the original node for the call, to preserve
3325         Original_Node pointers within the resolved operands, given that
3326         they may have been rewritten as well. Previous approach copied
3327         the operands into a new tree and lost those pointers.
3329 2014-01-27  Claire Dross  <dross@adacore.com>
3332         * a-cofove.adb, a-cofove.ads: Add Strict_Equal function to the API.
3334 2014-01-27  Ed Schonberg  <schonberg@adacore.com>
3336         * sem_util.adb (Check_Internal_Protected_Use): A call through
3337         an anonymous access parameter of the current protected function
3338         is not a potential modification of the current object.
3340 2014-01-27  Ed Schonberg  <schonberg@adacore.com>
3342         * a-cobove.adb (Reserve_Capacity): Procedure raises
3343         Capacity_Error, not Constraint_Error, when request cannot be
3344         satisfied.
3346 2014-01-27  Vincent Celier  <celier@adacore.com>
3348         * a-coorma.adb, a-cohama.adb (Assign): Copy the Source to the Target,
3349         not the Target to itself.
3351 2014-01-27  Ed Schonberg  <schonberg@adacore.com>
3353         * exp_ch4.adb (Expand_Concatenate): If the target of the
3354         concatenation is a library-level entity, always use the off-line
3355         version of concatenation, regardless of optimization level. This
3356         is space-efficient, and prevents linking problems when some
3357         units are compiled with different optimization levels.
3359 2014-01-27  Ed Schonberg  <schonberg@adacore.com>
3361         * sem_ch5.adb: Code clean up.
3363 2014-01-27  Ed Schonberg  <schonberg@adacore.com>
3365         * par-ch5.adb (P_Iterator_Specification): Improve error recovery
3366         when an array or container iterator includes a subtype indication,
3367         which is only legal in an element iterator.
3369 2014-01-27  Thomas Quinot  <quinot@adacore.com>
3371         * exp_ch7.adb: Minor reformatting.
3373 2014-01-27  Robert Dewar  <dewar@adacore.com>
3375         * opt.adb (SPARK_Mode): Default for library units is None rather
3376         than Off.
3377         * opt.ads: Remove AUTO from SPARK_Mode_Type SPARK_Mode_Type is
3378         no longer ordered.
3379         * sem_prag.adb (Analyze_Pragma, case SPARK_Mode): Remove AUTO
3380         possibility.
3381         * snames.ads-tmpl (Name_Auto): Removed, no longer used.
3383 2014-01-27  Robert Dewar  <dewar@adacore.com>
3385         * par-ch5.adb (P_Sequence_Of_Statements): Make entry in
3386         Suspicious_Labels table if we have identifier; followed by loop
3387         or block.
3388         * par-endh.adb (Evaluate_End_Entry): Search Suspicious_Labels table.
3389         * par.adb (Suspicious_Labels): New table.
3391 2014-01-27  Robert Dewar  <dewar@adacore.com>
3393         * exp_aggr.adb (Check_Bounds): Reason is range check, not
3394         length check.
3396 2014-01-27  Yannick Moy  <moy@adacore.com>
3398         * get_spark_xrefs.adb (Get_SPARK_Xrefs): Accept new type 'c' for
3399         reference.
3400         * lib-xref-spark_specific.adb (Is_Global_Constant): Remove useless
3401         function now.
3402         (Add_SPARK_Xrefs): Include references to constants.
3403         * spark_xrefs.ads Document new character 'c' for references to
3404         constants.
3406 2014-01-27  Thomas Quinot  <quinot@adacore.com>
3408         * exp_smem.adb (Add_Write_After): For a function call, insert write as
3409         an after action in a transient scope.
3411 2014-01-27  Thomas Quinot  <quinot@adacore.com>
3413         * exp_smem.adb (Expand_Shared_Passive_Variable): For a reference
3414         to a shared variable as an OUT formal in a call to an init proc,
3415         the 'Read call must be emitted after, not before, the call.
3417 2014-01-27  Robert Dewar  <dewar@adacore.com>
3419         * gnat_rm.texi: Remove mention of AUTO mode for SPARK_Mode pragma.
3421 2014-01-27  Robert Dewar  <dewar@adacore.com>
3423         * a-wichha.adb (Character_Set_Version): Change to output proper
3424         value.
3426 2014-01-27  Hristian Kirtchev  <kirtchev@adacore.com>
3428         * einfo.adb (Is_Input_Only_State): Removed.
3429         (Is_Non_Volatile_State): Removed.
3430         (Is_Output_State): Removed.
3431         * einfo.ads (Is_Input_Only_State): Remove attribute and
3432         subprogram. Update related entity.
3433         (Is_Non_Volatile_State):
3434         Remove attribute and subprogram. Update related entity.
3435         (Is_Output_State): Removed attribute and subprogram. Update
3436         related entity.
3437         * exp_ch6.adb (Expand_Subprogram_Contract): Update comment on
3438         generated code.
3439         * sem_ch3.adb (Analyze_Declarations): Analyze the contract of
3440         an object, not just variables.
3441         (Analyze_Object_Contract): New routine.
3442         (Analyze_Variable_Contract): Removed.
3443         (Process_Discriminants): Detect an illegal use of volatile
3444         discriminant in SPARK mode.
3445         * sem_ch5.adb (Analyze_Iterator_Specification):
3446         Detect an illegal use of volatile loop variable.
3447         (Analyze_Loop_Parameter_Specification): Detect an illegal use
3448         of volatile loop variable.
3449         * sem_ch6.adb (Process_Formals): Update the volatile object
3450         detection. Detect an illegal formal of mode IN OUT or OUT in
3451         SPARK mode. Enhance the error messages with references.
3452         * sem_ch12.adb (Instantiate_Object): Update the volatile object
3453         detection. Enhance the error messages with references.
3454         * sem_prag.adb (Analyze_Abstract_State): Enhance the error
3455         messages with references.
3456         (Analyze_Contract_Case): Enhance the error messages with references.
3457         (Analyze_External_Property): Call Check_Duplicate_Property to process
3458         an external property.
3459         (Analyze_External_Property_In_Decl_Part): New routine.
3460         (Analyze_External_State_In_Decl_Part): Removed.
3461         (Analyze_Global_Item): Detect an illegal
3462         use of a volatile constant. Detect an illegal use
3463         of a variable with enabled Effective_Reads. Enhance
3464         the error messages with references. Remove obsolete
3465         checks concerning Input_Only and Output_Only states.
3466         (Analyze_Initialization_Item): Enhance the error messages
3467         with references.
3468         (Analyze_Initializes_In_Decl_Part): Do not
3469         collect the states and variables when the initialization list
3470         is null.
3471         (Analyze_Input_Item): Enhance the error messages with references.
3472         (Analyze_Input_Output): Enhance the error messages with references.
3473         (Analyze_Pragma): Enhance the error messages with references.
3474         (Analyze_Refinement_Clause): Code reformatting.
3475         (Analyze_Refined_Depends_In_Decl_Part):
3476         Rename global variable Global to Reg_Global and update all
3477         occurrences. Add local variables D7 and D8. Update the error
3478         messages with references. Update the call to Collect_Global_Items.
3479         (Analyze_Refined_Global_In_Decl_Part): Add local variables
3480         Has_Proof_In_State, Proof_In_Constits and Proof_In_Items. Update
3481         the call to Collect_Global_Items.  Account for a Proof_In state
3482         in null / useless refinement checks. Verify the coverage of
3483         Proof_In states.
3484         (Check_Dependency_Clause): Remove local variable
3485         Out_Constits. Remove the retrieval and removal of constituents
3486         for an Output_Only state. Remove the reporting of unused
3487         Output_Only state constituents.
3488         (Check_Duplicate_Mode): Enhance
3489         the error message with a reference.
3490         (Check_Duplicate_Property): New routine.
3491         (Check_Duplicate_Option): Enhance the error message with a reference.
3492         (Check_External_Properties): Enhance the error message with a reference.
3493         (Check_Function_Return): Enhance the error message with a reference.
3494         (Check_In_Out_States): Update
3495         comment on usage. Add a specialized error message for Proof_In
3496         constituents. Enhance the error message with a reference.
3497         (Check_Input_States): Update comment on usage. Account for
3498         possible Proof_In constituents. Enhance the error message
3499         with a areference.
3500         (Check_Matching_Constituent): Enhance the error message with a
3501         reference.
3502         (Check_Matching_State): Enchance the error message with a reference.
3503         (Check_Mode): Add local variable From_Global. Update the call to
3504         Find_Mode.  Emit more precise error messages concerning extra items
3505         (Check_Mode_Restriction_In_Enclosing_Context): Consider
3506         pragma Refined_Global.  Enhance the error message with a
3507         reference.
3508         (Check_Mode_Restriction_In_Function): Enhance the error message with
3509         a reference.
3510         (Check_Output_States): Update comment on usage. Add local variable
3511         Posted.  Account for possible Proof_In constituents. Produce a detailed
3512         list of missing constituents.
3513         (Check_Proof_In_States): New routine.
3514         (Check_Refined_Global_Item): Handle Proof_In
3515         constituents. Enchance the error message with a reference.
3516         (Collect_Global_Items): Add formal parameters Proof_In_Items
3517         and Has_Proof_In_State. Update the comment on usage. Account
3518         for Proof_In items.
3519         (Create_Or_Modify_Clause): Enchance
3520         the error message with a reference.
3521         (Find_Mode): Add
3522         formal parameter From_Global. Update the comment on usage.
3523         Detect when the mode is governed by pragma [Refined_]Global.
3524         (Output_Constituents): Removed.
3525         (Report_Extra_Constituents):
3526         Report extra Proof_In constituents.
3527         (Report_Unused_Constituents): Removed.
3528         (Usage_Error): Code reformatting. Enhance the error
3529         messages with reference.
3530         * sem_prag.ads (Analyze_External_Property_In_Decl_Part): New routine.
3531         (Analyze_External_State_In_Decl_Part): Removed.
3532         * sem_res.adb (Resolve_Actuals): Update the volatile object
3533         detection. Enhance the error message with a reference.
3534         (Resolve_Entity_Name): Update the volatile object
3535         detection. Enhance the error message with a reference.
3536         * sem_util.adb (Is_Refined_State): Add a guard to avoid a crash.
3537         (Is_SPARK_Volatile_Object): New routine.
3538         (Has_Volatile_Component): New routine.
3539         * sem_util.ads (Is_Delegate): Alphabetized.
3540         (Is_SPARK_Volatile_Object): New routine.
3541         (Has_Volatile_Component): New routine.
3542         * snames.ads-tmpl: Remove names Name_Input_Only and Name_Output_Only.
3544 2014-01-27  Ed Schonberg  <schonberg@adacore.com>
3546         * sem_attr.adb: Resolve fully prefix of 'Update.
3548 2014-01-27  Ben Brosgol  <brosgol@adacore.com>
3550         * gnat_rm.texi: Minor clarifications.
3552 2014-01-27  Robert Dewar  <dewar@adacore.com>
3554         * sem_elab.adb (Check_Internal_Call_Continue): Avoid complaining
3555         about call that is generated as part of an Initial_Condition
3556         check.
3557         * sem_prag.adb: Minor spelling correction.
3559 2014-01-27  Robert Dewar  <dewar@adacore.com>
3561         * sem_prag.adb (Set_Convention_From_Pragma): Check that
3562         convention Ghost can only apply to functions.
3563         * einfo.ads, einfo.adb (Is_Ghost_Subprogram): Add clarifying comment.
3565 2014-01-27  Robert Dewar  <dewar@adacore.com>
3567         * gnat_ugn.texi: Add Short_Enums to documentation of
3568         -gnatet/-gnateT.
3570 2014-01-27  Robert Dewar  <dewar@adacore.com>
3572         * sem_prag.adb (Analyze_Input_Item): Correct check for input
3573         item in same package.
3574         * sem_util.ads, sem_util.adb (Within_Scope): New function.
3576 2014-01-26  Arnaud Charlet  <charlet@adacore.com>
3578         * a-intnam-lynxos.ads, mlib-tgt-specific-lynxos.adb,
3579         s-osinte-lynxos-3.adb, s-osinte-lynxos-3.ads, s-osinte-lynxos.adb,
3580         s-osinte-lynxos.ads, s-taprop-lynxos.adb, s-tpopsp-lynxos.adb,
3581         system-lynxos-ppc.ads, system-lynxos-x86.ads: Removed, no longer
3582         maintained.
3584 2014-01-25  Eric Botcazou  <ebotcazou@adacore.com>
3586         * gcc-interface/Makefile.in: Fix oversight.
3588 2014-01-25  Eric Botcazou  <ebotcazou@adacore.com>
3590         * gcc-interface/utils.c (convert_to_fat_pointer): Un-obfuscate the
3591         conversion from a thin pointer with a shifted value.
3592         * gcc-interface/utils2.c (gnat_build_constructor): Propagate the
3593         read-only flag from the values onto the result.
3594         (gnat_invariant_expr): Accept read-only CONSTRUCTORs.
3596 2014-01-25  Tristan Gingold  <gingold@adacore.com>
3598         * gcc-interface/decl.c (gnat_to_gnu_entity): Always build a variable
3599         for E_Variable with a pragma Linker_Section.
3601 2014-01-25  Robert Dewar  <dewar@adacore.com>
3603         * gcc-interface/decl.c (gnat_to_gnu_param): Make sure an Out parameter
3604         with Default_Value aspect is passed in by copy.
3606 2014-01-24  Eric Botcazou  <ebotcazou@adacore.com>
3608         * set_targ.adb: Set Short_Enums.
3609         * gcc-interface/lang.opt (fshort-enums): New option.
3610         * gcc-interface/misc.c (gnat_handle_option): Handle it.
3611         (gnat_post_options): Do not modify the global settings.
3613 2014-01-24  Robert Dewar  <dewar@adacore.com>
3615         * g-rannum.ads, g-rannum.adb (Random_Ordinary_Fixed): New generic
3616         function.
3617         (Random_Decimal_Fixed): New generic function.
3618         * s-rannum.ads: Minor comment clarifications.
3620 2014-01-24  Robert Dewar  <dewar@adacore.com>
3622         * back_end.adb: Remove Short_Enums handling (handled in
3623         Ttypes/Get_Targ now) Minor added comments.
3624         * freeze.adb: Change name Short_Enums_On_Target to
3625         Target_Short_Enums.
3626         * get_targ.ads, get_targ.adb (Get_Short_Enums): New function.
3627         * opt.ads: Minor comment updates.
3628         * sem_ch13.adb: Change name Short_Enums_On_Target to
3629         Target_Short_Enums.
3630         * set_targ.adb: Set Short_Enums from gcc back end.
3631         * set_targ.ads (Short_Enums): New variable.
3632         * targparm.ads, targparm.adb: Remove Short_Enums entries (handled in
3633         Ttypes/Get_Targ now).
3634         * ttypes.ads (Target_Short_Enums): New constant boolean switch
3636 2014-01-24  Pascal Obry  <obry@adacore.com>
3638         * g-sercom-mingw.adb: Fix serial port name for port number > 10.
3640 2014-01-24  Gary Dismukes  <dismukes@adacore.com>
3642         * exp_disp.adb (Expand_Dispatching_Call): Call Unqualify on Param when
3643         comparing it with Ctrl_Arg, since Ctrl_Arg may have had qualification
3644         stripped off.
3646 2014-01-24  Robert Dewar  <dewar@adacore.com>
3648         * sinfo.ads, make.adb, prj-env.adb: Minor reformatting.
3650 2014-01-24  Vincent Celier  <celier@adacore.com>
3652         * prj.adb (Add_Aggregated_Project): Do not add a project in
3653         the list if it is already there.
3655 2014-01-24  Yannick Moy  <moy@adacore.com>
3657         * lib-xref-spark_specific.adb (Enclosing_Subprogram_Or_Package):
3658         Correct the search for a subrogram declaration to which a pragma is
3659         attached.
3661 2014-01-24  Bob Duff  <duff@adacore.com>
3663         * gnat_ugn.texi: Document --decimal-grouping and
3664         --based-grouping switches in gnatpp.
3666 2014-01-24  Ed Schonberg  <schonberg@adacore.com>
3668         * sinfo.ads: Documentation update.
3670 2014-01-24  Ed Schonberg  <schonberg@adacore.com>
3672         * sem_ch3.adb (Constant_Redeclaration): New declaration is
3673         illegal if previous one has an initial expression that is an
3674         aggregate expanded into assignments.
3676 2014-01-24  Ed Schonberg  <schonberg@adacore.com>
3678         * sem_ch5.adb (Analyze_Loop_Parameter_Specification): Small
3679         code reorganization to remove spurious warning on a loop with
3680         an array element iterator that has a null range.
3682 2014-01-24  Vincent Celier  <celier@adacore.com>
3684         * make.adb (Binding_Phase): When setting the Ada paths, use
3685         the library ALI dir, not the object dir in libraries.
3687 2014-01-24  Yannick Moy  <moy@adacore.com>
3689         * sinfo.ads: Add documentation of check flag fields.
3691 2014-01-24  Ed Schonberg  <schonberg@adacore.com>
3693         * sem_res.adb (Resolve_Actuals): If an actual is a view
3694         conversion of a discriminated object, and the formal type is
3695         discriminated and constrained, apply a discriminant check to
3696         the object itself.
3698 2014-01-24  Robert Dewar  <dewar@adacore.com>
3700         * prj.adb, prj-env.adb, back_end.adb: Add comment, minor code clean ups.
3702 2014-01-24  Ed Schonberg  <schonberg@adacore.com>
3704         * sem_ch3.adb (Analyze_Declarations): At the end of an
3705         appropriate declarative part, call Freeze_All from the first
3706         declaration in the scope, not from the first unfrozen one. This
3707         is necessary to apply visibility checks to entities with delayed
3708         aspects. Otherwise, in the presence of instantiations and cleanups
3709         that they may generate, the delayed aspects may be analyzed too
3710         late and produce spurious visibility errors.
3711         * sem_attr.adb: Place etype on range.
3712         * sem_ch6.adb: Documentation expression functions.
3714 2014-01-24  Robert Dewar  <dewar@adacore.com>
3716         * exp_ch7.adb: Minor change of Indices to Indexes (preferred
3717         terminology in compiler).
3719 2014-01-24  Robert Dewar  <dewar@adacore.com>
3721         * scans.ads: Remove Tok_Raise from Sterm, Eterm, After_SM
3722         categories, now that Ada 95 supports raise expressions.
3724 2014-01-24  Robert Dewar  <dewar@adacore.com>
3726         * freeze.adb (Freeze_Enumeration_Type): Use new target parameter
3727         Short_Enums_On_Target.
3728         * sem_ch13.adb (Set_Enum_Esize): Take Short_Enums_On_Target
3729         into account.
3730         * targparm.ads, targparm.adb: Add new target parameter Short_Enums.
3732 2014-01-24  Ed Schonberg  <schonberg@adacore.com>
3734         * sem_ch5.adb (Analyze_Iterator_Specification): If subtype
3735         indication is given explicity, check that it matches the array
3736         component type or the container element type of the domain
3737         of iteration.
3739 2014-01-24  Tristan Gingold  <gingold@adacore.com>
3741         * back_end.adb (Scan_Compiler_Arguments): Set Short_Enums_On_Target.
3742         * gcc-interface/misc.c (flag_short_enums): Declare.
3743         (gnat_post_options): Set it.
3745 2014-01-24  Vincent Celier  <celier@adacore.com>
3747         * prj-env.adb (Ada_Objects_Path): Use Ada_Objects_Path_No_Libs
3748         to cache the result when Including_Libraries is False.
3749         * prj-env.ads (Ada_Objects_Path): Update documentation
3750         * prj.adb (Free (Project_Id)): Also free Ada_Objects_Path_No_Libs
3751         (Get_Object_Directory): Return the Library_Ali_Dir only when
3752         when Including_Libraries is True.
3753         * prj.ads (Get_Object_Directory): Fix and complete documentation
3754         (Project_Data): New component Ada_Objects_Path_No_Libs
3756 2014-01-24  Robert Dewar  <dewar@adacore.com>
3758         * checks.adb (Expr_Known_Valid): Result of fpt operator never
3759         considered valid.
3761 2014-01-24  Eric Botcazou  <ebotcazou@adacore.com>
3763         * back_end.adb: Minor fix in comment.
3765 2014-01-24  Javier Miranda  <miranda@adacore.com>
3767         * sem_ch3.adb (Check_Abstract_Overriding): Code reestructuration
3768         required to report the error in case of task types.
3770 2014-01-24  Ed Schonberg  <schonberg@adacore.com>
3772         * sem_attr.adb: Additional index checking.
3774 2014-01-24  Ed Schonberg  <schonberg@adacore.com>
3776         * sem_attr.adb (Analyze_Attribute, case 'Update): Analyze
3777         expressions in each component association, and for records note
3778         the entity in each association choice, for subsequent resolution.
3779         (Resolve_Attribute, case 'Update): Complete resolution of
3780         expressions in each component association.
3782 2014-01-24  Robert Dewar  <dewar@adacore.com>
3784         * sem.adb (Sem): Avoid premature reference to Current_Sem_Unit
3785         (this was causing Is_Main_Unit_Or_Main_Unit_Spec to be set wrong,
3786         leading to wrong handling of SPARK_Mode for library units).
3788 2014-01-24  Robert Dewar  <dewar@adacore.com>
3790         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Set SPARK_Mode
3791         on generic instances (do not consider them to be internally
3792         generated)
3794 2014-01-24  Doug Rupp  <rupp@adacore.com>
3796         * s-osinte-android.ads (pthread_sigmask): Import sigprocmask
3797         vice pthread_sigmask.
3799 2014-01-24  Vincent Celier  <celier@adacore.com>
3801         * prj.adb (Debug_Output (Str, Str2)): Output if verbosity is
3802         not default.
3804 2014-01-24  Vincent Celier  <celier@adacore.com>
3806         * prj-ext.adb (Add): Do not output anything when Silent is True,
3807         whatever the verbosity. When Source is From_External_Attribute,
3808         set the corresponding environment variable if it is not already set.
3809         * prj-ext.ads (Add): New Boolean parameter Silent, defaulted
3810         to False
3811         * prj-proc.adb (Process_Expression_For_Associative_Array):
3812         For attribute External, call Prj.Ext.Add with Silent set to
3813         True for the child environment, to avoid useless output in non
3814         default verbosity.
3816 2014-01-24  Ed Schonberg  <schonberg@adacore.com>
3818         * sem_res.adb (Set_Slice_Subtype): Handle properly a discrete
3819         range given by a subtype indication, and force evaluation of
3820         the bounds, as for a simple range.
3821         * exp_util.adb (Evaluate_Slice_Bounds): Utility to force evaluation
3822         of bounds of slice for various kinds of discrete ranges.
3823         (Evaluate_Name, Evaluate_Subtype_From_Expr): use
3824         Evaluate_Slice_Bounds.
3826 2014-01-24  Bob Duff  <duff@adacore.com>
3828         * s-taskin.ads (Activator): Make this Atomic, because
3829         Activation_Is_Complete reads it, and that can be called
3830         from any task. Previously, this component was only
3831         modified by the activator before activation, and by
3832         Self after activation.
3833         * a-taside.ads, a-taside.adb (Environment_Task,
3834         Activation_Is_Complete): Implement these missing functions.
3836 2014-01-24  Doug Rupp  <rupp@adacore.com>
3838         * init.c: Add a handler section for Android.
3840 2014-01-24  Arnaud Charlet  <charlet@adacore.com>
3842         * i-cexten.ads (Unsigned_33..64, Unsigned_33..64): New types.
3844 2014-01-24  Ed Schonberg  <schonberg@adacore.com>
3846         * sem_ch4.adb (Operator_Check): If one operand is a
3847         Raise_Expression, set its type to that of the other operand.
3848         * sem_res.adb (Resolve_Raise_Expression): new procedure.
3849         (Resolve_Actuals): For an actual that is a Raise_Expression,
3850         set the type to that of the formal.
3851         * sem_type.adb (Find_Unique_Type): If one of the operands is a
3852         Raise_Expression, return type of the other operand.
3854 2014-01-24  Ed Schonberg  <schonberg@adacore.com>
3856         * sem_aggr.adb (Resolve_Record_Aggregate): If a scalar
3857         component of the record has a type with a default aspect, and
3858         the corresponding aggregate component is initiaized with a box,
3859         use the default value in the rewritten aggregate.
3861 2014-01-24  Tristan Gingold  <gingold@adacore.com>
3863         * s-interr.ads, s-interr.adb, s-interr-hwint.adb, s-interr-vms.adb,
3864         s-interr-sigaction.adb,
3865         s-interr-dummy.adb (Install_Restricted_Handlers): Add Prio parameter.
3866         * exp_ch9.adb (Make_Initialize_Protection): Add Prio parameter
3867         to the call to Install_Restricted_Handlers.
3869 2014-01-24  Emmanuel Briot  <briot@adacore.com>
3871         * prj-nmsc.adb (Check_File): Add protection when the source is
3872         not fully initialized.
3874 2014-01-24  Ed Schonberg  <schonberg@adacore.com>
3876         * sem_util.adb (Is_Post_State): In a postcondition, a selected
3877         component that denotes an implicit dereference is a reference
3878         to the post state of the subprogram.
3880 2014-01-24  Robert Dewar  <dewar@adacore.com>
3882         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): SPARK_Mode OFF
3883         for generated subprograms.
3884         (Analyze_Subprogram_Specification): Ditto.
3886 2014-01-24  Vincent Celier  <celier@adacore.com>
3888         * prj-dect.adb (Check_Attribute_Allowed): Detect more forbidden
3889         attributes in package Builder of aggregate and aggregate library
3890         projects.
3891         * prj-nmsc.adb (Process_Naming_Scheme.Check.Check_Aggregate):
3892         Remove procedure (Process_Naming_Scheme.Check.Check_Aggregated):
3893         Remove parameters.  Change error message from "... externally
3894         build library ..." to "... externally built project ...".
3895         (Process_Naming_Scheme.Check): Do not do any check in aggregate
3896         project, as attribute Library_Dir and Library_Name have already
3897         been detected as forbidden.
3899 2014-01-24  Vincent Celier  <celier@adacore.com>
3901         * prj-env.adb (Find_Project): If cached project path is not in
3902         project directory, look in current directory first and use cached
3903         project path only if project is not found in project directory.
3905 2014-01-24  Robert Dewar  <dewar@adacore.com>
3907         * sem_util.adb, lib-xref.adb: Correct false positive warnings.
3909 2014-01-24  Vincent Celier  <celier@adacore.com>
3911         * projects.texi: Document that aggregate projects are only
3912         supported by gprbuild, but not by gnatmake.  Document that the
3913         only attribute Switches in package Binder of aggregate projects
3914         will be ignored if its index is not others.  Document that
3915         attribute Global_Config_File is allowed in package Binder of
3916         aggregate projects.
3918 2014-01-24  Robert Dewar  <dewar@adacore.com>
3920         * sem_prag.adb: Minor code reorganization.
3921         * sem_util.adb: Minor fix of potential latent bug in Is_LHS.
3923 2014-01-24  Pascal Obry  <obry@adacore.com>
3925         * prj-attr.adb, projects.texi, snames.ads-tmpl: Add Excluded_Patterns
3926         attribute definition.
3928 2014-01-24  Vincent Celier  <celier@adacore.com>
3930         * makeutl.adb (Queue.Insert_No_Roots): In gprbuild, do not put
3931         in the Queue the same source (same path, same multi-source index)
3932         from the same project file, to avoid compiling several times
3933         the same source.
3935 2014-01-24  Eric Botcazou  <ebotcazou@adacore.com>
3937         * einfo.ads (First_Rep_Item): Remove obsolete stuff.
3938         (Has_Gigi_Rep_Item): Likewise.
3939         * sem_prag.adb (Analyze_Pragma) <Pragma_Linker_Section>: Do not set
3940         Has_Gigi_Rep_Item for objects.
3941         * gcc-interface/decl.c (prepend_one_attribute_to): Rename into...
3942         (prepend_one_attribute): ...this.
3943         (prepend_one_attribute_pragma): New function extracted from...
3944         (prepend_attributes): ...here.  Swap the parameters for consistency.
3945         (gnat_to_gnu_entity): Adjust calls to prepend_one_attribute_to and to
3946         prepend_attributes.
3947         <object>: Deal with a pragma Linker_Section on a constant
3948         or variable.  <E_Function>: Deal with a pragma Linker_Section
3949         on a subprogram.
3950         (get_minimal_subprog_decl): Adjust calls to prepend_one_attribute_to.
3952 2014-01-24  Vincent Celier  <celier@adacore.com>
3954         * opt.ads: Minor comment update.
3956 2014-01-24  Robert Dewar  <dewar@adacore.com>
3958         * sem_prag.adb (Analyze_Input_Output): Add missing error check
3959         for junk operand.
3960         * sem_util.adb (Is_Refined_State): Add defense against junk
3961         tree from error.
3963 2014-01-24  Pascal Obry  <obry@adacore.com>
3965         * projects.texi: Removes Build_Slaves attribute documentation.
3967 2014-01-23  Robert Dewar  <dewar@adacore.com>
3969         * opt.adb (Register_Opt_Config_Switches): Save SPARK_Mode_Pragma
3970         setting.
3972 2014-01-23  Ed Schonberg  <schonberg@adacore.com>
3974         * sem_util.adb (Is_Potentially_Unevaluated): Predicate only
3975         applies to expressions that come from source.
3976         * sem_attr.adb (Analyze_Attribute, case 'Old): Improve error
3977         message.
3978         (Analyze_Attribute, case 'Loop_Entry): Apply SPARK 2014 legality
3979         rule regarding potentially unevaluated expressions, to prefix
3980         of attribute.
3982 2014-01-23  Ed Schonberg  <schonberg@adacore.com>
3984         * exp_util.adb (Make_Invqriant_Call): If type of expression is
3985         a private extension, get invariant from base type.
3987 2014-01-23  Robert Dewar  <dewar@adacore.com>
3989         * sem_util.adb, sem_attr.adb: Minor reformatting.
3991 2014-01-23  Robert Dewar  <dewar@adacore.com>
3993         * opt.adb (Save_Opt_Config_Switches): Save SPARK_Mode_Pragma
3994         (Restore_Opt_Config_Switches): Restore SPARK_Mode_Pragma.
3995         * sem.adb (Semantics): Remove save/restore of
3996         SPARK_Mode[_Pragma]. Not needed since already done in
3997         Save/Restore_Opt_Config_Switches.
3999 2014-01-23  Robert Dewar  <dewar@adacore.com>
4001         * gnat_rm.texi, einfo.adb, einfo.ads, sem_prag.adb, gnat_ugn.texi,
4002         freeze.adb, repinfo.adb, aspects.adb, aspects.ads, sem_ch13.adb:
4003         Linker_Section enhancements.
4005 2014-01-23  Tristan Gingold  <gingold@adacore.com>
4007         * gnat_rm.texi: Minor editing.
4009 2014-01-23  Robert Dewar  <dewar@adacore.com>
4011         * opt.adb (Set_Opt_Config_Switches): Reset SPARK mode for
4012         with'ed internal units.
4013         * sem.adb (Semantics): Save and restore SPARK_Mode[_Pragma].
4015 2014-01-23  Javier Miranda  <miranda@adacore.com>
4017         * lib-xref.adb (Generate_Reference): As part of processing the
4018         "end-of-spec" reference generate an extra reference to the first
4019         private entity of the package.
4020         * xr_tabls.adb (Add_Reference): No action needed for the extra
4021         'E' reference associated; similar to the processing of the
4022         'e' reference.
4024 2014-01-23  Bob Duff  <duff@adacore.com>
4026         * gnat_ugn.texi: Change "--&pp off" to "--!pp off".
4028 2014-01-23  Ed Schonberg  <schonberg@adacore.com>
4030         * sem_util.ads, sem_util.adb (Is_Potentially_Unevaluated): new
4031         predicate to implement rule given in 6.1.1 (20/3).
4032         * sem_attr.adb (Analyze_Attribute, case 'Old): Reject prefix of
4033         'Old in a postcondition, if it is potentially unevaluated and
4034         it is not an entity name.
4036 2014-01-23  Bob Duff  <duff@adacore.com>
4038         * gnat_ugn.texi: Document the new "--&pp off" feature of gnatpp.
4040 2014-01-23  Robert Dewar  <dewar@adacore.com>
4042         * gnatlink.adb (Gnatlink): Fix problem of generating bad name
4043         msg on VMS.
4045 2014-01-23  Bob Duff  <duff@adacore.com>
4047         * g-dynhta.ads: Minor comment fix.
4049 2014-01-23  Yannick Moy  <moy@adacore.com>
4051         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Inherit SPARK_Mode
4052         from spec on body only when not already inherited on spec. Set
4053         SPARK_Mode from context on body without previous spec.  *
4054         * sem_prag.adb (Analyze_Pragma): Check placement of pragma on
4055         library-level entities.  Correct retrieval of entity from
4056         declaration, for cases where the declaration is not a unit.
4057         * sem_ch12.adb (Instantiate_Object): Avoid
4058         calling Is_Volatile_Object on an empty node.
4060 2014-01-23  Robert Dewar  <dewar@adacore.com>
4062         * gnatlink.adb (Gnatlink): Check for suspicious executable file
4063         names on windows.
4065 2014-01-23  Robert Dewar  <dewar@adacore.com>
4067         * a-ngelfu.ads: Remove bad uses of AND which should be AND THEN.
4068         * sem_res.adb (Check_No_Direct_Boolean_Operators): Don't give
4069         style errors in instances.
4070         * g-dynhta.ads (Static_HTable): Comment updates.
4072 2014-01-23  Vincent Celier  <celier@adacore.com>
4074         * prj-conf.adb (Get_Or_Create_Configuration_File): Do not attempt
4075         to find a configuration project file when Config_File_Name is
4076         No_Configuration_File.
4077         * prj-conf.ads (No_Configuration_File): New constant String.
4078         * prj-pars.adb (Parse): Call Get_Or_Create_Configuration_File
4079         with Config_File_Name set to No_Configuration_File, so that
4080         no existing configuration project file will be used, and the
4081         configuration project will be only created in memory when
4082         Add_Default_GNAT_Naming_Scheme is called.
4083         * projects.texi: Minor reformatting.
4085 2014-01-23  Vincent Celier  <celier@adacore.com>
4087         * prj-conf.adb (Get_Or_Create_Configuration_File): Never parse
4088         a config project file if On_Load_Config is not null.
4089         * prj-pars.adb: Minor comment changes.
4091 2014-01-23  Ed Schonberg  <schonberg@adacore.com>
4093         * lib-xref.adb (Output_References): Output progenitors of
4094         synchronized tagged types, for source navigation.
4096 2014-01-23  Robert Dewar  <dewar@adacore.com>
4098         * exp_util.adb, sinfo.adb, sinfo.ads, sem.adb, sem_res.adb,
4099         expander.adb, exp_ch11.adb, exp_ch11.ads, sem_ch11.adb, sem_ch11.ads,
4100         sprint.adb, sprint.ads: Remove unused node N_Subprogram_Info.
4102 2014-01-23  Emmanuel Briot  <briot@adacore.com>
4104         * prj-conf.adb (Get_Or_Create_Configuration_File): call
4105         On_Load_Config later.
4107 2014-01-23  Hristian Kirtchev  <kirtchev@adacore.com>
4109         * sem_ch3.adb (Analyze_Declarations): Do not
4110         generate the spec of the late primitive in ASIS mode. Add two
4111         comments to explain the special cases when the expansion is
4112         not performed.
4114 2014-01-23  Robert Dewar  <dewar@adacore.com>
4116         * sem_util.adb (Note_Possible_Modification): Fix error of
4117         misbehaving for implicit dereference cases in -gnatc mode.
4119 2014-01-23  Emmanuel Briot  <briot@adacore.com>
4121         * prj-pars.adb: Minor reformatting.
4123 2014-01-22  Ed Schonberg  <schonberg@adacore.com>
4125         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): A subprogram
4126         body generated for an expression function within a protected body
4127         needs a set of renaming declarations if the expression function
4128         comes from source.
4130 2014-01-22  Ed Schonberg  <schonberg@adacore.com>
4132         * lib-xref.adb (Get_Type_Reference): In semantics-only mode,
4133         list interface progenitor of a tagged concurrent type, for better
4134         source navigation.
4136 2014-01-22  Robert Dewar  <dewar@adacore.com>
4138         * lib.adb (In_Extended_Main_Code_Unit): Return False for
4139         Standard_Location.
4140         (In_Extended_Main_Source_Unit): Return False for Standard_Location.
4141         * lib.ads (In_Extended_Main_Code_Unit): Add documentation on
4142         treatment of Slocs No_Location and Standard_Location.
4143         * restrict.adb (Check_Restriction_No_Dependence): Explicitly
4144         check for entity with Standard_Location Sloc, rather than relying
4145         on Lib routines to do that.
4146         * sem_res.adb (Resolve_Call): Implement SPARK_05 restriction
4147         that a call cannot occur before a later occuring body within
4148         the same unit.
4150 2014-01-22  Thomas Quinot  <quinot@adacore.com>
4152         * rtsfind.adb: Update comment.
4154 2014-01-22  Hristian Kirtchev  <kirtchev@adacore.com>
4156         * sem_aux.ads, sem_aux.adb (Is_Body): New routine.
4157         * sem_ch3.adb (Analyze_Declarations): Add local variable
4158         Body_Seen. Generate the spec of a late controlled
4159         primitive body that is about to freeze its related type.
4160         (Handle_Late_Controlled_Primitive): New routine.
4162 2014-01-22  Robert Dewar  <dewar@adacore.com>
4164         * a-stream.adb: Minor reformatting.
4166 2014-01-22  Ed Schonberg  <schonberg@adacore.com>
4168         * sem_ch8.adb (From_Actual_Package): Introduce a recursive
4169         sub-procedure Declared_In_Actual to handle properly the visibility
4170         of actuals in actual packages, that are themselves actuals to a
4171         actual package of the current instance. This mimics properly the
4172         visibility of formals of formal packages declared with a box,
4173         within the corresponding generic unit.
4175 2014-01-22  Robert Dewar  <dewar@adacore.com>
4177         * checks.adb: Do not assume that a volatile variable is valid.
4179 2014-01-22  Thomas Quinot  <quinot@adacore.com>
4181         * g-catiio.ads (Image, Value): Clarify that these functions
4182         operate in the local time zone.  Minor documentation update.
4184 2014-01-22  Thomas Quinot  <quinot@adacore.com>
4186         * csets.adb, csets.ads, opt.ads: Minor documentation fixes.
4188 2014-01-22  Robert Dewar  <dewar@adacore.com>
4190         * sem_aux.adb, sem_aux.ads, sem_ch3.adb (Has_Unconstrained_Elements):
4191         Moved to sem_aux.adb.
4193 2014-01-22  Robert Dewar  <dewar@adacore.com>
4195         * vms_data.ads: Minor reformatting.
4197 2014-01-22  Robert Dewar  <dewar@adacore.com>
4199         * debug.adb: Document messages affected by -gnatd.E including
4200         the new ones that relate to late definition of equality.
4201         * sem_ch6.adb (Check_Untagged_Equality): In Ada 2012 mode, if
4202         debug flag -gnatd.E is set, then generate warnings rather than
4203         errors.
4204         (Check_Untagged_Equality): In earlier versions of Ada,
4205         generate warnings if Warn_On_Ada_2012_Incompatibility flag is set.
4207 2014-01-22  Robert Dewar  <dewar@adacore.com>
4209         * sem_prag.adb (Usage_Error): Output additional messages for
4210         unconstrained OUT parameters lacking an input dependency.
4212 2014-01-22  Robert Dewar  <dewar@adacore.com>
4214         * sem_ch4.adb: Minor reformatting.
4216 2014-01-22  Robert Dewar  <dewar@adacore.com>
4218         * restrict.ads: Minor reformatting.
4219         * sem_res.adb (Resolve_Call): Check for SPARK_05 restriction that
4220         forbids a call from within a subprogram to the same subprogram.
4222 2014-01-22  Thomas Quinot  <quinot@adacore.com>
4224         * a-stream.ads (Read_SEA, Write_SEA): New subprograms, optimized
4225         stream attributes for Stream_Element_Array.
4226         * a-stream.adb (Read_SEA, Write_SEA): Bodies for the above.
4227         * rtsfind.adb (Check_CRT): Do not reject a reference to an entity
4228         defined in the current scope.
4230 2014-01-22  Robert Dewar  <dewar@adacore.com>
4232         * debug.adb, exp_ch4.adb, erroutc.adb: Minor reformatting.
4234 2014-01-22  Thomas Quinot  <quinot@adacore.com>
4236         * sem_ch7.adb, sem_ch8.adb, exp_ch3.adb: Minor reformatting.
4238 2014-01-22  Thomas Quinot  <quinot@adacore.com>
4240         * sem_ch3.adb (Analyze_Object_Declaration): For a constant
4241         declaration initialized with a function call, whose type
4242         has variable size, need to remove side effects so that the
4243         initialization expression becomes a dereference of a temporary
4244         reference to the function result.
4246 2014-01-22  Yannick Moy  <moy@adacore.com>
4248         * errout.adb (Initialize): Remove trick to add dummy entry
4249         in Warnings table.
4250         * erroutc.adb (Set_Warnings_Mode_Off,
4251         Set_Warnings_Mode_On): Do nothing if warnings are suppressed by
4252         command line switch.
4253         * opt.ads (Warning_Mode): Document behavior
4254         wrt pragma Warnings, in normal mode and in GNATprove_Mode.
4256 2014-01-22  Robert Dewar  <dewar@adacore.com>
4258         * sem_ch3.adb, errout.adb, erroutc.adb: Minor reformatting.
4260 2014-01-22  Robert Dewar  <dewar@adacore.com>
4262         * sem_ch13.adb (Check_Pool_Size_Clash): New procedure
4263         (Analyze_Attribute_Definition_Clause, case Storage_Pool): call
4264         Check_Pool_Size_Clash (Analyze_Attribute_Definition_Clause,
4265         case Storage_Size): call Check_Pool_Size_Clash.
4267 2014-01-22  Robert Dewar  <dewar@adacore.com>
4269         * sem_ch3.adb, exp_util.adb, sem_dim.adb, sem_elab.adb, sem_ch8.adb,
4270         sem_eval.ads: Minor reformatting.
4272 2014-01-22  Thomas Quinot  <quinot@adacore.com>
4274         * sem_eval.adb (Compile_Time_Known_Bounds): Return False for
4275         Any_Composite to prevent cascaded errors.
4277 2014-01-22  Yannick Moy  <moy@adacore.com>
4279         * errout.adb (Initialize): Do not insert special entry in Warnings
4280         table in GNATprove_Mode.
4281         * erroutc.adb (Set_Warnings_Mode_On): Add info in Warnings table in
4282         GNATprove_Mode.
4283         * gnat1drv.adb (Adjust_Global_Switches): Do not suppress frontend
4284         warnings anymore.
4286 2014-01-22  Robert Dewar  <dewar@adacore.com>
4288         * sem_prag.adb (Analyze_Initializes_In_Decl_Part): Handle null
4289         initializes case.
4291 2014-01-22  Robert Dewar  <dewar@adacore.com>
4293         * snames.ads-tmpl: Update header.
4295 2014-01-22  Thomas Quinot  <quinot@adacore.com>
4297         * exp_util.adb (Insert_Actions): When inserting actions on a
4298         short circuit operator that has already been analyzed, do not park
4299         actions in node; instead introduce an N_Expression_With_Actions
4300         and insert actions immediately.
4301         Add guard for unexpected case of climbing up through statement
4302         in Actions list of an N_Expression_With_Actions.
4303         * sem_elab.adb (Insert_Elab_Check): Remove complex
4304         specialized circuitry for the case where the context is already
4305         analyzed, as it is not needed and introduces irregularities in
4306         finalization. Instead rely on the above change to Insert_Actions
4307         to ensure that late insertion on short circuit operators works
4308         as expected.
4310 2014-01-22  Ed Schonberg  <schonberg@adacore.com>
4312         * sem_ch4.adb (Operator_Check): Improve error message when an
4313         operand of concatenation is an access type.
4315 2014-01-22  Thomas Quinot  <quinot@adacore.com>
4317         * sem_dim.adb (Analyze_Dimension_Identifier): Add guard against
4318         cascaded error.
4320 2014-01-22  Ed Schonberg  <schonberg@adacore.com>
4322         * sem_ch8.adb (Find_Selected_Component): Handle properly the case
4323         of an expanded name in a proper body, whose prefix is a package
4324         in the context of the proper body, when there is a homonym of
4325         the package declared in the parent unit.
4327 2014-01-22  Robert Dewar  <dewar@adacore.com>
4329         * sem_warn.adb (Check_Use_Clause): Don't give no entities used
4330         msg if errors found.
4331         (Check_One_Unit): Same change.
4333 2014-01-22  Robert Dewar  <dewar@adacore.com>
4335         * ug_words: Add missing/wrong entries for VMS warning switches.
4336         * sem_prag.adb (Check_Duplicate_Pragma): Avoid flagging parent type.
4338 2014-01-22  Jerome Guitton  <guitton@adacore.com>
4340         * mlib-tgt-specific-vxworks.adb (Get_Target_Suffix): Replace xscale by
4341         arm.
4343 2014-01-22  Robert Dewar  <dewar@adacore.com>
4345         * gnat_rm.texi, gnat_ugn.texi: Document passive task optimization
4347 2014-01-22  Eric Botcazou  <ebotcazou@adacore.com>
4349         * gcc-interface/Makefile.in: Minor fixes.
4351 2014-01-21  Robert Dewar  <dewar@adacore.com>
4353         * par-ch4.adb (P_If_Expression): Rewritten to improve error recovery.
4354         * par-ch5.adb (P_Condition): New version with expression prescanned.
4355         * par.adb (P_Condition): New version with expression prescanned.
4357 2014-01-21  Robert Dewar  <dewar@adacore.com>
4359         * gnat_rm.texi: Document that Allow_Integer_Address is ignored
4360         if Address is not a private type.
4361         * sem_prag.adb (Analyze_Pragma, case Allow_Integer_Address):
4362         Ignore pragma if System.Address is not a private type.
4364 2014-01-21  Arnaud Charlet  <charlet@adacore.com>
4366         * namet.ads (Name_Len): Initialize to 0 to avoid accessing an
4367         uninitialized value.
4369 2014-01-21  Thomas Quinot  <quinot@adacore.com>
4371         * gnat_rm.texi (Scalar_Storage_Order): Update documentation.
4373 2014-01-21  Ed Schonberg  <schonberg@adacore.com>
4375         * sem_ch12.adb (Set_Instance_Env): In Ada 2012 mode, preserve
4376         the value of Assertions_Enabled flag when compiling an instance of
4377         an internal unit. This facilitates the use of pre/postconditions
4378         in generic internal units, such as the new elementary function
4379         libraries.
4381 2014-01-21  Robert Dewar  <dewar@adacore.com>
4383         * exp_aggr.adb: Minor reformatting.
4384         * sem_attr.adb: Minor reformatting.
4385         * sem_res.adb: Minor comment addition.
4386         * einfo.adb: Minor comment updates.
4387         * freeze.adb: Minor reformatting and code reorganization.
4389 2014-01-21  Ed Schonberg  <schonberg@adacore.com>
4391         * par-ch4.adb (P_If_Expression): Handle more gracefully an
4392         elsif clause that does not have an else part.
4394 2014-01-21  Robert Dewar  <dewar@adacore.com>
4396         * checks.adb, sem_util.ads, sem_ch4.adb: Minor reformatting.
4397         * gcc-interface/Makefile.in: clean up target pairs.
4399 2014-01-21  Pascal Obry  <obry@adacore.com>
4401         * projects.texi: Minor typo fix.
4403 2014-01-21  Thomas Quinot  <quinot@adacore.com>
4405         * freeze.adb (Check_Component_Storage_Order): If a record type
4406         has an explicit Scalar_Storage_Order attribute definition clause,
4407         reject any component that itself is of a composite type and does
4408         not have one.
4410 2014-01-21  Ed Schonberg  <schonberg@adacore.com>
4412         * sem_ch10.adb (Generate_Parent_Reference): Make public so it
4413         can be used to generate proper cross-reference information for
4414         the parent units of proper bodies.
4416 2014-01-21  Thomas Quinot  <quinot@adacore.com>
4418         * exp_pakd.adb (Expand_Packed_Element_Set,
4419         Expand_Packed_Element_Reference): No byte swapping required in
4420         the front-end for the case of a reverse storage order array,
4421         as this is now handled uniformly in the back-end.  However we
4422         still need to swap back an extracted element if it is itself a
4423         nested composite with reverse storage order.
4425 2014-01-21  Hristian Kirtchev  <kirtchev@adacore.com>
4427         * sem_prag.adb (Analyze_External_Property): Add processing for "others".
4428         (Analyze_Pragma): Update the grammar of pragma Abstract_State to
4429         include "others".
4431 2014-01-21  Arnaud Charlet  <charlet@adacore.com>
4433         * gnat_ugn.texi: Minor updates.
4435 2014-01-21  Thomas Quinot  <quinot@adacore.com>
4437         * exp_pakd.adb: Update comment, minor reformatting.
4439 2014-01-21  Hristian Kirtchev  <kirtchev@adacore.com>
4441         * sem_ch3.adb (Analyze_Variable_Contract): Trigger the volatile
4442         object check when SPARK_Mode is on.
4443         * sem_ch6.adb (Process_Formals): Trigger the volatile object
4444         check when SPARK_Mode is on.
4445         * sem_ch12.adb (Instantiate_Object): Trigger the volatile object
4446         check when SPARK_Mode is on.
4447         * sem_ch13.adb (Analyze_Aspect_Specifications): Insert the
4448         corresponding pragma of aspect SPARK_Mode in the visible
4449         declarations of a package declaration.
4450         * sem_prag.adb (Analyze_Pragma): Trigger the volatile object
4451         check when SPARK_Mode is on.
4452         * sem_res.adb (Resolve_Actuals): Trigger the volatile object
4453         check when SPARK_Mode is on.
4454         (Resolve_Entity_Name): Trigger
4455         the volatile object check when SPARK_Mode is on.
4457 2014-01-21  Robert Dewar  <dewar@adacore.com>
4459         * sem_ch3.adb, sem_prag.adb, sem_prag.ads, sem_ch12.adb, sem_res.adb,
4460         sem_ch6.adb, a-except-2005.adb: Minor reformatting.
4462 2014-01-21  Ed Schonberg  <schonberg@adacore.com>
4464         * exp_ch3.adb (Expand_N_Object_Declaration): When a class-wide
4465         object is declared, it is rewritten as a renaming of an dynamic
4466         expression that wraps the initial value.  The renaming declaration
4467         is first given an internal name, to prevent collisions with the
4468         entity already declared, and then the name is modified to reflect
4469         the original one. the modification of the name must preserve
4470         the source location of the original, to prevent spurious errors
4471         when compiling with style checks if the declaration involves
4472         more than one entity.
4474 2014-01-21  Hristian Kirtchev  <kirtchev@adacore.com>
4476         * aspects.adb Add entries for Async_Readers, Async_Writers,
4477         Effective_Reads and Effective_Writes in table Canonical_Aspect.
4478         * aspects.ads Add entries for Async_Readers, Async_Writers,
4479         Effective_Reads and Effective_Writes in tables Aspect_Id,
4480         Aspect_Names, Aspect_Delay and Implementation_Defined_Aspect.
4481         * atree.adb (Ekind_In): New version with 8 parameters.
4482         (Node34): New routine.
4483         (Set_Node34): New routine.
4484         * atree.ads (Ekind_In): New version with 8 parameters.
4485         (Node34): New routine.
4486         (Set_Node34): New routine.
4487         * einfo.adb Contract is now Node34.
4488         (Contract): Update the assertion and node usage.
4489         (Get_Pragma): Include pragmas Async_Readers, Async_Writers,
4490         Effective_Reads and Effective_Writes.
4491         (Set_Contract): Update the assertion and node usage.
4492         (Write_Field24_Name): Remove the output for a contract.
4493         (Write_Field34_Name): Add output for a contract.
4494         * einfo.ads Contract is now Node34. Update the comment on
4495         attribute usage and related node structures.
4496         (Get_Pragma): Update the comment on usage.
4497         * par-prag.adb (Prag): Pragmas Async_Readers, Async_Writers,
4498         Effective_Reads and Effective_Writes do not require special
4499         processing by the parser.
4500         * sem_ch3.adb (Analyze_Variable_Contract): New routine.
4501         (Analyze_Declarations): Analyze the contract of a variable at
4502         the end of the declarative region.
4503         (Analyze_Object_Declaration): Create a contract for a variable.
4504         * sem_ch6.adb (Analyze_Subprogram_Contract): Update the retrieval
4505         of classification pragmas.
4506         (Process_Formals): Detect an illegal
4507         use of a volatile object as a formal in a function.
4508         * sem_ch12.adb (Instantiate_Object): Detect an illegal use of
4509         a volatile object as an actual in generic instantiation.
4510         * sem_prag.adb Add entries for Async_Readers, Async_Writers,
4511         Effective_Reads and Effective_Writes in table Sig_Flags.
4512         (Analyze_External_State_In_Decl_Part): New routine.
4513         (Analyze_Global_Item): Detect an illegal use of a volatile object
4514         as a global item of a function.
4515         (Analyze_Pragma): Reimplement
4516         pragma Abstract_State. Add support for pragmas Async_Readers,
4517         Async_Writers, Effective_Reads and Effective_Writes.
4518         (Check_External_Properties): New routine.
4519         * sem_prag.ads (Analyze_External_State_In_Decl_Part): New routine.
4520         (Check_External_Properties): New routine.
4521         * sem_res.adb (Resolve_Actuals): Detect an illegal use of a
4522         volatile object as an actual in a call.
4523         (Resolve_Entity_Name):
4524         Add local variables Par, Prev and Usage_OK. Detect illegal
4525         contexts of volatile objects.
4526         * sem_util.adb (Add_Contract_Item): Add support for
4527         pragmas associated with the contract of a variable.
4528         (Async_Readers_Enabled): New routine.
4529         (Async_Writers_Enabled): New routine.
4530         (Effective_Reads_Enabled): New routine.
4531         (Effective_Writes_Enabled): New routine.
4532         (Has_Enabled_Property):
4533         New routine.
4534         (Is_Unchecked_Conversion_Instance): New routine.
4535         (Is_Volatile_Object): Add support for entities that may denote
4536         a volatile object.
4537         * sem_util.ads (Add_Contract_Item): Update the
4538         comment on usage.
4539         (Async_Readers_Enabled): New routine.
4540         (Async_Writers_Enabled): New routine.
4541         (Effective_Reads_Enabled): New routine.
4542         (Effective_Writes_Enabled): New routine.
4543         (Is_Unchecked_Conversion_Instance): New routine.
4544         * sinfo.ads Update the comment on the structure of N_Contract.
4545         * snames.ads-tmpl Add predefined names for Async_Readers,
4546         Async_Writers, Effective_Reads and Effective_Writes. Add
4547         pragma ids for Async_Readers, Async_Writers, Effective_Reads
4548         and Effective_Writes.
4550 2014-01-21  Robert Dewar  <dewar@adacore.com>
4552         * exp_ch4.adb (Eval_Op_Expon): Use CRT_Safe_Compile_Time_Known_Value
4553         * sem_eval.adb (Compile_Time_Known_Value): Remove special
4554         handling of CRT mode (CRT_Safe_Compile_Time_Known_Value): New
4555         function (Eval_Op_Expon): Add CRT_Safe in call to Test_Foldable
4556         (Test_Foldable): Add CRT_Safe parameter
4557         * sem_eval.ads (Compile_Time_Known_Value): Remove special
4558         handling of CRT mode.
4559         (CRT_Safe_Compile_Time_Known_Value): New function.
4561 2014-01-21  Robert Dewar  <dewar@adacore.com>
4563         * sem_prag.adb (Analyze_Pragma, case SPARK_Mode): Fix problem
4564         with pragma or aspect that applies to package spec or subprogram
4565         spec.
4567 2014-01-21  Robert Dewar  <dewar@adacore.com>
4569         * exp_aggr.adb: Minor reformatting.
4571 2014-01-21  Johannes Kanig  <kanig@adacore.com>
4573         * gnat1drv.adb (Gnat1drv) remove obsolete reference to -gnatd.H.
4575 2014-01-21  Bob Duff  <duff@adacore.com>
4577         * gnat_ugn.texi: Document the "checks" attribute in gnat2xml.
4579 2014-01-21  Steve Baird  <baird@adacore.com>
4581         * gnat_rm.texi: Improve description of SPARK_Mode pragma.
4583 2014-01-21  Vincent Celier  <celier@adacore.com>
4585         * prj-part.adb (Parse_Single_Project): Accept to extend a project
4586         if it has only be imported by an project being extended. When a
4587         project that has only been imported by a project being extended
4588         is imported by another project that is not being extended,
4589         reset the previous indication, so that it will be an error if
4590         this project is extended later.
4591         * prj-tree.adb (Create_Project): Include component From_Extended
4592         in table Projects_HT
4593         * prj-tree.ads (Project_Name_And_Node): New Boolean component
4594         From_Extended
4596 2014-01-21  Robert Dewar  <dewar@adacore.com>
4598         * atree.ads, atree.adb: Add Node33 and Set_Node33.
4599         * einfo.ads, einfo.adb (SPARK_Pragma): New field (SPARK_Aux_Pragma):
4600         New field (SPARK_Pragma_Inherited): New flag
4601         (SPARK_Aux_Pragma_Inherited): New flag (SPARK_Mode_Pragmas):
4602         Removed.
4603         * lib.ads, lib.adb: Remove SPARK_Mode_Pragma, no longer used.
4604         * opt.ads (SPARK_Mode_Pragma): New global variable.
4605         * sem.ads: Add Save_SPARK_Mode_Pragma field to Scope_Stack_Entry.
4606         * sem_ch3.adb: Use new SPARK_Mode data structures.
4607         * sem_ch6.adb: Set SPARK_Mode fields in subprogram specs and bodies.
4608         * sem_ch7.adb: Set SPARK_Mode fields in package spec and body entities.
4609         * sem_ch8.adb (Push_Scope): Save SPARK_Mode_Pragma.
4610         (Pop_Scope): Restore SPARK_Mode_Pragma.
4611         * sem_prag.adb (Analyze_Pragma, case SPARK_Mode): Rewrite for
4612         new data structures.
4614 2014-01-21  Arnaud Charlet  <charlet@adacore.com>
4616         * back_end.adb: Undo previous change, not needed. Minor reformatting.
4618 2014-01-21  Thomas Quinot  <quinot@adacore.com>
4620         * exp_ch5.adb: Fix comment.
4621         * switch-c.adb: Minor comment update.
4622         * exp_ch3.adb: Minor reformatting.
4624 2014-01-21  Arnaud Charlet  <charlet@adacore.com>
4626         * back_end.adb (Scan_Compiler_Arguments): Do not store object
4627         filename in gnatprove mode.
4629 2014-01-21  Thomas Quinot  <quinot@adacore.com>
4631         * sinfo.ads (No_Ctrl_Actions): Clarify documentation (flag also
4632         suppresses usage of primitive _assign for tagged types).
4633         * exp_aggr.adb (Build_Array_Aggr_Code.Gen_Assign): Set
4634         No_Ctrl_Actions for a tagged type that does not require
4635         finalization, as we want to disable usage of _assign (which
4636         may cause undesirable discriminant checks on an uninitialized,
4637         invalid target).
4639 2014-01-21  Ed Schonberg  <schonberg@adacore.com>
4641         * sem_prag.adb: Reject invariant'class on completion.
4643 2014-01-21  Javier Miranda  <miranda@adacore.com>
4645         * exp_ch3.adb (Build_Init_Procedure): For
4646         derivations of interfaces, do not move the the initialization
4647         of the _parent field since such assignment is not generated.
4649 2014-01-21  Ed Schonberg  <schonberg@adacore.com>
4651         * sem_res.adb (Rewrite_Renamed_Operator): Do not replace entity
4652         with the operator it renames if we are within an expression of
4653         a pre/postcondition, because the expression will be reanalyzed
4654         at a later point, and the analysis of the renaming may affect
4655         the visibility of the operator when in an instance.
4657 2014-01-21  Robert Dewar  <dewar@adacore.com>
4659         * sinfo.ads, sinfo.adb: Change Do_Discriminant_Check to use new Flag1.
4660         Add this flag to type conversion nodes and assignment nodes.
4661         * treepr.adb: Deal properly with Flag 1,2,3.
4662         * treeprs.adt: Minor comment update.
4664 2014-01-21  Robert Dewar  <dewar@adacore.com>
4666         * sem_eval.adb (Compile_Time_Known_Value): Add Ignore_CRT
4667         parameter.
4668         * sem_eval.ads (Compile_Time_Known_Value): Add Ignore_CRT
4669         parameter, completely rewrite spec.
4671 2014-01-21  Ed Schonberg  <schonberg@adacore.com>
4673         * sem_ch10.adb (Install_Withed_Unit): If the unit is a subprogram
4674         instance that is inlined, it may have been rewritten as a wrapper
4675         package. In that case the unit that must be made visible is the
4676         related instance of the package.
4678 2014-01-21  Arnaud Charlet  <charlet@adacore.com>
4680         * exp_ch9.adb (Expand_N_Selective_Accept.Add_Accept): Refine
4681         previous change in codepeer mode.
4683 2014-01-21  Arnaud Charlet  <charlet@adacore.com>
4685         * exp_ch9.adb (Expand_N_Selective_Accept.Add_Accept): Always add
4686         call to Abort_Undefer, as expected by the runtime.
4687         * s-tasren.adb (Local_Complete_Rendezvous): Replace
4688         Defer_Abort_Nestable by Defer_Abort, since we do not expect abort to be
4689         deferred at this point. Update comments.
4691 2014-01-21  Thomas Quinot  <quinot@adacore.com>
4693         * exp_ch4.adb, exp_ch5.adb, checks.adb: Minor reformatting.
4695 2014-01-21  Arnaud Charlet  <charlet@adacore.com>
4697         * switch-c.adb, usage.adb, gnat_ugn.texi: Mark -gnates as internal,
4698         remove from doc.
4700 2014-01-21  Robert Dewar  <dewar@adacore.com>
4702         * switch-c.adb, usage.adb, atree.adb, atree.ads: Minor reformatting.
4704 2014-01-21  Thomas Quinot  <quinot@adacore.com>
4706         * atree.adb, atree.ads (Num_Extension_Nodes): Switch to Node_Id, since
4707         this is value is used in Node_Id arithmetic operations.
4708         (Copy_Node, Exchange_Entities): Use loops indexed by Num_Extension_Nodes
4709         instead of hard-coded unrolled code.
4711 2014-01-21  Yannick Moy  <moy@adacore.com>
4713         * gnat1drv.adb: Minor code cleanup, removing useless code.
4715 2014-01-21  Arnaud Charlet  <charlet@adacore.com>
4717         * opt.ads (SPARK_Switches_File_Name): New.
4718         * switch-c.adb (Scan_Front_End_Switches): Add handling of -gnates=xxx *
4719         * usage.adb (Usage): Document -gnates, in gnatprove mode only.
4720         * gnat_ugn.texi: Document -gnates.
4722 2014-01-21  Yannick Moy  <moy@adacore.com>
4724         * errout.adb (Special_Msg_Delete): Update comment. Remove
4725         special case for GNATprove which should not ignore mismatch
4726         in sizes for representation clauses.
4727         * sem_prag.adb (Analyze_Pragma): Remove special case for GNATprove
4728         which should not ignore pragma Pack.
4730 2014-01-21  Ed Schonberg  <schonberg@adacore.com>
4732         * sem_ch4.adb: Code clean up.
4734 2014-01-21  Steve Baird  <baird@adacore.com>
4736         * gnat_rm.texi: Improve GNAT RM description of SPARK_Mode pragma.
4738 2014-01-21  Robert Dewar  <dewar@adacore.com>
4740         * gcc-interface/gigi.h: Get Flags array address.
4741         * gcc-interface/trans.c: Acquire Flags array address.
4742         * atree.adb: Add support for Flags array and Flag0,1,2,3.
4743         * atree.ads: Add support for Flags array and Flag0,1,2,3.
4744         * atree.h: Add support for Flags array and Flag0,1,2,3.
4745         * back_end.adb: Pass Flags array address to gigi.
4747 2014-01-21  Ed Schonberg  <schonberg@adacore.com>
4749         * sem_ch8.adb (Attribute_Renaming): Transfer original attribute
4750         reference to generated body so that legality checks on stream
4751         attributes are properly applied. If type is tagged and already
4752         frozen, insert generated body at the point of the renaming
4753         declaration.
4755 2014-01-21  Ed Schonberg  <schonberg@adacore.com>
4757         * sem_ch12.adb: Code clean up.
4758         * sem_ch8.adb: Minor reformatting
4760 2014-01-20  Robert Dewar  <dewar@adacore.com>
4762         * checks.adb: Check SPARK_Mode instead of GNATProve_Mode for
4763         converting warnings on inevitable exceptions to errors.
4764         * exp_ch4.adb: Check SPARK_Mode instead of GNATProve_Mode for
4765         converting warnings on inevitable exceptions to errors.
4766         * opt.adb (SPARK_Mode_Config): Handled like other config flags
4767         * opt.ads (SPARK_Mode_Type): Moved here from types (renamed from
4768         SPARK_Mode_Id) (SPARK_Mode_Type): Add pragma Ordered, remove
4769         SPARK_ from names (SPARK_Mode): New flag (SPARK_Mode_Config):
4770         New flag (Config_Switches_Type): Add SPARK_Mode field
4771         * sem.adb: Minor code reorganization (remove unnecessary with)
4772         * sem.ads (Scope_Stack_Entry): Add Save_SPARK_Mode field
4773         * sem_aggr.adb: Check SPARK_Mode instead of GNATProve_Mode for
4774         converting warnings on inevitable exceptions to errors.
4775         * sem_attr.adb: Check SPARK_Mode instead of GNATProve_Mode for
4776         converting warnings on inevitable exceptions to errors.
4777         * sem_ch3.adb: Check SPARK_Mode instead of GNATProve_Mode for
4778         converting warnings on inevitable exceptions to errors.
4779         * sem_ch4.adb: Check SPARK_Mode instead of GNATProve_Mode for
4780         converting warnings on inevitable exceptions to errors.
4781         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Reset SPARK_Mode
4782         from spec if needed
4783         * sem_ch7.adb (Analyze_Package_Body_Helper): Reset SPARK_Mode
4784         from spec if needed
4785         * sem_ch8.adb (Push_Scope): Save SPARK_Mode (Pop_Scope):
4786         Restore SPARK_Mode
4787         * sem_elab.adb: Check SPARK_Mode instead of GNATProve_Mode for
4788         converting warnings on inevitable exceptions to errors.
4789         * sem_prag.adb (Get_SPARK_Mode_From_Pragma): New function
4790         (Get_SPARK_Mode_Id): Removed (Get_SPARK_Mode_Type): New name
4791         of Get_SPARK_Mode_Id
4792         * sem_prag.ads (Get_SPARK_Mode_From_Pragma): New function
4793         * sem_res.adb: Check SPARK_Mode instead of GNATProve_Mode for
4794         converting warnings on inevitable exceptions to errors.
4795         * sem_util.adb: Check SPARK_Mode instead of GNATProve_Mode for
4796         converting warnings on inevitable exceptions to errors.
4797         * types.ads (SPARK_Mode_Id): Moved to opt.ads and renamed
4798         SPARK_Mode_Type
4800 2014-01-20  Ed Schonberg  <schonberg@adacore.com>
4802         * sem_ch13.adb: Add semantic information to rewritten type
4803         reference.
4805 2014-01-20  Ed Schonberg  <schonberg@adacore.com>
4807         * exp_ch5.adb (Expand_N_Assignment_Statement): If both sides
4808         are of a type with unknown discriminants, convert both to the
4809         underlying view of the type, so that the proper constraint check
4810         can be applied to the right-hand side.
4812 2014-01-20  Robert Dewar  <dewar@adacore.com>
4814         * atree.adb (Copy_Node): Fix failure to copy last component
4815         (Exchange_Entities): Fix failure to exchange last entity
4817 2014-01-20  Ed Schonberg  <schonberg@adacore.com>
4819         * sem_ch12.adb: Code clean up.
4821 2014-01-20  Robert Dewar  <dewar@adacore.com>
4823         * gnat_rm.texi, sem_ch4.adb: Minor reformatting.
4825 2014-01-20  Ed Schonberg  <schonberg@adacore.com>
4827         * sem_ch4.adb (Analyze_Quantified_Expression): If after
4828         pre-analysis  the loop parameter specification has been
4829         rewritten as a iterator specification, propagate the change to
4830         the quantified expression, for ASIS navigtion needs.
4832 2014-01-20  Vincent Celier  <celier@adacore.com>
4834         * par-ch10.adb: Minor error message change: escape [ and ].
4836 2014-01-20  Robert Dewar  <dewar@adacore.com>
4838         * checks.adb: Make warnings on exceptions into errors in GNATprove mode.
4839         * errout.adb: Implement [ and ] insertion characters.
4840         * errout.ads: Document new [ and ] insertion characters.
4841         * sem_ch12.adb, restrict.adb, frontend.adb, exp_ch7.adb: Minor
4842         addition of ??? comment.
4843         * lib-xref.adb, exp_util.adb, gnat1drv.adb: Minor reformatting
4844         * exp_ch4.adb, sem_ch3.adb, sem_ch4.adb, sem_ch6.adb, sem_elab.adb,
4845         sem_eval.adb, sem_res.adb, sem_util.adb, sem_attr.adb, sem_aggr.adb:
4846         Make warnings on exceptions into errors in GNATprove mode.
4847         * sem_dim.adb: Minor reformatting throughout Quote [ and ]
4848         in error messages.
4850 2014-01-20  Ed Schonberg  <schonberg@adacore.com>
4852         * sem_ch13.adb: Code clean up.
4854 2014-01-20  Robert Dewar  <dewar@adacore.com>
4856         * errout.ads, errout.adb: Implement >? >x? >X? sequences in error
4857         messages.
4858         * sem_ch6.adb (Check_Statement_Sequence): Missing return is an
4859         error in GNATprove mode.
4861 2014-01-20  Ed Schonberg  <schonberg@adacore.com>
4863         * par-ch4.adb (Is_Parameterless_Attribute): The Ada2012 attribute
4864         reference 'Old takes no parameters, and thus can appear as a
4865         prefix of a slice.
4867 2014-01-20  Eric Botcazou  <ebotcazou@adacore.com>
4869         * exp_aggr.adb: Fix minor typos.
4871 2014-01-20  Ed Schonberg  <schonberg@adacore.com>
4873         * sem_attr.adb (Analyze_Attribute, case 'Constrained): In an
4874         instance the attribute is legal, and its value is determined
4875         statically if the type has no discriminants. This choice is
4876         more useful than rechecking the legality rule in the instance,
4877         is consistent with older usage, and is also consistent with all
4878         existing tests.
4880 2014-01-20  Arnaud Charlet  <charlet@adacore.com>
4882         * sem_cat.adb (Validate_Static_Object_Name): Change error into
4883         warning in Relaxed_Semantic_Mode.
4885 2014-01-20  Ed Schonberg  <schonberg@adacore.com>
4887         * sem_attr.adb: Code and comments cleanup.
4889 2014-01-20  Yannick Moy  <moy@adacore.com>
4891         * debug.adb Free debug flags -gnatd.D, -gnatd.G and -gnatd.V *
4892         * errout.adb (Compilation_Errors): Remove special handling in
4893         GNATprove mode.
4894         * gnat1drv.adb (Adjust_Global_Switches): Remove handling of the
4895         removed debug flags.
4896         * gnat_rm.texi: Initial documentation for Abstract_State, Depends,
4897         Global, Initial_Condition, Initializes and Refined_State pragmas and
4898         aspects.
4899         * opt.ads (Frame_Condition_Mode, Formal_Extensions,
4900         SPARK_Strict_Mode): Remove global flags.
4901         * sem_ch3.adb (Analyze_Object_Declaration): Check of no hidden state
4902         always performed now, on packages declaring a null state.
4903         (Signed_Integer_Type_Declaration): Remove ill-designed attempt
4904         at providing pedantic mode for bounds of integer types.
4905         * sem_ch4.adb (Analyze_Quantified_Expression): Warning on suspicious
4906         "some" quantified expression now issued under control of -gnatw.t,
4907         like the other warning on unused bound variable.
4908         * sem_prag.adb (Check_Precondition_Postcondition): Remove useless test
4909         on removed flag.
4910         (Analyze_Pragma): Remove tests for SPARK 2014
4911         pragmas, not officially allowed by GNAT.
4913 2014-01-20  Hristian Kirtchev  <kirtchev@adacore.com>
4915         * sem_prag.adb (Analyze_Pragma): Ensure that
4916         the sole argument of pragmas Abstract_State, Contract_Cases,
4917         Depends, Global and Initializes in in aggregate form.
4918         (Analyze_Refined_Pragma): Ensure that the sole argument of
4919         pragmas Refined_Depends, Refined_Global and Refined_State is in
4920         aggregate form.
4921         (Ensure_Aggregate_Form): New routine.
4923 2014-01-20  Doug Rupp  <rupp@adacore.com>
4925         * sem_attr.adb (Analyze_Attribute): case
4926         Attribute_Constrained => treat all prefixes as legal for Declib
4927         compatibility.
4929 2014-01-20  Hristian Kirtchev  <kirtchev@adacore.com>
4931         * sem_prag.adb (Check_Mode): Reimplement the routine.
4932         (Find_Mode): New routine.
4934 2014-01-20  Robert Dewar  <dewar@adacore.com>
4936         * sem_ch4.adb (Operator_Check): Handle additional
4937         Allow_Integer_Address cases.
4939 2014-01-20  Robert Dewar  <dewar@adacore.com>
4941         * gnat_rm.texi (Allow_Integer_Address): Remove note about not
4942         allowed if address is non-private, no longer true.
4943         * sem_prag.adb (Analyze_Pragma, case Allow_Integer_Address):
4944         Remove check for address being private, causes difficulty when
4945         pragma used in gnat.adc file and is not needed, since we guard
4946         this in Address_Integer_Convert_OK.
4947         * exp_ch7.adb: Minor reformatting.
4948         * sem_ch4.adb: Handle operator operands in Allow_Integer_Address mode.
4950 2014-01-20  Robert Dewar  <dewar@adacore.com>
4952         * checks.adb (Apply_Range_Check): Remove gnatprove special
4953         casing of exponentiation.
4954         * sem_res.adb (Resolve_Op_Expon): Apply range check to right
4955         operand for integer case to check range against Natural.
4957 2014-01-20  Robert Dewar  <dewar@adacore.com>
4959         * s-tataat.adb: Minor reformatting.
4961 2014-01-20  Robert Dewar  <dewar@adacore.com>
4963         * einfo.adb (Is_Descendent_Of_Address): Now applies to all
4964         entities, and also fix documentation to remove mention of visible
4965         integer type, since this is not what the implementation does.
4966         * einfo.ads (Is_Descendent_Of_Address): Now applies to all
4967         entities, and also fix documentation to remove mention of visible
4968         integer type, since this is not what the implementation does.
4969         * gnat_rm.texi: Minor clarification of Allow_Integer_Address
4970         function.
4971         * sem_ch4.adb (Analyze_One_Call): Handle Allow_Integer_Address
4972         case for parameter type check.
4973         * sem_res.adb (Resolve): Use new function
4974         Address_Integer_Convert_OK.
4975         * sem_type.adb: Minor code reorganization (use Ekind_In) Minor
4976         reformatting throughout.
4977         * sem_util.adb (Address_Integer_Convert_OK): New function.
4978         * sem_util.ads: Minor reformatting (put specs in alpha order)
4979         (Address_Integer_Convert_OK): New function.
4981 2014-01-20  Thomas Quinot  <quinot@adacore.com>
4983         * exp_ch7.adb (Wrap_Transient_Expression):
4984         Insertion extra conditional expression only if
4985         Opt.Suppress_Control_Flow_Optimizations is set.
4987 2014-01-20  Arnaud Charlet  <charlet@adacore.com>
4989         * s-tataat.adb (Initialize_Attributes): Abort might already be
4990         deferred in Create_Task.
4992 2014-01-20  Hristian Kirtchev  <kirtchev@adacore.com>
4994         * checks.adb (Apply_Scalar_Range_Check): Flag
4995         the exponent as requiring a range check when the expression is
4996         an exponentiation.
4998 2014-01-20  Fedor Rybin  <frybin@adacore.com>
5000         * gnat_ugn.texi: Documenting --passed-tests option for gnattest.
5002 2014-01-20  Hristian Kirtchev  <kirtchev@adacore.com>
5004         * sem_util.adb (Default_Initialization): New routine.
5005         * sem_util.ads: Add new type Default_Initialization_Kind.
5006         (Default_Initialization): New routine.
5008 2014-01-20  Hristian Kirtchev  <kirtchev@adacore.com>
5010         * sem_prag.adb (Check_Mode): Correct all error
5011         message logic dealing with in/in out parameters that may appear
5012         as inputs or have a self reference.
5014 2014-01-20  Robert Dewar  <dewar@adacore.com>
5016         * exp_ch9.adb, checks.adb, exp_intr.adb: Minor reformatting.
5017         * sem_res.adb (Resolve): Fix error causing infinite loop for
5018         integer used as address. Allow addresses as integers.
5020 2014-01-20  Arnaud Charlet  <charlet@adacore.com>
5022         * s-osinte-linux.ads (struct_sigaction): Fix rep clause.
5024 2014-01-20  Bob Duff  <duff@adacore.com>
5026         * par-ch8.adb (P_Use_Type_Clause): Detect syntax
5027         error when "use all" is not followed by "type".
5029 2014-01-20  Bob Duff  <duff@adacore.com>
5031         * exp_intr.adb (Expand_Unc_Deallocation): Remove warning on abort
5032         followed by free.
5034 2014-01-20  Ed Schonberg  <schonberg@adacore.com>
5036         * checks.adb (Apply_Address_Clause_Check): If there is an
5037         alignment check on the expression in an address clause, and there
5038         is no local exception propagation, add an additional explanatory
5039         message to clarify the cause of previous warning.
5041 2014-01-20  Robert Dewar  <dewar@adacore.com>
5043         * exp_ch7.adb: Minor reformatting.
5044         * opt.ads: Minor comment updates.
5045         * sem.adb: Minor name change Is_Main_Unit =>
5046         Is_Main_Unit_Or_Main_Unit_Spec.
5047         * sem_ch6.adb: Minor reformatting and code reorganization.
5049 2014-01-20  Bob Duff  <duff@adacore.com>
5051         * gnat_ugn.texi: Update gnatpp switches.
5053 2014-01-20  Thomas Quinot  <quinot@adacore.com>
5055         * exp_ch9.adb: Minor comment edit.
5057 2014-01-20  Robert Dewar  <dewar@adacore.com>
5059         * gnat_rm.texi: Document that Allow_Integer_Address is permitted
5060         only if System.Address is a private type.
5061         * opt.ads (Allow_Integer_Address): No longer set by -gnates.
5062         * sem_prag.adb (Analyze_Pragma, case Allow_Integer_Address):
5063         Allowed only if type System.Address is private, since otherwise
5064         it makes no sense.
5065         * sem_res.adb: Fix failure to properly Analyze unchecked
5066         conversions that were introduced by Allow_Integer_Address.
5067         * switch-c.adb: Remove -gnates switch.
5068         * usage.adb: Remove -gnates switch.
5069         * gnat_ugn.texi: Remove documentation of -gnates flag.
5071 2014-01-20  Ed Schonberg  <schonberg@adacore.com>
5073         * sem_ch6.adb (Analyze_Expression_Function): Pre-analyze and
5074         resolve expression to perform proper name capture.
5076 2014-01-20  Ed Schonberg  <schonberg@adacore.com>
5078         * sem.adb (Semantics): When saving/restoring configuration
5079         switches, the spec of a pre- defined unit that is the main unit
5080         must be treated as a predefined unit as well.
5082 2014-01-20  Thomas Quinot  <quinot@adacore.com>
5084         * exp_ch7.adb (Wrap_Transient_Expression): For a Boolean
5085         expression, insert an extra conditional expression when saving
5086         the value of the expression, for the benefit of control flow
5087         graph based coverage analysis.
5088         * exp_ch3.adb: Minor reformatting.
5090 2014-01-20  Robert Dewar  <dewar@adacore.com>
5092         * gnat1drv.adb: Set Allow_Integer_Address in relaxed semantics mode.
5093         * gnat_rm.texi: Document pragma Allow_Integer_Address.
5094         * gnat_ugn.texi: Document pragma Allow_Integer_Address, -gnates.
5095         * opt.ads: New flag Allow_Integer_Address.
5096         * par-prag.adb: Dummy entry for pragma Allow_Integer_Address.
5097         * sem_ch5.adb: Minor reformatting.
5098         * sem_prag.adb: Implement pragma Allow_Integer_Address.
5099         * sem_res.adb (Resolve): Allow integer address value if
5100         switch set.
5101         * sem_util.adb: Minor reformatting.
5102         * snames.ads-tmpl: Add entry for pragma Allow_Integer_Address.
5103         * switch-c.adb: Recognize flag -gnates.
5104         * usage.adb: Document flag -gnates.
5106 2014-01-20  Thomas Quinot  <quinot@adacore.com>
5108         * s-tadeca.adb: Fix minor typos in comment.
5110 2014-01-20  Pascal Obry  <obry@adacore.com>
5112         * s-win32.ads (FreeLibrary): New import.
5114 2014-01-20  Robert Dewar  <dewar@adacore.com>
5116         * sem_res.adb, sem_cat.adb: Minor reformatting.
5117         * sem_ch11.adb (Analyze_Raise_Statement): Only give warning about
5118         assigning to OUT parameters for the current subprogram scope.
5119         * exp_ch4.adb: Minor reformatting.
5121 2014-01-20  Ed Schonberg  <schonberg@adacore.com>
5123         * exp_ch4.adb (Process_Transient_Object,
5124         Find_Enclosing_Contexts): If the top-level if-expression that
5125         generated the transient object is an actual in a call, the proper
5126         Hook_Context is a construct enclosing the call.
5127         * einfo.ads: Indicate that Related_Expression is used to link a
5128         loop variable to the container expression over which the loop
5129         takes place.
5130         (Analyze_Iterator_Specification): Set the Related_Expression of
5131         the loop variable in a container element iterator.
5132         (Note_Possible_Modification): If the variable is the loop
5133         variable in a container element iterator, indicate that the
5134         enclosing container is also modified.
5136 2014-01-20  Hristian Kirtchev  <kirtchev@adacore.com>
5138         * aspects.adb (Move_Or_Merge_Aspects): Reimplemented.
5140 2014-01-20  Robert Dewar  <dewar@adacore.com>
5142         * s-taasde.ads, gnat_ugn.texi, s-tadeca.adb, sem_res.adb, s-tadeca.ads:
5143         Minor reformatting and code clean up.
5145 2014-01-20  Arnaud Charlet  <charlet@adacore.com>
5147         * sem_cat.adb (Validate_Object_Declaration): Relax semantics
5148         of objects of private type if Relaxed_RM_Semantics.
5150 2014-01-20  Claire Dross  <dross@adacore.com>
5152         * a-cofove.ads (Vector): Capacity discriminant
5153         should be in range of the index.
5155 2014-01-20  Thomas Quinot  <quinot@adacore.com>
5157         * a-caldel.ads(To_Duration), s-taasde.ads(Time_Enqueue):
5158         Clarify specs s-tadeca.adb(Enqueue_Calendar): Compensate for
5159         possible difference between epoch of Ada.Calendar clock and Ada
5160         real-time/tasking clock.
5161         * s-taprop-posix.adb: Minor comment fix.
5163 2014-01-20  Doug Rupp  <rupp@adacore.com>
5165         * sysdep.c [vxworks]: Remove Vxworks version noise for RTP.
5167 2014-01-20  Hristian Kirtchev  <kirtchev@adacore.com>
5169         * exp_attr.adb (Expand_N_Attribute_Reference): Generate validity
5170         checks on the prefix of attribute 'Old.
5171         * sem_ch3.adb (Process_Range_Expr_In_Decl): Suppress the
5172         generation of validity checks on a range that belongs to the
5173         iteration scheme of a quantified expression.
5174         * sem_ch5.adb (One_Bound): Suppress the generation of validity
5175         checks on a bound that belongs to the iteration scheme of a
5176         quantified expression, generate the check in all other cases.
5178 2014-01-20  Bob Duff  <duff@adacore.com>
5180         * gnat_ugn.texi: Enable --pp-new by default. Minor reorganization.
5182 2014-01-20  Ed Schonberg  <schonberg@adacore.com>
5184         * sem_res.adb (Resolve): When compiling a predefined unit, ignore
5185         interpretations that do not come from other predefined units,
5186         to prevent spurious ambiguities in the presence of user-defined
5187         operators in the context of (an instance of) a predefined unit.
5189 2014-01-20  Robert Dewar  <dewar@adacore.com>
5191         * gnat_rm.texi: Document that Loop_Variant is included in
5192         Statement_Assertions.
5193         * sem_prag.adb (Check_Kind): Add Loop_Variant to
5194         Statement_Assertions (Check_Applicable_Policy): Add Loop_Variant
5195         to Statement_Assertions.
5197 2014-01-20  Doug Rupp  <rupp@adacore.com>
5199         * sysdep.c (__gnat_is_file_not_found_error) [vxworks6]: Add case
5200         for errno ENOENT from RTP on NFS mounted file system.
5202 2014-01-20  Ed Schonberg  <schonberg@adacore.com>
5204         * sem_util.adb (Check_Function_Writable_Actuals): 1) Do not
5205         examine code that does not come from source. The check does not
5206         apply to code generated for constraint checks, and such code may
5207         generate spurious error messages when compiled with expansion
5208         disabled (as in a generic unit) because side effects may not
5209         have been removed.
5210         2) Make error messages more explicit: indicate the component
5211         of the  construct whose value is indeterminate because of a
5212         call to a function with in-out parameter in another component,
5213         when there is no mandated order of execution between the two
5214         components (actuals, aggregate components, alternatives).
5216 2014-01-20  Robert Dewar  <dewar@adacore.com>
5218         * gnat_rm.texi: Minor cleanup.
5220 2014-01-20  Hristian Kirtchev  <kirtchev@adacore.com>
5222         * sem_attr.adb (Analyze_Attribute): Attributes 'Old and 'Result
5223         can now apply to a refined postcondition.
5224         * sem_ch6.adb (Analyze_Subprogram_Contract): Remove local
5225         variable Result_Seen. Add variables Case_Prag, Post_Prag,
5226         Seen_In_Case and Seen_In_Post. Update the mechanism that detects
5227         whether postconditions and/or constract-cases mention attribute
5228         'Result and introduce a post-state when applied to functions.
5229         (Check_Result_And_Post_State): Removed.
5230         * sem_prag.adb (Analyze_Pragma): Add local variable
5231         Result_Seen. Verify that the expression of pragma Refined_Post
5232         mentions attribute 'Result and introduces a post-state.
5233         * sem_util.ads, sem_util.adb (Check_Result_And_Post_State): New routine.
5235 2014-01-20  Hristian Kirtchev  <kirtchev@adacore.com>
5237         * exp_ch7.adb (Is_Subprogram_Call): New routine.
5238         (Process_Transient_Objects): Make variable Must_Hook global with
5239         respect to all locally declared subprograms. Search the context
5240         for at least one subprogram call.
5241         (Requires_Hooking): Removed.
5243 2014-01-20  Claire Dross  <dross@adacore.com>
5245         * a-cfdlli.ads a-cfhama.ads a-cfhase.ads a-cforma.ads
5246         * a-cforse.ads a-cofove.ads: Add pragma Annotate (GNATprove,
5247         External_Axiomatization);
5249 2014-01-20  Robert Dewar  <dewar@adacore.com>
5251         * sem_attr.adb (Analyze_Attribute, case Loop_Entry): Allow
5252         Loop_Entry in Assert, Assert_And_Cut, and Assume pragmas.
5253         * sem_prag.adb (Analyze_Pragma, case Assert[_And_Cut], Assume):
5254         Allow Loop_Entry to be used in these pragmas if they appear in
5255         an appropriate context.
5256         (Placement_Error): Specialize error
5257         message for pragma Assert[_And_Cut] or pragma Assume containing
5258         Loop_Entry attribute.
5259         * a-exexpr-gcc.adb, sinput.adb: Minor reformatting.
5260         * s-excmac-arm.ads, s-except.ads, s-excmac-gcc.ads: Minor reformatting
5261         and code clean ups.
5263 2014-01-20  Robert Dewar  <dewar@adacore.com>
5265         * gnat1drv.adb: Minor comment update.
5267 2014-01-20  Tristan Gingold  <gingold@adacore.com>
5269         * raise-gcc.c (PERSONALITY_FUNCTION/arm): Remove unused
5270         variables, comment out unused code.
5271         * a-exexpr-gcc.adb: Move declarations to s-excmac-gcc.ads
5272         * s-excmac-gcc.ads: New file, extracted from a-exexpr-gcc.adb
5273         * s-excmac-arm.ads: New file.
5275 2014-01-20  Hristian Kirtchev  <kirtchev@adacore.com>
5277         * exp_ch4.adb (Expand_N_Slice): Remove constant D and variables
5278         Drange and Index_Typ. Remove the circuitry which creates a
5279         range check to compare the index type of the array against the
5280         discrete_range.
5281         * sem_res.adb (Resolve_Slice): Add local variable Dexpr. Update
5282         the circuitry which creates a range check to handle a
5283         discrete_range denoted by a subtype indication.
5285 2014-01-20  Pierre-Marie Derodat  <derodat@adacore.com>
5287         * sinput.adb, sinput.ads (Sloc_Range): Traverse the tree of original
5288         nodes to get the original sloc range.
5290 2014-01-20  Hristian Kirtchev  <kirtchev@adacore.com>
5292         * sem_prag.adb (Analyze_Pragma): Use Defining_Entity to obtain the
5293         entity of a [library level] package.
5295 2014-01-20  Tristan Gingold  <gingold@adacore.com>
5297         * raise-gcc.c (exception_class_eq): New function.
5298         (is_handled_by): Use it to compare exception classes.
5299         (PERSONALITY_STORAGE): Define.  (continue_unwind): New function to
5300         be called to return URC_CONTINUE_UNWIND.
5301         (personality_body): New function, extracted from PERSONALITY_ROUTINE.
5302         (PERSONALITY_ROUTINE): Add an implementation for the ARM unwinder.
5304 2014-01-20  Robert Dewar  <dewar@adacore.com>
5306         * opt.ads: Minor comment update.
5308 2014-01-20  Hristian Kirtchev  <kirtchev@adacore.com>
5310         * exp_ch4.adb (Expand_N_Slice): Relocate some variables and
5311         constants to the "Local variables" area. Add new constant D. Add
5312         new variables Drange and Index_Typ.  Rename Pfx to Rep and Ptp
5313         to Pref_Typ and update all occurrences. Add circuitry to extract
5314         the discrete_range and the index type and build a range check.
5316 2014-01-20  Arnaud Charlet  <charlet@adacore.com>
5318         * gnat1drv.adb (Adjust_Global_Switches): Enable
5319         Treat_Categorization_Errors_As_Warnings when Relaxed_RM_Semantics
5320         is set.
5322 2014-01-20  Thomas Quinot  <quinot@adacore.com>
5324         * sem_ch5.adb, sem_ch4.adb: Minor reformatting.
5326 2014-01-20  Hristian Kirtchev  <kirtchev@adacore.com>
5328         * sem_ch13.adb (Analyze_Aspect_Specifications):
5329         When aspect SPARK_Mode appears on a package body, insert the
5330         generated pragma at the top of the body declarations.
5332 2014-01-20  Robert Dewar  <dewar@adacore.com>
5334         * sem_aggr.adb, exp_prag.adb, sem_aux.adb, sinfo.ads, sem_ch10.adb,
5335         checks.adb, sem_prag.adb, sem_ch12.adb, freeze.adb, g-arrspl.adb,
5336         expander.adb, gnat1drv.adb, exp_ch4.adb, sem_ch6.adb,
5337         sem_ch8.adb, exp_dist.adb: Minor reformatting.
5339 2014-01-20  Yannick Moy  <moy@adacore.com>
5341         * gnat1drv.adb (Gnat1drv): Call Write_ALI with Object=True in GNATprove
5342         mode.
5344 2014-01-20  Pascal Obry  <obry@adacore.com>
5346         * g-arrspl.ads (Slice_Set): New definition (will use a copy on
5347         write scheme).
5348         * g-arrspl.adb: Adapt all routine to this new implementation.
5349         (Set): Copy the Slice_Set definition before reusing it.
5351 2014-01-20  Arnaud Charlet  <charlet@adacore.com>
5353         * sem_prag.adb (Process_Import_Or_Interface): In
5354         Relaxed_RM_Semantics, support old Ada 83 style of pragma Import.
5355         (Analyze_Pragma): Ditto for pragma Export.
5356         * exp_prag.adb (Expand_Pragma_Import_Or_Interface): Handle old pragma
5357         Import style.
5359 2014-01-20  Hristian Kirtchev  <kirtchev@adacore.com>
5361         * einfo.ads: E_Abstract_State is now part of the entities that
5362         can be overloaded. Update type Overloadable_Kind to reflect the
5363         inclusion of abstract states.
5364         * sem_ch6.adb (New_Overloaded_Entity): A function can now
5365         overload an abstract state.
5366         * sem_prag.adb (Analyze_Constituent): Handle the overloading
5367         of states by functions. Use Entity_Of to obtain the entity of
5368         a constituent.  (Analyze_Global_Item): Handle the overloading of
5369         states by functions.
5370         (Analyze_Initialization_Item): Handle the
5371         overloading of states by functions.  Use Entity_Of to obtain the
5372         entity of an item.
5373         (Analyze_Input_Item): Handle the overloading
5374         of states by functions. Use Entity_Of to obtain the entity of an item.
5375         (Analyze_Input_Output): Handle the overloading of states by functions.
5376         (Analyze_Refinement_Clause): Handle the overloading
5377         of states by functions.  Use Entity_Of to obtain the entity of an item.
5378         (Appears_In): Use Entity_Of to obtain the entity of an element.
5379         (Check_Usage): Use Entity_Of to obtain the entity of
5380         an item. Add a guard to prevent a crash due to a previous error.
5381         (Resolve_State): New routine.
5383 2014-01-20  Yannick Moy  <moy@adacore.com>
5385         * spark_xrefs.ads, debug.adb, gnat1drv.adb, errout.adb, errout.ads,
5386         opt.ads: Minor comments updates.
5388 2014-01-20  Hristian Kirtchev  <kirtchev@adacore.com>
5390         * einfo.adb (Non_Limited_View): Applies to abstract states.
5391         (Set_From_Limited_With): Applies to abstract states.
5392         (Set_Non_Limited_View): Applies to abstract states.
5393         (Write_Field17): Output the non-limited view of an abstract state.
5394         * einfo.ads: Update the comment on usage and occurrences in
5395         nodes for attributes From_Limited_With and Non_Limited_View.
5396         * sem_aux.adb (Available_View): This routine can now handle
5397         abstract states.
5398         * sem_aux.ads (Available_View): This routine can now handle
5399         abstract states. Update the comment on usage.
5400         * sem_ch8.adb (Find_Expanded_Name): Handle abstract views
5401         of states and variables.
5402         (In_Pragmas_Depends_Or_Global): New routine.
5403         * sem_ch10.adb (Build_Limited_Views): Implement
5404         abstract (limited) views of variables and states.
5405         (Build_Shadow_Entity): This routine is now a procedure. Add
5406         formal parameter Shadow. Update the comment on usage. Add
5407         context-specific decoration for states and variables.
5408         (Decorate_State): New routine.  (Decorate_Variable): New routine.
5409         (Find_And_Process_States): New routine.
5410         (Process_Declarations): Renamed to Process_Declarations_And_States.
5411         (Process_Declarations_And_States): Add formal parameters
5412         Pack and Create_Abstract_Views. Update the comment on usage.
5413         (Process_States): New routine.
5414         * sem_prag.adb (Check_Dependency_Clause): Handle abstract
5415         views of states and variables. Match the abstract view of a state
5416         against its corresponding non-abstract view.
5417         (Is_Matching_Input):
5418         Handle abstract views of states and variables. Match the abstract
5419         view of a state against its corresponding non-abstract view.
5420         (Process_Global_Item): Handle abstract views of states and
5421         variables.
5423 2014-01-20  Bob Duff  <duff@adacore.com>
5425         * sem_ch10.adb (Expand_With_Clause): Don't
5426         recurse on the prefix if the current with-ed name refers to a
5427         package that renames its own parent, eg "package P.Q renames P;".
5429 2014-01-20  Yannick Moy  <moy@adacore.com>
5431         * exp_spark.adb (Expand_SPARK_Call): Remove procedure.
5432         * opt.adb, opt.ads (Full_Expander_Active): Remove function.
5433         * checks.adb, exp_ch6.adb, exp_ch9.adb, exp_disp.adb, sem_aggr.adb,
5434         * sem_ch10.adb, sem_ch5.adb, sem_ch6.adb, sem_ch8.adb, sem_ch9.adb,
5435         * sem_disp.adb, sem_res.adb Replace Full_Expander_Active by
5436         Expander_Active.
5438 2014-01-20  Yannick Moy  <moy@adacore.com>
5440         * sinfo.ads Update documentation of GNATprove mode.
5442 2014-01-20  Yannick Moy  <moy@adacore.com>
5444         * adabkend.adb, ali-util.adb, errout.adb, exp_ch7.adb,
5445         * exp_dbug.adb, freeze.adb, lib-xref.adb, restrict.adb,
5446         * sem_attr.adb, sem_ch4.adb, sem_ch5.adb, sem_ch6.adb, sem_ch8.adb,
5447         * sem_prag.adb, sem_res.adb, sem_util.adb Rename SPARK_Mode into
5448         GNATprove_Mode.
5449         * sem_ch13.adb: Remove blank.
5450         * exp_spark.adb, exp_spark.ads (Expand_SPARK_Call): Only replace
5451         subprograms by alias for renamings, not for inherited primitive
5452         operations.
5453         * exp_util.adb (Expand_Subtype_From_Expr): Apply the expansion
5454         in GNATprove mode.
5455         (Remove_Side_Effects): Apply the removal in
5456         GNATprove mode, for the full analysis of expressions.
5457         * expander.adb (Expand): Call the light SPARK expansion in GNATprove
5458         mode.
5459         (Expander_Mode_Restore, Expander_Mode_Save_And_Set): Ignore
5460         save/restore actions for Expander_Active flag in GNATprove mode,
5461         similar to what is done in ASIS mode.
5462         * frontend.adb (Frontend): Generic bodies are instantiated in
5463         GNATprove mode.
5464         * gnat1drv.adb (Adjust_Global_Switches): Set operating
5465         mode to Check_Semantics in GNATprove mode, although a light
5466         expansion is still performed.
5467         (Gnat1drv): Set Back_End_Mode to
5468         Declarations_Only in GNATprove mode, and later on special case
5469         the GNATprove mode to continue analysis anyway.
5470         * lib-writ.adb (Write_ALI): Always generate ALI files in
5471         GNATprove mode.
5472         * opt.adb, opt.ads (Full_Expander_Active): Make it equivalent to
5473         Expander_Active.
5474         (SPARK_Mode): Renamed as GNATprove_Mode.
5475         * sem_aggr.adb (Aggregate_Constraint_Checks): Add checks in the
5476         tree in GNATprove_Mode.
5477         * sem_ch12.adb (Analyze_Package_Instantiation): Always instantiate
5478         body in GNATprove mode.
5479         (Need_Subprogram_Instance_Body): Always instantiate body in GNATprove
5480         mode.
5481         * sem_ch3.adb (Constrain_Index, Process_Range_Expr_In_Decl):
5482         Make sure side effects are removed in GNATprove mode.
5484 2014-01-20  Eric Botcazou  <ebotcazou@adacore.com>
5486         * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Robustify tests
5487         for aliased objects with an unconstrained nominal subtype.
5488         * gcc-interface/trans.c (Call_to_gnu): Likewise.
5489         (gnat_to_gnu) <case N_Op_Not>: Robustify test for private type.
5490         <case N_Op_Minus>: Remove useless code.
5491         (Exception_Handler_to_gnu_zcx): Minor tweaks.
5493 2014-01-20  Eric Botcazou  <ebotcazou@adacore.com>
5495         * gcc-interface/decl.c (gnat_to_gnu_entity) <case E_Record_Subtype>:
5496         Tidy up.  For a subtype with discriminants and variant part, if a
5497         variant is statically selected and the fields all have a constant
5498         position, put them in order of increasing position.  Likewise if
5499         no variant part but representation clause is present.
5500         * gcc-interface/utils.c (make_packable_type): Robustify.
5501         (maybe_pad_type): Use local variable and tidy up condition.  If no
5502         alignment is specified, use the original one.
5503         (create_type_stub_decl): Minor tweak.
5504         (convert) <case VECTOR_CST>: Fix typo.
5505         <case CONSTRUCTOR>: Deal with padding types around the same type.
5506         Do not punt on missing fields.
5507         (unchecked_convert): Call finish_record_type to lay out the special
5508         record types made for conversions from/to problematic integer types.
5509         Bump the alignment of CONSTRUCTORs before converting them to a more
5510         aligned type.
5512 2014-01-20  Eric Botcazou  <ebotcazou@adacore.com>
5514         * gcc-interface/decl.c (gnat_to_gnu_entity) <case E_Component>: Remove
5515         obsolete code for type_annotate_only mode, simplify code and slightly
5516         improve wording of comments.
5518 2014-01-12  Eric Botcazou  <ebotcazou@adacore.com>
5520         PR ada/59772
5521         * gcc-interface/cuintp.c (build_cst_from_int): Use 32-bit integer type
5522         as intermediate type.
5523         (UI_To_gnu): Likewise.
5525 2014-01-03  Eric Botcazou  <ebotcazou@adacore.com>
5527         * gnatvsn.ads (Current_Year): Bump to 2014.
5529 2014-01-02  Tobias Burnus  <burnus@net-b.de>
5531         * gnat_ugn.texi: Bump @copying's copyright year.
5533 Copyright (C) 2014 Free Software Foundation, Inc.
5535 Copying and distribution of this file, with or without modification,
5536 are permitted in any medium without royalty provided the copyright
5537 notice and this notice are preserved.