* gcc-interface/trans.c (Subprogram_Body_to_gnu): Rework comment and
[official-gcc.git] / gcc / ada / ChangeLog
blobaa60d8a9f950e874d64295178ca54841fca822af
1 2014-05-18  Eric Botcazou  <ebotcazou@adacore.com>
3         * gcc-interface/trans.c (Subprogram_Body_to_gnu): Rework comment and
4         set function_start_locus.
6 2014-05-18  Eric Botcazou  <ebotcazou@adacore.com>
8         * utils.c (gnat_write_global_declarations): Adjust the flags put on
9         dummy_global.
11 2014-05-18  Eric Botcazou  <ebotcazou@adacore.com>
13         * gcc-interface/decl.c (change_qualified_type): New static function.
14         (gnat_to_gnu_entity): Use it throughout to add qualifiers on types.
15         <E_Array_Type>: Set TYPE_VOLATILE on the array type directly.
16         <E_Array_Subtype>: Likewise.
17         Do not set flags on an UNCONSTRAINED_ARRAY_TYPE directly.
18         (gnat_to_gnu_component_type): Likewise.
19         (gnat_to_gnu_param): Likewise.
21 2014-05-18  Eric Botcazou  <ebotcazou@adacore.com>
23         * fe.h (Set_Present_Expr): Move around.
24         (End_Location): New macro.
25         * gcc-interface/trans.c (Case_Statement_to_gnu): Use End_Location.
27 2014-05-18  Eric Botcazou  <ebotcazou@adacore.com>
29         * gcc-interface/decl.c (gnat_to_gnu_entity): Use Underlying_Type in
30         lieu of more verbose construct.
31         * gcc-interface/trans.c (Call_to_gnu): Likewise.
32         (gnat_to_gnu): Likewise.  Remove obsolete code.
34 2014-05-18  Eric Botcazou  <ebotcazou@adacore.com>
36         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Subtype>: Do not
37         consider that regular packed arrays can never be superflat.
39 2014-05-17  Trevor Saunders  <tsaunders@mozilla.com>
41         * gcc-interface/ada-tree.h: Remove usage of variable_size gty
42         annotation.
43         * gcc-interface/decl.c (annotate_value): Adjust.
44         * gcc-interface/trans.c (Attribute_to_gnu): Likewise.
45         (push_range_check_info): Likewise.
46         (Loop_Statement_to_gnu): Likewise.
47         (Subprogram_Body_to_gnu): Likewise.
48         (Compilation_Unit_to_gnu): Likewise.
49         (start_stmt_group): Likewise.
50         * gcc-interface/utils.c (init_gnat_utils): Likewise.
51         (gnat_pushlevel): Likewise.
52         (maybe_pad_type): Likewise.
54 2014-05-14  Eric Botcazou  <ebotcazou@adacore.com>
56         * seh_init.c: Fix copyright year.
58 2014-05-14  Bernd Edlinger  <bernd.edlinger@hotmail.de>
60         * seh_init.c (__gnat_map_SEH): Compile also when __CYGWIN__ and __SEH__
61         are defined.  Move include windows.h before system.h.
62         * s-oscons-tmplt.c (DTR_CONTROL_ENABLE, RTS_CONTROL_ENABLE): Compile
63         also when __CYGWIN__ is defined.  Include windef.h before winbase.h.
65 2014-05-14  Richard Sandiford  <r.sandiford@uk.ibm.com>
67         * gcc-interface/decl.c (gnat_to_gnu_entity): Convert integer_one_node
68         to the appropriate type.
69         * gcc-interface/trans.c (gnat_to_gnu): Likewise.
70         (pos_to_constructor): Likewise.
72 2014-05-13  Eric Botcazou  <ebotcazou@adacore.com>
74         * gcc-interface/decl.c (annotate_value): Fix thinko in latest change.
76 2014-05-06  Kenneth Zadeck  <zadeck@naturalbridge.com>
77             Mike Stump  <mikestump@comcast.net>
78             Richard Sandiford  <rdsandiford@googlemail.com>
80         * gcc-interface/cuintp.c (UI_From_gnu): Use wide-int interfaces.
81         * gcc-interface/decl.c (gnat_to_gnu_entity): Use TYPE_SIGN.
82         (annotate_value): Use wide-int interfaces.
83         * gcc-interface/utils.c (get_nonnull_operand): Use tree_fits_uhwi_p.
85 2014-04-28  Richard Henderson  <rth@redhat.com>
87         * gcc-interface/Makefile.in: Support aarch64-linux.
89 2014-04-28  Eric Botcazou  <ebotcazou@adacore.com>
91         * exp_dbug.ads (Get_External_Name): Add 'False' default to Has_Suffix,
92         add 'Suffix' parameter and adjust comment.
93         (Get_External_Name_With_Suffix): Delete.
94         * exp_dbug.adb (Get_External_Name_With_Suffix): Merge into...
95         (Get_External_Name): ...here.  Add 'False' default to Has_Suffix, add
96         'Suffix' parameter.
97         (Get_Encoded_Name): Remove 2nd argument in call to Get_External_Name.
98         Call Get_External_Name instead of Get_External_Name_With_Suffix.
99         (Get_Secondary_DT_External_Name): Likewise.
100         * exp_cg.adb (Write_Call_Info): Likewise.
101         * exp_disp.adb (Export_DT): Likewise.
102         (Import_DT): Likewise.
103         * comperr.ads (Compiler_Abort): Remove Code parameter and add From_GCC
104         parameter with False default.
105         * comperr.adb (Compiler_Abort): Likewise.  Adjust accordingly.
106         * types.h (Fat_Pointer): Rename into...
107         (String_Pointer): ...this.  Add comment on interfacing rules.
108         * fe.h (Compiler_Abort): Adjust for above renaming.
109         (Error_Msg_N): Likewise.
110         (Error_Msg_NE): Likewise.
111         (Get_External_Name): Likewise.  Add third parameter.
112         (Get_External_Name_With_Suffix): Delete.
113         * gcc-interface/decl.c (STDCALL_PREFIX): Define.
114         (create_concat_name): Adjust call to Get_External_Name, remove call to
115         Get_External_Name_With_Suffix, use STDCALL_PREFIX, adjust for renaming.
116         * gcc-interface/trans.c (post_error): Likewise.
117         (post_error_ne): Likewise.
118         * gcc-interface/misc.c (internal_error_function): Likewise.
120 2014-04-28  Richard Biener  <rguenther@suse.de>
122         PR middle-end/60092
123         * gcc-interface/utils.c: Define flag_isoc11.
125 2014-04-26  Eric Botcazou  <ebotcazou@adacore.com>
127         * gnatvsn.ads (Library_Version): Bump to 4.10.
129 2014-04-23  Eric Botcazou  <ebotcazou@adacore.com>
131         Revert
132         2014-04-22  Richard Henderson  <rth@redhat.com>
134         * gcc-interface/Makefile.in: Support aarch64-linux.
136         2014-04-22  Eric Botcazou  <ebotcazou@adacore.com>
138         * fe.h (Compiler_Abort): Replace Fat_Pointer with String_Pointer.
139         (Error_Msg_N): Likewise.
140         (Error_Msg_NE): Likewise.
141         (Get_External_Name_With_Suffix): Likewise.
142         * types.h (Fat_Pointer): Delete.
143         (String_Pointer): New type.
144         (DECLARE_STRING_POINTER): New macro.
145         * gcc-interface/decl.c (create_concat_name): Adjust.
146         * gcc-interface/trans.c (post_error): Likewise.
147         (post_error_ne): Likewise.
148         * gcc-interface/misc.c (internal_error_function): Likewise.
150 2014-04-22  Richard Henderson  <rth@redhat.com>
152         * gcc-interface/Makefile.in: Support aarch64-linux.
154         * init.c [__linux__] (HAVE_GNAT_ALTERNATE_STACK): New define.
155         (__gnat_alternate_stack): Enable for all linux except ia64.
157 2014-04-22  Eric Botcazou  <ebotcazou@adacore.com>
159         * fe.h (Compiler_Abort): Replace Fat_Pointer with String_Pointer.
160         (Error_Msg_N): Likewise.
161         (Error_Msg_NE): Likewise.
162         (Get_External_Name_With_Suffix): Likewise.
163         * types.h (Fat_Pointer): Delete.
164         (String_Pointer): New type.
165         (DECLARE_STRING_POINTER): New macro.
166         * gcc-interface/decl.c (create_concat_name): Adjust.
167         * gcc-interface/trans.c (post_error): Likewise.
168         (post_error_ne): Likewise.
169         * gcc-interface/misc.c (internal_error_function): Likewise.
171 2014-04-15  Eric Botcazou  <ebotcazou@adacore.com>
172             Pierre-Marie de Rodat  <derodat@adacore.com>
174         * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create a mere
175         scalar constant instead of a reference for renaming of scalar literal.
176         Do not create a new object for constant renaming except for a function
177         call.  Make sure a VAR_DECL is created for the renaming pointer.
178         * gcc-interface/trans.c (constant_decl_with_initializer_p): New.
179         (fold_constant_decl_in_expr): New function.
180         (Identifier_to_gnu): Use constant_decl_with_initializer_p.
181         For a constant renaming, try to fold a constant DECL in the result.
182         (lvalue_required_p) <N_Object_Renaming_Declaration>: Always return 1.
183         (Identifier_to_gnu): Reference the renamed object of constant renaming
184         pointers directly.
185         * gcc-interface/utils.c (invalidate_global_renaming_pointers): Do not
186         invalidate constant renaming pointers.
188 2014-04-15  Eric Botcazou  <ebotcazou@adacore.com>
190         * gcc-interface/utils.c (type_for_vector_element_p): New predicate.
191         (build_vector_type_for_size): New function.
192         (build_vector_type_for_array): Likewise.
193         (unchecked_convert): Build an intermediate vector type to convert
194         from a generic array type to a vector type.
195         (handle_vector_size_attribute): Reimplement.
196         (handle_vector_type_attribute): Likewise.
198 2014-04-15  Eric Botcazou  <ebotcazou@adacore.com>
200         * gcc-interface/decl.c (prepend_one_attribute_pragma): Call
201         Is_OK_Static_Expression in lieu of Is_Static_Expression to
202         detect valid arguments.
204 2014-04-15  Eric Botcazou  <ebotcazou@adacore.com>
206         * gcc-interface/trans.c (gnat_gimplify_stmt): Propagate loop hints.
208 2014-04-14  Paolo Carlini  <paolo.carlini@oracle.com>
210         * gcc-interface/decl.c (gnat_to_gnu_entity): Use TYPE_IDENTIFIER.
211         (components_to_record): Likewise.
212         * gcc-interface/utils.c (make_aligning_type): Likewise.
213         (maybe_pad_type): Likewise.
214         (finish_record_type): Likewise.
215         (rest_of_record_type_compilation): Likewise.
217 2014-04-14  Eric Botcazou  <ebotcazou@adacore.com>
219         * snames.ads-tmpl (Name_Ivdep): New pragma-related name.
220         * sem_prag.adb (Analyze_Pragma) <Pragma_Loop_Optimize>: Add support
221         for Ivdep hint.
222         * gnat_rm.texi (Implementation Defined Pragmas): Document new Ivdep
223         hint for Loop_Optimize.
224         * gnat_ugn.texi (Vectorization of loops): Mention new Ivdep hint.
225         * gcc-interface/trans.c (Pragma_to_gnu) <Pragma_Loop_Optimize>: Deal
226         with new Ivdep hint.
227         * gcc-interface/ada-tree.h (LOOP_STMT_IVDEP): New macro.
228         * gcc-interface/trans.c (Pragma_to_gnu) <Pragma_Loop_Optimize>: Deal
229         with new Ivdep hint.
230         (gnat_gimplify_stmt) <LOOP_STMT>: Propagate loop hints.
232 2014-04-14  Eric Botcazou  <ebotcazou@adacore.com>
233             Robert Dewar  <dewar@adacore.com>
235         * opt.ads (Suppress_Back_Annotation): Remove as unused.
236         * fe.h (Back_Annotate_Rep_Info): Likewise.
237         (Global_Discard_Names): Likewise.
238         (List_Representation_Info): Declare.
239         * types.h (Uint_Minus_1): Likewise.
240         * repinfo.ads: Document back-annotation change.
241         * gcc-interface/gigi.h (init_gnat_decl): Declare.
242         (destroy_gnat_decl): Likewise.
243         * gcc-interface/decl.c (annotate_value): Do not create the cache of
244         annotated values here but...
245         <CALL_EXPR>: Only inline the call if -gnatR3 is specified or we are
246         in ASIS mode.
247         (init_gnat_decl): ...here instead.  New function.
248         (destroy_gnat_decl): Likewise.
249         * gcc-interface/trans.c (gigi): Call {init|destroy}_gnat_decl.
250         * gcc-interface/utils.c (init_gnat_utils): Minor reformatting.
252 2014-04-14  Eric Botcazou  <ebotcazou@adacore.com>
254         * gcc-interface/decl.c (create_field_decl_from): Finalize non-constant
255         offset for the field, if any.
257 2014-04-09  Eric Botcazou  <ebotcazou@adacore.com>
258             Svante Signell  <svante.signell@gmail.com>
260         PR ada/54040
261         PR ada/59346
262         * s-osinte-x32.adb: New file.
263         * s-linux.ads (Time): New section.
264         * s-linux-alpha.ads (Time): Likewise.
265         * s-linux-android.ads (Time: Likewise.
266         * s-linux-hppa.ads (Time): Likewise.
267         * s-linux-mipsel.ads (Time): Likewise.
268         * s-linux-sparc.ads (Time): Likewise.
269         * s-linux-x32.ads (Time): Likewise.
270         * s-osprim-x32.ads (timespec): Adjust.
271         (Clock): Likewise.
272         (To_Timespec): Likewise.
273         * s-osinte-linux.ads (Time): Define local subtypes for those defined
274         in System.Linux.
275         * s-taprop-linux.adb (Monotonic_Clock): Do not define timeval.
276         * s-osinte-hpux.ads (timespec): Revert POSIX breakage.
277         * s-osinte-kfreebsd-gnu.ads (timespec): Likewise.
278         * s-osinte-solaris-posix.ads (timespec): Likewise.
279         * s-osinte-posix.adb (To_Timespec): Likewise.
280         * gcc-interface/Makefile.in (x32/Linux): Use s-osinte-x32.adb.
282 2014-04-08  Eric Botcazou  <ebotcazou@adacore.com>
284         PR ada/60411
285         * gcc-interface/Makefile.in (arm% linux-android): Switch to EHABI.
286         * s-linux-android.ads: New file.
287         * s-intman-android.adb: Likewise.
288         * s-osinte-android.ads: Adjust.
289         * sigtramp-armdroid.c: Likewise.
290         * sigtramp.h: Add Android support.
292 2014-04-07  Eric Botcazou  <ebotcazou@adacore.com>
294         * gcc-interface/Makefile.in (alpha-vms): Add missing line.
296 2014-03-30  Eric Botcazou  <ebotcazou@adacore.com>
298         PR ada/60703
299         * system-linux-alpha.ads: Adjust for Ada 2005.
300         * system-linux-mips.ads: Likewise.
301         * system-linux-mips64el.ads: Likewise.
302         * system-linux-mipsel.ads: Likewise.
303         * system-linux-s390.ads: Likewise.
304         * system-linux-s390x.ads: Likewise.
305         * system-linux-sparc.ads: Likewise.
306         * system-linux-sparcv9.ads: Likewise.
307         * system-rtems.ads: Likewise.
308         * system-vxworks-arm.ads: Likewise.
310 2014-03-16  Andreas Schwab  <schwab@linux-m68k.org>
312         PR ada/39172
313         * gcc-interface/Makefile.in (target_cpu_default): Revert
314         2013-10-11 change.
316 2014-03-13  Eric Botcazou  <ebotcazou@adacore.com>
318         PR ada/51483
319         * cstand.adb (Register_Float_Type): Add 'precision' parameter and use
320         it to set the RM size.  Use directly 'size' for the Esize.
321         (Create_Back_End_Float_Types): Adjust call to above.
322         * get_targ.ads (Register_Type_Proc): Add 'precision' parameter.
323         * set_targ.ads (FPT_Mode_Entry): Add 'precision' component.
324         (Write_Target_Dependent_Values): Adjust comment.
325         * set_targ.adb (Register_Float_Type): Add 'precision' parameter and
326         deal with it.
327         (Write_Target_Dependent_Values): Write the precision in lieu of size.
328         (Initialization): Read the precision in lieu of size and compute the
329         size from the precision and the alignment.
330         * gcc-interface/gigi.h (enumerate_modes): Add integer parameter.
331         * gcc-interface/misc.c (enumerate_modes): Likewise.  Do not register
332         types for vector modes, pass the size in addition to the precision.
334 2014-03-10  Eric Botcazou  <ebotcazou@adacore.com>
336         * gcc-interface/Make-lang.in (ADA_DEPFILES): Fix typo.
338 2014-03-07  Doug Rupp  <rupp@adacore.com>
340         PR ada/60411
341         * system-linux-armel.ads (Backend_Overflow_Checks): Set to True.
342         (Support_64_Bit_Divides): Removed, no longer used.
343         (ZCX_By_Default): Enabled.
345 2014-02-25  Doug Rupp  <rupp@adacore.com>
347         * gcc-interface/Makefile.in (arm-linux):
348         (EH_MECHANISM): Use ARM unwinder (-arm)
349         (LIBGNAT_TARGET_PAIRS: Override defaults with a-exexpr-gcc.adb and
350         s-excmac-arm.ads.
351         (EXTRA_LIBGNAT_OBJS): Add raise-gcc.o
352         (EXTRA_GNATRTL_NONTASKING_OBJS): Add g-cppexc.o s-excmac.o.
353         (arm-wrs-vxworks): Add EH_MECHANISM=-gcc for kernel mode.
354         (EXTRA_LIBGNAT_OBJS): Add sigtramp-armvxw.o
355         Add dependencies for sigtramp-armvxw.o.
357 2014-02-25  Eric Botcazou  <ebotcazou@adacore.com>
359         * gcc-interface/trans.c (Pragma_to_gnu): Deal with Warning_As_Error.
361 2014-02-25  Robert Dewar  <dewar@adacore.com>
363         * rtsfind.adb (Is_RTE): Protect against entity with no scope
364         field (previously this call blew up on the Standard entity).
365         * sem_attr.adb (Analyze_Attribute, case Access): Remove
366         test for No_Abort_Statements, this is now handled in
367         Set_Entity_With_Checks.
368         * exp_ch6.adb, sem_ch10.adb, sem_ch4.adb, sem_ch8.adb, sem_res.adb:
369         Change name Set_Entity_With_Style_Check => Set_Entity_With_Checks.
370         * sem_util.ads, sem_util.adb: Change name Set_Entity_With_Style_Check =>
371         Set_Entity_With_Checks.
372         (Set_Entity_With_Checks): Add checks for No_Dynamic_Attachment,
373         Add checks for No_Abort_Statements.
375 2014-02-25  Robert Dewar  <dewar@adacore.com>
377         * exp_ch9.adb (Expand_Entry_Barrier): Add comment that call to
378         Check_Restriction is OK.
380 2014-02-25  Ed Schonberg  <schonberg@adacore.com>
382         * sem_ch3.adb (Process_Full_View): Better error message when
383         the full view of  a private type without discriminants is an
384         unconstrained type.
385         * sem_ch7.adb (Uninstall_Declarations): Ditto.
387 2014-02-25  Eric Botcazou  <ebotcazou@adacore.com>
389         * sigtramp-armvxw.c: Also restore r0.
391 2014-02-25  Robert Dewar  <dewar@adacore.com>
393         * errout.adb (Error_Msg_Internal): Warning_Msg_Char set
394         unconditionally (Set_Msg_Insertion_Warning): Warning_Msg_Char
395         set unconditionally.
396         * erroutc.adb (Get_Warning_Tag): Does not give a leading space
397         any more (Output_Msg_Text): Rewritten with new convention on
398         output of warnings that are treated as errors.
399         * erroutc.ads (Error_Msg_Object): Warn_Chr is always set even
400         if Warn is False.
401         * gnat_rm.texi: Updates to documentation on pragma
402         Warning_As_Error.
403         * warnsw.adb (Set_Dot_Warning_Switch): -gnatw.e should not
404         set Warning_Doc_Switch.
405         * lib-writ.ads: Add documentation note on ALI file generation
406         for C.
407         * exp_ch6.adb (Expand_Call): Remove check for No_Abort_Statements
408         (belongs in Sem).
409         * sem_attr.adb (Resolve_Attribute, case Access):
410         Abort_Task'Access violates the No_Abort_Statements restriction.
411         * sem_res.adb (Resolve_Call): Check restriction
412         No_Abort_Statements for call to Abort_Task or a renaming of it.
414 2014-02-25  Robert Dewar  <dewar@adacore.com>
416         * sem_ch3.adb (Array_Type_Declaration): Check for case of using
417         type name as index.
418         * lib.ads: Minor reformatting.
419         * einfo.ads: Minor reformatting.
421 2014-02-25  Doug Rupp  <rupp@adacore.com>
423         * sem_mech.adb (Set_Mechanisms): For convention Fortran on VMS
424         use Short_Descriptor(S) as the argument passing mechanism.
426 2014-02-25  Eric Botcazou  <ebotcazou@adacore.com>
428         * sigtramp-ppcvxw.c (CFI_COMMON_REGS): Also include r0.
430 2014-02-25  Robert Dewar  <dewar@adacore.com>
432         * atree.ads (Warnings_Treated_As_Errors): New variable.
433         * errout.adb (Error_Msg_Internal): Set Warn_Err flag in
434         error object (Initialize): Initialize Warnings_As_Errors_Count
435         (Write_Error_Summary): Include count of warnings treated as errors.
436         * erroutc.adb (Warning_Treated_As_Error): New function.
437         (Matches): Function moved to outer level of package.
438         * erroutc.ads (Error_Msg_Object): Add Warn_Err flag.
439         (Warning_Treated_As_Error): New function.
440         * gnat_rm.texi: Document pragma Treat_Warning_As_Error.
441         * opt.adb: Add handling of Warnings_As_Errors_Count[_Config].
442         * opt.ads (Config_Switches_Type): Add entry for
443         Warnings_As_Errors_Count.
444         (Warnings_As_Errors_Count): New variable.
445         (Warnings_As_Errors): New array.
446         * par-prag.adb: Add dummy entry for Warning_As_Error.
447         * sem_prag.adb (Analyze_Pragma): Implement new pragma
448         Warning_As_Error.
449         * snames.ads-tmpl: Add entries for Warning_As_Error pragma.
451 2014-02-25  Eric Botcazou  <ebotcazou@adacore.com>
453         * sigtramp.h: Fix minor inaccuracy.
455 2014-02-25  Ben Brosgol  <brosgol@adacore.com>
457         * gnat_ugn.texi: Added description of kill command.
459 2014-02-25  Robert Dewar  <dewar@adacore.com>
461         * gnat_rm.texi (Address_Clauses): Add a section discussing the
462         problem of address clauses causing unexpected initialization,
463         including the effect of Initialize_Scalars.
465 2014-02-25  Robert Dewar  <dewar@adacore.com>
467         * errout.adb: Various changes for better msgs for anonmous access
468         subprogram types.
469         * erroutc.ads, erroutc.adb (Buffer_Ends_With): Version with character
470         argument.
471         (Buffer_Remove): Version with character argument.
472         * sem_attr.adb (Resolve_Attribute, case Access): Better handling
473         of mismatching conventions for access-to-subprogram case.
474         * sem_prag.adb (Set_Convention_From_Pragma): Deal with anonymous
475         access types in record.
476         * sem_util.ads, sem_util.adb (Set_Convention): Handle anonymous access
477         types, including in records.
479 2014-02-25  Doug Rupp  <rupp@adacore.com>
481         * sigtramp-ppcvxw.c, sigtramp.h, sigtramp-armvxw.c: Comment
482         enhancements and corrections.
484 2014-02-25  Robert Dewar  <dewar@adacore.com>
486         * gnat_rm.texi: New section "Conventions and Anonymous Access Types"
488 2014-02-25  Robert Dewar  <dewar@adacore.com>
490         * gnat_rm.texi: First set of documentation additions for
491         predefined RM units.
492         * checks.adb: Minor reformatting.
493         * sem_elab.adb (Check_Task_Activation): Minor fix to error
494         message.
495         * sem_util.adb: Minor reformatting.
497 2014-02-25  Arnaud Charlet  <charlet@adacore.com>
499         * usage.adb (Usage): Add help on -gnateC.
500         * switch-c.adb (Scan_Front_End_Switches): Add handling of -gnateC.
501         * opt.ads (Generate_CodePeer_Messages): New flag.
502         * gnat_ugn.texi: Document new switch -gnateC.
504 2014-02-25  Ben Brosgol  <brosgol@adacore.com>
506         * gnat_rm.texi: Corrected minor typos in Implementation Defined
507         Aspects.
508         * opt.ads: Minor reformatting.
510 2014-02-25  Robert Dewar  <dewar@adacore.com>
512         * binde.adb: Change messages to mention -gnatel instead of -gnatwl.
513         * gnat_ugn.texi: Update documentation of -gnatwl Add documentation
514         of -gnatel/-gnateL.
515         * opt.ads (Warn_Info_Messages): New flag.
516         * sem_elab.adb: Use Elab_Warnings, Elab_Info_Messages to control
517         messages.
518         * sem_prag.adb: Use Elab_Warnings, Elab_Info_Messages to control
519         messages.
520         * switch-m.ad, switch-c.adb: Recognize new -gnatel/EL switches.
521         * usage.adb: Add documentation of -gnatel/-gnateL Update
522         documentation of -gnatwl/-gnatwL.
523         * warnsw.adb: New handling of Elab_Warnings, Elab_Info_Messages
524         * warnsw.ads (Elab_Info_Messages): New field in Warning_Record
526 2014-02-25  Robert Dewar  <dewar@adacore.com>
528         * einfo.ads, einfo.adb (Has_Shift_Operator): New flag.
529         * gnat_rm.texi: Document pragma Provide_Shift_Operators.
530         * interfac.ads: Minor code reorganization (add pragma
531         Compiler_Unit_Warning).
532         * par-prag.adb: Add dummy entry for Provide_Shift_Operators.
533         * sem_ch3.adb (Build_Derived_Numeric_Type): Copy
534         Has_Shift_Operator flag.
535         * sem_intr.adb (Check_Intrinsic_Subprogram): Make sure
536         Check_Shift is always called (Check_Shift): Set Has_Shift_Operator.
537         * sem_prag.adb: Implement pragma Provide_Shift_Operators.
538         * snames.ads-tmpl: Add entries for pragma Provide_Shift_Operators
539         Add entry for Name_Amount.
540         * checks.adb (Selected_Range_Checks): When checking for a null
541         range, make sure we use the base type, and not the subtype for
542         deciding a range is null.
543         * sem_ch5.adb (Analyze_Loop_Parameter_Specification): Check
544         for suspicious loop bound which is outside the range of the
545         loop subtype.
546         * gnat_ugn.texi: Add documentation section "Determining the
547         Chosen Elaboration Order"
548         * sem_ch13.adb (UC_Entry): Add field Act_Unit
549         (Validate_Unchecked_Conversion): Store Act_Unit
550         (Validate_Unchecked_Conversions): Test Warnings_Off in Act_Unit
551         * treepr.adb: Minor reformatting.
553 2014-02-25  Arnaud Charlet  <charlet@adacore.com>
555         * usage.adb: Minor: fix typo.
557 2014-02-25  Robert Dewar  <dewar@adacore.com>
559         * lib.ads, s-bitops.adb, s-bitops.ads, s-conca5.adb, gnat_rm.texi,
560         s-conca5.ads, s-conca7.adb, s-conca7.ads, s-crc32.adb, s-crc32.ads,
561         s-conca9.adb, s-conca9.ads, g-dyntab.adb, s-crtl.ads, g-dyntab.ads,
562         s-excdeb.adb, s-addope.adb, s-addope.ads, s-carun8.adb, s-carun8.ads,
563         g-htable.adb, g-htable.ads, g-hesora.adb, g-hesora.ads, s-conca2.adb,
564         s-conca2.ads, a-comlin.adb, a-chlat1.ads, a-comlin.ads, errout.ads,
565         a-except.adb, s-conca4.adb, a-except.ads, s-conca4.ads, s-conca6.adb,
566         s-conca6.ads, g-spchge.adb, g-spchge.ads, g-u3spch.adb, g-u3spch.ads,
567         a-strhas.ads, restrict.adb, aspects.adb, aspects.ads, s-conca8.adb,
568         s-conca8.ads, back_end.adb, par-prag.adb, g-byorma.adb, g-byorma.ads,
569         a-elchha.adb, a-elchha.ads, g-speche.adb, g-speche.ads, s-casuti.adb,
570         s-assert.adb, s-casuti.ads, s-assert.ads, a-clrefi.adb, a-clrefi.ads,
571         s-conca3.adb, s-conca3.ads, a-ioexce.ads: Implement pragma
572         Compiler_Unit_Warning, change Compiler_Unit everywhere to
573         Compiler_Unit_Warning.
575 2014-02-25  Sergey Rybin  <rybin@adacore.com frybin>
577         * sem_prag.adb (Analyze_Depends_In_Decl_Part): Do not normalize
578         in ASIS mode aggregates that are used as aspect definitions.
580 2014-02-25  Robert Dewar  <dewar@adacore.com>
582         * exp_ch7.adb, sem_util.adb, sem_util.ads, exp_ch6.adb: Minor
583         reformatting.
585 2014-02-25  Ed Schonberg  <schonberg@adacore.com>
587         * freeze.adb (Freeze_Entity): If the return type of a function
588         is a limited view, and the non-limited view has not been seen yet,
589         defer freezing to some later point.
591 2014-02-25  Robert Dewar  <dewar@adacore.com>
593         * sem_ch3.adb: Minor reformatting.
595 2014-02-25  Robert Dewar  <dewar@adacore.com>
597         * s-excdeb.ads, s-except.ads, s-exctab.adb, s-exctab.ads, s-finmas.ads,
598         s-htable.adb, s-htable.ads, s-imenne.adb, s-imenne.ads, s-imgenu.adb,
599         s-imgenu.ads, s-mastop.adb, s-mastop.ads, s-memory-vms_64.adb,
600         s-memory-vms_64.ads, s-memory.adb, s-memory.ads, s-os_lib.adb,
601         s-os_lib.ads, s-parame.adb, s-parame.ads, s-purexc.ads, s-restri.adb,
602         s-restri.ads, s-rident.ads, s-secsta.adb, s-secsta.ads, s-soflin.adb,
603         s-soflin.ads, s-sopco3.adb, s-sopco3.ads, s-sopco4.adb, s-sopco4.ads,
604         s-sopco5.adb, s-sopco5.ads, s-spsufi.ads, s-stache.adb, s-stache.ads,
605         s-stalib.adb, s-stalib.ads, s-stoele.adb, s-stoele.ads, s-strcom.adb,
606         s-strcom.ads, s-strhas.adb, s-string.adb, s-string.ads, s-strops.adb,
607         s-strops.ads, s-ststop.adb, s-ststop.ads, s-traceb.adb, s-traceb.ads,
608         s-traent.adb, s-traent.ads, s-unstyp.ads, s-utf_32.adb, s-utf_32.ads,
609         s-wchcnv.adb, s-wchcnv.ads, s-wchcon.adb, s-wchcon.ads, s-wchjis.adb,
610         s-wchjis.ads, sem_ch11.adb, sem_ch4.adb, sem_ch5.adb, sem_prag.adb,
611         snames.ads-tmpl: Change Compiler_Unit everywhere to
612         Compiler_Unit_Warning.
614 2014-02-25  Hristian Kirtchev  <kirtchev@adacore.com>
616         * exp_ch6.adb (Add_Or_Save_Precondition): New routine.
617         (Collect_Body_Postconditions_In_Decls): New routine.
618         (Collect_Body_Postconditions_Of_Kind): Factor out code. Handle
619         postcondition aspects or pragmas that appear on a subprogram
620         body stub.
621         (Collect_Spec_Preconditions): Factor out code. Handle
622         precondition aspects or pragmas that appear on a subprogram
623         body stub.
624         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): The analysis of
625         aspects that apply to a subprogram body stub is no longer delayed,
626         the aspects are analyzed on the spot.
627         (SPARK_Aspect_Error):
628         Aspects that apply to a subprogram declaration cannot appear in
629         a subunit.
630         * sem_ch10.adb Remove with and use clause for Sem_Ch13.
631         (Analyze_Proper_Body): Add local variable Comp_Unit. Unum
632         is now a local variable. Code cleanup. Analysis related to
633         the aspects of a subprogram body stub is now carried out by
634         Analyze_Subprogram_Body_Helper. Do not propagate the aspects
635         and/or pragmas of a subprogram body stub to the proper body
636         as this is no longer needed. Do not analyze the aspects of a
637         subprogram stub when the corresponding source unit is missing.
638         (Analyze_Protected_Body_Stub): Flag the illegal use of aspects
639         on a stub.
640         (Analyze_Task_Body_Stub): Flag the illegal use of
641         aspects on a stub.
642         (Optional_Subunit): Add local variable Unum.
643         * sem_ch13.adb (Insert_Delayed_Pragma): Do not analyze a generated
644         pragma when it applies to a subprogram body stub.
645         * sem_prag.adb (Analyze_Pragma): Pragmas Contract_Cases,
646         Depends and Global can now apply to a subprogram body stub as
647         long as it acts as its own spec.
648         (Analyze_Refined_Pragma):
649         Code reformatting. Refinement pragmas cannot apply to a subunit.
651 2014-02-25  Hristian Kirtchev  <kirtchev@adacore.com>
653         * einfo.ads Update the usage of flag
654         Uses_Sec_Stack. Uses_Sec_Stack now applies to E_Loop entities.
655         * exp_ch5.adb (Expand_Iterator_Loop): The temporary for a cursor
656         now starts with the letter 'C'. This makes reading expanded
657         code easier.
658         * exp_ch7.adb (Establish_Transient_Scope): Add local variable
659         Iter_Loop. Signal that an Ada 2012 iterator loop requires
660         secondary stack management when creating a transient scope for
661         an element reference.
662         * exp_util.adb (Process_Statements_For_Controlled_Objects):
663         When wrapping the statements of a loop, pass the E_Loop entity
664         to the wrapping machinery.
665         (Wrap_Statements_In_Block): Add
666         formal parameter Scop along with comment on usage. Add local
667         variables Block_Id, Block_Nod and Iter_Loop. Mark the generated
668         block as requiring secondary stack management when the block is
669         created inside an Ada 2012 iterator loop. This ensures that any
670         reference objects are reclaimed on each iteration of the loop.
671         * sem_ch5.adb (Analyze_Loop_Statement): Mark the generated block
672         tasked with the handling of container iterators as requiring
673         secondary stack management. This ensures that iterators are
674         reclaimed when the loop terminates or is exited in any fashion.
675         * sem_util.adb (Add_Block_Identifier): New routine.
676         (Find_Enclosing_Iterator_Loop): New routine.
677         * sem_util.ads (Add_Block_Identifier): New routine.
678         (Find_Enclosing_Iterator_Loop): New routine.
680 2014-02-25  Robert Dewar  <dewar@adacore.com>
682         * sinfo.ads: Minor reformatting.
684 2014-02-25  Tristan Gingold  <gingold@adacore.com>
686         * s-expllu.ads, s-expuns.ads, s-expmod.ads: Minor comment fix.
688 2014-02-25  Pascal Obry  <obry@adacore.com>
690         * sinput-l.adb, osint.adb, osint.ads: Add Prep_Suffix to factorize code.
692 2014-02-25  Tristan Gingold  <gingold@adacore.com>
694         * sem_ch10.adb: Minor comment fix.
696 2014-02-25  Bob Duff  <duff@adacore.com>
698         * s-tasdeb.adb: Misc cleanup of this package,
699         including printing addresses in hexadecimal.
700         (Write): Fix minor bug when taking 'Address of an empty string.
702 2014-02-25  Ed Schonberg  <schonberg@adacore.com>
704         * sem_prag.adb (Analyze_Part_Of): Reject state refinement in a
705         public child unit when it does not refer to the abstract state
706         of a public ancestor.
708 2014-02-25  Yannick Moy  <moy@adacore.com>
710         * sem_prag.adb (Analyze_Pragma/Pragma_Validity_Checks): Ignore pragma
711         Validity_Checks in GNATprove and CodePeer modes.
713 2014-02-25  Pascal Obry  <obry@adacore.com>
715         * prj-attr.adb, projects.texi, snames.ads-tmpl: Add package Install's
716         Artifacts attribute.
718 2014-02-25  Yannick Moy  <moy@adacore.com>
720         * sem_prag.adb: Minor reformatting to get consistent messages.
722 2014-02-25  Robert Dewar  <dewar@adacore.com>
724         * checks.adb: Minor reformatting.
725         * sinfo.ads (Do_Range_Check): Document that this flag is never
726         passed to the back end.
728 2014-02-25  Yannick Moy  <moy@adacore.com>
730         * sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_prag.adb, sem_attr.adb,
731         sem_ch6.adb: Remove useless references to SPARK RM in error messages.
733 2014-02-25  Hristian Kirtchev  <kirtchev@adacore.com>
735         * sem_res.adb (Appears_In_Check): New routine.
736         (Resolve_Entity_Name): Remove local variables Prev and
737         Usage_OK. Par is now a constant. Remove the parent chain traversal
738         as the placement of a volatile object with enabled property
739         Async_Writers and/or Effective_Reads must appear immediately
740         within a legal construct.
742 2014-02-25  Hristian Kirtchev  <kirtchev@adacore.com>
744         * checks.adb (Apply_Selected_Range_Checks):
745         Alphabetize local constants and variables. Add comments.
746         Always insert a range check that requires runtime evaluation into
747         the tree.
749 2014-02-25  Robert Dewar  <dewar@adacore.com>
751         * sem_attr.adb, sem_ch6.adb, par-ch3.adb: Minor reformatting.
753 2014-02-25  Bob Duff  <duff@adacore.com>
755         * s-tassta.adb (Finalize_Global_Tasks): Limit the number of loop
756         iterations while waiting for independent tasks to terminate;
757         if an independent task does not terminate, we do not want to
758         hang here. In that case, the thread will be terminated when the
759         process exits.
760         * s-taprop-linux.adb (Abort_Task): Fix Assert to allow for ESRCH.
762 2014-02-25  Ed Schonberg  <schonberg@adacore.com>
764         * sem_prag.adb (Check_SPARK_Aspect_For_ASIS): New subprogram,
765         used to perform pre-analysis of the expression for SPARK
766         aspects that have a non-standard syntax, such as GLobal and
767         Initializes. The procedure applies to the original expression
768         in an aspect specification, prior to the analysis of the
769         corresponding pragma, in order to provide semantic information
770         for ASIS navigation purposes.
771         (Analyze_Global_In_Decl_List, Analyze_Initializes_In_Decl_Part):
772         Call new subprogram.
774 2014-02-25  Yannick Moy  <moy@adacore.com>
776         * sem_prag.adb: Remove obsolete reference to SPARK RM in error message.
778 2014-02-25  Doug Rupp  <rupp@adacore.com>
780         * init.c (HAVE_GNAT_ADJUST_CONTEXT_FOR_RAISE): Enable for ARM.
781         (__gnat_adjust_context_for_raise): Bump the PC by 2.
783 2014-02-25  Ed Schonberg  <schonberg@adacore.com>
785         * par-ch3.adb (P_Basic_Declarative_Items): In the case of a
786         misplaced IS, add a statement sequence to improper body only if
787         one has not been parsed already.
789 2014-02-25  Ed Schonberg  <schonberg@adacore.com>
791         * sem_attr.adb (Analyze_Attribute, case 'Update): Check for
792         mismatch when multidimensional array is updated with a single
793         index.
795 2014-02-25  Yannick Moy  <moy@adacore.com>
797         * sem_ch3.adb, sem_ch5.adb, sem_prag.adb, sem_attr.adb, errout.ads,
798         sem_ch6.adb: Mark most references to SPARK RM in error messages
799         for removal.
801 2014-02-24  Ed Schonberg  <schonberg@adacore.com>
803         * par-ch3.adb (P_Basic_Declarative_Items): If an improper body
804         appears in a list of basic declarations, complete the tree with
805         an empty statement list, to prevent cascaded errors and crashes
806         if semantic analysis is attempted.
808 2014-02-24  Thomas Quinot  <quinot@adacore.com>
810         * g-sercom-mingw.adb (Open): Fix incorrect test for error return
811         value.
812         * erroutc.adb: Minor reformatting.
814 2014-02-24  Hristian Kirtchev  <kirtchev@adacore.com>
816         * sem_prag.adb (Check_Clause_Syntax): Account
817         for a solitary input item in a dependency list.
819 2014-02-24  Yannick Moy  <moy@adacore.com>
821         * gnat1drv.adb (Adjust_Global_Switches): Do not
822         use validity checks at all in GNATprove_Mode.
824 2014-02-24  Robert Dewar  <dewar@adacore.com>
826         * g-sercom-mingw.adb, g-sercom-linux.adb, sem_prag.adb, freeze.adb,
827         atree.adb, atree.ads: Minor reformatting.
829 2014-02-24  Hristian Kirtchev  <kirtchev@adacore.com>
831         * sem_ch6.adb (Analyze_Subprogram_Body_Contract): Do not enforce
832         global and dependence refinement when SPARK_Mode is off.
833         * sem_ch7.adb (Analyze_Package_Body_Contract): Do not enforce
834         state refinement when SPARK_Mode is off.
835         * sem_ch13.adb (Analyze_Aspect_Specifications): Add local
836         variable Decl. Insert the generated pragma for Refined_State
837         after a potential pragma SPARK_Mode.
838         * sem_prag.adb (Analyze_Depends_In_Decl_Part): Add local
839         constant Deps. Remove local variable Expr. Check the syntax
840         of pragma Depends when SPARK_Mode is off. Factor out the
841         processing for extra parenthesis around individual clauses.
842         (Analyze_Global_In_Decl_List): Items is now a constant. Check
843         the syntax of pragma Global when SPARK_Mode is off.
844         (Analyze_Initializes_In_Decl_Part): Check the syntax of pragma
845         Initializes when SPARK_Mode is off.
846         (Analyze_Part_Of): Check
847         the syntax of the encapsulating state when SPARK_Mode is off.
848         (Analyze_Pragma): Check the syntax of pragma Abstract_State when
849         SPARK_Mode is off. Move the declaration order check with respect
850         to pragma Initializes to the end of the processing. Do not verify
851         the declaration order for pragma Initial_Condition when SPARK_Mode
852         is off. Do not complain about a useless package refinement when
853         SPARK_Mode is off.
854         (Analyze_Refined_Depends_In_Decl_Part): Refs
855         is now a constant. Check the syntax of pragma Refined_Depends
856         when SPARK_Mode is off.
857         (Analyze_Refined_Global_In_Decl_Part):
858         Check the syntax of pragma Refined_Global when SPARK_Mode is off.
859         (Analyze_Refined_State_In_Decl_Part): Check the syntax of pragma
860         Refined_State when SPARK_Mode is off.
861         (Check_Dependence_List_Syntax): New routine.
862         (Check_Global_List_Syntax): New routine.
863         (Check_Initialization_List_Syntax): New routine.
864         (Check_Item_Syntax): New routine.
865         (Check_State_Declaration_Syntax): New routine.
866         (Check_Refinement_List_Syntax): New routine.
867         (Has_Extra_Parentheses): Moved to the top level of Sem_Prag.
869 2014-02-24  Robert Dewar  <dewar@adacore.com>
871         * a-tags.adb, s-os_lib.adb: Minor reformatting.
873 2014-02-24  Thomas Quinot  <quinot@adacore.com>
875         * g-sercom-mingw.adb, g-sercom-linux.adb (Raise_Error): Include
876         strerror message, not just numeric errno value.
878 2014-02-24  Doug Rupp  <rupp@adacore.com>
880         * raise-gcc.c (exception_class_eq): Make endian neutral.
882 2014-02-24  Ed Schonberg  <schonberg@adacore.com>
884         * atree.ads, atree,adb (Copy_Separate_Tree): Remove Syntax_Only
885         flag, and reset Etype and Analyzed attributes unconditionally
886         when copying a tree that may be partly analyzed.
887         * freeze.adb: Change calls to Copy_Separate_Tree accordingly.
888         * sem_ch6.adb (Check_Inline_Pragma): If the Inline pragma appears
889         within a subprogram body and applies to it, remove it from the
890         body before making a copy of it, to prevent spurious errors when
891         analyzing the copied body.
893 2014-02-24  Thomas Quinot  <quinot@adacore.com>
895         * s-os_lib.adb (Errno_Message): Do not depend on Integer'Image.
896         * s-oscons-tmplt.c: On VxWorks, include adaint.h only after
897         vxWorks.h has been included.  Also ensure that file attributes
898         related definitions are output even in cases where socket support
899         is not enabled.
900         * a-tags.adb: Code clean up.
901         * Make-generated.in (OSCONS_CPP, OSCONS_EXTRACT): Use -iquote
902         instead of -I to add the main ada source directory to the header
903         search path, in order to avoid conflict between our own "types.h"
904         and VxWork's <types.h>.
906 2014-02-24  Robert Dewar  <dewar@adacore.com>
908         * atree.ads, atree.adb (Copy_Separate_Tree): Add Syntax_Only parameter.
909         * debug.adb: Remove documentation of -gnatd.X, no longer used.
910         * freeze.adb (Wrap_Imported_Subprogram): Fixed and activated.
912 2014-02-24  Bob Duff  <duff@adacore.com>
914         * gnat_ugn.texi: Improve documentation of gnatpp.
916 2014-02-24  Thomas Quinot  <quinot@adacore.com>
918         * g-stheme.adb, g-socthi-vms.adb, g-socthi-vms.ads,
919         g-socthi-vxworks.adb, g-socthi-vxworks.ads, g-stseme.adb,
920         g-socthi-mingw.adb, g-socthi-mingw.ads, g-socthi.adb,
921         g-socthi.ads, g-socket.adb (Host_Error_Message): Return a string, not
922         a chars_ptr, because on Windows this is a renaming of
923         Socket_Error_Message.
925 2014-02-24  Robert Dewar  <dewar@adacore.com>
927         * a-direct.adb, sem_ch5.adb, a-cfdlli.adb, a-cfhase.adb, a-tags.adb,
928         s-filatt.ads, a-cforma.adb, sem_ch6.adb, g-socthi-mingw.adb,
929         a-cfhama.adb, a-cforse.adb, a-cofove.adb: Minor reformatting and code
930         reorganization.
932 2014-02-24  Thomas Quinot  <quinot@adacore.com>
934         * Make-generated.in (OSCONS_CPP, OSCONS_EXTRACT): Make sure
935         that the source directory containing s-oscons-tmplt.c is on the
936         include path, so that all internal header files are available.
938 2014-02-24  Ed Schonberg  <schonberg@adacore.com>
940         * sem_ch5.adb (Analyze_Loop_Parameter_Specification): If the
941         domain of iteration is an attribute reference 'Old, this is an
942         Ada 2012 iterator and the loop must be rewritten as such.
944 2014-02-24  Thomas Quinot  <quinot@adacore.com>
946         * s-fileio.adb (Errno_Message): Remove, use shared version from
947         s-os_lib instead.
948         * s-crtrun.ads, Makefile.rtl: Remove now unused unit.
949         * g-stseme (Socket_Error_Message): Reimplement in terms of new
950         s-os_lib function.
951         * g-socthi.ads, g-socthi.adb: Change profile of
952         Socket_Error_Message to return String to allow the above.
953         * g-socket.adb, g-socthi-mingw.adb, g-socthi-mingw.ads,
954         * g-socthi-vms.adb, g-socthi-vms.ads, g-socthi-vxworks.adb,
955         * g-socthi-vxworks.ads: Update to account for the above profile
956         change.
957         * a-tags.adb: Use strlen builtin binding provided by s-crtl.
958         * s-crtl.ads (strncpy): New procedure.
959         * s-os_lib.adb (Copy_Attributes): Import just once (strncpy):
960         Use import from s-crtl.
961         * a-envvar.adb, osint.adb: Use imports of C runtime functions
962         from s-crtl instead of re-importing locally.
964 2014-02-24  Hristian Kirtchev  <kirtchev@adacore.com>
966         * sem_prag.adb (Analyze_Global_Item): Emit the
967         variable related checks concerning volatile objects only when
968         SPARK_Mode is on.
970 2014-02-24  Robert Dewar  <dewar@adacore.com>
972         * sem_ch5.adb (Analyze_Iterator_Specification): use
973         Error_Msg_Ada_2012_Feature.
975 2014-02-24  Jose Ruiz  <ruiz@adacore.com>
977         * s-rident.ads (Profile_Info): For Ravenscar, the restrictions
978         No_Local_Timing_Events and No_Specific_Termination_Handlers
979         must be set, according to the Ravenscar profile definition
980         in D.13(6/3).
982 2014-02-24  Ed Schonberg  <schonberg@adacore.com>
984         * sem_ch6.adb (Analyze_Expression_Function): If this is a
985         completion, freeze return type and its designated type if needed.
987 2014-02-24  Thomas Quinot  <quinot@adacore.com>
989         * sem_ch13.adb (Analyze_Attribute_Definition_Clause, case
990         'Address): When moving initialization statements to a freeze
991         entity, keep them under a single node (i.e. do not unwrap
992         expressions with actions), and set the Initialization_Statements
993         attribute again so that processing of a later pragma Import can
994         still remove them.
996 2014-02-24  Claire Dross  <dross@adacore.com>
998         * a-cfdlli.adb, a-cfdlli.ads, a-cfhama.adb, a-cfhama.ads,
999         a-cfhase.adb, a-cfhase.ads, a-cforma.adb, a-cforma.ads,
1000         a-cforse.adb, a-cforse.ads, a-cofove.adb, a-cofove.ads: Rename
1001         Left/Right to First_To_Previous/Current_To_Last.
1003 2014-02-24  Thomas Quinot  <quinot@adacore.com>
1005         * adaint.h (struct file_attributes): New component "error"
1006         (__gnat_error_attributes): Accessor for the above.
1007         * adaint.c (__gnat_error_attributes): New subprogram
1008         (__gnat_stat): Fix returned value (expect errno value)
1009         (__gnat_stat_to_attr): Add management of error component (set to
1010         stat errno value, except for missing files where it is set to 0,
1011         and exists is set to 0).
1012         * osint.ads (File_Attributes_Size): Update per change above,
1013         also clarify documentation.
1014         * s-filatt.ads: New file, binding to file attributes related
1015         functions.
1016         * Makefile.rtl (s-filatt): New runtime unit.
1017         * s-crtl.ads (strlen): Expose binding to GCC builtin (falls back
1018         to library function if not available on target).
1019         * s-os_lib.ads, s-os_lib.adb (Errno_Message): New subprogram.
1020         * s-oscons-tmplt.c (SIZEOF_struct_file_attributes,
1021         SIZEOF_struct_dirent_alloc): New constants.
1022         * Make-generated.in (s-oscons.ads): Now requires adaint.h.
1023         * a-direct.adb (Fetch_Next_Entry): Fix incorrect buffer sizes.
1024         Perform appropriate error checking if stat fails (do not just
1025         ignore existing files if stat fails)
1026         * gcc-interface/Make-lang.in (GNAT_ADA_OBJS, GNATBIND_OBJS): Update
1027         dependencies.
1029 2014-02-24  Hristian Kirtchev  <kirtchev@adacore.com>
1031         * sem_prag.adb (Analyze_Global_Item): Move the check concerning
1032         the use of volatile objects as global items in a function to
1033         the variable related checks section.
1034         * sem_util.adb (Async_Readers_Enabled): Directly call
1035         Has_Enabled_Property.
1036         (Async_Writers_Enabled): Directly call Has_Enabled_Property.
1037         (Effective_Reads_Enabled): Directly call Has_Enabled_Property.
1038         (Effective_Writes_Enabled): Directly call Has_Enabled_Property.
1039         (Has_Enabled_Property): Rename formal parameter State_Id to Item_Id.
1040         Update the comment on usage. State_Has_Enabled_Property how handles
1041         the original logic of the routine. Add processing for variables.
1042         (State_Has_Enabled_Property): New routine.
1043         (Variable_Has_Enabled_Property): New routine.
1045 2014-02-24  Robert Dewar  <dewar@adacore.com>
1047         * sinfo.ads, sem_ch12.adb, sem_res.adb, sem_ch4.adb, par-ch12.adb:
1048         Minor reformatting.
1049         * atree.ads, atree.adb (Node35): New function.
1050         (Set_Node35): New procedure.
1051         * debug.adb: Define new debug flag -gnatd.X.
1052         * einfo.ads, einfo.adb (Import_Pragma): New field.
1053         * freeze.adb (Wrap_Imported_Procedure): New procedure (not
1054         really active yet, has to be activated with -gnatd.X.
1055         * sem_prag.adb (Set_Imported): Set new Import_Pragma
1056         field (Set_Imported): Don't set Is_Public (see
1057         Freeze.Wrap_Imported_Subprogram)
1058         * par-ch3.adb (P_Component_List): Handle unexpected null component.
1060 2014-02-24  Yannick Moy  <moy@adacore.com>
1062         * sem_ch3.adb: Correct reference to SPARK RM in error messages.
1063         * gnat_rm.texi: Correct documentation of attribute Update.
1065 2014-02-24  Ed Schonberg  <schonberg@adacore.com>
1067         * sem_ch5.adb (Analyze_Iterator_Specification): Reject container
1068         iterator in older versions of Ada.
1070 2014-02-24  Gary Dismukes  <dismukes@adacore.com>
1072         * sem_ch5.adb, sem_aux.ads, sem_ch12.adb, gnat_ugn.texi, par.adb,
1073         par-ch12.adb: Change spelling 'parametrization' to 'parameterization'.
1075 2014-02-24  Ed Schonberg  <schonberg@adacore.com>
1077         * sinfo.ads, sinfo.adb: New attribute Generalized_Indexing, for
1078         indexed_components that are instances of Ada 2012 container
1079         indexing operations. Analysis and resolution of such nodes
1080         is performed on the attribute, and the original source is
1081         preserved for ASIS operations. If expansion is enabled, the
1082         indexed component is replaced by the value of this attribute,
1083         which is in a call to an Indexing aspect, in most case wrapped
1084         in a dereference operation.
1085         * sem_ch4.adb (Analyze_Indexed_Component): Create
1086         Generalized_Indexing attribute when appropriate.
1087         (Analyze_Call): If prefix is not overloadable and has an indexing
1088         aspect, transform into an indexed component so it can be analyzed
1089         as a potential container indexing.
1090         (Analyze_Expression): If node is an indexed component with a
1091         Generalized_ Indexing, do not re-analyze.
1092         * sem_res.adb (Resolve_Generalized_Indexing): Complete resolution
1093         of an indexed_component that has been transformed into a container
1094         indexing operation.
1095         (Resolve_Indexed_Component): Call the above when required.
1096         (Resolve): Do not insert an explicit dereference operation on
1097         an indexed_component whose type has an implicit dereference:
1098         the operation is inserted when resolving the related
1099         Generalized_Indexing.
1101 2014-02-24  Olivier Ramonat  <ramonat@adacore.com>
1103         * gnat_rm.texi, gnat_ugn.texi: Replace Ada Compiler by Ada Development
1104         Environment.
1106 2014-02-24  Hristian Kirtchev  <kirtchev@adacore.com>
1108         * sem_prag.adb (Check_Constituent_Usage): Remove leading spaces in
1109         error messages.
1110         (Inconsistent_Mode_Error): Remove leading spaces in error messages.
1111         Merge the expected and available mode errors.
1112         (Report_Unused_Constituents): Remove leading spaces in error messages.
1113         (Report_Unused_States): Remove leading spaces in error messages.
1115 2014-02-24  Thomas Quinot  <quinot@adacore.com>
1117         * par_sco.adb (Traverse_One): Refine categorization of statement
1118         SCOs.
1120 2014-02-24  Robert Dewar  <dewar@adacore.com>
1122         * aspects.ads, aspects.adb: Remove aspects Ada_2005 and Ada_2012,
1123         Pure_05, Pure_12 and Preelaborate_05.
1124         * gnat_rm.texi: Update accordingly.
1125         * sem_prag.adb: Document one argument form of Ada_05/Ada_2005
1126         pragmas Document one argument form of Ada_12/Ada_2012 pragmas
1127         Recognize one argument form of these pragmas only in GNAT mode
1128         (-gnatg).
1130 2014-02-24  Ed Schonberg  <schonberg@adacore.com>
1132         * s-dimmks.ads: Replace symbol for temperature, previously the
1133         Greek letter Theta, by the ASCII @ sign.
1134         * s-diflio.ads: ditto.
1136 2014-02-24  Robert Dewar  <dewar@adacore.com>
1138         * exp_ch4.adb: Minor code reorganization (use OR for boolean
1139         variables).
1140         * sem_ch3.adb, sem_prag.adb, freeze.adb: Minor reformatting.
1142 2014-02-24  Ben Brosgol  <brosgol@adacore.com>
1144         * gnat_ugn.texi, projects.texi: Added the necessary conditionalization
1145         so that references to gnatmem and ASIS tools do not appear in the FSF
1146         edition of the GNAT User's Guide.
1148 2014-02-24  Yannick Moy  <moy@adacore.com>
1150         * freeze.adb (Freeze_Entity): Do not issue warning
1151         for pre/post being ignored on imported subprogram in GNATprove
1152         mode.
1154 2014-02-24  Robert Dewar  <dewar@adacore.com>
1156         * exp_ch5.adb, sem_ch5.adb, sem_type.adb, sem_res.adb, sem_attr.adb,
1157         stand.ads, sem_eval.adb: Minor reformatting.
1159 2014-02-24  Yannick Moy  <moy@adacore.com>
1161         * sem_prag.adb: Minor rewording in error message.
1163 2014-02-24  Johannes Kanig  <kanig@adacore.com>
1165         * exp_util.adb (Expand_Subtype_From_Expr): Do not expand subtypes in
1166         GNATprove_mode, gnat2why doesn't need nor use these types.
1168 2014-02-24  Gary Dismukes  <dismukes@adacore.com>
1170         * exp_ch4.adb (Expand_N_Op_Expon): On the AAMP
1171         target, in the case of signed integer exponentiation that uses a
1172         run-time routine, always select the Exp_* versions, since overflow
1173         checking is automatically done by AAMP arithmetic instructions.
1175 2014-02-24  Hristian Kirtchev  <kirtchev@adacore.com>
1177         * sem_ch13.adb (Analyze_Aspect_Specifications):
1178         When the related context is a package instace, insert pragma
1179         Abstract_State after all internally-generated renamings related
1180         to the instance "header".
1182 2014-02-24  Ed Schonberg  <schonberg@adacore.com>
1184         * sem_ch3.adb (Analyze_Declarations): Analyze Contract of abstract
1185         subprograms.
1186         * sem_disp.adb (Check_Dispatching_Context): A non-dispatching
1187         call to an abstract subprogram is legal if it appears in a
1188         pre/postcondition of another abstract operation.
1190 2014-02-24  Sergey Rybin  <rybin@adacore.com frybin>
1192         * gnat_ugn.texi: Misc updates.
1194 2014-02-24  Hristian Kirtchev  <kirtchev@adacore.com>
1196         * exp_prag.adb (Expand_Old): Set the type of the generated temporary.
1198 2014-02-24  Gary Dismukes  <dismukes@adacore.com>
1200         * layout.adb (Layout_Variant_Record): Instantiate
1201         Generic_Check_Choices and call Check_Choices before calling
1202         Build_Discr_Checking_Funcs, since we need Others_Discrete_Choices
1203         set to prevent generating incorrect discriminant-checking
1204         functions for 'others' variants (functions that unconditionally
1205         return True rather than accounting for the values covered by the
1206         'others' choice).
1207         * sem_eval.ads (Subtypes_Statically_Compatible): Add formal
1208         Formal_Derived_Matching.
1209         (Subtypes_Statically_Match): Add formal Formal_Derived_Matching.
1210         * sem_eval.adb (Subtypes_Statically_Compatible): Pass new
1211         Formal_Derived_Matching formal to Subtypes_Statically_Match.
1212         (Subtypes_Statically_Match): Suppress the Object_Size matching
1213         test in the case where Formal_Derived_Matching is True.
1214         * sem_ch12.adb (Validate_Derived_Type_Instance): Pass
1215         True for Formal_Derived_Matching_Formal on the call to
1216         Subtypes_Statically_Compatible.
1218 2014-02-23  Eric Botcazou  <ebotcazou@adacore.com>
1220         * gcc-interface/Make-lang.in (ADA_TOOLS_FLAGS_TO_PASS): Robustify.
1222 2014-02-23  Eric Botcazou  <ebotcazou@adacore.com>
1224         * gcc-interface/utils2.c (build_simple_component_ref): Fix formatting.
1225         Look through a conversion between original and packable version to get
1226         the base object.
1227         (build_component_ref): Rework comment and fix formatting.
1229 2014-02-20  Sergey Rybin  <rybin@adacore.com frybin>
1231         * gnat_ugn.texi, vms_data.ads (gnatelim): Add description of
1232         project-specific options.
1234 2014-02-20  Ed Schonberg  <schonberg@adacore.com>
1236         * a-cbdlli.adb (Insert): When capacity exceeded, raise Capacity_Error,
1237         not Constraint_Error.
1238         * a-cbmutr.adb (Append_Child, Insert_Child, Prepend_Child): Ditto.
1239         * sem_ch5.adb: Code clean up.
1241 2014-02-20  Hristian Kirtchev  <kirtchev@adacore.com>
1243         * sem_prag.adb (Usage_Error): Remove local
1244         constant Typ. Remove the specialized diagnostics for unconstrained
1245         or tagged items as those are not part of the explicit input set
1246         of the related subprogram and should not be flagged.
1248 2014-02-20  Ed Schonberg  <schonberg@adacore.com>
1250         * sem_attr.adb: Add guard to preserve all errors.
1252 2014-02-20  Vincent Celier  <celier@adacore.com>
1254         * switch-m.adb (Normalize_Compiler_Switches): Take into account
1255         switches that are recorded in ALI files: -gnateA, -gnateE,
1256         -gnateF, -gnateinn, -gnateu, -gnateV and -gnateY.
1258 2014-02-20  Ed Schonberg  <schonberg@adacore.com>
1260         * sem_ch5.adb (Analyze_Iterator_Specification): Check legality
1261         of an element iterator form over a formal container with an
1262         Iterable aspect.
1263         * exp_ch5.adb (Build_Formal_Container_Iteration): Utility
1264         to create declaration and loop statements for both forms of
1265         container iterators.
1266         (Expand_Formal_Container_Element_Iterator): New procedure
1267         to handle loops of the form  "for E of C" when C is a formal
1268         container.
1269         (Expand_Formal_Container_Iterator): Code cleanup.
1271 2014-02-20  Hristian Kirtchev  <kirtchev@adacore.com>
1273         * sem_prag.adb (Add_Item_To_Name_Buffer): New routine.
1274         (Analyze_Contract_Case): Remove the use of
1275         "may". Replace "aspect Contract_Cases" to avoid categorization
1276         of aspect vs pragma.
1277         (Analyze_External_Property_In_Decl_Part): Remove the use of "formal".
1278         (Analyze_Global_Item): Remove
1279         the use of "formal", specify the subprogram.  Split the
1280         error message about a state with visible refinement into
1281         two. Remove the use of "global" from "volatile global item".
1282         (Analyze_Initialization_Item): Ensure that the SPARK RM reference
1283         is on one line.
1284         (Analyze_Input_Output): Update the call to
1285         Check_Mode. Specify the duplicated item. Reword the error
1286         message concerning an input of a null output list. Use "\"
1287         for error message continuation.
1288         (Analyze_Part_Of): Remove
1289         the use of "may". Use "\" for error message continuation.
1290         (Analyze_Refined_Depends_In_Decl_Part): Update the error
1291         message concerning a useless refinement to match the format
1292         of Refined_Global.
1293         (Analyze_Refined_Global_In_Decl_Part): Reword the error message
1294         concerning a useless refinement.
1295         (Analyze_Refinement_Clause): Use "\" for error message continuation.
1296         (Check_Constituent_Usage): Use "\" for error message continuation.
1297         (Check_Dependency_Clause): Use "\" for error message continuation.
1298         (Check_Matching_Constituent): Use "\" for error message continuation.
1299         (Check_Missing_Part_Of): Use "\" for error message continuation.
1300         (Check_Mode): Renamed to
1301         Check_Role. Update the comment on usage. Redo the error reporting
1302         to use Role_Error.
1303         (Check_Mode_Restriction_In_Enclosing_Context): Use "\" for error
1304         message continuation.
1305         (Find_Mode): Renamed to Find_Role. Update the parameter profile along
1306         with comment on usage. Update all occurrences of Is_Input and Is_Output.
1307         (Inconsistent_Mode_Error): Use "\" for error message continuation.
1308         (Input_Match): Use "\" for error message continuation.
1309         (Role_Error): New routine.
1310         (Set_Convention_From_Pragma): Use "\" for error message continuation.
1311         (Usage_Error): Add local variable Error_Msg. Build specialized error
1312         message showcasing the offending item kind. Redo the diagnostics for
1313         unconstrained types.
1315 2014-02-20  Ed Schonberg  <schonberg@adacore.com>
1317         * exp_util.adb (Is_Iterated_Container): Use high-level primitives
1318         to determine whether a type is a container type, rather than
1319         examining only its type declaration, so that subtypes and derived
1320         types are handled properly.
1322 2014-02-20  Sergey Rybin  <rybin@adacore.com frybin>
1324         * gnat_ugn.texi: gnatmetric: add description of project-specific
1325         options.
1327 2014-02-20  Ed Schonberg  <schonberg@adacore.com>
1329         * sem_attr.adb (Analyze_Attribute, case 'Update): Verify that
1330         all choices in an association for a record type have the same
1331         type, as is done for record aggregates.
1333 2014-02-20  Robert Dewar  <dewar@adacore.com>
1335         * a-cborma.adb, a-cbhama.adb, a-cbdlli.adb, a-cbmutr.adb: Use pragma
1336         Unmodified rather than Warnings (Off). Make comments
1337         uniform in the four affected units.
1339 2014-02-20  Robert Dewar  <dewar@adacore.com>
1341         * sem_ch13.adb (Analyze_Attribute_Definition_Clause, case
1342         Object_Size): For non-scalar types allow any value that is a
1343         multiple of 8.
1344         * gnat_rm.texi: Document Object_Size for composites more clearly.
1346 2014-02-20  Yannick Moy  <moy@adacore.com>
1348         * sem_util.ads, sem_util.adb (Default_Initialization): Remove function.
1350 2014-02-20  Ed Schonberg  <schonberg@adacore.com>
1352         * stand.ads: Raise_Type: new predefined entity, used as the type
1353         of a Raise_Expression prior to resolution.
1354         * cstand.adb: Build entity for Raise_Type.
1355         * sem_ch11.adb (Analyze_Raise_Expression): use Raise_Type as the
1356         initial type of the node.
1357         * sem_type.adb (Covers): Raise_Type is compatible with all
1358         other types.
1359         * sem_res.adb (Resolve): Remove special handling of Any_Type on
1360         Raise_Expression nodes.
1361         (Resolve_Raise_Expression): Signal ambiguity if the type of the
1362         context is still Raise_Type.
1364 2014-02-20  Robert Dewar  <dewar@adacore.com>
1366         * sem_ch12.adb (Validate_Access_Type_Instance): Add message if
1367         mismatching predicates.
1368         * sem_ch6.adb (Check_Conformance): Give better messages on
1369         predicate mismatch.
1370         * sem_eval.adb (Predicates_Match): Move to spec.
1371         * sem_eval.ads (Predicates_Match): Moved here from body.
1373 2014-02-20  Ed Schonberg  <schonberg@adacore.com>
1375         * a-cbmutr.adb: Use default value in Insert_Child.
1377 2014-02-20  Vincent Celier  <celier@adacore.com>
1379         * gnatcmd.adb, make.adb, prj-makr.adb, clean.adb: Call
1380         Stringt.Initialize in all project aware tools.
1382 2014-02-20  Doug Rupp  <rupp@adacore.com>
1384         * gnat_ugn.texi: Document gnatbind -X option.
1385         * vms_data.ads: Minor warnings documentation reformatting.
1387 2014-02-20  Ed Schonberg  <schonberg@adacore.com>
1389         * exp_ch3.adb (Expand_Freeze_Array_Type): Only create invariant
1390         procedure for a base type.
1392 2014-02-20  Robert Dewar  <dewar@adacore.com>
1394         * sem_ch4.adb (Analyze_Case_Expression): Get type from first
1395         expression with type info.
1396         * sem_ch13.adb: Minor reformatting.
1397         * sem_eval.adb (Subtypes_Statically_Match): Make sure we return
1398         False if predicates do not match on the two types.
1400 2014-02-20  Arnaud Charlet  <charlet@adacore.com>
1402         * sem_prag.adb (Analyze_Pragma [pragma Attach_Handler]):
1403         In Relaxed_RM_Semantics mode, allow any static integer value,
1404         for compatibility with other compilers.
1406 2014-02-20  Vincent Celier  <celier@adacore.com>
1408         * errutil.adb (Initialize): Properly initialize entry in table
1409         Warnings when warnings are suppressed.
1411 2014-02-20  Robert Dewar  <dewar@adacore.com>
1413         * s-os_lib.ads: Add warning about non-portability of Rename_File.
1414         * sem_util.ads, sem_util.adb (Is_Junk_Name): New function.
1415         * sem_warn.adb: Use Is_Junk_Name to suppress some warnings.
1416         * gnat_ugn.texi: Document no warnings on junk variable names.
1417         * layout.adb: Minor code reorganization (use Ekind_In).
1418         * stringt.adb: Move initialization of Null_String_Id to Initialize
1419         routine.
1421 2014-02-20  Ed Schonberg  <schonberg@adacore.com>
1423         * sem_ch13.adb: Initialize optional Element_Id.
1425 2014-02-20  Robert Dewar  <dewar@adacore.com>
1427         * s-os_lib.ads (Rename_File): Minor commment addition.
1429 2014-02-20  Thomas Quinot  <quinot@adacore.com>
1431         * einfo.ads: Minor reformatting.
1433 2014-02-20  Hristian Kirtchev  <kirtchev@adacore.com>
1435         * aspects.adb (Exchange_Aspects): New routine.
1436         * aspects.ads (Exchange_Aspects): New routine.
1437         * atree.adb (Rewrite): Do not check whether the save node has
1438         aspects as it never will, instead check the node about to be clobbered.
1439         * einfo.adb (Write_Field25_Name): Abstract_States can appear in
1440         entities of generic packages.
1441         * sem_ch6.adb (Analyze_Expression_Function): Fix the parent
1442         pointer of an aspect specification list after rewriting takes place.
1443         * sem_ch7.adb (Analyze_Package_Body_Helper): Swap the aspect
1444         specifications of the generic template and the copy used for analysis.
1445         * sem_ch12.adb (Analyze_Generic_Package_Declaration): Swap
1446         the aspect specifications of the generic template and the
1447         copy used for analysis.
1448         (Analyze_Package_Instantiation): Propagate the aspect specifications
1449         from the generic template to the instantiation.
1450         (Build_Instance_Compilation_Unit_Nodes): Propagate the aspect
1451         specifications from the generic template to the instantiation.
1452         * sem_ch13.adb (Analyze_Aspect_Specifications): Handle aspects
1453         Abstract_State, Initializes and Initial_Condition when they
1454         apply to a package instantiation.
1456 2014-02-20  Robert Dewar  <dewar@adacore.com>
1458         * stringt.adb: Add call to Initialize in package initialization.
1460 2014-02-20  Robert Dewar  <dewar@adacore.com>
1462         * a-crbtgk.adb, a-cihama.adb, a-coinve.adb, a-ciorse.adb, a-crbtgo.adb,
1463         a-cidlli.adb, a-cimutr.adb, a-cihase.adb, a-cohama.adb, a-coorse.adb,
1464         a-chtgke.adb, a-chtgop.adb, a-comutr.adb, a-ciorma.adb, a-cobove.adb,
1465         a-convec.adb, a-cohase.adb, a-chtgbk.adb, a-chtgbo.adb: Minor
1466         reformatting.
1468 2014-02-20  Bob Duff  <duff@adacore.com>
1470         * s-os_lib.ads: Minor: Remove incorrect comment.
1472 2014-02-20  Robert Dewar  <dewar@adacore.com>
1474         * sem_elab.adb (Check_Elab_Assign): Clearer warning message.
1476 2014-02-20  Ed Schonberg  <schonberg@adacore.com>
1478         * a-cborma.adb (Assign): When creating a node without a specified
1479         element, insert an uninitialized element in the map, because
1480         the instance may provide an element type with a default
1481         initialization, e.g a scalar with a Default_Value aspect.
1482         * a-cbhama.adb (Assign_Key): Remove useless Allocate procedure.
1483         (Insert): In the version without explicit element, provide an
1484         uninitialized element, as above.
1485         * a-cbdlli.adb (Append): In the version without explicit element,
1486         provide an uninitalized element, as above.
1487         (Allocate): Remove unused version.
1489 2014-02-20  Robert Dewar  <dewar@adacore.com>
1491         * sem_elab.adb: Minor code reorganization (use Nkind_In).
1492         * stringt.adb: Remove temporary pragma Warnings (Off).
1493         * stringt.ads: Add pragma Elaborate_Body to ensure initialization
1494         of Null_String_Id.
1496 2014-02-20  Matthew Heaney  <heaney@adacore.com>
1498         * a-chtgbk.adb (Replace): Use correct offset when calculating bucket
1499         index.
1501 2014-02-20  Ed Schonberg  <schonberg@adacore.com>
1503         * sem_ch5.adb (Analyze_Iterator_Specification): Initialize
1504         properly the cursor type for subsequent volatile testing in SPARK
1505         mode, when domain is a formal container with an Iterabe aspect.
1507 2014-02-20  Robert Dewar  <dewar@adacore.com>
1509         * errout.adb (Set_Warnings_Mode_Off): Add Reason argument.
1510         (Set_Specific_Warning_Off): Add Reason argument.
1511         * errout.ads (Set_Warnings_Mode_Off): Add Reason argument.
1512         (Set_Specific_Warning_Off): Add Reason argument.
1513         * erroutc.adb (Warnings_Entry): Add Reason field
1514         (Specific_Warning_Entry): Add Reason field.
1515         (Warnings_Suppressed): return String_Id for Reason.
1516         (Warning_Specifically_Suppressed): return String_Id for Reason.
1517         * erroutc.ads (Warnings_Entry): Add Reason field.
1518         (Specific_Warning_Entry): Add Reason field.
1519         (Set_Specific_Warning_Off): Add Reason argument.
1520         (Set_Warnings_Mode_Off): Add Reason argument.
1521         (Warnings_Suppressed): return String_Id for Reason.
1522         (Warning_Specifically_Suppressed): return String_Id for Reason.
1523         * errutil.adb (Warnings_Suppressed): returns String_Id for Reason
1524         (Warning_Specifically_Suppressed): returns String_Id for Reason
1525         * gnat_rm.texi: Document that Warning parameter is string literal
1526         or a concatenation of string literals.
1527         * par-prag.adb: New handling for Reason argument.
1528         * sem_prag.adb (Analyze_Pragma, case Warning): New handling
1529         for Reason argument.
1530         * sem_util.ads, sem_util.adb (Get_Reason_String): New procedure.
1531         * sem_warn.ads (Warnings_Off_Entry): Add reason field.
1532         * stringt.adb: Set Null_String_Id.
1533         * stringt.ads (Null_String_Id): New constant.
1535 2014-02-20  Robert Dewar  <dewar@adacore.com>
1537         * einfo.ads: Minor comment addition: Etype of package is
1538         Standard_Void_Type.
1539         * checks.adb, exp_aggr.adb, exp_atag.adb, exp_attr.adb, exp_ch13.adb,
1540         exp_ch2.adb, exp_ch3.adb, exp_ch4.adb, exp_ch5.adb, exp_ch6.adb,
1541         exp_ch7.adb, exp_ch9.adb, exp_dbug.adb, exp_disp.adb, exp_imgv.adb,
1542         exp_intr.adb, exp_prag.adb, exp_sel.adb, exp_strm.adb, exp_util.adb,
1543         freeze.adb, rtsfind.adb, sem_aggr.adb, sem_attr.adb, sem_ch10.adb,
1544         sem_ch12.adb, sem_ch13.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
1545         sem_ch6.adb, sem_ch8.adb, sem_dim.adb, sem_prag.adb, sem_res.adb,
1546         sem_util.adb, tbuild.adb, tbuild.ads: Remove New_Reference_To.
1547         Replace all calls with calls to New_Occurrence_Of.
1549 2014-02-20  Robert Dewar  <dewar@adacore.com>
1551         * par-util.adb (Ignore, case of right paren): Make this a
1552         serious error.
1554 2014-02-19  Robert Dewar  <dewar@adacore.com>
1556         * sem_ch5.adb, sem_prag.adb, sem_attr.adb: Minor reformatting.
1557         * debug.adb: Remove -gnatd.X switch, no longer used.
1558         * styleg.adb (Check_Then): Remove check of -gnatd.X, check is
1559         now always made.
1561 2014-02-19  Bob Duff  <duff@adacore.com>
1563         * g-socket.ads: Minor: Correct some comments.
1565 2014-02-19  Ed Schonberg  <schonberg@adacore.com>
1567         * sem_ch5.adb: Inhibit iterator rewriting in ASIS mode.
1569 2014-02-19  Arnaud Charlet  <charlet@adacore.com>
1571         * sem_ch13.adb (Analyze_Aspect_Specifications): Do not generate
1572         an error on out of range priorities if Relaxed_RM_Semantics.
1573         * sem_prag.adb (Analyze_Pragma): Ditto.
1575 2014-02-19  Bob Duff  <duff@adacore.com>
1577         * sem_attr.adb (Resolve_Attribute): Detect the case of F'Access
1578         where F denotes the renaming of an enumeration literal, and
1579         issue a specialized error message.
1581 2014-02-19  Matthew Heaney  <heaney@adacore.com>
1583         * a-chtgop.ads (Checked_Index): New operation.
1584         (Next): Changed mode of hash table.
1585         * a-chtgop.adb (Adjust, Delete_Node_Sans_Free): Detect tampering
1586         (Generic_Read, Reserve_Capacity): Ditto.
1587         (Generic_Equal): Detect tampering.
1588         (Next): Changed mode of hash table, detect tampering.
1589         * a-chtgke.ads (Checked_Index, Checked_Equivalent_Keys): New
1590         operation.
1591         (Find): Changed mode of hash table.
1592         * a-chtgke.adb (Checked_Equivalent_Keys): New operation
1593         (Delete_Key_Sans_Free, Generic_Conditional_Insert): Detect
1594         tampering.
1595         (Find): Changed mode of hash table, check for tampering.
1596         (Generic_Replace_Element): Check for tampering.
1597         * a-chtgbk.ads (Checked_Index, Checked_Equivalent_Keys): New operation.
1598         * a-chtgbk.adb (Checked_Index, Checked_Equivalent_Keys): New
1599         operation (Delete_Key_Sans_Free, Generic_Conditional_Insert):
1600         Detect tampering.
1601         (Find, Generic_Replace_Element): Check for tampering.
1602         * a-chtgbo.ads (Checked_Index): New operation.
1603         * a-chtgbo.adb (Checked_Index): New operation
1604         (Delete_Node_Sans_Free, Generic_Equal): Detect tampering.
1605         (Generic_Read, Next): Ditto.
1606         * a-cohase.adb, a-cihase.adb (Is_In): Changed mode of hash
1607         table (Difference, Intersection): Use variable view of
1608         source, detect tampering (Find, Is_Subset, Overlap): Use
1609         variable view of container (Symmetric_Difference, Union):
1610         Detect tampering (Vet): Use Checked_Index to detect tampering
1611         (Constant_Reference, Element, Find): Use variable view of
1612         container.
1613         (Update_Element_Preserving_Key): Detect tampering.
1614         * a-cbhase.adb (Difference, Find, Is_In): Use variable view
1615         of container.
1616         (Is_Subset): Ditto.
1617         (Equivalent_Sets, Overlap): Use Node's Next component.
1618         (Vet): Use Checked_Index to detect tampering.
1619         (Constant_Reference, Element, Find): Use variable view of container.
1620         (Update_Element_Preserving_Key): Detect tampering.
1621         * a-cohama.adb, a-cihama.adb, a-cbhama.adb (Constant_Reference,
1622         Element, Find): Use variable view of container.
1623         (Reference): Rename hash table component.
1624         (Vet): Use Checked_Index to detect tampering.
1626 2014-02-19  Arnaud Charlet  <charlet@adacore.com>
1628         * adabkend.adb (Scan_Compiler_Arguments): Add missing handling
1629         of -nostdinc.
1631 2014-02-19  Thomas Quinot  <quinot@adacore.com>
1633         * tbuild.adb (New_Occurrence_Of, New_Rerefence_To): Guard
1634         against calls without Def_Id.
1636 2014-02-19  Claire Dross  <dross@adacore.com>
1638         * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads, a-cforse.ads,
1639         a-cofove.ads: Add global annotations to subprograms.
1641 2014-02-19  Hristian Kirtchev  <kirtchev@adacore.com>
1643         * sem_prag.adb (Analyze_Initial_Condition_In_Decl_Part): Remove
1644         constants Errors, Pack_Id and Pack_Init. Remove variable Vars.
1645         Initial_Condition no longer requires the presence of pragma
1646         Initialized. Do not try to diagnose whether all variables mentioned in
1647         pragma Initializes also appear in Initial_Condition.
1648         (Collect_Variables): Removed.
1649         (Match_Variable): Removed.
1650         (Match_Variables): Removed.
1651         (Report_Unused_Variables): Removed.
1653 2014-02-19  Thomas Quinot  <quinot@adacore.com>
1655         * gnat_rm.texi (pragma Stream_Convert): Minor rewording.
1657 2014-02-19  Robert Dewar  <dewar@adacore.com>
1659         * sem_util.adb, sem_util.ads, prj-conf.adb, s-os_lib.adb: Minor
1660         reformatting.
1662 2014-02-19  Vincent Celier  <celier@adacore.com>
1664         * prj-part.adb (Parse_Single_Project): Use the fully resolved
1665         project path, with all symbolic links resolved, to check if the
1666         same project is imported with a different unresolved path.
1667         * prj-tree.ads (Project_Name_And_Node): Component Canonical_Path
1668         changed to Resolved_Path to reflect that all symbolic links
1669         are resolved.
1671 2014-02-19  Ed Schonberg  <schonberg@adacore.com>
1673         * sem_util.ads, sem_util.adb (Get_Cursor_Type): Moved to sem_util
1674         from sem_ch13, for use elsewhere.
1675         * sem_ch13.adb (Get_Cursor_Type): Moved to sem_util.
1676         * sem_ch5.adb (Analyze_Iterator_Specification): Set properly the
1677         cursor type on the loop variable when the iteration is over o
1678         formal container.
1680 2014-02-19  Vincent Celier  <celier@adacore.com>
1682         * prj-conf.adb (Add_Default_GNAT_Naming_Scheme): Add declaration
1683         for an empty Target (Check_Target): Never fail when an empty
1684         target is declared in the configuration project.
1686 2014-02-19  Ed Schonberg  <schonberg@adacore.com>
1688         * sem_prag.adb (Check_Arg_Is_Local_Name): Argument is local if
1689         the pragma comes fron a predicate aspect and the context is a
1690         record declaration within the scope that declares the type.
1692 2014-02-19  Robert Dewar  <dewar@adacore.com>
1694         * gnat_rm.texi: Minor clarifications.
1695         * expander.adb, sem_aggr.adb: Add comments.
1697 2014-02-19  Ed Schonberg  <schonberg@adacore.com>
1699         * sem_prag.adb (Check_Arg_Is_Local_Name): For an aspect that
1700         applies to a subprogram body, the name is the current scope,
1701         rather than being declared in the current scope.
1702         (Analyze_Pragma, case No_Return): Handle properly a No_Return
1703         aspect applied to a subprogram body.
1705 2014-02-19  Ed Schonberg  <schonberg@adacore.com>
1707         * sem_ch13.adb (Resolve_Iterable_Operation): Improve resolution
1708         of overloaded subprograms, and fix bug in handling of primitive
1709         operation Element.
1711 2014-02-19  Pascal Obry  <obry@adacore.com>
1713         * s-os_lib.adb: Minor reformatting.
1715 2014-02-19  Yannick Moy  <moy@adacore.com>
1717         * expander.adb (Expand): Do nothing inside generics.
1718         * sem_aggr.adb (Aggregate_Constraint_Checks): Do nothing inside
1719         generics.
1721 2014-02-19  Yannick Moy  <moy@adacore.com>
1723         * exp_ch2.adb: Remove useless 'with' of unit Uintp.
1725 2014-02-19  Robert Dewar  <dewar@adacore.com>
1727         * sem_ch3.adb, style.adb, sem_prag.adb, sem_ch13.adb: Minor reformatting
1728         * a-sequio.adb: Remove useless pragma Extensions_Allowed (no
1729         longer needed).
1731 2014-02-19  Claire Dross  <dross@adacore.com>
1733         * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
1734         a-cforse.ads, a-cofove.ads: Add Iterable aspect to formal containers.
1736 2014-02-19  Hristian Kirtchev  <kirtchev@adacore.com>
1738         * sem_ch3.adb (Analyze_Declarations): Analyze
1739         a package contract at the end of the private declarations (if
1740         applicable), otherwise analyze it and the end of the visible
1741         declarations.
1743 2014-02-19  Ed Schonberg  <schonberg@adacore.com>
1745         * style.adb (Missing_Overriding): If subprogram is an
1746         instantiation, place warning on the instance node itself,
1747         without mention of the original generic. Do not emit message
1748         if explicit Ada version is older than the introduction of the
1749         overriding indicator.
1751 2014-02-19  Yannick Moy  <moy@adacore.com>
1753         * gnat_rm.texi: Doc clarifications.
1755 2014-02-19  Yannick Moy  <moy@adacore.com>
1757         * exp_util.adb (Remove_Side_Effects): Do not remove side-effects
1758         inside a generic.
1760 2014-02-19  Ed Schonberg  <schonberg@adacore.com>
1762         * sem_ch13.adb (Get_Cursor_Type): Obtain cursor type from
1763         specified First primitive, rather than by name.
1764         (Validate_Iterable_Aspect, Resolve_Iterable_Operation): Use it,
1765         and extend error checking for missing primitives and incorrect
1766         signatures.
1768 2014-02-19  Ed Schonberg  <schonberg@adacore.com>
1770         * sem_ch3.adb (Check_Pragma_Implemented): Detect additional
1771         errors when a Synchronization aspect on an overriding protected
1772         operation does not match the given aspect on the overridden
1773         operation of an ancestor interface.
1775 2014-02-19  Hristian Kirtchev  <kirtchev@adacore.com>
1777         * sem_prag.adb (Check_Loop_Pragma_Grouping): New routine.
1778         (Check_Loop_Pragma_Placement): Update
1779         comment on usage. Remove local variables Orig_Stmt and
1780         Within_Same_Sequence. Check that the current Loop_Invariant or
1781         Loop_Variant pragma is grouped together with other such pragmas.
1782         (Is_Loop_Pragma): New routine.
1783         (Prev_In_Loop): Removed.
1785 2014-02-19  Robert Dewar  <dewar@adacore.com>
1787         * par-ch6.adb (P_Return): For extended return, end column lines
1788         up with RETURN.
1789         * par.adb: Minor documentation clarification.
1791 2014-02-19  Yannick Moy  <moy@adacore.com>
1793         * sem_prag.adb (Check_Loop_Pragma_Placement): Add check
1794         that Loop_Invariant and Loop_Variant appear consecutively.
1795         * gnat_rm.texi Update documentation of Loop_Invariant and
1796         Loop_Variant pragmas.
1798 2014-02-19  Robert Dewar  <dewar@adacore.com>
1800         * debug.adb: Document -gnatd.X.
1801         * par-ch5.adb (P_If_Statement): Always check THEN, even if not
1802         first token
1803         (Check_Then_Column): Ditto.
1804         * styleg.adb (Check_Then): Allow THEN on line after IF.
1805         (Check_Then): Check THEN placement under control of -gnatd.X
1806         * styleg.ads (Check_Then): Now called even if THEN is not first
1807         token on line.
1808         * stylesw.ads (Style_Check_If_Then_Layout): Document new
1809         relaxed rules.
1810         * gnat_ugn.texi: For -gnatyi, THEN can now be on line after IF.
1812 2014-02-19  Robert Dewar  <dewar@adacore.com>
1814         * a-cfhama.adb, a-cfhase.adb, a-cforse.adb, a-cofove.adb, a-ngcefu.adb,
1815         a-teioed.adb, a-wtedit.adb, a-ztedit.adb, exp_ch5.adb, inline.adb,
1816         prj-pp.adb, prj-tree.adb, sem_ch12.adb, sem_ch8.adb,
1817         vms_conv.adb: Fix bad layout of IF statements
1819 2014-02-19  Robert Dewar  <dewar@adacore.com>
1821         * exp_util.adb (Side_Effect_Free): Scalar if expressions can be SEF.
1823 2014-02-19  Robert Dewar  <dewar@adacore.com>
1825         * exp_util.adb: Update comments.
1827 2014-02-19  Doug Rupp  <rupp@adacore.com>
1829         * bindgen.adb (Gen_Adainit) [VMS] New global Float_Format.
1830         * init.c (__gl_float_format): [VMS] New global.
1831         (__gnat_set_features): Call FP_CONTROL to set FPSR for the float
1832         representation in effect.
1834 2014-02-19  Hristian Kirtchev  <kirtchev@adacore.com>
1836         * exp_ch6.adb Add with and use clause for Exp_Prag.
1837         (Expand_Contract_Cases): Relocated to Exp_Prag.
1838         * exp_ch6.ads (Expand_Contract_Cases): Relocated to Exp_Prag.
1839         * exp_prag.adb Add with and use clauses for Checks and Validsw.
1840         (Expand_Contract_Cases): Relocated from Exp_Ch6. Update the
1841         structure of the expanded code to showcase the evaluation of
1842         attribute 'Old prefixes. Add local variable Old_Evals. Expand
1843         any attribute 'Old references found within a consequence. Add
1844         circuitry to evaluate the prefixes of attribute 'Old that
1845         belong to a selected consequence.
1846         (Expand_Old_In_Consequence): New routine.
1847         * exp_prag.ads (Expand_Contract_Cases): Relocated from Exp_Ch6.
1848         * sem_attr.adb (Check_Use_In_Contract_Cases): Warn that a
1849         potentially unevaluated prefix is always evaluated.
1851 2014-02-19  Robert Dewar  <dewar@adacore.com>
1853         * exp_attr.adb (Expand_Min_Max_Attribute): Use Insert_Declaration
1854         (Expand_Min_Max_Attribute): Use Matching_Standard_Type.
1855         * exp_ch4.adb (Expand_N_Expression_With_Actions): Remove special
1856         handling for the case of Modify_Tree_For_C, this approach did
1857         not work.
1858         * exp_util.adb (Matching_Standard_Type): New function
1859         (Side_Effect_Free): New top level functions (from
1860         Remove_Side_Effects).
1861         * exp_util.ads (Side_Effect_Free): New top level functions
1862         (moved from body).
1863         * sinfo.ads: Minor comment updates.
1865 2014-02-19  Ed Schonberg  <schonberg@adacore.com>
1867         * exp_ch6.adb (Expand_Simple_Function_Return): If return
1868         type is unconstrained and uses the secondary stack, mark the
1869         enclosing function accordingly, to ensure that the value is not
1870         prematurely removed.
1872 2014-02-19  Hristian Kirtchev  <kirtchev@adacore.com>
1874         * par.adb Alphabetize the routines in Par.Sync.
1875         (Resync_Past_Malformed_Aspect): New routine.
1876         * par-ch13.adb (Get_Aspect_Specifications): Alphabetize local
1877         variables. Code and comment reformatting. Detect missing
1878         parentheses on aspects [Refined_]Global and [Refined_]Depends
1879         with a non-null definition.
1880         * par-sync.adb: Alphabetize all routines in this separate unit.
1881         (Resync_Past_Malformed_Aspect): New routine.
1883 2014-02-19  Robert Dewar  <dewar@adacore.com>
1885         * sem_eval.ads, sem_eval.adb (Subtypes_Statically_Match): Return False
1886         if Esize values do not match.
1888 2014-02-19  Yannick Moy  <moy@adacore.com>
1890         * sinfo.ads: Minor comment update.
1892 2014-02-19  Hristian Kirtchev  <kirtchev@adacore.com>
1894         * atree.ads: Minor reformatting (change Entity_Info to Einfo).
1896 2014-02-19  Thomas Quinot  <quinot@adacore.com>
1898         * exp_ch7.adb (Find_Node_To_Be_Wrapped): An assignment statement
1899         that has the No_Ctrl_Actions flag is a suitable node to be
1900         wrapped if the assigned expression has no finalization actions.
1901         * sem_eval.adb (Eval_Entity_Name): For a compile time known
1902         boolean value, mark the corresponding condition SCO as constant.
1904 2014-02-19  Robert Dewar  <dewar@adacore.com>
1906         * exp_util.adb: Minor reformatting.
1907         * exp_util.ads (Matching_Standard_Type): New function.
1908         * exp_ch7.adb: Minor reformatting.
1910 2014-02-19  Ed Schonberg  <schonberg@adacore.com>
1912         * sem_ch13.adb (Get_Cursor_Type): Use scope of iterable type
1913         to find declaration for Cursor, to handle properly the case of
1914         a discriminated iterable type.
1916 2014-02-19  Vincent Celier  <celier@adacore.com>
1918         * gnatcmd.adb (GNATCmd): Always replace the object dirs of
1919         imported library projects with the library ALI dirs, when setting
1920         the object paths.
1921         * prj-env.ads (Ada_Objects_Path): Correct comments about
1922         argument Including_Libraries.
1924 2014-02-19  Gary Dismukes  <dismukes@adacore.com>
1926         * gnat_rm.texi: Minor spelling fixes.
1928 2014-02-19  Doug Rupp  <rupp@adacore.com>
1930         * init.c: Remove unneeded code.
1931         * fe.h (Float_Format): New macro
1932         * gcc-interface/trans.c (gigi): On VMS, set vms_float_format.
1934 2014-02-19  Hristian Kirtchev  <kirtchev@adacore.com>
1936         * sem_prag.adb (Check_Refined_Global_Item):
1937         A state or variable acts as a constituent only it is part of an
1938         encapsulating state and the state has visible refinement.
1940 2014-02-19  Ed Schonberg  <schonberg@adacore.com>
1942         * sem_ch6.adb (Analyze_Subprogram_Contract): Do not warn on a
1943         postcondition for a function when the expression does not mention
1944         'Result but the function has in-out parameters.
1946 2014-02-19  Robert Dewar  <dewar@adacore.com>
1948         * gnat_rm.texi: Add documentation on Value_Size forcing biased
1949         representation.
1951 2014-02-19  Hristian Kirtchev  <kirtchev@adacore.com>
1953         * lib-xref.ads Remove the small table of letter and symbol usage as we
1954         already have one.
1956 2014-02-19  Hristian Kirtchev  <kirtchev@adacore.com>
1958         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Emit specific error
1959         messages depending on the offending misplaced aspect specifications.
1960         (Diagnose_Misplaced_Aspect_Specifications): New routine.
1962 2014-02-19  Ed Schonberg  <schonberg@adacore.com>
1964         * sem_ch13.adb (Get_Cursor): Utility to retrieve cursor type
1965         for iterable aspect primitives.
1966         (Resolve_Iterable_Operation): Use expected signature of iterable
1967         aspect to resolve primitive when overloading is present.
1968         (Validate_Iterable_Aspect, Analyze_Aspects_At_Freeze_Point): use it.
1969         (Check_Signature): Removed.
1971 2014-02-19  Yannick Moy  <moy@adacore.com>
1973         * sem_ch10.adb (Analyze_Proper_Body): Issue error on missing
1974         subunit in GNATprove_Mode.
1975         * sinfo.ads (GNATprove_Mode): Document error issued in GNATprove_Mode.
1977 2014-02-19  Hristian Kirtchev  <kirtchev@adacore.com>
1979         * lib-xref.ads Alphabetize the contents of table
1980         Xref_Entity_Letters. Add an entry in table Xref_Entity_Letters
1981         for E_Abstract_State. List all letters and symbols in use.
1982         * sem_prag.adb (Analyze_Abstract_State): Update all calls
1983         to Create_Abstract_State to reflect the new signature.
1984         (Create_Abstract_State): Change subprogram profile and update
1985         the comment on usage. Use the proper location of the state
1986         declaration when creating a new abstract state entity. Do not
1987         generate an external name, but simply reuse the name coming from
1988         the state declaration.
1990 2014-02-19  Robert Dewar  <dewar@adacore.com>
1992         * exp_ch4.adb (Expand_N_Expression_With_Actions): Make sure
1993         declarations get properly inserted in Modify_Tree_For_C mode.
1994         * sinfo.ads: Minor comment addition.
1996 2014-02-19  Robert Dewar  <dewar@adacore.com>
1998         * par-ch9.adb, exp_ch5.adb, sem_ch5.adb, exp_attr.adb, sem_util.adb,
1999         sem_util.ads, sem_ch13.adb, sem_ch13.ads: Minor reformatting.
2001 2014-02-19  Ed Schonberg  <schonberg@adacore.com>
2003         * style.adb (Missing_Overriding): Warning does not apply in
2004         language versions prior to Ada 2005.
2005         * snames.ads-tmpl: Add Name_Iterable and Attribute_Iterable.
2006         * sem_attr.adb: Add Attribute_Iterable where needed.
2007         * exp_attr.adb: ditto.
2008         * exp_ch5.adb (Expand_Formal_Container_Loop): New procedure to
2009         handle loops and quantified expressions over types that have an
2010         iterable aspect.  Called from Expand_Iterator_Loop.
2011         * sem_ch5.adb (Analyze_Iterator_Specification): Recognize types
2012         with Iterable aspect.
2013         * sem_ch13.adb (Validate_Iterable_Aspect): Verify that the
2014         subprograms specified in the Iterable aspect have the proper
2015         signature involving container and cursor.
2016         (Check_Aspect_At_Freeze_Point): Analyze value of iterable aspect.
2017         * sem_ch13.ads (Validate_Iterable_Aspect): New subprogram.
2018         * sem_util.ads, sem_util.adb (Get_Iterable_Type_Primitive):
2019         New procedure to retrieve one of the primitives First, Last,
2020         or Has_Element, from the value of the iterable aspect of a
2021         formal container.
2022         (Is_Container_Element): Predicate to recognize expressions
2023         that denote an element of one of the predefined containers,
2024         for possible optimization.  This subprogram is not currently
2025         used, pending ARG discussions on the legality of the proposed
2026         optimization. Worth preserving for eventual use.
2027         (Is_Iterator): Recognize formal container types.
2028         * aspects.ads, aspects.adb: Add Aspect_Iterable where needed.
2030 2014-02-19  Robert Dewar  <dewar@adacore.com>
2032         * exp_attr.adb (Expand_Min_Max_Attribute): New procedure
2033         (Expand_N_Attribute_Reference): Use this procedure for Min and Max.
2034         * exp_ch4.adb (Expand_N_Expression_With_Actions): Remove object
2035         declarations from list of actions.
2036         * output.ads, output.adb (Delete_Last_Char): New procedure.
2037         * sinfo.ads: Document handling of Mod and expression with actions
2038         in Modify_Tree_For_C mode.
2040 2014-02-19  Ed Schonberg  <schonberg@adacore.com>
2042         * par-ch9.adb (P_Task): Add a null statement to produce a
2043         well-formed task body when due to a previous syntax error the
2044         statement list is empty.
2046 2014-02-19  Hristian Kirtchev  <kirtchev@adacore.com>
2048         * sem_prag.adb (Check_Dependency_Clause): Account
2049         for the case where a state with a non-null refinement matches a
2050         null output list. Comment reformatting.
2051         (Inputs_Match): Copy a solitary input to avoid an assertion failure
2052         when trying to match the same input in multiple clauses.
2054 2014-02-19  Gary Dismukes  <dismukes@adacore.com>
2056         * sem_attr.adb: Minor typo fix.
2058 2014-02-18  Robert Dewar  <dewar@adacore.com>
2060         * cstand.adb (Build_Signed_Integer_Type): Minor change of formal
2061         from Int to Nat (Build_Unsigned_Integer_Type): New procedure
2062         (Create_Standard): Create new unsigned types.
2063         * exp_ch4.adb (Expand_N_Op_Mod): Expand mod in Modify_Tree_For_C
2064         mode (Expand_N_Reference): Removed, problematic and not needed
2065         for now.
2066         * exp_ch4.ads (Expand_N_Reference): Removed, problematic and
2067         not needed for now.
2068         * exp_util.ads, exp_util.adb (Power_Of_Two): New function.
2069         * expander.adb: Remove call to Expand_N_Reference (problematic,
2070         and not needed now).
2071         * sem_aux.ads, sem_aux.adb (Corresponding_Unsigned_Type): New function.
2072         * stand.adb: Read and write unsigned type entities.
2073         * stand.ads: Add new unsigned types.
2075 2014-02-18  Hristian Kirtchev  <kirtchev@adacore.com>
2077         * sem_ch4.adb (Analyze_Call): Do not mark a function call
2078         as being inside an assertion expression as the flag is now removed.
2079         (Check_Ghost_Subprogram_Call): Do not query the
2080         In_Assertion_Expression flag as it is now removed, instead use
2081         a predicate function.
2082         * sem_elab.adb (Check_Internal_Call_Continue): Do not query the
2083         In_Assertion_Expression flag as it is now removed, instead use
2084         a predicate function.
2085         * sem_prag.ads: Add new table Assertion_Expression_Pragma.
2086         * sem_util.adb Add with and use clause for Sem_Prag.
2087         (In_Assertion_Expression_Pragma): New routine.
2088         * sem_util.ads (In_Assertion_Expression_Pragma): New routine.
2089         * sinfo.adb (In_Assertion_Expression): Removed.
2090         (Set_In_Assertion_Expression): Removed.
2091         * sinfo.ads Remove flag In_Assertion_Expression along with its
2092         use in nodes.
2093         (In_Assertion_Expression): Removed along with
2094         pragma Inline.  (Set_In_Assertion_Expression): Removed along
2095         with pragma Inline.
2097 2014-02-18  Sergey Rybin  <rybin@adacore.com frybin>
2099         * gnat_ugn.texi: gnatpp section: add note that '-j' cannot be
2100         used together with '-r', '-rf' or '-rnb' options.
2102 2014-02-18  Hristian Kirtchev  <kirtchev@adacore.com>
2104         * sem_attr.adb (Analyze_Attribute): Comment
2105         and code reformatting. Use separate routines to check the
2106         legality of attribute 'Old in certain pragmas. Verify
2107         the use of 'Old, 'Result and locally declared entities
2108         within the prefix of 'Old.
2109         (Check_References_In_Prefix): New routine.
2110         (Check_Use_In_Contract_Cases): New routine.
2111         (Check_Use_In_Test_Case): New routine.
2113 2014-02-18  Vincent Celier  <celier@adacore.com>
2115         * sem_aux.adb (Is_By_Reference_Type): For each components of
2116         a record type, check also if the component is volatile as it
2117         may have an aspect that makes it volatile. If it is, then the
2118         record type is a by reference type.
2120 2014-02-18  Robert Dewar  <dewar@adacore.com>
2122         * exp_attr.adb: Minor reformatting.
2123         * exp_ch4.ads, exp_ch4.adb (Expand_N_Reference): New procedure.
2124         * exp_util.adb (Remove_Side_Effects): Add conditional expressions
2125         as another case where we don't generate N_Reference nodes for
2126         primitive types.
2127         * expander.adb (Expand): Add call to Expand_N_Reference.
2129 2014-02-06  Hristian Kirtchev  <kirtchev@adacore.com>
2131         * sem_prag.adb (Analyze_Refined_Pragma): Remove
2132         local variable Pack_Spec. Refinement pragmas may now apply to
2133         bodies of both visible and private subprograms.
2135 2014-02-06  Robert Dewar  <dewar@adacore.com>
2137         * exp_attr.adb (Expand_Loop_Entry_Attribute):
2138         Minor change (Attr => N) (Expand_Pred_Succ): New name
2139         Expand_Pred_Succ_Attribute (Expand_N_Attribute_Reference, case
2140         Max): Expand into if expression if Modify_Tree_For_C mode.
2141         (Expand_N_Attribute_Reference, case Min): ditto
2142         * sinfo.ads: Modify_Tree_For_C takes care of expanding Min and
2143         Max attributes.
2145 2014-02-06  Ed Schonberg  <schonberg@adacore.com>
2147         * sem_ch3.adb (Analyze_Object_Declaration): Do not generate
2148         predicate check if this is an internal declaration with
2149         No_Initialization set, as for an expanded aggregate component.
2151 2014-02-06  Doug Rupp  <rupp@adacore.com>
2153         * init.c (__gnat_default_resignal_p) [VMS]: Test for and resignal
2154         conditions with severity of "SUCCESS" or "INFORMATIONAL".
2156 2014-02-06  Yannick Moy  <moy@adacore.com>
2158         * sem_prag.adb (Analyze_Pragma): Analyze pragma
2159         Debug rewritten node before rewriting it as a null statement in
2160         GNATprove mode.
2162 2014-02-06  Robert Dewar  <dewar@adacore.com>
2164         * sem_attr.adb (Min_Max): New procedure.
2165         (Max_Alignment_For_Allocation_Max_Size_In_Storage_Elements): New
2166         procedure.
2168 2014-02-06  Sergey Rybin  <rybin@adacore.com frybin>
2170         * gnat_ugn.texi, vms_data.ads: Add documentation of '-t' option for
2171         gnatmetric/gnatpp.
2173 2014-02-06  Hristian Kirtchev  <kirtchev@adacore.com>
2175         * sem_prag.adb (Analyze_Abstract_State): Update
2176         all calls to Create_Abstract_State to pass the proper state
2177         "declaration".
2178         (Create_Abstract_State): Add new formal parameter
2179         State_Decl along with comment on usage. Establish a link between
2180         the abstract state entity and the state declaration.
2182 2014-02-06  Robert Dewar  <dewar@adacore.com>
2184         * sem_attr.adb (Analyze_Attribute, case Max): Check for improper
2185         comparison of unordered enumeration type.
2186         (Analyze_Attribute, case Max): Check for improper comparison of
2187         unordered enumeration type.
2188         * sem_res.adb (Bad_Unordered_Enumeration_Reference): Moved to
2189         sem_util.adb.
2190         * sem_util.ads, sem_util.adb (Bad_Unordered_Enumeration_Reference):
2191         Moved here from Sem_Res.
2193 2014-02-06  Robert Dewar  <dewar@adacore.com>
2195         * sem_ch3.adb, sem_prag.adb, sem_res.adb, lib-xref.adb: Minor
2196         reformatting.
2198 2014-02-06  Hristian Kirtchev  <kirtchev@adacore.com>
2200         * sem_ch6.adb (Process_Formals): Error message reformatting.
2202 2014-02-06  Hristian Kirtchev  <kirtchev@adacore.com>
2204         * sem_ch3.adb (Handle_Late_Controlled_Primitive): Add local
2205         variable Spec. Do not inherit the null indicator from the
2206         subprogram body when generating the spec.
2208 2014-02-06  Robert Dewar  <dewar@adacore.com>
2210         * casing.adb (Determine_Casing): Consider SPARK_Mode to be
2211         mixed case.
2213 2014-02-06  Ed Schonberg  <schonberg@adacore.com>
2215         * exp_ch6.adb (Is_Build_In_Place_Function): Predicate is false
2216         when the function has a foreign convention, but not if only the
2217         limited return type has such a convention.
2219 2014-02-06  Hristian Kirtchev  <kirtchev@adacore.com>
2221         * sem_ch3.adb (Handle_Late_Controlled_Primitive): Remove local
2222         variable Spec. Comment reformatting. Use Copy_Separate_Tree
2223         rather than New_Copy_Tree when building the corresponding
2224         subprogram declaration.
2226 2014-02-06  Hristian Kirtchev  <kirtchev@adacore.com>
2228         * sem_prag.adb (Analyze_Global_Item): Remove
2229         the mode-related checks on abstract states with enabled external
2230         properties.
2231         (Property_Error): Removed.
2233 2014-02-06  Javier Miranda  <miranda@adacore.com>
2235         * lib-xref.adb (Generate_Reference): When
2236         generating the reference to the first private entity take care
2237         of handling swapped entities.
2239 2014-02-06  Sergey Rybin  <rybin@adacore.com frybin>
2241         * gnat_ugn.texi, vms_data.ads: Add documentation of -j option for
2242         gnatmetric.
2244 2014-02-06  Robert Dewar  <dewar@adacore.com>
2246         * exp_ch4.adb (Expand_N_Shift_Left): Handle shift counts greater
2247         than the word size when operating in Modify_Tree_For_C mode.
2248         * sinfo.ads: Add documentation section on Modify_Tree_For_C mode.
2250 2014-02-06  Robert Dewar  <dewar@adacore.com>
2252         * erroutc.adb (Warning_Specifically_Suppressed.Matches):
2253         compare is case insensitive.
2254         * gnat_rm.texi: Document that string compare for Warnings Off
2255         is now case insensitive.
2257 2014-02-06  Eric Botcazou  <ebotcazou@adacore.com>
2259         * gnat_rm.texi: Small wording tweak.
2261 2014-02-06  Pascal Obry  <obry@adacore.com>
2263         * prj-attr.adb, projects.texi, snames.ads-tmpl: Add Included_Patterns
2264         and Included_Artifact_Patterns attribute definitions.
2266 2014-02-06  Yannick Moy  <moy@adacore.com>
2268         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Set
2269         SPARK_Mode pragma component for all subprograms, including stubs.
2271 2014-02-06  Hristian Kirtchev  <kirtchev@adacore.com>
2273         * sem_ch10.adb (Analyze_Package_Body_Stub): Maintain
2274         the configuration options of the enclosing context in a
2275         stack-like fasion.
2276         (Analyze_Subprogram_Body_Stub): Maintain the
2277         configuration options of the enclosing context in a stack-like
2278         fashion.
2280 2014-02-06  Robert Dewar  <dewar@adacore.com>
2282         * debug.adb: -gnatd.u sets Modify_Tree_For C
2283         * exp_ch4.adb (Expand_N_Op_Rotate_Left): Expand out
2284         if Modify_Tree_For_C (Expand_N_Op_Rotate_Right): ditto.
2285         (Expand_N_Op_Arithmetic_Right_Shift): ditto.
2286         * exp_intr.adb (Expand_Shift): Call expander so we do
2287         Modify_Tree_For_C expansions.
2288         * gnat1drv.adb (Adjust_Global_Switches): Set Modify_Tree_For_C
2289         if -gnatd.u set.
2291 2014-02-06  Fedor Rybin  <frybin@adacore.com>
2293         * prj-proc.ads (Tree_Loaded_Callback): new type Callback used
2294         after the phase 1 of the processing of each aggregated project
2295         to get access to project trees of aggregated projects.
2296         (Process_Project_Tree_Phase_1): new parameter On_New_Tree_Loaded
2297         If specified, On_New_Tree_Loaded is called after each aggregated
2298         project has been processed succesfully.
2299         (Process): new parameter On_New_Tree_Loaded.
2300         * prj-proc.adb (Process_Aggregated_Projects): On_New_Tree_Loaded
2301         callback added after processing of each aggregated project.
2302         (Recursive_Process): new parameter On_New_Tree_Loaded.
2303         (Process): new parameter On_New_Tree_Loaded.
2304         (Process_Project_Tree_Phase_1): new parameter On_New_Tree_Loaded.
2305         * prj-conf.ads (Parse_Project_And_Apply_Config): new parameter
2306         On_New_Tree_Loaded.
2307         * prj-conf.adb (Parse_Project_And_Apply_Config): new parameter
2308         On_New_Tree_Loaded.
2310 2014-02-06  Bob Duff  <duff@adacore.com>
2312         * gnat_ugn.texi: Implement --insert-blank-lines and
2313         --preserve-blank-lines switches.
2315 2014-02-06  Sergey Rybin  <rybin@adacore.com frybin>
2317         * gnat_ugn.texi, vms_data.ads: Add documentation of -j option for
2318         gnatelim.
2320 2014-02-06  Eric Botcazou  <ebotcazou@adacore.com>
2322         * gnat_rm.texi (Pragma Optimize_Alignment): Document the effect
2323         of the pragma on individual objects.
2325 2014-02-06  Hristian Kirtchev  <kirtchev@adacore.com>
2327         * einfo.adb Node29 is now used as BIP_Initialization_Call.
2328         (BIP_Initialization_Call): New routine.
2329         (Set_BIP_Initialization_Call): New routine.
2330         (Write_Field29_Name): Add an entry for constants and variables.
2331         * einfo.ads Add new attribute BIP_Initialization_Call and update
2332         its usage in nodes.
2333         (BIP_Initialization_Call): New routine along with pragma Inline.
2334         (Set_BIP_Initialization_Call): New routine along with pragma Inline.
2335         * exp_ch6.adb (Make_Build_In_Place_Call_In_Object_Declaration):
2336         Add local declaration Res_Decl. Capture the build-in-place
2337         initialization call when the related object declaration has
2338         created a transient block.
2339         * exp_ch7.adb (Process_Transient_Objects): Add local variable
2340         Fin_Insrt. Recognize a scenario where an object declaration acts
2341         as a transient context and is initialized by a build-in-place
2342         function call.
2344 2014-02-06  Pascal Obry  <obry@adacore.com>
2346         * prj-util.adb (For_Interface_Sources): Fix handling of required
2347         bodies for aggregate libs.
2349 2014-02-06  Robert Dewar  <dewar@adacore.com>
2351         * nlists.ads: Minor comment clarifications.
2353 2014-02-06  Robert Dewar  <dewar@adacore.com>
2355         * gnat1drv.adb (Adjust_Global_Switches): Set Modify_Tree_For_C
2356         if gnatd.V set.
2357         * opt.ads (Modify_Tree_For_C): New flag.
2358         * output.ads, output.adb (Last_Char): New function.
2360 2014-02-06  Pascal Obry  <obry@adacore.com>
2362         * projects.texi, prj-env.adb (Initialize_Default_Project_Path): Add
2363         share/gpr for cross-builds.
2365 2014-02-06  Robert Dewar  <dewar@adacore.com>
2367         * exp_util.ads, checks.adb, sem_prag.adb, prj-util.adb, sem_ch13.adb:
2368         Minor reformatting and code clean ups.
2370 2014-02-06  Pascal Obry  <obry@adacore.com>
2372         * prj-util.adb (For_Interface_Sources): Skip non compilable languages.
2373         * prj.ads: Minor typo fix in comment.
2375 2014-02-06  Hristian Kirtchev  <kirtchev@adacore.com>
2377         * sem_prag.adb (Analyze_Depends_In_Decl_Part): Add
2378         local variable Expr. Flag clauses with extra parenthesis as this
2379         is not allowed by the syntax of the pragma. Code reformatting.
2381 2014-02-06  Hristian Kirtchev  <kirtchev@adacore.com>
2383         * exp_attr.adb (Expand_N_Attribute_Reference): Alphabetize
2384         variables. Rename variabme Tnn to Temp. Do not create a temporary
2385         if assertions are disabled. Find enclosing routine _Postconditions
2386         and insert the temporary that captures the value of the prefix
2387         before the routine.
2388         * exp_ch6.adb (Build_Postconditions_Procedure):
2389         Insert the generated _Postconditions routine
2390         before the first source declaration of the related
2391         subprogram.
2392         (Insert_After_Last_Declaration): Removed.
2393         (Insert_Before_First_Source_Declaration): New routine.
2395 2014-02-06  Ed Schonberg  <schonberg@adacore.com>
2397         * exp_util.adb, exp_util.ads (Within_Internal_Subprogram):
2398         Utility to determine whether current expansion is for the body
2399         of a predefined primitive operation.
2400         (Make_Predicate_Check): Use Within_Internal_Subpgram
2401         * checks.adb (Apply_Predicate_Check): Use
2402         Within_Internal_Subprogram
2403         * sem_ch13.adb (Freeze_Entity_Checks): Ditto.
2405 2014-02-06  Pascal Obry  <obry@adacore.com>
2407         * prj.ads, prj-util.adb: Minor reformatting.
2409 2014-02-06  Ed Schonberg  <schonberg@adacore.com>
2411         * exp_ch6.adb (Expand_Subprogram_Contract, Append_Enabled_Item):
2412         Take into account the Split_PPC flag to ensure that conjuncts
2413         in a composite postcondition aspect are tested in source order.
2415 2014-02-06  Hristian Kirtchev  <kirtchev@adacore.com>
2417         * sem_ch6.adb (Analyze_Generic_Subprogram_Body): Flag illegal
2418         use of SPARK_Mode.
2419         * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration): Flag
2420         illegal use of SPARK_Mode.
2421         (Instantiate_Subprogram_Body): Flag illegal use of SPARK_Mode.
2422         * sem_prag.adb (Analyze_Pragma): Code reformatting.
2423         * sem_util.adb Add with and use clause for Aspects.
2424         (Check_SPARK_Mode_In_Generic): New routine.
2425         * sem_util.ads (Check_SPARK_Mode_In_Generic): New routine.
2427 2014-02-06  Thomas Quinot  <quinot@adacore.com>
2429         * a-calend.adb (Formatting_Operations.Split): Ensure that
2430         Time_Error is raised for invalid time values.
2432 2014-02-06  Arnaud Charlet  <charlet@adacore.com>
2434         * sem_prag.adb (Analyze_Pragma): Rewrite as a null statement
2435         in GNATprove_Mode.
2437 2014-02-06  Robert Dewar  <dewar@adacore.com>
2439         * einfo.ads, einfo.adb (Is_Discriminant_Check_Function): New flag.
2440         * exp_ch3.adb (Build_Dcheck_Function): Set
2441         Is_Discriminant_Check_Function.
2443 2014-02-06  Hristian Kirtchev  <kirtchev@adacore.com>
2445         * exp_ch7.adb (Is_Subprogram_Call): Inspect
2446         the original tree in certain cases where a construct has been
2447         factored out and replaced by a reference to a temporary.
2449 2014-02-06  Ed Schonberg  <schonberg@adacore.com>
2451         * sem_ch3.adb (Process_Full_View): Fix typo in the order of
2452         parameters when propagating predicate function to full view.
2453         (Find_Type_Of_Object): Freeze base type of object type to catch
2454         premature use of discriminated private type without a full view.
2456 2014-02-06  Robert Dewar  <dewar@adacore.com>
2458         * sprint.adb: Minor reformatting.
2460 2014-02-06  Hristian Kirtchev  <kirtchev@adacore.com>
2462         * exp_ch4.adb (Process_Transient_Object): Add local variable
2463         Temp_Ins. When the transient object is initialized by an
2464         aggregate, the hook must capture the object after the last
2465         component assignment takes place.
2466         * exp_ch7.adb (Detect_Subprogram_Call): Expose the subprogram to
2467         routine Is_Subprogram_Call.
2468         (Is_Subprogram_Call): Inspect an
2469         aggregate that has been heavily expanded for subprogram calls.
2470         (Process_Transient_Objects): Add local variables Expr, Ptr_Id
2471         and Temp_Ins.  Remove the nested declare block and adjust the
2472         indentation. When the transient object is initialized by an
2473         aggregate, the hook must capture the object after the last
2474         component assignment takes place.
2476 2014-02-06  Hristian Kirtchev  <kirtchev@adacore.com>
2478         * sem_prag.adb (Analyze_Global_Item): Detect illegal uses of
2479         external states with enabled properties that do not match the
2480         global mode.
2481         (Property_Error): New routine.
2482         * sem_res.adb (Property_Error): New routine.
2483         (Resolve_Actuals): Detect illegal uses of external variables with
2484         enabled properties in procedure calls that do not match the mode of
2485         the corresponding formal parameter.
2487 2014-02-06  Hristian Kirtchev  <kirtchev@adacore.com>
2489         * sem_util.adb (Has_Enabled_Property): Rename
2490         formal parameter Prop_Nam to Property. Update the comment on usage
2491         and all occurrences in the body. Add local variable Prop_Nam. When
2492         inspecting a property with an expression, the property name
2493         appears as the first choice of the component association.
2495 2014-02-04  Robert Dewar  <dewar@adacore.com>
2497         * exp_ch5.adb, einfo.ads, freeze.adb, sem_ch8.adb: Minor reformatting.
2499 2014-02-04  Gary Dismukes  <dismukes@adacore.com>
2501         * sem_aggr.adb: Change "runtime" to "run time" in warning message,
2502         for consistency with other messages.
2504 2014-02-04  Ed Schonberg  <schonberg@adacore.com>
2506         * exp_ch5.adb  (Expand_Iterator_Loop):  For a container element
2507         iterator, indicate that the element is a constant if the container
2508         type does not have a variable indexing aspect.
2509         * sem_ch8.adb (Analyze_Object_Renaming): If the entity is already
2510         marked as constant, do not reset its Ekind, to ensure that
2511         container elements in an element loop are not modified if the
2512         container (e.g. a hashed set) only has a constant indexing aspect.
2514 2014-02-04  Arnaud Charlet  <charlet@adacore.com>
2516         * g-souinf.ads: Subprograms in this unit are actually not pure.
2517         * freeze.adb (Freeze_Subprogram): Do not reset Is_Pure for Intrinsics.
2518         * einfo.ads (Is_Pure): Update doc to match implementation.
2520 2014-02-04  Gary Dismukes  <dismukes@adacore.com>
2522         * exp_ch13.adb: Minor spelling fix.
2524 2014-02-04  Robert Dewar  <dewar@adacore.com>
2526         * opt.ads: Minor comment update.
2528 2014-02-04  Robert Dewar  <dewar@adacore.com>
2530         * exp_ch4.adb (Expand_N_Expression_With_Actions): Use Rewrite
2531         instead of Replace.
2533 2014-02-04  Ed Schonberg  <schonberg@adacore.com>
2535         * sem_aggr.adb (Resolve_Array_Aggregate): Suppress warnings
2536         on null expressions if component type is non-null, when the
2537         corresponding association covers an empty range of index values.
2539 2014-02-04  Robert Dewar  <dewar@adacore.com>
2541         * sinfo.ads: Further comments on N_Expression_With_Actions node.
2543 2014-02-04  Hristian Kirtchev  <kirtchev@adacore.com>
2545         * sem_prag.adb (Analyze_Refined_Depends_In_Decl_Part): Remove global
2546         variables Out_Items and Ref_Global. Remove local constant
2547         Body_Id along with dummy variables D1, D2, D3, D4, D5, D6, D7
2548         and D8. Remove the useless collection of global items as this
2549         was a leftover from an earlier version of the routine. Move
2550         several routines out to avoid deep nesting and indentation.
2551         (Inputs_Match): Add formal parameter Dep_Clause. Rename formal
2552         parameter Do_Checks to Post_Errors. Update the comment on usage.
2553         (Is_Matching_Input): Renamed to Input_Match. Add formal parameters
2554         Ref_Inputs and Do_Checks. Rename formal parameter Do_Checks
2555         to Post_Errors. Update the comment on usage. Account for the
2556         case where a self referential state may have a null input_list.
2557         (Is_Self_Referential): New routine.
2559 2014-02-04  Ed Schonberg  <schonberg@adacore.com>
2561         * sem_ch13.adb (Analyze_Attribute_Definition_Clause): If the
2562         entity renames an expression, as in the case of an object of
2563         an unconstrained type initialized by a function call, defer the
2564         rewriting of the expression to the expander.
2565         * exp_ch13.adb (Expand_N_Attribute_Definition_Clause, case
2566         'Alignment): If the entity renames an expression, introduce
2567         temporary to capture value, and rewrite original declaration to
2568         use temporary.
2570 2014-02-04  Gary Dismukes  <dismukes@adacore.com>
2572         * g-comlin.adb: Minor typo fix.
2574 2014-02-04  Ed Schonberg  <schonberg@adacore.com>
2576         * freeze.adb (Freeze_All): Types derived from a formal
2577         access_to_classwide type do not have a finalization master.
2579 2014-02-04  Robert Dewar  <dewar@adacore.com>
2581         * sprint.adb: Minor reformatting.
2583 2014-02-04  Robert Dewar  <dewar@adacore.com>
2585         * exp_ch4.adb (Expand_N_Expression_With_Actions): Eliminate
2586         cases where Actions is a null list.
2587         * sinfo.ads (N_Expression_With_Actions): Actions can be
2588         temporarily empty during semantic analysis, but must be non-empty
2589         in the final expanded tree.
2591 2014-01-31  Robert Dewar  <dewar@adacore.com>
2593         * exp_ch9.adb: Minor reformatting.
2595 2014-01-31  Emmanuel Briot  <briot@adacore.com>
2597         * g-comlin.adb (Set_Command_Line): Take the switches
2598         configuration from the Command_Line_Config.
2600 2014-01-31  Hristian Kirtchev  <kirtchev@adacore.com>
2602         * sem_prag.adb (Analyze_Refinement_Clause): Guard against a malformed
2603         refinement clause.
2605 2014-01-31  Vincent Celier  <celier@adacore.com>
2607         * projects.texi: Add more documentation about others used as an
2608         index in indexed attributes.
2610 2014-01-31  Robert Dewar  <dewar@adacore.com>
2612         * gnat_ugn.texi: Minor update.
2613         * gnat_rm.texi: Add example to Restriction_Warnings documentation.
2614         * exp_util.adb: Minor reformatting.
2616 2014-01-31  Ed Schonberg  <schonberg@adacore.com>
2618         * exp_ch9.adb (Expand_Entry_Barrier): Warn if the barrier
2619         depends on data that is not private to the protected object,
2620         and potentially modifiable in unsynchronized fashion.
2622 2014-01-31  Yannick Moy  <moy@adacore.com>
2624         * erroutc.adb (Validate_Specific_Warnings): Remove special case for
2625         GNATprove_Mode.
2627 2014-01-31  Robert Dewar  <dewar@adacore.com>
2629         * prj-attr.ads (First_Attribute_Of): Returns Empty_Attribute
2630         for Unknown_Package.
2631         * sem_ch6.adb, sem_attr.adb: Minor comment addition.
2633 2014-01-31  Hristian Kirtchev  <kirtchev@adacore.com>
2635         * exp_util.adb (Build_Allocate_Deallocate_Proc): Rewrite
2636         the logic that generates a runtime check to determine the
2637         controlled status of the object about to be allocated or
2638         deallocated. Class-wide types now always use a runtime check
2639         even if they appear as generic actuals.
2640         (Find_Object): Detect
2641         a special case that involves interface class-wide types because
2642         the object appears as a complex expression.
2644 2014-01-31  Ed Schonberg  <schonberg@adacore.com>
2646         * sem_ch6.adb (Process_Formals): In Ada2012 mode, place
2647         subprogram with an incomplete untagged formals on the list of
2648         private dependents, to verify that the type is properly completed
2649         in the private part.
2650         * sem_attr.adb: Code clean up.
2652 2014-01-31  Robert Dewar  <dewar@adacore.com>
2654         * exp_ch6.adb: Minor reformatting.
2656 2014-01-31  Vincent Celier  <celier@adacore.com>
2658         * prj-attr.adb (First_Attribute_Of): Return Unknown_Attribute
2659         when Pkg is unknown.
2661 2014-01-31  Hristian Kirtchev  <kirtchev@adacore.com>
2663         * sem_res.adb (Resolve_Entity_Name): Comment
2664         reformatting. Allow volatile objects in various generated checks.
2666 2014-01-31  Ed Schonberg  <schonberg@adacore.com>
2668         * sem_attr.adb (Analyze_Attribute, case 'Update): For a record
2669         component association, set the etype of the identifier, for
2670         SPARK use.
2672 2014-01-31  Ed Schonberg  <schonberg@adacore.com>
2674         * exp_ch6.adb (Has_Visibility_Of_Subprogram): If type is not
2675         declared in a package, not checks can apply to the subprogram.
2677 2014-01-31  Robert Dewar  <dewar@adacore.com>
2679         * erroutc.adb (Validate_Specific_Warnings): Warnings are
2680         controlled -gnatw.W.
2681         * gnat_ugn.texi: Document new warnings controlled by -gnatw.w.
2682         * opt.ads (Warn_On_Warnings_Off): Now controls more cases.
2684 2014-01-31  Arnaud Charlet  <charlet@adacore.com>
2686         * exp_disp.adb: Update comments.
2688 2014-01-31  Yannick Moy  <moy@adacore.com>
2690         * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration,
2691         Save_Global_References): Guard access to expression in aspect.
2693 2014-01-31  Yannick Moy  <moy@adacore.com>
2695         * sem_prag.adb (Analyze_Pragma/Pragma_SPARK_Mode):
2696         Issue an error when the pragma is applied to a generic unit,
2697         a generic declaration, or inside a generic.
2699 2014-01-31  Yannick Moy  <moy@adacore.com>
2701         * sem_ch8.adb (Analyze_Subprogram_Renaming): Set SPARK_Mode on renaming
2702         entity.
2704 2014-01-31  Robert Dewar  <dewar@adacore.com>
2706         * exp_ch9.adb, s-tassta.adb, s-tposen.adb, s-tposen.ads: Minor
2707         reformatting.
2709 2014-01-31  Tristan Gingold  <gingold@adacore.com>
2711         * exp_disp.adb: Add a historic note.
2713 2014-01-31  Robert Dewar  <dewar@adacore.com>
2715         * sem_warn.adb (Warn_On_Useless_Assignments): Add call to
2716         Process_Deferred_References.
2718 2014-01-31  Yannick Moy  <moy@adacore.com>
2720         * erroutc.adb (Validate_Specific_Warnings): Do not issue a message for
2721         ineffective pragma Warnings(Off) in GNATprove_Mode.
2723 2014-01-31  Bob Duff  <duff@adacore.com>
2725         * s-taskin.ads: Minor comment fix.
2726         * s-tassta.adb (Abort_Dependents): Don't abort all dependents;
2727         just direct dependents. If this is actually an abort, each task
2728         will take care of aborting its dependents, so all dependents will
2729         get aborted, as before. However, when this is called the second
2730         time from Vulnerable_Complete_Master "for convenience" (i.e. to
2731         kill off tasks waiting at terminate alternatives), aborting
2732         indirect dependents is wrong, because it causes some unrelated
2733         tasks to get aborted.
2735 2014-01-31  Robert Dewar  <dewar@adacore.com>
2737         * sem_ch4.adb: Minor reformatting.
2739 2014-01-31  Robert Dewar  <dewar@adacore.com>
2741         * exp_ch2.adb: New calling sequence for Is_LHS.
2742         * frontend.adb: Add call to Process_Deferred_References.
2743         * lib-xref.ads, lib-xref.adb (Process_Deferred_References): New.
2744         (Deferred_References): New table.
2745         * sem_ch8.adb (Find_Direct_Name): Make deferred reference table
2746         entries.
2747         (Find_Expanded_Name): Ditto.
2748         * sem_res.adb: New calling sequence for Is_LHS.
2749         * sem_util.ads, sem_util.adb (Is_LHS): New calling sequence.
2750         * sem_warn.adb: Call Process_Deferred_References before issuing
2751         warnings.
2753 2014-01-31  Tristan Gingold  <gingold@adacore.com>
2755         * exp_util.adb (Corresponding_Runtime_Package): Restrict the
2756         use of System_Tasking_Protected_Objects_Single_Entry.
2757         * exp_ch9.adb (Build_Simple_Entry_Call): Remove Mode parameter
2758         of Protected_Single_Entry_Call.
2759         (Expand_N_Timed_Entry_Call): Remove single_entry case.
2760         * exp_disp.adb (Make_Disp_Asynchronous_Select_Body): Remove
2761         single_entry case.
2762         (Make_Disp_Timed_Select_Body): Likewise.
2763         * rtsfind.ads (RE_Timed_Protected_Single_Entry_Call): Remove.
2764         * s-tposen.adb (Send_Program_Error, PO_Do_Or_Queue): Remove
2765         Self_Id parameter.
2766         (Wakeup_Entry_Caller): Remove Self_ID and New_State parameters.
2767         (Wait_For_Completion_With_Timeout): Remove.
2768         (Protected_Single_Entry_Call): Remove Mode parameter
2769         (always Simple_Call).
2770         (Service_Entry): Remove Self_Id constant (not used anymore).
2771         (Timed_Protected_Single_Entry_Call): Remove.
2772         * s-tposen.ads (Timed_Protected_Single_Entry_Call): Remove.
2773         (Protected_Single_Entry_Call): Remove Mode parameter.
2775 2014-01-29  Hristian Kirtchev  <kirtchev@adacore.com>
2777         * einfo.adb (Get_Pragma): Handle the retrieval of pragma Refined_Post.
2778         * einfo.ads (Get_Pragma): Update the comment on special pragmas
2779         handled by this routine.
2780         * sem_prag.adb (Analyze_Pragma): Add a legal pragma Refined_Post
2781         to the contract of the related subprogram body.
2782         * sem_util.adb (Add_Contract_Item): Handle the insertion of
2783         pragma Refined_Post into the contract of a subprogram body.
2784         * sinfo.ads Update the documentation of node N_Contract.
2785         * sem_res.adb (Resolve_Entity_Name): Add a guard
2786         to detect abstract states and variables only when checking the
2787         SPARK 2014 rules concerning volatile object placement.
2789 2014-01-29  Ed Schonberg  <schonberg@adacore.com>
2791         * sem_ch4.adb (Find_Equality_Types, Try_One_Interp): within an instance,
2792         null is compatible with any access type.
2794 2014-01-29  Hristian Kirtchev  <kirtchev@adacore.com>
2796         * sem_util.adb (Find_Placement_In_State_Space): Assume that the default
2797         placement is not in a package.
2799 2014-01-29  Hristian Kirtchev  <kirtchev@adacore.com>
2801         * sem_util.adb (Has_Enabled_Property): Compare the character field of
2802         the sole property.
2804 2014-01-29  Robert Dewar  <dewar@adacore.com>
2806         * sem_intr.adb, a-ztexio.ads, sinfo.ads, sem_res.adb, gnatlink.adb,
2807         vms_conv.adb, a-except.ads, a-except-2005.ads, a-teioed.adb,
2808         sem_warn.ads, treepr.ads, erroutc.ads, a-excach.adb: Minor reformatting.
2810 2014-01-29  Robert Dewar  <dewar@adacore.com>
2812         * sem_util.ads, sem_util.adb (In_Pragma_Expression): New function.
2813         * sem_warn.adb (Check_References): Suppress warnings if inside
2814         Initial_Condition pragma.
2816 2014-01-29  Hristian Kirtchev  <kirtchev@adacore.com>
2818         * sem_prag.adb (Check_Missing_Part_Of): List all values of
2819         State_Space_Kind for readability reasons. Do not emit an error on
2820         a private item when the enclosing package lacks aspect/pragma
2821         Abstract_State. Do not emit an error on a private package
2822         instantiation when the corresponding generic template lacks
2823         visible state.
2824         (Has_Visible_State): New routine.
2825         * sem_util.adb (Find_Placement_In_State_Space): The visible
2826         declarations of any kind of child units in general act as proper
2827         placement location.
2829 2014-01-29  Robert Dewar  <dewar@adacore.com>
2831         * a-except-2005.adb, a-except.adb, a-excpol-abort.adb, a-exstat.adb,
2832         ali.adb, a-numaux.ads, a-numaux-darwin.ads, a-numaux-libc-x86.ads,
2833         a-numaux-vms.ads, a-numaux-vxworks.ads, a-numaux-x86.ads, aspects.ads,
2834         a-taside.adb, a-teioed.adb, a-textio.adb, a-textio.ads, atree.adb,
2835         atree.ads, a-witeio.adb, a-witeio.ads, a-wtedit.adb, a-ztedit.adb,
2836         a-ztexio.adb, bcheck.adb, binde.adb, checks.adb, comperr.adb,
2837         cstand.adb, debug_a.adb, einfo.ads, errout.adb, erroutc.adb,
2838         eval_fat.adb, exp_aggr.adb, exp_attr.adb, exp_ch11.adb, exp_ch3.adb,
2839         exp_ch4.adb, exp_ch5.adb, exp_ch6.adb, exp_ch9.adb, exp_dbug.adb,
2840         exp_disp.adb, exp_fixd.adb, exp_imgv.adb, exp_intr.adb, exp_util.adb,
2841         freeze.adb, frontend.adb, g-comlin.ads, g-mbdira.adb, gnat1drv.adb,
2842         gprep.adb, g-spipat.adb, i-cpp.ads, i-vxwork.ads, i-vxwork-x86.ads,
2843         krunch.ads, layout.adb, lib-load.adb, lib-writ.adb, lib-writ.ads,
2844         live.adb, namet.ads, osint.adb, osint-c.adb, output.ads, par.adb,
2845         par-ch10.adb, par-ch13.adb, par-ch3.adb, par-ch4.adb, par-ch5.adb,
2846         par-ch6.adb, par-ch9.adb, par-endh.adb, par-labl.adb, par-prag.adb,
2847         par-sync.adb, par-tchk.adb, par-util.adb, prj.adb, repinfo.adb,
2848         rtsfind.adb, s-arit64.adb, s-asthan-vms-alpha.adb,
2849         s-asthan-vms-ia64.adb, s-bignum.adb, scans.adb, scng.adb, s-dimmks.ads,
2850         sem_aggr.adb, sem_attr.adb, sem_aux.adb, sem_cat.adb, sem_ch10.adb,
2851         sem_ch12.adb, sem_ch13.adb, sem_ch13.ads, sem_ch3.adb, sem_ch4.adb,
2852         sem_ch5.adb, sem_ch6.adb, sem_ch8.adb, sem_disp.adb, sem_elab.adb,
2853         sem_elim.adb, sem_eval.adb, sem_intr.adb, sem_prag.adb, sem_res.adb,
2854         sem_type.adb, sem_util.adb, sem_warn.adb, set_targ.adb, s-fatgen.adb,
2855         s-fatgen.ads, s-fileio.adb, s-imgcha.adb, s-imgrea.adb, sinfo.ads,
2856         sinput-c.adb, snames.ads-tmpl, s-os_lib.adb, sprint.adb,
2857         s-regpat.adb, s-secsta.adb, s-stalib.ads,
2858         s-stchop.adb, s-stoele.ads, stand.ads, s-taprop-solaris.adb,
2859         s-tasdeb-vms.adb, s-tasini.adb, s-tassta.adb, s-valdec.adb,
2860         s-valuti.adb, s-wchjis.adb, s-wchwts.adb, system.ads, system-vms_64.ads,
2861         system-vms-ia64.ads, treepr.adb, types.ads, uintp.adb, uname.adb,
2862         urealp.adb, usage.adb, vxaddr2line.adb: Minor reformatting.
2864 2014-01-29  Robert Dewar  <dewar@adacore.com>
2866         * expander.adb: Minor reformatting.
2868 2014-01-29  Javier Miranda  <miranda@adacore.com>
2870         * exp_ch3.adb (Predefined_Primitive_Bodies): Adding documentation to
2871         previous patch.
2873 2014-01-29  Javier Miranda  <miranda@adacore.com>
2875         * exp_ch3.adb (Predefined_Primitive_Bodies): Complete the code
2876         that checks if an interface types defines the predefined "="
2877         function because the compiler was erroneously not generating the
2878         predefined "=" primitive as soon as the name of some interface
2879         primitive is "=" (formals were not checked).
2881 2014-01-29  Ed Schonberg  <schonberg@adacore.com>
2883         * expander.adb (Expander): In GNATprove mode, do not process
2884         transient scopes: they are in general not created in this mode,
2885         and an attempt to examine them will lead to constraint errors when
2886         processing configuration pragmas that have analyzable expressions.
2888 2014-01-29  Vincent Celier  <celier@adacore.com>
2890         * clean.adb (Gnatclean): Fail if main project is an aggregate
2891         project or if there is an aggregate library project in the
2892         project tree.
2893         * gnatcmd.adb: Fail if the main project is an aggregate project
2894         or if there is an aggegate library project in the project tree.
2895         * make.adb (Initialize): : Fail if main project is an aggregate
2896         project or if there is an aggregate library project in the
2897         project tree.
2898         * makeutl.ads (Aggregate_Libraries_In): New Boolean function.
2899         * prj-makr.adb (Initialize): Fail if the main project is an
2900         aggregate project or an aggregate library project.
2902 2014-01-29  Vincent Celier  <celier@adacore.com>
2904         * prj-part.adb (Check_Import_Aggregate): New procedure
2905         to check if an imported project is an aggregate project.
2906         (Parse_Single_Project): Call Check_Import_Aggregate
2907         * projects.texi: Document that aggregate projects cannot be
2908         extended or imported.
2910 2014-01-29  Robert Dewar  <dewar@adacore.com>
2912         * exp_ch9.adb, sem_ch7.ads, s-regexp.adb, sem_ch13.adb: Minor
2913         reformatting and code clean up.
2914         * gnat_ugn.texi: Add documentation section on Atomic Variables
2915         and Optimization.
2917 2014-01-29  Hristian Kirtchev  <kirtchev@adacore.com>
2919         * einfo.adb Flag264 is now unused.
2920         (Has_Body_References): Removed.
2921         (Set_Has_Body_References): Removed.
2922         (Write_Entity_Flags): Remove the output for flag Has_Body_References.
2923         * einfo.ads Update the comment on usage of attribute
2924         Body_References. Remove attribute Has_Body_References and its
2925         usage in nodes.
2926         (Has_Body_References): Removed along with pragma Inline.
2927         (Set_Has_Body_References): Removed along with pragma Inline.
2928         * sem_prag.adb (Analyze_Global_Item): Move the call to
2929         Record_Possible_Body_Reference in the state related checks
2930         section. Add a comment intended function.
2931         (Analyze_Input_Output): Move the call to Record_Possible_Body_Reference
2932         in the state related checks section. Add a comment intended function.
2933         (Analyze_Refinement_Clause): Cleanup the illegal body reference
2934         reporting. Add a comment on timing of error reporting.
2935         (Record_Possible_Body_Reference): Reimplement the routine.
2937 2014-01-29  Vincent Celier  <celier@adacore.com>
2939         * makeutl.adb (Mains.Find_File_Add_Extension): Only look for specs for
2940         unit-based languages.
2941         (Mains.Complete_Mains.Do_Complete): Use the source file project
2942         tree when calling Find_File_Add_Extension. Use the correct
2943         project name when reporting an error.
2945 2014-01-29  Hristian Kirtchev  <kirtchev@adacore.com>
2947         * aspects.adb Add an entry for aspect Part_Of in table
2948         Canonical_Aspect.
2949         * aspects.ads Add an entry for aspect Part_Of in tables Aspect_Id,
2950         Aspect_Argument, Aspect_Names and Aspect_Delay.
2951         * atree.h Define Elist9.
2952         * atree.adb (Elist9): New routine.
2953         (Set_Elist9): New routine.
2954         * atree.ads (Elist9): New routine.
2955         (Set_Elist9): New routine.
2956         * einfo.adb Add Part_Of_Constituents and Encapsulating_State to
2957         the list of node usage.  Remove Refined_State from the list of
2958         node usage.
2959         (Encapsulating_State): New routine.
2960         (Get_Pragma):
2961         Handle pragma Part_Of; (Part_Of_Constituents): New routine.
2962         (Refined_State): Removed.
2963         (Set_Encapsulating_State): New routine.
2964         (Set_Part_Of_Constituents): New routine.
2965         (Set_Refined_State): Removed.
2966         (Write_Field9_Name): Add an entry
2967         for Part_Of_Constituents (Write_Field10_Name): Add an entry for
2968         Encapsulating_State. Remove the entry for Refined_State.
2969         * einfo.ads Add new attributes Encapsulating_State
2970         and Part_Of_Constituents alond with their usage in
2971         entities. Remove attribute Refined_State along with its
2972         usage in entities.
2973         (Encapsulating_State): New routine and
2974         pragma Inline.  (Get_Pragma): Update the comment on usage.
2975         (Part_Of_Constituents): New routine and pragma Inline.
2976         (Refined_State): Removed along with pragma Inline.
2977         (Set_Encapsulating_State): New routine and pragma Inline.
2978         (Set_Part_Of_Constituents): New routine and pragma Inline.
2979         (Set_Refined_State): Removed along with pragma Inline.
2980         * par-prag.adb Pragma Part_Of does not need any special processing
2981         by the parser.
2982         * sem_ch3.adb (Analyze_Declarations): Remove local variables
2983         Body_Id and Prag. Call separate routines to analyze the
2984         contract of a package [body].
2985         (Analyze_Object_Contract):
2986         Update the comment on usage. Remove local variables
2987         Items and Nam. Use Get_Pragma rather than traversing the
2988         classification list.  Verify whether the lack of indicator
2989         Part_Of agrees with the placement of the variable in state space.
2990         (Analyze_Object_Declaration): Initialize the encapsulating state
2991         of a variable.  (Requires_State_Refinement): Moved to sem_util.
2992         * sem_ch7.adb (Analyze_Package_Body_Contract): New routine.
2993         (Analyze_Package_Contract): New routine.
2994         * sem_ch7.ads (Analyze_Package_Body_Contract): New routine.
2995         (Analyze_Package_Contract): New routine.
2996         * sem_ch10.adb (Decorate_State): Initialize the encapsulating
2997         state and Part_Of constituents.
2998         * sem_ch13.adb (Analyze_Aspect_Specifications):
2999         Add processing for aspect Part_Of. Update all
3000         calls to Decorate_Delayed_Aspect_And_Pragma.
3001         (Check_Aspect_At_Freeze_Point): Aspect Part_Of does
3002         not need any special processing at freeze time.
3003         (Decorate_Delayed_Aspect_And_Pragma): Renamed to
3004         Decorate_Aspect_And_Pragma.  Add formal parameter Delayed and
3005         update the associated comment.
3006         * sem_prag.adb Add an entry for pragma Part_Of in table Sig_Flags.
3007         (Analyze_Abstract_State): Add new global variable State_Id. Remove
3008         local constants Errors and Loc. Remove local variables Is_Null
3009         and State_Nam. Create the entity of the abstract state on the
3010         spot, before all remaining checks are performed. Verify that a
3011         missing Part_Of option agrees with the placement of the abstract
3012         state within the state space.
3013         (Analyze_Depends_In_Decl_Part):
3014         Add new global variables Constits_Seen and States_Seen. Check
3015         that a state and a corresponding constituent do not appear
3016         in pragma [Refined_]Depends.
3017         (Analyze_Global_In_Decl_Part):
3018         Add new global variables Constits_Seen and States_Seen. Check
3019         that a state and a corresponding constituent do not appear
3020         in pragma [Refined_]Global.
3021         (Analyze_Global_Item):
3022         Remove the now obsolete code that deals with Part_Of.
3023         Add the entity of the global item to the list of processed
3024         items.  (Analyze_Initializes_In_Decl_Part): Add new global
3025         variables Constits_Seen and States_Seen. Check that a state
3026         and a corresponding constituent do not appear in pragma
3027         Initializes.
3028         (Analyze_Initialization_Item): Add the entity
3029         of the initialization item to the list of processed items.
3030         (Analyze_Input_Item): Add the entity of the initialization
3031         item to the list of processed items.
3032         (Analyze_Input_Output):
3033         Remove the now obsolete code that deals with Part_Of.  Add the
3034         entity of the input/output to the list of processed items.
3035         (Analyze_Part_Of): New routine.
3036         (Analyze_Part_Of_Option): Remove
3037         local constant Par_State. Add local constant Encaps and local
3038         variables Encaps_Id and Legal. Use Analyze_Part of to analyze
3039         the option. Turn the related state into a Part_Of constituent
3040         if the option is legal.
3041         (Analyze_Pragma): Add processing
3042         for pragma Part_Of.
3043         (Analyze_Refined_State_In_Decl_Part):
3044         Remove global constants Pack_Body and Spec_Id. Remove
3045         global variables Abstr_States and Hidden_States. Add new
3046         global variables Available_States, Body_Id, Body_States and
3047         Spec_Id. Add new local constant Body_Decl. Reimplement the
3048         logic that extracts the states available for refinement from
3049         the related package and the body hidden states of the said
3050         package.
3051         (Analyze_Refinement_Clause): Add local variable Part_Of_Constits.
3052         (Check_Applicable_Policy): Alphabetize body.
3053         (Check_Dependency_Clause): Replace Refined_State
3054         with Encapsulating_State.
3055         (Check_Matching_Constituent):
3056         Reimplement the logic that determines whether an item is a valid
3057         / invalid constituent of the current refined state. Return when
3058         a construct does not denote a valid abstract state. Extract the
3059         list of Part_Of constituents for further analysis. Check that all
3060         Part_Of constituents of a state have been used in its refinement.
3061         (Check_Matching_State): Update the comment on usage. Operate
3062         on the list of available states.
3063         (Check_Missing_Part_Of): New routine.
3064         (Check_Refined_Global_Item): Replace Refined_State
3065         with Encapsulating_State.
3066         (Check_State_And_Constituent_Use): New routine.
3067         (Create_Abstract_State): New routine.
3068         (Is_Matching_Input): Replace Refined_State with Encapsulating_State.
3069         (Is_Part_Of): Removed.
3070         (Collect_Body_States): New routine.
3071         (Collect_Constituent): Replace Refined_State with Encapsulating_State.
3072         (Collect_Hidden_States): Removed.
3073         (Report_Unrefined_States): Change the profile of the procedure along
3074         with the comment on usage.
3075         (Report_Unused_Constituents): New routine.
3076         (Report_Unused_Hidden_States): Removed.
3077         (Report_Unused_States): New routine.
3078         * sem_prag.ads (Check_Missing_Part_Of): New routine.
3079         * sem_util.adb (Add_Contract_Item): Pragma Part_Of can now
3080         appear in the classification pragmas of a package instantiation
3081         or a variable.
3082         (Find_Placement_In_State_Space): New routine.
3083         (Is_Child): Removed.
3084         (Is_Child_Or_Sibling): Remove formal
3085         parameter Private_Child. Remove the private child checks.
3086         (Requires_State_Refinement): Moved from sem_ch3.
3087         * sem_util.ads Add new type State_Space_Kind along with
3088         comment on its usage and values.
3089         (Add_Contract_Item): Update the comment on usage.
3090         (Find_Body_Discriminal): Alphabetize spec.
3091         (Find_Placement_In_State_Space): New routine.
3092         (Is_Child_Or_Sibling): Remove formal parameter Private_Child
3093         and update the comment on usage.
3094         (Requires_State_Refinement): Moved from sem_ch3.
3095         * sinfo.ads: Update the documentation of N_Contract.
3096         * snames.ads-tmpl The predefined name for Part_Of is now used
3097         to denote a pragma. Add Pragma_Id for Part_Of.
3099 2014-01-29  Emmanuel Briot  <briot@adacore.com>
3101         * s-regexp.adb (Create_Secondary_Table): Automatically grow the state
3102         machine as needed.
3103         (Dump): New subprogram.
3105 2014-01-29  Tristan Gingold  <gingold@adacore.com>
3107         * exp_ch9.adb (Expand_N_Protected_Type_Declaration): Add
3108         Expand_Entry_Declaration to factorize code.
3110 2014-01-29  Ed Schonberg  <schonberg@adacore.com>
3112         * checks.adb: minor clarification.
3113         * sem_ch7.adb (Declare_Inherited_Private_Subprograms): Limit
3114         search for primitive operations to the entities that immediately
3115         follow the type declaration.
3117 2014-01-29  Tristan Gingold  <gingold@adacore.com>
3119         * exp_ch9.adb (Build_Protected_Entry): Do not call
3120         Complete_Entry_Body anymore.
3121         * rtsfind.ads (RE_Complete_Single_Entry_Body): Remove.
3122         * s-tposen.ads, s-tposen.adb (Complete_Single_Entry_Body): Remove.
3124 2014-01-29  Pierre-Marie Derodat  <derodat@adacore.com>
3126         * s-os_lib.adb, s-os_lib.ads (Normalize_Pathname): Return an empty
3127         string when the Name input bigger than allowed. Adapt the function
3128         specification.
3130 2014-01-29  Ed Schonberg  <schonberg@adacore.com>
3132         * checks.adb (Install_Null_Excluding_Check): Do not emit warning
3133         if expression is within a case_expression of if_expression.
3135 2014-01-29  Robert Dewar  <dewar@adacore.com>
3137         * exp_ch9.adb, inline.ads: Minor reformatting.
3139 2014-01-29  Tristan Gingold  <gingold@adacore.com>
3141         * exp_ch9.adb (Is_Exception_Safe): Return true if no exceptions.
3143 2014-01-29  Yannick Moy  <moy@adacore.com>
3145         * inline.ads (Pending_Body_Info): Add SPARK_Mode and
3146         SPARK_Mode_Pragma components to be able to analyze generic
3147         instance.
3148         * sem_ch12.adb (Analyze_Package_Instantiation,
3149         Inline_Instance_Body, Need_Subprogram_Instance_Body,
3150         Load_Parent_Of_Generic): Pass in SPARK_Mode from instantiation
3151         for future analysis of the instance.
3152         (Instantiate_Package_Body,
3153         Instantiate_Subprogram_Body, Set_Instance_Inv): Set SPARK_Mode
3154         from instantiation to analyze the instance.
3156 2014-01-29  Robert Dewar  <dewar@adacore.com>
3158         * sem_ch7.adb, sem_prag.adb, sem_ch4.adb, sem_ch6.adb: Minor code
3159         reorganization.
3161 2014-01-29  Yannick Moy  <moy@adacore.com>
3163         * gnat_rm.texi: Update description of SPARK_Mode pragma.
3165 2014-01-29  Tristan Gingold  <gingold@adacore.com>
3167         * exp_ch9.adb (Expand_N_Protected_Body): Remove Num_Entries.
3169 2014-01-29  Thomas Quinot  <quinot@adacore.com>
3171         * sem_ch4.adb (Find_Component_In_Instance): Update comment.
3173 2014-01-29  Ed Schonberg  <schonberg@adacore.com>
3175         * exp_util.adb (Build_Task_Image_Prefix): Indicate that the
3176         resulting string is an internal entity. and thus requires no
3177         initialization. This is relevant when Initialize_ Scalars is
3178         enabled, because the resultant spurious initialization may lead to
3179         secondary stack anomalies that produce a mangled name for a task.
3181 2014-01-29  Yannick Moy  <moy@adacore.com>
3183         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): SPARK_Mode
3184         not inherited from spec anymore. Check consistency
3185         rules after processing of declarations.
3186         * sem_ch7.adb (Analyze_Package_Body_Helper): SPARK_Mode not inherited
3187         from spec anymore. Check consistency rules after processing of
3188         declarations.
3189         (Analyze_Package_Declaration): Set SPARK_Mode only for non-generic
3190         packages.
3191         * sem_prag.adb (Analyze_Pragma/Pragma_SPARK_Mode): Implement new
3192         consistency rules.
3194 2014-01-27  Robert Dewar  <dewar@adacore.com>
3196         * sem_res.adb (Resolve_Comparison_Op): Add type name/location
3197         to unordered msg.
3198         (Resolve_Range): Add type name/location to unordered msg.
3200 2014-01-27  Claire Dross  <dross@adacore.com>
3202         * a-cofove.adb/s (Copy): Add precondition so that Copy (Source,
3203         Capacity) is only called with Capacity >= Length (Source) and
3204         Capacity in Capacity_Range.
3205         * a-cfdlli.adb/s, a-cfhase.adb/s, a-cfhama.adb/s, a-cforse.adb/s,
3206         a-cforma.adb/s (Copy): Add precondition so that Copy (Source, Capacity)
3207         is only called with Capacity >= Source.Capacity. Raise Capacity_Error
3208         in the code is this is not the case.
3210 2014-01-27  Thomas Quinot  <quinot@adacore.com>
3212         * sem_ch4.adb (Analyze_Selected_Component): Fix handling of
3213         selected component in an instance where the component of the
3214         actual is not visibile at instantiation.
3216 2014-01-27  Ed Schonberg  <schonberg@adacore.com>
3218         * sem_ch6.adb: sem_ch6.adb (Set_Actual_Subtypes): If the type
3219         has a dynamic predicate, generate freeze node for Actual_Subtype
3220         at once, because the declaration of the corresponding predicate
3221         function will make reference to it.
3223 2014-01-27  Tristan Gingold  <gingold@adacore.com>
3225         * exp_ch7.adb, exp_ch9.adb: Adjust comments.
3227 2014-01-27  Robert Dewar  <dewar@adacore.com>
3229         * exp_ch4.adb (Expand_N_Op_Expon): Remove unsigned type test
3230         for 2**X optimization.
3232 2014-01-27  Ed Schonberg  <schonberg@adacore.com>
3234         * a-suenst.adb: strings.utf_encoding.strings (Decode): Check
3235         explicitly whether value is in range of Character, because the
3236         library is typically compiled with range checks disabled, and
3237         we cannot rely on the implicit check on the argument of 'Val.
3239 2014-01-27  Vincent Celier  <celier@adacore.com>
3241         * a-ciorma.adb, a-cihama.adb (Assign): Copy the Source to the Target,
3242         not the Target to itself.
3244 2014-01-27  Robert Dewar  <dewar@adacore.com>
3246         * vms_conv.ads, ali.adb, sem_ch6.ads, opt.ads, vms_cmds.ads: Minor
3247         changes to avoid incorrect use of unordered enum types.
3249 2014-01-27  Thomas Quinot  <quinot@adacore.com>
3251         * sem_ch4.adb: Minor reformatting.
3253 2014-01-27  Robert Dewar  <dewar@adacore.com>
3255         * scn.adb (Check_End_Of_Line): Removed.
3256         (Error_Long_Line): Removed.
3257         (Determine_License): Use versions of above routines from Scanner.
3258         * scng.adb (Check_End_Of_Line): Moved to spec.
3259         (Error_Long_Line): Removed, no longer used.
3260         * scng.ads (Check_End_Of_Line): Moved here from body.
3262 2014-01-27  Tristan Gingold  <gingold@adacore.com>
3264         * exp_ch7.adb (Build_Cleanup_Statements): Call
3265         Build_Protected_Subprogram_Call_Cleanup to insert the cleanup
3266         for protected body.
3267         * exp_ch9.adb (Build_Protected_Subprogram_Body): Likewise.
3268          Remove Service_Name variable.
3269         (Build_Protected_SUbprogam_Call_Cleanup): New procedure that
3270         factorize code from the above subprograms.
3271         * exp_ch9.ads (Build_Protected_Subprogram_Call_Cleanup): New procedure.
3273 2014-01-27  Hristian Kirtchev  <kirtchev@adacore.com>
3275         * einfo.adb (Has_Option): Reimplemented.
3276         * sem_prag.adb (Analyze_Refinement_Clause): Add global
3277         variables AR_Constit, AW_Constit, ER_Constit, EW_Constit,
3278         External_Constit_Seen and State. Add local variables Body_Ref,
3279         Body_Ref_Elmt and Extra_State. Reimplement part of the logic to
3280         avoid a cumbersome while pool. Verify the legality of an external
3281         state and relevant properties.
3282         (Check_External_Property): New routine.
3283         (Check_Matching_State): Remove parameter profile
3284         and update comment on usage.
3285         (Collect_Constituent): Store the
3286         relevant external property of a constituent.
3287         * sem_util.adb (Async_Readers_Enabled): Update the call to
3288         Has_Enabled_Property.
3289         (Async_Writers_Enabled): Update the call to Has_Enabled_Property.
3290         (Effective_Reads_Enabled): Update the call to Has_Enabled_Property.
3291         (Effective_Writes_Enabled): Update the call to Has_Enabled_Property.
3292         (Has_Enabled_Property): Rename formal parameter Extern to State_Id.
3293         Update comment on usage. Reimplement the logic to recognize the various
3294         formats of properties.
3296 2014-01-27  Ed Schonberg  <schonberg@adacore.com>
3298         * par-ch5.adb: Minor reformatting.
3300 2014-01-27  Tristan Gingold  <gingold@adacore.com>
3302         * s-tposen.ads: Harmonize style and comments.
3304 2014-01-27  Vincent Celier  <celier@adacore.com>
3306         * projects.texi: Document that shared library projects, by
3307         default, cannot import projects that are not shared library
3308         projects.
3310 2014-01-27  Robert Dewar  <dewar@adacore.com>
3312         * sem_ch8.adb (Find_Selected_Component): Use Replace instead
3313         of Rewrite.
3315 2014-01-27  Ed Schonberg  <schonberg@adacore.com>
3317         * a-suenco.adb, a-suenst.adb (Decode): Raise encoding error if
3318         any other exception is raised.
3319         (Convert): If both Input_Scheme and Output_Scheme are UTF_8 it is
3320         still necessary to perform a conversion in order to remove overlong
3321         encodings.
3323 2014-01-27  Robert Dewar  <dewar@adacore.com>
3325         * exp_smem.adb: Minor reformatting.
3327 2014-01-27  Thomas Quinot  <quinot@adacore.com>
3329         * a-calfor.ads: Fix incorrect reference to operator "-" in comment.
3331 2014-01-27  Ed Schonberg  <schonberg@adacore.com>
3333         * sem_res.adb (Make_Call_Into_Operator): In ASIS mode, relocate
3334         nodes for operands to the original node for the call, to preserve
3335         Original_Node pointers within the resolved operands, given that
3336         they may have been rewritten as well. Previous approach copied
3337         the operands into a new tree and lost those pointers.
3339 2014-01-27  Claire Dross  <dross@adacore.com>
3342         * a-cofove.adb, a-cofove.ads: Add Strict_Equal function to the API.
3344 2014-01-27  Ed Schonberg  <schonberg@adacore.com>
3346         * sem_util.adb (Check_Internal_Protected_Use): A call through
3347         an anonymous access parameter of the current protected function
3348         is not a potential modification of the current object.
3350 2014-01-27  Ed Schonberg  <schonberg@adacore.com>
3352         * a-cobove.adb (Reserve_Capacity): Procedure raises
3353         Capacity_Error, not Constraint_Error, when request cannot be
3354         satisfied.
3356 2014-01-27  Vincent Celier  <celier@adacore.com>
3358         * a-coorma.adb, a-cohama.adb (Assign): Copy the Source to the Target,
3359         not the Target to itself.
3361 2014-01-27  Ed Schonberg  <schonberg@adacore.com>
3363         * exp_ch4.adb (Expand_Concatenate): If the target of the
3364         concatenation is a library-level entity, always use the off-line
3365         version of concatenation, regardless of optimization level. This
3366         is space-efficient, and prevents linking problems when some
3367         units are compiled with different optimization levels.
3369 2014-01-27  Ed Schonberg  <schonberg@adacore.com>
3371         * sem_ch5.adb: Code clean up.
3373 2014-01-27  Ed Schonberg  <schonberg@adacore.com>
3375         * par-ch5.adb (P_Iterator_Specification): Improve error recovery
3376         when an array or container iterator includes a subtype indication,
3377         which is only legal in an element iterator.
3379 2014-01-27  Thomas Quinot  <quinot@adacore.com>
3381         * exp_ch7.adb: Minor reformatting.
3383 2014-01-27  Robert Dewar  <dewar@adacore.com>
3385         * opt.adb (SPARK_Mode): Default for library units is None rather
3386         than Off.
3387         * opt.ads: Remove AUTO from SPARK_Mode_Type SPARK_Mode_Type is
3388         no longer ordered.
3389         * sem_prag.adb (Analyze_Pragma, case SPARK_Mode): Remove AUTO
3390         possibility.
3391         * snames.ads-tmpl (Name_Auto): Removed, no longer used.
3393 2014-01-27  Robert Dewar  <dewar@adacore.com>
3395         * par-ch5.adb (P_Sequence_Of_Statements): Make entry in
3396         Suspicious_Labels table if we have identifier; followed by loop
3397         or block.
3398         * par-endh.adb (Evaluate_End_Entry): Search Suspicious_Labels table.
3399         * par.adb (Suspicious_Labels): New table.
3401 2014-01-27  Robert Dewar  <dewar@adacore.com>
3403         * exp_aggr.adb (Check_Bounds): Reason is range check, not
3404         length check.
3406 2014-01-27  Yannick Moy  <moy@adacore.com>
3408         * get_spark_xrefs.adb (Get_SPARK_Xrefs): Accept new type 'c' for
3409         reference.
3410         * lib-xref-spark_specific.adb (Is_Global_Constant): Remove useless
3411         function now.
3412         (Add_SPARK_Xrefs): Include references to constants.
3413         * spark_xrefs.ads Document new character 'c' for references to
3414         constants.
3416 2014-01-27  Thomas Quinot  <quinot@adacore.com>
3418         * exp_smem.adb (Add_Write_After): For a function call, insert write as
3419         an after action in a transient scope.
3421 2014-01-27  Thomas Quinot  <quinot@adacore.com>
3423         * exp_smem.adb (Expand_Shared_Passive_Variable): For a reference
3424         to a shared variable as an OUT formal in a call to an init proc,
3425         the 'Read call must be emitted after, not before, the call.
3427 2014-01-27  Robert Dewar  <dewar@adacore.com>
3429         * gnat_rm.texi: Remove mention of AUTO mode for SPARK_Mode pragma.
3431 2014-01-27  Robert Dewar  <dewar@adacore.com>
3433         * a-wichha.adb (Character_Set_Version): Change to output proper
3434         value.
3436 2014-01-27  Hristian Kirtchev  <kirtchev@adacore.com>
3438         * einfo.adb (Is_Input_Only_State): Removed.
3439         (Is_Non_Volatile_State): Removed.
3440         (Is_Output_State): Removed.
3441         * einfo.ads (Is_Input_Only_State): Remove attribute and
3442         subprogram. Update related entity.
3443         (Is_Non_Volatile_State):
3444         Remove attribute and subprogram. Update related entity.
3445         (Is_Output_State): Removed attribute and subprogram. Update
3446         related entity.
3447         * exp_ch6.adb (Expand_Subprogram_Contract): Update comment on
3448         generated code.
3449         * sem_ch3.adb (Analyze_Declarations): Analyze the contract of
3450         an object, not just variables.
3451         (Analyze_Object_Contract): New routine.
3452         (Analyze_Variable_Contract): Removed.
3453         (Process_Discriminants): Detect an illegal use of volatile
3454         discriminant in SPARK mode.
3455         * sem_ch5.adb (Analyze_Iterator_Specification):
3456         Detect an illegal use of volatile loop variable.
3457         (Analyze_Loop_Parameter_Specification): Detect an illegal use
3458         of volatile loop variable.
3459         * sem_ch6.adb (Process_Formals): Update the volatile object
3460         detection. Detect an illegal formal of mode IN OUT or OUT in
3461         SPARK mode. Enhance the error messages with references.
3462         * sem_ch12.adb (Instantiate_Object): Update the volatile object
3463         detection. Enhance the error messages with references.
3464         * sem_prag.adb (Analyze_Abstract_State): Enhance the error
3465         messages with references.
3466         (Analyze_Contract_Case): Enhance the error messages with references.
3467         (Analyze_External_Property): Call Check_Duplicate_Property to process
3468         an external property.
3469         (Analyze_External_Property_In_Decl_Part): New routine.
3470         (Analyze_External_State_In_Decl_Part): Removed.
3471         (Analyze_Global_Item): Detect an illegal
3472         use of a volatile constant. Detect an illegal use
3473         of a variable with enabled Effective_Reads. Enhance
3474         the error messages with references. Remove obsolete
3475         checks concerning Input_Only and Output_Only states.
3476         (Analyze_Initialization_Item): Enhance the error messages
3477         with references.
3478         (Analyze_Initializes_In_Decl_Part): Do not
3479         collect the states and variables when the initialization list
3480         is null.
3481         (Analyze_Input_Item): Enhance the error messages with references.
3482         (Analyze_Input_Output): Enhance the error messages with references.
3483         (Analyze_Pragma): Enhance the error messages with references.
3484         (Analyze_Refinement_Clause): Code reformatting.
3485         (Analyze_Refined_Depends_In_Decl_Part):
3486         Rename global variable Global to Reg_Global and update all
3487         occurrences. Add local variables D7 and D8. Update the error
3488         messages with references. Update the call to Collect_Global_Items.
3489         (Analyze_Refined_Global_In_Decl_Part): Add local variables
3490         Has_Proof_In_State, Proof_In_Constits and Proof_In_Items. Update
3491         the call to Collect_Global_Items.  Account for a Proof_In state
3492         in null / useless refinement checks. Verify the coverage of
3493         Proof_In states.
3494         (Check_Dependency_Clause): Remove local variable
3495         Out_Constits. Remove the retrieval and removal of constituents
3496         for an Output_Only state. Remove the reporting of unused
3497         Output_Only state constituents.
3498         (Check_Duplicate_Mode): Enhance
3499         the error message with a reference.
3500         (Check_Duplicate_Property): New routine.
3501         (Check_Duplicate_Option): Enhance the error message with a reference.
3502         (Check_External_Properties): Enhance the error message with a reference.
3503         (Check_Function_Return): Enhance the error message with a reference.
3504         (Check_In_Out_States): Update
3505         comment on usage. Add a specialized error message for Proof_In
3506         constituents. Enhance the error message with a reference.
3507         (Check_Input_States): Update comment on usage. Account for
3508         possible Proof_In constituents. Enhance the error message
3509         with a areference.
3510         (Check_Matching_Constituent): Enhance the error message with a
3511         reference.
3512         (Check_Matching_State): Enchance the error message with a reference.
3513         (Check_Mode): Add local variable From_Global. Update the call to
3514         Find_Mode.  Emit more precise error messages concerning extra items
3515         (Check_Mode_Restriction_In_Enclosing_Context): Consider
3516         pragma Refined_Global.  Enhance the error message with a
3517         reference.
3518         (Check_Mode_Restriction_In_Function): Enhance the error message with
3519         a reference.
3520         (Check_Output_States): Update comment on usage. Add local variable
3521         Posted.  Account for possible Proof_In constituents. Produce a detailed
3522         list of missing constituents.
3523         (Check_Proof_In_States): New routine.
3524         (Check_Refined_Global_Item): Handle Proof_In
3525         constituents. Enchance the error message with a reference.
3526         (Collect_Global_Items): Add formal parameters Proof_In_Items
3527         and Has_Proof_In_State. Update the comment on usage. Account
3528         for Proof_In items.
3529         (Create_Or_Modify_Clause): Enchance
3530         the error message with a reference.
3531         (Find_Mode): Add
3532         formal parameter From_Global. Update the comment on usage.
3533         Detect when the mode is governed by pragma [Refined_]Global.
3534         (Output_Constituents): Removed.
3535         (Report_Extra_Constituents):
3536         Report extra Proof_In constituents.
3537         (Report_Unused_Constituents): Removed.
3538         (Usage_Error): Code reformatting. Enhance the error
3539         messages with reference.
3540         * sem_prag.ads (Analyze_External_Property_In_Decl_Part): New routine.
3541         (Analyze_External_State_In_Decl_Part): Removed.
3542         * sem_res.adb (Resolve_Actuals): Update the volatile object
3543         detection. Enhance the error message with a reference.
3544         (Resolve_Entity_Name): Update the volatile object
3545         detection. Enhance the error message with a reference.
3546         * sem_util.adb (Is_Refined_State): Add a guard to avoid a crash.
3547         (Is_SPARK_Volatile_Object): New routine.
3548         (Has_Volatile_Component): New routine.
3549         * sem_util.ads (Is_Delegate): Alphabetized.
3550         (Is_SPARK_Volatile_Object): New routine.
3551         (Has_Volatile_Component): New routine.
3552         * snames.ads-tmpl: Remove names Name_Input_Only and Name_Output_Only.
3554 2014-01-27  Ed Schonberg  <schonberg@adacore.com>
3556         * sem_attr.adb: Resolve fully prefix of 'Update.
3558 2014-01-27  Ben Brosgol  <brosgol@adacore.com>
3560         * gnat_rm.texi: Minor clarifications.
3562 2014-01-27  Robert Dewar  <dewar@adacore.com>
3564         * sem_elab.adb (Check_Internal_Call_Continue): Avoid complaining
3565         about call that is generated as part of an Initial_Condition
3566         check.
3567         * sem_prag.adb: Minor spelling correction.
3569 2014-01-27  Robert Dewar  <dewar@adacore.com>
3571         * sem_prag.adb (Set_Convention_From_Pragma): Check that
3572         convention Ghost can only apply to functions.
3573         * einfo.ads, einfo.adb (Is_Ghost_Subprogram): Add clarifying comment.
3575 2014-01-27  Robert Dewar  <dewar@adacore.com>
3577         * gnat_ugn.texi: Add Short_Enums to documentation of
3578         -gnatet/-gnateT.
3580 2014-01-27  Robert Dewar  <dewar@adacore.com>
3582         * sem_prag.adb (Analyze_Input_Item): Correct check for input
3583         item in same package.
3584         * sem_util.ads, sem_util.adb (Within_Scope): New function.
3586 2014-01-26  Arnaud Charlet  <charlet@adacore.com>
3588         * a-intnam-lynxos.ads, mlib-tgt-specific-lynxos.adb,
3589         s-osinte-lynxos-3.adb, s-osinte-lynxos-3.ads, s-osinte-lynxos.adb,
3590         s-osinte-lynxos.ads, s-taprop-lynxos.adb, s-tpopsp-lynxos.adb,
3591         system-lynxos-ppc.ads, system-lynxos-x86.ads: Removed, no longer
3592         maintained.
3594 2014-01-25  Eric Botcazou  <ebotcazou@adacore.com>
3596         * gcc-interface/Makefile.in: Fix oversight.
3598 2014-01-25  Eric Botcazou  <ebotcazou@adacore.com>
3600         * gcc-interface/utils.c (convert_to_fat_pointer): Un-obfuscate the
3601         conversion from a thin pointer with a shifted value.
3602         * gcc-interface/utils2.c (gnat_build_constructor): Propagate the
3603         read-only flag from the values onto the result.
3604         (gnat_invariant_expr): Accept read-only CONSTRUCTORs.
3606 2014-01-25  Tristan Gingold  <gingold@adacore.com>
3608         * gcc-interface/decl.c (gnat_to_gnu_entity): Always build a variable
3609         for E_Variable with a pragma Linker_Section.
3611 2014-01-25  Robert Dewar  <dewar@adacore.com>
3613         * gcc-interface/decl.c (gnat_to_gnu_param): Make sure an Out parameter
3614         with Default_Value aspect is passed in by copy.
3616 2014-01-24  Eric Botcazou  <ebotcazou@adacore.com>
3618         * set_targ.adb: Set Short_Enums.
3619         * gcc-interface/lang.opt (fshort-enums): New option.
3620         * gcc-interface/misc.c (gnat_handle_option): Handle it.
3621         (gnat_post_options): Do not modify the global settings.
3623 2014-01-24  Robert Dewar  <dewar@adacore.com>
3625         * g-rannum.ads, g-rannum.adb (Random_Ordinary_Fixed): New generic
3626         function.
3627         (Random_Decimal_Fixed): New generic function.
3628         * s-rannum.ads: Minor comment clarifications.
3630 2014-01-24  Robert Dewar  <dewar@adacore.com>
3632         * back_end.adb: Remove Short_Enums handling (handled in
3633         Ttypes/Get_Targ now) Minor added comments.
3634         * freeze.adb: Change name Short_Enums_On_Target to
3635         Target_Short_Enums.
3636         * get_targ.ads, get_targ.adb (Get_Short_Enums): New function.
3637         * opt.ads: Minor comment updates.
3638         * sem_ch13.adb: Change name Short_Enums_On_Target to
3639         Target_Short_Enums.
3640         * set_targ.adb: Set Short_Enums from gcc back end.
3641         * set_targ.ads (Short_Enums): New variable.
3642         * targparm.ads, targparm.adb: Remove Short_Enums entries (handled in
3643         Ttypes/Get_Targ now).
3644         * ttypes.ads (Target_Short_Enums): New constant boolean switch
3646 2014-01-24  Pascal Obry  <obry@adacore.com>
3648         * g-sercom-mingw.adb: Fix serial port name for port number > 10.
3650 2014-01-24  Gary Dismukes  <dismukes@adacore.com>
3652         * exp_disp.adb (Expand_Dispatching_Call): Call Unqualify on Param when
3653         comparing it with Ctrl_Arg, since Ctrl_Arg may have had qualification
3654         stripped off.
3656 2014-01-24  Robert Dewar  <dewar@adacore.com>
3658         * sinfo.ads, make.adb, prj-env.adb: Minor reformatting.
3660 2014-01-24  Vincent Celier  <celier@adacore.com>
3662         * prj.adb (Add_Aggregated_Project): Do not add a project in
3663         the list if it is already there.
3665 2014-01-24  Yannick Moy  <moy@adacore.com>
3667         * lib-xref-spark_specific.adb (Enclosing_Subprogram_Or_Package):
3668         Correct the search for a subrogram declaration to which a pragma is
3669         attached.
3671 2014-01-24  Bob Duff  <duff@adacore.com>
3673         * gnat_ugn.texi: Document --decimal-grouping and
3674         --based-grouping switches in gnatpp.
3676 2014-01-24  Ed Schonberg  <schonberg@adacore.com>
3678         * sinfo.ads: Documentation update.
3680 2014-01-24  Ed Schonberg  <schonberg@adacore.com>
3682         * sem_ch3.adb (Constant_Redeclaration): New declaration is
3683         illegal if previous one has an initial expression that is an
3684         aggregate expanded into assignments.
3686 2014-01-24  Ed Schonberg  <schonberg@adacore.com>
3688         * sem_ch5.adb (Analyze_Loop_Parameter_Specification): Small
3689         code reorganization to remove spurious warning on a loop with
3690         an array element iterator that has a null range.
3692 2014-01-24  Vincent Celier  <celier@adacore.com>
3694         * make.adb (Binding_Phase): When setting the Ada paths, use
3695         the library ALI dir, not the object dir in libraries.
3697 2014-01-24  Yannick Moy  <moy@adacore.com>
3699         * sinfo.ads: Add documentation of check flag fields.
3701 2014-01-24  Ed Schonberg  <schonberg@adacore.com>
3703         * sem_res.adb (Resolve_Actuals): If an actual is a view
3704         conversion of a discriminated object, and the formal type is
3705         discriminated and constrained, apply a discriminant check to
3706         the object itself.
3708 2014-01-24  Robert Dewar  <dewar@adacore.com>
3710         * prj.adb, prj-env.adb, back_end.adb: Add comment, minor code clean ups.
3712 2014-01-24  Ed Schonberg  <schonberg@adacore.com>
3714         * sem_ch3.adb (Analyze_Declarations): At the end of an
3715         appropriate declarative part, call Freeze_All from the first
3716         declaration in the scope, not from the first unfrozen one. This
3717         is necessary to apply visibility checks to entities with delayed
3718         aspects. Otherwise, in the presence of instantiations and cleanups
3719         that they may generate, the delayed aspects may be analyzed too
3720         late and produce spurious visibility errors.
3721         * sem_attr.adb: Place etype on range.
3722         * sem_ch6.adb: Documentation expression functions.
3724 2014-01-24  Robert Dewar  <dewar@adacore.com>
3726         * exp_ch7.adb: Minor change of Indices to Indexes (preferred
3727         terminology in compiler).
3729 2014-01-24  Robert Dewar  <dewar@adacore.com>
3731         * scans.ads: Remove Tok_Raise from Sterm, Eterm, After_SM
3732         categories, now that Ada 95 supports raise expressions.
3734 2014-01-24  Robert Dewar  <dewar@adacore.com>
3736         * freeze.adb (Freeze_Enumeration_Type): Use new target parameter
3737         Short_Enums_On_Target.
3738         * sem_ch13.adb (Set_Enum_Esize): Take Short_Enums_On_Target
3739         into account.
3740         * targparm.ads, targparm.adb: Add new target parameter Short_Enums.
3742 2014-01-24  Ed Schonberg  <schonberg@adacore.com>
3744         * sem_ch5.adb (Analyze_Iterator_Specification): If subtype
3745         indication is given explicity, check that it matches the array
3746         component type or the container element type of the domain
3747         of iteration.
3749 2014-01-24  Tristan Gingold  <gingold@adacore.com>
3751         * back_end.adb (Scan_Compiler_Arguments): Set Short_Enums_On_Target.
3752         * gcc-interface/misc.c (flag_short_enums): Declare.
3753         (gnat_post_options): Set it.
3755 2014-01-24  Vincent Celier  <celier@adacore.com>
3757         * prj-env.adb (Ada_Objects_Path): Use Ada_Objects_Path_No_Libs
3758         to cache the result when Including_Libraries is False.
3759         * prj-env.ads (Ada_Objects_Path): Update documentation
3760         * prj.adb (Free (Project_Id)): Also free Ada_Objects_Path_No_Libs
3761         (Get_Object_Directory): Return the Library_Ali_Dir only when
3762         when Including_Libraries is True.
3763         * prj.ads (Get_Object_Directory): Fix and complete documentation
3764         (Project_Data): New component Ada_Objects_Path_No_Libs
3766 2014-01-24  Robert Dewar  <dewar@adacore.com>
3768         * checks.adb (Expr_Known_Valid): Result of fpt operator never
3769         considered valid.
3771 2014-01-24  Eric Botcazou  <ebotcazou@adacore.com>
3773         * back_end.adb: Minor fix in comment.
3775 2014-01-24  Javier Miranda  <miranda@adacore.com>
3777         * sem_ch3.adb (Check_Abstract_Overriding): Code reestructuration
3778         required to report the error in case of task types.
3780 2014-01-24  Ed Schonberg  <schonberg@adacore.com>
3782         * sem_attr.adb: Additional index checking.
3784 2014-01-24  Ed Schonberg  <schonberg@adacore.com>
3786         * sem_attr.adb (Analyze_Attribute, case 'Update): Analyze
3787         expressions in each component association, and for records note
3788         the entity in each association choice, for subsequent resolution.
3789         (Resolve_Attribute, case 'Update): Complete resolution of
3790         expressions in each component association.
3792 2014-01-24  Robert Dewar  <dewar@adacore.com>
3794         * sem.adb (Sem): Avoid premature reference to Current_Sem_Unit
3795         (this was causing Is_Main_Unit_Or_Main_Unit_Spec to be set wrong,
3796         leading to wrong handling of SPARK_Mode for library units).
3798 2014-01-24  Robert Dewar  <dewar@adacore.com>
3800         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Set SPARK_Mode
3801         on generic instances (do not consider them to be internally
3802         generated)
3804 2014-01-24  Doug Rupp  <rupp@adacore.com>
3806         * s-osinte-android.ads (pthread_sigmask): Import sigprocmask
3807         vice pthread_sigmask.
3809 2014-01-24  Vincent Celier  <celier@adacore.com>
3811         * prj.adb (Debug_Output (Str, Str2)): Output if verbosity is
3812         not default.
3814 2014-01-24  Vincent Celier  <celier@adacore.com>
3816         * prj-ext.adb (Add): Do not output anything when Silent is True,
3817         whatever the verbosity. When Source is From_External_Attribute,
3818         set the corresponding environment variable if it is not already set.
3819         * prj-ext.ads (Add): New Boolean parameter Silent, defaulted
3820         to False
3821         * prj-proc.adb (Process_Expression_For_Associative_Array):
3822         For attribute External, call Prj.Ext.Add with Silent set to
3823         True for the child environment, to avoid useless output in non
3824         default verbosity.
3826 2014-01-24  Ed Schonberg  <schonberg@adacore.com>
3828         * sem_res.adb (Set_Slice_Subtype): Handle properly a discrete
3829         range given by a subtype indication, and force evaluation of
3830         the bounds, as for a simple range.
3831         * exp_util.adb (Evaluate_Slice_Bounds): Utility to force evaluation
3832         of bounds of slice for various kinds of discrete ranges.
3833         (Evaluate_Name, Evaluate_Subtype_From_Expr): use
3834         Evaluate_Slice_Bounds.
3836 2014-01-24  Bob Duff  <duff@adacore.com>
3838         * s-taskin.ads (Activator): Make this Atomic, because
3839         Activation_Is_Complete reads it, and that can be called
3840         from any task. Previously, this component was only
3841         modified by the activator before activation, and by
3842         Self after activation.
3843         * a-taside.ads, a-taside.adb (Environment_Task,
3844         Activation_Is_Complete): Implement these missing functions.
3846 2014-01-24  Doug Rupp  <rupp@adacore.com>
3848         * init.c: Add a handler section for Android.
3850 2014-01-24  Arnaud Charlet  <charlet@adacore.com>
3852         * i-cexten.ads (Unsigned_33..64, Unsigned_33..64): New types.
3854 2014-01-24  Ed Schonberg  <schonberg@adacore.com>
3856         * sem_ch4.adb (Operator_Check): If one operand is a
3857         Raise_Expression, set its type to that of the other operand.
3858         * sem_res.adb (Resolve_Raise_Expression): new procedure.
3859         (Resolve_Actuals): For an actual that is a Raise_Expression,
3860         set the type to that of the formal.
3861         * sem_type.adb (Find_Unique_Type): If one of the operands is a
3862         Raise_Expression, return type of the other operand.
3864 2014-01-24  Ed Schonberg  <schonberg@adacore.com>
3866         * sem_aggr.adb (Resolve_Record_Aggregate): If a scalar
3867         component of the record has a type with a default aspect, and
3868         the corresponding aggregate component is initiaized with a box,
3869         use the default value in the rewritten aggregate.
3871 2014-01-24  Tristan Gingold  <gingold@adacore.com>
3873         * s-interr.ads, s-interr.adb, s-interr-hwint.adb, s-interr-vms.adb,
3874         s-interr-sigaction.adb,
3875         s-interr-dummy.adb (Install_Restricted_Handlers): Add Prio parameter.
3876         * exp_ch9.adb (Make_Initialize_Protection): Add Prio parameter
3877         to the call to Install_Restricted_Handlers.
3879 2014-01-24  Emmanuel Briot  <briot@adacore.com>
3881         * prj-nmsc.adb (Check_File): Add protection when the source is
3882         not fully initialized.
3884 2014-01-24  Ed Schonberg  <schonberg@adacore.com>
3886         * sem_util.adb (Is_Post_State): In a postcondition, a selected
3887         component that denotes an implicit dereference is a reference
3888         to the post state of the subprogram.
3890 2014-01-24  Robert Dewar  <dewar@adacore.com>
3892         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): SPARK_Mode OFF
3893         for generated subprograms.
3894         (Analyze_Subprogram_Specification): Ditto.
3896 2014-01-24  Vincent Celier  <celier@adacore.com>
3898         * prj-dect.adb (Check_Attribute_Allowed): Detect more forbidden
3899         attributes in package Builder of aggregate and aggregate library
3900         projects.
3901         * prj-nmsc.adb (Process_Naming_Scheme.Check.Check_Aggregate):
3902         Remove procedure (Process_Naming_Scheme.Check.Check_Aggregated):
3903         Remove parameters.  Change error message from "... externally
3904         build library ..." to "... externally built project ...".
3905         (Process_Naming_Scheme.Check): Do not do any check in aggregate
3906         project, as attribute Library_Dir and Library_Name have already
3907         been detected as forbidden.
3909 2014-01-24  Vincent Celier  <celier@adacore.com>
3911         * prj-env.adb (Find_Project): If cached project path is not in
3912         project directory, look in current directory first and use cached
3913         project path only if project is not found in project directory.
3915 2014-01-24  Robert Dewar  <dewar@adacore.com>
3917         * sem_util.adb, lib-xref.adb: Correct false positive warnings.
3919 2014-01-24  Vincent Celier  <celier@adacore.com>
3921         * projects.texi: Document that aggregate projects are only
3922         supported by gprbuild, but not by gnatmake.  Document that the
3923         only attribute Switches in package Binder of aggregate projects
3924         will be ignored if its index is not others.  Document that
3925         attribute Global_Config_File is allowed in package Binder of
3926         aggregate projects.
3928 2014-01-24  Robert Dewar  <dewar@adacore.com>
3930         * sem_prag.adb: Minor code reorganization.
3931         * sem_util.adb: Minor fix of potential latent bug in Is_LHS.
3933 2014-01-24  Pascal Obry  <obry@adacore.com>
3935         * prj-attr.adb, projects.texi, snames.ads-tmpl: Add Excluded_Patterns
3936         attribute definition.
3938 2014-01-24  Vincent Celier  <celier@adacore.com>
3940         * makeutl.adb (Queue.Insert_No_Roots): In gprbuild, do not put
3941         in the Queue the same source (same path, same multi-source index)
3942         from the same project file, to avoid compiling several times
3943         the same source.
3945 2014-01-24  Eric Botcazou  <ebotcazou@adacore.com>
3947         * einfo.ads (First_Rep_Item): Remove obsolete stuff.
3948         (Has_Gigi_Rep_Item): Likewise.
3949         * sem_prag.adb (Analyze_Pragma) <Pragma_Linker_Section>: Do not set
3950         Has_Gigi_Rep_Item for objects.
3951         * gcc-interface/decl.c (prepend_one_attribute_to): Rename into...
3952         (prepend_one_attribute): ...this.
3953         (prepend_one_attribute_pragma): New function extracted from...
3954         (prepend_attributes): ...here.  Swap the parameters for consistency.
3955         (gnat_to_gnu_entity): Adjust calls to prepend_one_attribute_to and to
3956         prepend_attributes.
3957         <object>: Deal with a pragma Linker_Section on a constant
3958         or variable.  <E_Function>: Deal with a pragma Linker_Section
3959         on a subprogram.
3960         (get_minimal_subprog_decl): Adjust calls to prepend_one_attribute_to.
3962 2014-01-24  Vincent Celier  <celier@adacore.com>
3964         * opt.ads: Minor comment update.
3966 2014-01-24  Robert Dewar  <dewar@adacore.com>
3968         * sem_prag.adb (Analyze_Input_Output): Add missing error check
3969         for junk operand.
3970         * sem_util.adb (Is_Refined_State): Add defense against junk
3971         tree from error.
3973 2014-01-24  Pascal Obry  <obry@adacore.com>
3975         * projects.texi: Removes Build_Slaves attribute documentation.
3977 2014-01-23  Robert Dewar  <dewar@adacore.com>
3979         * opt.adb (Register_Opt_Config_Switches): Save SPARK_Mode_Pragma
3980         setting.
3982 2014-01-23  Ed Schonberg  <schonberg@adacore.com>
3984         * sem_util.adb (Is_Potentially_Unevaluated): Predicate only
3985         applies to expressions that come from source.
3986         * sem_attr.adb (Analyze_Attribute, case 'Old): Improve error
3987         message.
3988         (Analyze_Attribute, case 'Loop_Entry): Apply SPARK 2014 legality
3989         rule regarding potentially unevaluated expressions, to prefix
3990         of attribute.
3992 2014-01-23  Ed Schonberg  <schonberg@adacore.com>
3994         * exp_util.adb (Make_Invqriant_Call): If type of expression is
3995         a private extension, get invariant from base type.
3997 2014-01-23  Robert Dewar  <dewar@adacore.com>
3999         * sem_util.adb, sem_attr.adb: Minor reformatting.
4001 2014-01-23  Robert Dewar  <dewar@adacore.com>
4003         * opt.adb (Save_Opt_Config_Switches): Save SPARK_Mode_Pragma
4004         (Restore_Opt_Config_Switches): Restore SPARK_Mode_Pragma.
4005         * sem.adb (Semantics): Remove save/restore of
4006         SPARK_Mode[_Pragma]. Not needed since already done in
4007         Save/Restore_Opt_Config_Switches.
4009 2014-01-23  Robert Dewar  <dewar@adacore.com>
4011         * gnat_rm.texi, einfo.adb, einfo.ads, sem_prag.adb, gnat_ugn.texi,
4012         freeze.adb, repinfo.adb, aspects.adb, aspects.ads, sem_ch13.adb:
4013         Linker_Section enhancements.
4015 2014-01-23  Tristan Gingold  <gingold@adacore.com>
4017         * gnat_rm.texi: Minor editing.
4019 2014-01-23  Robert Dewar  <dewar@adacore.com>
4021         * opt.adb (Set_Opt_Config_Switches): Reset SPARK mode for
4022         with'ed internal units.
4023         * sem.adb (Semantics): Save and restore SPARK_Mode[_Pragma].
4025 2014-01-23  Javier Miranda  <miranda@adacore.com>
4027         * lib-xref.adb (Generate_Reference): As part of processing the
4028         "end-of-spec" reference generate an extra reference to the first
4029         private entity of the package.
4030         * xr_tabls.adb (Add_Reference): No action needed for the extra
4031         'E' reference associated; similar to the processing of the
4032         'e' reference.
4034 2014-01-23  Bob Duff  <duff@adacore.com>
4036         * gnat_ugn.texi: Change "--&pp off" to "--!pp off".
4038 2014-01-23  Ed Schonberg  <schonberg@adacore.com>
4040         * sem_util.ads, sem_util.adb (Is_Potentially_Unevaluated): new
4041         predicate to implement rule given in 6.1.1 (20/3).
4042         * sem_attr.adb (Analyze_Attribute, case 'Old): Reject prefix of
4043         'Old in a postcondition, if it is potentially unevaluated and
4044         it is not an entity name.
4046 2014-01-23  Bob Duff  <duff@adacore.com>
4048         * gnat_ugn.texi: Document the new "--&pp off" feature of gnatpp.
4050 2014-01-23  Robert Dewar  <dewar@adacore.com>
4052         * gnatlink.adb (Gnatlink): Fix problem of generating bad name
4053         msg on VMS.
4055 2014-01-23  Bob Duff  <duff@adacore.com>
4057         * g-dynhta.ads: Minor comment fix.
4059 2014-01-23  Yannick Moy  <moy@adacore.com>
4061         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Inherit SPARK_Mode
4062         from spec on body only when not already inherited on spec. Set
4063         SPARK_Mode from context on body without previous spec.  *
4064         * sem_prag.adb (Analyze_Pragma): Check placement of pragma on
4065         library-level entities.  Correct retrieval of entity from
4066         declaration, for cases where the declaration is not a unit.
4067         * sem_ch12.adb (Instantiate_Object): Avoid
4068         calling Is_Volatile_Object on an empty node.
4070 2014-01-23  Robert Dewar  <dewar@adacore.com>
4072         * gnatlink.adb (Gnatlink): Check for suspicious executable file
4073         names on windows.
4075 2014-01-23  Robert Dewar  <dewar@adacore.com>
4077         * a-ngelfu.ads: Remove bad uses of AND which should be AND THEN.
4078         * sem_res.adb (Check_No_Direct_Boolean_Operators): Don't give
4079         style errors in instances.
4080         * g-dynhta.ads (Static_HTable): Comment updates.
4082 2014-01-23  Vincent Celier  <celier@adacore.com>
4084         * prj-conf.adb (Get_Or_Create_Configuration_File): Do not attempt
4085         to find a configuration project file when Config_File_Name is
4086         No_Configuration_File.
4087         * prj-conf.ads (No_Configuration_File): New constant String.
4088         * prj-pars.adb (Parse): Call Get_Or_Create_Configuration_File
4089         with Config_File_Name set to No_Configuration_File, so that
4090         no existing configuration project file will be used, and the
4091         configuration project will be only created in memory when
4092         Add_Default_GNAT_Naming_Scheme is called.
4093         * projects.texi: Minor reformatting.
4095 2014-01-23  Vincent Celier  <celier@adacore.com>
4097         * prj-conf.adb (Get_Or_Create_Configuration_File): Never parse
4098         a config project file if On_Load_Config is not null.
4099         * prj-pars.adb: Minor comment changes.
4101 2014-01-23  Ed Schonberg  <schonberg@adacore.com>
4103         * lib-xref.adb (Output_References): Output progenitors of
4104         synchronized tagged types, for source navigation.
4106 2014-01-23  Robert Dewar  <dewar@adacore.com>
4108         * exp_util.adb, sinfo.adb, sinfo.ads, sem.adb, sem_res.adb,
4109         expander.adb, exp_ch11.adb, exp_ch11.ads, sem_ch11.adb, sem_ch11.ads,
4110         sprint.adb, sprint.ads: Remove unused node N_Subprogram_Info.
4112 2014-01-23  Emmanuel Briot  <briot@adacore.com>
4114         * prj-conf.adb (Get_Or_Create_Configuration_File): call
4115         On_Load_Config later.
4117 2014-01-23  Hristian Kirtchev  <kirtchev@adacore.com>
4119         * sem_ch3.adb (Analyze_Declarations): Do not
4120         generate the spec of the late primitive in ASIS mode. Add two
4121         comments to explain the special cases when the expansion is
4122         not performed.
4124 2014-01-23  Robert Dewar  <dewar@adacore.com>
4126         * sem_util.adb (Note_Possible_Modification): Fix error of
4127         misbehaving for implicit dereference cases in -gnatc mode.
4129 2014-01-23  Emmanuel Briot  <briot@adacore.com>
4131         * prj-pars.adb: Minor reformatting.
4133 2014-01-22  Ed Schonberg  <schonberg@adacore.com>
4135         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): A subprogram
4136         body generated for an expression function within a protected body
4137         needs a set of renaming declarations if the expression function
4138         comes from source.
4140 2014-01-22  Ed Schonberg  <schonberg@adacore.com>
4142         * lib-xref.adb (Get_Type_Reference): In semantics-only mode,
4143         list interface progenitor of a tagged concurrent type, for better
4144         source navigation.
4146 2014-01-22  Robert Dewar  <dewar@adacore.com>
4148         * lib.adb (In_Extended_Main_Code_Unit): Return False for
4149         Standard_Location.
4150         (In_Extended_Main_Source_Unit): Return False for Standard_Location.
4151         * lib.ads (In_Extended_Main_Code_Unit): Add documentation on
4152         treatment of Slocs No_Location and Standard_Location.
4153         * restrict.adb (Check_Restriction_No_Dependence): Explicitly
4154         check for entity with Standard_Location Sloc, rather than relying
4155         on Lib routines to do that.
4156         * sem_res.adb (Resolve_Call): Implement SPARK_05 restriction
4157         that a call cannot occur before a later occuring body within
4158         the same unit.
4160 2014-01-22  Thomas Quinot  <quinot@adacore.com>
4162         * rtsfind.adb: Update comment.
4164 2014-01-22  Hristian Kirtchev  <kirtchev@adacore.com>
4166         * sem_aux.ads, sem_aux.adb (Is_Body): New routine.
4167         * sem_ch3.adb (Analyze_Declarations): Add local variable
4168         Body_Seen. Generate the spec of a late controlled
4169         primitive body that is about to freeze its related type.
4170         (Handle_Late_Controlled_Primitive): New routine.
4172 2014-01-22  Robert Dewar  <dewar@adacore.com>
4174         * a-stream.adb: Minor reformatting.
4176 2014-01-22  Ed Schonberg  <schonberg@adacore.com>
4178         * sem_ch8.adb (From_Actual_Package): Introduce a recursive
4179         sub-procedure Declared_In_Actual to handle properly the visibility
4180         of actuals in actual packages, that are themselves actuals to a
4181         actual package of the current instance. This mimics properly the
4182         visibility of formals of formal packages declared with a box,
4183         within the corresponding generic unit.
4185 2014-01-22  Robert Dewar  <dewar@adacore.com>
4187         * checks.adb: Do not assume that a volatile variable is valid.
4189 2014-01-22  Thomas Quinot  <quinot@adacore.com>
4191         * g-catiio.ads (Image, Value): Clarify that these functions
4192         operate in the local time zone.  Minor documentation update.
4194 2014-01-22  Thomas Quinot  <quinot@adacore.com>
4196         * csets.adb, csets.ads, opt.ads: Minor documentation fixes.
4198 2014-01-22  Robert Dewar  <dewar@adacore.com>
4200         * sem_aux.adb, sem_aux.ads, sem_ch3.adb (Has_Unconstrained_Elements):
4201         Moved to sem_aux.adb.
4203 2014-01-22  Robert Dewar  <dewar@adacore.com>
4205         * vms_data.ads: Minor reformatting.
4207 2014-01-22  Robert Dewar  <dewar@adacore.com>
4209         * debug.adb: Document messages affected by -gnatd.E including
4210         the new ones that relate to late definition of equality.
4211         * sem_ch6.adb (Check_Untagged_Equality): In Ada 2012 mode, if
4212         debug flag -gnatd.E is set, then generate warnings rather than
4213         errors.
4214         (Check_Untagged_Equality): In earlier versions of Ada,
4215         generate warnings if Warn_On_Ada_2012_Incompatibility flag is set.
4217 2014-01-22  Robert Dewar  <dewar@adacore.com>
4219         * sem_prag.adb (Usage_Error): Output additional messages for
4220         unconstrained OUT parameters lacking an input dependency.
4222 2014-01-22  Robert Dewar  <dewar@adacore.com>
4224         * sem_ch4.adb: Minor reformatting.
4226 2014-01-22  Robert Dewar  <dewar@adacore.com>
4228         * restrict.ads: Minor reformatting.
4229         * sem_res.adb (Resolve_Call): Check for SPARK_05 restriction that
4230         forbids a call from within a subprogram to the same subprogram.
4232 2014-01-22  Thomas Quinot  <quinot@adacore.com>
4234         * a-stream.ads (Read_SEA, Write_SEA): New subprograms, optimized
4235         stream attributes for Stream_Element_Array.
4236         * a-stream.adb (Read_SEA, Write_SEA): Bodies for the above.
4237         * rtsfind.adb (Check_CRT): Do not reject a reference to an entity
4238         defined in the current scope.
4240 2014-01-22  Robert Dewar  <dewar@adacore.com>
4242         * debug.adb, exp_ch4.adb, erroutc.adb: Minor reformatting.
4244 2014-01-22  Thomas Quinot  <quinot@adacore.com>
4246         * sem_ch7.adb, sem_ch8.adb, exp_ch3.adb: Minor reformatting.
4248 2014-01-22  Thomas Quinot  <quinot@adacore.com>
4250         * sem_ch3.adb (Analyze_Object_Declaration): For a constant
4251         declaration initialized with a function call, whose type
4252         has variable size, need to remove side effects so that the
4253         initialization expression becomes a dereference of a temporary
4254         reference to the function result.
4256 2014-01-22  Yannick Moy  <moy@adacore.com>
4258         * errout.adb (Initialize): Remove trick to add dummy entry
4259         in Warnings table.
4260         * erroutc.adb (Set_Warnings_Mode_Off,
4261         Set_Warnings_Mode_On): Do nothing if warnings are suppressed by
4262         command line switch.
4263         * opt.ads (Warning_Mode): Document behavior
4264         wrt pragma Warnings, in normal mode and in GNATprove_Mode.
4266 2014-01-22  Robert Dewar  <dewar@adacore.com>
4268         * sem_ch3.adb, errout.adb, erroutc.adb: Minor reformatting.
4270 2014-01-22  Robert Dewar  <dewar@adacore.com>
4272         * sem_ch13.adb (Check_Pool_Size_Clash): New procedure
4273         (Analyze_Attribute_Definition_Clause, case Storage_Pool): call
4274         Check_Pool_Size_Clash (Analyze_Attribute_Definition_Clause,
4275         case Storage_Size): call Check_Pool_Size_Clash.
4277 2014-01-22  Robert Dewar  <dewar@adacore.com>
4279         * sem_ch3.adb, exp_util.adb, sem_dim.adb, sem_elab.adb, sem_ch8.adb,
4280         sem_eval.ads: Minor reformatting.
4282 2014-01-22  Thomas Quinot  <quinot@adacore.com>
4284         * sem_eval.adb (Compile_Time_Known_Bounds): Return False for
4285         Any_Composite to prevent cascaded errors.
4287 2014-01-22  Yannick Moy  <moy@adacore.com>
4289         * errout.adb (Initialize): Do not insert special entry in Warnings
4290         table in GNATprove_Mode.
4291         * erroutc.adb (Set_Warnings_Mode_On): Add info in Warnings table in
4292         GNATprove_Mode.
4293         * gnat1drv.adb (Adjust_Global_Switches): Do not suppress frontend
4294         warnings anymore.
4296 2014-01-22  Robert Dewar  <dewar@adacore.com>
4298         * sem_prag.adb (Analyze_Initializes_In_Decl_Part): Handle null
4299         initializes case.
4301 2014-01-22  Robert Dewar  <dewar@adacore.com>
4303         * snames.ads-tmpl: Update header.
4305 2014-01-22  Thomas Quinot  <quinot@adacore.com>
4307         * exp_util.adb (Insert_Actions): When inserting actions on a
4308         short circuit operator that has already been analyzed, do not park
4309         actions in node; instead introduce an N_Expression_With_Actions
4310         and insert actions immediately.
4311         Add guard for unexpected case of climbing up through statement
4312         in Actions list of an N_Expression_With_Actions.
4313         * sem_elab.adb (Insert_Elab_Check): Remove complex
4314         specialized circuitry for the case where the context is already
4315         analyzed, as it is not needed and introduces irregularities in
4316         finalization. Instead rely on the above change to Insert_Actions
4317         to ensure that late insertion on short circuit operators works
4318         as expected.
4320 2014-01-22  Ed Schonberg  <schonberg@adacore.com>
4322         * sem_ch4.adb (Operator_Check): Improve error message when an
4323         operand of concatenation is an access type.
4325 2014-01-22  Thomas Quinot  <quinot@adacore.com>
4327         * sem_dim.adb (Analyze_Dimension_Identifier): Add guard against
4328         cascaded error.
4330 2014-01-22  Ed Schonberg  <schonberg@adacore.com>
4332         * sem_ch8.adb (Find_Selected_Component): Handle properly the case
4333         of an expanded name in a proper body, whose prefix is a package
4334         in the context of the proper body, when there is a homonym of
4335         the package declared in the parent unit.
4337 2014-01-22  Robert Dewar  <dewar@adacore.com>
4339         * sem_warn.adb (Check_Use_Clause): Don't give no entities used
4340         msg if errors found.
4341         (Check_One_Unit): Same change.
4343 2014-01-22  Robert Dewar  <dewar@adacore.com>
4345         * ug_words: Add missing/wrong entries for VMS warning switches.
4346         * sem_prag.adb (Check_Duplicate_Pragma): Avoid flagging parent type.
4348 2014-01-22  Jerome Guitton  <guitton@adacore.com>
4350         * mlib-tgt-specific-vxworks.adb (Get_Target_Suffix): Replace xscale by
4351         arm.
4353 2014-01-22  Robert Dewar  <dewar@adacore.com>
4355         * gnat_rm.texi, gnat_ugn.texi: Document passive task optimization
4357 2014-01-22  Eric Botcazou  <ebotcazou@adacore.com>
4359         * gcc-interface/Makefile.in: Minor fixes.
4361 2014-01-21  Robert Dewar  <dewar@adacore.com>
4363         * par-ch4.adb (P_If_Expression): Rewritten to improve error recovery.
4364         * par-ch5.adb (P_Condition): New version with expression prescanned.
4365         * par.adb (P_Condition): New version with expression prescanned.
4367 2014-01-21  Robert Dewar  <dewar@adacore.com>
4369         * gnat_rm.texi: Document that Allow_Integer_Address is ignored
4370         if Address is not a private type.
4371         * sem_prag.adb (Analyze_Pragma, case Allow_Integer_Address):
4372         Ignore pragma if System.Address is not a private type.
4374 2014-01-21  Arnaud Charlet  <charlet@adacore.com>
4376         * namet.ads (Name_Len): Initialize to 0 to avoid accessing an
4377         uninitialized value.
4379 2014-01-21  Thomas Quinot  <quinot@adacore.com>
4381         * gnat_rm.texi (Scalar_Storage_Order): Update documentation.
4383 2014-01-21  Ed Schonberg  <schonberg@adacore.com>
4385         * sem_ch12.adb (Set_Instance_Env): In Ada 2012 mode, preserve
4386         the value of Assertions_Enabled flag when compiling an instance of
4387         an internal unit. This facilitates the use of pre/postconditions
4388         in generic internal units, such as the new elementary function
4389         libraries.
4391 2014-01-21  Robert Dewar  <dewar@adacore.com>
4393         * exp_aggr.adb: Minor reformatting.
4394         * sem_attr.adb: Minor reformatting.
4395         * sem_res.adb: Minor comment addition.
4396         * einfo.adb: Minor comment updates.
4397         * freeze.adb: Minor reformatting and code reorganization.
4399 2014-01-21  Ed Schonberg  <schonberg@adacore.com>
4401         * par-ch4.adb (P_If_Expression): Handle more gracefully an
4402         elsif clause that does not have an else part.
4404 2014-01-21  Robert Dewar  <dewar@adacore.com>
4406         * checks.adb, sem_util.ads, sem_ch4.adb: Minor reformatting.
4407         * gcc-interface/Makefile.in: clean up target pairs.
4409 2014-01-21  Pascal Obry  <obry@adacore.com>
4411         * projects.texi: Minor typo fix.
4413 2014-01-21  Thomas Quinot  <quinot@adacore.com>
4415         * freeze.adb (Check_Component_Storage_Order): If a record type
4416         has an explicit Scalar_Storage_Order attribute definition clause,
4417         reject any component that itself is of a composite type and does
4418         not have one.
4420 2014-01-21  Ed Schonberg  <schonberg@adacore.com>
4422         * sem_ch10.adb (Generate_Parent_Reference): Make public so it
4423         can be used to generate proper cross-reference information for
4424         the parent units of proper bodies.
4426 2014-01-21  Thomas Quinot  <quinot@adacore.com>
4428         * exp_pakd.adb (Expand_Packed_Element_Set,
4429         Expand_Packed_Element_Reference): No byte swapping required in
4430         the front-end for the case of a reverse storage order array,
4431         as this is now handled uniformly in the back-end.  However we
4432         still need to swap back an extracted element if it is itself a
4433         nested composite with reverse storage order.
4435 2014-01-21  Hristian Kirtchev  <kirtchev@adacore.com>
4437         * sem_prag.adb (Analyze_External_Property): Add processing for "others".
4438         (Analyze_Pragma): Update the grammar of pragma Abstract_State to
4439         include "others".
4441 2014-01-21  Arnaud Charlet  <charlet@adacore.com>
4443         * gnat_ugn.texi: Minor updates.
4445 2014-01-21  Thomas Quinot  <quinot@adacore.com>
4447         * exp_pakd.adb: Update comment, minor reformatting.
4449 2014-01-21  Hristian Kirtchev  <kirtchev@adacore.com>
4451         * sem_ch3.adb (Analyze_Variable_Contract): Trigger the volatile
4452         object check when SPARK_Mode is on.
4453         * sem_ch6.adb (Process_Formals): Trigger the volatile object
4454         check when SPARK_Mode is on.
4455         * sem_ch12.adb (Instantiate_Object): Trigger the volatile object
4456         check when SPARK_Mode is on.
4457         * sem_ch13.adb (Analyze_Aspect_Specifications): Insert the
4458         corresponding pragma of aspect SPARK_Mode in the visible
4459         declarations of a package declaration.
4460         * sem_prag.adb (Analyze_Pragma): Trigger the volatile object
4461         check when SPARK_Mode is on.
4462         * sem_res.adb (Resolve_Actuals): Trigger the volatile object
4463         check when SPARK_Mode is on.
4464         (Resolve_Entity_Name): Trigger
4465         the volatile object check when SPARK_Mode is on.
4467 2014-01-21  Robert Dewar  <dewar@adacore.com>
4469         * sem_ch3.adb, sem_prag.adb, sem_prag.ads, sem_ch12.adb, sem_res.adb,
4470         sem_ch6.adb, a-except-2005.adb: Minor reformatting.
4472 2014-01-21  Ed Schonberg  <schonberg@adacore.com>
4474         * exp_ch3.adb (Expand_N_Object_Declaration): When a class-wide
4475         object is declared, it is rewritten as a renaming of an dynamic
4476         expression that wraps the initial value.  The renaming declaration
4477         is first given an internal name, to prevent collisions with the
4478         entity already declared, and then the name is modified to reflect
4479         the original one. the modification of the name must preserve
4480         the source location of the original, to prevent spurious errors
4481         when compiling with style checks if the declaration involves
4482         more than one entity.
4484 2014-01-21  Hristian Kirtchev  <kirtchev@adacore.com>
4486         * aspects.adb Add entries for Async_Readers, Async_Writers,
4487         Effective_Reads and Effective_Writes in table Canonical_Aspect.
4488         * aspects.ads Add entries for Async_Readers, Async_Writers,
4489         Effective_Reads and Effective_Writes in tables Aspect_Id,
4490         Aspect_Names, Aspect_Delay and Implementation_Defined_Aspect.
4491         * atree.adb (Ekind_In): New version with 8 parameters.
4492         (Node34): New routine.
4493         (Set_Node34): New routine.
4494         * atree.ads (Ekind_In): New version with 8 parameters.
4495         (Node34): New routine.
4496         (Set_Node34): New routine.
4497         * einfo.adb Contract is now Node34.
4498         (Contract): Update the assertion and node usage.
4499         (Get_Pragma): Include pragmas Async_Readers, Async_Writers,
4500         Effective_Reads and Effective_Writes.
4501         (Set_Contract): Update the assertion and node usage.
4502         (Write_Field24_Name): Remove the output for a contract.
4503         (Write_Field34_Name): Add output for a contract.
4504         * einfo.ads Contract is now Node34. Update the comment on
4505         attribute usage and related node structures.
4506         (Get_Pragma): Update the comment on usage.
4507         * par-prag.adb (Prag): Pragmas Async_Readers, Async_Writers,
4508         Effective_Reads and Effective_Writes do not require special
4509         processing by the parser.
4510         * sem_ch3.adb (Analyze_Variable_Contract): New routine.
4511         (Analyze_Declarations): Analyze the contract of a variable at
4512         the end of the declarative region.
4513         (Analyze_Object_Declaration): Create a contract for a variable.
4514         * sem_ch6.adb (Analyze_Subprogram_Contract): Update the retrieval
4515         of classification pragmas.
4516         (Process_Formals): Detect an illegal
4517         use of a volatile object as a formal in a function.
4518         * sem_ch12.adb (Instantiate_Object): Detect an illegal use of
4519         a volatile object as an actual in generic instantiation.
4520         * sem_prag.adb Add entries for Async_Readers, Async_Writers,
4521         Effective_Reads and Effective_Writes in table Sig_Flags.
4522         (Analyze_External_State_In_Decl_Part): New routine.
4523         (Analyze_Global_Item): Detect an illegal use of a volatile object
4524         as a global item of a function.
4525         (Analyze_Pragma): Reimplement
4526         pragma Abstract_State. Add support for pragmas Async_Readers,
4527         Async_Writers, Effective_Reads and Effective_Writes.
4528         (Check_External_Properties): New routine.
4529         * sem_prag.ads (Analyze_External_State_In_Decl_Part): New routine.
4530         (Check_External_Properties): New routine.
4531         * sem_res.adb (Resolve_Actuals): Detect an illegal use of a
4532         volatile object as an actual in a call.
4533         (Resolve_Entity_Name):
4534         Add local variables Par, Prev and Usage_OK. Detect illegal
4535         contexts of volatile objects.
4536         * sem_util.adb (Add_Contract_Item): Add support for
4537         pragmas associated with the contract of a variable.
4538         (Async_Readers_Enabled): New routine.
4539         (Async_Writers_Enabled): New routine.
4540         (Effective_Reads_Enabled): New routine.
4541         (Effective_Writes_Enabled): New routine.
4542         (Has_Enabled_Property):
4543         New routine.
4544         (Is_Unchecked_Conversion_Instance): New routine.
4545         (Is_Volatile_Object): Add support for entities that may denote
4546         a volatile object.
4547         * sem_util.ads (Add_Contract_Item): Update the
4548         comment on usage.
4549         (Async_Readers_Enabled): New routine.
4550         (Async_Writers_Enabled): New routine.
4551         (Effective_Reads_Enabled): New routine.
4552         (Effective_Writes_Enabled): New routine.
4553         (Is_Unchecked_Conversion_Instance): New routine.
4554         * sinfo.ads Update the comment on the structure of N_Contract.
4555         * snames.ads-tmpl Add predefined names for Async_Readers,
4556         Async_Writers, Effective_Reads and Effective_Writes. Add
4557         pragma ids for Async_Readers, Async_Writers, Effective_Reads
4558         and Effective_Writes.
4560 2014-01-21  Robert Dewar  <dewar@adacore.com>
4562         * exp_ch4.adb (Eval_Op_Expon): Use CRT_Safe_Compile_Time_Known_Value
4563         * sem_eval.adb (Compile_Time_Known_Value): Remove special
4564         handling of CRT mode (CRT_Safe_Compile_Time_Known_Value): New
4565         function (Eval_Op_Expon): Add CRT_Safe in call to Test_Foldable
4566         (Test_Foldable): Add CRT_Safe parameter
4567         * sem_eval.ads (Compile_Time_Known_Value): Remove special
4568         handling of CRT mode.
4569         (CRT_Safe_Compile_Time_Known_Value): New function.
4571 2014-01-21  Robert Dewar  <dewar@adacore.com>
4573         * sem_prag.adb (Analyze_Pragma, case SPARK_Mode): Fix problem
4574         with pragma or aspect that applies to package spec or subprogram
4575         spec.
4577 2014-01-21  Robert Dewar  <dewar@adacore.com>
4579         * exp_aggr.adb: Minor reformatting.
4581 2014-01-21  Johannes Kanig  <kanig@adacore.com>
4583         * gnat1drv.adb (Gnat1drv) remove obsolete reference to -gnatd.H.
4585 2014-01-21  Bob Duff  <duff@adacore.com>
4587         * gnat_ugn.texi: Document the "checks" attribute in gnat2xml.
4589 2014-01-21  Steve Baird  <baird@adacore.com>
4591         * gnat_rm.texi: Improve description of SPARK_Mode pragma.
4593 2014-01-21  Vincent Celier  <celier@adacore.com>
4595         * prj-part.adb (Parse_Single_Project): Accept to extend a project
4596         if it has only be imported by an project being extended. When a
4597         project that has only been imported by a project being extended
4598         is imported by another project that is not being extended,
4599         reset the previous indication, so that it will be an error if
4600         this project is extended later.
4601         * prj-tree.adb (Create_Project): Include component From_Extended
4602         in table Projects_HT
4603         * prj-tree.ads (Project_Name_And_Node): New Boolean component
4604         From_Extended
4606 2014-01-21  Robert Dewar  <dewar@adacore.com>
4608         * atree.ads, atree.adb: Add Node33 and Set_Node33.
4609         * einfo.ads, einfo.adb (SPARK_Pragma): New field (SPARK_Aux_Pragma):
4610         New field (SPARK_Pragma_Inherited): New flag
4611         (SPARK_Aux_Pragma_Inherited): New flag (SPARK_Mode_Pragmas):
4612         Removed.
4613         * lib.ads, lib.adb: Remove SPARK_Mode_Pragma, no longer used.
4614         * opt.ads (SPARK_Mode_Pragma): New global variable.
4615         * sem.ads: Add Save_SPARK_Mode_Pragma field to Scope_Stack_Entry.
4616         * sem_ch3.adb: Use new SPARK_Mode data structures.
4617         * sem_ch6.adb: Set SPARK_Mode fields in subprogram specs and bodies.
4618         * sem_ch7.adb: Set SPARK_Mode fields in package spec and body entities.
4619         * sem_ch8.adb (Push_Scope): Save SPARK_Mode_Pragma.
4620         (Pop_Scope): Restore SPARK_Mode_Pragma.
4621         * sem_prag.adb (Analyze_Pragma, case SPARK_Mode): Rewrite for
4622         new data structures.
4624 2014-01-21  Arnaud Charlet  <charlet@adacore.com>
4626         * back_end.adb: Undo previous change, not needed. Minor reformatting.
4628 2014-01-21  Thomas Quinot  <quinot@adacore.com>
4630         * exp_ch5.adb: Fix comment.
4631         * switch-c.adb: Minor comment update.
4632         * exp_ch3.adb: Minor reformatting.
4634 2014-01-21  Arnaud Charlet  <charlet@adacore.com>
4636         * back_end.adb (Scan_Compiler_Arguments): Do not store object
4637         filename in gnatprove mode.
4639 2014-01-21  Thomas Quinot  <quinot@adacore.com>
4641         * sinfo.ads (No_Ctrl_Actions): Clarify documentation (flag also
4642         suppresses usage of primitive _assign for tagged types).
4643         * exp_aggr.adb (Build_Array_Aggr_Code.Gen_Assign): Set
4644         No_Ctrl_Actions for a tagged type that does not require
4645         finalization, as we want to disable usage of _assign (which
4646         may cause undesirable discriminant checks on an uninitialized,
4647         invalid target).
4649 2014-01-21  Ed Schonberg  <schonberg@adacore.com>
4651         * sem_prag.adb: Reject invariant'class on completion.
4653 2014-01-21  Javier Miranda  <miranda@adacore.com>
4655         * exp_ch3.adb (Build_Init_Procedure): For
4656         derivations of interfaces, do not move the the initialization
4657         of the _parent field since such assignment is not generated.
4659 2014-01-21  Ed Schonberg  <schonberg@adacore.com>
4661         * sem_res.adb (Rewrite_Renamed_Operator): Do not replace entity
4662         with the operator it renames if we are within an expression of
4663         a pre/postcondition, because the expression will be reanalyzed
4664         at a later point, and the analysis of the renaming may affect
4665         the visibility of the operator when in an instance.
4667 2014-01-21  Robert Dewar  <dewar@adacore.com>
4669         * sinfo.ads, sinfo.adb: Change Do_Discriminant_Check to use new Flag1.
4670         Add this flag to type conversion nodes and assignment nodes.
4671         * treepr.adb: Deal properly with Flag 1,2,3.
4672         * treeprs.adt: Minor comment update.
4674 2014-01-21  Robert Dewar  <dewar@adacore.com>
4676         * sem_eval.adb (Compile_Time_Known_Value): Add Ignore_CRT
4677         parameter.
4678         * sem_eval.ads (Compile_Time_Known_Value): Add Ignore_CRT
4679         parameter, completely rewrite spec.
4681 2014-01-21  Ed Schonberg  <schonberg@adacore.com>
4683         * sem_ch10.adb (Install_Withed_Unit): If the unit is a subprogram
4684         instance that is inlined, it may have been rewritten as a wrapper
4685         package. In that case the unit that must be made visible is the
4686         related instance of the package.
4688 2014-01-21  Arnaud Charlet  <charlet@adacore.com>
4690         * exp_ch9.adb (Expand_N_Selective_Accept.Add_Accept): Refine
4691         previous change in codepeer mode.
4693 2014-01-21  Arnaud Charlet  <charlet@adacore.com>
4695         * exp_ch9.adb (Expand_N_Selective_Accept.Add_Accept): Always add
4696         call to Abort_Undefer, as expected by the runtime.
4697         * s-tasren.adb (Local_Complete_Rendezvous): Replace
4698         Defer_Abort_Nestable by Defer_Abort, since we do not expect abort to be
4699         deferred at this point. Update comments.
4701 2014-01-21  Thomas Quinot  <quinot@adacore.com>
4703         * exp_ch4.adb, exp_ch5.adb, checks.adb: Minor reformatting.
4705 2014-01-21  Arnaud Charlet  <charlet@adacore.com>
4707         * switch-c.adb, usage.adb, gnat_ugn.texi: Mark -gnates as internal,
4708         remove from doc.
4710 2014-01-21  Robert Dewar  <dewar@adacore.com>
4712         * switch-c.adb, usage.adb, atree.adb, atree.ads: Minor reformatting.
4714 2014-01-21  Thomas Quinot  <quinot@adacore.com>
4716         * atree.adb, atree.ads (Num_Extension_Nodes): Switch to Node_Id, since
4717         this is value is used in Node_Id arithmetic operations.
4718         (Copy_Node, Exchange_Entities): Use loops indexed by Num_Extension_Nodes
4719         instead of hard-coded unrolled code.
4721 2014-01-21  Yannick Moy  <moy@adacore.com>
4723         * gnat1drv.adb: Minor code cleanup, removing useless code.
4725 2014-01-21  Arnaud Charlet  <charlet@adacore.com>
4727         * opt.ads (SPARK_Switches_File_Name): New.
4728         * switch-c.adb (Scan_Front_End_Switches): Add handling of -gnates=xxx *
4729         * usage.adb (Usage): Document -gnates, in gnatprove mode only.
4730         * gnat_ugn.texi: Document -gnates.
4732 2014-01-21  Yannick Moy  <moy@adacore.com>
4734         * errout.adb (Special_Msg_Delete): Update comment. Remove
4735         special case for GNATprove which should not ignore mismatch
4736         in sizes for representation clauses.
4737         * sem_prag.adb (Analyze_Pragma): Remove special case for GNATprove
4738         which should not ignore pragma Pack.
4740 2014-01-21  Ed Schonberg  <schonberg@adacore.com>
4742         * sem_ch4.adb: Code clean up.
4744 2014-01-21  Steve Baird  <baird@adacore.com>
4746         * gnat_rm.texi: Improve GNAT RM description of SPARK_Mode pragma.
4748 2014-01-21  Robert Dewar  <dewar@adacore.com>
4750         * gcc-interface/gigi.h: Get Flags array address.
4751         * gcc-interface/trans.c: Acquire Flags array address.
4752         * atree.adb: Add support for Flags array and Flag0,1,2,3.
4753         * atree.ads: Add support for Flags array and Flag0,1,2,3.
4754         * atree.h: Add support for Flags array and Flag0,1,2,3.
4755         * back_end.adb: Pass Flags array address to gigi.
4757 2014-01-21  Ed Schonberg  <schonberg@adacore.com>
4759         * sem_ch8.adb (Attribute_Renaming): Transfer original attribute
4760         reference to generated body so that legality checks on stream
4761         attributes are properly applied. If type is tagged and already
4762         frozen, insert generated body at the point of the renaming
4763         declaration.
4765 2014-01-21  Ed Schonberg  <schonberg@adacore.com>
4767         * sem_ch12.adb: Code clean up.
4768         * sem_ch8.adb: Minor reformatting
4770 2014-01-20  Robert Dewar  <dewar@adacore.com>
4772         * checks.adb: Check SPARK_Mode instead of GNATProve_Mode for
4773         converting warnings on inevitable exceptions to errors.
4774         * exp_ch4.adb: Check SPARK_Mode instead of GNATProve_Mode for
4775         converting warnings on inevitable exceptions to errors.
4776         * opt.adb (SPARK_Mode_Config): Handled like other config flags
4777         * opt.ads (SPARK_Mode_Type): Moved here from types (renamed from
4778         SPARK_Mode_Id) (SPARK_Mode_Type): Add pragma Ordered, remove
4779         SPARK_ from names (SPARK_Mode): New flag (SPARK_Mode_Config):
4780         New flag (Config_Switches_Type): Add SPARK_Mode field
4781         * sem.adb: Minor code reorganization (remove unnecessary with)
4782         * sem.ads (Scope_Stack_Entry): Add Save_SPARK_Mode field
4783         * sem_aggr.adb: Check SPARK_Mode instead of GNATProve_Mode for
4784         converting warnings on inevitable exceptions to errors.
4785         * sem_attr.adb: Check SPARK_Mode instead of GNATProve_Mode for
4786         converting warnings on inevitable exceptions to errors.
4787         * sem_ch3.adb: Check SPARK_Mode instead of GNATProve_Mode for
4788         converting warnings on inevitable exceptions to errors.
4789         * sem_ch4.adb: Check SPARK_Mode instead of GNATProve_Mode for
4790         converting warnings on inevitable exceptions to errors.
4791         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Reset SPARK_Mode
4792         from spec if needed
4793         * sem_ch7.adb (Analyze_Package_Body_Helper): Reset SPARK_Mode
4794         from spec if needed
4795         * sem_ch8.adb (Push_Scope): Save SPARK_Mode (Pop_Scope):
4796         Restore SPARK_Mode
4797         * sem_elab.adb: Check SPARK_Mode instead of GNATProve_Mode for
4798         converting warnings on inevitable exceptions to errors.
4799         * sem_prag.adb (Get_SPARK_Mode_From_Pragma): New function
4800         (Get_SPARK_Mode_Id): Removed (Get_SPARK_Mode_Type): New name
4801         of Get_SPARK_Mode_Id
4802         * sem_prag.ads (Get_SPARK_Mode_From_Pragma): New function
4803         * sem_res.adb: Check SPARK_Mode instead of GNATProve_Mode for
4804         converting warnings on inevitable exceptions to errors.
4805         * sem_util.adb: Check SPARK_Mode instead of GNATProve_Mode for
4806         converting warnings on inevitable exceptions to errors.
4807         * types.ads (SPARK_Mode_Id): Moved to opt.ads and renamed
4808         SPARK_Mode_Type
4810 2014-01-20  Ed Schonberg  <schonberg@adacore.com>
4812         * sem_ch13.adb: Add semantic information to rewritten type
4813         reference.
4815 2014-01-20  Ed Schonberg  <schonberg@adacore.com>
4817         * exp_ch5.adb (Expand_N_Assignment_Statement): If both sides
4818         are of a type with unknown discriminants, convert both to the
4819         underlying view of the type, so that the proper constraint check
4820         can be applied to the right-hand side.
4822 2014-01-20  Robert Dewar  <dewar@adacore.com>
4824         * atree.adb (Copy_Node): Fix failure to copy last component
4825         (Exchange_Entities): Fix failure to exchange last entity
4827 2014-01-20  Ed Schonberg  <schonberg@adacore.com>
4829         * sem_ch12.adb: Code clean up.
4831 2014-01-20  Robert Dewar  <dewar@adacore.com>
4833         * gnat_rm.texi, sem_ch4.adb: Minor reformatting.
4835 2014-01-20  Ed Schonberg  <schonberg@adacore.com>
4837         * sem_ch4.adb (Analyze_Quantified_Expression): If after
4838         pre-analysis  the loop parameter specification has been
4839         rewritten as a iterator specification, propagate the change to
4840         the quantified expression, for ASIS navigtion needs.
4842 2014-01-20  Vincent Celier  <celier@adacore.com>
4844         * par-ch10.adb: Minor error message change: escape [ and ].
4846 2014-01-20  Robert Dewar  <dewar@adacore.com>
4848         * checks.adb: Make warnings on exceptions into errors in GNATprove mode.
4849         * errout.adb: Implement [ and ] insertion characters.
4850         * errout.ads: Document new [ and ] insertion characters.
4851         * sem_ch12.adb, restrict.adb, frontend.adb, exp_ch7.adb: Minor
4852         addition of ??? comment.
4853         * lib-xref.adb, exp_util.adb, gnat1drv.adb: Minor reformatting
4854         * exp_ch4.adb, sem_ch3.adb, sem_ch4.adb, sem_ch6.adb, sem_elab.adb,
4855         sem_eval.adb, sem_res.adb, sem_util.adb, sem_attr.adb, sem_aggr.adb:
4856         Make warnings on exceptions into errors in GNATprove mode.
4857         * sem_dim.adb: Minor reformatting throughout Quote [ and ]
4858         in error messages.
4860 2014-01-20  Ed Schonberg  <schonberg@adacore.com>
4862         * sem_ch13.adb: Code clean up.
4864 2014-01-20  Robert Dewar  <dewar@adacore.com>
4866         * errout.ads, errout.adb: Implement >? >x? >X? sequences in error
4867         messages.
4868         * sem_ch6.adb (Check_Statement_Sequence): Missing return is an
4869         error in GNATprove mode.
4871 2014-01-20  Ed Schonberg  <schonberg@adacore.com>
4873         * par-ch4.adb (Is_Parameterless_Attribute): The Ada2012 attribute
4874         reference 'Old takes no parameters, and thus can appear as a
4875         prefix of a slice.
4877 2014-01-20  Eric Botcazou  <ebotcazou@adacore.com>
4879         * exp_aggr.adb: Fix minor typos.
4881 2014-01-20  Ed Schonberg  <schonberg@adacore.com>
4883         * sem_attr.adb (Analyze_Attribute, case 'Constrained): In an
4884         instance the attribute is legal, and its value is determined
4885         statically if the type has no discriminants. This choice is
4886         more useful than rechecking the legality rule in the instance,
4887         is consistent with older usage, and is also consistent with all
4888         existing tests.
4890 2014-01-20  Arnaud Charlet  <charlet@adacore.com>
4892         * sem_cat.adb (Validate_Static_Object_Name): Change error into
4893         warning in Relaxed_Semantic_Mode.
4895 2014-01-20  Ed Schonberg  <schonberg@adacore.com>
4897         * sem_attr.adb: Code and comments cleanup.
4899 2014-01-20  Yannick Moy  <moy@adacore.com>
4901         * debug.adb Free debug flags -gnatd.D, -gnatd.G and -gnatd.V *
4902         * errout.adb (Compilation_Errors): Remove special handling in
4903         GNATprove mode.
4904         * gnat1drv.adb (Adjust_Global_Switches): Remove handling of the
4905         removed debug flags.
4906         * gnat_rm.texi: Initial documentation for Abstract_State, Depends,
4907         Global, Initial_Condition, Initializes and Refined_State pragmas and
4908         aspects.
4909         * opt.ads (Frame_Condition_Mode, Formal_Extensions,
4910         SPARK_Strict_Mode): Remove global flags.
4911         * sem_ch3.adb (Analyze_Object_Declaration): Check of no hidden state
4912         always performed now, on packages declaring a null state.
4913         (Signed_Integer_Type_Declaration): Remove ill-designed attempt
4914         at providing pedantic mode for bounds of integer types.
4915         * sem_ch4.adb (Analyze_Quantified_Expression): Warning on suspicious
4916         "some" quantified expression now issued under control of -gnatw.t,
4917         like the other warning on unused bound variable.
4918         * sem_prag.adb (Check_Precondition_Postcondition): Remove useless test
4919         on removed flag.
4920         (Analyze_Pragma): Remove tests for SPARK 2014
4921         pragmas, not officially allowed by GNAT.
4923 2014-01-20  Hristian Kirtchev  <kirtchev@adacore.com>
4925         * sem_prag.adb (Analyze_Pragma): Ensure that
4926         the sole argument of pragmas Abstract_State, Contract_Cases,
4927         Depends, Global and Initializes in in aggregate form.
4928         (Analyze_Refined_Pragma): Ensure that the sole argument of
4929         pragmas Refined_Depends, Refined_Global and Refined_State is in
4930         aggregate form.
4931         (Ensure_Aggregate_Form): New routine.
4933 2014-01-20  Doug Rupp  <rupp@adacore.com>
4935         * sem_attr.adb (Analyze_Attribute): case
4936         Attribute_Constrained => treat all prefixes as legal for Declib
4937         compatibility.
4939 2014-01-20  Hristian Kirtchev  <kirtchev@adacore.com>
4941         * sem_prag.adb (Check_Mode): Reimplement the routine.
4942         (Find_Mode): New routine.
4944 2014-01-20  Robert Dewar  <dewar@adacore.com>
4946         * sem_ch4.adb (Operator_Check): Handle additional
4947         Allow_Integer_Address cases.
4949 2014-01-20  Robert Dewar  <dewar@adacore.com>
4951         * gnat_rm.texi (Allow_Integer_Address): Remove note about not
4952         allowed if address is non-private, no longer true.
4953         * sem_prag.adb (Analyze_Pragma, case Allow_Integer_Address):
4954         Remove check for address being private, causes difficulty when
4955         pragma used in gnat.adc file and is not needed, since we guard
4956         this in Address_Integer_Convert_OK.
4957         * exp_ch7.adb: Minor reformatting.
4958         * sem_ch4.adb: Handle operator operands in Allow_Integer_Address mode.
4960 2014-01-20  Robert Dewar  <dewar@adacore.com>
4962         * checks.adb (Apply_Range_Check): Remove gnatprove special
4963         casing of exponentiation.
4964         * sem_res.adb (Resolve_Op_Expon): Apply range check to right
4965         operand for integer case to check range against Natural.
4967 2014-01-20  Robert Dewar  <dewar@adacore.com>
4969         * s-tataat.adb: Minor reformatting.
4971 2014-01-20  Robert Dewar  <dewar@adacore.com>
4973         * einfo.adb (Is_Descendent_Of_Address): Now applies to all
4974         entities, and also fix documentation to remove mention of visible
4975         integer type, since this is not what the implementation does.
4976         * einfo.ads (Is_Descendent_Of_Address): Now applies to all
4977         entities, and also fix documentation to remove mention of visible
4978         integer type, since this is not what the implementation does.
4979         * gnat_rm.texi: Minor clarification of Allow_Integer_Address
4980         function.
4981         * sem_ch4.adb (Analyze_One_Call): Handle Allow_Integer_Address
4982         case for parameter type check.
4983         * sem_res.adb (Resolve): Use new function
4984         Address_Integer_Convert_OK.
4985         * sem_type.adb: Minor code reorganization (use Ekind_In) Minor
4986         reformatting throughout.
4987         * sem_util.adb (Address_Integer_Convert_OK): New function.
4988         * sem_util.ads: Minor reformatting (put specs in alpha order)
4989         (Address_Integer_Convert_OK): New function.
4991 2014-01-20  Thomas Quinot  <quinot@adacore.com>
4993         * exp_ch7.adb (Wrap_Transient_Expression):
4994         Insertion extra conditional expression only if
4995         Opt.Suppress_Control_Flow_Optimizations is set.
4997 2014-01-20  Arnaud Charlet  <charlet@adacore.com>
4999         * s-tataat.adb (Initialize_Attributes): Abort might already be
5000         deferred in Create_Task.
5002 2014-01-20  Hristian Kirtchev  <kirtchev@adacore.com>
5004         * checks.adb (Apply_Scalar_Range_Check): Flag
5005         the exponent as requiring a range check when the expression is
5006         an exponentiation.
5008 2014-01-20  Fedor Rybin  <frybin@adacore.com>
5010         * gnat_ugn.texi: Documenting --passed-tests option for gnattest.
5012 2014-01-20  Hristian Kirtchev  <kirtchev@adacore.com>
5014         * sem_util.adb (Default_Initialization): New routine.
5015         * sem_util.ads: Add new type Default_Initialization_Kind.
5016         (Default_Initialization): New routine.
5018 2014-01-20  Hristian Kirtchev  <kirtchev@adacore.com>
5020         * sem_prag.adb (Check_Mode): Correct all error
5021         message logic dealing with in/in out parameters that may appear
5022         as inputs or have a self reference.
5024 2014-01-20  Robert Dewar  <dewar@adacore.com>
5026         * exp_ch9.adb, checks.adb, exp_intr.adb: Minor reformatting.
5027         * sem_res.adb (Resolve): Fix error causing infinite loop for
5028         integer used as address. Allow addresses as integers.
5030 2014-01-20  Arnaud Charlet  <charlet@adacore.com>
5032         * s-osinte-linux.ads (struct_sigaction): Fix rep clause.
5034 2014-01-20  Bob Duff  <duff@adacore.com>
5036         * par-ch8.adb (P_Use_Type_Clause): Detect syntax
5037         error when "use all" is not followed by "type".
5039 2014-01-20  Bob Duff  <duff@adacore.com>
5041         * exp_intr.adb (Expand_Unc_Deallocation): Remove warning on abort
5042         followed by free.
5044 2014-01-20  Ed Schonberg  <schonberg@adacore.com>
5046         * checks.adb (Apply_Address_Clause_Check): If there is an
5047         alignment check on the expression in an address clause, and there
5048         is no local exception propagation, add an additional explanatory
5049         message to clarify the cause of previous warning.
5051 2014-01-20  Robert Dewar  <dewar@adacore.com>
5053         * exp_ch7.adb: Minor reformatting.
5054         * opt.ads: Minor comment updates.
5055         * sem.adb: Minor name change Is_Main_Unit =>
5056         Is_Main_Unit_Or_Main_Unit_Spec.
5057         * sem_ch6.adb: Minor reformatting and code reorganization.
5059 2014-01-20  Bob Duff  <duff@adacore.com>
5061         * gnat_ugn.texi: Update gnatpp switches.
5063 2014-01-20  Thomas Quinot  <quinot@adacore.com>
5065         * exp_ch9.adb: Minor comment edit.
5067 2014-01-20  Robert Dewar  <dewar@adacore.com>
5069         * gnat_rm.texi: Document that Allow_Integer_Address is permitted
5070         only if System.Address is a private type.
5071         * opt.ads (Allow_Integer_Address): No longer set by -gnates.
5072         * sem_prag.adb (Analyze_Pragma, case Allow_Integer_Address):
5073         Allowed only if type System.Address is private, since otherwise
5074         it makes no sense.
5075         * sem_res.adb: Fix failure to properly Analyze unchecked
5076         conversions that were introduced by Allow_Integer_Address.
5077         * switch-c.adb: Remove -gnates switch.
5078         * usage.adb: Remove -gnates switch.
5079         * gnat_ugn.texi: Remove documentation of -gnates flag.
5081 2014-01-20  Ed Schonberg  <schonberg@adacore.com>
5083         * sem_ch6.adb (Analyze_Expression_Function): Pre-analyze and
5084         resolve expression to perform proper name capture.
5086 2014-01-20  Ed Schonberg  <schonberg@adacore.com>
5088         * sem.adb (Semantics): When saving/restoring configuration
5089         switches, the spec of a pre- defined unit that is the main unit
5090         must be treated as a predefined unit as well.
5092 2014-01-20  Thomas Quinot  <quinot@adacore.com>
5094         * exp_ch7.adb (Wrap_Transient_Expression): For a Boolean
5095         expression, insert an extra conditional expression when saving
5096         the value of the expression, for the benefit of control flow
5097         graph based coverage analysis.
5098         * exp_ch3.adb: Minor reformatting.
5100 2014-01-20  Robert Dewar  <dewar@adacore.com>
5102         * gnat1drv.adb: Set Allow_Integer_Address in relaxed semantics mode.
5103         * gnat_rm.texi: Document pragma Allow_Integer_Address.
5104         * gnat_ugn.texi: Document pragma Allow_Integer_Address, -gnates.
5105         * opt.ads: New flag Allow_Integer_Address.
5106         * par-prag.adb: Dummy entry for pragma Allow_Integer_Address.
5107         * sem_ch5.adb: Minor reformatting.
5108         * sem_prag.adb: Implement pragma Allow_Integer_Address.
5109         * sem_res.adb (Resolve): Allow integer address value if
5110         switch set.
5111         * sem_util.adb: Minor reformatting.
5112         * snames.ads-tmpl: Add entry for pragma Allow_Integer_Address.
5113         * switch-c.adb: Recognize flag -gnates.
5114         * usage.adb: Document flag -gnates.
5116 2014-01-20  Thomas Quinot  <quinot@adacore.com>
5118         * s-tadeca.adb: Fix minor typos in comment.
5120 2014-01-20  Pascal Obry  <obry@adacore.com>
5122         * s-win32.ads (FreeLibrary): New import.
5124 2014-01-20  Robert Dewar  <dewar@adacore.com>
5126         * sem_res.adb, sem_cat.adb: Minor reformatting.
5127         * sem_ch11.adb (Analyze_Raise_Statement): Only give warning about
5128         assigning to OUT parameters for the current subprogram scope.
5129         * exp_ch4.adb: Minor reformatting.
5131 2014-01-20  Ed Schonberg  <schonberg@adacore.com>
5133         * exp_ch4.adb (Process_Transient_Object,
5134         Find_Enclosing_Contexts): If the top-level if-expression that
5135         generated the transient object is an actual in a call, the proper
5136         Hook_Context is a construct enclosing the call.
5137         * einfo.ads: Indicate that Related_Expression is used to link a
5138         loop variable to the container expression over which the loop
5139         takes place.
5140         (Analyze_Iterator_Specification): Set the Related_Expression of
5141         the loop variable in a container element iterator.
5142         (Note_Possible_Modification): If the variable is the loop
5143         variable in a container element iterator, indicate that the
5144         enclosing container is also modified.
5146 2014-01-20  Hristian Kirtchev  <kirtchev@adacore.com>
5148         * aspects.adb (Move_Or_Merge_Aspects): Reimplemented.
5150 2014-01-20  Robert Dewar  <dewar@adacore.com>
5152         * s-taasde.ads, gnat_ugn.texi, s-tadeca.adb, sem_res.adb, s-tadeca.ads:
5153         Minor reformatting and code clean up.
5155 2014-01-20  Arnaud Charlet  <charlet@adacore.com>
5157         * sem_cat.adb (Validate_Object_Declaration): Relax semantics
5158         of objects of private type if Relaxed_RM_Semantics.
5160 2014-01-20  Claire Dross  <dross@adacore.com>
5162         * a-cofove.ads (Vector): Capacity discriminant
5163         should be in range of the index.
5165 2014-01-20  Thomas Quinot  <quinot@adacore.com>
5167         * a-caldel.ads(To_Duration), s-taasde.ads(Time_Enqueue):
5168         Clarify specs s-tadeca.adb(Enqueue_Calendar): Compensate for
5169         possible difference between epoch of Ada.Calendar clock and Ada
5170         real-time/tasking clock.
5171         * s-taprop-posix.adb: Minor comment fix.
5173 2014-01-20  Doug Rupp  <rupp@adacore.com>
5175         * sysdep.c [vxworks]: Remove Vxworks version noise for RTP.
5177 2014-01-20  Hristian Kirtchev  <kirtchev@adacore.com>
5179         * exp_attr.adb (Expand_N_Attribute_Reference): Generate validity
5180         checks on the prefix of attribute 'Old.
5181         * sem_ch3.adb (Process_Range_Expr_In_Decl): Suppress the
5182         generation of validity checks on a range that belongs to the
5183         iteration scheme of a quantified expression.
5184         * sem_ch5.adb (One_Bound): Suppress the generation of validity
5185         checks on a bound that belongs to the iteration scheme of a
5186         quantified expression, generate the check in all other cases.
5188 2014-01-20  Bob Duff  <duff@adacore.com>
5190         * gnat_ugn.texi: Enable --pp-new by default. Minor reorganization.
5192 2014-01-20  Ed Schonberg  <schonberg@adacore.com>
5194         * sem_res.adb (Resolve): When compiling a predefined unit, ignore
5195         interpretations that do not come from other predefined units,
5196         to prevent spurious ambiguities in the presence of user-defined
5197         operators in the context of (an instance of) a predefined unit.
5199 2014-01-20  Robert Dewar  <dewar@adacore.com>
5201         * gnat_rm.texi: Document that Loop_Variant is included in
5202         Statement_Assertions.
5203         * sem_prag.adb (Check_Kind): Add Loop_Variant to
5204         Statement_Assertions (Check_Applicable_Policy): Add Loop_Variant
5205         to Statement_Assertions.
5207 2014-01-20  Doug Rupp  <rupp@adacore.com>
5209         * sysdep.c (__gnat_is_file_not_found_error) [vxworks6]: Add case
5210         for errno ENOENT from RTP on NFS mounted file system.
5212 2014-01-20  Ed Schonberg  <schonberg@adacore.com>
5214         * sem_util.adb (Check_Function_Writable_Actuals): 1) Do not
5215         examine code that does not come from source. The check does not
5216         apply to code generated for constraint checks, and such code may
5217         generate spurious error messages when compiled with expansion
5218         disabled (as in a generic unit) because side effects may not
5219         have been removed.
5220         2) Make error messages more explicit: indicate the component
5221         of the  construct whose value is indeterminate because of a
5222         call to a function with in-out parameter in another component,
5223         when there is no mandated order of execution between the two
5224         components (actuals, aggregate components, alternatives).
5226 2014-01-20  Robert Dewar  <dewar@adacore.com>
5228         * gnat_rm.texi: Minor cleanup.
5230 2014-01-20  Hristian Kirtchev  <kirtchev@adacore.com>
5232         * sem_attr.adb (Analyze_Attribute): Attributes 'Old and 'Result
5233         can now apply to a refined postcondition.
5234         * sem_ch6.adb (Analyze_Subprogram_Contract): Remove local
5235         variable Result_Seen. Add variables Case_Prag, Post_Prag,
5236         Seen_In_Case and Seen_In_Post. Update the mechanism that detects
5237         whether postconditions and/or constract-cases mention attribute
5238         'Result and introduce a post-state when applied to functions.
5239         (Check_Result_And_Post_State): Removed.
5240         * sem_prag.adb (Analyze_Pragma): Add local variable
5241         Result_Seen. Verify that the expression of pragma Refined_Post
5242         mentions attribute 'Result and introduces a post-state.
5243         * sem_util.ads, sem_util.adb (Check_Result_And_Post_State): New routine.
5245 2014-01-20  Hristian Kirtchev  <kirtchev@adacore.com>
5247         * exp_ch7.adb (Is_Subprogram_Call): New routine.
5248         (Process_Transient_Objects): Make variable Must_Hook global with
5249         respect to all locally declared subprograms. Search the context
5250         for at least one subprogram call.
5251         (Requires_Hooking): Removed.
5253 2014-01-20  Claire Dross  <dross@adacore.com>
5255         * a-cfdlli.ads a-cfhama.ads a-cfhase.ads a-cforma.ads
5256         * a-cforse.ads a-cofove.ads: Add pragma Annotate (GNATprove,
5257         External_Axiomatization);
5259 2014-01-20  Robert Dewar  <dewar@adacore.com>
5261         * sem_attr.adb (Analyze_Attribute, case Loop_Entry): Allow
5262         Loop_Entry in Assert, Assert_And_Cut, and Assume pragmas.
5263         * sem_prag.adb (Analyze_Pragma, case Assert[_And_Cut], Assume):
5264         Allow Loop_Entry to be used in these pragmas if they appear in
5265         an appropriate context.
5266         (Placement_Error): Specialize error
5267         message for pragma Assert[_And_Cut] or pragma Assume containing
5268         Loop_Entry attribute.
5269         * a-exexpr-gcc.adb, sinput.adb: Minor reformatting.
5270         * s-excmac-arm.ads, s-except.ads, s-excmac-gcc.ads: Minor reformatting
5271         and code clean ups.
5273 2014-01-20  Robert Dewar  <dewar@adacore.com>
5275         * gnat1drv.adb: Minor comment update.
5277 2014-01-20  Tristan Gingold  <gingold@adacore.com>
5279         * raise-gcc.c (PERSONALITY_FUNCTION/arm): Remove unused
5280         variables, comment out unused code.
5281         * a-exexpr-gcc.adb: Move declarations to s-excmac-gcc.ads
5282         * s-excmac-gcc.ads: New file, extracted from a-exexpr-gcc.adb
5283         * s-excmac-arm.ads: New file.
5285 2014-01-20  Hristian Kirtchev  <kirtchev@adacore.com>
5287         * exp_ch4.adb (Expand_N_Slice): Remove constant D and variables
5288         Drange and Index_Typ. Remove the circuitry which creates a
5289         range check to compare the index type of the array against the
5290         discrete_range.
5291         * sem_res.adb (Resolve_Slice): Add local variable Dexpr. Update
5292         the circuitry which creates a range check to handle a
5293         discrete_range denoted by a subtype indication.
5295 2014-01-20  Pierre-Marie Derodat  <derodat@adacore.com>
5297         * sinput.adb, sinput.ads (Sloc_Range): Traverse the tree of original
5298         nodes to get the original sloc range.
5300 2014-01-20  Hristian Kirtchev  <kirtchev@adacore.com>
5302         * sem_prag.adb (Analyze_Pragma): Use Defining_Entity to obtain the
5303         entity of a [library level] package.
5305 2014-01-20  Tristan Gingold  <gingold@adacore.com>
5307         * raise-gcc.c (exception_class_eq): New function.
5308         (is_handled_by): Use it to compare exception classes.
5309         (PERSONALITY_STORAGE): Define.  (continue_unwind): New function to
5310         be called to return URC_CONTINUE_UNWIND.
5311         (personality_body): New function, extracted from PERSONALITY_ROUTINE.
5312         (PERSONALITY_ROUTINE): Add an implementation for the ARM unwinder.
5314 2014-01-20  Robert Dewar  <dewar@adacore.com>
5316         * opt.ads: Minor comment update.
5318 2014-01-20  Hristian Kirtchev  <kirtchev@adacore.com>
5320         * exp_ch4.adb (Expand_N_Slice): Relocate some variables and
5321         constants to the "Local variables" area. Add new constant D. Add
5322         new variables Drange and Index_Typ.  Rename Pfx to Rep and Ptp
5323         to Pref_Typ and update all occurrences. Add circuitry to extract
5324         the discrete_range and the index type and build a range check.
5326 2014-01-20  Arnaud Charlet  <charlet@adacore.com>
5328         * gnat1drv.adb (Adjust_Global_Switches): Enable
5329         Treat_Categorization_Errors_As_Warnings when Relaxed_RM_Semantics
5330         is set.
5332 2014-01-20  Thomas Quinot  <quinot@adacore.com>
5334         * sem_ch5.adb, sem_ch4.adb: Minor reformatting.
5336 2014-01-20  Hristian Kirtchev  <kirtchev@adacore.com>
5338         * sem_ch13.adb (Analyze_Aspect_Specifications):
5339         When aspect SPARK_Mode appears on a package body, insert the
5340         generated pragma at the top of the body declarations.
5342 2014-01-20  Robert Dewar  <dewar@adacore.com>
5344         * sem_aggr.adb, exp_prag.adb, sem_aux.adb, sinfo.ads, sem_ch10.adb,
5345         checks.adb, sem_prag.adb, sem_ch12.adb, freeze.adb, g-arrspl.adb,
5346         expander.adb, gnat1drv.adb, exp_ch4.adb, sem_ch6.adb,
5347         sem_ch8.adb, exp_dist.adb: Minor reformatting.
5349 2014-01-20  Yannick Moy  <moy@adacore.com>
5351         * gnat1drv.adb (Gnat1drv): Call Write_ALI with Object=True in GNATprove
5352         mode.
5354 2014-01-20  Pascal Obry  <obry@adacore.com>
5356         * g-arrspl.ads (Slice_Set): New definition (will use a copy on
5357         write scheme).
5358         * g-arrspl.adb: Adapt all routine to this new implementation.
5359         (Set): Copy the Slice_Set definition before reusing it.
5361 2014-01-20  Arnaud Charlet  <charlet@adacore.com>
5363         * sem_prag.adb (Process_Import_Or_Interface): In
5364         Relaxed_RM_Semantics, support old Ada 83 style of pragma Import.
5365         (Analyze_Pragma): Ditto for pragma Export.
5366         * exp_prag.adb (Expand_Pragma_Import_Or_Interface): Handle old pragma
5367         Import style.
5369 2014-01-20  Hristian Kirtchev  <kirtchev@adacore.com>
5371         * einfo.ads: E_Abstract_State is now part of the entities that
5372         can be overloaded. Update type Overloadable_Kind to reflect the
5373         inclusion of abstract states.
5374         * sem_ch6.adb (New_Overloaded_Entity): A function can now
5375         overload an abstract state.
5376         * sem_prag.adb (Analyze_Constituent): Handle the overloading
5377         of states by functions. Use Entity_Of to obtain the entity of
5378         a constituent.  (Analyze_Global_Item): Handle the overloading of
5379         states by functions.
5380         (Analyze_Initialization_Item): Handle the
5381         overloading of states by functions.  Use Entity_Of to obtain the
5382         entity of an item.
5383         (Analyze_Input_Item): Handle the overloading
5384         of states by functions. Use Entity_Of to obtain the entity of an item.
5385         (Analyze_Input_Output): Handle the overloading of states by functions.
5386         (Analyze_Refinement_Clause): Handle the overloading
5387         of states by functions.  Use Entity_Of to obtain the entity of an item.
5388         (Appears_In): Use Entity_Of to obtain the entity of an element.
5389         (Check_Usage): Use Entity_Of to obtain the entity of
5390         an item. Add a guard to prevent a crash due to a previous error.
5391         (Resolve_State): New routine.
5393 2014-01-20  Yannick Moy  <moy@adacore.com>
5395         * spark_xrefs.ads, debug.adb, gnat1drv.adb, errout.adb, errout.ads,
5396         opt.ads: Minor comments updates.
5398 2014-01-20  Hristian Kirtchev  <kirtchev@adacore.com>
5400         * einfo.adb (Non_Limited_View): Applies to abstract states.
5401         (Set_From_Limited_With): Applies to abstract states.
5402         (Set_Non_Limited_View): Applies to abstract states.
5403         (Write_Field17): Output the non-limited view of an abstract state.
5404         * einfo.ads: Update the comment on usage and occurrences in
5405         nodes for attributes From_Limited_With and Non_Limited_View.
5406         * sem_aux.adb (Available_View): This routine can now handle
5407         abstract states.
5408         * sem_aux.ads (Available_View): This routine can now handle
5409         abstract states. Update the comment on usage.
5410         * sem_ch8.adb (Find_Expanded_Name): Handle abstract views
5411         of states and variables.
5412         (In_Pragmas_Depends_Or_Global): New routine.
5413         * sem_ch10.adb (Build_Limited_Views): Implement
5414         abstract (limited) views of variables and states.
5415         (Build_Shadow_Entity): This routine is now a procedure. Add
5416         formal parameter Shadow. Update the comment on usage. Add
5417         context-specific decoration for states and variables.
5418         (Decorate_State): New routine.  (Decorate_Variable): New routine.
5419         (Find_And_Process_States): New routine.
5420         (Process_Declarations): Renamed to Process_Declarations_And_States.
5421         (Process_Declarations_And_States): Add formal parameters
5422         Pack and Create_Abstract_Views. Update the comment on usage.
5423         (Process_States): New routine.
5424         * sem_prag.adb (Check_Dependency_Clause): Handle abstract
5425         views of states and variables. Match the abstract view of a state
5426         against its corresponding non-abstract view.
5427         (Is_Matching_Input):
5428         Handle abstract views of states and variables. Match the abstract
5429         view of a state against its corresponding non-abstract view.
5430         (Process_Global_Item): Handle abstract views of states and
5431         variables.
5433 2014-01-20  Bob Duff  <duff@adacore.com>
5435         * sem_ch10.adb (Expand_With_Clause): Don't
5436         recurse on the prefix if the current with-ed name refers to a
5437         package that renames its own parent, eg "package P.Q renames P;".
5439 2014-01-20  Yannick Moy  <moy@adacore.com>
5441         * exp_spark.adb (Expand_SPARK_Call): Remove procedure.
5442         * opt.adb, opt.ads (Full_Expander_Active): Remove function.
5443         * checks.adb, exp_ch6.adb, exp_ch9.adb, exp_disp.adb, sem_aggr.adb,
5444         * sem_ch10.adb, sem_ch5.adb, sem_ch6.adb, sem_ch8.adb, sem_ch9.adb,
5445         * sem_disp.adb, sem_res.adb Replace Full_Expander_Active by
5446         Expander_Active.
5448 2014-01-20  Yannick Moy  <moy@adacore.com>
5450         * sinfo.ads Update documentation of GNATprove mode.
5452 2014-01-20  Yannick Moy  <moy@adacore.com>
5454         * adabkend.adb, ali-util.adb, errout.adb, exp_ch7.adb,
5455         * exp_dbug.adb, freeze.adb, lib-xref.adb, restrict.adb,
5456         * sem_attr.adb, sem_ch4.adb, sem_ch5.adb, sem_ch6.adb, sem_ch8.adb,
5457         * sem_prag.adb, sem_res.adb, sem_util.adb Rename SPARK_Mode into
5458         GNATprove_Mode.
5459         * sem_ch13.adb: Remove blank.
5460         * exp_spark.adb, exp_spark.ads (Expand_SPARK_Call): Only replace
5461         subprograms by alias for renamings, not for inherited primitive
5462         operations.
5463         * exp_util.adb (Expand_Subtype_From_Expr): Apply the expansion
5464         in GNATprove mode.
5465         (Remove_Side_Effects): Apply the removal in
5466         GNATprove mode, for the full analysis of expressions.
5467         * expander.adb (Expand): Call the light SPARK expansion in GNATprove
5468         mode.
5469         (Expander_Mode_Restore, Expander_Mode_Save_And_Set): Ignore
5470         save/restore actions for Expander_Active flag in GNATprove mode,
5471         similar to what is done in ASIS mode.
5472         * frontend.adb (Frontend): Generic bodies are instantiated in
5473         GNATprove mode.
5474         * gnat1drv.adb (Adjust_Global_Switches): Set operating
5475         mode to Check_Semantics in GNATprove mode, although a light
5476         expansion is still performed.
5477         (Gnat1drv): Set Back_End_Mode to
5478         Declarations_Only in GNATprove mode, and later on special case
5479         the GNATprove mode to continue analysis anyway.
5480         * lib-writ.adb (Write_ALI): Always generate ALI files in
5481         GNATprove mode.
5482         * opt.adb, opt.ads (Full_Expander_Active): Make it equivalent to
5483         Expander_Active.
5484         (SPARK_Mode): Renamed as GNATprove_Mode.
5485         * sem_aggr.adb (Aggregate_Constraint_Checks): Add checks in the
5486         tree in GNATprove_Mode.
5487         * sem_ch12.adb (Analyze_Package_Instantiation): Always instantiate
5488         body in GNATprove mode.
5489         (Need_Subprogram_Instance_Body): Always instantiate body in GNATprove
5490         mode.
5491         * sem_ch3.adb (Constrain_Index, Process_Range_Expr_In_Decl):
5492         Make sure side effects are removed in GNATprove mode.
5494 2014-01-20  Eric Botcazou  <ebotcazou@adacore.com>
5496         * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Robustify tests
5497         for aliased objects with an unconstrained nominal subtype.
5498         * gcc-interface/trans.c (Call_to_gnu): Likewise.
5499         (gnat_to_gnu) <case N_Op_Not>: Robustify test for private type.
5500         <case N_Op_Minus>: Remove useless code.
5501         (Exception_Handler_to_gnu_zcx): Minor tweaks.
5503 2014-01-20  Eric Botcazou  <ebotcazou@adacore.com>
5505         * gcc-interface/decl.c (gnat_to_gnu_entity) <case E_Record_Subtype>:
5506         Tidy up.  For a subtype with discriminants and variant part, if a
5507         variant is statically selected and the fields all have a constant
5508         position, put them in order of increasing position.  Likewise if
5509         no variant part but representation clause is present.
5510         * gcc-interface/utils.c (make_packable_type): Robustify.
5511         (maybe_pad_type): Use local variable and tidy up condition.  If no
5512         alignment is specified, use the original one.
5513         (create_type_stub_decl): Minor tweak.
5514         (convert) <case VECTOR_CST>: Fix typo.
5515         <case CONSTRUCTOR>: Deal with padding types around the same type.
5516         Do not punt on missing fields.
5517         (unchecked_convert): Call finish_record_type to lay out the special
5518         record types made for conversions from/to problematic integer types.
5519         Bump the alignment of CONSTRUCTORs before converting them to a more
5520         aligned type.
5522 2014-01-20  Eric Botcazou  <ebotcazou@adacore.com>
5524         * gcc-interface/decl.c (gnat_to_gnu_entity) <case E_Component>: Remove
5525         obsolete code for type_annotate_only mode, simplify code and slightly
5526         improve wording of comments.
5528 2014-01-12  Eric Botcazou  <ebotcazou@adacore.com>
5530         PR ada/59772
5531         * gcc-interface/cuintp.c (build_cst_from_int): Use 32-bit integer type
5532         as intermediate type.
5533         (UI_To_gnu): Likewise.
5535 2014-01-03  Eric Botcazou  <ebotcazou@adacore.com>
5537         * gnatvsn.ads (Current_Year): Bump to 2014.
5539 2014-01-02  Tobias Burnus  <burnus@net-b.de>
5541         * gnat_ugn.texi: Bump @copying's copyright year.
5543 Copyright (C) 2014 Free Software Foundation, Inc.
5545 Copying and distribution of this file, with or without modification,
5546 are permitted in any medium without royalty provided the copyright
5547 notice and this notice are preserved.