* gcc-interface/decl.c (gnat_to_gnu_entity): Use Underlying_Type in
[official-gcc.git] / gcc / ada / ChangeLog
blobd624a8e6ff52d8e66076a68617414738acb26024
1 2014-05-18  Eric Botcazou  <ebotcazou@adacore.com>
3         * gcc-interface/decl.c (gnat_to_gnu_entity): Use Underlying_Type in
4         lieu of more verbose construct.
5         * gcc-interface/trans.c (Call_to_gnu): Likewise.
6         (gnat_to_gnu): Likewise.  Remove obsolete code.
8 2014-05-18  Eric Botcazou  <ebotcazou@adacore.com>
10         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Subtype>: Do not
11         consider that regular packed arrays can never be superflat.
13 2014-05-17  Trevor Saunders  <tsaunders@mozilla.com>
15         * gcc-interface/ada-tree.h: Remove usage of variable_size gty
16         annotation.
17         * gcc-interface/decl.c (annotate_value): Adjust.
18         * gcc-interface/trans.c (Attribute_to_gnu): Likewise.
19         (push_range_check_info): Likewise.
20         (Loop_Statement_to_gnu): Likewise.
21         (Subprogram_Body_to_gnu): Likewise.
22         (Compilation_Unit_to_gnu): Likewise.
23         (start_stmt_group): Likewise.
24         * gcc-interface/utils.c (init_gnat_utils): Likewise.
25         (gnat_pushlevel): Likewise.
26         (maybe_pad_type): Likewise.
28 2014-05-14  Eric Botcazou  <ebotcazou@adacore.com>
30         * seh_init.c: Fix copyright year.
32 2014-05-14  Bernd Edlinger  <bernd.edlinger@hotmail.de>
34         * seh_init.c (__gnat_map_SEH): Compile also when __CYGWIN__ and __SEH__
35         are defined.  Move include windows.h before system.h.
36         * s-oscons-tmplt.c (DTR_CONTROL_ENABLE, RTS_CONTROL_ENABLE): Compile
37         also when __CYGWIN__ is defined.  Include windef.h before winbase.h.
39 2014-05-14  Richard Sandiford  <r.sandiford@uk.ibm.com>
41         * gcc-interface/decl.c (gnat_to_gnu_entity): Convert integer_one_node
42         to the appropriate type.
43         * gcc-interface/trans.c (gnat_to_gnu): Likewise.
44         (pos_to_constructor): Likewise.
46 2014-05-13  Eric Botcazou  <ebotcazou@adacore.com>
48         * gcc-interface/decl.c (annotate_value): Fix thinko in latest change.
50 2014-05-06  Kenneth Zadeck  <zadeck@naturalbridge.com>
51             Mike Stump  <mikestump@comcast.net>
52             Richard Sandiford  <rdsandiford@googlemail.com>
54         * gcc-interface/cuintp.c (UI_From_gnu): Use wide-int interfaces.
55         * gcc-interface/decl.c (gnat_to_gnu_entity): Use TYPE_SIGN.
56         (annotate_value): Use wide-int interfaces.
57         * gcc-interface/utils.c (get_nonnull_operand): Use tree_fits_uhwi_p.
59 2014-04-28  Richard Henderson  <rth@redhat.com>
61         * gcc-interface/Makefile.in: Support aarch64-linux.
63 2014-04-28  Eric Botcazou  <ebotcazou@adacore.com>
65         * exp_dbug.ads (Get_External_Name): Add 'False' default to Has_Suffix,
66         add 'Suffix' parameter and adjust comment.
67         (Get_External_Name_With_Suffix): Delete.
68         * exp_dbug.adb (Get_External_Name_With_Suffix): Merge into...
69         (Get_External_Name): ...here.  Add 'False' default to Has_Suffix, add
70         'Suffix' parameter.
71         (Get_Encoded_Name): Remove 2nd argument in call to Get_External_Name.
72         Call Get_External_Name instead of Get_External_Name_With_Suffix.
73         (Get_Secondary_DT_External_Name): Likewise.
74         * exp_cg.adb (Write_Call_Info): Likewise.
75         * exp_disp.adb (Export_DT): Likewise.
76         (Import_DT): Likewise.
77         * comperr.ads (Compiler_Abort): Remove Code parameter and add From_GCC
78         parameter with False default.
79         * comperr.adb (Compiler_Abort): Likewise.  Adjust accordingly.
80         * types.h (Fat_Pointer): Rename into...
81         (String_Pointer): ...this.  Add comment on interfacing rules.
82         * fe.h (Compiler_Abort): Adjust for above renaming.
83         (Error_Msg_N): Likewise.
84         (Error_Msg_NE): Likewise.
85         (Get_External_Name): Likewise.  Add third parameter.
86         (Get_External_Name_With_Suffix): Delete.
87         * gcc-interface/decl.c (STDCALL_PREFIX): Define.
88         (create_concat_name): Adjust call to Get_External_Name, remove call to
89         Get_External_Name_With_Suffix, use STDCALL_PREFIX, adjust for renaming.
90         * gcc-interface/trans.c (post_error): Likewise.
91         (post_error_ne): Likewise.
92         * gcc-interface/misc.c (internal_error_function): Likewise.
94 2014-04-28  Richard Biener  <rguenther@suse.de>
96         PR middle-end/60092
97         * gcc-interface/utils.c: Define flag_isoc11.
99 2014-04-26  Eric Botcazou  <ebotcazou@adacore.com>
101         * gnatvsn.ads (Library_Version): Bump to 4.10.
103 2014-04-23  Eric Botcazou  <ebotcazou@adacore.com>
105         Revert
106         2014-04-22  Richard Henderson  <rth@redhat.com>
108         * gcc-interface/Makefile.in: Support aarch64-linux.
110         2014-04-22  Eric Botcazou  <ebotcazou@adacore.com>
112         * fe.h (Compiler_Abort): Replace Fat_Pointer with String_Pointer.
113         (Error_Msg_N): Likewise.
114         (Error_Msg_NE): Likewise.
115         (Get_External_Name_With_Suffix): Likewise.
116         * types.h (Fat_Pointer): Delete.
117         (String_Pointer): New type.
118         (DECLARE_STRING_POINTER): New macro.
119         * gcc-interface/decl.c (create_concat_name): Adjust.
120         * gcc-interface/trans.c (post_error): Likewise.
121         (post_error_ne): Likewise.
122         * gcc-interface/misc.c (internal_error_function): Likewise.
124 2014-04-22  Richard Henderson  <rth@redhat.com>
126         * gcc-interface/Makefile.in: Support aarch64-linux.
128         * init.c [__linux__] (HAVE_GNAT_ALTERNATE_STACK): New define.
129         (__gnat_alternate_stack): Enable for all linux except ia64.
131 2014-04-22  Eric Botcazou  <ebotcazou@adacore.com>
133         * fe.h (Compiler_Abort): Replace Fat_Pointer with String_Pointer.
134         (Error_Msg_N): Likewise.
135         (Error_Msg_NE): Likewise.
136         (Get_External_Name_With_Suffix): Likewise.
137         * types.h (Fat_Pointer): Delete.
138         (String_Pointer): New type.
139         (DECLARE_STRING_POINTER): New macro.
140         * gcc-interface/decl.c (create_concat_name): Adjust.
141         * gcc-interface/trans.c (post_error): Likewise.
142         (post_error_ne): Likewise.
143         * gcc-interface/misc.c (internal_error_function): Likewise.
145 2014-04-15  Eric Botcazou  <ebotcazou@adacore.com>
146             Pierre-Marie de Rodat  <derodat@adacore.com>
148         * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create a mere
149         scalar constant instead of a reference for renaming of scalar literal.
150         Do not create a new object for constant renaming except for a function
151         call.  Make sure a VAR_DECL is created for the renaming pointer.
152         * gcc-interface/trans.c (constant_decl_with_initializer_p): New.
153         (fold_constant_decl_in_expr): New function.
154         (Identifier_to_gnu): Use constant_decl_with_initializer_p.
155         For a constant renaming, try to fold a constant DECL in the result.
156         (lvalue_required_p) <N_Object_Renaming_Declaration>: Always return 1.
157         (Identifier_to_gnu): Reference the renamed object of constant renaming
158         pointers directly.
159         * gcc-interface/utils.c (invalidate_global_renaming_pointers): Do not
160         invalidate constant renaming pointers.
162 2014-04-15  Eric Botcazou  <ebotcazou@adacore.com>
164         * gcc-interface/utils.c (type_for_vector_element_p): New predicate.
165         (build_vector_type_for_size): New function.
166         (build_vector_type_for_array): Likewise.
167         (unchecked_convert): Build an intermediate vector type to convert
168         from a generic array type to a vector type.
169         (handle_vector_size_attribute): Reimplement.
170         (handle_vector_type_attribute): Likewise.
172 2014-04-15  Eric Botcazou  <ebotcazou@adacore.com>
174         * gcc-interface/decl.c (prepend_one_attribute_pragma): Call
175         Is_OK_Static_Expression in lieu of Is_Static_Expression to
176         detect valid arguments.
178 2014-04-15  Eric Botcazou  <ebotcazou@adacore.com>
180         * gcc-interface/trans.c (gnat_gimplify_stmt): Propagate loop hints.
182 2014-04-14  Paolo Carlini  <paolo.carlini@oracle.com>
184         * gcc-interface/decl.c (gnat_to_gnu_entity): Use TYPE_IDENTIFIER.
185         (components_to_record): Likewise.
186         * gcc-interface/utils.c (make_aligning_type): Likewise.
187         (maybe_pad_type): Likewise.
188         (finish_record_type): Likewise.
189         (rest_of_record_type_compilation): Likewise.
191 2014-04-14  Eric Botcazou  <ebotcazou@adacore.com>
193         * snames.ads-tmpl (Name_Ivdep): New pragma-related name.
194         * sem_prag.adb (Analyze_Pragma) <Pragma_Loop_Optimize>: Add support
195         for Ivdep hint.
196         * gnat_rm.texi (Implementation Defined Pragmas): Document new Ivdep
197         hint for Loop_Optimize.
198         * gnat_ugn.texi (Vectorization of loops): Mention new Ivdep hint.
199         * gcc-interface/trans.c (Pragma_to_gnu) <Pragma_Loop_Optimize>: Deal
200         with new Ivdep hint.
201         * gcc-interface/ada-tree.h (LOOP_STMT_IVDEP): New macro.
202         * gcc-interface/trans.c (Pragma_to_gnu) <Pragma_Loop_Optimize>: Deal
203         with new Ivdep hint.
204         (gnat_gimplify_stmt) <LOOP_STMT>: Propagate loop hints.
206 2014-04-14  Eric Botcazou  <ebotcazou@adacore.com>
207             Robert Dewar  <dewar@adacore.com>
209         * opt.ads (Suppress_Back_Annotation): Remove as unused.
210         * fe.h (Back_Annotate_Rep_Info): Likewise.
211         (Global_Discard_Names): Likewise.
212         (List_Representation_Info): Declare.
213         * types.h (Uint_Minus_1): Likewise.
214         * repinfo.ads: Document back-annotation change.
215         * gcc-interface/gigi.h (init_gnat_decl): Declare.
216         (destroy_gnat_decl): Likewise.
217         * gcc-interface/decl.c (annotate_value): Do not create the cache of
218         annotated values here but...
219         <CALL_EXPR>: Only inline the call if -gnatR3 is specified or we are
220         in ASIS mode.
221         (init_gnat_decl): ...here instead.  New function.
222         (destroy_gnat_decl): Likewise.
223         * gcc-interface/trans.c (gigi): Call {init|destroy}_gnat_decl.
224         * gcc-interface/utils.c (init_gnat_utils): Minor reformatting.
226 2014-04-14  Eric Botcazou  <ebotcazou@adacore.com>
228         * gcc-interface/decl.c (create_field_decl_from): Finalize non-constant
229         offset for the field, if any.
231 2014-04-09  Eric Botcazou  <ebotcazou@adacore.com>
232             Svante Signell  <svante.signell@gmail.com>
234         PR ada/54040
235         PR ada/59346
236         * s-osinte-x32.adb: New file.
237         * s-linux.ads (Time): New section.
238         * s-linux-alpha.ads (Time): Likewise.
239         * s-linux-android.ads (Time: Likewise.
240         * s-linux-hppa.ads (Time): Likewise.
241         * s-linux-mipsel.ads (Time): Likewise.
242         * s-linux-sparc.ads (Time): Likewise.
243         * s-linux-x32.ads (Time): Likewise.
244         * s-osprim-x32.ads (timespec): Adjust.
245         (Clock): Likewise.
246         (To_Timespec): Likewise.
247         * s-osinte-linux.ads (Time): Define local subtypes for those defined
248         in System.Linux.
249         * s-taprop-linux.adb (Monotonic_Clock): Do not define timeval.
250         * s-osinte-hpux.ads (timespec): Revert POSIX breakage.
251         * s-osinte-kfreebsd-gnu.ads (timespec): Likewise.
252         * s-osinte-solaris-posix.ads (timespec): Likewise.
253         * s-osinte-posix.adb (To_Timespec): Likewise.
254         * gcc-interface/Makefile.in (x32/Linux): Use s-osinte-x32.adb.
256 2014-04-08  Eric Botcazou  <ebotcazou@adacore.com>
258         PR ada/60411
259         * gcc-interface/Makefile.in (arm% linux-android): Switch to EHABI.
260         * s-linux-android.ads: New file.
261         * s-intman-android.adb: Likewise.
262         * s-osinte-android.ads: Adjust.
263         * sigtramp-armdroid.c: Likewise.
264         * sigtramp.h: Add Android support.
266 2014-04-07  Eric Botcazou  <ebotcazou@adacore.com>
268         * gcc-interface/Makefile.in (alpha-vms): Add missing line.
270 2014-03-30  Eric Botcazou  <ebotcazou@adacore.com>
272         PR ada/60703
273         * system-linux-alpha.ads: Adjust for Ada 2005.
274         * system-linux-mips.ads: Likewise.
275         * system-linux-mips64el.ads: Likewise.
276         * system-linux-mipsel.ads: Likewise.
277         * system-linux-s390.ads: Likewise.
278         * system-linux-s390x.ads: Likewise.
279         * system-linux-sparc.ads: Likewise.
280         * system-linux-sparcv9.ads: Likewise.
281         * system-rtems.ads: Likewise.
282         * system-vxworks-arm.ads: Likewise.
284 2014-03-16  Andreas Schwab  <schwab@linux-m68k.org>
286         PR ada/39172
287         * gcc-interface/Makefile.in (target_cpu_default): Revert
288         2013-10-11 change.
290 2014-03-13  Eric Botcazou  <ebotcazou@adacore.com>
292         PR ada/51483
293         * cstand.adb (Register_Float_Type): Add 'precision' parameter and use
294         it to set the RM size.  Use directly 'size' for the Esize.
295         (Create_Back_End_Float_Types): Adjust call to above.
296         * get_targ.ads (Register_Type_Proc): Add 'precision' parameter.
297         * set_targ.ads (FPT_Mode_Entry): Add 'precision' component.
298         (Write_Target_Dependent_Values): Adjust comment.
299         * set_targ.adb (Register_Float_Type): Add 'precision' parameter and
300         deal with it.
301         (Write_Target_Dependent_Values): Write the precision in lieu of size.
302         (Initialization): Read the precision in lieu of size and compute the
303         size from the precision and the alignment.
304         * gcc-interface/gigi.h (enumerate_modes): Add integer parameter.
305         * gcc-interface/misc.c (enumerate_modes): Likewise.  Do not register
306         types for vector modes, pass the size in addition to the precision.
308 2014-03-10  Eric Botcazou  <ebotcazou@adacore.com>
310         * gcc-interface/Make-lang.in (ADA_DEPFILES): Fix typo.
312 2014-03-07  Doug Rupp  <rupp@adacore.com>
314         PR ada/60411
315         * system-linux-armel.ads (Backend_Overflow_Checks): Set to True.
316         (Support_64_Bit_Divides): Removed, no longer used.
317         (ZCX_By_Default): Enabled.
319 2014-02-25  Doug Rupp  <rupp@adacore.com>
321         * gcc-interface/Makefile.in (arm-linux):
322         (EH_MECHANISM): Use ARM unwinder (-arm)
323         (LIBGNAT_TARGET_PAIRS: Override defaults with a-exexpr-gcc.adb and
324         s-excmac-arm.ads.
325         (EXTRA_LIBGNAT_OBJS): Add raise-gcc.o
326         (EXTRA_GNATRTL_NONTASKING_OBJS): Add g-cppexc.o s-excmac.o.
327         (arm-wrs-vxworks): Add EH_MECHANISM=-gcc for kernel mode.
328         (EXTRA_LIBGNAT_OBJS): Add sigtramp-armvxw.o
329         Add dependencies for sigtramp-armvxw.o.
331 2014-02-25  Eric Botcazou  <ebotcazou@adacore.com>
333         * gcc-interface/trans.c (Pragma_to_gnu): Deal with Warning_As_Error.
335 2014-02-25  Robert Dewar  <dewar@adacore.com>
337         * rtsfind.adb (Is_RTE): Protect against entity with no scope
338         field (previously this call blew up on the Standard entity).
339         * sem_attr.adb (Analyze_Attribute, case Access): Remove
340         test for No_Abort_Statements, this is now handled in
341         Set_Entity_With_Checks.
342         * exp_ch6.adb, sem_ch10.adb, sem_ch4.adb, sem_ch8.adb, sem_res.adb:
343         Change name Set_Entity_With_Style_Check => Set_Entity_With_Checks.
344         * sem_util.ads, sem_util.adb: Change name Set_Entity_With_Style_Check =>
345         Set_Entity_With_Checks.
346         (Set_Entity_With_Checks): Add checks for No_Dynamic_Attachment,
347         Add checks for No_Abort_Statements.
349 2014-02-25  Robert Dewar  <dewar@adacore.com>
351         * exp_ch9.adb (Expand_Entry_Barrier): Add comment that call to
352         Check_Restriction is OK.
354 2014-02-25  Ed Schonberg  <schonberg@adacore.com>
356         * sem_ch3.adb (Process_Full_View): Better error message when
357         the full view of  a private type without discriminants is an
358         unconstrained type.
359         * sem_ch7.adb (Uninstall_Declarations): Ditto.
361 2014-02-25  Eric Botcazou  <ebotcazou@adacore.com>
363         * sigtramp-armvxw.c: Also restore r0.
365 2014-02-25  Robert Dewar  <dewar@adacore.com>
367         * errout.adb (Error_Msg_Internal): Warning_Msg_Char set
368         unconditionally (Set_Msg_Insertion_Warning): Warning_Msg_Char
369         set unconditionally.
370         * erroutc.adb (Get_Warning_Tag): Does not give a leading space
371         any more (Output_Msg_Text): Rewritten with new convention on
372         output of warnings that are treated as errors.
373         * erroutc.ads (Error_Msg_Object): Warn_Chr is always set even
374         if Warn is False.
375         * gnat_rm.texi: Updates to documentation on pragma
376         Warning_As_Error.
377         * warnsw.adb (Set_Dot_Warning_Switch): -gnatw.e should not
378         set Warning_Doc_Switch.
379         * lib-writ.ads: Add documentation note on ALI file generation
380         for C.
381         * exp_ch6.adb (Expand_Call): Remove check for No_Abort_Statements
382         (belongs in Sem).
383         * sem_attr.adb (Resolve_Attribute, case Access):
384         Abort_Task'Access violates the No_Abort_Statements restriction.
385         * sem_res.adb (Resolve_Call): Check restriction
386         No_Abort_Statements for call to Abort_Task or a renaming of it.
388 2014-02-25  Robert Dewar  <dewar@adacore.com>
390         * sem_ch3.adb (Array_Type_Declaration): Check for case of using
391         type name as index.
392         * lib.ads: Minor reformatting.
393         * einfo.ads: Minor reformatting.
395 2014-02-25  Doug Rupp  <rupp@adacore.com>
397         * sem_mech.adb (Set_Mechanisms): For convention Fortran on VMS
398         use Short_Descriptor(S) as the argument passing mechanism.
400 2014-02-25  Eric Botcazou  <ebotcazou@adacore.com>
402         * sigtramp-ppcvxw.c (CFI_COMMON_REGS): Also include r0.
404 2014-02-25  Robert Dewar  <dewar@adacore.com>
406         * atree.ads (Warnings_Treated_As_Errors): New variable.
407         * errout.adb (Error_Msg_Internal): Set Warn_Err flag in
408         error object (Initialize): Initialize Warnings_As_Errors_Count
409         (Write_Error_Summary): Include count of warnings treated as errors.
410         * erroutc.adb (Warning_Treated_As_Error): New function.
411         (Matches): Function moved to outer level of package.
412         * erroutc.ads (Error_Msg_Object): Add Warn_Err flag.
413         (Warning_Treated_As_Error): New function.
414         * gnat_rm.texi: Document pragma Treat_Warning_As_Error.
415         * opt.adb: Add handling of Warnings_As_Errors_Count[_Config].
416         * opt.ads (Config_Switches_Type): Add entry for
417         Warnings_As_Errors_Count.
418         (Warnings_As_Errors_Count): New variable.
419         (Warnings_As_Errors): New array.
420         * par-prag.adb: Add dummy entry for Warning_As_Error.
421         * sem_prag.adb (Analyze_Pragma): Implement new pragma
422         Warning_As_Error.
423         * snames.ads-tmpl: Add entries for Warning_As_Error pragma.
425 2014-02-25  Eric Botcazou  <ebotcazou@adacore.com>
427         * sigtramp.h: Fix minor inaccuracy.
429 2014-02-25  Ben Brosgol  <brosgol@adacore.com>
431         * gnat_ugn.texi: Added description of kill command.
433 2014-02-25  Robert Dewar  <dewar@adacore.com>
435         * gnat_rm.texi (Address_Clauses): Add a section discussing the
436         problem of address clauses causing unexpected initialization,
437         including the effect of Initialize_Scalars.
439 2014-02-25  Robert Dewar  <dewar@adacore.com>
441         * errout.adb: Various changes for better msgs for anonmous access
442         subprogram types.
443         * erroutc.ads, erroutc.adb (Buffer_Ends_With): Version with character
444         argument.
445         (Buffer_Remove): Version with character argument.
446         * sem_attr.adb (Resolve_Attribute, case Access): Better handling
447         of mismatching conventions for access-to-subprogram case.
448         * sem_prag.adb (Set_Convention_From_Pragma): Deal with anonymous
449         access types in record.
450         * sem_util.ads, sem_util.adb (Set_Convention): Handle anonymous access
451         types, including in records.
453 2014-02-25  Doug Rupp  <rupp@adacore.com>
455         * sigtramp-ppcvxw.c, sigtramp.h, sigtramp-armvxw.c: Comment
456         enhancements and corrections.
458 2014-02-25  Robert Dewar  <dewar@adacore.com>
460         * gnat_rm.texi: New section "Conventions and Anonymous Access Types"
462 2014-02-25  Robert Dewar  <dewar@adacore.com>
464         * gnat_rm.texi: First set of documentation additions for
465         predefined RM units.
466         * checks.adb: Minor reformatting.
467         * sem_elab.adb (Check_Task_Activation): Minor fix to error
468         message.
469         * sem_util.adb: Minor reformatting.
471 2014-02-25  Arnaud Charlet  <charlet@adacore.com>
473         * usage.adb (Usage): Add help on -gnateC.
474         * switch-c.adb (Scan_Front_End_Switches): Add handling of -gnateC.
475         * opt.ads (Generate_CodePeer_Messages): New flag.
476         * gnat_ugn.texi: Document new switch -gnateC.
478 2014-02-25  Ben Brosgol  <brosgol@adacore.com>
480         * gnat_rm.texi: Corrected minor typos in Implementation Defined
481         Aspects.
482         * opt.ads: Minor reformatting.
484 2014-02-25  Robert Dewar  <dewar@adacore.com>
486         * binde.adb: Change messages to mention -gnatel instead of -gnatwl.
487         * gnat_ugn.texi: Update documentation of -gnatwl Add documentation
488         of -gnatel/-gnateL.
489         * opt.ads (Warn_Info_Messages): New flag.
490         * sem_elab.adb: Use Elab_Warnings, Elab_Info_Messages to control
491         messages.
492         * sem_prag.adb: Use Elab_Warnings, Elab_Info_Messages to control
493         messages.
494         * switch-m.ad, switch-c.adb: Recognize new -gnatel/EL switches.
495         * usage.adb: Add documentation of -gnatel/-gnateL Update
496         documentation of -gnatwl/-gnatwL.
497         * warnsw.adb: New handling of Elab_Warnings, Elab_Info_Messages
498         * warnsw.ads (Elab_Info_Messages): New field in Warning_Record
500 2014-02-25  Robert Dewar  <dewar@adacore.com>
502         * einfo.ads, einfo.adb (Has_Shift_Operator): New flag.
503         * gnat_rm.texi: Document pragma Provide_Shift_Operators.
504         * interfac.ads: Minor code reorganization (add pragma
505         Compiler_Unit_Warning).
506         * par-prag.adb: Add dummy entry for Provide_Shift_Operators.
507         * sem_ch3.adb (Build_Derived_Numeric_Type): Copy
508         Has_Shift_Operator flag.
509         * sem_intr.adb (Check_Intrinsic_Subprogram): Make sure
510         Check_Shift is always called (Check_Shift): Set Has_Shift_Operator.
511         * sem_prag.adb: Implement pragma Provide_Shift_Operators.
512         * snames.ads-tmpl: Add entries for pragma Provide_Shift_Operators
513         Add entry for Name_Amount.
514         * checks.adb (Selected_Range_Checks): When checking for a null
515         range, make sure we use the base type, and not the subtype for
516         deciding a range is null.
517         * sem_ch5.adb (Analyze_Loop_Parameter_Specification): Check
518         for suspicious loop bound which is outside the range of the
519         loop subtype.
520         * gnat_ugn.texi: Add documentation section "Determining the
521         Chosen Elaboration Order"
522         * sem_ch13.adb (UC_Entry): Add field Act_Unit
523         (Validate_Unchecked_Conversion): Store Act_Unit
524         (Validate_Unchecked_Conversions): Test Warnings_Off in Act_Unit
525         * treepr.adb: Minor reformatting.
527 2014-02-25  Arnaud Charlet  <charlet@adacore.com>
529         * usage.adb: Minor: fix typo.
531 2014-02-25  Robert Dewar  <dewar@adacore.com>
533         * lib.ads, s-bitops.adb, s-bitops.ads, s-conca5.adb, gnat_rm.texi,
534         s-conca5.ads, s-conca7.adb, s-conca7.ads, s-crc32.adb, s-crc32.ads,
535         s-conca9.adb, s-conca9.ads, g-dyntab.adb, s-crtl.ads, g-dyntab.ads,
536         s-excdeb.adb, s-addope.adb, s-addope.ads, s-carun8.adb, s-carun8.ads,
537         g-htable.adb, g-htable.ads, g-hesora.adb, g-hesora.ads, s-conca2.adb,
538         s-conca2.ads, a-comlin.adb, a-chlat1.ads, a-comlin.ads, errout.ads,
539         a-except.adb, s-conca4.adb, a-except.ads, s-conca4.ads, s-conca6.adb,
540         s-conca6.ads, g-spchge.adb, g-spchge.ads, g-u3spch.adb, g-u3spch.ads,
541         a-strhas.ads, restrict.adb, aspects.adb, aspects.ads, s-conca8.adb,
542         s-conca8.ads, back_end.adb, par-prag.adb, g-byorma.adb, g-byorma.ads,
543         a-elchha.adb, a-elchha.ads, g-speche.adb, g-speche.ads, s-casuti.adb,
544         s-assert.adb, s-casuti.ads, s-assert.ads, a-clrefi.adb, a-clrefi.ads,
545         s-conca3.adb, s-conca3.ads, a-ioexce.ads: Implement pragma
546         Compiler_Unit_Warning, change Compiler_Unit everywhere to
547         Compiler_Unit_Warning.
549 2014-02-25  Sergey Rybin  <rybin@adacore.com frybin>
551         * sem_prag.adb (Analyze_Depends_In_Decl_Part): Do not normalize
552         in ASIS mode aggregates that are used as aspect definitions.
554 2014-02-25  Robert Dewar  <dewar@adacore.com>
556         * exp_ch7.adb, sem_util.adb, sem_util.ads, exp_ch6.adb: Minor
557         reformatting.
559 2014-02-25  Ed Schonberg  <schonberg@adacore.com>
561         * freeze.adb (Freeze_Entity): If the return type of a function
562         is a limited view, and the non-limited view has not been seen yet,
563         defer freezing to some later point.
565 2014-02-25  Robert Dewar  <dewar@adacore.com>
567         * sem_ch3.adb: Minor reformatting.
569 2014-02-25  Robert Dewar  <dewar@adacore.com>
571         * s-excdeb.ads, s-except.ads, s-exctab.adb, s-exctab.ads, s-finmas.ads,
572         s-htable.adb, s-htable.ads, s-imenne.adb, s-imenne.ads, s-imgenu.adb,
573         s-imgenu.ads, s-mastop.adb, s-mastop.ads, s-memory-vms_64.adb,
574         s-memory-vms_64.ads, s-memory.adb, s-memory.ads, s-os_lib.adb,
575         s-os_lib.ads, s-parame.adb, s-parame.ads, s-purexc.ads, s-restri.adb,
576         s-restri.ads, s-rident.ads, s-secsta.adb, s-secsta.ads, s-soflin.adb,
577         s-soflin.ads, s-sopco3.adb, s-sopco3.ads, s-sopco4.adb, s-sopco4.ads,
578         s-sopco5.adb, s-sopco5.ads, s-spsufi.ads, s-stache.adb, s-stache.ads,
579         s-stalib.adb, s-stalib.ads, s-stoele.adb, s-stoele.ads, s-strcom.adb,
580         s-strcom.ads, s-strhas.adb, s-string.adb, s-string.ads, s-strops.adb,
581         s-strops.ads, s-ststop.adb, s-ststop.ads, s-traceb.adb, s-traceb.ads,
582         s-traent.adb, s-traent.ads, s-unstyp.ads, s-utf_32.adb, s-utf_32.ads,
583         s-wchcnv.adb, s-wchcnv.ads, s-wchcon.adb, s-wchcon.ads, s-wchjis.adb,
584         s-wchjis.ads, sem_ch11.adb, sem_ch4.adb, sem_ch5.adb, sem_prag.adb,
585         snames.ads-tmpl: Change Compiler_Unit everywhere to
586         Compiler_Unit_Warning.
588 2014-02-25  Hristian Kirtchev  <kirtchev@adacore.com>
590         * exp_ch6.adb (Add_Or_Save_Precondition): New routine.
591         (Collect_Body_Postconditions_In_Decls): New routine.
592         (Collect_Body_Postconditions_Of_Kind): Factor out code. Handle
593         postcondition aspects or pragmas that appear on a subprogram
594         body stub.
595         (Collect_Spec_Preconditions): Factor out code. Handle
596         precondition aspects or pragmas that appear on a subprogram
597         body stub.
598         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): The analysis of
599         aspects that apply to a subprogram body stub is no longer delayed,
600         the aspects are analyzed on the spot.
601         (SPARK_Aspect_Error):
602         Aspects that apply to a subprogram declaration cannot appear in
603         a subunit.
604         * sem_ch10.adb Remove with and use clause for Sem_Ch13.
605         (Analyze_Proper_Body): Add local variable Comp_Unit. Unum
606         is now a local variable. Code cleanup. Analysis related to
607         the aspects of a subprogram body stub is now carried out by
608         Analyze_Subprogram_Body_Helper. Do not propagate the aspects
609         and/or pragmas of a subprogram body stub to the proper body
610         as this is no longer needed. Do not analyze the aspects of a
611         subprogram stub when the corresponding source unit is missing.
612         (Analyze_Protected_Body_Stub): Flag the illegal use of aspects
613         on a stub.
614         (Analyze_Task_Body_Stub): Flag the illegal use of
615         aspects on a stub.
616         (Optional_Subunit): Add local variable Unum.
617         * sem_ch13.adb (Insert_Delayed_Pragma): Do not analyze a generated
618         pragma when it applies to a subprogram body stub.
619         * sem_prag.adb (Analyze_Pragma): Pragmas Contract_Cases,
620         Depends and Global can now apply to a subprogram body stub as
621         long as it acts as its own spec.
622         (Analyze_Refined_Pragma):
623         Code reformatting. Refinement pragmas cannot apply to a subunit.
625 2014-02-25  Hristian Kirtchev  <kirtchev@adacore.com>
627         * einfo.ads Update the usage of flag
628         Uses_Sec_Stack. Uses_Sec_Stack now applies to E_Loop entities.
629         * exp_ch5.adb (Expand_Iterator_Loop): The temporary for a cursor
630         now starts with the letter 'C'. This makes reading expanded
631         code easier.
632         * exp_ch7.adb (Establish_Transient_Scope): Add local variable
633         Iter_Loop. Signal that an Ada 2012 iterator loop requires
634         secondary stack management when creating a transient scope for
635         an element reference.
636         * exp_util.adb (Process_Statements_For_Controlled_Objects):
637         When wrapping the statements of a loop, pass the E_Loop entity
638         to the wrapping machinery.
639         (Wrap_Statements_In_Block): Add
640         formal parameter Scop along with comment on usage. Add local
641         variables Block_Id, Block_Nod and Iter_Loop. Mark the generated
642         block as requiring secondary stack management when the block is
643         created inside an Ada 2012 iterator loop. This ensures that any
644         reference objects are reclaimed on each iteration of the loop.
645         * sem_ch5.adb (Analyze_Loop_Statement): Mark the generated block
646         tasked with the handling of container iterators as requiring
647         secondary stack management. This ensures that iterators are
648         reclaimed when the loop terminates or is exited in any fashion.
649         * sem_util.adb (Add_Block_Identifier): New routine.
650         (Find_Enclosing_Iterator_Loop): New routine.
651         * sem_util.ads (Add_Block_Identifier): New routine.
652         (Find_Enclosing_Iterator_Loop): New routine.
654 2014-02-25  Robert Dewar  <dewar@adacore.com>
656         * sinfo.ads: Minor reformatting.
658 2014-02-25  Tristan Gingold  <gingold@adacore.com>
660         * s-expllu.ads, s-expuns.ads, s-expmod.ads: Minor comment fix.
662 2014-02-25  Pascal Obry  <obry@adacore.com>
664         * sinput-l.adb, osint.adb, osint.ads: Add Prep_Suffix to factorize code.
666 2014-02-25  Tristan Gingold  <gingold@adacore.com>
668         * sem_ch10.adb: Minor comment fix.
670 2014-02-25  Bob Duff  <duff@adacore.com>
672         * s-tasdeb.adb: Misc cleanup of this package,
673         including printing addresses in hexadecimal.
674         (Write): Fix minor bug when taking 'Address of an empty string.
676 2014-02-25  Ed Schonberg  <schonberg@adacore.com>
678         * sem_prag.adb (Analyze_Part_Of): Reject state refinement in a
679         public child unit when it does not refer to the abstract state
680         of a public ancestor.
682 2014-02-25  Yannick Moy  <moy@adacore.com>
684         * sem_prag.adb (Analyze_Pragma/Pragma_Validity_Checks): Ignore pragma
685         Validity_Checks in GNATprove and CodePeer modes.
687 2014-02-25  Pascal Obry  <obry@adacore.com>
689         * prj-attr.adb, projects.texi, snames.ads-tmpl: Add package Install's
690         Artifacts attribute.
692 2014-02-25  Yannick Moy  <moy@adacore.com>
694         * sem_prag.adb: Minor reformatting to get consistent messages.
696 2014-02-25  Robert Dewar  <dewar@adacore.com>
698         * checks.adb: Minor reformatting.
699         * sinfo.ads (Do_Range_Check): Document that this flag is never
700         passed to the back end.
702 2014-02-25  Yannick Moy  <moy@adacore.com>
704         * sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_prag.adb, sem_attr.adb,
705         sem_ch6.adb: Remove useless references to SPARK RM in error messages.
707 2014-02-25  Hristian Kirtchev  <kirtchev@adacore.com>
709         * sem_res.adb (Appears_In_Check): New routine.
710         (Resolve_Entity_Name): Remove local variables Prev and
711         Usage_OK. Par is now a constant. Remove the parent chain traversal
712         as the placement of a volatile object with enabled property
713         Async_Writers and/or Effective_Reads must appear immediately
714         within a legal construct.
716 2014-02-25  Hristian Kirtchev  <kirtchev@adacore.com>
718         * checks.adb (Apply_Selected_Range_Checks):
719         Alphabetize local constants and variables. Add comments.
720         Always insert a range check that requires runtime evaluation into
721         the tree.
723 2014-02-25  Robert Dewar  <dewar@adacore.com>
725         * sem_attr.adb, sem_ch6.adb, par-ch3.adb: Minor reformatting.
727 2014-02-25  Bob Duff  <duff@adacore.com>
729         * s-tassta.adb (Finalize_Global_Tasks): Limit the number of loop
730         iterations while waiting for independent tasks to terminate;
731         if an independent task does not terminate, we do not want to
732         hang here. In that case, the thread will be terminated when the
733         process exits.
734         * s-taprop-linux.adb (Abort_Task): Fix Assert to allow for ESRCH.
736 2014-02-25  Ed Schonberg  <schonberg@adacore.com>
738         * sem_prag.adb (Check_SPARK_Aspect_For_ASIS): New subprogram,
739         used to perform pre-analysis of the expression for SPARK
740         aspects that have a non-standard syntax, such as GLobal and
741         Initializes. The procedure applies to the original expression
742         in an aspect specification, prior to the analysis of the
743         corresponding pragma, in order to provide semantic information
744         for ASIS navigation purposes.
745         (Analyze_Global_In_Decl_List, Analyze_Initializes_In_Decl_Part):
746         Call new subprogram.
748 2014-02-25  Yannick Moy  <moy@adacore.com>
750         * sem_prag.adb: Remove obsolete reference to SPARK RM in error message.
752 2014-02-25  Doug Rupp  <rupp@adacore.com>
754         * init.c (HAVE_GNAT_ADJUST_CONTEXT_FOR_RAISE): Enable for ARM.
755         (__gnat_adjust_context_for_raise): Bump the PC by 2.
757 2014-02-25  Ed Schonberg  <schonberg@adacore.com>
759         * par-ch3.adb (P_Basic_Declarative_Items): In the case of a
760         misplaced IS, add a statement sequence to improper body only if
761         one has not been parsed already.
763 2014-02-25  Ed Schonberg  <schonberg@adacore.com>
765         * sem_attr.adb (Analyze_Attribute, case 'Update): Check for
766         mismatch when multidimensional array is updated with a single
767         index.
769 2014-02-25  Yannick Moy  <moy@adacore.com>
771         * sem_ch3.adb, sem_ch5.adb, sem_prag.adb, sem_attr.adb, errout.ads,
772         sem_ch6.adb: Mark most references to SPARK RM in error messages
773         for removal.
775 2014-02-24  Ed Schonberg  <schonberg@adacore.com>
777         * par-ch3.adb (P_Basic_Declarative_Items): If an improper body
778         appears in a list of basic declarations, complete the tree with
779         an empty statement list, to prevent cascaded errors and crashes
780         if semantic analysis is attempted.
782 2014-02-24  Thomas Quinot  <quinot@adacore.com>
784         * g-sercom-mingw.adb (Open): Fix incorrect test for error return
785         value.
786         * erroutc.adb: Minor reformatting.
788 2014-02-24  Hristian Kirtchev  <kirtchev@adacore.com>
790         * sem_prag.adb (Check_Clause_Syntax): Account
791         for a solitary input item in a dependency list.
793 2014-02-24  Yannick Moy  <moy@adacore.com>
795         * gnat1drv.adb (Adjust_Global_Switches): Do not
796         use validity checks at all in GNATprove_Mode.
798 2014-02-24  Robert Dewar  <dewar@adacore.com>
800         * g-sercom-mingw.adb, g-sercom-linux.adb, sem_prag.adb, freeze.adb,
801         atree.adb, atree.ads: Minor reformatting.
803 2014-02-24  Hristian Kirtchev  <kirtchev@adacore.com>
805         * sem_ch6.adb (Analyze_Subprogram_Body_Contract): Do not enforce
806         global and dependence refinement when SPARK_Mode is off.
807         * sem_ch7.adb (Analyze_Package_Body_Contract): Do not enforce
808         state refinement when SPARK_Mode is off.
809         * sem_ch13.adb (Analyze_Aspect_Specifications): Add local
810         variable Decl. Insert the generated pragma for Refined_State
811         after a potential pragma SPARK_Mode.
812         * sem_prag.adb (Analyze_Depends_In_Decl_Part): Add local
813         constant Deps. Remove local variable Expr. Check the syntax
814         of pragma Depends when SPARK_Mode is off. Factor out the
815         processing for extra parenthesis around individual clauses.
816         (Analyze_Global_In_Decl_List): Items is now a constant. Check
817         the syntax of pragma Global when SPARK_Mode is off.
818         (Analyze_Initializes_In_Decl_Part): Check the syntax of pragma
819         Initializes when SPARK_Mode is off.
820         (Analyze_Part_Of): Check
821         the syntax of the encapsulating state when SPARK_Mode is off.
822         (Analyze_Pragma): Check the syntax of pragma Abstract_State when
823         SPARK_Mode is off. Move the declaration order check with respect
824         to pragma Initializes to the end of the processing. Do not verify
825         the declaration order for pragma Initial_Condition when SPARK_Mode
826         is off. Do not complain about a useless package refinement when
827         SPARK_Mode is off.
828         (Analyze_Refined_Depends_In_Decl_Part): Refs
829         is now a constant. Check the syntax of pragma Refined_Depends
830         when SPARK_Mode is off.
831         (Analyze_Refined_Global_In_Decl_Part):
832         Check the syntax of pragma Refined_Global when SPARK_Mode is off.
833         (Analyze_Refined_State_In_Decl_Part): Check the syntax of pragma
834         Refined_State when SPARK_Mode is off.
835         (Check_Dependence_List_Syntax): New routine.
836         (Check_Global_List_Syntax): New routine.
837         (Check_Initialization_List_Syntax): New routine.
838         (Check_Item_Syntax): New routine.
839         (Check_State_Declaration_Syntax): New routine.
840         (Check_Refinement_List_Syntax): New routine.
841         (Has_Extra_Parentheses): Moved to the top level of Sem_Prag.
843 2014-02-24  Robert Dewar  <dewar@adacore.com>
845         * a-tags.adb, s-os_lib.adb: Minor reformatting.
847 2014-02-24  Thomas Quinot  <quinot@adacore.com>
849         * g-sercom-mingw.adb, g-sercom-linux.adb (Raise_Error): Include
850         strerror message, not just numeric errno value.
852 2014-02-24  Doug Rupp  <rupp@adacore.com>
854         * raise-gcc.c (exception_class_eq): Make endian neutral.
856 2014-02-24  Ed Schonberg  <schonberg@adacore.com>
858         * atree.ads, atree,adb (Copy_Separate_Tree): Remove Syntax_Only
859         flag, and reset Etype and Analyzed attributes unconditionally
860         when copying a tree that may be partly analyzed.
861         * freeze.adb: Change calls to Copy_Separate_Tree accordingly.
862         * sem_ch6.adb (Check_Inline_Pragma): If the Inline pragma appears
863         within a subprogram body and applies to it, remove it from the
864         body before making a copy of it, to prevent spurious errors when
865         analyzing the copied body.
867 2014-02-24  Thomas Quinot  <quinot@adacore.com>
869         * s-os_lib.adb (Errno_Message): Do not depend on Integer'Image.
870         * s-oscons-tmplt.c: On VxWorks, include adaint.h only after
871         vxWorks.h has been included.  Also ensure that file attributes
872         related definitions are output even in cases where socket support
873         is not enabled.
874         * a-tags.adb: Code clean up.
875         * Make-generated.in (OSCONS_CPP, OSCONS_EXTRACT): Use -iquote
876         instead of -I to add the main ada source directory to the header
877         search path, in order to avoid conflict between our own "types.h"
878         and VxWork's <types.h>.
880 2014-02-24  Robert Dewar  <dewar@adacore.com>
882         * atree.ads, atree.adb (Copy_Separate_Tree): Add Syntax_Only parameter.
883         * debug.adb: Remove documentation of -gnatd.X, no longer used.
884         * freeze.adb (Wrap_Imported_Subprogram): Fixed and activated.
886 2014-02-24  Bob Duff  <duff@adacore.com>
888         * gnat_ugn.texi: Improve documentation of gnatpp.
890 2014-02-24  Thomas Quinot  <quinot@adacore.com>
892         * g-stheme.adb, g-socthi-vms.adb, g-socthi-vms.ads,
893         g-socthi-vxworks.adb, g-socthi-vxworks.ads, g-stseme.adb,
894         g-socthi-mingw.adb, g-socthi-mingw.ads, g-socthi.adb,
895         g-socthi.ads, g-socket.adb (Host_Error_Message): Return a string, not
896         a chars_ptr, because on Windows this is a renaming of
897         Socket_Error_Message.
899 2014-02-24  Robert Dewar  <dewar@adacore.com>
901         * a-direct.adb, sem_ch5.adb, a-cfdlli.adb, a-cfhase.adb, a-tags.adb,
902         s-filatt.ads, a-cforma.adb, sem_ch6.adb, g-socthi-mingw.adb,
903         a-cfhama.adb, a-cforse.adb, a-cofove.adb: Minor reformatting and code
904         reorganization.
906 2014-02-24  Thomas Quinot  <quinot@adacore.com>
908         * Make-generated.in (OSCONS_CPP, OSCONS_EXTRACT): Make sure
909         that the source directory containing s-oscons-tmplt.c is on the
910         include path, so that all internal header files are available.
912 2014-02-24  Ed Schonberg  <schonberg@adacore.com>
914         * sem_ch5.adb (Analyze_Loop_Parameter_Specification): If the
915         domain of iteration is an attribute reference 'Old, this is an
916         Ada 2012 iterator and the loop must be rewritten as such.
918 2014-02-24  Thomas Quinot  <quinot@adacore.com>
920         * s-fileio.adb (Errno_Message): Remove, use shared version from
921         s-os_lib instead.
922         * s-crtrun.ads, Makefile.rtl: Remove now unused unit.
923         * g-stseme (Socket_Error_Message): Reimplement in terms of new
924         s-os_lib function.
925         * g-socthi.ads, g-socthi.adb: Change profile of
926         Socket_Error_Message to return String to allow the above.
927         * g-socket.adb, g-socthi-mingw.adb, g-socthi-mingw.ads,
928         * g-socthi-vms.adb, g-socthi-vms.ads, g-socthi-vxworks.adb,
929         * g-socthi-vxworks.ads: Update to account for the above profile
930         change.
931         * a-tags.adb: Use strlen builtin binding provided by s-crtl.
932         * s-crtl.ads (strncpy): New procedure.
933         * s-os_lib.adb (Copy_Attributes): Import just once (strncpy):
934         Use import from s-crtl.
935         * a-envvar.adb, osint.adb: Use imports of C runtime functions
936         from s-crtl instead of re-importing locally.
938 2014-02-24  Hristian Kirtchev  <kirtchev@adacore.com>
940         * sem_prag.adb (Analyze_Global_Item): Emit the
941         variable related checks concerning volatile objects only when
942         SPARK_Mode is on.
944 2014-02-24  Robert Dewar  <dewar@adacore.com>
946         * sem_ch5.adb (Analyze_Iterator_Specification): use
947         Error_Msg_Ada_2012_Feature.
949 2014-02-24  Jose Ruiz  <ruiz@adacore.com>
951         * s-rident.ads (Profile_Info): For Ravenscar, the restrictions
952         No_Local_Timing_Events and No_Specific_Termination_Handlers
953         must be set, according to the Ravenscar profile definition
954         in D.13(6/3).
956 2014-02-24  Ed Schonberg  <schonberg@adacore.com>
958         * sem_ch6.adb (Analyze_Expression_Function): If this is a
959         completion, freeze return type and its designated type if needed.
961 2014-02-24  Thomas Quinot  <quinot@adacore.com>
963         * sem_ch13.adb (Analyze_Attribute_Definition_Clause, case
964         'Address): When moving initialization statements to a freeze
965         entity, keep them under a single node (i.e. do not unwrap
966         expressions with actions), and set the Initialization_Statements
967         attribute again so that processing of a later pragma Import can
968         still remove them.
970 2014-02-24  Claire Dross  <dross@adacore.com>
972         * a-cfdlli.adb, a-cfdlli.ads, a-cfhama.adb, a-cfhama.ads,
973         a-cfhase.adb, a-cfhase.ads, a-cforma.adb, a-cforma.ads,
974         a-cforse.adb, a-cforse.ads, a-cofove.adb, a-cofove.ads: Rename
975         Left/Right to First_To_Previous/Current_To_Last.
977 2014-02-24  Thomas Quinot  <quinot@adacore.com>
979         * adaint.h (struct file_attributes): New component "error"
980         (__gnat_error_attributes): Accessor for the above.
981         * adaint.c (__gnat_error_attributes): New subprogram
982         (__gnat_stat): Fix returned value (expect errno value)
983         (__gnat_stat_to_attr): Add management of error component (set to
984         stat errno value, except for missing files where it is set to 0,
985         and exists is set to 0).
986         * osint.ads (File_Attributes_Size): Update per change above,
987         also clarify documentation.
988         * s-filatt.ads: New file, binding to file attributes related
989         functions.
990         * Makefile.rtl (s-filatt): New runtime unit.
991         * s-crtl.ads (strlen): Expose binding to GCC builtin (falls back
992         to library function if not available on target).
993         * s-os_lib.ads, s-os_lib.adb (Errno_Message): New subprogram.
994         * s-oscons-tmplt.c (SIZEOF_struct_file_attributes,
995         SIZEOF_struct_dirent_alloc): New constants.
996         * Make-generated.in (s-oscons.ads): Now requires adaint.h.
997         * a-direct.adb (Fetch_Next_Entry): Fix incorrect buffer sizes.
998         Perform appropriate error checking if stat fails (do not just
999         ignore existing files if stat fails)
1000         * gcc-interface/Make-lang.in (GNAT_ADA_OBJS, GNATBIND_OBJS): Update
1001         dependencies.
1003 2014-02-24  Hristian Kirtchev  <kirtchev@adacore.com>
1005         * sem_prag.adb (Analyze_Global_Item): Move the check concerning
1006         the use of volatile objects as global items in a function to
1007         the variable related checks section.
1008         * sem_util.adb (Async_Readers_Enabled): Directly call
1009         Has_Enabled_Property.
1010         (Async_Writers_Enabled): Directly call Has_Enabled_Property.
1011         (Effective_Reads_Enabled): Directly call Has_Enabled_Property.
1012         (Effective_Writes_Enabled): Directly call Has_Enabled_Property.
1013         (Has_Enabled_Property): Rename formal parameter State_Id to Item_Id.
1014         Update the comment on usage. State_Has_Enabled_Property how handles
1015         the original logic of the routine. Add processing for variables.
1016         (State_Has_Enabled_Property): New routine.
1017         (Variable_Has_Enabled_Property): New routine.
1019 2014-02-24  Robert Dewar  <dewar@adacore.com>
1021         * sinfo.ads, sem_ch12.adb, sem_res.adb, sem_ch4.adb, par-ch12.adb:
1022         Minor reformatting.
1023         * atree.ads, atree.adb (Node35): New function.
1024         (Set_Node35): New procedure.
1025         * debug.adb: Define new debug flag -gnatd.X.
1026         * einfo.ads, einfo.adb (Import_Pragma): New field.
1027         * freeze.adb (Wrap_Imported_Procedure): New procedure (not
1028         really active yet, has to be activated with -gnatd.X.
1029         * sem_prag.adb (Set_Imported): Set new Import_Pragma
1030         field (Set_Imported): Don't set Is_Public (see
1031         Freeze.Wrap_Imported_Subprogram)
1032         * par-ch3.adb (P_Component_List): Handle unexpected null component.
1034 2014-02-24  Yannick Moy  <moy@adacore.com>
1036         * sem_ch3.adb: Correct reference to SPARK RM in error messages.
1037         * gnat_rm.texi: Correct documentation of attribute Update.
1039 2014-02-24  Ed Schonberg  <schonberg@adacore.com>
1041         * sem_ch5.adb (Analyze_Iterator_Specification): Reject container
1042         iterator in older versions of Ada.
1044 2014-02-24  Gary Dismukes  <dismukes@adacore.com>
1046         * sem_ch5.adb, sem_aux.ads, sem_ch12.adb, gnat_ugn.texi, par.adb,
1047         par-ch12.adb: Change spelling 'parametrization' to 'parameterization'.
1049 2014-02-24  Ed Schonberg  <schonberg@adacore.com>
1051         * sinfo.ads, sinfo.adb: New attribute Generalized_Indexing, for
1052         indexed_components that are instances of Ada 2012 container
1053         indexing operations. Analysis and resolution of such nodes
1054         is performed on the attribute, and the original source is
1055         preserved for ASIS operations. If expansion is enabled, the
1056         indexed component is replaced by the value of this attribute,
1057         which is in a call to an Indexing aspect, in most case wrapped
1058         in a dereference operation.
1059         * sem_ch4.adb (Analyze_Indexed_Component): Create
1060         Generalized_Indexing attribute when appropriate.
1061         (Analyze_Call): If prefix is not overloadable and has an indexing
1062         aspect, transform into an indexed component so it can be analyzed
1063         as a potential container indexing.
1064         (Analyze_Expression): If node is an indexed component with a
1065         Generalized_ Indexing, do not re-analyze.
1066         * sem_res.adb (Resolve_Generalized_Indexing): Complete resolution
1067         of an indexed_component that has been transformed into a container
1068         indexing operation.
1069         (Resolve_Indexed_Component): Call the above when required.
1070         (Resolve): Do not insert an explicit dereference operation on
1071         an indexed_component whose type has an implicit dereference:
1072         the operation is inserted when resolving the related
1073         Generalized_Indexing.
1075 2014-02-24  Olivier Ramonat  <ramonat@adacore.com>
1077         * gnat_rm.texi, gnat_ugn.texi: Replace Ada Compiler by Ada Development
1078         Environment.
1080 2014-02-24  Hristian Kirtchev  <kirtchev@adacore.com>
1082         * sem_prag.adb (Check_Constituent_Usage): Remove leading spaces in
1083         error messages.
1084         (Inconsistent_Mode_Error): Remove leading spaces in error messages.
1085         Merge the expected and available mode errors.
1086         (Report_Unused_Constituents): Remove leading spaces in error messages.
1087         (Report_Unused_States): Remove leading spaces in error messages.
1089 2014-02-24  Thomas Quinot  <quinot@adacore.com>
1091         * par_sco.adb (Traverse_One): Refine categorization of statement
1092         SCOs.
1094 2014-02-24  Robert Dewar  <dewar@adacore.com>
1096         * aspects.ads, aspects.adb: Remove aspects Ada_2005 and Ada_2012,
1097         Pure_05, Pure_12 and Preelaborate_05.
1098         * gnat_rm.texi: Update accordingly.
1099         * sem_prag.adb: Document one argument form of Ada_05/Ada_2005
1100         pragmas Document one argument form of Ada_12/Ada_2012 pragmas
1101         Recognize one argument form of these pragmas only in GNAT mode
1102         (-gnatg).
1104 2014-02-24  Ed Schonberg  <schonberg@adacore.com>
1106         * s-dimmks.ads: Replace symbol for temperature, previously the
1107         Greek letter Theta, by the ASCII @ sign.
1108         * s-diflio.ads: ditto.
1110 2014-02-24  Robert Dewar  <dewar@adacore.com>
1112         * exp_ch4.adb: Minor code reorganization (use OR for boolean
1113         variables).
1114         * sem_ch3.adb, sem_prag.adb, freeze.adb: Minor reformatting.
1116 2014-02-24  Ben Brosgol  <brosgol@adacore.com>
1118         * gnat_ugn.texi, projects.texi: Added the necessary conditionalization
1119         so that references to gnatmem and ASIS tools do not appear in the FSF
1120         edition of the GNAT User's Guide.
1122 2014-02-24  Yannick Moy  <moy@adacore.com>
1124         * freeze.adb (Freeze_Entity): Do not issue warning
1125         for pre/post being ignored on imported subprogram in GNATprove
1126         mode.
1128 2014-02-24  Robert Dewar  <dewar@adacore.com>
1130         * exp_ch5.adb, sem_ch5.adb, sem_type.adb, sem_res.adb, sem_attr.adb,
1131         stand.ads, sem_eval.adb: Minor reformatting.
1133 2014-02-24  Yannick Moy  <moy@adacore.com>
1135         * sem_prag.adb: Minor rewording in error message.
1137 2014-02-24  Johannes Kanig  <kanig@adacore.com>
1139         * exp_util.adb (Expand_Subtype_From_Expr): Do not expand subtypes in
1140         GNATprove_mode, gnat2why doesn't need nor use these types.
1142 2014-02-24  Gary Dismukes  <dismukes@adacore.com>
1144         * exp_ch4.adb (Expand_N_Op_Expon): On the AAMP
1145         target, in the case of signed integer exponentiation that uses a
1146         run-time routine, always select the Exp_* versions, since overflow
1147         checking is automatically done by AAMP arithmetic instructions.
1149 2014-02-24  Hristian Kirtchev  <kirtchev@adacore.com>
1151         * sem_ch13.adb (Analyze_Aspect_Specifications):
1152         When the related context is a package instace, insert pragma
1153         Abstract_State after all internally-generated renamings related
1154         to the instance "header".
1156 2014-02-24  Ed Schonberg  <schonberg@adacore.com>
1158         * sem_ch3.adb (Analyze_Declarations): Analyze Contract of abstract
1159         subprograms.
1160         * sem_disp.adb (Check_Dispatching_Context): A non-dispatching
1161         call to an abstract subprogram is legal if it appears in a
1162         pre/postcondition of another abstract operation.
1164 2014-02-24  Sergey Rybin  <rybin@adacore.com frybin>
1166         * gnat_ugn.texi: Misc updates.
1168 2014-02-24  Hristian Kirtchev  <kirtchev@adacore.com>
1170         * exp_prag.adb (Expand_Old): Set the type of the generated temporary.
1172 2014-02-24  Gary Dismukes  <dismukes@adacore.com>
1174         * layout.adb (Layout_Variant_Record): Instantiate
1175         Generic_Check_Choices and call Check_Choices before calling
1176         Build_Discr_Checking_Funcs, since we need Others_Discrete_Choices
1177         set to prevent generating incorrect discriminant-checking
1178         functions for 'others' variants (functions that unconditionally
1179         return True rather than accounting for the values covered by the
1180         'others' choice).
1181         * sem_eval.ads (Subtypes_Statically_Compatible): Add formal
1182         Formal_Derived_Matching.
1183         (Subtypes_Statically_Match): Add formal Formal_Derived_Matching.
1184         * sem_eval.adb (Subtypes_Statically_Compatible): Pass new
1185         Formal_Derived_Matching formal to Subtypes_Statically_Match.
1186         (Subtypes_Statically_Match): Suppress the Object_Size matching
1187         test in the case where Formal_Derived_Matching is True.
1188         * sem_ch12.adb (Validate_Derived_Type_Instance): Pass
1189         True for Formal_Derived_Matching_Formal on the call to
1190         Subtypes_Statically_Compatible.
1192 2014-02-23  Eric Botcazou  <ebotcazou@adacore.com>
1194         * gcc-interface/Make-lang.in (ADA_TOOLS_FLAGS_TO_PASS): Robustify.
1196 2014-02-23  Eric Botcazou  <ebotcazou@adacore.com>
1198         * gcc-interface/utils2.c (build_simple_component_ref): Fix formatting.
1199         Look through a conversion between original and packable version to get
1200         the base object.
1201         (build_component_ref): Rework comment and fix formatting.
1203 2014-02-20  Sergey Rybin  <rybin@adacore.com frybin>
1205         * gnat_ugn.texi, vms_data.ads (gnatelim): Add description of
1206         project-specific options.
1208 2014-02-20  Ed Schonberg  <schonberg@adacore.com>
1210         * a-cbdlli.adb (Insert): When capacity exceeded, raise Capacity_Error,
1211         not Constraint_Error.
1212         * a-cbmutr.adb (Append_Child, Insert_Child, Prepend_Child): Ditto.
1213         * sem_ch5.adb: Code clean up.
1215 2014-02-20  Hristian Kirtchev  <kirtchev@adacore.com>
1217         * sem_prag.adb (Usage_Error): Remove local
1218         constant Typ. Remove the specialized diagnostics for unconstrained
1219         or tagged items as those are not part of the explicit input set
1220         of the related subprogram and should not be flagged.
1222 2014-02-20  Ed Schonberg  <schonberg@adacore.com>
1224         * sem_attr.adb: Add guard to preserve all errors.
1226 2014-02-20  Vincent Celier  <celier@adacore.com>
1228         * switch-m.adb (Normalize_Compiler_Switches): Take into account
1229         switches that are recorded in ALI files: -gnateA, -gnateE,
1230         -gnateF, -gnateinn, -gnateu, -gnateV and -gnateY.
1232 2014-02-20  Ed Schonberg  <schonberg@adacore.com>
1234         * sem_ch5.adb (Analyze_Iterator_Specification): Check legality
1235         of an element iterator form over a formal container with an
1236         Iterable aspect.
1237         * exp_ch5.adb (Build_Formal_Container_Iteration): Utility
1238         to create declaration and loop statements for both forms of
1239         container iterators.
1240         (Expand_Formal_Container_Element_Iterator): New procedure
1241         to handle loops of the form  "for E of C" when C is a formal
1242         container.
1243         (Expand_Formal_Container_Iterator): Code cleanup.
1245 2014-02-20  Hristian Kirtchev  <kirtchev@adacore.com>
1247         * sem_prag.adb (Add_Item_To_Name_Buffer): New routine.
1248         (Analyze_Contract_Case): Remove the use of
1249         "may". Replace "aspect Contract_Cases" to avoid categorization
1250         of aspect vs pragma.
1251         (Analyze_External_Property_In_Decl_Part): Remove the use of "formal".
1252         (Analyze_Global_Item): Remove
1253         the use of "formal", specify the subprogram.  Split the
1254         error message about a state with visible refinement into
1255         two. Remove the use of "global" from "volatile global item".
1256         (Analyze_Initialization_Item): Ensure that the SPARK RM reference
1257         is on one line.
1258         (Analyze_Input_Output): Update the call to
1259         Check_Mode. Specify the duplicated item. Reword the error
1260         message concerning an input of a null output list. Use "\"
1261         for error message continuation.
1262         (Analyze_Part_Of): Remove
1263         the use of "may". Use "\" for error message continuation.
1264         (Analyze_Refined_Depends_In_Decl_Part): Update the error
1265         message concerning a useless refinement to match the format
1266         of Refined_Global.
1267         (Analyze_Refined_Global_In_Decl_Part): Reword the error message
1268         concerning a useless refinement.
1269         (Analyze_Refinement_Clause): Use "\" for error message continuation.
1270         (Check_Constituent_Usage): Use "\" for error message continuation.
1271         (Check_Dependency_Clause): Use "\" for error message continuation.
1272         (Check_Matching_Constituent): Use "\" for error message continuation.
1273         (Check_Missing_Part_Of): Use "\" for error message continuation.
1274         (Check_Mode): Renamed to
1275         Check_Role. Update the comment on usage. Redo the error reporting
1276         to use Role_Error.
1277         (Check_Mode_Restriction_In_Enclosing_Context): Use "\" for error
1278         message continuation.
1279         (Find_Mode): Renamed to Find_Role. Update the parameter profile along
1280         with comment on usage. Update all occurrences of Is_Input and Is_Output.
1281         (Inconsistent_Mode_Error): Use "\" for error message continuation.
1282         (Input_Match): Use "\" for error message continuation.
1283         (Role_Error): New routine.
1284         (Set_Convention_From_Pragma): Use "\" for error message continuation.
1285         (Usage_Error): Add local variable Error_Msg. Build specialized error
1286         message showcasing the offending item kind. Redo the diagnostics for
1287         unconstrained types.
1289 2014-02-20  Ed Schonberg  <schonberg@adacore.com>
1291         * exp_util.adb (Is_Iterated_Container): Use high-level primitives
1292         to determine whether a type is a container type, rather than
1293         examining only its type declaration, so that subtypes and derived
1294         types are handled properly.
1296 2014-02-20  Sergey Rybin  <rybin@adacore.com frybin>
1298         * gnat_ugn.texi: gnatmetric: add description of project-specific
1299         options.
1301 2014-02-20  Ed Schonberg  <schonberg@adacore.com>
1303         * sem_attr.adb (Analyze_Attribute, case 'Update): Verify that
1304         all choices in an association for a record type have the same
1305         type, as is done for record aggregates.
1307 2014-02-20  Robert Dewar  <dewar@adacore.com>
1309         * a-cborma.adb, a-cbhama.adb, a-cbdlli.adb, a-cbmutr.adb: Use pragma
1310         Unmodified rather than Warnings (Off). Make comments
1311         uniform in the four affected units.
1313 2014-02-20  Robert Dewar  <dewar@adacore.com>
1315         * sem_ch13.adb (Analyze_Attribute_Definition_Clause, case
1316         Object_Size): For non-scalar types allow any value that is a
1317         multiple of 8.
1318         * gnat_rm.texi: Document Object_Size for composites more clearly.
1320 2014-02-20  Yannick Moy  <moy@adacore.com>
1322         * sem_util.ads, sem_util.adb (Default_Initialization): Remove function.
1324 2014-02-20  Ed Schonberg  <schonberg@adacore.com>
1326         * stand.ads: Raise_Type: new predefined entity, used as the type
1327         of a Raise_Expression prior to resolution.
1328         * cstand.adb: Build entity for Raise_Type.
1329         * sem_ch11.adb (Analyze_Raise_Expression): use Raise_Type as the
1330         initial type of the node.
1331         * sem_type.adb (Covers): Raise_Type is compatible with all
1332         other types.
1333         * sem_res.adb (Resolve): Remove special handling of Any_Type on
1334         Raise_Expression nodes.
1335         (Resolve_Raise_Expression): Signal ambiguity if the type of the
1336         context is still Raise_Type.
1338 2014-02-20  Robert Dewar  <dewar@adacore.com>
1340         * sem_ch12.adb (Validate_Access_Type_Instance): Add message if
1341         mismatching predicates.
1342         * sem_ch6.adb (Check_Conformance): Give better messages on
1343         predicate mismatch.
1344         * sem_eval.adb (Predicates_Match): Move to spec.
1345         * sem_eval.ads (Predicates_Match): Moved here from body.
1347 2014-02-20  Ed Schonberg  <schonberg@adacore.com>
1349         * a-cbmutr.adb: Use default value in Insert_Child.
1351 2014-02-20  Vincent Celier  <celier@adacore.com>
1353         * gnatcmd.adb, make.adb, prj-makr.adb, clean.adb: Call
1354         Stringt.Initialize in all project aware tools.
1356 2014-02-20  Doug Rupp  <rupp@adacore.com>
1358         * gnat_ugn.texi: Document gnatbind -X option.
1359         * vms_data.ads: Minor warnings documentation reformatting.
1361 2014-02-20  Ed Schonberg  <schonberg@adacore.com>
1363         * exp_ch3.adb (Expand_Freeze_Array_Type): Only create invariant
1364         procedure for a base type.
1366 2014-02-20  Robert Dewar  <dewar@adacore.com>
1368         * sem_ch4.adb (Analyze_Case_Expression): Get type from first
1369         expression with type info.
1370         * sem_ch13.adb: Minor reformatting.
1371         * sem_eval.adb (Subtypes_Statically_Match): Make sure we return
1372         False if predicates do not match on the two types.
1374 2014-02-20  Arnaud Charlet  <charlet@adacore.com>
1376         * sem_prag.adb (Analyze_Pragma [pragma Attach_Handler]):
1377         In Relaxed_RM_Semantics mode, allow any static integer value,
1378         for compatibility with other compilers.
1380 2014-02-20  Vincent Celier  <celier@adacore.com>
1382         * errutil.adb (Initialize): Properly initialize entry in table
1383         Warnings when warnings are suppressed.
1385 2014-02-20  Robert Dewar  <dewar@adacore.com>
1387         * s-os_lib.ads: Add warning about non-portability of Rename_File.
1388         * sem_util.ads, sem_util.adb (Is_Junk_Name): New function.
1389         * sem_warn.adb: Use Is_Junk_Name to suppress some warnings.
1390         * gnat_ugn.texi: Document no warnings on junk variable names.
1391         * layout.adb: Minor code reorganization (use Ekind_In).
1392         * stringt.adb: Move initialization of Null_String_Id to Initialize
1393         routine.
1395 2014-02-20  Ed Schonberg  <schonberg@adacore.com>
1397         * sem_ch13.adb: Initialize optional Element_Id.
1399 2014-02-20  Robert Dewar  <dewar@adacore.com>
1401         * s-os_lib.ads (Rename_File): Minor commment addition.
1403 2014-02-20  Thomas Quinot  <quinot@adacore.com>
1405         * einfo.ads: Minor reformatting.
1407 2014-02-20  Hristian Kirtchev  <kirtchev@adacore.com>
1409         * aspects.adb (Exchange_Aspects): New routine.
1410         * aspects.ads (Exchange_Aspects): New routine.
1411         * atree.adb (Rewrite): Do not check whether the save node has
1412         aspects as it never will, instead check the node about to be clobbered.
1413         * einfo.adb (Write_Field25_Name): Abstract_States can appear in
1414         entities of generic packages.
1415         * sem_ch6.adb (Analyze_Expression_Function): Fix the parent
1416         pointer of an aspect specification list after rewriting takes place.
1417         * sem_ch7.adb (Analyze_Package_Body_Helper): Swap the aspect
1418         specifications of the generic template and the copy used for analysis.
1419         * sem_ch12.adb (Analyze_Generic_Package_Declaration): Swap
1420         the aspect specifications of the generic template and the
1421         copy used for analysis.
1422         (Analyze_Package_Instantiation): Propagate the aspect specifications
1423         from the generic template to the instantiation.
1424         (Build_Instance_Compilation_Unit_Nodes): Propagate the aspect
1425         specifications from the generic template to the instantiation.
1426         * sem_ch13.adb (Analyze_Aspect_Specifications): Handle aspects
1427         Abstract_State, Initializes and Initial_Condition when they
1428         apply to a package instantiation.
1430 2014-02-20  Robert Dewar  <dewar@adacore.com>
1432         * stringt.adb: Add call to Initialize in package initialization.
1434 2014-02-20  Robert Dewar  <dewar@adacore.com>
1436         * a-crbtgk.adb, a-cihama.adb, a-coinve.adb, a-ciorse.adb, a-crbtgo.adb,
1437         a-cidlli.adb, a-cimutr.adb, a-cihase.adb, a-cohama.adb, a-coorse.adb,
1438         a-chtgke.adb, a-chtgop.adb, a-comutr.adb, a-ciorma.adb, a-cobove.adb,
1439         a-convec.adb, a-cohase.adb, a-chtgbk.adb, a-chtgbo.adb: Minor
1440         reformatting.
1442 2014-02-20  Bob Duff  <duff@adacore.com>
1444         * s-os_lib.ads: Minor: Remove incorrect comment.
1446 2014-02-20  Robert Dewar  <dewar@adacore.com>
1448         * sem_elab.adb (Check_Elab_Assign): Clearer warning message.
1450 2014-02-20  Ed Schonberg  <schonberg@adacore.com>
1452         * a-cborma.adb (Assign): When creating a node without a specified
1453         element, insert an uninitialized element in the map, because
1454         the instance may provide an element type with a default
1455         initialization, e.g a scalar with a Default_Value aspect.
1456         * a-cbhama.adb (Assign_Key): Remove useless Allocate procedure.
1457         (Insert): In the version without explicit element, provide an
1458         uninitialized element, as above.
1459         * a-cbdlli.adb (Append): In the version without explicit element,
1460         provide an uninitalized element, as above.
1461         (Allocate): Remove unused version.
1463 2014-02-20  Robert Dewar  <dewar@adacore.com>
1465         * sem_elab.adb: Minor code reorganization (use Nkind_In).
1466         * stringt.adb: Remove temporary pragma Warnings (Off).
1467         * stringt.ads: Add pragma Elaborate_Body to ensure initialization
1468         of Null_String_Id.
1470 2014-02-20  Matthew Heaney  <heaney@adacore.com>
1472         * a-chtgbk.adb (Replace): Use correct offset when calculating bucket
1473         index.
1475 2014-02-20  Ed Schonberg  <schonberg@adacore.com>
1477         * sem_ch5.adb (Analyze_Iterator_Specification): Initialize
1478         properly the cursor type for subsequent volatile testing in SPARK
1479         mode, when domain is a formal container with an Iterabe aspect.
1481 2014-02-20  Robert Dewar  <dewar@adacore.com>
1483         * errout.adb (Set_Warnings_Mode_Off): Add Reason argument.
1484         (Set_Specific_Warning_Off): Add Reason argument.
1485         * errout.ads (Set_Warnings_Mode_Off): Add Reason argument.
1486         (Set_Specific_Warning_Off): Add Reason argument.
1487         * erroutc.adb (Warnings_Entry): Add Reason field
1488         (Specific_Warning_Entry): Add Reason field.
1489         (Warnings_Suppressed): return String_Id for Reason.
1490         (Warning_Specifically_Suppressed): return String_Id for Reason.
1491         * erroutc.ads (Warnings_Entry): Add Reason field.
1492         (Specific_Warning_Entry): Add Reason field.
1493         (Set_Specific_Warning_Off): Add Reason argument.
1494         (Set_Warnings_Mode_Off): Add Reason argument.
1495         (Warnings_Suppressed): return String_Id for Reason.
1496         (Warning_Specifically_Suppressed): return String_Id for Reason.
1497         * errutil.adb (Warnings_Suppressed): returns String_Id for Reason
1498         (Warning_Specifically_Suppressed): returns String_Id for Reason
1499         * gnat_rm.texi: Document that Warning parameter is string literal
1500         or a concatenation of string literals.
1501         * par-prag.adb: New handling for Reason argument.
1502         * sem_prag.adb (Analyze_Pragma, case Warning): New handling
1503         for Reason argument.
1504         * sem_util.ads, sem_util.adb (Get_Reason_String): New procedure.
1505         * sem_warn.ads (Warnings_Off_Entry): Add reason field.
1506         * stringt.adb: Set Null_String_Id.
1507         * stringt.ads (Null_String_Id): New constant.
1509 2014-02-20  Robert Dewar  <dewar@adacore.com>
1511         * einfo.ads: Minor comment addition: Etype of package is
1512         Standard_Void_Type.
1513         * checks.adb, exp_aggr.adb, exp_atag.adb, exp_attr.adb, exp_ch13.adb,
1514         exp_ch2.adb, exp_ch3.adb, exp_ch4.adb, exp_ch5.adb, exp_ch6.adb,
1515         exp_ch7.adb, exp_ch9.adb, exp_dbug.adb, exp_disp.adb, exp_imgv.adb,
1516         exp_intr.adb, exp_prag.adb, exp_sel.adb, exp_strm.adb, exp_util.adb,
1517         freeze.adb, rtsfind.adb, sem_aggr.adb, sem_attr.adb, sem_ch10.adb,
1518         sem_ch12.adb, sem_ch13.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
1519         sem_ch6.adb, sem_ch8.adb, sem_dim.adb, sem_prag.adb, sem_res.adb,
1520         sem_util.adb, tbuild.adb, tbuild.ads: Remove New_Reference_To.
1521         Replace all calls with calls to New_Occurrence_Of.
1523 2014-02-20  Robert Dewar  <dewar@adacore.com>
1525         * par-util.adb (Ignore, case of right paren): Make this a
1526         serious error.
1528 2014-02-19  Robert Dewar  <dewar@adacore.com>
1530         * sem_ch5.adb, sem_prag.adb, sem_attr.adb: Minor reformatting.
1531         * debug.adb: Remove -gnatd.X switch, no longer used.
1532         * styleg.adb (Check_Then): Remove check of -gnatd.X, check is
1533         now always made.
1535 2014-02-19  Bob Duff  <duff@adacore.com>
1537         * g-socket.ads: Minor: Correct some comments.
1539 2014-02-19  Ed Schonberg  <schonberg@adacore.com>
1541         * sem_ch5.adb: Inhibit iterator rewriting in ASIS mode.
1543 2014-02-19  Arnaud Charlet  <charlet@adacore.com>
1545         * sem_ch13.adb (Analyze_Aspect_Specifications): Do not generate
1546         an error on out of range priorities if Relaxed_RM_Semantics.
1547         * sem_prag.adb (Analyze_Pragma): Ditto.
1549 2014-02-19  Bob Duff  <duff@adacore.com>
1551         * sem_attr.adb (Resolve_Attribute): Detect the case of F'Access
1552         where F denotes the renaming of an enumeration literal, and
1553         issue a specialized error message.
1555 2014-02-19  Matthew Heaney  <heaney@adacore.com>
1557         * a-chtgop.ads (Checked_Index): New operation.
1558         (Next): Changed mode of hash table.
1559         * a-chtgop.adb (Adjust, Delete_Node_Sans_Free): Detect tampering
1560         (Generic_Read, Reserve_Capacity): Ditto.
1561         (Generic_Equal): Detect tampering.
1562         (Next): Changed mode of hash table, detect tampering.
1563         * a-chtgke.ads (Checked_Index, Checked_Equivalent_Keys): New
1564         operation.
1565         (Find): Changed mode of hash table.
1566         * a-chtgke.adb (Checked_Equivalent_Keys): New operation
1567         (Delete_Key_Sans_Free, Generic_Conditional_Insert): Detect
1568         tampering.
1569         (Find): Changed mode of hash table, check for tampering.
1570         (Generic_Replace_Element): Check for tampering.
1571         * a-chtgbk.ads (Checked_Index, Checked_Equivalent_Keys): New operation.
1572         * a-chtgbk.adb (Checked_Index, Checked_Equivalent_Keys): New
1573         operation (Delete_Key_Sans_Free, Generic_Conditional_Insert):
1574         Detect tampering.
1575         (Find, Generic_Replace_Element): Check for tampering.
1576         * a-chtgbo.ads (Checked_Index): New operation.
1577         * a-chtgbo.adb (Checked_Index): New operation
1578         (Delete_Node_Sans_Free, Generic_Equal): Detect tampering.
1579         (Generic_Read, Next): Ditto.
1580         * a-cohase.adb, a-cihase.adb (Is_In): Changed mode of hash
1581         table (Difference, Intersection): Use variable view of
1582         source, detect tampering (Find, Is_Subset, Overlap): Use
1583         variable view of container (Symmetric_Difference, Union):
1584         Detect tampering (Vet): Use Checked_Index to detect tampering
1585         (Constant_Reference, Element, Find): Use variable view of
1586         container.
1587         (Update_Element_Preserving_Key): Detect tampering.
1588         * a-cbhase.adb (Difference, Find, Is_In): Use variable view
1589         of container.
1590         (Is_Subset): Ditto.
1591         (Equivalent_Sets, Overlap): Use Node's Next component.
1592         (Vet): Use Checked_Index to detect tampering.
1593         (Constant_Reference, Element, Find): Use variable view of container.
1594         (Update_Element_Preserving_Key): Detect tampering.
1595         * a-cohama.adb, a-cihama.adb, a-cbhama.adb (Constant_Reference,
1596         Element, Find): Use variable view of container.
1597         (Reference): Rename hash table component.
1598         (Vet): Use Checked_Index to detect tampering.
1600 2014-02-19  Arnaud Charlet  <charlet@adacore.com>
1602         * adabkend.adb (Scan_Compiler_Arguments): Add missing handling
1603         of -nostdinc.
1605 2014-02-19  Thomas Quinot  <quinot@adacore.com>
1607         * tbuild.adb (New_Occurrence_Of, New_Rerefence_To): Guard
1608         against calls without Def_Id.
1610 2014-02-19  Claire Dross  <dross@adacore.com>
1612         * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads, a-cforse.ads,
1613         a-cofove.ads: Add global annotations to subprograms.
1615 2014-02-19  Hristian Kirtchev  <kirtchev@adacore.com>
1617         * sem_prag.adb (Analyze_Initial_Condition_In_Decl_Part): Remove
1618         constants Errors, Pack_Id and Pack_Init. Remove variable Vars.
1619         Initial_Condition no longer requires the presence of pragma
1620         Initialized. Do not try to diagnose whether all variables mentioned in
1621         pragma Initializes also appear in Initial_Condition.
1622         (Collect_Variables): Removed.
1623         (Match_Variable): Removed.
1624         (Match_Variables): Removed.
1625         (Report_Unused_Variables): Removed.
1627 2014-02-19  Thomas Quinot  <quinot@adacore.com>
1629         * gnat_rm.texi (pragma Stream_Convert): Minor rewording.
1631 2014-02-19  Robert Dewar  <dewar@adacore.com>
1633         * sem_util.adb, sem_util.ads, prj-conf.adb, s-os_lib.adb: Minor
1634         reformatting.
1636 2014-02-19  Vincent Celier  <celier@adacore.com>
1638         * prj-part.adb (Parse_Single_Project): Use the fully resolved
1639         project path, with all symbolic links resolved, to check if the
1640         same project is imported with a different unresolved path.
1641         * prj-tree.ads (Project_Name_And_Node): Component Canonical_Path
1642         changed to Resolved_Path to reflect that all symbolic links
1643         are resolved.
1645 2014-02-19  Ed Schonberg  <schonberg@adacore.com>
1647         * sem_util.ads, sem_util.adb (Get_Cursor_Type): Moved to sem_util
1648         from sem_ch13, for use elsewhere.
1649         * sem_ch13.adb (Get_Cursor_Type): Moved to sem_util.
1650         * sem_ch5.adb (Analyze_Iterator_Specification): Set properly the
1651         cursor type on the loop variable when the iteration is over o
1652         formal container.
1654 2014-02-19  Vincent Celier  <celier@adacore.com>
1656         * prj-conf.adb (Add_Default_GNAT_Naming_Scheme): Add declaration
1657         for an empty Target (Check_Target): Never fail when an empty
1658         target is declared in the configuration project.
1660 2014-02-19  Ed Schonberg  <schonberg@adacore.com>
1662         * sem_prag.adb (Check_Arg_Is_Local_Name): Argument is local if
1663         the pragma comes fron a predicate aspect and the context is a
1664         record declaration within the scope that declares the type.
1666 2014-02-19  Robert Dewar  <dewar@adacore.com>
1668         * gnat_rm.texi: Minor clarifications.
1669         * expander.adb, sem_aggr.adb: Add comments.
1671 2014-02-19  Ed Schonberg  <schonberg@adacore.com>
1673         * sem_prag.adb (Check_Arg_Is_Local_Name): For an aspect that
1674         applies to a subprogram body, the name is the current scope,
1675         rather than being declared in the current scope.
1676         (Analyze_Pragma, case No_Return): Handle properly a No_Return
1677         aspect applied to a subprogram body.
1679 2014-02-19  Ed Schonberg  <schonberg@adacore.com>
1681         * sem_ch13.adb (Resolve_Iterable_Operation): Improve resolution
1682         of overloaded subprograms, and fix bug in handling of primitive
1683         operation Element.
1685 2014-02-19  Pascal Obry  <obry@adacore.com>
1687         * s-os_lib.adb: Minor reformatting.
1689 2014-02-19  Yannick Moy  <moy@adacore.com>
1691         * expander.adb (Expand): Do nothing inside generics.
1692         * sem_aggr.adb (Aggregate_Constraint_Checks): Do nothing inside
1693         generics.
1695 2014-02-19  Yannick Moy  <moy@adacore.com>
1697         * exp_ch2.adb: Remove useless 'with' of unit Uintp.
1699 2014-02-19  Robert Dewar  <dewar@adacore.com>
1701         * sem_ch3.adb, style.adb, sem_prag.adb, sem_ch13.adb: Minor reformatting
1702         * a-sequio.adb: Remove useless pragma Extensions_Allowed (no
1703         longer needed).
1705 2014-02-19  Claire Dross  <dross@adacore.com>
1707         * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
1708         a-cforse.ads, a-cofove.ads: Add Iterable aspect to formal containers.
1710 2014-02-19  Hristian Kirtchev  <kirtchev@adacore.com>
1712         * sem_ch3.adb (Analyze_Declarations): Analyze
1713         a package contract at the end of the private declarations (if
1714         applicable), otherwise analyze it and the end of the visible
1715         declarations.
1717 2014-02-19  Ed Schonberg  <schonberg@adacore.com>
1719         * style.adb (Missing_Overriding): If subprogram is an
1720         instantiation, place warning on the instance node itself,
1721         without mention of the original generic. Do not emit message
1722         if explicit Ada version is older than the introduction of the
1723         overriding indicator.
1725 2014-02-19  Yannick Moy  <moy@adacore.com>
1727         * gnat_rm.texi: Doc clarifications.
1729 2014-02-19  Yannick Moy  <moy@adacore.com>
1731         * exp_util.adb (Remove_Side_Effects): Do not remove side-effects
1732         inside a generic.
1734 2014-02-19  Ed Schonberg  <schonberg@adacore.com>
1736         * sem_ch13.adb (Get_Cursor_Type): Obtain cursor type from
1737         specified First primitive, rather than by name.
1738         (Validate_Iterable_Aspect, Resolve_Iterable_Operation): Use it,
1739         and extend error checking for missing primitives and incorrect
1740         signatures.
1742 2014-02-19  Ed Schonberg  <schonberg@adacore.com>
1744         * sem_ch3.adb (Check_Pragma_Implemented): Detect additional
1745         errors when a Synchronization aspect on an overriding protected
1746         operation does not match the given aspect on the overridden
1747         operation of an ancestor interface.
1749 2014-02-19  Hristian Kirtchev  <kirtchev@adacore.com>
1751         * sem_prag.adb (Check_Loop_Pragma_Grouping): New routine.
1752         (Check_Loop_Pragma_Placement): Update
1753         comment on usage. Remove local variables Orig_Stmt and
1754         Within_Same_Sequence. Check that the current Loop_Invariant or
1755         Loop_Variant pragma is grouped together with other such pragmas.
1756         (Is_Loop_Pragma): New routine.
1757         (Prev_In_Loop): Removed.
1759 2014-02-19  Robert Dewar  <dewar@adacore.com>
1761         * par-ch6.adb (P_Return): For extended return, end column lines
1762         up with RETURN.
1763         * par.adb: Minor documentation clarification.
1765 2014-02-19  Yannick Moy  <moy@adacore.com>
1767         * sem_prag.adb (Check_Loop_Pragma_Placement): Add check
1768         that Loop_Invariant and Loop_Variant appear consecutively.
1769         * gnat_rm.texi Update documentation of Loop_Invariant and
1770         Loop_Variant pragmas.
1772 2014-02-19  Robert Dewar  <dewar@adacore.com>
1774         * debug.adb: Document -gnatd.X.
1775         * par-ch5.adb (P_If_Statement): Always check THEN, even if not
1776         first token
1777         (Check_Then_Column): Ditto.
1778         * styleg.adb (Check_Then): Allow THEN on line after IF.
1779         (Check_Then): Check THEN placement under control of -gnatd.X
1780         * styleg.ads (Check_Then): Now called even if THEN is not first
1781         token on line.
1782         * stylesw.ads (Style_Check_If_Then_Layout): Document new
1783         relaxed rules.
1784         * gnat_ugn.texi: For -gnatyi, THEN can now be on line after IF.
1786 2014-02-19  Robert Dewar  <dewar@adacore.com>
1788         * a-cfhama.adb, a-cfhase.adb, a-cforse.adb, a-cofove.adb, a-ngcefu.adb,
1789         a-teioed.adb, a-wtedit.adb, a-ztedit.adb, exp_ch5.adb, inline.adb,
1790         prj-pp.adb, prj-tree.adb, sem_ch12.adb, sem_ch8.adb,
1791         vms_conv.adb: Fix bad layout of IF statements
1793 2014-02-19  Robert Dewar  <dewar@adacore.com>
1795         * exp_util.adb (Side_Effect_Free): Scalar if expressions can be SEF.
1797 2014-02-19  Robert Dewar  <dewar@adacore.com>
1799         * exp_util.adb: Update comments.
1801 2014-02-19  Doug Rupp  <rupp@adacore.com>
1803         * bindgen.adb (Gen_Adainit) [VMS] New global Float_Format.
1804         * init.c (__gl_float_format): [VMS] New global.
1805         (__gnat_set_features): Call FP_CONTROL to set FPSR for the float
1806         representation in effect.
1808 2014-02-19  Hristian Kirtchev  <kirtchev@adacore.com>
1810         * exp_ch6.adb Add with and use clause for Exp_Prag.
1811         (Expand_Contract_Cases): Relocated to Exp_Prag.
1812         * exp_ch6.ads (Expand_Contract_Cases): Relocated to Exp_Prag.
1813         * exp_prag.adb Add with and use clauses for Checks and Validsw.
1814         (Expand_Contract_Cases): Relocated from Exp_Ch6. Update the
1815         structure of the expanded code to showcase the evaluation of
1816         attribute 'Old prefixes. Add local variable Old_Evals. Expand
1817         any attribute 'Old references found within a consequence. Add
1818         circuitry to evaluate the prefixes of attribute 'Old that
1819         belong to a selected consequence.
1820         (Expand_Old_In_Consequence): New routine.
1821         * exp_prag.ads (Expand_Contract_Cases): Relocated from Exp_Ch6.
1822         * sem_attr.adb (Check_Use_In_Contract_Cases): Warn that a
1823         potentially unevaluated prefix is always evaluated.
1825 2014-02-19  Robert Dewar  <dewar@adacore.com>
1827         * exp_attr.adb (Expand_Min_Max_Attribute): Use Insert_Declaration
1828         (Expand_Min_Max_Attribute): Use Matching_Standard_Type.
1829         * exp_ch4.adb (Expand_N_Expression_With_Actions): Remove special
1830         handling for the case of Modify_Tree_For_C, this approach did
1831         not work.
1832         * exp_util.adb (Matching_Standard_Type): New function
1833         (Side_Effect_Free): New top level functions (from
1834         Remove_Side_Effects).
1835         * exp_util.ads (Side_Effect_Free): New top level functions
1836         (moved from body).
1837         * sinfo.ads: Minor comment updates.
1839 2014-02-19  Ed Schonberg  <schonberg@adacore.com>
1841         * exp_ch6.adb (Expand_Simple_Function_Return): If return
1842         type is unconstrained and uses the secondary stack, mark the
1843         enclosing function accordingly, to ensure that the value is not
1844         prematurely removed.
1846 2014-02-19  Hristian Kirtchev  <kirtchev@adacore.com>
1848         * par.adb Alphabetize the routines in Par.Sync.
1849         (Resync_Past_Malformed_Aspect): New routine.
1850         * par-ch13.adb (Get_Aspect_Specifications): Alphabetize local
1851         variables. Code and comment reformatting. Detect missing
1852         parentheses on aspects [Refined_]Global and [Refined_]Depends
1853         with a non-null definition.
1854         * par-sync.adb: Alphabetize all routines in this separate unit.
1855         (Resync_Past_Malformed_Aspect): New routine.
1857 2014-02-19  Robert Dewar  <dewar@adacore.com>
1859         * sem_eval.ads, sem_eval.adb (Subtypes_Statically_Match): Return False
1860         if Esize values do not match.
1862 2014-02-19  Yannick Moy  <moy@adacore.com>
1864         * sinfo.ads: Minor comment update.
1866 2014-02-19  Hristian Kirtchev  <kirtchev@adacore.com>
1868         * atree.ads: Minor reformatting (change Entity_Info to Einfo).
1870 2014-02-19  Thomas Quinot  <quinot@adacore.com>
1872         * exp_ch7.adb (Find_Node_To_Be_Wrapped): An assignment statement
1873         that has the No_Ctrl_Actions flag is a suitable node to be
1874         wrapped if the assigned expression has no finalization actions.
1875         * sem_eval.adb (Eval_Entity_Name): For a compile time known
1876         boolean value, mark the corresponding condition SCO as constant.
1878 2014-02-19  Robert Dewar  <dewar@adacore.com>
1880         * exp_util.adb: Minor reformatting.
1881         * exp_util.ads (Matching_Standard_Type): New function.
1882         * exp_ch7.adb: Minor reformatting.
1884 2014-02-19  Ed Schonberg  <schonberg@adacore.com>
1886         * sem_ch13.adb (Get_Cursor_Type): Use scope of iterable type
1887         to find declaration for Cursor, to handle properly the case of
1888         a discriminated iterable type.
1890 2014-02-19  Vincent Celier  <celier@adacore.com>
1892         * gnatcmd.adb (GNATCmd): Always replace the object dirs of
1893         imported library projects with the library ALI dirs, when setting
1894         the object paths.
1895         * prj-env.ads (Ada_Objects_Path): Correct comments about
1896         argument Including_Libraries.
1898 2014-02-19  Gary Dismukes  <dismukes@adacore.com>
1900         * gnat_rm.texi: Minor spelling fixes.
1902 2014-02-19  Doug Rupp  <rupp@adacore.com>
1904         * init.c: Remove unneeded code.
1905         * fe.h (Float_Format): New macro
1906         * gcc-interface/trans.c (gigi): On VMS, set vms_float_format.
1908 2014-02-19  Hristian Kirtchev  <kirtchev@adacore.com>
1910         * sem_prag.adb (Check_Refined_Global_Item):
1911         A state or variable acts as a constituent only it is part of an
1912         encapsulating state and the state has visible refinement.
1914 2014-02-19  Ed Schonberg  <schonberg@adacore.com>
1916         * sem_ch6.adb (Analyze_Subprogram_Contract): Do not warn on a
1917         postcondition for a function when the expression does not mention
1918         'Result but the function has in-out parameters.
1920 2014-02-19  Robert Dewar  <dewar@adacore.com>
1922         * gnat_rm.texi: Add documentation on Value_Size forcing biased
1923         representation.
1925 2014-02-19  Hristian Kirtchev  <kirtchev@adacore.com>
1927         * lib-xref.ads Remove the small table of letter and symbol usage as we
1928         already have one.
1930 2014-02-19  Hristian Kirtchev  <kirtchev@adacore.com>
1932         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Emit specific error
1933         messages depending on the offending misplaced aspect specifications.
1934         (Diagnose_Misplaced_Aspect_Specifications): New routine.
1936 2014-02-19  Ed Schonberg  <schonberg@adacore.com>
1938         * sem_ch13.adb (Get_Cursor): Utility to retrieve cursor type
1939         for iterable aspect primitives.
1940         (Resolve_Iterable_Operation): Use expected signature of iterable
1941         aspect to resolve primitive when overloading is present.
1942         (Validate_Iterable_Aspect, Analyze_Aspects_At_Freeze_Point): use it.
1943         (Check_Signature): Removed.
1945 2014-02-19  Yannick Moy  <moy@adacore.com>
1947         * sem_ch10.adb (Analyze_Proper_Body): Issue error on missing
1948         subunit in GNATprove_Mode.
1949         * sinfo.ads (GNATprove_Mode): Document error issued in GNATprove_Mode.
1951 2014-02-19  Hristian Kirtchev  <kirtchev@adacore.com>
1953         * lib-xref.ads Alphabetize the contents of table
1954         Xref_Entity_Letters. Add an entry in table Xref_Entity_Letters
1955         for E_Abstract_State. List all letters and symbols in use.
1956         * sem_prag.adb (Analyze_Abstract_State): Update all calls
1957         to Create_Abstract_State to reflect the new signature.
1958         (Create_Abstract_State): Change subprogram profile and update
1959         the comment on usage. Use the proper location of the state
1960         declaration when creating a new abstract state entity. Do not
1961         generate an external name, but simply reuse the name coming from
1962         the state declaration.
1964 2014-02-19  Robert Dewar  <dewar@adacore.com>
1966         * exp_ch4.adb (Expand_N_Expression_With_Actions): Make sure
1967         declarations get properly inserted in Modify_Tree_For_C mode.
1968         * sinfo.ads: Minor comment addition.
1970 2014-02-19  Robert Dewar  <dewar@adacore.com>
1972         * par-ch9.adb, exp_ch5.adb, sem_ch5.adb, exp_attr.adb, sem_util.adb,
1973         sem_util.ads, sem_ch13.adb, sem_ch13.ads: Minor reformatting.
1975 2014-02-19  Ed Schonberg  <schonberg@adacore.com>
1977         * style.adb (Missing_Overriding): Warning does not apply in
1978         language versions prior to Ada 2005.
1979         * snames.ads-tmpl: Add Name_Iterable and Attribute_Iterable.
1980         * sem_attr.adb: Add Attribute_Iterable where needed.
1981         * exp_attr.adb: ditto.
1982         * exp_ch5.adb (Expand_Formal_Container_Loop): New procedure to
1983         handle loops and quantified expressions over types that have an
1984         iterable aspect.  Called from Expand_Iterator_Loop.
1985         * sem_ch5.adb (Analyze_Iterator_Specification): Recognize types
1986         with Iterable aspect.
1987         * sem_ch13.adb (Validate_Iterable_Aspect): Verify that the
1988         subprograms specified in the Iterable aspect have the proper
1989         signature involving container and cursor.
1990         (Check_Aspect_At_Freeze_Point): Analyze value of iterable aspect.
1991         * sem_ch13.ads (Validate_Iterable_Aspect): New subprogram.
1992         * sem_util.ads, sem_util.adb (Get_Iterable_Type_Primitive):
1993         New procedure to retrieve one of the primitives First, Last,
1994         or Has_Element, from the value of the iterable aspect of a
1995         formal container.
1996         (Is_Container_Element): Predicate to recognize expressions
1997         that denote an element of one of the predefined containers,
1998         for possible optimization.  This subprogram is not currently
1999         used, pending ARG discussions on the legality of the proposed
2000         optimization. Worth preserving for eventual use.
2001         (Is_Iterator): Recognize formal container types.
2002         * aspects.ads, aspects.adb: Add Aspect_Iterable where needed.
2004 2014-02-19  Robert Dewar  <dewar@adacore.com>
2006         * exp_attr.adb (Expand_Min_Max_Attribute): New procedure
2007         (Expand_N_Attribute_Reference): Use this procedure for Min and Max.
2008         * exp_ch4.adb (Expand_N_Expression_With_Actions): Remove object
2009         declarations from list of actions.
2010         * output.ads, output.adb (Delete_Last_Char): New procedure.
2011         * sinfo.ads: Document handling of Mod and expression with actions
2012         in Modify_Tree_For_C mode.
2014 2014-02-19  Ed Schonberg  <schonberg@adacore.com>
2016         * par-ch9.adb (P_Task): Add a null statement to produce a
2017         well-formed task body when due to a previous syntax error the
2018         statement list is empty.
2020 2014-02-19  Hristian Kirtchev  <kirtchev@adacore.com>
2022         * sem_prag.adb (Check_Dependency_Clause): Account
2023         for the case where a state with a non-null refinement matches a
2024         null output list. Comment reformatting.
2025         (Inputs_Match): Copy a solitary input to avoid an assertion failure
2026         when trying to match the same input in multiple clauses.
2028 2014-02-19  Gary Dismukes  <dismukes@adacore.com>
2030         * sem_attr.adb: Minor typo fix.
2032 2014-02-18  Robert Dewar  <dewar@adacore.com>
2034         * cstand.adb (Build_Signed_Integer_Type): Minor change of formal
2035         from Int to Nat (Build_Unsigned_Integer_Type): New procedure
2036         (Create_Standard): Create new unsigned types.
2037         * exp_ch4.adb (Expand_N_Op_Mod): Expand mod in Modify_Tree_For_C
2038         mode (Expand_N_Reference): Removed, problematic and not needed
2039         for now.
2040         * exp_ch4.ads (Expand_N_Reference): Removed, problematic and
2041         not needed for now.
2042         * exp_util.ads, exp_util.adb (Power_Of_Two): New function.
2043         * expander.adb: Remove call to Expand_N_Reference (problematic,
2044         and not needed now).
2045         * sem_aux.ads, sem_aux.adb (Corresponding_Unsigned_Type): New function.
2046         * stand.adb: Read and write unsigned type entities.
2047         * stand.ads: Add new unsigned types.
2049 2014-02-18  Hristian Kirtchev  <kirtchev@adacore.com>
2051         * sem_ch4.adb (Analyze_Call): Do not mark a function call
2052         as being inside an assertion expression as the flag is now removed.
2053         (Check_Ghost_Subprogram_Call): Do not query the
2054         In_Assertion_Expression flag as it is now removed, instead use
2055         a predicate function.
2056         * sem_elab.adb (Check_Internal_Call_Continue): Do not query the
2057         In_Assertion_Expression flag as it is now removed, instead use
2058         a predicate function.
2059         * sem_prag.ads: Add new table Assertion_Expression_Pragma.
2060         * sem_util.adb Add with and use clause for Sem_Prag.
2061         (In_Assertion_Expression_Pragma): New routine.
2062         * sem_util.ads (In_Assertion_Expression_Pragma): New routine.
2063         * sinfo.adb (In_Assertion_Expression): Removed.
2064         (Set_In_Assertion_Expression): Removed.
2065         * sinfo.ads Remove flag In_Assertion_Expression along with its
2066         use in nodes.
2067         (In_Assertion_Expression): Removed along with
2068         pragma Inline.  (Set_In_Assertion_Expression): Removed along
2069         with pragma Inline.
2071 2014-02-18  Sergey Rybin  <rybin@adacore.com frybin>
2073         * gnat_ugn.texi: gnatpp section: add note that '-j' cannot be
2074         used together with '-r', '-rf' or '-rnb' options.
2076 2014-02-18  Hristian Kirtchev  <kirtchev@adacore.com>
2078         * sem_attr.adb (Analyze_Attribute): Comment
2079         and code reformatting. Use separate routines to check the
2080         legality of attribute 'Old in certain pragmas. Verify
2081         the use of 'Old, 'Result and locally declared entities
2082         within the prefix of 'Old.
2083         (Check_References_In_Prefix): New routine.
2084         (Check_Use_In_Contract_Cases): New routine.
2085         (Check_Use_In_Test_Case): New routine.
2087 2014-02-18  Vincent Celier  <celier@adacore.com>
2089         * sem_aux.adb (Is_By_Reference_Type): For each components of
2090         a record type, check also if the component is volatile as it
2091         may have an aspect that makes it volatile. If it is, then the
2092         record type is a by reference type.
2094 2014-02-18  Robert Dewar  <dewar@adacore.com>
2096         * exp_attr.adb: Minor reformatting.
2097         * exp_ch4.ads, exp_ch4.adb (Expand_N_Reference): New procedure.
2098         * exp_util.adb (Remove_Side_Effects): Add conditional expressions
2099         as another case where we don't generate N_Reference nodes for
2100         primitive types.
2101         * expander.adb (Expand): Add call to Expand_N_Reference.
2103 2014-02-06  Hristian Kirtchev  <kirtchev@adacore.com>
2105         * sem_prag.adb (Analyze_Refined_Pragma): Remove
2106         local variable Pack_Spec. Refinement pragmas may now apply to
2107         bodies of both visible and private subprograms.
2109 2014-02-06  Robert Dewar  <dewar@adacore.com>
2111         * exp_attr.adb (Expand_Loop_Entry_Attribute):
2112         Minor change (Attr => N) (Expand_Pred_Succ): New name
2113         Expand_Pred_Succ_Attribute (Expand_N_Attribute_Reference, case
2114         Max): Expand into if expression if Modify_Tree_For_C mode.
2115         (Expand_N_Attribute_Reference, case Min): ditto
2116         * sinfo.ads: Modify_Tree_For_C takes care of expanding Min and
2117         Max attributes.
2119 2014-02-06  Ed Schonberg  <schonberg@adacore.com>
2121         * sem_ch3.adb (Analyze_Object_Declaration): Do not generate
2122         predicate check if this is an internal declaration with
2123         No_Initialization set, as for an expanded aggregate component.
2125 2014-02-06  Doug Rupp  <rupp@adacore.com>
2127         * init.c (__gnat_default_resignal_p) [VMS]: Test for and resignal
2128         conditions with severity of "SUCCESS" or "INFORMATIONAL".
2130 2014-02-06  Yannick Moy  <moy@adacore.com>
2132         * sem_prag.adb (Analyze_Pragma): Analyze pragma
2133         Debug rewritten node before rewriting it as a null statement in
2134         GNATprove mode.
2136 2014-02-06  Robert Dewar  <dewar@adacore.com>
2138         * sem_attr.adb (Min_Max): New procedure.
2139         (Max_Alignment_For_Allocation_Max_Size_In_Storage_Elements): New
2140         procedure.
2142 2014-02-06  Sergey Rybin  <rybin@adacore.com frybin>
2144         * gnat_ugn.texi, vms_data.ads: Add documentation of '-t' option for
2145         gnatmetric/gnatpp.
2147 2014-02-06  Hristian Kirtchev  <kirtchev@adacore.com>
2149         * sem_prag.adb (Analyze_Abstract_State): Update
2150         all calls to Create_Abstract_State to pass the proper state
2151         "declaration".
2152         (Create_Abstract_State): Add new formal parameter
2153         State_Decl along with comment on usage. Establish a link between
2154         the abstract state entity and the state declaration.
2156 2014-02-06  Robert Dewar  <dewar@adacore.com>
2158         * sem_attr.adb (Analyze_Attribute, case Max): Check for improper
2159         comparison of unordered enumeration type.
2160         (Analyze_Attribute, case Max): Check for improper comparison of
2161         unordered enumeration type.
2162         * sem_res.adb (Bad_Unordered_Enumeration_Reference): Moved to
2163         sem_util.adb.
2164         * sem_util.ads, sem_util.adb (Bad_Unordered_Enumeration_Reference):
2165         Moved here from Sem_Res.
2167 2014-02-06  Robert Dewar  <dewar@adacore.com>
2169         * sem_ch3.adb, sem_prag.adb, sem_res.adb, lib-xref.adb: Minor
2170         reformatting.
2172 2014-02-06  Hristian Kirtchev  <kirtchev@adacore.com>
2174         * sem_ch6.adb (Process_Formals): Error message reformatting.
2176 2014-02-06  Hristian Kirtchev  <kirtchev@adacore.com>
2178         * sem_ch3.adb (Handle_Late_Controlled_Primitive): Add local
2179         variable Spec. Do not inherit the null indicator from the
2180         subprogram body when generating the spec.
2182 2014-02-06  Robert Dewar  <dewar@adacore.com>
2184         * casing.adb (Determine_Casing): Consider SPARK_Mode to be
2185         mixed case.
2187 2014-02-06  Ed Schonberg  <schonberg@adacore.com>
2189         * exp_ch6.adb (Is_Build_In_Place_Function): Predicate is false
2190         when the function has a foreign convention, but not if only the
2191         limited return type has such a convention.
2193 2014-02-06  Hristian Kirtchev  <kirtchev@adacore.com>
2195         * sem_ch3.adb (Handle_Late_Controlled_Primitive): Remove local
2196         variable Spec. Comment reformatting. Use Copy_Separate_Tree
2197         rather than New_Copy_Tree when building the corresponding
2198         subprogram declaration.
2200 2014-02-06  Hristian Kirtchev  <kirtchev@adacore.com>
2202         * sem_prag.adb (Analyze_Global_Item): Remove
2203         the mode-related checks on abstract states with enabled external
2204         properties.
2205         (Property_Error): Removed.
2207 2014-02-06  Javier Miranda  <miranda@adacore.com>
2209         * lib-xref.adb (Generate_Reference): When
2210         generating the reference to the first private entity take care
2211         of handling swapped entities.
2213 2014-02-06  Sergey Rybin  <rybin@adacore.com frybin>
2215         * gnat_ugn.texi, vms_data.ads: Add documentation of -j option for
2216         gnatmetric.
2218 2014-02-06  Robert Dewar  <dewar@adacore.com>
2220         * exp_ch4.adb (Expand_N_Shift_Left): Handle shift counts greater
2221         than the word size when operating in Modify_Tree_For_C mode.
2222         * sinfo.ads: Add documentation section on Modify_Tree_For_C mode.
2224 2014-02-06  Robert Dewar  <dewar@adacore.com>
2226         * erroutc.adb (Warning_Specifically_Suppressed.Matches):
2227         compare is case insensitive.
2228         * gnat_rm.texi: Document that string compare for Warnings Off
2229         is now case insensitive.
2231 2014-02-06  Eric Botcazou  <ebotcazou@adacore.com>
2233         * gnat_rm.texi: Small wording tweak.
2235 2014-02-06  Pascal Obry  <obry@adacore.com>
2237         * prj-attr.adb, projects.texi, snames.ads-tmpl: Add Included_Patterns
2238         and Included_Artifact_Patterns attribute definitions.
2240 2014-02-06  Yannick Moy  <moy@adacore.com>
2242         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Set
2243         SPARK_Mode pragma component for all subprograms, including stubs.
2245 2014-02-06  Hristian Kirtchev  <kirtchev@adacore.com>
2247         * sem_ch10.adb (Analyze_Package_Body_Stub): Maintain
2248         the configuration options of the enclosing context in a
2249         stack-like fasion.
2250         (Analyze_Subprogram_Body_Stub): Maintain the
2251         configuration options of the enclosing context in a stack-like
2252         fashion.
2254 2014-02-06  Robert Dewar  <dewar@adacore.com>
2256         * debug.adb: -gnatd.u sets Modify_Tree_For C
2257         * exp_ch4.adb (Expand_N_Op_Rotate_Left): Expand out
2258         if Modify_Tree_For_C (Expand_N_Op_Rotate_Right): ditto.
2259         (Expand_N_Op_Arithmetic_Right_Shift): ditto.
2260         * exp_intr.adb (Expand_Shift): Call expander so we do
2261         Modify_Tree_For_C expansions.
2262         * gnat1drv.adb (Adjust_Global_Switches): Set Modify_Tree_For_C
2263         if -gnatd.u set.
2265 2014-02-06  Fedor Rybin  <frybin@adacore.com>
2267         * prj-proc.ads (Tree_Loaded_Callback): new type Callback used
2268         after the phase 1 of the processing of each aggregated project
2269         to get access to project trees of aggregated projects.
2270         (Process_Project_Tree_Phase_1): new parameter On_New_Tree_Loaded
2271         If specified, On_New_Tree_Loaded is called after each aggregated
2272         project has been processed succesfully.
2273         (Process): new parameter On_New_Tree_Loaded.
2274         * prj-proc.adb (Process_Aggregated_Projects): On_New_Tree_Loaded
2275         callback added after processing of each aggregated project.
2276         (Recursive_Process): new parameter On_New_Tree_Loaded.
2277         (Process): new parameter On_New_Tree_Loaded.
2278         (Process_Project_Tree_Phase_1): new parameter On_New_Tree_Loaded.
2279         * prj-conf.ads (Parse_Project_And_Apply_Config): new parameter
2280         On_New_Tree_Loaded.
2281         * prj-conf.adb (Parse_Project_And_Apply_Config): new parameter
2282         On_New_Tree_Loaded.
2284 2014-02-06  Bob Duff  <duff@adacore.com>
2286         * gnat_ugn.texi: Implement --insert-blank-lines and
2287         --preserve-blank-lines switches.
2289 2014-02-06  Sergey Rybin  <rybin@adacore.com frybin>
2291         * gnat_ugn.texi, vms_data.ads: Add documentation of -j option for
2292         gnatelim.
2294 2014-02-06  Eric Botcazou  <ebotcazou@adacore.com>
2296         * gnat_rm.texi (Pragma Optimize_Alignment): Document the effect
2297         of the pragma on individual objects.
2299 2014-02-06  Hristian Kirtchev  <kirtchev@adacore.com>
2301         * einfo.adb Node29 is now used as BIP_Initialization_Call.
2302         (BIP_Initialization_Call): New routine.
2303         (Set_BIP_Initialization_Call): New routine.
2304         (Write_Field29_Name): Add an entry for constants and variables.
2305         * einfo.ads Add new attribute BIP_Initialization_Call and update
2306         its usage in nodes.
2307         (BIP_Initialization_Call): New routine along with pragma Inline.
2308         (Set_BIP_Initialization_Call): New routine along with pragma Inline.
2309         * exp_ch6.adb (Make_Build_In_Place_Call_In_Object_Declaration):
2310         Add local declaration Res_Decl. Capture the build-in-place
2311         initialization call when the related object declaration has
2312         created a transient block.
2313         * exp_ch7.adb (Process_Transient_Objects): Add local variable
2314         Fin_Insrt. Recognize a scenario where an object declaration acts
2315         as a transient context and is initialized by a build-in-place
2316         function call.
2318 2014-02-06  Pascal Obry  <obry@adacore.com>
2320         * prj-util.adb (For_Interface_Sources): Fix handling of required
2321         bodies for aggregate libs.
2323 2014-02-06  Robert Dewar  <dewar@adacore.com>
2325         * nlists.ads: Minor comment clarifications.
2327 2014-02-06  Robert Dewar  <dewar@adacore.com>
2329         * gnat1drv.adb (Adjust_Global_Switches): Set Modify_Tree_For_C
2330         if gnatd.V set.
2331         * opt.ads (Modify_Tree_For_C): New flag.
2332         * output.ads, output.adb (Last_Char): New function.
2334 2014-02-06  Pascal Obry  <obry@adacore.com>
2336         * projects.texi, prj-env.adb (Initialize_Default_Project_Path): Add
2337         share/gpr for cross-builds.
2339 2014-02-06  Robert Dewar  <dewar@adacore.com>
2341         * exp_util.ads, checks.adb, sem_prag.adb, prj-util.adb, sem_ch13.adb:
2342         Minor reformatting and code clean ups.
2344 2014-02-06  Pascal Obry  <obry@adacore.com>
2346         * prj-util.adb (For_Interface_Sources): Skip non compilable languages.
2347         * prj.ads: Minor typo fix in comment.
2349 2014-02-06  Hristian Kirtchev  <kirtchev@adacore.com>
2351         * sem_prag.adb (Analyze_Depends_In_Decl_Part): Add
2352         local variable Expr. Flag clauses with extra parenthesis as this
2353         is not allowed by the syntax of the pragma. Code reformatting.
2355 2014-02-06  Hristian Kirtchev  <kirtchev@adacore.com>
2357         * exp_attr.adb (Expand_N_Attribute_Reference): Alphabetize
2358         variables. Rename variabme Tnn to Temp. Do not create a temporary
2359         if assertions are disabled. Find enclosing routine _Postconditions
2360         and insert the temporary that captures the value of the prefix
2361         before the routine.
2362         * exp_ch6.adb (Build_Postconditions_Procedure):
2363         Insert the generated _Postconditions routine
2364         before the first source declaration of the related
2365         subprogram.
2366         (Insert_After_Last_Declaration): Removed.
2367         (Insert_Before_First_Source_Declaration): New routine.
2369 2014-02-06  Ed Schonberg  <schonberg@adacore.com>
2371         * exp_util.adb, exp_util.ads (Within_Internal_Subprogram):
2372         Utility to determine whether current expansion is for the body
2373         of a predefined primitive operation.
2374         (Make_Predicate_Check): Use Within_Internal_Subpgram
2375         * checks.adb (Apply_Predicate_Check): Use
2376         Within_Internal_Subprogram
2377         * sem_ch13.adb (Freeze_Entity_Checks): Ditto.
2379 2014-02-06  Pascal Obry  <obry@adacore.com>
2381         * prj.ads, prj-util.adb: Minor reformatting.
2383 2014-02-06  Ed Schonberg  <schonberg@adacore.com>
2385         * exp_ch6.adb (Expand_Subprogram_Contract, Append_Enabled_Item):
2386         Take into account the Split_PPC flag to ensure that conjuncts
2387         in a composite postcondition aspect are tested in source order.
2389 2014-02-06  Hristian Kirtchev  <kirtchev@adacore.com>
2391         * sem_ch6.adb (Analyze_Generic_Subprogram_Body): Flag illegal
2392         use of SPARK_Mode.
2393         * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration): Flag
2394         illegal use of SPARK_Mode.
2395         (Instantiate_Subprogram_Body): Flag illegal use of SPARK_Mode.
2396         * sem_prag.adb (Analyze_Pragma): Code reformatting.
2397         * sem_util.adb Add with and use clause for Aspects.
2398         (Check_SPARK_Mode_In_Generic): New routine.
2399         * sem_util.ads (Check_SPARK_Mode_In_Generic): New routine.
2401 2014-02-06  Thomas Quinot  <quinot@adacore.com>
2403         * a-calend.adb (Formatting_Operations.Split): Ensure that
2404         Time_Error is raised for invalid time values.
2406 2014-02-06  Arnaud Charlet  <charlet@adacore.com>
2408         * sem_prag.adb (Analyze_Pragma): Rewrite as a null statement
2409         in GNATprove_Mode.
2411 2014-02-06  Robert Dewar  <dewar@adacore.com>
2413         * einfo.ads, einfo.adb (Is_Discriminant_Check_Function): New flag.
2414         * exp_ch3.adb (Build_Dcheck_Function): Set
2415         Is_Discriminant_Check_Function.
2417 2014-02-06  Hristian Kirtchev  <kirtchev@adacore.com>
2419         * exp_ch7.adb (Is_Subprogram_Call): Inspect
2420         the original tree in certain cases where a construct has been
2421         factored out and replaced by a reference to a temporary.
2423 2014-02-06  Ed Schonberg  <schonberg@adacore.com>
2425         * sem_ch3.adb (Process_Full_View): Fix typo in the order of
2426         parameters when propagating predicate function to full view.
2427         (Find_Type_Of_Object): Freeze base type of object type to catch
2428         premature use of discriminated private type without a full view.
2430 2014-02-06  Robert Dewar  <dewar@adacore.com>
2432         * sprint.adb: Minor reformatting.
2434 2014-02-06  Hristian Kirtchev  <kirtchev@adacore.com>
2436         * exp_ch4.adb (Process_Transient_Object): Add local variable
2437         Temp_Ins. When the transient object is initialized by an
2438         aggregate, the hook must capture the object after the last
2439         component assignment takes place.
2440         * exp_ch7.adb (Detect_Subprogram_Call): Expose the subprogram to
2441         routine Is_Subprogram_Call.
2442         (Is_Subprogram_Call): Inspect an
2443         aggregate that has been heavily expanded for subprogram calls.
2444         (Process_Transient_Objects): Add local variables Expr, Ptr_Id
2445         and Temp_Ins.  Remove the nested declare block and adjust the
2446         indentation. When the transient object is initialized by an
2447         aggregate, the hook must capture the object after the last
2448         component assignment takes place.
2450 2014-02-06  Hristian Kirtchev  <kirtchev@adacore.com>
2452         * sem_prag.adb (Analyze_Global_Item): Detect illegal uses of
2453         external states with enabled properties that do not match the
2454         global mode.
2455         (Property_Error): New routine.
2456         * sem_res.adb (Property_Error): New routine.
2457         (Resolve_Actuals): Detect illegal uses of external variables with
2458         enabled properties in procedure calls that do not match the mode of
2459         the corresponding formal parameter.
2461 2014-02-06  Hristian Kirtchev  <kirtchev@adacore.com>
2463         * sem_util.adb (Has_Enabled_Property): Rename
2464         formal parameter Prop_Nam to Property. Update the comment on usage
2465         and all occurrences in the body. Add local variable Prop_Nam. When
2466         inspecting a property with an expression, the property name
2467         appears as the first choice of the component association.
2469 2014-02-04  Robert Dewar  <dewar@adacore.com>
2471         * exp_ch5.adb, einfo.ads, freeze.adb, sem_ch8.adb: Minor reformatting.
2473 2014-02-04  Gary Dismukes  <dismukes@adacore.com>
2475         * sem_aggr.adb: Change "runtime" to "run time" in warning message,
2476         for consistency with other messages.
2478 2014-02-04  Ed Schonberg  <schonberg@adacore.com>
2480         * exp_ch5.adb  (Expand_Iterator_Loop):  For a container element
2481         iterator, indicate that the element is a constant if the container
2482         type does not have a variable indexing aspect.
2483         * sem_ch8.adb (Analyze_Object_Renaming): If the entity is already
2484         marked as constant, do not reset its Ekind, to ensure that
2485         container elements in an element loop are not modified if the
2486         container (e.g. a hashed set) only has a constant indexing aspect.
2488 2014-02-04  Arnaud Charlet  <charlet@adacore.com>
2490         * g-souinf.ads: Subprograms in this unit are actually not pure.
2491         * freeze.adb (Freeze_Subprogram): Do not reset Is_Pure for Intrinsics.
2492         * einfo.ads (Is_Pure): Update doc to match implementation.
2494 2014-02-04  Gary Dismukes  <dismukes@adacore.com>
2496         * exp_ch13.adb: Minor spelling fix.
2498 2014-02-04  Robert Dewar  <dewar@adacore.com>
2500         * opt.ads: Minor comment update.
2502 2014-02-04  Robert Dewar  <dewar@adacore.com>
2504         * exp_ch4.adb (Expand_N_Expression_With_Actions): Use Rewrite
2505         instead of Replace.
2507 2014-02-04  Ed Schonberg  <schonberg@adacore.com>
2509         * sem_aggr.adb (Resolve_Array_Aggregate): Suppress warnings
2510         on null expressions if component type is non-null, when the
2511         corresponding association covers an empty range of index values.
2513 2014-02-04  Robert Dewar  <dewar@adacore.com>
2515         * sinfo.ads: Further comments on N_Expression_With_Actions node.
2517 2014-02-04  Hristian Kirtchev  <kirtchev@adacore.com>
2519         * sem_prag.adb (Analyze_Refined_Depends_In_Decl_Part): Remove global
2520         variables Out_Items and Ref_Global. Remove local constant
2521         Body_Id along with dummy variables D1, D2, D3, D4, D5, D6, D7
2522         and D8. Remove the useless collection of global items as this
2523         was a leftover from an earlier version of the routine. Move
2524         several routines out to avoid deep nesting and indentation.
2525         (Inputs_Match): Add formal parameter Dep_Clause. Rename formal
2526         parameter Do_Checks to Post_Errors. Update the comment on usage.
2527         (Is_Matching_Input): Renamed to Input_Match. Add formal parameters
2528         Ref_Inputs and Do_Checks. Rename formal parameter Do_Checks
2529         to Post_Errors. Update the comment on usage. Account for the
2530         case where a self referential state may have a null input_list.
2531         (Is_Self_Referential): New routine.
2533 2014-02-04  Ed Schonberg  <schonberg@adacore.com>
2535         * sem_ch13.adb (Analyze_Attribute_Definition_Clause): If the
2536         entity renames an expression, as in the case of an object of
2537         an unconstrained type initialized by a function call, defer the
2538         rewriting of the expression to the expander.
2539         * exp_ch13.adb (Expand_N_Attribute_Definition_Clause, case
2540         'Alignment): If the entity renames an expression, introduce
2541         temporary to capture value, and rewrite original declaration to
2542         use temporary.
2544 2014-02-04  Gary Dismukes  <dismukes@adacore.com>
2546         * g-comlin.adb: Minor typo fix.
2548 2014-02-04  Ed Schonberg  <schonberg@adacore.com>
2550         * freeze.adb (Freeze_All): Types derived from a formal
2551         access_to_classwide type do not have a finalization master.
2553 2014-02-04  Robert Dewar  <dewar@adacore.com>
2555         * sprint.adb: Minor reformatting.
2557 2014-02-04  Robert Dewar  <dewar@adacore.com>
2559         * exp_ch4.adb (Expand_N_Expression_With_Actions): Eliminate
2560         cases where Actions is a null list.
2561         * sinfo.ads (N_Expression_With_Actions): Actions can be
2562         temporarily empty during semantic analysis, but must be non-empty
2563         in the final expanded tree.
2565 2014-01-31  Robert Dewar  <dewar@adacore.com>
2567         * exp_ch9.adb: Minor reformatting.
2569 2014-01-31  Emmanuel Briot  <briot@adacore.com>
2571         * g-comlin.adb (Set_Command_Line): Take the switches
2572         configuration from the Command_Line_Config.
2574 2014-01-31  Hristian Kirtchev  <kirtchev@adacore.com>
2576         * sem_prag.adb (Analyze_Refinement_Clause): Guard against a malformed
2577         refinement clause.
2579 2014-01-31  Vincent Celier  <celier@adacore.com>
2581         * projects.texi: Add more documentation about others used as an
2582         index in indexed attributes.
2584 2014-01-31  Robert Dewar  <dewar@adacore.com>
2586         * gnat_ugn.texi: Minor update.
2587         * gnat_rm.texi: Add example to Restriction_Warnings documentation.
2588         * exp_util.adb: Minor reformatting.
2590 2014-01-31  Ed Schonberg  <schonberg@adacore.com>
2592         * exp_ch9.adb (Expand_Entry_Barrier): Warn if the barrier
2593         depends on data that is not private to the protected object,
2594         and potentially modifiable in unsynchronized fashion.
2596 2014-01-31  Yannick Moy  <moy@adacore.com>
2598         * erroutc.adb (Validate_Specific_Warnings): Remove special case for
2599         GNATprove_Mode.
2601 2014-01-31  Robert Dewar  <dewar@adacore.com>
2603         * prj-attr.ads (First_Attribute_Of): Returns Empty_Attribute
2604         for Unknown_Package.
2605         * sem_ch6.adb, sem_attr.adb: Minor comment addition.
2607 2014-01-31  Hristian Kirtchev  <kirtchev@adacore.com>
2609         * exp_util.adb (Build_Allocate_Deallocate_Proc): Rewrite
2610         the logic that generates a runtime check to determine the
2611         controlled status of the object about to be allocated or
2612         deallocated. Class-wide types now always use a runtime check
2613         even if they appear as generic actuals.
2614         (Find_Object): Detect
2615         a special case that involves interface class-wide types because
2616         the object appears as a complex expression.
2618 2014-01-31  Ed Schonberg  <schonberg@adacore.com>
2620         * sem_ch6.adb (Process_Formals): In Ada2012 mode, place
2621         subprogram with an incomplete untagged formals on the list of
2622         private dependents, to verify that the type is properly completed
2623         in the private part.
2624         * sem_attr.adb: Code clean up.
2626 2014-01-31  Robert Dewar  <dewar@adacore.com>
2628         * exp_ch6.adb: Minor reformatting.
2630 2014-01-31  Vincent Celier  <celier@adacore.com>
2632         * prj-attr.adb (First_Attribute_Of): Return Unknown_Attribute
2633         when Pkg is unknown.
2635 2014-01-31  Hristian Kirtchev  <kirtchev@adacore.com>
2637         * sem_res.adb (Resolve_Entity_Name): Comment
2638         reformatting. Allow volatile objects in various generated checks.
2640 2014-01-31  Ed Schonberg  <schonberg@adacore.com>
2642         * sem_attr.adb (Analyze_Attribute, case 'Update): For a record
2643         component association, set the etype of the identifier, for
2644         SPARK use.
2646 2014-01-31  Ed Schonberg  <schonberg@adacore.com>
2648         * exp_ch6.adb (Has_Visibility_Of_Subprogram): If type is not
2649         declared in a package, not checks can apply to the subprogram.
2651 2014-01-31  Robert Dewar  <dewar@adacore.com>
2653         * erroutc.adb (Validate_Specific_Warnings): Warnings are
2654         controlled -gnatw.W.
2655         * gnat_ugn.texi: Document new warnings controlled by -gnatw.w.
2656         * opt.ads (Warn_On_Warnings_Off): Now controls more cases.
2658 2014-01-31  Arnaud Charlet  <charlet@adacore.com>
2660         * exp_disp.adb: Update comments.
2662 2014-01-31  Yannick Moy  <moy@adacore.com>
2664         * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration,
2665         Save_Global_References): Guard access to expression in aspect.
2667 2014-01-31  Yannick Moy  <moy@adacore.com>
2669         * sem_prag.adb (Analyze_Pragma/Pragma_SPARK_Mode):
2670         Issue an error when the pragma is applied to a generic unit,
2671         a generic declaration, or inside a generic.
2673 2014-01-31  Yannick Moy  <moy@adacore.com>
2675         * sem_ch8.adb (Analyze_Subprogram_Renaming): Set SPARK_Mode on renaming
2676         entity.
2678 2014-01-31  Robert Dewar  <dewar@adacore.com>
2680         * exp_ch9.adb, s-tassta.adb, s-tposen.adb, s-tposen.ads: Minor
2681         reformatting.
2683 2014-01-31  Tristan Gingold  <gingold@adacore.com>
2685         * exp_disp.adb: Add a historic note.
2687 2014-01-31  Robert Dewar  <dewar@adacore.com>
2689         * sem_warn.adb (Warn_On_Useless_Assignments): Add call to
2690         Process_Deferred_References.
2692 2014-01-31  Yannick Moy  <moy@adacore.com>
2694         * erroutc.adb (Validate_Specific_Warnings): Do not issue a message for
2695         ineffective pragma Warnings(Off) in GNATprove_Mode.
2697 2014-01-31  Bob Duff  <duff@adacore.com>
2699         * s-taskin.ads: Minor comment fix.
2700         * s-tassta.adb (Abort_Dependents): Don't abort all dependents;
2701         just direct dependents. If this is actually an abort, each task
2702         will take care of aborting its dependents, so all dependents will
2703         get aborted, as before. However, when this is called the second
2704         time from Vulnerable_Complete_Master "for convenience" (i.e. to
2705         kill off tasks waiting at terminate alternatives), aborting
2706         indirect dependents is wrong, because it causes some unrelated
2707         tasks to get aborted.
2709 2014-01-31  Robert Dewar  <dewar@adacore.com>
2711         * sem_ch4.adb: Minor reformatting.
2713 2014-01-31  Robert Dewar  <dewar@adacore.com>
2715         * exp_ch2.adb: New calling sequence for Is_LHS.
2716         * frontend.adb: Add call to Process_Deferred_References.
2717         * lib-xref.ads, lib-xref.adb (Process_Deferred_References): New.
2718         (Deferred_References): New table.
2719         * sem_ch8.adb (Find_Direct_Name): Make deferred reference table
2720         entries.
2721         (Find_Expanded_Name): Ditto.
2722         * sem_res.adb: New calling sequence for Is_LHS.
2723         * sem_util.ads, sem_util.adb (Is_LHS): New calling sequence.
2724         * sem_warn.adb: Call Process_Deferred_References before issuing
2725         warnings.
2727 2014-01-31  Tristan Gingold  <gingold@adacore.com>
2729         * exp_util.adb (Corresponding_Runtime_Package): Restrict the
2730         use of System_Tasking_Protected_Objects_Single_Entry.
2731         * exp_ch9.adb (Build_Simple_Entry_Call): Remove Mode parameter
2732         of Protected_Single_Entry_Call.
2733         (Expand_N_Timed_Entry_Call): Remove single_entry case.
2734         * exp_disp.adb (Make_Disp_Asynchronous_Select_Body): Remove
2735         single_entry case.
2736         (Make_Disp_Timed_Select_Body): Likewise.
2737         * rtsfind.ads (RE_Timed_Protected_Single_Entry_Call): Remove.
2738         * s-tposen.adb (Send_Program_Error, PO_Do_Or_Queue): Remove
2739         Self_Id parameter.
2740         (Wakeup_Entry_Caller): Remove Self_ID and New_State parameters.
2741         (Wait_For_Completion_With_Timeout): Remove.
2742         (Protected_Single_Entry_Call): Remove Mode parameter
2743         (always Simple_Call).
2744         (Service_Entry): Remove Self_Id constant (not used anymore).
2745         (Timed_Protected_Single_Entry_Call): Remove.
2746         * s-tposen.ads (Timed_Protected_Single_Entry_Call): Remove.
2747         (Protected_Single_Entry_Call): Remove Mode parameter.
2749 2014-01-29  Hristian Kirtchev  <kirtchev@adacore.com>
2751         * einfo.adb (Get_Pragma): Handle the retrieval of pragma Refined_Post.
2752         * einfo.ads (Get_Pragma): Update the comment on special pragmas
2753         handled by this routine.
2754         * sem_prag.adb (Analyze_Pragma): Add a legal pragma Refined_Post
2755         to the contract of the related subprogram body.
2756         * sem_util.adb (Add_Contract_Item): Handle the insertion of
2757         pragma Refined_Post into the contract of a subprogram body.
2758         * sinfo.ads Update the documentation of node N_Contract.
2759         * sem_res.adb (Resolve_Entity_Name): Add a guard
2760         to detect abstract states and variables only when checking the
2761         SPARK 2014 rules concerning volatile object placement.
2763 2014-01-29  Ed Schonberg  <schonberg@adacore.com>
2765         * sem_ch4.adb (Find_Equality_Types, Try_One_Interp): within an instance,
2766         null is compatible with any access type.
2768 2014-01-29  Hristian Kirtchev  <kirtchev@adacore.com>
2770         * sem_util.adb (Find_Placement_In_State_Space): Assume that the default
2771         placement is not in a package.
2773 2014-01-29  Hristian Kirtchev  <kirtchev@adacore.com>
2775         * sem_util.adb (Has_Enabled_Property): Compare the character field of
2776         the sole property.
2778 2014-01-29  Robert Dewar  <dewar@adacore.com>
2780         * sem_intr.adb, a-ztexio.ads, sinfo.ads, sem_res.adb, gnatlink.adb,
2781         vms_conv.adb, a-except.ads, a-except-2005.ads, a-teioed.adb,
2782         sem_warn.ads, treepr.ads, erroutc.ads, a-excach.adb: Minor reformatting.
2784 2014-01-29  Robert Dewar  <dewar@adacore.com>
2786         * sem_util.ads, sem_util.adb (In_Pragma_Expression): New function.
2787         * sem_warn.adb (Check_References): Suppress warnings if inside
2788         Initial_Condition pragma.
2790 2014-01-29  Hristian Kirtchev  <kirtchev@adacore.com>
2792         * sem_prag.adb (Check_Missing_Part_Of): List all values of
2793         State_Space_Kind for readability reasons. Do not emit an error on
2794         a private item when the enclosing package lacks aspect/pragma
2795         Abstract_State. Do not emit an error on a private package
2796         instantiation when the corresponding generic template lacks
2797         visible state.
2798         (Has_Visible_State): New routine.
2799         * sem_util.adb (Find_Placement_In_State_Space): The visible
2800         declarations of any kind of child units in general act as proper
2801         placement location.
2803 2014-01-29  Robert Dewar  <dewar@adacore.com>
2805         * a-except-2005.adb, a-except.adb, a-excpol-abort.adb, a-exstat.adb,
2806         ali.adb, a-numaux.ads, a-numaux-darwin.ads, a-numaux-libc-x86.ads,
2807         a-numaux-vms.ads, a-numaux-vxworks.ads, a-numaux-x86.ads, aspects.ads,
2808         a-taside.adb, a-teioed.adb, a-textio.adb, a-textio.ads, atree.adb,
2809         atree.ads, a-witeio.adb, a-witeio.ads, a-wtedit.adb, a-ztedit.adb,
2810         a-ztexio.adb, bcheck.adb, binde.adb, checks.adb, comperr.adb,
2811         cstand.adb, debug_a.adb, einfo.ads, errout.adb, erroutc.adb,
2812         eval_fat.adb, exp_aggr.adb, exp_attr.adb, exp_ch11.adb, exp_ch3.adb,
2813         exp_ch4.adb, exp_ch5.adb, exp_ch6.adb, exp_ch9.adb, exp_dbug.adb,
2814         exp_disp.adb, exp_fixd.adb, exp_imgv.adb, exp_intr.adb, exp_util.adb,
2815         freeze.adb, frontend.adb, g-comlin.ads, g-mbdira.adb, gnat1drv.adb,
2816         gprep.adb, g-spipat.adb, i-cpp.ads, i-vxwork.ads, i-vxwork-x86.ads,
2817         krunch.ads, layout.adb, lib-load.adb, lib-writ.adb, lib-writ.ads,
2818         live.adb, namet.ads, osint.adb, osint-c.adb, output.ads, par.adb,
2819         par-ch10.adb, par-ch13.adb, par-ch3.adb, par-ch4.adb, par-ch5.adb,
2820         par-ch6.adb, par-ch9.adb, par-endh.adb, par-labl.adb, par-prag.adb,
2821         par-sync.adb, par-tchk.adb, par-util.adb, prj.adb, repinfo.adb,
2822         rtsfind.adb, s-arit64.adb, s-asthan-vms-alpha.adb,
2823         s-asthan-vms-ia64.adb, s-bignum.adb, scans.adb, scng.adb, s-dimmks.ads,
2824         sem_aggr.adb, sem_attr.adb, sem_aux.adb, sem_cat.adb, sem_ch10.adb,
2825         sem_ch12.adb, sem_ch13.adb, sem_ch13.ads, sem_ch3.adb, sem_ch4.adb,
2826         sem_ch5.adb, sem_ch6.adb, sem_ch8.adb, sem_disp.adb, sem_elab.adb,
2827         sem_elim.adb, sem_eval.adb, sem_intr.adb, sem_prag.adb, sem_res.adb,
2828         sem_type.adb, sem_util.adb, sem_warn.adb, set_targ.adb, s-fatgen.adb,
2829         s-fatgen.ads, s-fileio.adb, s-imgcha.adb, s-imgrea.adb, sinfo.ads,
2830         sinput-c.adb, snames.ads-tmpl, s-os_lib.adb, sprint.adb,
2831         s-regpat.adb, s-secsta.adb, s-stalib.ads,
2832         s-stchop.adb, s-stoele.ads, stand.ads, s-taprop-solaris.adb,
2833         s-tasdeb-vms.adb, s-tasini.adb, s-tassta.adb, s-valdec.adb,
2834         s-valuti.adb, s-wchjis.adb, s-wchwts.adb, system.ads, system-vms_64.ads,
2835         system-vms-ia64.ads, treepr.adb, types.ads, uintp.adb, uname.adb,
2836         urealp.adb, usage.adb, vxaddr2line.adb: Minor reformatting.
2838 2014-01-29  Robert Dewar  <dewar@adacore.com>
2840         * expander.adb: Minor reformatting.
2842 2014-01-29  Javier Miranda  <miranda@adacore.com>
2844         * exp_ch3.adb (Predefined_Primitive_Bodies): Adding documentation to
2845         previous patch.
2847 2014-01-29  Javier Miranda  <miranda@adacore.com>
2849         * exp_ch3.adb (Predefined_Primitive_Bodies): Complete the code
2850         that checks if an interface types defines the predefined "="
2851         function because the compiler was erroneously not generating the
2852         predefined "=" primitive as soon as the name of some interface
2853         primitive is "=" (formals were not checked).
2855 2014-01-29  Ed Schonberg  <schonberg@adacore.com>
2857         * expander.adb (Expander): In GNATprove mode, do not process
2858         transient scopes: they are in general not created in this mode,
2859         and an attempt to examine them will lead to constraint errors when
2860         processing configuration pragmas that have analyzable expressions.
2862 2014-01-29  Vincent Celier  <celier@adacore.com>
2864         * clean.adb (Gnatclean): Fail if main project is an aggregate
2865         project or if there is an aggregate library project in the
2866         project tree.
2867         * gnatcmd.adb: Fail if the main project is an aggregate project
2868         or if there is an aggegate library project in the project tree.
2869         * make.adb (Initialize): : Fail if main project is an aggregate
2870         project or if there is an aggregate library project in the
2871         project tree.
2872         * makeutl.ads (Aggregate_Libraries_In): New Boolean function.
2873         * prj-makr.adb (Initialize): Fail if the main project is an
2874         aggregate project or an aggregate library project.
2876 2014-01-29  Vincent Celier  <celier@adacore.com>
2878         * prj-part.adb (Check_Import_Aggregate): New procedure
2879         to check if an imported project is an aggregate project.
2880         (Parse_Single_Project): Call Check_Import_Aggregate
2881         * projects.texi: Document that aggregate projects cannot be
2882         extended or imported.
2884 2014-01-29  Robert Dewar  <dewar@adacore.com>
2886         * exp_ch9.adb, sem_ch7.ads, s-regexp.adb, sem_ch13.adb: Minor
2887         reformatting and code clean up.
2888         * gnat_ugn.texi: Add documentation section on Atomic Variables
2889         and Optimization.
2891 2014-01-29  Hristian Kirtchev  <kirtchev@adacore.com>
2893         * einfo.adb Flag264 is now unused.
2894         (Has_Body_References): Removed.
2895         (Set_Has_Body_References): Removed.
2896         (Write_Entity_Flags): Remove the output for flag Has_Body_References.
2897         * einfo.ads Update the comment on usage of attribute
2898         Body_References. Remove attribute Has_Body_References and its
2899         usage in nodes.
2900         (Has_Body_References): Removed along with pragma Inline.
2901         (Set_Has_Body_References): Removed along with pragma Inline.
2902         * sem_prag.adb (Analyze_Global_Item): Move the call to
2903         Record_Possible_Body_Reference in the state related checks
2904         section. Add a comment intended function.
2905         (Analyze_Input_Output): Move the call to Record_Possible_Body_Reference
2906         in the state related checks section. Add a comment intended function.
2907         (Analyze_Refinement_Clause): Cleanup the illegal body reference
2908         reporting. Add a comment on timing of error reporting.
2909         (Record_Possible_Body_Reference): Reimplement the routine.
2911 2014-01-29  Vincent Celier  <celier@adacore.com>
2913         * makeutl.adb (Mains.Find_File_Add_Extension): Only look for specs for
2914         unit-based languages.
2915         (Mains.Complete_Mains.Do_Complete): Use the source file project
2916         tree when calling Find_File_Add_Extension. Use the correct
2917         project name when reporting an error.
2919 2014-01-29  Hristian Kirtchev  <kirtchev@adacore.com>
2921         * aspects.adb Add an entry for aspect Part_Of in table
2922         Canonical_Aspect.
2923         * aspects.ads Add an entry for aspect Part_Of in tables Aspect_Id,
2924         Aspect_Argument, Aspect_Names and Aspect_Delay.
2925         * atree.h Define Elist9.
2926         * atree.adb (Elist9): New routine.
2927         (Set_Elist9): New routine.
2928         * atree.ads (Elist9): New routine.
2929         (Set_Elist9): New routine.
2930         * einfo.adb Add Part_Of_Constituents and Encapsulating_State to
2931         the list of node usage.  Remove Refined_State from the list of
2932         node usage.
2933         (Encapsulating_State): New routine.
2934         (Get_Pragma):
2935         Handle pragma Part_Of; (Part_Of_Constituents): New routine.
2936         (Refined_State): Removed.
2937         (Set_Encapsulating_State): New routine.
2938         (Set_Part_Of_Constituents): New routine.
2939         (Set_Refined_State): Removed.
2940         (Write_Field9_Name): Add an entry
2941         for Part_Of_Constituents (Write_Field10_Name): Add an entry for
2942         Encapsulating_State. Remove the entry for Refined_State.
2943         * einfo.ads Add new attributes Encapsulating_State
2944         and Part_Of_Constituents alond with their usage in
2945         entities. Remove attribute Refined_State along with its
2946         usage in entities.
2947         (Encapsulating_State): New routine and
2948         pragma Inline.  (Get_Pragma): Update the comment on usage.
2949         (Part_Of_Constituents): New routine and pragma Inline.
2950         (Refined_State): Removed along with pragma Inline.
2951         (Set_Encapsulating_State): New routine and pragma Inline.
2952         (Set_Part_Of_Constituents): New routine and pragma Inline.
2953         (Set_Refined_State): Removed along with pragma Inline.
2954         * par-prag.adb Pragma Part_Of does not need any special processing
2955         by the parser.
2956         * sem_ch3.adb (Analyze_Declarations): Remove local variables
2957         Body_Id and Prag. Call separate routines to analyze the
2958         contract of a package [body].
2959         (Analyze_Object_Contract):
2960         Update the comment on usage. Remove local variables
2961         Items and Nam. Use Get_Pragma rather than traversing the
2962         classification list.  Verify whether the lack of indicator
2963         Part_Of agrees with the placement of the variable in state space.
2964         (Analyze_Object_Declaration): Initialize the encapsulating state
2965         of a variable.  (Requires_State_Refinement): Moved to sem_util.
2966         * sem_ch7.adb (Analyze_Package_Body_Contract): New routine.
2967         (Analyze_Package_Contract): New routine.
2968         * sem_ch7.ads (Analyze_Package_Body_Contract): New routine.
2969         (Analyze_Package_Contract): New routine.
2970         * sem_ch10.adb (Decorate_State): Initialize the encapsulating
2971         state and Part_Of constituents.
2972         * sem_ch13.adb (Analyze_Aspect_Specifications):
2973         Add processing for aspect Part_Of. Update all
2974         calls to Decorate_Delayed_Aspect_And_Pragma.
2975         (Check_Aspect_At_Freeze_Point): Aspect Part_Of does
2976         not need any special processing at freeze time.
2977         (Decorate_Delayed_Aspect_And_Pragma): Renamed to
2978         Decorate_Aspect_And_Pragma.  Add formal parameter Delayed and
2979         update the associated comment.
2980         * sem_prag.adb Add an entry for pragma Part_Of in table Sig_Flags.
2981         (Analyze_Abstract_State): Add new global variable State_Id. Remove
2982         local constants Errors and Loc. Remove local variables Is_Null
2983         and State_Nam. Create the entity of the abstract state on the
2984         spot, before all remaining checks are performed. Verify that a
2985         missing Part_Of option agrees with the placement of the abstract
2986         state within the state space.
2987         (Analyze_Depends_In_Decl_Part):
2988         Add new global variables Constits_Seen and States_Seen. Check
2989         that a state and a corresponding constituent do not appear
2990         in pragma [Refined_]Depends.
2991         (Analyze_Global_In_Decl_Part):
2992         Add new global variables Constits_Seen and States_Seen. Check
2993         that a state and a corresponding constituent do not appear
2994         in pragma [Refined_]Global.
2995         (Analyze_Global_Item):
2996         Remove the now obsolete code that deals with Part_Of.
2997         Add the entity of the global item to the list of processed
2998         items.  (Analyze_Initializes_In_Decl_Part): Add new global
2999         variables Constits_Seen and States_Seen. Check that a state
3000         and a corresponding constituent do not appear in pragma
3001         Initializes.
3002         (Analyze_Initialization_Item): Add the entity
3003         of the initialization item to the list of processed items.
3004         (Analyze_Input_Item): Add the entity of the initialization
3005         item to the list of processed items.
3006         (Analyze_Input_Output):
3007         Remove the now obsolete code that deals with Part_Of.  Add the
3008         entity of the input/output to the list of processed items.
3009         (Analyze_Part_Of): New routine.
3010         (Analyze_Part_Of_Option): Remove
3011         local constant Par_State. Add local constant Encaps and local
3012         variables Encaps_Id and Legal. Use Analyze_Part of to analyze
3013         the option. Turn the related state into a Part_Of constituent
3014         if the option is legal.
3015         (Analyze_Pragma): Add processing
3016         for pragma Part_Of.
3017         (Analyze_Refined_State_In_Decl_Part):
3018         Remove global constants Pack_Body and Spec_Id. Remove
3019         global variables Abstr_States and Hidden_States. Add new
3020         global variables Available_States, Body_Id, Body_States and
3021         Spec_Id. Add new local constant Body_Decl. Reimplement the
3022         logic that extracts the states available for refinement from
3023         the related package and the body hidden states of the said
3024         package.
3025         (Analyze_Refinement_Clause): Add local variable Part_Of_Constits.
3026         (Check_Applicable_Policy): Alphabetize body.
3027         (Check_Dependency_Clause): Replace Refined_State
3028         with Encapsulating_State.
3029         (Check_Matching_Constituent):
3030         Reimplement the logic that determines whether an item is a valid
3031         / invalid constituent of the current refined state. Return when
3032         a construct does not denote a valid abstract state. Extract the
3033         list of Part_Of constituents for further analysis. Check that all
3034         Part_Of constituents of a state have been used in its refinement.
3035         (Check_Matching_State): Update the comment on usage. Operate
3036         on the list of available states.
3037         (Check_Missing_Part_Of): New routine.
3038         (Check_Refined_Global_Item): Replace Refined_State
3039         with Encapsulating_State.
3040         (Check_State_And_Constituent_Use): New routine.
3041         (Create_Abstract_State): New routine.
3042         (Is_Matching_Input): Replace Refined_State with Encapsulating_State.
3043         (Is_Part_Of): Removed.
3044         (Collect_Body_States): New routine.
3045         (Collect_Constituent): Replace Refined_State with Encapsulating_State.
3046         (Collect_Hidden_States): Removed.
3047         (Report_Unrefined_States): Change the profile of the procedure along
3048         with the comment on usage.
3049         (Report_Unused_Constituents): New routine.
3050         (Report_Unused_Hidden_States): Removed.
3051         (Report_Unused_States): New routine.
3052         * sem_prag.ads (Check_Missing_Part_Of): New routine.
3053         * sem_util.adb (Add_Contract_Item): Pragma Part_Of can now
3054         appear in the classification pragmas of a package instantiation
3055         or a variable.
3056         (Find_Placement_In_State_Space): New routine.
3057         (Is_Child): Removed.
3058         (Is_Child_Or_Sibling): Remove formal
3059         parameter Private_Child. Remove the private child checks.
3060         (Requires_State_Refinement): Moved from sem_ch3.
3061         * sem_util.ads Add new type State_Space_Kind along with
3062         comment on its usage and values.
3063         (Add_Contract_Item): Update the comment on usage.
3064         (Find_Body_Discriminal): Alphabetize spec.
3065         (Find_Placement_In_State_Space): New routine.
3066         (Is_Child_Or_Sibling): Remove formal parameter Private_Child
3067         and update the comment on usage.
3068         (Requires_State_Refinement): Moved from sem_ch3.
3069         * sinfo.ads: Update the documentation of N_Contract.
3070         * snames.ads-tmpl The predefined name for Part_Of is now used
3071         to denote a pragma. Add Pragma_Id for Part_Of.
3073 2014-01-29  Emmanuel Briot  <briot@adacore.com>
3075         * s-regexp.adb (Create_Secondary_Table): Automatically grow the state
3076         machine as needed.
3077         (Dump): New subprogram.
3079 2014-01-29  Tristan Gingold  <gingold@adacore.com>
3081         * exp_ch9.adb (Expand_N_Protected_Type_Declaration): Add
3082         Expand_Entry_Declaration to factorize code.
3084 2014-01-29  Ed Schonberg  <schonberg@adacore.com>
3086         * checks.adb: minor clarification.
3087         * sem_ch7.adb (Declare_Inherited_Private_Subprograms): Limit
3088         search for primitive operations to the entities that immediately
3089         follow the type declaration.
3091 2014-01-29  Tristan Gingold  <gingold@adacore.com>
3093         * exp_ch9.adb (Build_Protected_Entry): Do not call
3094         Complete_Entry_Body anymore.
3095         * rtsfind.ads (RE_Complete_Single_Entry_Body): Remove.
3096         * s-tposen.ads, s-tposen.adb (Complete_Single_Entry_Body): Remove.
3098 2014-01-29  Pierre-Marie Derodat  <derodat@adacore.com>
3100         * s-os_lib.adb, s-os_lib.ads (Normalize_Pathname): Return an empty
3101         string when the Name input bigger than allowed. Adapt the function
3102         specification.
3104 2014-01-29  Ed Schonberg  <schonberg@adacore.com>
3106         * checks.adb (Install_Null_Excluding_Check): Do not emit warning
3107         if expression is within a case_expression of if_expression.
3109 2014-01-29  Robert Dewar  <dewar@adacore.com>
3111         * exp_ch9.adb, inline.ads: Minor reformatting.
3113 2014-01-29  Tristan Gingold  <gingold@adacore.com>
3115         * exp_ch9.adb (Is_Exception_Safe): Return true if no exceptions.
3117 2014-01-29  Yannick Moy  <moy@adacore.com>
3119         * inline.ads (Pending_Body_Info): Add SPARK_Mode and
3120         SPARK_Mode_Pragma components to be able to analyze generic
3121         instance.
3122         * sem_ch12.adb (Analyze_Package_Instantiation,
3123         Inline_Instance_Body, Need_Subprogram_Instance_Body,
3124         Load_Parent_Of_Generic): Pass in SPARK_Mode from instantiation
3125         for future analysis of the instance.
3126         (Instantiate_Package_Body,
3127         Instantiate_Subprogram_Body, Set_Instance_Inv): Set SPARK_Mode
3128         from instantiation to analyze the instance.
3130 2014-01-29  Robert Dewar  <dewar@adacore.com>
3132         * sem_ch7.adb, sem_prag.adb, sem_ch4.adb, sem_ch6.adb: Minor code
3133         reorganization.
3135 2014-01-29  Yannick Moy  <moy@adacore.com>
3137         * gnat_rm.texi: Update description of SPARK_Mode pragma.
3139 2014-01-29  Tristan Gingold  <gingold@adacore.com>
3141         * exp_ch9.adb (Expand_N_Protected_Body): Remove Num_Entries.
3143 2014-01-29  Thomas Quinot  <quinot@adacore.com>
3145         * sem_ch4.adb (Find_Component_In_Instance): Update comment.
3147 2014-01-29  Ed Schonberg  <schonberg@adacore.com>
3149         * exp_util.adb (Build_Task_Image_Prefix): Indicate that the
3150         resulting string is an internal entity. and thus requires no
3151         initialization. This is relevant when Initialize_ Scalars is
3152         enabled, because the resultant spurious initialization may lead to
3153         secondary stack anomalies that produce a mangled name for a task.
3155 2014-01-29  Yannick Moy  <moy@adacore.com>
3157         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): SPARK_Mode
3158         not inherited from spec anymore. Check consistency
3159         rules after processing of declarations.
3160         * sem_ch7.adb (Analyze_Package_Body_Helper): SPARK_Mode not inherited
3161         from spec anymore. Check consistency rules after processing of
3162         declarations.
3163         (Analyze_Package_Declaration): Set SPARK_Mode only for non-generic
3164         packages.
3165         * sem_prag.adb (Analyze_Pragma/Pragma_SPARK_Mode): Implement new
3166         consistency rules.
3168 2014-01-27  Robert Dewar  <dewar@adacore.com>
3170         * sem_res.adb (Resolve_Comparison_Op): Add type name/location
3171         to unordered msg.
3172         (Resolve_Range): Add type name/location to unordered msg.
3174 2014-01-27  Claire Dross  <dross@adacore.com>
3176         * a-cofove.adb/s (Copy): Add precondition so that Copy (Source,
3177         Capacity) is only called with Capacity >= Length (Source) and
3178         Capacity in Capacity_Range.
3179         * a-cfdlli.adb/s, a-cfhase.adb/s, a-cfhama.adb/s, a-cforse.adb/s,
3180         a-cforma.adb/s (Copy): Add precondition so that Copy (Source, Capacity)
3181         is only called with Capacity >= Source.Capacity. Raise Capacity_Error
3182         in the code is this is not the case.
3184 2014-01-27  Thomas Quinot  <quinot@adacore.com>
3186         * sem_ch4.adb (Analyze_Selected_Component): Fix handling of
3187         selected component in an instance where the component of the
3188         actual is not visibile at instantiation.
3190 2014-01-27  Ed Schonberg  <schonberg@adacore.com>
3192         * sem_ch6.adb: sem_ch6.adb (Set_Actual_Subtypes): If the type
3193         has a dynamic predicate, generate freeze node for Actual_Subtype
3194         at once, because the declaration of the corresponding predicate
3195         function will make reference to it.
3197 2014-01-27  Tristan Gingold  <gingold@adacore.com>
3199         * exp_ch7.adb, exp_ch9.adb: Adjust comments.
3201 2014-01-27  Robert Dewar  <dewar@adacore.com>
3203         * exp_ch4.adb (Expand_N_Op_Expon): Remove unsigned type test
3204         for 2**X optimization.
3206 2014-01-27  Ed Schonberg  <schonberg@adacore.com>
3208         * a-suenst.adb: strings.utf_encoding.strings (Decode): Check
3209         explicitly whether value is in range of Character, because the
3210         library is typically compiled with range checks disabled, and
3211         we cannot rely on the implicit check on the argument of 'Val.
3213 2014-01-27  Vincent Celier  <celier@adacore.com>
3215         * a-ciorma.adb, a-cihama.adb (Assign): Copy the Source to the Target,
3216         not the Target to itself.
3218 2014-01-27  Robert Dewar  <dewar@adacore.com>
3220         * vms_conv.ads, ali.adb, sem_ch6.ads, opt.ads, vms_cmds.ads: Minor
3221         changes to avoid incorrect use of unordered enum types.
3223 2014-01-27  Thomas Quinot  <quinot@adacore.com>
3225         * sem_ch4.adb: Minor reformatting.
3227 2014-01-27  Robert Dewar  <dewar@adacore.com>
3229         * scn.adb (Check_End_Of_Line): Removed.
3230         (Error_Long_Line): Removed.
3231         (Determine_License): Use versions of above routines from Scanner.
3232         * scng.adb (Check_End_Of_Line): Moved to spec.
3233         (Error_Long_Line): Removed, no longer used.
3234         * scng.ads (Check_End_Of_Line): Moved here from body.
3236 2014-01-27  Tristan Gingold  <gingold@adacore.com>
3238         * exp_ch7.adb (Build_Cleanup_Statements): Call
3239         Build_Protected_Subprogram_Call_Cleanup to insert the cleanup
3240         for protected body.
3241         * exp_ch9.adb (Build_Protected_Subprogram_Body): Likewise.
3242          Remove Service_Name variable.
3243         (Build_Protected_SUbprogam_Call_Cleanup): New procedure that
3244         factorize code from the above subprograms.
3245         * exp_ch9.ads (Build_Protected_Subprogram_Call_Cleanup): New procedure.
3247 2014-01-27  Hristian Kirtchev  <kirtchev@adacore.com>
3249         * einfo.adb (Has_Option): Reimplemented.
3250         * sem_prag.adb (Analyze_Refinement_Clause): Add global
3251         variables AR_Constit, AW_Constit, ER_Constit, EW_Constit,
3252         External_Constit_Seen and State. Add local variables Body_Ref,
3253         Body_Ref_Elmt and Extra_State. Reimplement part of the logic to
3254         avoid a cumbersome while pool. Verify the legality of an external
3255         state and relevant properties.
3256         (Check_External_Property): New routine.
3257         (Check_Matching_State): Remove parameter profile
3258         and update comment on usage.
3259         (Collect_Constituent): Store the
3260         relevant external property of a constituent.
3261         * sem_util.adb (Async_Readers_Enabled): Update the call to
3262         Has_Enabled_Property.
3263         (Async_Writers_Enabled): Update the call to Has_Enabled_Property.
3264         (Effective_Reads_Enabled): Update the call to Has_Enabled_Property.
3265         (Effective_Writes_Enabled): Update the call to Has_Enabled_Property.
3266         (Has_Enabled_Property): Rename formal parameter Extern to State_Id.
3267         Update comment on usage. Reimplement the logic to recognize the various
3268         formats of properties.
3270 2014-01-27  Ed Schonberg  <schonberg@adacore.com>
3272         * par-ch5.adb: Minor reformatting.
3274 2014-01-27  Tristan Gingold  <gingold@adacore.com>
3276         * s-tposen.ads: Harmonize style and comments.
3278 2014-01-27  Vincent Celier  <celier@adacore.com>
3280         * projects.texi: Document that shared library projects, by
3281         default, cannot import projects that are not shared library
3282         projects.
3284 2014-01-27  Robert Dewar  <dewar@adacore.com>
3286         * sem_ch8.adb (Find_Selected_Component): Use Replace instead
3287         of Rewrite.
3289 2014-01-27  Ed Schonberg  <schonberg@adacore.com>
3291         * a-suenco.adb, a-suenst.adb (Decode): Raise encoding error if
3292         any other exception is raised.
3293         (Convert): If both Input_Scheme and Output_Scheme are UTF_8 it is
3294         still necessary to perform a conversion in order to remove overlong
3295         encodings.
3297 2014-01-27  Robert Dewar  <dewar@adacore.com>
3299         * exp_smem.adb: Minor reformatting.
3301 2014-01-27  Thomas Quinot  <quinot@adacore.com>
3303         * a-calfor.ads: Fix incorrect reference to operator "-" in comment.
3305 2014-01-27  Ed Schonberg  <schonberg@adacore.com>
3307         * sem_res.adb (Make_Call_Into_Operator): In ASIS mode, relocate
3308         nodes for operands to the original node for the call, to preserve
3309         Original_Node pointers within the resolved operands, given that
3310         they may have been rewritten as well. Previous approach copied
3311         the operands into a new tree and lost those pointers.
3313 2014-01-27  Claire Dross  <dross@adacore.com>
3316         * a-cofove.adb, a-cofove.ads: Add Strict_Equal function to the API.
3318 2014-01-27  Ed Schonberg  <schonberg@adacore.com>
3320         * sem_util.adb (Check_Internal_Protected_Use): A call through
3321         an anonymous access parameter of the current protected function
3322         is not a potential modification of the current object.
3324 2014-01-27  Ed Schonberg  <schonberg@adacore.com>
3326         * a-cobove.adb (Reserve_Capacity): Procedure raises
3327         Capacity_Error, not Constraint_Error, when request cannot be
3328         satisfied.
3330 2014-01-27  Vincent Celier  <celier@adacore.com>
3332         * a-coorma.adb, a-cohama.adb (Assign): Copy the Source to the Target,
3333         not the Target to itself.
3335 2014-01-27  Ed Schonberg  <schonberg@adacore.com>
3337         * exp_ch4.adb (Expand_Concatenate): If the target of the
3338         concatenation is a library-level entity, always use the off-line
3339         version of concatenation, regardless of optimization level. This
3340         is space-efficient, and prevents linking problems when some
3341         units are compiled with different optimization levels.
3343 2014-01-27  Ed Schonberg  <schonberg@adacore.com>
3345         * sem_ch5.adb: Code clean up.
3347 2014-01-27  Ed Schonberg  <schonberg@adacore.com>
3349         * par-ch5.adb (P_Iterator_Specification): Improve error recovery
3350         when an array or container iterator includes a subtype indication,
3351         which is only legal in an element iterator.
3353 2014-01-27  Thomas Quinot  <quinot@adacore.com>
3355         * exp_ch7.adb: Minor reformatting.
3357 2014-01-27  Robert Dewar  <dewar@adacore.com>
3359         * opt.adb (SPARK_Mode): Default for library units is None rather
3360         than Off.
3361         * opt.ads: Remove AUTO from SPARK_Mode_Type SPARK_Mode_Type is
3362         no longer ordered.
3363         * sem_prag.adb (Analyze_Pragma, case SPARK_Mode): Remove AUTO
3364         possibility.
3365         * snames.ads-tmpl (Name_Auto): Removed, no longer used.
3367 2014-01-27  Robert Dewar  <dewar@adacore.com>
3369         * par-ch5.adb (P_Sequence_Of_Statements): Make entry in
3370         Suspicious_Labels table if we have identifier; followed by loop
3371         or block.
3372         * par-endh.adb (Evaluate_End_Entry): Search Suspicious_Labels table.
3373         * par.adb (Suspicious_Labels): New table.
3375 2014-01-27  Robert Dewar  <dewar@adacore.com>
3377         * exp_aggr.adb (Check_Bounds): Reason is range check, not
3378         length check.
3380 2014-01-27  Yannick Moy  <moy@adacore.com>
3382         * get_spark_xrefs.adb (Get_SPARK_Xrefs): Accept new type 'c' for
3383         reference.
3384         * lib-xref-spark_specific.adb (Is_Global_Constant): Remove useless
3385         function now.
3386         (Add_SPARK_Xrefs): Include references to constants.
3387         * spark_xrefs.ads Document new character 'c' for references to
3388         constants.
3390 2014-01-27  Thomas Quinot  <quinot@adacore.com>
3392         * exp_smem.adb (Add_Write_After): For a function call, insert write as
3393         an after action in a transient scope.
3395 2014-01-27  Thomas Quinot  <quinot@adacore.com>
3397         * exp_smem.adb (Expand_Shared_Passive_Variable): For a reference
3398         to a shared variable as an OUT formal in a call to an init proc,
3399         the 'Read call must be emitted after, not before, the call.
3401 2014-01-27  Robert Dewar  <dewar@adacore.com>
3403         * gnat_rm.texi: Remove mention of AUTO mode for SPARK_Mode pragma.
3405 2014-01-27  Robert Dewar  <dewar@adacore.com>
3407         * a-wichha.adb (Character_Set_Version): Change to output proper
3408         value.
3410 2014-01-27  Hristian Kirtchev  <kirtchev@adacore.com>
3412         * einfo.adb (Is_Input_Only_State): Removed.
3413         (Is_Non_Volatile_State): Removed.
3414         (Is_Output_State): Removed.
3415         * einfo.ads (Is_Input_Only_State): Remove attribute and
3416         subprogram. Update related entity.
3417         (Is_Non_Volatile_State):
3418         Remove attribute and subprogram. Update related entity.
3419         (Is_Output_State): Removed attribute and subprogram. Update
3420         related entity.
3421         * exp_ch6.adb (Expand_Subprogram_Contract): Update comment on
3422         generated code.
3423         * sem_ch3.adb (Analyze_Declarations): Analyze the contract of
3424         an object, not just variables.
3425         (Analyze_Object_Contract): New routine.
3426         (Analyze_Variable_Contract): Removed.
3427         (Process_Discriminants): Detect an illegal use of volatile
3428         discriminant in SPARK mode.
3429         * sem_ch5.adb (Analyze_Iterator_Specification):
3430         Detect an illegal use of volatile loop variable.
3431         (Analyze_Loop_Parameter_Specification): Detect an illegal use
3432         of volatile loop variable.
3433         * sem_ch6.adb (Process_Formals): Update the volatile object
3434         detection. Detect an illegal formal of mode IN OUT or OUT in
3435         SPARK mode. Enhance the error messages with references.
3436         * sem_ch12.adb (Instantiate_Object): Update the volatile object
3437         detection. Enhance the error messages with references.
3438         * sem_prag.adb (Analyze_Abstract_State): Enhance the error
3439         messages with references.
3440         (Analyze_Contract_Case): Enhance the error messages with references.
3441         (Analyze_External_Property): Call Check_Duplicate_Property to process
3442         an external property.
3443         (Analyze_External_Property_In_Decl_Part): New routine.
3444         (Analyze_External_State_In_Decl_Part): Removed.
3445         (Analyze_Global_Item): Detect an illegal
3446         use of a volatile constant. Detect an illegal use
3447         of a variable with enabled Effective_Reads. Enhance
3448         the error messages with references. Remove obsolete
3449         checks concerning Input_Only and Output_Only states.
3450         (Analyze_Initialization_Item): Enhance the error messages
3451         with references.
3452         (Analyze_Initializes_In_Decl_Part): Do not
3453         collect the states and variables when the initialization list
3454         is null.
3455         (Analyze_Input_Item): Enhance the error messages with references.
3456         (Analyze_Input_Output): Enhance the error messages with references.
3457         (Analyze_Pragma): Enhance the error messages with references.
3458         (Analyze_Refinement_Clause): Code reformatting.
3459         (Analyze_Refined_Depends_In_Decl_Part):
3460         Rename global variable Global to Reg_Global and update all
3461         occurrences. Add local variables D7 and D8. Update the error
3462         messages with references. Update the call to Collect_Global_Items.
3463         (Analyze_Refined_Global_In_Decl_Part): Add local variables
3464         Has_Proof_In_State, Proof_In_Constits and Proof_In_Items. Update
3465         the call to Collect_Global_Items.  Account for a Proof_In state
3466         in null / useless refinement checks. Verify the coverage of
3467         Proof_In states.
3468         (Check_Dependency_Clause): Remove local variable
3469         Out_Constits. Remove the retrieval and removal of constituents
3470         for an Output_Only state. Remove the reporting of unused
3471         Output_Only state constituents.
3472         (Check_Duplicate_Mode): Enhance
3473         the error message with a reference.
3474         (Check_Duplicate_Property): New routine.
3475         (Check_Duplicate_Option): Enhance the error message with a reference.
3476         (Check_External_Properties): Enhance the error message with a reference.
3477         (Check_Function_Return): Enhance the error message with a reference.
3478         (Check_In_Out_States): Update
3479         comment on usage. Add a specialized error message for Proof_In
3480         constituents. Enhance the error message with a reference.
3481         (Check_Input_States): Update comment on usage. Account for
3482         possible Proof_In constituents. Enhance the error message
3483         with a areference.
3484         (Check_Matching_Constituent): Enhance the error message with a
3485         reference.
3486         (Check_Matching_State): Enchance the error message with a reference.
3487         (Check_Mode): Add local variable From_Global. Update the call to
3488         Find_Mode.  Emit more precise error messages concerning extra items
3489         (Check_Mode_Restriction_In_Enclosing_Context): Consider
3490         pragma Refined_Global.  Enhance the error message with a
3491         reference.
3492         (Check_Mode_Restriction_In_Function): Enhance the error message with
3493         a reference.
3494         (Check_Output_States): Update comment on usage. Add local variable
3495         Posted.  Account for possible Proof_In constituents. Produce a detailed
3496         list of missing constituents.
3497         (Check_Proof_In_States): New routine.
3498         (Check_Refined_Global_Item): Handle Proof_In
3499         constituents. Enchance the error message with a reference.
3500         (Collect_Global_Items): Add formal parameters Proof_In_Items
3501         and Has_Proof_In_State. Update the comment on usage. Account
3502         for Proof_In items.
3503         (Create_Or_Modify_Clause): Enchance
3504         the error message with a reference.
3505         (Find_Mode): Add
3506         formal parameter From_Global. Update the comment on usage.
3507         Detect when the mode is governed by pragma [Refined_]Global.
3508         (Output_Constituents): Removed.
3509         (Report_Extra_Constituents):
3510         Report extra Proof_In constituents.
3511         (Report_Unused_Constituents): Removed.
3512         (Usage_Error): Code reformatting. Enhance the error
3513         messages with reference.
3514         * sem_prag.ads (Analyze_External_Property_In_Decl_Part): New routine.
3515         (Analyze_External_State_In_Decl_Part): Removed.
3516         * sem_res.adb (Resolve_Actuals): Update the volatile object
3517         detection. Enhance the error message with a reference.
3518         (Resolve_Entity_Name): Update the volatile object
3519         detection. Enhance the error message with a reference.
3520         * sem_util.adb (Is_Refined_State): Add a guard to avoid a crash.
3521         (Is_SPARK_Volatile_Object): New routine.
3522         (Has_Volatile_Component): New routine.
3523         * sem_util.ads (Is_Delegate): Alphabetized.
3524         (Is_SPARK_Volatile_Object): New routine.
3525         (Has_Volatile_Component): New routine.
3526         * snames.ads-tmpl: Remove names Name_Input_Only and Name_Output_Only.
3528 2014-01-27  Ed Schonberg  <schonberg@adacore.com>
3530         * sem_attr.adb: Resolve fully prefix of 'Update.
3532 2014-01-27  Ben Brosgol  <brosgol@adacore.com>
3534         * gnat_rm.texi: Minor clarifications.
3536 2014-01-27  Robert Dewar  <dewar@adacore.com>
3538         * sem_elab.adb (Check_Internal_Call_Continue): Avoid complaining
3539         about call that is generated as part of an Initial_Condition
3540         check.
3541         * sem_prag.adb: Minor spelling correction.
3543 2014-01-27  Robert Dewar  <dewar@adacore.com>
3545         * sem_prag.adb (Set_Convention_From_Pragma): Check that
3546         convention Ghost can only apply to functions.
3547         * einfo.ads, einfo.adb (Is_Ghost_Subprogram): Add clarifying comment.
3549 2014-01-27  Robert Dewar  <dewar@adacore.com>
3551         * gnat_ugn.texi: Add Short_Enums to documentation of
3552         -gnatet/-gnateT.
3554 2014-01-27  Robert Dewar  <dewar@adacore.com>
3556         * sem_prag.adb (Analyze_Input_Item): Correct check for input
3557         item in same package.
3558         * sem_util.ads, sem_util.adb (Within_Scope): New function.
3560 2014-01-26  Arnaud Charlet  <charlet@adacore.com>
3562         * a-intnam-lynxos.ads, mlib-tgt-specific-lynxos.adb,
3563         s-osinte-lynxos-3.adb, s-osinte-lynxos-3.ads, s-osinte-lynxos.adb,
3564         s-osinte-lynxos.ads, s-taprop-lynxos.adb, s-tpopsp-lynxos.adb,
3565         system-lynxos-ppc.ads, system-lynxos-x86.ads: Removed, no longer
3566         maintained.
3568 2014-01-25  Eric Botcazou  <ebotcazou@adacore.com>
3570         * gcc-interface/Makefile.in: Fix oversight.
3572 2014-01-25  Eric Botcazou  <ebotcazou@adacore.com>
3574         * gcc-interface/utils.c (convert_to_fat_pointer): Un-obfuscate the
3575         conversion from a thin pointer with a shifted value.
3576         * gcc-interface/utils2.c (gnat_build_constructor): Propagate the
3577         read-only flag from the values onto the result.
3578         (gnat_invariant_expr): Accept read-only CONSTRUCTORs.
3580 2014-01-25  Tristan Gingold  <gingold@adacore.com>
3582         * gcc-interface/decl.c (gnat_to_gnu_entity): Always build a variable
3583         for E_Variable with a pragma Linker_Section.
3585 2014-01-25  Robert Dewar  <dewar@adacore.com>
3587         * gcc-interface/decl.c (gnat_to_gnu_param): Make sure an Out parameter
3588         with Default_Value aspect is passed in by copy.
3590 2014-01-24  Eric Botcazou  <ebotcazou@adacore.com>
3592         * set_targ.adb: Set Short_Enums.
3593         * gcc-interface/lang.opt (fshort-enums): New option.
3594         * gcc-interface/misc.c (gnat_handle_option): Handle it.
3595         (gnat_post_options): Do not modify the global settings.
3597 2014-01-24  Robert Dewar  <dewar@adacore.com>
3599         * g-rannum.ads, g-rannum.adb (Random_Ordinary_Fixed): New generic
3600         function.
3601         (Random_Decimal_Fixed): New generic function.
3602         * s-rannum.ads: Minor comment clarifications.
3604 2014-01-24  Robert Dewar  <dewar@adacore.com>
3606         * back_end.adb: Remove Short_Enums handling (handled in
3607         Ttypes/Get_Targ now) Minor added comments.
3608         * freeze.adb: Change name Short_Enums_On_Target to
3609         Target_Short_Enums.
3610         * get_targ.ads, get_targ.adb (Get_Short_Enums): New function.
3611         * opt.ads: Minor comment updates.
3612         * sem_ch13.adb: Change name Short_Enums_On_Target to
3613         Target_Short_Enums.
3614         * set_targ.adb: Set Short_Enums from gcc back end.
3615         * set_targ.ads (Short_Enums): New variable.
3616         * targparm.ads, targparm.adb: Remove Short_Enums entries (handled in
3617         Ttypes/Get_Targ now).
3618         * ttypes.ads (Target_Short_Enums): New constant boolean switch
3620 2014-01-24  Pascal Obry  <obry@adacore.com>
3622         * g-sercom-mingw.adb: Fix serial port name for port number > 10.
3624 2014-01-24  Gary Dismukes  <dismukes@adacore.com>
3626         * exp_disp.adb (Expand_Dispatching_Call): Call Unqualify on Param when
3627         comparing it with Ctrl_Arg, since Ctrl_Arg may have had qualification
3628         stripped off.
3630 2014-01-24  Robert Dewar  <dewar@adacore.com>
3632         * sinfo.ads, make.adb, prj-env.adb: Minor reformatting.
3634 2014-01-24  Vincent Celier  <celier@adacore.com>
3636         * prj.adb (Add_Aggregated_Project): Do not add a project in
3637         the list if it is already there.
3639 2014-01-24  Yannick Moy  <moy@adacore.com>
3641         * lib-xref-spark_specific.adb (Enclosing_Subprogram_Or_Package):
3642         Correct the search for a subrogram declaration to which a pragma is
3643         attached.
3645 2014-01-24  Bob Duff  <duff@adacore.com>
3647         * gnat_ugn.texi: Document --decimal-grouping and
3648         --based-grouping switches in gnatpp.
3650 2014-01-24  Ed Schonberg  <schonberg@adacore.com>
3652         * sinfo.ads: Documentation update.
3654 2014-01-24  Ed Schonberg  <schonberg@adacore.com>
3656         * sem_ch3.adb (Constant_Redeclaration): New declaration is
3657         illegal if previous one has an initial expression that is an
3658         aggregate expanded into assignments.
3660 2014-01-24  Ed Schonberg  <schonberg@adacore.com>
3662         * sem_ch5.adb (Analyze_Loop_Parameter_Specification): Small
3663         code reorganization to remove spurious warning on a loop with
3664         an array element iterator that has a null range.
3666 2014-01-24  Vincent Celier  <celier@adacore.com>
3668         * make.adb (Binding_Phase): When setting the Ada paths, use
3669         the library ALI dir, not the object dir in libraries.
3671 2014-01-24  Yannick Moy  <moy@adacore.com>
3673         * sinfo.ads: Add documentation of check flag fields.
3675 2014-01-24  Ed Schonberg  <schonberg@adacore.com>
3677         * sem_res.adb (Resolve_Actuals): If an actual is a view
3678         conversion of a discriminated object, and the formal type is
3679         discriminated and constrained, apply a discriminant check to
3680         the object itself.
3682 2014-01-24  Robert Dewar  <dewar@adacore.com>
3684         * prj.adb, prj-env.adb, back_end.adb: Add comment, minor code clean ups.
3686 2014-01-24  Ed Schonberg  <schonberg@adacore.com>
3688         * sem_ch3.adb (Analyze_Declarations): At the end of an
3689         appropriate declarative part, call Freeze_All from the first
3690         declaration in the scope, not from the first unfrozen one. This
3691         is necessary to apply visibility checks to entities with delayed
3692         aspects. Otherwise, in the presence of instantiations and cleanups
3693         that they may generate, the delayed aspects may be analyzed too
3694         late and produce spurious visibility errors.
3695         * sem_attr.adb: Place etype on range.
3696         * sem_ch6.adb: Documentation expression functions.
3698 2014-01-24  Robert Dewar  <dewar@adacore.com>
3700         * exp_ch7.adb: Minor change of Indices to Indexes (preferred
3701         terminology in compiler).
3703 2014-01-24  Robert Dewar  <dewar@adacore.com>
3705         * scans.ads: Remove Tok_Raise from Sterm, Eterm, After_SM
3706         categories, now that Ada 95 supports raise expressions.
3708 2014-01-24  Robert Dewar  <dewar@adacore.com>
3710         * freeze.adb (Freeze_Enumeration_Type): Use new target parameter
3711         Short_Enums_On_Target.
3712         * sem_ch13.adb (Set_Enum_Esize): Take Short_Enums_On_Target
3713         into account.
3714         * targparm.ads, targparm.adb: Add new target parameter Short_Enums.
3716 2014-01-24  Ed Schonberg  <schonberg@adacore.com>
3718         * sem_ch5.adb (Analyze_Iterator_Specification): If subtype
3719         indication is given explicity, check that it matches the array
3720         component type or the container element type of the domain
3721         of iteration.
3723 2014-01-24  Tristan Gingold  <gingold@adacore.com>
3725         * back_end.adb (Scan_Compiler_Arguments): Set Short_Enums_On_Target.
3726         * gcc-interface/misc.c (flag_short_enums): Declare.
3727         (gnat_post_options): Set it.
3729 2014-01-24  Vincent Celier  <celier@adacore.com>
3731         * prj-env.adb (Ada_Objects_Path): Use Ada_Objects_Path_No_Libs
3732         to cache the result when Including_Libraries is False.
3733         * prj-env.ads (Ada_Objects_Path): Update documentation
3734         * prj.adb (Free (Project_Id)): Also free Ada_Objects_Path_No_Libs
3735         (Get_Object_Directory): Return the Library_Ali_Dir only when
3736         when Including_Libraries is True.
3737         * prj.ads (Get_Object_Directory): Fix and complete documentation
3738         (Project_Data): New component Ada_Objects_Path_No_Libs
3740 2014-01-24  Robert Dewar  <dewar@adacore.com>
3742         * checks.adb (Expr_Known_Valid): Result of fpt operator never
3743         considered valid.
3745 2014-01-24  Eric Botcazou  <ebotcazou@adacore.com>
3747         * back_end.adb: Minor fix in comment.
3749 2014-01-24  Javier Miranda  <miranda@adacore.com>
3751         * sem_ch3.adb (Check_Abstract_Overriding): Code reestructuration
3752         required to report the error in case of task types.
3754 2014-01-24  Ed Schonberg  <schonberg@adacore.com>
3756         * sem_attr.adb: Additional index checking.
3758 2014-01-24  Ed Schonberg  <schonberg@adacore.com>
3760         * sem_attr.adb (Analyze_Attribute, case 'Update): Analyze
3761         expressions in each component association, and for records note
3762         the entity in each association choice, for subsequent resolution.
3763         (Resolve_Attribute, case 'Update): Complete resolution of
3764         expressions in each component association.
3766 2014-01-24  Robert Dewar  <dewar@adacore.com>
3768         * sem.adb (Sem): Avoid premature reference to Current_Sem_Unit
3769         (this was causing Is_Main_Unit_Or_Main_Unit_Spec to be set wrong,
3770         leading to wrong handling of SPARK_Mode for library units).
3772 2014-01-24  Robert Dewar  <dewar@adacore.com>
3774         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Set SPARK_Mode
3775         on generic instances (do not consider them to be internally
3776         generated)
3778 2014-01-24  Doug Rupp  <rupp@adacore.com>
3780         * s-osinte-android.ads (pthread_sigmask): Import sigprocmask
3781         vice pthread_sigmask.
3783 2014-01-24  Vincent Celier  <celier@adacore.com>
3785         * prj.adb (Debug_Output (Str, Str2)): Output if verbosity is
3786         not default.
3788 2014-01-24  Vincent Celier  <celier@adacore.com>
3790         * prj-ext.adb (Add): Do not output anything when Silent is True,
3791         whatever the verbosity. When Source is From_External_Attribute,
3792         set the corresponding environment variable if it is not already set.
3793         * prj-ext.ads (Add): New Boolean parameter Silent, defaulted
3794         to False
3795         * prj-proc.adb (Process_Expression_For_Associative_Array):
3796         For attribute External, call Prj.Ext.Add with Silent set to
3797         True for the child environment, to avoid useless output in non
3798         default verbosity.
3800 2014-01-24  Ed Schonberg  <schonberg@adacore.com>
3802         * sem_res.adb (Set_Slice_Subtype): Handle properly a discrete
3803         range given by a subtype indication, and force evaluation of
3804         the bounds, as for a simple range.
3805         * exp_util.adb (Evaluate_Slice_Bounds): Utility to force evaluation
3806         of bounds of slice for various kinds of discrete ranges.
3807         (Evaluate_Name, Evaluate_Subtype_From_Expr): use
3808         Evaluate_Slice_Bounds.
3810 2014-01-24  Bob Duff  <duff@adacore.com>
3812         * s-taskin.ads (Activator): Make this Atomic, because
3813         Activation_Is_Complete reads it, and that can be called
3814         from any task. Previously, this component was only
3815         modified by the activator before activation, and by
3816         Self after activation.
3817         * a-taside.ads, a-taside.adb (Environment_Task,
3818         Activation_Is_Complete): Implement these missing functions.
3820 2014-01-24  Doug Rupp  <rupp@adacore.com>
3822         * init.c: Add a handler section for Android.
3824 2014-01-24  Arnaud Charlet  <charlet@adacore.com>
3826         * i-cexten.ads (Unsigned_33..64, Unsigned_33..64): New types.
3828 2014-01-24  Ed Schonberg  <schonberg@adacore.com>
3830         * sem_ch4.adb (Operator_Check): If one operand is a
3831         Raise_Expression, set its type to that of the other operand.
3832         * sem_res.adb (Resolve_Raise_Expression): new procedure.
3833         (Resolve_Actuals): For an actual that is a Raise_Expression,
3834         set the type to that of the formal.
3835         * sem_type.adb (Find_Unique_Type): If one of the operands is a
3836         Raise_Expression, return type of the other operand.
3838 2014-01-24  Ed Schonberg  <schonberg@adacore.com>
3840         * sem_aggr.adb (Resolve_Record_Aggregate): If a scalar
3841         component of the record has a type with a default aspect, and
3842         the corresponding aggregate component is initiaized with a box,
3843         use the default value in the rewritten aggregate.
3845 2014-01-24  Tristan Gingold  <gingold@adacore.com>
3847         * s-interr.ads, s-interr.adb, s-interr-hwint.adb, s-interr-vms.adb,
3848         s-interr-sigaction.adb,
3849         s-interr-dummy.adb (Install_Restricted_Handlers): Add Prio parameter.
3850         * exp_ch9.adb (Make_Initialize_Protection): Add Prio parameter
3851         to the call to Install_Restricted_Handlers.
3853 2014-01-24  Emmanuel Briot  <briot@adacore.com>
3855         * prj-nmsc.adb (Check_File): Add protection when the source is
3856         not fully initialized.
3858 2014-01-24  Ed Schonberg  <schonberg@adacore.com>
3860         * sem_util.adb (Is_Post_State): In a postcondition, a selected
3861         component that denotes an implicit dereference is a reference
3862         to the post state of the subprogram.
3864 2014-01-24  Robert Dewar  <dewar@adacore.com>
3866         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): SPARK_Mode OFF
3867         for generated subprograms.
3868         (Analyze_Subprogram_Specification): Ditto.
3870 2014-01-24  Vincent Celier  <celier@adacore.com>
3872         * prj-dect.adb (Check_Attribute_Allowed): Detect more forbidden
3873         attributes in package Builder of aggregate and aggregate library
3874         projects.
3875         * prj-nmsc.adb (Process_Naming_Scheme.Check.Check_Aggregate):
3876         Remove procedure (Process_Naming_Scheme.Check.Check_Aggregated):
3877         Remove parameters.  Change error message from "... externally
3878         build library ..." to "... externally built project ...".
3879         (Process_Naming_Scheme.Check): Do not do any check in aggregate
3880         project, as attribute Library_Dir and Library_Name have already
3881         been detected as forbidden.
3883 2014-01-24  Vincent Celier  <celier@adacore.com>
3885         * prj-env.adb (Find_Project): If cached project path is not in
3886         project directory, look in current directory first and use cached
3887         project path only if project is not found in project directory.
3889 2014-01-24  Robert Dewar  <dewar@adacore.com>
3891         * sem_util.adb, lib-xref.adb: Correct false positive warnings.
3893 2014-01-24  Vincent Celier  <celier@adacore.com>
3895         * projects.texi: Document that aggregate projects are only
3896         supported by gprbuild, but not by gnatmake.  Document that the
3897         only attribute Switches in package Binder of aggregate projects
3898         will be ignored if its index is not others.  Document that
3899         attribute Global_Config_File is allowed in package Binder of
3900         aggregate projects.
3902 2014-01-24  Robert Dewar  <dewar@adacore.com>
3904         * sem_prag.adb: Minor code reorganization.
3905         * sem_util.adb: Minor fix of potential latent bug in Is_LHS.
3907 2014-01-24  Pascal Obry  <obry@adacore.com>
3909         * prj-attr.adb, projects.texi, snames.ads-tmpl: Add Excluded_Patterns
3910         attribute definition.
3912 2014-01-24  Vincent Celier  <celier@adacore.com>
3914         * makeutl.adb (Queue.Insert_No_Roots): In gprbuild, do not put
3915         in the Queue the same source (same path, same multi-source index)
3916         from the same project file, to avoid compiling several times
3917         the same source.
3919 2014-01-24  Eric Botcazou  <ebotcazou@adacore.com>
3921         * einfo.ads (First_Rep_Item): Remove obsolete stuff.
3922         (Has_Gigi_Rep_Item): Likewise.
3923         * sem_prag.adb (Analyze_Pragma) <Pragma_Linker_Section>: Do not set
3924         Has_Gigi_Rep_Item for objects.
3925         * gcc-interface/decl.c (prepend_one_attribute_to): Rename into...
3926         (prepend_one_attribute): ...this.
3927         (prepend_one_attribute_pragma): New function extracted from...
3928         (prepend_attributes): ...here.  Swap the parameters for consistency.
3929         (gnat_to_gnu_entity): Adjust calls to prepend_one_attribute_to and to
3930         prepend_attributes.
3931         <object>: Deal with a pragma Linker_Section on a constant
3932         or variable.  <E_Function>: Deal with a pragma Linker_Section
3933         on a subprogram.
3934         (get_minimal_subprog_decl): Adjust calls to prepend_one_attribute_to.
3936 2014-01-24  Vincent Celier  <celier@adacore.com>
3938         * opt.ads: Minor comment update.
3940 2014-01-24  Robert Dewar  <dewar@adacore.com>
3942         * sem_prag.adb (Analyze_Input_Output): Add missing error check
3943         for junk operand.
3944         * sem_util.adb (Is_Refined_State): Add defense against junk
3945         tree from error.
3947 2014-01-24  Pascal Obry  <obry@adacore.com>
3949         * projects.texi: Removes Build_Slaves attribute documentation.
3951 2014-01-23  Robert Dewar  <dewar@adacore.com>
3953         * opt.adb (Register_Opt_Config_Switches): Save SPARK_Mode_Pragma
3954         setting.
3956 2014-01-23  Ed Schonberg  <schonberg@adacore.com>
3958         * sem_util.adb (Is_Potentially_Unevaluated): Predicate only
3959         applies to expressions that come from source.
3960         * sem_attr.adb (Analyze_Attribute, case 'Old): Improve error
3961         message.
3962         (Analyze_Attribute, case 'Loop_Entry): Apply SPARK 2014 legality
3963         rule regarding potentially unevaluated expressions, to prefix
3964         of attribute.
3966 2014-01-23  Ed Schonberg  <schonberg@adacore.com>
3968         * exp_util.adb (Make_Invqriant_Call): If type of expression is
3969         a private extension, get invariant from base type.
3971 2014-01-23  Robert Dewar  <dewar@adacore.com>
3973         * sem_util.adb, sem_attr.adb: Minor reformatting.
3975 2014-01-23  Robert Dewar  <dewar@adacore.com>
3977         * opt.adb (Save_Opt_Config_Switches): Save SPARK_Mode_Pragma
3978         (Restore_Opt_Config_Switches): Restore SPARK_Mode_Pragma.
3979         * sem.adb (Semantics): Remove save/restore of
3980         SPARK_Mode[_Pragma]. Not needed since already done in
3981         Save/Restore_Opt_Config_Switches.
3983 2014-01-23  Robert Dewar  <dewar@adacore.com>
3985         * gnat_rm.texi, einfo.adb, einfo.ads, sem_prag.adb, gnat_ugn.texi,
3986         freeze.adb, repinfo.adb, aspects.adb, aspects.ads, sem_ch13.adb:
3987         Linker_Section enhancements.
3989 2014-01-23  Tristan Gingold  <gingold@adacore.com>
3991         * gnat_rm.texi: Minor editing.
3993 2014-01-23  Robert Dewar  <dewar@adacore.com>
3995         * opt.adb (Set_Opt_Config_Switches): Reset SPARK mode for
3996         with'ed internal units.
3997         * sem.adb (Semantics): Save and restore SPARK_Mode[_Pragma].
3999 2014-01-23  Javier Miranda  <miranda@adacore.com>
4001         * lib-xref.adb (Generate_Reference): As part of processing the
4002         "end-of-spec" reference generate an extra reference to the first
4003         private entity of the package.
4004         * xr_tabls.adb (Add_Reference): No action needed for the extra
4005         'E' reference associated; similar to the processing of the
4006         'e' reference.
4008 2014-01-23  Bob Duff  <duff@adacore.com>
4010         * gnat_ugn.texi: Change "--&pp off" to "--!pp off".
4012 2014-01-23  Ed Schonberg  <schonberg@adacore.com>
4014         * sem_util.ads, sem_util.adb (Is_Potentially_Unevaluated): new
4015         predicate to implement rule given in 6.1.1 (20/3).
4016         * sem_attr.adb (Analyze_Attribute, case 'Old): Reject prefix of
4017         'Old in a postcondition, if it is potentially unevaluated and
4018         it is not an entity name.
4020 2014-01-23  Bob Duff  <duff@adacore.com>
4022         * gnat_ugn.texi: Document the new "--&pp off" feature of gnatpp.
4024 2014-01-23  Robert Dewar  <dewar@adacore.com>
4026         * gnatlink.adb (Gnatlink): Fix problem of generating bad name
4027         msg on VMS.
4029 2014-01-23  Bob Duff  <duff@adacore.com>
4031         * g-dynhta.ads: Minor comment fix.
4033 2014-01-23  Yannick Moy  <moy@adacore.com>
4035         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Inherit SPARK_Mode
4036         from spec on body only when not already inherited on spec. Set
4037         SPARK_Mode from context on body without previous spec.  *
4038         * sem_prag.adb (Analyze_Pragma): Check placement of pragma on
4039         library-level entities.  Correct retrieval of entity from
4040         declaration, for cases where the declaration is not a unit.
4041         * sem_ch12.adb (Instantiate_Object): Avoid
4042         calling Is_Volatile_Object on an empty node.
4044 2014-01-23  Robert Dewar  <dewar@adacore.com>
4046         * gnatlink.adb (Gnatlink): Check for suspicious executable file
4047         names on windows.
4049 2014-01-23  Robert Dewar  <dewar@adacore.com>
4051         * a-ngelfu.ads: Remove bad uses of AND which should be AND THEN.
4052         * sem_res.adb (Check_No_Direct_Boolean_Operators): Don't give
4053         style errors in instances.
4054         * g-dynhta.ads (Static_HTable): Comment updates.
4056 2014-01-23  Vincent Celier  <celier@adacore.com>
4058         * prj-conf.adb (Get_Or_Create_Configuration_File): Do not attempt
4059         to find a configuration project file when Config_File_Name is
4060         No_Configuration_File.
4061         * prj-conf.ads (No_Configuration_File): New constant String.
4062         * prj-pars.adb (Parse): Call Get_Or_Create_Configuration_File
4063         with Config_File_Name set to No_Configuration_File, so that
4064         no existing configuration project file will be used, and the
4065         configuration project will be only created in memory when
4066         Add_Default_GNAT_Naming_Scheme is called.
4067         * projects.texi: Minor reformatting.
4069 2014-01-23  Vincent Celier  <celier@adacore.com>
4071         * prj-conf.adb (Get_Or_Create_Configuration_File): Never parse
4072         a config project file if On_Load_Config is not null.
4073         * prj-pars.adb: Minor comment changes.
4075 2014-01-23  Ed Schonberg  <schonberg@adacore.com>
4077         * lib-xref.adb (Output_References): Output progenitors of
4078         synchronized tagged types, for source navigation.
4080 2014-01-23  Robert Dewar  <dewar@adacore.com>
4082         * exp_util.adb, sinfo.adb, sinfo.ads, sem.adb, sem_res.adb,
4083         expander.adb, exp_ch11.adb, exp_ch11.ads, sem_ch11.adb, sem_ch11.ads,
4084         sprint.adb, sprint.ads: Remove unused node N_Subprogram_Info.
4086 2014-01-23  Emmanuel Briot  <briot@adacore.com>
4088         * prj-conf.adb (Get_Or_Create_Configuration_File): call
4089         On_Load_Config later.
4091 2014-01-23  Hristian Kirtchev  <kirtchev@adacore.com>
4093         * sem_ch3.adb (Analyze_Declarations): Do not
4094         generate the spec of the late primitive in ASIS mode. Add two
4095         comments to explain the special cases when the expansion is
4096         not performed.
4098 2014-01-23  Robert Dewar  <dewar@adacore.com>
4100         * sem_util.adb (Note_Possible_Modification): Fix error of
4101         misbehaving for implicit dereference cases in -gnatc mode.
4103 2014-01-23  Emmanuel Briot  <briot@adacore.com>
4105         * prj-pars.adb: Minor reformatting.
4107 2014-01-22  Ed Schonberg  <schonberg@adacore.com>
4109         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): A subprogram
4110         body generated for an expression function within a protected body
4111         needs a set of renaming declarations if the expression function
4112         comes from source.
4114 2014-01-22  Ed Schonberg  <schonberg@adacore.com>
4116         * lib-xref.adb (Get_Type_Reference): In semantics-only mode,
4117         list interface progenitor of a tagged concurrent type, for better
4118         source navigation.
4120 2014-01-22  Robert Dewar  <dewar@adacore.com>
4122         * lib.adb (In_Extended_Main_Code_Unit): Return False for
4123         Standard_Location.
4124         (In_Extended_Main_Source_Unit): Return False for Standard_Location.
4125         * lib.ads (In_Extended_Main_Code_Unit): Add documentation on
4126         treatment of Slocs No_Location and Standard_Location.
4127         * restrict.adb (Check_Restriction_No_Dependence): Explicitly
4128         check for entity with Standard_Location Sloc, rather than relying
4129         on Lib routines to do that.
4130         * sem_res.adb (Resolve_Call): Implement SPARK_05 restriction
4131         that a call cannot occur before a later occuring body within
4132         the same unit.
4134 2014-01-22  Thomas Quinot  <quinot@adacore.com>
4136         * rtsfind.adb: Update comment.
4138 2014-01-22  Hristian Kirtchev  <kirtchev@adacore.com>
4140         * sem_aux.ads, sem_aux.adb (Is_Body): New routine.
4141         * sem_ch3.adb (Analyze_Declarations): Add local variable
4142         Body_Seen. Generate the spec of a late controlled
4143         primitive body that is about to freeze its related type.
4144         (Handle_Late_Controlled_Primitive): New routine.
4146 2014-01-22  Robert Dewar  <dewar@adacore.com>
4148         * a-stream.adb: Minor reformatting.
4150 2014-01-22  Ed Schonberg  <schonberg@adacore.com>
4152         * sem_ch8.adb (From_Actual_Package): Introduce a recursive
4153         sub-procedure Declared_In_Actual to handle properly the visibility
4154         of actuals in actual packages, that are themselves actuals to a
4155         actual package of the current instance. This mimics properly the
4156         visibility of formals of formal packages declared with a box,
4157         within the corresponding generic unit.
4159 2014-01-22  Robert Dewar  <dewar@adacore.com>
4161         * checks.adb: Do not assume that a volatile variable is valid.
4163 2014-01-22  Thomas Quinot  <quinot@adacore.com>
4165         * g-catiio.ads (Image, Value): Clarify that these functions
4166         operate in the local time zone.  Minor documentation update.
4168 2014-01-22  Thomas Quinot  <quinot@adacore.com>
4170         * csets.adb, csets.ads, opt.ads: Minor documentation fixes.
4172 2014-01-22  Robert Dewar  <dewar@adacore.com>
4174         * sem_aux.adb, sem_aux.ads, sem_ch3.adb (Has_Unconstrained_Elements):
4175         Moved to sem_aux.adb.
4177 2014-01-22  Robert Dewar  <dewar@adacore.com>
4179         * vms_data.ads: Minor reformatting.
4181 2014-01-22  Robert Dewar  <dewar@adacore.com>
4183         * debug.adb: Document messages affected by -gnatd.E including
4184         the new ones that relate to late definition of equality.
4185         * sem_ch6.adb (Check_Untagged_Equality): In Ada 2012 mode, if
4186         debug flag -gnatd.E is set, then generate warnings rather than
4187         errors.
4188         (Check_Untagged_Equality): In earlier versions of Ada,
4189         generate warnings if Warn_On_Ada_2012_Incompatibility flag is set.
4191 2014-01-22  Robert Dewar  <dewar@adacore.com>
4193         * sem_prag.adb (Usage_Error): Output additional messages for
4194         unconstrained OUT parameters lacking an input dependency.
4196 2014-01-22  Robert Dewar  <dewar@adacore.com>
4198         * sem_ch4.adb: Minor reformatting.
4200 2014-01-22  Robert Dewar  <dewar@adacore.com>
4202         * restrict.ads: Minor reformatting.
4203         * sem_res.adb (Resolve_Call): Check for SPARK_05 restriction that
4204         forbids a call from within a subprogram to the same subprogram.
4206 2014-01-22  Thomas Quinot  <quinot@adacore.com>
4208         * a-stream.ads (Read_SEA, Write_SEA): New subprograms, optimized
4209         stream attributes for Stream_Element_Array.
4210         * a-stream.adb (Read_SEA, Write_SEA): Bodies for the above.
4211         * rtsfind.adb (Check_CRT): Do not reject a reference to an entity
4212         defined in the current scope.
4214 2014-01-22  Robert Dewar  <dewar@adacore.com>
4216         * debug.adb, exp_ch4.adb, erroutc.adb: Minor reformatting.
4218 2014-01-22  Thomas Quinot  <quinot@adacore.com>
4220         * sem_ch7.adb, sem_ch8.adb, exp_ch3.adb: Minor reformatting.
4222 2014-01-22  Thomas Quinot  <quinot@adacore.com>
4224         * sem_ch3.adb (Analyze_Object_Declaration): For a constant
4225         declaration initialized with a function call, whose type
4226         has variable size, need to remove side effects so that the
4227         initialization expression becomes a dereference of a temporary
4228         reference to the function result.
4230 2014-01-22  Yannick Moy  <moy@adacore.com>
4232         * errout.adb (Initialize): Remove trick to add dummy entry
4233         in Warnings table.
4234         * erroutc.adb (Set_Warnings_Mode_Off,
4235         Set_Warnings_Mode_On): Do nothing if warnings are suppressed by
4236         command line switch.
4237         * opt.ads (Warning_Mode): Document behavior
4238         wrt pragma Warnings, in normal mode and in GNATprove_Mode.
4240 2014-01-22  Robert Dewar  <dewar@adacore.com>
4242         * sem_ch3.adb, errout.adb, erroutc.adb: Minor reformatting.
4244 2014-01-22  Robert Dewar  <dewar@adacore.com>
4246         * sem_ch13.adb (Check_Pool_Size_Clash): New procedure
4247         (Analyze_Attribute_Definition_Clause, case Storage_Pool): call
4248         Check_Pool_Size_Clash (Analyze_Attribute_Definition_Clause,
4249         case Storage_Size): call Check_Pool_Size_Clash.
4251 2014-01-22  Robert Dewar  <dewar@adacore.com>
4253         * sem_ch3.adb, exp_util.adb, sem_dim.adb, sem_elab.adb, sem_ch8.adb,
4254         sem_eval.ads: Minor reformatting.
4256 2014-01-22  Thomas Quinot  <quinot@adacore.com>
4258         * sem_eval.adb (Compile_Time_Known_Bounds): Return False for
4259         Any_Composite to prevent cascaded errors.
4261 2014-01-22  Yannick Moy  <moy@adacore.com>
4263         * errout.adb (Initialize): Do not insert special entry in Warnings
4264         table in GNATprove_Mode.
4265         * erroutc.adb (Set_Warnings_Mode_On): Add info in Warnings table in
4266         GNATprove_Mode.
4267         * gnat1drv.adb (Adjust_Global_Switches): Do not suppress frontend
4268         warnings anymore.
4270 2014-01-22  Robert Dewar  <dewar@adacore.com>
4272         * sem_prag.adb (Analyze_Initializes_In_Decl_Part): Handle null
4273         initializes case.
4275 2014-01-22  Robert Dewar  <dewar@adacore.com>
4277         * snames.ads-tmpl: Update header.
4279 2014-01-22  Thomas Quinot  <quinot@adacore.com>
4281         * exp_util.adb (Insert_Actions): When inserting actions on a
4282         short circuit operator that has already been analyzed, do not park
4283         actions in node; instead introduce an N_Expression_With_Actions
4284         and insert actions immediately.
4285         Add guard for unexpected case of climbing up through statement
4286         in Actions list of an N_Expression_With_Actions.
4287         * sem_elab.adb (Insert_Elab_Check): Remove complex
4288         specialized circuitry for the case where the context is already
4289         analyzed, as it is not needed and introduces irregularities in
4290         finalization. Instead rely on the above change to Insert_Actions
4291         to ensure that late insertion on short circuit operators works
4292         as expected.
4294 2014-01-22  Ed Schonberg  <schonberg@adacore.com>
4296         * sem_ch4.adb (Operator_Check): Improve error message when an
4297         operand of concatenation is an access type.
4299 2014-01-22  Thomas Quinot  <quinot@adacore.com>
4301         * sem_dim.adb (Analyze_Dimension_Identifier): Add guard against
4302         cascaded error.
4304 2014-01-22  Ed Schonberg  <schonberg@adacore.com>
4306         * sem_ch8.adb (Find_Selected_Component): Handle properly the case
4307         of an expanded name in a proper body, whose prefix is a package
4308         in the context of the proper body, when there is a homonym of
4309         the package declared in the parent unit.
4311 2014-01-22  Robert Dewar  <dewar@adacore.com>
4313         * sem_warn.adb (Check_Use_Clause): Don't give no entities used
4314         msg if errors found.
4315         (Check_One_Unit): Same change.
4317 2014-01-22  Robert Dewar  <dewar@adacore.com>
4319         * ug_words: Add missing/wrong entries for VMS warning switches.
4320         * sem_prag.adb (Check_Duplicate_Pragma): Avoid flagging parent type.
4322 2014-01-22  Jerome Guitton  <guitton@adacore.com>
4324         * mlib-tgt-specific-vxworks.adb (Get_Target_Suffix): Replace xscale by
4325         arm.
4327 2014-01-22  Robert Dewar  <dewar@adacore.com>
4329         * gnat_rm.texi, gnat_ugn.texi: Document passive task optimization
4331 2014-01-22  Eric Botcazou  <ebotcazou@adacore.com>
4333         * gcc-interface/Makefile.in: Minor fixes.
4335 2014-01-21  Robert Dewar  <dewar@adacore.com>
4337         * par-ch4.adb (P_If_Expression): Rewritten to improve error recovery.
4338         * par-ch5.adb (P_Condition): New version with expression prescanned.
4339         * par.adb (P_Condition): New version with expression prescanned.
4341 2014-01-21  Robert Dewar  <dewar@adacore.com>
4343         * gnat_rm.texi: Document that Allow_Integer_Address is ignored
4344         if Address is not a private type.
4345         * sem_prag.adb (Analyze_Pragma, case Allow_Integer_Address):
4346         Ignore pragma if System.Address is not a private type.
4348 2014-01-21  Arnaud Charlet  <charlet@adacore.com>
4350         * namet.ads (Name_Len): Initialize to 0 to avoid accessing an
4351         uninitialized value.
4353 2014-01-21  Thomas Quinot  <quinot@adacore.com>
4355         * gnat_rm.texi (Scalar_Storage_Order): Update documentation.
4357 2014-01-21  Ed Schonberg  <schonberg@adacore.com>
4359         * sem_ch12.adb (Set_Instance_Env): In Ada 2012 mode, preserve
4360         the value of Assertions_Enabled flag when compiling an instance of
4361         an internal unit. This facilitates the use of pre/postconditions
4362         in generic internal units, such as the new elementary function
4363         libraries.
4365 2014-01-21  Robert Dewar  <dewar@adacore.com>
4367         * exp_aggr.adb: Minor reformatting.
4368         * sem_attr.adb: Minor reformatting.
4369         * sem_res.adb: Minor comment addition.
4370         * einfo.adb: Minor comment updates.
4371         * freeze.adb: Minor reformatting and code reorganization.
4373 2014-01-21  Ed Schonberg  <schonberg@adacore.com>
4375         * par-ch4.adb (P_If_Expression): Handle more gracefully an
4376         elsif clause that does not have an else part.
4378 2014-01-21  Robert Dewar  <dewar@adacore.com>
4380         * checks.adb, sem_util.ads, sem_ch4.adb: Minor reformatting.
4381         * gcc-interface/Makefile.in: clean up target pairs.
4383 2014-01-21  Pascal Obry  <obry@adacore.com>
4385         * projects.texi: Minor typo fix.
4387 2014-01-21  Thomas Quinot  <quinot@adacore.com>
4389         * freeze.adb (Check_Component_Storage_Order): If a record type
4390         has an explicit Scalar_Storage_Order attribute definition clause,
4391         reject any component that itself is of a composite type and does
4392         not have one.
4394 2014-01-21  Ed Schonberg  <schonberg@adacore.com>
4396         * sem_ch10.adb (Generate_Parent_Reference): Make public so it
4397         can be used to generate proper cross-reference information for
4398         the parent units of proper bodies.
4400 2014-01-21  Thomas Quinot  <quinot@adacore.com>
4402         * exp_pakd.adb (Expand_Packed_Element_Set,
4403         Expand_Packed_Element_Reference): No byte swapping required in
4404         the front-end for the case of a reverse storage order array,
4405         as this is now handled uniformly in the back-end.  However we
4406         still need to swap back an extracted element if it is itself a
4407         nested composite with reverse storage order.
4409 2014-01-21  Hristian Kirtchev  <kirtchev@adacore.com>
4411         * sem_prag.adb (Analyze_External_Property): Add processing for "others".
4412         (Analyze_Pragma): Update the grammar of pragma Abstract_State to
4413         include "others".
4415 2014-01-21  Arnaud Charlet  <charlet@adacore.com>
4417         * gnat_ugn.texi: Minor updates.
4419 2014-01-21  Thomas Quinot  <quinot@adacore.com>
4421         * exp_pakd.adb: Update comment, minor reformatting.
4423 2014-01-21  Hristian Kirtchev  <kirtchev@adacore.com>
4425         * sem_ch3.adb (Analyze_Variable_Contract): Trigger the volatile
4426         object check when SPARK_Mode is on.
4427         * sem_ch6.adb (Process_Formals): Trigger the volatile object
4428         check when SPARK_Mode is on.
4429         * sem_ch12.adb (Instantiate_Object): Trigger the volatile object
4430         check when SPARK_Mode is on.
4431         * sem_ch13.adb (Analyze_Aspect_Specifications): Insert the
4432         corresponding pragma of aspect SPARK_Mode in the visible
4433         declarations of a package declaration.
4434         * sem_prag.adb (Analyze_Pragma): Trigger the volatile object
4435         check when SPARK_Mode is on.
4436         * sem_res.adb (Resolve_Actuals): Trigger the volatile object
4437         check when SPARK_Mode is on.
4438         (Resolve_Entity_Name): Trigger
4439         the volatile object check when SPARK_Mode is on.
4441 2014-01-21  Robert Dewar  <dewar@adacore.com>
4443         * sem_ch3.adb, sem_prag.adb, sem_prag.ads, sem_ch12.adb, sem_res.adb,
4444         sem_ch6.adb, a-except-2005.adb: Minor reformatting.
4446 2014-01-21  Ed Schonberg  <schonberg@adacore.com>
4448         * exp_ch3.adb (Expand_N_Object_Declaration): When a class-wide
4449         object is declared, it is rewritten as a renaming of an dynamic
4450         expression that wraps the initial value.  The renaming declaration
4451         is first given an internal name, to prevent collisions with the
4452         entity already declared, and then the name is modified to reflect
4453         the original one. the modification of the name must preserve
4454         the source location of the original, to prevent spurious errors
4455         when compiling with style checks if the declaration involves
4456         more than one entity.
4458 2014-01-21  Hristian Kirtchev  <kirtchev@adacore.com>
4460         * aspects.adb Add entries for Async_Readers, Async_Writers,
4461         Effective_Reads and Effective_Writes in table Canonical_Aspect.
4462         * aspects.ads Add entries for Async_Readers, Async_Writers,
4463         Effective_Reads and Effective_Writes in tables Aspect_Id,
4464         Aspect_Names, Aspect_Delay and Implementation_Defined_Aspect.
4465         * atree.adb (Ekind_In): New version with 8 parameters.
4466         (Node34): New routine.
4467         (Set_Node34): New routine.
4468         * atree.ads (Ekind_In): New version with 8 parameters.
4469         (Node34): New routine.
4470         (Set_Node34): New routine.
4471         * einfo.adb Contract is now Node34.
4472         (Contract): Update the assertion and node usage.
4473         (Get_Pragma): Include pragmas Async_Readers, Async_Writers,
4474         Effective_Reads and Effective_Writes.
4475         (Set_Contract): Update the assertion and node usage.
4476         (Write_Field24_Name): Remove the output for a contract.
4477         (Write_Field34_Name): Add output for a contract.
4478         * einfo.ads Contract is now Node34. Update the comment on
4479         attribute usage and related node structures.
4480         (Get_Pragma): Update the comment on usage.
4481         * par-prag.adb (Prag): Pragmas Async_Readers, Async_Writers,
4482         Effective_Reads and Effective_Writes do not require special
4483         processing by the parser.
4484         * sem_ch3.adb (Analyze_Variable_Contract): New routine.
4485         (Analyze_Declarations): Analyze the contract of a variable at
4486         the end of the declarative region.
4487         (Analyze_Object_Declaration): Create a contract for a variable.
4488         * sem_ch6.adb (Analyze_Subprogram_Contract): Update the retrieval
4489         of classification pragmas.
4490         (Process_Formals): Detect an illegal
4491         use of a volatile object as a formal in a function.
4492         * sem_ch12.adb (Instantiate_Object): Detect an illegal use of
4493         a volatile object as an actual in generic instantiation.
4494         * sem_prag.adb Add entries for Async_Readers, Async_Writers,
4495         Effective_Reads and Effective_Writes in table Sig_Flags.
4496         (Analyze_External_State_In_Decl_Part): New routine.
4497         (Analyze_Global_Item): Detect an illegal use of a volatile object
4498         as a global item of a function.
4499         (Analyze_Pragma): Reimplement
4500         pragma Abstract_State. Add support for pragmas Async_Readers,
4501         Async_Writers, Effective_Reads and Effective_Writes.
4502         (Check_External_Properties): New routine.
4503         * sem_prag.ads (Analyze_External_State_In_Decl_Part): New routine.
4504         (Check_External_Properties): New routine.
4505         * sem_res.adb (Resolve_Actuals): Detect an illegal use of a
4506         volatile object as an actual in a call.
4507         (Resolve_Entity_Name):
4508         Add local variables Par, Prev and Usage_OK. Detect illegal
4509         contexts of volatile objects.
4510         * sem_util.adb (Add_Contract_Item): Add support for
4511         pragmas associated with the contract of a variable.
4512         (Async_Readers_Enabled): New routine.
4513         (Async_Writers_Enabled): New routine.
4514         (Effective_Reads_Enabled): New routine.
4515         (Effective_Writes_Enabled): New routine.
4516         (Has_Enabled_Property):
4517         New routine.
4518         (Is_Unchecked_Conversion_Instance): New routine.
4519         (Is_Volatile_Object): Add support for entities that may denote
4520         a volatile object.
4521         * sem_util.ads (Add_Contract_Item): Update the
4522         comment on usage.
4523         (Async_Readers_Enabled): New routine.
4524         (Async_Writers_Enabled): New routine.
4525         (Effective_Reads_Enabled): New routine.
4526         (Effective_Writes_Enabled): New routine.
4527         (Is_Unchecked_Conversion_Instance): New routine.
4528         * sinfo.ads Update the comment on the structure of N_Contract.
4529         * snames.ads-tmpl Add predefined names for Async_Readers,
4530         Async_Writers, Effective_Reads and Effective_Writes. Add
4531         pragma ids for Async_Readers, Async_Writers, Effective_Reads
4532         and Effective_Writes.
4534 2014-01-21  Robert Dewar  <dewar@adacore.com>
4536         * exp_ch4.adb (Eval_Op_Expon): Use CRT_Safe_Compile_Time_Known_Value
4537         * sem_eval.adb (Compile_Time_Known_Value): Remove special
4538         handling of CRT mode (CRT_Safe_Compile_Time_Known_Value): New
4539         function (Eval_Op_Expon): Add CRT_Safe in call to Test_Foldable
4540         (Test_Foldable): Add CRT_Safe parameter
4541         * sem_eval.ads (Compile_Time_Known_Value): Remove special
4542         handling of CRT mode.
4543         (CRT_Safe_Compile_Time_Known_Value): New function.
4545 2014-01-21  Robert Dewar  <dewar@adacore.com>
4547         * sem_prag.adb (Analyze_Pragma, case SPARK_Mode): Fix problem
4548         with pragma or aspect that applies to package spec or subprogram
4549         spec.
4551 2014-01-21  Robert Dewar  <dewar@adacore.com>
4553         * exp_aggr.adb: Minor reformatting.
4555 2014-01-21  Johannes Kanig  <kanig@adacore.com>
4557         * gnat1drv.adb (Gnat1drv) remove obsolete reference to -gnatd.H.
4559 2014-01-21  Bob Duff  <duff@adacore.com>
4561         * gnat_ugn.texi: Document the "checks" attribute in gnat2xml.
4563 2014-01-21  Steve Baird  <baird@adacore.com>
4565         * gnat_rm.texi: Improve description of SPARK_Mode pragma.
4567 2014-01-21  Vincent Celier  <celier@adacore.com>
4569         * prj-part.adb (Parse_Single_Project): Accept to extend a project
4570         if it has only be imported by an project being extended. When a
4571         project that has only been imported by a project being extended
4572         is imported by another project that is not being extended,
4573         reset the previous indication, so that it will be an error if
4574         this project is extended later.
4575         * prj-tree.adb (Create_Project): Include component From_Extended
4576         in table Projects_HT
4577         * prj-tree.ads (Project_Name_And_Node): New Boolean component
4578         From_Extended
4580 2014-01-21  Robert Dewar  <dewar@adacore.com>
4582         * atree.ads, atree.adb: Add Node33 and Set_Node33.
4583         * einfo.ads, einfo.adb (SPARK_Pragma): New field (SPARK_Aux_Pragma):
4584         New field (SPARK_Pragma_Inherited): New flag
4585         (SPARK_Aux_Pragma_Inherited): New flag (SPARK_Mode_Pragmas):
4586         Removed.
4587         * lib.ads, lib.adb: Remove SPARK_Mode_Pragma, no longer used.
4588         * opt.ads (SPARK_Mode_Pragma): New global variable.
4589         * sem.ads: Add Save_SPARK_Mode_Pragma field to Scope_Stack_Entry.
4590         * sem_ch3.adb: Use new SPARK_Mode data structures.
4591         * sem_ch6.adb: Set SPARK_Mode fields in subprogram specs and bodies.
4592         * sem_ch7.adb: Set SPARK_Mode fields in package spec and body entities.
4593         * sem_ch8.adb (Push_Scope): Save SPARK_Mode_Pragma.
4594         (Pop_Scope): Restore SPARK_Mode_Pragma.
4595         * sem_prag.adb (Analyze_Pragma, case SPARK_Mode): Rewrite for
4596         new data structures.
4598 2014-01-21  Arnaud Charlet  <charlet@adacore.com>
4600         * back_end.adb: Undo previous change, not needed. Minor reformatting.
4602 2014-01-21  Thomas Quinot  <quinot@adacore.com>
4604         * exp_ch5.adb: Fix comment.
4605         * switch-c.adb: Minor comment update.
4606         * exp_ch3.adb: Minor reformatting.
4608 2014-01-21  Arnaud Charlet  <charlet@adacore.com>
4610         * back_end.adb (Scan_Compiler_Arguments): Do not store object
4611         filename in gnatprove mode.
4613 2014-01-21  Thomas Quinot  <quinot@adacore.com>
4615         * sinfo.ads (No_Ctrl_Actions): Clarify documentation (flag also
4616         suppresses usage of primitive _assign for tagged types).
4617         * exp_aggr.adb (Build_Array_Aggr_Code.Gen_Assign): Set
4618         No_Ctrl_Actions for a tagged type that does not require
4619         finalization, as we want to disable usage of _assign (which
4620         may cause undesirable discriminant checks on an uninitialized,
4621         invalid target).
4623 2014-01-21  Ed Schonberg  <schonberg@adacore.com>
4625         * sem_prag.adb: Reject invariant'class on completion.
4627 2014-01-21  Javier Miranda  <miranda@adacore.com>
4629         * exp_ch3.adb (Build_Init_Procedure): For
4630         derivations of interfaces, do not move the the initialization
4631         of the _parent field since such assignment is not generated.
4633 2014-01-21  Ed Schonberg  <schonberg@adacore.com>
4635         * sem_res.adb (Rewrite_Renamed_Operator): Do not replace entity
4636         with the operator it renames if we are within an expression of
4637         a pre/postcondition, because the expression will be reanalyzed
4638         at a later point, and the analysis of the renaming may affect
4639         the visibility of the operator when in an instance.
4641 2014-01-21  Robert Dewar  <dewar@adacore.com>
4643         * sinfo.ads, sinfo.adb: Change Do_Discriminant_Check to use new Flag1.
4644         Add this flag to type conversion nodes and assignment nodes.
4645         * treepr.adb: Deal properly with Flag 1,2,3.
4646         * treeprs.adt: Minor comment update.
4648 2014-01-21  Robert Dewar  <dewar@adacore.com>
4650         * sem_eval.adb (Compile_Time_Known_Value): Add Ignore_CRT
4651         parameter.
4652         * sem_eval.ads (Compile_Time_Known_Value): Add Ignore_CRT
4653         parameter, completely rewrite spec.
4655 2014-01-21  Ed Schonberg  <schonberg@adacore.com>
4657         * sem_ch10.adb (Install_Withed_Unit): If the unit is a subprogram
4658         instance that is inlined, it may have been rewritten as a wrapper
4659         package. In that case the unit that must be made visible is the
4660         related instance of the package.
4662 2014-01-21  Arnaud Charlet  <charlet@adacore.com>
4664         * exp_ch9.adb (Expand_N_Selective_Accept.Add_Accept): Refine
4665         previous change in codepeer mode.
4667 2014-01-21  Arnaud Charlet  <charlet@adacore.com>
4669         * exp_ch9.adb (Expand_N_Selective_Accept.Add_Accept): Always add
4670         call to Abort_Undefer, as expected by the runtime.
4671         * s-tasren.adb (Local_Complete_Rendezvous): Replace
4672         Defer_Abort_Nestable by Defer_Abort, since we do not expect abort to be
4673         deferred at this point. Update comments.
4675 2014-01-21  Thomas Quinot  <quinot@adacore.com>
4677         * exp_ch4.adb, exp_ch5.adb, checks.adb: Minor reformatting.
4679 2014-01-21  Arnaud Charlet  <charlet@adacore.com>
4681         * switch-c.adb, usage.adb, gnat_ugn.texi: Mark -gnates as internal,
4682         remove from doc.
4684 2014-01-21  Robert Dewar  <dewar@adacore.com>
4686         * switch-c.adb, usage.adb, atree.adb, atree.ads: Minor reformatting.
4688 2014-01-21  Thomas Quinot  <quinot@adacore.com>
4690         * atree.adb, atree.ads (Num_Extension_Nodes): Switch to Node_Id, since
4691         this is value is used in Node_Id arithmetic operations.
4692         (Copy_Node, Exchange_Entities): Use loops indexed by Num_Extension_Nodes
4693         instead of hard-coded unrolled code.
4695 2014-01-21  Yannick Moy  <moy@adacore.com>
4697         * gnat1drv.adb: Minor code cleanup, removing useless code.
4699 2014-01-21  Arnaud Charlet  <charlet@adacore.com>
4701         * opt.ads (SPARK_Switches_File_Name): New.
4702         * switch-c.adb (Scan_Front_End_Switches): Add handling of -gnates=xxx *
4703         * usage.adb (Usage): Document -gnates, in gnatprove mode only.
4704         * gnat_ugn.texi: Document -gnates.
4706 2014-01-21  Yannick Moy  <moy@adacore.com>
4708         * errout.adb (Special_Msg_Delete): Update comment. Remove
4709         special case for GNATprove which should not ignore mismatch
4710         in sizes for representation clauses.
4711         * sem_prag.adb (Analyze_Pragma): Remove special case for GNATprove
4712         which should not ignore pragma Pack.
4714 2014-01-21  Ed Schonberg  <schonberg@adacore.com>
4716         * sem_ch4.adb: Code clean up.
4718 2014-01-21  Steve Baird  <baird@adacore.com>
4720         * gnat_rm.texi: Improve GNAT RM description of SPARK_Mode pragma.
4722 2014-01-21  Robert Dewar  <dewar@adacore.com>
4724         * gcc-interface/gigi.h: Get Flags array address.
4725         * gcc-interface/trans.c: Acquire Flags array address.
4726         * atree.adb: Add support for Flags array and Flag0,1,2,3.
4727         * atree.ads: Add support for Flags array and Flag0,1,2,3.
4728         * atree.h: Add support for Flags array and Flag0,1,2,3.
4729         * back_end.adb: Pass Flags array address to gigi.
4731 2014-01-21  Ed Schonberg  <schonberg@adacore.com>
4733         * sem_ch8.adb (Attribute_Renaming): Transfer original attribute
4734         reference to generated body so that legality checks on stream
4735         attributes are properly applied. If type is tagged and already
4736         frozen, insert generated body at the point of the renaming
4737         declaration.
4739 2014-01-21  Ed Schonberg  <schonberg@adacore.com>
4741         * sem_ch12.adb: Code clean up.
4742         * sem_ch8.adb: Minor reformatting
4744 2014-01-20  Robert Dewar  <dewar@adacore.com>
4746         * checks.adb: Check SPARK_Mode instead of GNATProve_Mode for
4747         converting warnings on inevitable exceptions to errors.
4748         * exp_ch4.adb: Check SPARK_Mode instead of GNATProve_Mode for
4749         converting warnings on inevitable exceptions to errors.
4750         * opt.adb (SPARK_Mode_Config): Handled like other config flags
4751         * opt.ads (SPARK_Mode_Type): Moved here from types (renamed from
4752         SPARK_Mode_Id) (SPARK_Mode_Type): Add pragma Ordered, remove
4753         SPARK_ from names (SPARK_Mode): New flag (SPARK_Mode_Config):
4754         New flag (Config_Switches_Type): Add SPARK_Mode field
4755         * sem.adb: Minor code reorganization (remove unnecessary with)
4756         * sem.ads (Scope_Stack_Entry): Add Save_SPARK_Mode field
4757         * sem_aggr.adb: Check SPARK_Mode instead of GNATProve_Mode for
4758         converting warnings on inevitable exceptions to errors.
4759         * sem_attr.adb: Check SPARK_Mode instead of GNATProve_Mode for
4760         converting warnings on inevitable exceptions to errors.
4761         * sem_ch3.adb: Check SPARK_Mode instead of GNATProve_Mode for
4762         converting warnings on inevitable exceptions to errors.
4763         * sem_ch4.adb: Check SPARK_Mode instead of GNATProve_Mode for
4764         converting warnings on inevitable exceptions to errors.
4765         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Reset SPARK_Mode
4766         from spec if needed
4767         * sem_ch7.adb (Analyze_Package_Body_Helper): Reset SPARK_Mode
4768         from spec if needed
4769         * sem_ch8.adb (Push_Scope): Save SPARK_Mode (Pop_Scope):
4770         Restore SPARK_Mode
4771         * sem_elab.adb: Check SPARK_Mode instead of GNATProve_Mode for
4772         converting warnings on inevitable exceptions to errors.
4773         * sem_prag.adb (Get_SPARK_Mode_From_Pragma): New function
4774         (Get_SPARK_Mode_Id): Removed (Get_SPARK_Mode_Type): New name
4775         of Get_SPARK_Mode_Id
4776         * sem_prag.ads (Get_SPARK_Mode_From_Pragma): New function
4777         * sem_res.adb: Check SPARK_Mode instead of GNATProve_Mode for
4778         converting warnings on inevitable exceptions to errors.
4779         * sem_util.adb: Check SPARK_Mode instead of GNATProve_Mode for
4780         converting warnings on inevitable exceptions to errors.
4781         * types.ads (SPARK_Mode_Id): Moved to opt.ads and renamed
4782         SPARK_Mode_Type
4784 2014-01-20  Ed Schonberg  <schonberg@adacore.com>
4786         * sem_ch13.adb: Add semantic information to rewritten type
4787         reference.
4789 2014-01-20  Ed Schonberg  <schonberg@adacore.com>
4791         * exp_ch5.adb (Expand_N_Assignment_Statement): If both sides
4792         are of a type with unknown discriminants, convert both to the
4793         underlying view of the type, so that the proper constraint check
4794         can be applied to the right-hand side.
4796 2014-01-20  Robert Dewar  <dewar@adacore.com>
4798         * atree.adb (Copy_Node): Fix failure to copy last component
4799         (Exchange_Entities): Fix failure to exchange last entity
4801 2014-01-20  Ed Schonberg  <schonberg@adacore.com>
4803         * sem_ch12.adb: Code clean up.
4805 2014-01-20  Robert Dewar  <dewar@adacore.com>
4807         * gnat_rm.texi, sem_ch4.adb: Minor reformatting.
4809 2014-01-20  Ed Schonberg  <schonberg@adacore.com>
4811         * sem_ch4.adb (Analyze_Quantified_Expression): If after
4812         pre-analysis  the loop parameter specification has been
4813         rewritten as a iterator specification, propagate the change to
4814         the quantified expression, for ASIS navigtion needs.
4816 2014-01-20  Vincent Celier  <celier@adacore.com>
4818         * par-ch10.adb: Minor error message change: escape [ and ].
4820 2014-01-20  Robert Dewar  <dewar@adacore.com>
4822         * checks.adb: Make warnings on exceptions into errors in GNATprove mode.
4823         * errout.adb: Implement [ and ] insertion characters.
4824         * errout.ads: Document new [ and ] insertion characters.
4825         * sem_ch12.adb, restrict.adb, frontend.adb, exp_ch7.adb: Minor
4826         addition of ??? comment.
4827         * lib-xref.adb, exp_util.adb, gnat1drv.adb: Minor reformatting
4828         * exp_ch4.adb, sem_ch3.adb, sem_ch4.adb, sem_ch6.adb, sem_elab.adb,
4829         sem_eval.adb, sem_res.adb, sem_util.adb, sem_attr.adb, sem_aggr.adb:
4830         Make warnings on exceptions into errors in GNATprove mode.
4831         * sem_dim.adb: Minor reformatting throughout Quote [ and ]
4832         in error messages.
4834 2014-01-20  Ed Schonberg  <schonberg@adacore.com>
4836         * sem_ch13.adb: Code clean up.
4838 2014-01-20  Robert Dewar  <dewar@adacore.com>
4840         * errout.ads, errout.adb: Implement >? >x? >X? sequences in error
4841         messages.
4842         * sem_ch6.adb (Check_Statement_Sequence): Missing return is an
4843         error in GNATprove mode.
4845 2014-01-20  Ed Schonberg  <schonberg@adacore.com>
4847         * par-ch4.adb (Is_Parameterless_Attribute): The Ada2012 attribute
4848         reference 'Old takes no parameters, and thus can appear as a
4849         prefix of a slice.
4851 2014-01-20  Eric Botcazou  <ebotcazou@adacore.com>
4853         * exp_aggr.adb: Fix minor typos.
4855 2014-01-20  Ed Schonberg  <schonberg@adacore.com>
4857         * sem_attr.adb (Analyze_Attribute, case 'Constrained): In an
4858         instance the attribute is legal, and its value is determined
4859         statically if the type has no discriminants. This choice is
4860         more useful than rechecking the legality rule in the instance,
4861         is consistent with older usage, and is also consistent with all
4862         existing tests.
4864 2014-01-20  Arnaud Charlet  <charlet@adacore.com>
4866         * sem_cat.adb (Validate_Static_Object_Name): Change error into
4867         warning in Relaxed_Semantic_Mode.
4869 2014-01-20  Ed Schonberg  <schonberg@adacore.com>
4871         * sem_attr.adb: Code and comments cleanup.
4873 2014-01-20  Yannick Moy  <moy@adacore.com>
4875         * debug.adb Free debug flags -gnatd.D, -gnatd.G and -gnatd.V *
4876         * errout.adb (Compilation_Errors): Remove special handling in
4877         GNATprove mode.
4878         * gnat1drv.adb (Adjust_Global_Switches): Remove handling of the
4879         removed debug flags.
4880         * gnat_rm.texi: Initial documentation for Abstract_State, Depends,
4881         Global, Initial_Condition, Initializes and Refined_State pragmas and
4882         aspects.
4883         * opt.ads (Frame_Condition_Mode, Formal_Extensions,
4884         SPARK_Strict_Mode): Remove global flags.
4885         * sem_ch3.adb (Analyze_Object_Declaration): Check of no hidden state
4886         always performed now, on packages declaring a null state.
4887         (Signed_Integer_Type_Declaration): Remove ill-designed attempt
4888         at providing pedantic mode for bounds of integer types.
4889         * sem_ch4.adb (Analyze_Quantified_Expression): Warning on suspicious
4890         "some" quantified expression now issued under control of -gnatw.t,
4891         like the other warning on unused bound variable.
4892         * sem_prag.adb (Check_Precondition_Postcondition): Remove useless test
4893         on removed flag.
4894         (Analyze_Pragma): Remove tests for SPARK 2014
4895         pragmas, not officially allowed by GNAT.
4897 2014-01-20  Hristian Kirtchev  <kirtchev@adacore.com>
4899         * sem_prag.adb (Analyze_Pragma): Ensure that
4900         the sole argument of pragmas Abstract_State, Contract_Cases,
4901         Depends, Global and Initializes in in aggregate form.
4902         (Analyze_Refined_Pragma): Ensure that the sole argument of
4903         pragmas Refined_Depends, Refined_Global and Refined_State is in
4904         aggregate form.
4905         (Ensure_Aggregate_Form): New routine.
4907 2014-01-20  Doug Rupp  <rupp@adacore.com>
4909         * sem_attr.adb (Analyze_Attribute): case
4910         Attribute_Constrained => treat all prefixes as legal for Declib
4911         compatibility.
4913 2014-01-20  Hristian Kirtchev  <kirtchev@adacore.com>
4915         * sem_prag.adb (Check_Mode): Reimplement the routine.
4916         (Find_Mode): New routine.
4918 2014-01-20  Robert Dewar  <dewar@adacore.com>
4920         * sem_ch4.adb (Operator_Check): Handle additional
4921         Allow_Integer_Address cases.
4923 2014-01-20  Robert Dewar  <dewar@adacore.com>
4925         * gnat_rm.texi (Allow_Integer_Address): Remove note about not
4926         allowed if address is non-private, no longer true.
4927         * sem_prag.adb (Analyze_Pragma, case Allow_Integer_Address):
4928         Remove check for address being private, causes difficulty when
4929         pragma used in gnat.adc file and is not needed, since we guard
4930         this in Address_Integer_Convert_OK.
4931         * exp_ch7.adb: Minor reformatting.
4932         * sem_ch4.adb: Handle operator operands in Allow_Integer_Address mode.
4934 2014-01-20  Robert Dewar  <dewar@adacore.com>
4936         * checks.adb (Apply_Range_Check): Remove gnatprove special
4937         casing of exponentiation.
4938         * sem_res.adb (Resolve_Op_Expon): Apply range check to right
4939         operand for integer case to check range against Natural.
4941 2014-01-20  Robert Dewar  <dewar@adacore.com>
4943         * s-tataat.adb: Minor reformatting.
4945 2014-01-20  Robert Dewar  <dewar@adacore.com>
4947         * einfo.adb (Is_Descendent_Of_Address): Now applies to all
4948         entities, and also fix documentation to remove mention of visible
4949         integer type, since this is not what the implementation does.
4950         * einfo.ads (Is_Descendent_Of_Address): Now applies to all
4951         entities, and also fix documentation to remove mention of visible
4952         integer type, since this is not what the implementation does.
4953         * gnat_rm.texi: Minor clarification of Allow_Integer_Address
4954         function.
4955         * sem_ch4.adb (Analyze_One_Call): Handle Allow_Integer_Address
4956         case for parameter type check.
4957         * sem_res.adb (Resolve): Use new function
4958         Address_Integer_Convert_OK.
4959         * sem_type.adb: Minor code reorganization (use Ekind_In) Minor
4960         reformatting throughout.
4961         * sem_util.adb (Address_Integer_Convert_OK): New function.
4962         * sem_util.ads: Minor reformatting (put specs in alpha order)
4963         (Address_Integer_Convert_OK): New function.
4965 2014-01-20  Thomas Quinot  <quinot@adacore.com>
4967         * exp_ch7.adb (Wrap_Transient_Expression):
4968         Insertion extra conditional expression only if
4969         Opt.Suppress_Control_Flow_Optimizations is set.
4971 2014-01-20  Arnaud Charlet  <charlet@adacore.com>
4973         * s-tataat.adb (Initialize_Attributes): Abort might already be
4974         deferred in Create_Task.
4976 2014-01-20  Hristian Kirtchev  <kirtchev@adacore.com>
4978         * checks.adb (Apply_Scalar_Range_Check): Flag
4979         the exponent as requiring a range check when the expression is
4980         an exponentiation.
4982 2014-01-20  Fedor Rybin  <frybin@adacore.com>
4984         * gnat_ugn.texi: Documenting --passed-tests option for gnattest.
4986 2014-01-20  Hristian Kirtchev  <kirtchev@adacore.com>
4988         * sem_util.adb (Default_Initialization): New routine.
4989         * sem_util.ads: Add new type Default_Initialization_Kind.
4990         (Default_Initialization): New routine.
4992 2014-01-20  Hristian Kirtchev  <kirtchev@adacore.com>
4994         * sem_prag.adb (Check_Mode): Correct all error
4995         message logic dealing with in/in out parameters that may appear
4996         as inputs or have a self reference.
4998 2014-01-20  Robert Dewar  <dewar@adacore.com>
5000         * exp_ch9.adb, checks.adb, exp_intr.adb: Minor reformatting.
5001         * sem_res.adb (Resolve): Fix error causing infinite loop for
5002         integer used as address. Allow addresses as integers.
5004 2014-01-20  Arnaud Charlet  <charlet@adacore.com>
5006         * s-osinte-linux.ads (struct_sigaction): Fix rep clause.
5008 2014-01-20  Bob Duff  <duff@adacore.com>
5010         * par-ch8.adb (P_Use_Type_Clause): Detect syntax
5011         error when "use all" is not followed by "type".
5013 2014-01-20  Bob Duff  <duff@adacore.com>
5015         * exp_intr.adb (Expand_Unc_Deallocation): Remove warning on abort
5016         followed by free.
5018 2014-01-20  Ed Schonberg  <schonberg@adacore.com>
5020         * checks.adb (Apply_Address_Clause_Check): If there is an
5021         alignment check on the expression in an address clause, and there
5022         is no local exception propagation, add an additional explanatory
5023         message to clarify the cause of previous warning.
5025 2014-01-20  Robert Dewar  <dewar@adacore.com>
5027         * exp_ch7.adb: Minor reformatting.
5028         * opt.ads: Minor comment updates.
5029         * sem.adb: Minor name change Is_Main_Unit =>
5030         Is_Main_Unit_Or_Main_Unit_Spec.
5031         * sem_ch6.adb: Minor reformatting and code reorganization.
5033 2014-01-20  Bob Duff  <duff@adacore.com>
5035         * gnat_ugn.texi: Update gnatpp switches.
5037 2014-01-20  Thomas Quinot  <quinot@adacore.com>
5039         * exp_ch9.adb: Minor comment edit.
5041 2014-01-20  Robert Dewar  <dewar@adacore.com>
5043         * gnat_rm.texi: Document that Allow_Integer_Address is permitted
5044         only if System.Address is a private type.
5045         * opt.ads (Allow_Integer_Address): No longer set by -gnates.
5046         * sem_prag.adb (Analyze_Pragma, case Allow_Integer_Address):
5047         Allowed only if type System.Address is private, since otherwise
5048         it makes no sense.
5049         * sem_res.adb: Fix failure to properly Analyze unchecked
5050         conversions that were introduced by Allow_Integer_Address.
5051         * switch-c.adb: Remove -gnates switch.
5052         * usage.adb: Remove -gnates switch.
5053         * gnat_ugn.texi: Remove documentation of -gnates flag.
5055 2014-01-20  Ed Schonberg  <schonberg@adacore.com>
5057         * sem_ch6.adb (Analyze_Expression_Function): Pre-analyze and
5058         resolve expression to perform proper name capture.
5060 2014-01-20  Ed Schonberg  <schonberg@adacore.com>
5062         * sem.adb (Semantics): When saving/restoring configuration
5063         switches, the spec of a pre- defined unit that is the main unit
5064         must be treated as a predefined unit as well.
5066 2014-01-20  Thomas Quinot  <quinot@adacore.com>
5068         * exp_ch7.adb (Wrap_Transient_Expression): For a Boolean
5069         expression, insert an extra conditional expression when saving
5070         the value of the expression, for the benefit of control flow
5071         graph based coverage analysis.
5072         * exp_ch3.adb: Minor reformatting.
5074 2014-01-20  Robert Dewar  <dewar@adacore.com>
5076         * gnat1drv.adb: Set Allow_Integer_Address in relaxed semantics mode.
5077         * gnat_rm.texi: Document pragma Allow_Integer_Address.
5078         * gnat_ugn.texi: Document pragma Allow_Integer_Address, -gnates.
5079         * opt.ads: New flag Allow_Integer_Address.
5080         * par-prag.adb: Dummy entry for pragma Allow_Integer_Address.
5081         * sem_ch5.adb: Minor reformatting.
5082         * sem_prag.adb: Implement pragma Allow_Integer_Address.
5083         * sem_res.adb (Resolve): Allow integer address value if
5084         switch set.
5085         * sem_util.adb: Minor reformatting.
5086         * snames.ads-tmpl: Add entry for pragma Allow_Integer_Address.
5087         * switch-c.adb: Recognize flag -gnates.
5088         * usage.adb: Document flag -gnates.
5090 2014-01-20  Thomas Quinot  <quinot@adacore.com>
5092         * s-tadeca.adb: Fix minor typos in comment.
5094 2014-01-20  Pascal Obry  <obry@adacore.com>
5096         * s-win32.ads (FreeLibrary): New import.
5098 2014-01-20  Robert Dewar  <dewar@adacore.com>
5100         * sem_res.adb, sem_cat.adb: Minor reformatting.
5101         * sem_ch11.adb (Analyze_Raise_Statement): Only give warning about
5102         assigning to OUT parameters for the current subprogram scope.
5103         * exp_ch4.adb: Minor reformatting.
5105 2014-01-20  Ed Schonberg  <schonberg@adacore.com>
5107         * exp_ch4.adb (Process_Transient_Object,
5108         Find_Enclosing_Contexts): If the top-level if-expression that
5109         generated the transient object is an actual in a call, the proper
5110         Hook_Context is a construct enclosing the call.
5111         * einfo.ads: Indicate that Related_Expression is used to link a
5112         loop variable to the container expression over which the loop
5113         takes place.
5114         (Analyze_Iterator_Specification): Set the Related_Expression of
5115         the loop variable in a container element iterator.
5116         (Note_Possible_Modification): If the variable is the loop
5117         variable in a container element iterator, indicate that the
5118         enclosing container is also modified.
5120 2014-01-20  Hristian Kirtchev  <kirtchev@adacore.com>
5122         * aspects.adb (Move_Or_Merge_Aspects): Reimplemented.
5124 2014-01-20  Robert Dewar  <dewar@adacore.com>
5126         * s-taasde.ads, gnat_ugn.texi, s-tadeca.adb, sem_res.adb, s-tadeca.ads:
5127         Minor reformatting and code clean up.
5129 2014-01-20  Arnaud Charlet  <charlet@adacore.com>
5131         * sem_cat.adb (Validate_Object_Declaration): Relax semantics
5132         of objects of private type if Relaxed_RM_Semantics.
5134 2014-01-20  Claire Dross  <dross@adacore.com>
5136         * a-cofove.ads (Vector): Capacity discriminant
5137         should be in range of the index.
5139 2014-01-20  Thomas Quinot  <quinot@adacore.com>
5141         * a-caldel.ads(To_Duration), s-taasde.ads(Time_Enqueue):
5142         Clarify specs s-tadeca.adb(Enqueue_Calendar): Compensate for
5143         possible difference between epoch of Ada.Calendar clock and Ada
5144         real-time/tasking clock.
5145         * s-taprop-posix.adb: Minor comment fix.
5147 2014-01-20  Doug Rupp  <rupp@adacore.com>
5149         * sysdep.c [vxworks]: Remove Vxworks version noise for RTP.
5151 2014-01-20  Hristian Kirtchev  <kirtchev@adacore.com>
5153         * exp_attr.adb (Expand_N_Attribute_Reference): Generate validity
5154         checks on the prefix of attribute 'Old.
5155         * sem_ch3.adb (Process_Range_Expr_In_Decl): Suppress the
5156         generation of validity checks on a range that belongs to the
5157         iteration scheme of a quantified expression.
5158         * sem_ch5.adb (One_Bound): Suppress the generation of validity
5159         checks on a bound that belongs to the iteration scheme of a
5160         quantified expression, generate the check in all other cases.
5162 2014-01-20  Bob Duff  <duff@adacore.com>
5164         * gnat_ugn.texi: Enable --pp-new by default. Minor reorganization.
5166 2014-01-20  Ed Schonberg  <schonberg@adacore.com>
5168         * sem_res.adb (Resolve): When compiling a predefined unit, ignore
5169         interpretations that do not come from other predefined units,
5170         to prevent spurious ambiguities in the presence of user-defined
5171         operators in the context of (an instance of) a predefined unit.
5173 2014-01-20  Robert Dewar  <dewar@adacore.com>
5175         * gnat_rm.texi: Document that Loop_Variant is included in
5176         Statement_Assertions.
5177         * sem_prag.adb (Check_Kind): Add Loop_Variant to
5178         Statement_Assertions (Check_Applicable_Policy): Add Loop_Variant
5179         to Statement_Assertions.
5181 2014-01-20  Doug Rupp  <rupp@adacore.com>
5183         * sysdep.c (__gnat_is_file_not_found_error) [vxworks6]: Add case
5184         for errno ENOENT from RTP on NFS mounted file system.
5186 2014-01-20  Ed Schonberg  <schonberg@adacore.com>
5188         * sem_util.adb (Check_Function_Writable_Actuals): 1) Do not
5189         examine code that does not come from source. The check does not
5190         apply to code generated for constraint checks, and such code may
5191         generate spurious error messages when compiled with expansion
5192         disabled (as in a generic unit) because side effects may not
5193         have been removed.
5194         2) Make error messages more explicit: indicate the component
5195         of the  construct whose value is indeterminate because of a
5196         call to a function with in-out parameter in another component,
5197         when there is no mandated order of execution between the two
5198         components (actuals, aggregate components, alternatives).
5200 2014-01-20  Robert Dewar  <dewar@adacore.com>
5202         * gnat_rm.texi: Minor cleanup.
5204 2014-01-20  Hristian Kirtchev  <kirtchev@adacore.com>
5206         * sem_attr.adb (Analyze_Attribute): Attributes 'Old and 'Result
5207         can now apply to a refined postcondition.
5208         * sem_ch6.adb (Analyze_Subprogram_Contract): Remove local
5209         variable Result_Seen. Add variables Case_Prag, Post_Prag,
5210         Seen_In_Case and Seen_In_Post. Update the mechanism that detects
5211         whether postconditions and/or constract-cases mention attribute
5212         'Result and introduce a post-state when applied to functions.
5213         (Check_Result_And_Post_State): Removed.
5214         * sem_prag.adb (Analyze_Pragma): Add local variable
5215         Result_Seen. Verify that the expression of pragma Refined_Post
5216         mentions attribute 'Result and introduces a post-state.
5217         * sem_util.ads, sem_util.adb (Check_Result_And_Post_State): New routine.
5219 2014-01-20  Hristian Kirtchev  <kirtchev@adacore.com>
5221         * exp_ch7.adb (Is_Subprogram_Call): New routine.
5222         (Process_Transient_Objects): Make variable Must_Hook global with
5223         respect to all locally declared subprograms. Search the context
5224         for at least one subprogram call.
5225         (Requires_Hooking): Removed.
5227 2014-01-20  Claire Dross  <dross@adacore.com>
5229         * a-cfdlli.ads a-cfhama.ads a-cfhase.ads a-cforma.ads
5230         * a-cforse.ads a-cofove.ads: Add pragma Annotate (GNATprove,
5231         External_Axiomatization);
5233 2014-01-20  Robert Dewar  <dewar@adacore.com>
5235         * sem_attr.adb (Analyze_Attribute, case Loop_Entry): Allow
5236         Loop_Entry in Assert, Assert_And_Cut, and Assume pragmas.
5237         * sem_prag.adb (Analyze_Pragma, case Assert[_And_Cut], Assume):
5238         Allow Loop_Entry to be used in these pragmas if they appear in
5239         an appropriate context.
5240         (Placement_Error): Specialize error
5241         message for pragma Assert[_And_Cut] or pragma Assume containing
5242         Loop_Entry attribute.
5243         * a-exexpr-gcc.adb, sinput.adb: Minor reformatting.
5244         * s-excmac-arm.ads, s-except.ads, s-excmac-gcc.ads: Minor reformatting
5245         and code clean ups.
5247 2014-01-20  Robert Dewar  <dewar@adacore.com>
5249         * gnat1drv.adb: Minor comment update.
5251 2014-01-20  Tristan Gingold  <gingold@adacore.com>
5253         * raise-gcc.c (PERSONALITY_FUNCTION/arm): Remove unused
5254         variables, comment out unused code.
5255         * a-exexpr-gcc.adb: Move declarations to s-excmac-gcc.ads
5256         * s-excmac-gcc.ads: New file, extracted from a-exexpr-gcc.adb
5257         * s-excmac-arm.ads: New file.
5259 2014-01-20  Hristian Kirtchev  <kirtchev@adacore.com>
5261         * exp_ch4.adb (Expand_N_Slice): Remove constant D and variables
5262         Drange and Index_Typ. Remove the circuitry which creates a
5263         range check to compare the index type of the array against the
5264         discrete_range.
5265         * sem_res.adb (Resolve_Slice): Add local variable Dexpr. Update
5266         the circuitry which creates a range check to handle a
5267         discrete_range denoted by a subtype indication.
5269 2014-01-20  Pierre-Marie Derodat  <derodat@adacore.com>
5271         * sinput.adb, sinput.ads (Sloc_Range): Traverse the tree of original
5272         nodes to get the original sloc range.
5274 2014-01-20  Hristian Kirtchev  <kirtchev@adacore.com>
5276         * sem_prag.adb (Analyze_Pragma): Use Defining_Entity to obtain the
5277         entity of a [library level] package.
5279 2014-01-20  Tristan Gingold  <gingold@adacore.com>
5281         * raise-gcc.c (exception_class_eq): New function.
5282         (is_handled_by): Use it to compare exception classes.
5283         (PERSONALITY_STORAGE): Define.  (continue_unwind): New function to
5284         be called to return URC_CONTINUE_UNWIND.
5285         (personality_body): New function, extracted from PERSONALITY_ROUTINE.
5286         (PERSONALITY_ROUTINE): Add an implementation for the ARM unwinder.
5288 2014-01-20  Robert Dewar  <dewar@adacore.com>
5290         * opt.ads: Minor comment update.
5292 2014-01-20  Hristian Kirtchev  <kirtchev@adacore.com>
5294         * exp_ch4.adb (Expand_N_Slice): Relocate some variables and
5295         constants to the "Local variables" area. Add new constant D. Add
5296         new variables Drange and Index_Typ.  Rename Pfx to Rep and Ptp
5297         to Pref_Typ and update all occurrences. Add circuitry to extract
5298         the discrete_range and the index type and build a range check.
5300 2014-01-20  Arnaud Charlet  <charlet@adacore.com>
5302         * gnat1drv.adb (Adjust_Global_Switches): Enable
5303         Treat_Categorization_Errors_As_Warnings when Relaxed_RM_Semantics
5304         is set.
5306 2014-01-20  Thomas Quinot  <quinot@adacore.com>
5308         * sem_ch5.adb, sem_ch4.adb: Minor reformatting.
5310 2014-01-20  Hristian Kirtchev  <kirtchev@adacore.com>
5312         * sem_ch13.adb (Analyze_Aspect_Specifications):
5313         When aspect SPARK_Mode appears on a package body, insert the
5314         generated pragma at the top of the body declarations.
5316 2014-01-20  Robert Dewar  <dewar@adacore.com>
5318         * sem_aggr.adb, exp_prag.adb, sem_aux.adb, sinfo.ads, sem_ch10.adb,
5319         checks.adb, sem_prag.adb, sem_ch12.adb, freeze.adb, g-arrspl.adb,
5320         expander.adb, gnat1drv.adb, exp_ch4.adb, sem_ch6.adb,
5321         sem_ch8.adb, exp_dist.adb: Minor reformatting.
5323 2014-01-20  Yannick Moy  <moy@adacore.com>
5325         * gnat1drv.adb (Gnat1drv): Call Write_ALI with Object=True in GNATprove
5326         mode.
5328 2014-01-20  Pascal Obry  <obry@adacore.com>
5330         * g-arrspl.ads (Slice_Set): New definition (will use a copy on
5331         write scheme).
5332         * g-arrspl.adb: Adapt all routine to this new implementation.
5333         (Set): Copy the Slice_Set definition before reusing it.
5335 2014-01-20  Arnaud Charlet  <charlet@adacore.com>
5337         * sem_prag.adb (Process_Import_Or_Interface): In
5338         Relaxed_RM_Semantics, support old Ada 83 style of pragma Import.
5339         (Analyze_Pragma): Ditto for pragma Export.
5340         * exp_prag.adb (Expand_Pragma_Import_Or_Interface): Handle old pragma
5341         Import style.
5343 2014-01-20  Hristian Kirtchev  <kirtchev@adacore.com>
5345         * einfo.ads: E_Abstract_State is now part of the entities that
5346         can be overloaded. Update type Overloadable_Kind to reflect the
5347         inclusion of abstract states.
5348         * sem_ch6.adb (New_Overloaded_Entity): A function can now
5349         overload an abstract state.
5350         * sem_prag.adb (Analyze_Constituent): Handle the overloading
5351         of states by functions. Use Entity_Of to obtain the entity of
5352         a constituent.  (Analyze_Global_Item): Handle the overloading of
5353         states by functions.
5354         (Analyze_Initialization_Item): Handle the
5355         overloading of states by functions.  Use Entity_Of to obtain the
5356         entity of an item.
5357         (Analyze_Input_Item): Handle the overloading
5358         of states by functions. Use Entity_Of to obtain the entity of an item.
5359         (Analyze_Input_Output): Handle the overloading of states by functions.
5360         (Analyze_Refinement_Clause): Handle the overloading
5361         of states by functions.  Use Entity_Of to obtain the entity of an item.
5362         (Appears_In): Use Entity_Of to obtain the entity of an element.
5363         (Check_Usage): Use Entity_Of to obtain the entity of
5364         an item. Add a guard to prevent a crash due to a previous error.
5365         (Resolve_State): New routine.
5367 2014-01-20  Yannick Moy  <moy@adacore.com>
5369         * spark_xrefs.ads, debug.adb, gnat1drv.adb, errout.adb, errout.ads,
5370         opt.ads: Minor comments updates.
5372 2014-01-20  Hristian Kirtchev  <kirtchev@adacore.com>
5374         * einfo.adb (Non_Limited_View): Applies to abstract states.
5375         (Set_From_Limited_With): Applies to abstract states.
5376         (Set_Non_Limited_View): Applies to abstract states.
5377         (Write_Field17): Output the non-limited view of an abstract state.
5378         * einfo.ads: Update the comment on usage and occurrences in
5379         nodes for attributes From_Limited_With and Non_Limited_View.
5380         * sem_aux.adb (Available_View): This routine can now handle
5381         abstract states.
5382         * sem_aux.ads (Available_View): This routine can now handle
5383         abstract states. Update the comment on usage.
5384         * sem_ch8.adb (Find_Expanded_Name): Handle abstract views
5385         of states and variables.
5386         (In_Pragmas_Depends_Or_Global): New routine.
5387         * sem_ch10.adb (Build_Limited_Views): Implement
5388         abstract (limited) views of variables and states.
5389         (Build_Shadow_Entity): This routine is now a procedure. Add
5390         formal parameter Shadow. Update the comment on usage. Add
5391         context-specific decoration for states and variables.
5392         (Decorate_State): New routine.  (Decorate_Variable): New routine.
5393         (Find_And_Process_States): New routine.
5394         (Process_Declarations): Renamed to Process_Declarations_And_States.
5395         (Process_Declarations_And_States): Add formal parameters
5396         Pack and Create_Abstract_Views. Update the comment on usage.
5397         (Process_States): New routine.
5398         * sem_prag.adb (Check_Dependency_Clause): Handle abstract
5399         views of states and variables. Match the abstract view of a state
5400         against its corresponding non-abstract view.
5401         (Is_Matching_Input):
5402         Handle abstract views of states and variables. Match the abstract
5403         view of a state against its corresponding non-abstract view.
5404         (Process_Global_Item): Handle abstract views of states and
5405         variables.
5407 2014-01-20  Bob Duff  <duff@adacore.com>
5409         * sem_ch10.adb (Expand_With_Clause): Don't
5410         recurse on the prefix if the current with-ed name refers to a
5411         package that renames its own parent, eg "package P.Q renames P;".
5413 2014-01-20  Yannick Moy  <moy@adacore.com>
5415         * exp_spark.adb (Expand_SPARK_Call): Remove procedure.
5416         * opt.adb, opt.ads (Full_Expander_Active): Remove function.
5417         * checks.adb, exp_ch6.adb, exp_ch9.adb, exp_disp.adb, sem_aggr.adb,
5418         * sem_ch10.adb, sem_ch5.adb, sem_ch6.adb, sem_ch8.adb, sem_ch9.adb,
5419         * sem_disp.adb, sem_res.adb Replace Full_Expander_Active by
5420         Expander_Active.
5422 2014-01-20  Yannick Moy  <moy@adacore.com>
5424         * sinfo.ads Update documentation of GNATprove mode.
5426 2014-01-20  Yannick Moy  <moy@adacore.com>
5428         * adabkend.adb, ali-util.adb, errout.adb, exp_ch7.adb,
5429         * exp_dbug.adb, freeze.adb, lib-xref.adb, restrict.adb,
5430         * sem_attr.adb, sem_ch4.adb, sem_ch5.adb, sem_ch6.adb, sem_ch8.adb,
5431         * sem_prag.adb, sem_res.adb, sem_util.adb Rename SPARK_Mode into
5432         GNATprove_Mode.
5433         * sem_ch13.adb: Remove blank.
5434         * exp_spark.adb, exp_spark.ads (Expand_SPARK_Call): Only replace
5435         subprograms by alias for renamings, not for inherited primitive
5436         operations.
5437         * exp_util.adb (Expand_Subtype_From_Expr): Apply the expansion
5438         in GNATprove mode.
5439         (Remove_Side_Effects): Apply the removal in
5440         GNATprove mode, for the full analysis of expressions.
5441         * expander.adb (Expand): Call the light SPARK expansion in GNATprove
5442         mode.
5443         (Expander_Mode_Restore, Expander_Mode_Save_And_Set): Ignore
5444         save/restore actions for Expander_Active flag in GNATprove mode,
5445         similar to what is done in ASIS mode.
5446         * frontend.adb (Frontend): Generic bodies are instantiated in
5447         GNATprove mode.
5448         * gnat1drv.adb (Adjust_Global_Switches): Set operating
5449         mode to Check_Semantics in GNATprove mode, although a light
5450         expansion is still performed.
5451         (Gnat1drv): Set Back_End_Mode to
5452         Declarations_Only in GNATprove mode, and later on special case
5453         the GNATprove mode to continue analysis anyway.
5454         * lib-writ.adb (Write_ALI): Always generate ALI files in
5455         GNATprove mode.
5456         * opt.adb, opt.ads (Full_Expander_Active): Make it equivalent to
5457         Expander_Active.
5458         (SPARK_Mode): Renamed as GNATprove_Mode.
5459         * sem_aggr.adb (Aggregate_Constraint_Checks): Add checks in the
5460         tree in GNATprove_Mode.
5461         * sem_ch12.adb (Analyze_Package_Instantiation): Always instantiate
5462         body in GNATprove mode.
5463         (Need_Subprogram_Instance_Body): Always instantiate body in GNATprove
5464         mode.
5465         * sem_ch3.adb (Constrain_Index, Process_Range_Expr_In_Decl):
5466         Make sure side effects are removed in GNATprove mode.
5468 2014-01-20  Eric Botcazou  <ebotcazou@adacore.com>
5470         * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Robustify tests
5471         for aliased objects with an unconstrained nominal subtype.
5472         * gcc-interface/trans.c (Call_to_gnu): Likewise.
5473         (gnat_to_gnu) <case N_Op_Not>: Robustify test for private type.
5474         <case N_Op_Minus>: Remove useless code.
5475         (Exception_Handler_to_gnu_zcx): Minor tweaks.
5477 2014-01-20  Eric Botcazou  <ebotcazou@adacore.com>
5479         * gcc-interface/decl.c (gnat_to_gnu_entity) <case E_Record_Subtype>:
5480         Tidy up.  For a subtype with discriminants and variant part, if a
5481         variant is statically selected and the fields all have a constant
5482         position, put them in order of increasing position.  Likewise if
5483         no variant part but representation clause is present.
5484         * gcc-interface/utils.c (make_packable_type): Robustify.
5485         (maybe_pad_type): Use local variable and tidy up condition.  If no
5486         alignment is specified, use the original one.
5487         (create_type_stub_decl): Minor tweak.
5488         (convert) <case VECTOR_CST>: Fix typo.
5489         <case CONSTRUCTOR>: Deal with padding types around the same type.
5490         Do not punt on missing fields.
5491         (unchecked_convert): Call finish_record_type to lay out the special
5492         record types made for conversions from/to problematic integer types.
5493         Bump the alignment of CONSTRUCTORs before converting them to a more
5494         aligned type.
5496 2014-01-20  Eric Botcazou  <ebotcazou@adacore.com>
5498         * gcc-interface/decl.c (gnat_to_gnu_entity) <case E_Component>: Remove
5499         obsolete code for type_annotate_only mode, simplify code and slightly
5500         improve wording of comments.
5502 2014-01-12  Eric Botcazou  <ebotcazou@adacore.com>
5504         PR ada/59772
5505         * gcc-interface/cuintp.c (build_cst_from_int): Use 32-bit integer type
5506         as intermediate type.
5507         (UI_To_gnu): Likewise.
5509 2014-01-03  Eric Botcazou  <ebotcazou@adacore.com>
5511         * gnatvsn.ads (Current_Year): Bump to 2014.
5513 2014-01-02  Tobias Burnus  <burnus@net-b.de>
5515         * gnat_ugn.texi: Bump @copying's copyright year.
5517 Copyright (C) 2014 Free Software Foundation, Inc.
5519 Copying and distribution of this file, with or without modification,
5520 are permitted in any medium without royalty provided the copyright
5521 notice and this notice are preserved.