Update ChangeLogs for wide-int work.
[official-gcc.git] / gcc / ada / ChangeLog
blob57c5176c838152c100acb0ea181c263193ef227d
1 2014-05-06  Kenneth Zadeck  <zadeck@naturalbridge.com>
2             Mike Stump  <mikestump@comcast.net>
3             Richard Sandiford  <rdsandiford@googlemail.com>
5         * gcc-interface/cuintp.c (UI_From_gnu): Use wide-int interfaces.
6         * gcc-interface/decl.c (gnat_to_gnu_entity): Use TYPE_SIGN.
7         (annotate_value): Use wide-int interfaces.
8         * gcc-interface/utils.c (get_nonnull_operand): Use tree_fits_uhwi_p.
10 2014-04-28  Richard Henderson  <rth@redhat.com>
12         * gcc-interface/Makefile.in: Support aarch64-linux.
14 2014-04-28  Eric Botcazou  <ebotcazou@adacore.com>
16         * exp_dbug.ads (Get_External_Name): Add 'False' default to Has_Suffix,
17         add 'Suffix' parameter and adjust comment.
18         (Get_External_Name_With_Suffix): Delete.
19         * exp_dbug.adb (Get_External_Name_With_Suffix): Merge into...
20         (Get_External_Name): ...here.  Add 'False' default to Has_Suffix, add
21         'Suffix' parameter.
22         (Get_Encoded_Name): Remove 2nd argument in call to Get_External_Name.
23         Call Get_External_Name instead of Get_External_Name_With_Suffix.
24         (Get_Secondary_DT_External_Name): Likewise.
25         * exp_cg.adb (Write_Call_Info): Likewise.
26         * exp_disp.adb (Export_DT): Likewise.
27         (Import_DT): Likewise.
28         * comperr.ads (Compiler_Abort): Remove Code parameter and add From_GCC
29         parameter with False default.
30         * comperr.adb (Compiler_Abort): Likewise.  Adjust accordingly.
31         * types.h (Fat_Pointer): Rename into...
32         (String_Pointer): ...this.  Add comment on interfacing rules.
33         * fe.h (Compiler_Abort): Adjust for above renaming.
34         (Error_Msg_N): Likewise.
35         (Error_Msg_NE): Likewise.
36         (Get_External_Name): Likewise.  Add third parameter.
37         (Get_External_Name_With_Suffix): Delete.
38         * gcc-interface/decl.c (STDCALL_PREFIX): Define.
39         (create_concat_name): Adjust call to Get_External_Name, remove call to
40         Get_External_Name_With_Suffix, use STDCALL_PREFIX, adjust for renaming.
41         * gcc-interface/trans.c (post_error): Likewise.
42         (post_error_ne): Likewise.
43         * gcc-interface/misc.c (internal_error_function): Likewise.
45 2014-04-28  Richard Biener  <rguenther@suse.de>
47         PR middle-end/60092
48         * gcc-interface/utils.c: Define flag_isoc11.
50 2014-04-26  Eric Botcazou  <ebotcazou@adacore.com>
52         * gnatvsn.ads (Library_Version): Bump to 4.10.
54 2014-04-23  Eric Botcazou  <ebotcazou@adacore.com>
56         Revert
57         2014-04-22  Richard Henderson  <rth@redhat.com>
59         * gcc-interface/Makefile.in: Support aarch64-linux.
61         2014-04-22  Eric Botcazou  <ebotcazou@adacore.com>
63         * fe.h (Compiler_Abort): Replace Fat_Pointer with String_Pointer.
64         (Error_Msg_N): Likewise.
65         (Error_Msg_NE): Likewise.
66         (Get_External_Name_With_Suffix): Likewise.
67         * types.h (Fat_Pointer): Delete.
68         (String_Pointer): New type.
69         (DECLARE_STRING_POINTER): New macro.
70         * gcc-interface/decl.c (create_concat_name): Adjust.
71         * gcc-interface/trans.c (post_error): Likewise.
72         (post_error_ne): Likewise.
73         * gcc-interface/misc.c (internal_error_function): Likewise.
75 2014-04-22  Richard Henderson  <rth@redhat.com>
77         * gcc-interface/Makefile.in: Support aarch64-linux.
79         * init.c [__linux__] (HAVE_GNAT_ALTERNATE_STACK): New define.
80         (__gnat_alternate_stack): Enable for all linux except ia64.
82 2014-04-22  Eric Botcazou  <ebotcazou@adacore.com>
84         * fe.h (Compiler_Abort): Replace Fat_Pointer with String_Pointer.
85         (Error_Msg_N): Likewise.
86         (Error_Msg_NE): Likewise.
87         (Get_External_Name_With_Suffix): Likewise.
88         * types.h (Fat_Pointer): Delete.
89         (String_Pointer): New type.
90         (DECLARE_STRING_POINTER): New macro.
91         * gcc-interface/decl.c (create_concat_name): Adjust.
92         * gcc-interface/trans.c (post_error): Likewise.
93         (post_error_ne): Likewise.
94         * gcc-interface/misc.c (internal_error_function): Likewise.
96 2014-04-15  Eric Botcazou  <ebotcazou@adacore.com>
97             Pierre-Marie de Rodat  <derodat@adacore.com>
99         * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create a mere
100         scalar constant instead of a reference for renaming of scalar literal.
101         Do not create a new object for constant renaming except for a function
102         call.  Make sure a VAR_DECL is created for the renaming pointer.
103         * gcc-interface/trans.c (constant_decl_with_initializer_p): New.
104         (fold_constant_decl_in_expr): New function.
105         (Identifier_to_gnu): Use constant_decl_with_initializer_p.
106         For a constant renaming, try to fold a constant DECL in the result.
107         (lvalue_required_p) <N_Object_Renaming_Declaration>: Always return 1.
108         (Identifier_to_gnu): Reference the renamed object of constant renaming
109         pointers directly.
110         * gcc-interface/utils.c (invalidate_global_renaming_pointers): Do not
111         invalidate constant renaming pointers.
113 2014-04-15  Eric Botcazou  <ebotcazou@adacore.com>
115         * gcc-interface/utils.c (type_for_vector_element_p): New predicate.
116         (build_vector_type_for_size): New function.
117         (build_vector_type_for_array): Likewise.
118         (unchecked_convert): Build an intermediate vector type to convert
119         from a generic array type to a vector type.
120         (handle_vector_size_attribute): Reimplement.
121         (handle_vector_type_attribute): Likewise.
123 2014-04-15  Eric Botcazou  <ebotcazou@adacore.com>
125         * gcc-interface/decl.c (prepend_one_attribute_pragma): Call
126         Is_OK_Static_Expression in lieu of Is_Static_Expression to
127         detect valid arguments.
129 2014-04-15  Eric Botcazou  <ebotcazou@adacore.com>
131         * gcc-interface/trans.c (gnat_gimplify_stmt): Propagate loop hints.
133 2014-04-14  Paolo Carlini  <paolo.carlini@oracle.com>
135         * gcc-interface/decl.c (gnat_to_gnu_entity): Use TYPE_IDENTIFIER.
136         (components_to_record): Likewise.
137         * gcc-interface/utils.c (make_aligning_type): Likewise.
138         (maybe_pad_type): Likewise.
139         (finish_record_type): Likewise.
140         (rest_of_record_type_compilation): Likewise.
142 2014-04-14  Eric Botcazou  <ebotcazou@adacore.com>
144         * snames.ads-tmpl (Name_Ivdep): New pragma-related name.
145         * sem_prag.adb (Analyze_Pragma) <Pragma_Loop_Optimize>: Add support
146         for Ivdep hint.
147         * gnat_rm.texi (Implementation Defined Pragmas): Document new Ivdep
148         hint for Loop_Optimize.
149         * gnat_ugn.texi (Vectorization of loops): Mention new Ivdep hint.
150         * gcc-interface/trans.c (Pragma_to_gnu) <Pragma_Loop_Optimize>: Deal
151         with new Ivdep hint.
152         * gcc-interface/ada-tree.h (LOOP_STMT_IVDEP): New macro.
153         * gcc-interface/trans.c (Pragma_to_gnu) <Pragma_Loop_Optimize>: Deal
154         with new Ivdep hint.
155         (gnat_gimplify_stmt) <LOOP_STMT>: Propagate loop hints.
157 2014-04-14  Eric Botcazou  <ebotcazou@adacore.com>
158             Robert Dewar  <dewar@adacore.com>
160         * opt.ads (Suppress_Back_Annotation): Remove as unused.
161         * fe.h (Back_Annotate_Rep_Info): Likewise.
162         (Global_Discard_Names): Likewise.
163         (List_Representation_Info): Declare.
164         * types.h (Uint_Minus_1): Likewise.
165         * repinfo.ads: Document back-annotation change.
166         * gcc-interface/gigi.h (init_gnat_decl): Declare.
167         (destroy_gnat_decl): Likewise.
168         * gcc-interface/decl.c (annotate_value): Do not create the cache of
169         annotated values here but...
170         <CALL_EXPR>: Only inline the call if -gnatR3 is specified or we are
171         in ASIS mode.
172         (init_gnat_decl): ...here instead.  New function.
173         (destroy_gnat_decl): Likewise.
174         * gcc-interface/trans.c (gigi): Call {init|destroy}_gnat_decl.
175         * gcc-interface/utils.c (init_gnat_utils): Minor reformatting.
177 2014-04-14  Eric Botcazou  <ebotcazou@adacore.com>
179         * gcc-interface/decl.c (create_field_decl_from): Finalize non-constant
180         offset for the field, if any.
182 2014-04-09  Eric Botcazou  <ebotcazou@adacore.com>
183             Svante Signell  <svante.signell@gmail.com>
185         PR ada/54040
186         PR ada/59346
187         * s-osinte-x32.adb: New file.
188         * s-linux.ads (Time): New section.
189         * s-linux-alpha.ads (Time): Likewise.
190         * s-linux-android.ads (Time: Likewise.
191         * s-linux-hppa.ads (Time): Likewise.
192         * s-linux-mipsel.ads (Time): Likewise.
193         * s-linux-sparc.ads (Time): Likewise.
194         * s-linux-x32.ads (Time): Likewise.
195         * s-osprim-x32.ads (timespec): Adjust.
196         (Clock): Likewise.
197         (To_Timespec): Likewise.
198         * s-osinte-linux.ads (Time): Define local subtypes for those defined
199         in System.Linux.
200         * s-taprop-linux.adb (Monotonic_Clock): Do not define timeval.
201         * s-osinte-hpux.ads (timespec): Revert POSIX breakage.
202         * s-osinte-kfreebsd-gnu.ads (timespec): Likewise.
203         * s-osinte-solaris-posix.ads (timespec): Likewise.
204         * s-osinte-posix.adb (To_Timespec): Likewise.
205         * gcc-interface/Makefile.in (x32/Linux): Use s-osinte-x32.adb.
207 2014-04-08  Eric Botcazou  <ebotcazou@adacore.com>
209         PR ada/60411
210         * gcc-interface/Makefile.in (arm% linux-android): Switch to EHABI.
211         * s-linux-android.ads: New file.
212         * s-intman-android.adb: Likewise.
213         * s-osinte-android.ads: Adjust.
214         * sigtramp-armdroid.c: Likewise.
215         * sigtramp.h: Add Android support.
217 2014-04-07  Eric Botcazou  <ebotcazou@adacore.com>
219         * gcc-interface/Makefile.in (alpha-vms): Add missing line.
221 2014-03-30  Eric Botcazou  <ebotcazou@adacore.com>
223         PR ada/60703
224         * system-linux-alpha.ads: Adjust for Ada 2005.
225         * system-linux-mips.ads: Likewise.
226         * system-linux-mips64el.ads: Likewise.
227         * system-linux-mipsel.ads: Likewise.
228         * system-linux-s390.ads: Likewise.
229         * system-linux-s390x.ads: Likewise.
230         * system-linux-sparc.ads: Likewise.
231         * system-linux-sparcv9.ads: Likewise.
232         * system-rtems.ads: Likewise.
233         * system-vxworks-arm.ads: Likewise.
235 2014-03-16  Andreas Schwab  <schwab@linux-m68k.org>
237         PR ada/39172
238         * gcc-interface/Makefile.in (target_cpu_default): Revert
239         2013-10-11 change.
241 2014-03-13  Eric Botcazou  <ebotcazou@adacore.com>
243         PR ada/51483
244         * cstand.adb (Register_Float_Type): Add 'precision' parameter and use
245         it to set the RM size.  Use directly 'size' for the Esize.
246         (Create_Back_End_Float_Types): Adjust call to above.
247         * get_targ.ads (Register_Type_Proc): Add 'precision' parameter.
248         * set_targ.ads (FPT_Mode_Entry): Add 'precision' component.
249         (Write_Target_Dependent_Values): Adjust comment.
250         * set_targ.adb (Register_Float_Type): Add 'precision' parameter and
251         deal with it.
252         (Write_Target_Dependent_Values): Write the precision in lieu of size.
253         (Initialization): Read the precision in lieu of size and compute the
254         size from the precision and the alignment.
255         * gcc-interface/gigi.h (enumerate_modes): Add integer parameter.
256         * gcc-interface/misc.c (enumerate_modes): Likewise.  Do not register
257         types for vector modes, pass the size in addition to the precision.
259 2014-03-10  Eric Botcazou  <ebotcazou@adacore.com>
261         * gcc-interface/Make-lang.in (ADA_DEPFILES): Fix typo.
263 2014-03-07  Doug Rupp  <rupp@adacore.com>
265         PR ada/60411
266         * system-linux-armel.ads (Backend_Overflow_Checks): Set to True.
267         (Support_64_Bit_Divides): Removed, no longer used.
268         (ZCX_By_Default): Enabled.
270 2014-02-25  Doug Rupp  <rupp@adacore.com>
272         * gcc-interface/Makefile.in (arm-linux):
273         (EH_MECHANISM): Use ARM unwinder (-arm)
274         (LIBGNAT_TARGET_PAIRS: Override defaults with a-exexpr-gcc.adb and
275         s-excmac-arm.ads.
276         (EXTRA_LIBGNAT_OBJS): Add raise-gcc.o
277         (EXTRA_GNATRTL_NONTASKING_OBJS): Add g-cppexc.o s-excmac.o.
278         (arm-wrs-vxworks): Add EH_MECHANISM=-gcc for kernel mode.
279         (EXTRA_LIBGNAT_OBJS): Add sigtramp-armvxw.o
280         Add dependencies for sigtramp-armvxw.o.
282 2014-02-25  Eric Botcazou  <ebotcazou@adacore.com>
284         * gcc-interface/trans.c (Pragma_to_gnu): Deal with Warning_As_Error.
286 2014-02-25  Robert Dewar  <dewar@adacore.com>
288         * rtsfind.adb (Is_RTE): Protect against entity with no scope
289         field (previously this call blew up on the Standard entity).
290         * sem_attr.adb (Analyze_Attribute, case Access): Remove
291         test for No_Abort_Statements, this is now handled in
292         Set_Entity_With_Checks.
293         * exp_ch6.adb, sem_ch10.adb, sem_ch4.adb, sem_ch8.adb, sem_res.adb:
294         Change name Set_Entity_With_Style_Check => Set_Entity_With_Checks.
295         * sem_util.ads, sem_util.adb: Change name Set_Entity_With_Style_Check =>
296         Set_Entity_With_Checks.
297         (Set_Entity_With_Checks): Add checks for No_Dynamic_Attachment,
298         Add checks for No_Abort_Statements.
300 2014-02-25  Robert Dewar  <dewar@adacore.com>
302         * exp_ch9.adb (Expand_Entry_Barrier): Add comment that call to
303         Check_Restriction is OK.
305 2014-02-25  Ed Schonberg  <schonberg@adacore.com>
307         * sem_ch3.adb (Process_Full_View): Better error message when
308         the full view of  a private type without discriminants is an
309         unconstrained type.
310         * sem_ch7.adb (Uninstall_Declarations): Ditto.
312 2014-02-25  Eric Botcazou  <ebotcazou@adacore.com>
314         * sigtramp-armvxw.c: Also restore r0.
316 2014-02-25  Robert Dewar  <dewar@adacore.com>
318         * errout.adb (Error_Msg_Internal): Warning_Msg_Char set
319         unconditionally (Set_Msg_Insertion_Warning): Warning_Msg_Char
320         set unconditionally.
321         * erroutc.adb (Get_Warning_Tag): Does not give a leading space
322         any more (Output_Msg_Text): Rewritten with new convention on
323         output of warnings that are treated as errors.
324         * erroutc.ads (Error_Msg_Object): Warn_Chr is always set even
325         if Warn is False.
326         * gnat_rm.texi: Updates to documentation on pragma
327         Warning_As_Error.
328         * warnsw.adb (Set_Dot_Warning_Switch): -gnatw.e should not
329         set Warning_Doc_Switch.
330         * lib-writ.ads: Add documentation note on ALI file generation
331         for C.
332         * exp_ch6.adb (Expand_Call): Remove check for No_Abort_Statements
333         (belongs in Sem).
334         * sem_attr.adb (Resolve_Attribute, case Access):
335         Abort_Task'Access violates the No_Abort_Statements restriction.
336         * sem_res.adb (Resolve_Call): Check restriction
337         No_Abort_Statements for call to Abort_Task or a renaming of it.
339 2014-02-25  Robert Dewar  <dewar@adacore.com>
341         * sem_ch3.adb (Array_Type_Declaration): Check for case of using
342         type name as index.
343         * lib.ads: Minor reformatting.
344         * einfo.ads: Minor reformatting.
346 2014-02-25  Doug Rupp  <rupp@adacore.com>
348         * sem_mech.adb (Set_Mechanisms): For convention Fortran on VMS
349         use Short_Descriptor(S) as the argument passing mechanism.
351 2014-02-25  Eric Botcazou  <ebotcazou@adacore.com>
353         * sigtramp-ppcvxw.c (CFI_COMMON_REGS): Also include r0.
355 2014-02-25  Robert Dewar  <dewar@adacore.com>
357         * atree.ads (Warnings_Treated_As_Errors): New variable.
358         * errout.adb (Error_Msg_Internal): Set Warn_Err flag in
359         error object (Initialize): Initialize Warnings_As_Errors_Count
360         (Write_Error_Summary): Include count of warnings treated as errors.
361         * erroutc.adb (Warning_Treated_As_Error): New function.
362         (Matches): Function moved to outer level of package.
363         * erroutc.ads (Error_Msg_Object): Add Warn_Err flag.
364         (Warning_Treated_As_Error): New function.
365         * gnat_rm.texi: Document pragma Treat_Warning_As_Error.
366         * opt.adb: Add handling of Warnings_As_Errors_Count[_Config].
367         * opt.ads (Config_Switches_Type): Add entry for
368         Warnings_As_Errors_Count.
369         (Warnings_As_Errors_Count): New variable.
370         (Warnings_As_Errors): New array.
371         * par-prag.adb: Add dummy entry for Warning_As_Error.
372         * sem_prag.adb (Analyze_Pragma): Implement new pragma
373         Warning_As_Error.
374         * snames.ads-tmpl: Add entries for Warning_As_Error pragma.
376 2014-02-25  Eric Botcazou  <ebotcazou@adacore.com>
378         * sigtramp.h: Fix minor inaccuracy.
380 2014-02-25  Ben Brosgol  <brosgol@adacore.com>
382         * gnat_ugn.texi: Added description of kill command.
384 2014-02-25  Robert Dewar  <dewar@adacore.com>
386         * gnat_rm.texi (Address_Clauses): Add a section discussing the
387         problem of address clauses causing unexpected initialization,
388         including the effect of Initialize_Scalars.
390 2014-02-25  Robert Dewar  <dewar@adacore.com>
392         * errout.adb: Various changes for better msgs for anonmous access
393         subprogram types.
394         * erroutc.ads, erroutc.adb (Buffer_Ends_With): Version with character
395         argument.
396         (Buffer_Remove): Version with character argument.
397         * sem_attr.adb (Resolve_Attribute, case Access): Better handling
398         of mismatching conventions for access-to-subprogram case.
399         * sem_prag.adb (Set_Convention_From_Pragma): Deal with anonymous
400         access types in record.
401         * sem_util.ads, sem_util.adb (Set_Convention): Handle anonymous access
402         types, including in records.
404 2014-02-25  Doug Rupp  <rupp@adacore.com>
406         * sigtramp-ppcvxw.c, sigtramp.h, sigtramp-armvxw.c: Comment
407         enhancements and corrections.
409 2014-02-25  Robert Dewar  <dewar@adacore.com>
411         * gnat_rm.texi: New section "Conventions and Anonymous Access Types"
413 2014-02-25  Robert Dewar  <dewar@adacore.com>
415         * gnat_rm.texi: First set of documentation additions for
416         predefined RM units.
417         * checks.adb: Minor reformatting.
418         * sem_elab.adb (Check_Task_Activation): Minor fix to error
419         message.
420         * sem_util.adb: Minor reformatting.
422 2014-02-25  Arnaud Charlet  <charlet@adacore.com>
424         * usage.adb (Usage): Add help on -gnateC.
425         * switch-c.adb (Scan_Front_End_Switches): Add handling of -gnateC.
426         * opt.ads (Generate_CodePeer_Messages): New flag.
427         * gnat_ugn.texi: Document new switch -gnateC.
429 2014-02-25  Ben Brosgol  <brosgol@adacore.com>
431         * gnat_rm.texi: Corrected minor typos in Implementation Defined
432         Aspects.
433         * opt.ads: Minor reformatting.
435 2014-02-25  Robert Dewar  <dewar@adacore.com>
437         * binde.adb: Change messages to mention -gnatel instead of -gnatwl.
438         * gnat_ugn.texi: Update documentation of -gnatwl Add documentation
439         of -gnatel/-gnateL.
440         * opt.ads (Warn_Info_Messages): New flag.
441         * sem_elab.adb: Use Elab_Warnings, Elab_Info_Messages to control
442         messages.
443         * sem_prag.adb: Use Elab_Warnings, Elab_Info_Messages to control
444         messages.
445         * switch-m.ad, switch-c.adb: Recognize new -gnatel/EL switches.
446         * usage.adb: Add documentation of -gnatel/-gnateL Update
447         documentation of -gnatwl/-gnatwL.
448         * warnsw.adb: New handling of Elab_Warnings, Elab_Info_Messages
449         * warnsw.ads (Elab_Info_Messages): New field in Warning_Record
451 2014-02-25  Robert Dewar  <dewar@adacore.com>
453         * einfo.ads, einfo.adb (Has_Shift_Operator): New flag.
454         * gnat_rm.texi: Document pragma Provide_Shift_Operators.
455         * interfac.ads: Minor code reorganization (add pragma
456         Compiler_Unit_Warning).
457         * par-prag.adb: Add dummy entry for Provide_Shift_Operators.
458         * sem_ch3.adb (Build_Derived_Numeric_Type): Copy
459         Has_Shift_Operator flag.
460         * sem_intr.adb (Check_Intrinsic_Subprogram): Make sure
461         Check_Shift is always called (Check_Shift): Set Has_Shift_Operator.
462         * sem_prag.adb: Implement pragma Provide_Shift_Operators.
463         * snames.ads-tmpl: Add entries for pragma Provide_Shift_Operators
464         Add entry for Name_Amount.
465         * checks.adb (Selected_Range_Checks): When checking for a null
466         range, make sure we use the base type, and not the subtype for
467         deciding a range is null.
468         * sem_ch5.adb (Analyze_Loop_Parameter_Specification): Check
469         for suspicious loop bound which is outside the range of the
470         loop subtype.
471         * gnat_ugn.texi: Add documentation section "Determining the
472         Chosen Elaboration Order"
473         * sem_ch13.adb (UC_Entry): Add field Act_Unit
474         (Validate_Unchecked_Conversion): Store Act_Unit
475         (Validate_Unchecked_Conversions): Test Warnings_Off in Act_Unit
476         * treepr.adb: Minor reformatting.
478 2014-02-25  Arnaud Charlet  <charlet@adacore.com>
480         * usage.adb: Minor: fix typo.
482 2014-02-25  Robert Dewar  <dewar@adacore.com>
484         * lib.ads, s-bitops.adb, s-bitops.ads, s-conca5.adb, gnat_rm.texi,
485         s-conca5.ads, s-conca7.adb, s-conca7.ads, s-crc32.adb, s-crc32.ads,
486         s-conca9.adb, s-conca9.ads, g-dyntab.adb, s-crtl.ads, g-dyntab.ads,
487         s-excdeb.adb, s-addope.adb, s-addope.ads, s-carun8.adb, s-carun8.ads,
488         g-htable.adb, g-htable.ads, g-hesora.adb, g-hesora.ads, s-conca2.adb,
489         s-conca2.ads, a-comlin.adb, a-chlat1.ads, a-comlin.ads, errout.ads,
490         a-except.adb, s-conca4.adb, a-except.ads, s-conca4.ads, s-conca6.adb,
491         s-conca6.ads, g-spchge.adb, g-spchge.ads, g-u3spch.adb, g-u3spch.ads,
492         a-strhas.ads, restrict.adb, aspects.adb, aspects.ads, s-conca8.adb,
493         s-conca8.ads, back_end.adb, par-prag.adb, g-byorma.adb, g-byorma.ads,
494         a-elchha.adb, a-elchha.ads, g-speche.adb, g-speche.ads, s-casuti.adb,
495         s-assert.adb, s-casuti.ads, s-assert.ads, a-clrefi.adb, a-clrefi.ads,
496         s-conca3.adb, s-conca3.ads, a-ioexce.ads: Implement pragma
497         Compiler_Unit_Warning, change Compiler_Unit everywhere to
498         Compiler_Unit_Warning.
500 2014-02-25  Sergey Rybin  <rybin@adacore.com frybin>
502         * sem_prag.adb (Analyze_Depends_In_Decl_Part): Do not normalize
503         in ASIS mode aggregates that are used as aspect definitions.
505 2014-02-25  Robert Dewar  <dewar@adacore.com>
507         * exp_ch7.adb, sem_util.adb, sem_util.ads, exp_ch6.adb: Minor
508         reformatting.
510 2014-02-25  Ed Schonberg  <schonberg@adacore.com>
512         * freeze.adb (Freeze_Entity): If the return type of a function
513         is a limited view, and the non-limited view has not been seen yet,
514         defer freezing to some later point.
516 2014-02-25  Robert Dewar  <dewar@adacore.com>
518         * sem_ch3.adb: Minor reformatting.
520 2014-02-25  Robert Dewar  <dewar@adacore.com>
522         * s-excdeb.ads, s-except.ads, s-exctab.adb, s-exctab.ads, s-finmas.ads,
523         s-htable.adb, s-htable.ads, s-imenne.adb, s-imenne.ads, s-imgenu.adb,
524         s-imgenu.ads, s-mastop.adb, s-mastop.ads, s-memory-vms_64.adb,
525         s-memory-vms_64.ads, s-memory.adb, s-memory.ads, s-os_lib.adb,
526         s-os_lib.ads, s-parame.adb, s-parame.ads, s-purexc.ads, s-restri.adb,
527         s-restri.ads, s-rident.ads, s-secsta.adb, s-secsta.ads, s-soflin.adb,
528         s-soflin.ads, s-sopco3.adb, s-sopco3.ads, s-sopco4.adb, s-sopco4.ads,
529         s-sopco5.adb, s-sopco5.ads, s-spsufi.ads, s-stache.adb, s-stache.ads,
530         s-stalib.adb, s-stalib.ads, s-stoele.adb, s-stoele.ads, s-strcom.adb,
531         s-strcom.ads, s-strhas.adb, s-string.adb, s-string.ads, s-strops.adb,
532         s-strops.ads, s-ststop.adb, s-ststop.ads, s-traceb.adb, s-traceb.ads,
533         s-traent.adb, s-traent.ads, s-unstyp.ads, s-utf_32.adb, s-utf_32.ads,
534         s-wchcnv.adb, s-wchcnv.ads, s-wchcon.adb, s-wchcon.ads, s-wchjis.adb,
535         s-wchjis.ads, sem_ch11.adb, sem_ch4.adb, sem_ch5.adb, sem_prag.adb,
536         snames.ads-tmpl: Change Compiler_Unit everywhere to
537         Compiler_Unit_Warning.
539 2014-02-25  Hristian Kirtchev  <kirtchev@adacore.com>
541         * exp_ch6.adb (Add_Or_Save_Precondition): New routine.
542         (Collect_Body_Postconditions_In_Decls): New routine.
543         (Collect_Body_Postconditions_Of_Kind): Factor out code. Handle
544         postcondition aspects or pragmas that appear on a subprogram
545         body stub.
546         (Collect_Spec_Preconditions): Factor out code. Handle
547         precondition aspects or pragmas that appear on a subprogram
548         body stub.
549         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): The analysis of
550         aspects that apply to a subprogram body stub is no longer delayed,
551         the aspects are analyzed on the spot.
552         (SPARK_Aspect_Error):
553         Aspects that apply to a subprogram declaration cannot appear in
554         a subunit.
555         * sem_ch10.adb Remove with and use clause for Sem_Ch13.
556         (Analyze_Proper_Body): Add local variable Comp_Unit. Unum
557         is now a local variable. Code cleanup. Analysis related to
558         the aspects of a subprogram body stub is now carried out by
559         Analyze_Subprogram_Body_Helper. Do not propagate the aspects
560         and/or pragmas of a subprogram body stub to the proper body
561         as this is no longer needed. Do not analyze the aspects of a
562         subprogram stub when the corresponding source unit is missing.
563         (Analyze_Protected_Body_Stub): Flag the illegal use of aspects
564         on a stub.
565         (Analyze_Task_Body_Stub): Flag the illegal use of
566         aspects on a stub.
567         (Optional_Subunit): Add local variable Unum.
568         * sem_ch13.adb (Insert_Delayed_Pragma): Do not analyze a generated
569         pragma when it applies to a subprogram body stub.
570         * sem_prag.adb (Analyze_Pragma): Pragmas Contract_Cases,
571         Depends and Global can now apply to a subprogram body stub as
572         long as it acts as its own spec.
573         (Analyze_Refined_Pragma):
574         Code reformatting. Refinement pragmas cannot apply to a subunit.
576 2014-02-25  Hristian Kirtchev  <kirtchev@adacore.com>
578         * einfo.ads Update the usage of flag
579         Uses_Sec_Stack. Uses_Sec_Stack now applies to E_Loop entities.
580         * exp_ch5.adb (Expand_Iterator_Loop): The temporary for a cursor
581         now starts with the letter 'C'. This makes reading expanded
582         code easier.
583         * exp_ch7.adb (Establish_Transient_Scope): Add local variable
584         Iter_Loop. Signal that an Ada 2012 iterator loop requires
585         secondary stack management when creating a transient scope for
586         an element reference.
587         * exp_util.adb (Process_Statements_For_Controlled_Objects):
588         When wrapping the statements of a loop, pass the E_Loop entity
589         to the wrapping machinery.
590         (Wrap_Statements_In_Block): Add
591         formal parameter Scop along with comment on usage. Add local
592         variables Block_Id, Block_Nod and Iter_Loop. Mark the generated
593         block as requiring secondary stack management when the block is
594         created inside an Ada 2012 iterator loop. This ensures that any
595         reference objects are reclaimed on each iteration of the loop.
596         * sem_ch5.adb (Analyze_Loop_Statement): Mark the generated block
597         tasked with the handling of container iterators as requiring
598         secondary stack management. This ensures that iterators are
599         reclaimed when the loop terminates or is exited in any fashion.
600         * sem_util.adb (Add_Block_Identifier): New routine.
601         (Find_Enclosing_Iterator_Loop): New routine.
602         * sem_util.ads (Add_Block_Identifier): New routine.
603         (Find_Enclosing_Iterator_Loop): New routine.
605 2014-02-25  Robert Dewar  <dewar@adacore.com>
607         * sinfo.ads: Minor reformatting.
609 2014-02-25  Tristan Gingold  <gingold@adacore.com>
611         * s-expllu.ads, s-expuns.ads, s-expmod.ads: Minor comment fix.
613 2014-02-25  Pascal Obry  <obry@adacore.com>
615         * sinput-l.adb, osint.adb, osint.ads: Add Prep_Suffix to factorize code.
617 2014-02-25  Tristan Gingold  <gingold@adacore.com>
619         * sem_ch10.adb: Minor comment fix.
621 2014-02-25  Bob Duff  <duff@adacore.com>
623         * s-tasdeb.adb: Misc cleanup of this package,
624         including printing addresses in hexadecimal.
625         (Write): Fix minor bug when taking 'Address of an empty string.
627 2014-02-25  Ed Schonberg  <schonberg@adacore.com>
629         * sem_prag.adb (Analyze_Part_Of): Reject state refinement in a
630         public child unit when it does not refer to the abstract state
631         of a public ancestor.
633 2014-02-25  Yannick Moy  <moy@adacore.com>
635         * sem_prag.adb (Analyze_Pragma/Pragma_Validity_Checks): Ignore pragma
636         Validity_Checks in GNATprove and CodePeer modes.
638 2014-02-25  Pascal Obry  <obry@adacore.com>
640         * prj-attr.adb, projects.texi, snames.ads-tmpl: Add package Install's
641         Artifacts attribute.
643 2014-02-25  Yannick Moy  <moy@adacore.com>
645         * sem_prag.adb: Minor reformatting to get consistent messages.
647 2014-02-25  Robert Dewar  <dewar@adacore.com>
649         * checks.adb: Minor reformatting.
650         * sinfo.ads (Do_Range_Check): Document that this flag is never
651         passed to the back end.
653 2014-02-25  Yannick Moy  <moy@adacore.com>
655         * sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_prag.adb, sem_attr.adb,
656         sem_ch6.adb: Remove useless references to SPARK RM in error messages.
658 2014-02-25  Hristian Kirtchev  <kirtchev@adacore.com>
660         * sem_res.adb (Appears_In_Check): New routine.
661         (Resolve_Entity_Name): Remove local variables Prev and
662         Usage_OK. Par is now a constant. Remove the parent chain traversal
663         as the placement of a volatile object with enabled property
664         Async_Writers and/or Effective_Reads must appear immediately
665         within a legal construct.
667 2014-02-25  Hristian Kirtchev  <kirtchev@adacore.com>
669         * checks.adb (Apply_Selected_Range_Checks):
670         Alphabetize local constants and variables. Add comments.
671         Always insert a range check that requires runtime evaluation into
672         the tree.
674 2014-02-25  Robert Dewar  <dewar@adacore.com>
676         * sem_attr.adb, sem_ch6.adb, par-ch3.adb: Minor reformatting.
678 2014-02-25  Bob Duff  <duff@adacore.com>
680         * s-tassta.adb (Finalize_Global_Tasks): Limit the number of loop
681         iterations while waiting for independent tasks to terminate;
682         if an independent task does not terminate, we do not want to
683         hang here. In that case, the thread will be terminated when the
684         process exits.
685         * s-taprop-linux.adb (Abort_Task): Fix Assert to allow for ESRCH.
687 2014-02-25  Ed Schonberg  <schonberg@adacore.com>
689         * sem_prag.adb (Check_SPARK_Aspect_For_ASIS): New subprogram,
690         used to perform pre-analysis of the expression for SPARK
691         aspects that have a non-standard syntax, such as GLobal and
692         Initializes. The procedure applies to the original expression
693         in an aspect specification, prior to the analysis of the
694         corresponding pragma, in order to provide semantic information
695         for ASIS navigation purposes.
696         (Analyze_Global_In_Decl_List, Analyze_Initializes_In_Decl_Part):
697         Call new subprogram.
699 2014-02-25  Yannick Moy  <moy@adacore.com>
701         * sem_prag.adb: Remove obsolete reference to SPARK RM in error message.
703 2014-02-25  Doug Rupp  <rupp@adacore.com>
705         * init.c (HAVE_GNAT_ADJUST_CONTEXT_FOR_RAISE): Enable for ARM.
706         (__gnat_adjust_context_for_raise): Bump the PC by 2.
708 2014-02-25  Ed Schonberg  <schonberg@adacore.com>
710         * par-ch3.adb (P_Basic_Declarative_Items): In the case of a
711         misplaced IS, add a statement sequence to improper body only if
712         one has not been parsed already.
714 2014-02-25  Ed Schonberg  <schonberg@adacore.com>
716         * sem_attr.adb (Analyze_Attribute, case 'Update): Check for
717         mismatch when multidimensional array is updated with a single
718         index.
720 2014-02-25  Yannick Moy  <moy@adacore.com>
722         * sem_ch3.adb, sem_ch5.adb, sem_prag.adb, sem_attr.adb, errout.ads,
723         sem_ch6.adb: Mark most references to SPARK RM in error messages
724         for removal.
726 2014-02-24  Ed Schonberg  <schonberg@adacore.com>
728         * par-ch3.adb (P_Basic_Declarative_Items): If an improper body
729         appears in a list of basic declarations, complete the tree with
730         an empty statement list, to prevent cascaded errors and crashes
731         if semantic analysis is attempted.
733 2014-02-24  Thomas Quinot  <quinot@adacore.com>
735         * g-sercom-mingw.adb (Open): Fix incorrect test for error return
736         value.
737         * erroutc.adb: Minor reformatting.
739 2014-02-24  Hristian Kirtchev  <kirtchev@adacore.com>
741         * sem_prag.adb (Check_Clause_Syntax): Account
742         for a solitary input item in a dependency list.
744 2014-02-24  Yannick Moy  <moy@adacore.com>
746         * gnat1drv.adb (Adjust_Global_Switches): Do not
747         use validity checks at all in GNATprove_Mode.
749 2014-02-24  Robert Dewar  <dewar@adacore.com>
751         * g-sercom-mingw.adb, g-sercom-linux.adb, sem_prag.adb, freeze.adb,
752         atree.adb, atree.ads: Minor reformatting.
754 2014-02-24  Hristian Kirtchev  <kirtchev@adacore.com>
756         * sem_ch6.adb (Analyze_Subprogram_Body_Contract): Do not enforce
757         global and dependence refinement when SPARK_Mode is off.
758         * sem_ch7.adb (Analyze_Package_Body_Contract): Do not enforce
759         state refinement when SPARK_Mode is off.
760         * sem_ch13.adb (Analyze_Aspect_Specifications): Add local
761         variable Decl. Insert the generated pragma for Refined_State
762         after a potential pragma SPARK_Mode.
763         * sem_prag.adb (Analyze_Depends_In_Decl_Part): Add local
764         constant Deps. Remove local variable Expr. Check the syntax
765         of pragma Depends when SPARK_Mode is off. Factor out the
766         processing for extra parenthesis around individual clauses.
767         (Analyze_Global_In_Decl_List): Items is now a constant. Check
768         the syntax of pragma Global when SPARK_Mode is off.
769         (Analyze_Initializes_In_Decl_Part): Check the syntax of pragma
770         Initializes when SPARK_Mode is off.
771         (Analyze_Part_Of): Check
772         the syntax of the encapsulating state when SPARK_Mode is off.
773         (Analyze_Pragma): Check the syntax of pragma Abstract_State when
774         SPARK_Mode is off. Move the declaration order check with respect
775         to pragma Initializes to the end of the processing. Do not verify
776         the declaration order for pragma Initial_Condition when SPARK_Mode
777         is off. Do not complain about a useless package refinement when
778         SPARK_Mode is off.
779         (Analyze_Refined_Depends_In_Decl_Part): Refs
780         is now a constant. Check the syntax of pragma Refined_Depends
781         when SPARK_Mode is off.
782         (Analyze_Refined_Global_In_Decl_Part):
783         Check the syntax of pragma Refined_Global when SPARK_Mode is off.
784         (Analyze_Refined_State_In_Decl_Part): Check the syntax of pragma
785         Refined_State when SPARK_Mode is off.
786         (Check_Dependence_List_Syntax): New routine.
787         (Check_Global_List_Syntax): New routine.
788         (Check_Initialization_List_Syntax): New routine.
789         (Check_Item_Syntax): New routine.
790         (Check_State_Declaration_Syntax): New routine.
791         (Check_Refinement_List_Syntax): New routine.
792         (Has_Extra_Parentheses): Moved to the top level of Sem_Prag.
794 2014-02-24  Robert Dewar  <dewar@adacore.com>
796         * a-tags.adb, s-os_lib.adb: Minor reformatting.
798 2014-02-24  Thomas Quinot  <quinot@adacore.com>
800         * g-sercom-mingw.adb, g-sercom-linux.adb (Raise_Error): Include
801         strerror message, not just numeric errno value.
803 2014-02-24  Doug Rupp  <rupp@adacore.com>
805         * raise-gcc.c (exception_class_eq): Make endian neutral.
807 2014-02-24  Ed Schonberg  <schonberg@adacore.com>
809         * atree.ads, atree,adb (Copy_Separate_Tree): Remove Syntax_Only
810         flag, and reset Etype and Analyzed attributes unconditionally
811         when copying a tree that may be partly analyzed.
812         * freeze.adb: Change calls to Copy_Separate_Tree accordingly.
813         * sem_ch6.adb (Check_Inline_Pragma): If the Inline pragma appears
814         within a subprogram body and applies to it, remove it from the
815         body before making a copy of it, to prevent spurious errors when
816         analyzing the copied body.
818 2014-02-24  Thomas Quinot  <quinot@adacore.com>
820         * s-os_lib.adb (Errno_Message): Do not depend on Integer'Image.
821         * s-oscons-tmplt.c: On VxWorks, include adaint.h only after
822         vxWorks.h has been included.  Also ensure that file attributes
823         related definitions are output even in cases where socket support
824         is not enabled.
825         * a-tags.adb: Code clean up.
826         * Make-generated.in (OSCONS_CPP, OSCONS_EXTRACT): Use -iquote
827         instead of -I to add the main ada source directory to the header
828         search path, in order to avoid conflict between our own "types.h"
829         and VxWork's <types.h>.
831 2014-02-24  Robert Dewar  <dewar@adacore.com>
833         * atree.ads, atree.adb (Copy_Separate_Tree): Add Syntax_Only parameter.
834         * debug.adb: Remove documentation of -gnatd.X, no longer used.
835         * freeze.adb (Wrap_Imported_Subprogram): Fixed and activated.
837 2014-02-24  Bob Duff  <duff@adacore.com>
839         * gnat_ugn.texi: Improve documentation of gnatpp.
841 2014-02-24  Thomas Quinot  <quinot@adacore.com>
843         * g-stheme.adb, g-socthi-vms.adb, g-socthi-vms.ads,
844         g-socthi-vxworks.adb, g-socthi-vxworks.ads, g-stseme.adb,
845         g-socthi-mingw.adb, g-socthi-mingw.ads, g-socthi.adb,
846         g-socthi.ads, g-socket.adb (Host_Error_Message): Return a string, not
847         a chars_ptr, because on Windows this is a renaming of
848         Socket_Error_Message.
850 2014-02-24  Robert Dewar  <dewar@adacore.com>
852         * a-direct.adb, sem_ch5.adb, a-cfdlli.adb, a-cfhase.adb, a-tags.adb,
853         s-filatt.ads, a-cforma.adb, sem_ch6.adb, g-socthi-mingw.adb,
854         a-cfhama.adb, a-cforse.adb, a-cofove.adb: Minor reformatting and code
855         reorganization.
857 2014-02-24  Thomas Quinot  <quinot@adacore.com>
859         * Make-generated.in (OSCONS_CPP, OSCONS_EXTRACT): Make sure
860         that the source directory containing s-oscons-tmplt.c is on the
861         include path, so that all internal header files are available.
863 2014-02-24  Ed Schonberg  <schonberg@adacore.com>
865         * sem_ch5.adb (Analyze_Loop_Parameter_Specification): If the
866         domain of iteration is an attribute reference 'Old, this is an
867         Ada 2012 iterator and the loop must be rewritten as such.
869 2014-02-24  Thomas Quinot  <quinot@adacore.com>
871         * s-fileio.adb (Errno_Message): Remove, use shared version from
872         s-os_lib instead.
873         * s-crtrun.ads, Makefile.rtl: Remove now unused unit.
874         * g-stseme (Socket_Error_Message): Reimplement in terms of new
875         s-os_lib function.
876         * g-socthi.ads, g-socthi.adb: Change profile of
877         Socket_Error_Message to return String to allow the above.
878         * g-socket.adb, g-socthi-mingw.adb, g-socthi-mingw.ads,
879         * g-socthi-vms.adb, g-socthi-vms.ads, g-socthi-vxworks.adb,
880         * g-socthi-vxworks.ads: Update to account for the above profile
881         change.
882         * a-tags.adb: Use strlen builtin binding provided by s-crtl.
883         * s-crtl.ads (strncpy): New procedure.
884         * s-os_lib.adb (Copy_Attributes): Import just once (strncpy):
885         Use import from s-crtl.
886         * a-envvar.adb, osint.adb: Use imports of C runtime functions
887         from s-crtl instead of re-importing locally.
889 2014-02-24  Hristian Kirtchev  <kirtchev@adacore.com>
891         * sem_prag.adb (Analyze_Global_Item): Emit the
892         variable related checks concerning volatile objects only when
893         SPARK_Mode is on.
895 2014-02-24  Robert Dewar  <dewar@adacore.com>
897         * sem_ch5.adb (Analyze_Iterator_Specification): use
898         Error_Msg_Ada_2012_Feature.
900 2014-02-24  Jose Ruiz  <ruiz@adacore.com>
902         * s-rident.ads (Profile_Info): For Ravenscar, the restrictions
903         No_Local_Timing_Events and No_Specific_Termination_Handlers
904         must be set, according to the Ravenscar profile definition
905         in D.13(6/3).
907 2014-02-24  Ed Schonberg  <schonberg@adacore.com>
909         * sem_ch6.adb (Analyze_Expression_Function): If this is a
910         completion, freeze return type and its designated type if needed.
912 2014-02-24  Thomas Quinot  <quinot@adacore.com>
914         * sem_ch13.adb (Analyze_Attribute_Definition_Clause, case
915         'Address): When moving initialization statements to a freeze
916         entity, keep them under a single node (i.e. do not unwrap
917         expressions with actions), and set the Initialization_Statements
918         attribute again so that processing of a later pragma Import can
919         still remove them.
921 2014-02-24  Claire Dross  <dross@adacore.com>
923         * a-cfdlli.adb, a-cfdlli.ads, a-cfhama.adb, a-cfhama.ads,
924         a-cfhase.adb, a-cfhase.ads, a-cforma.adb, a-cforma.ads,
925         a-cforse.adb, a-cforse.ads, a-cofove.adb, a-cofove.ads: Rename
926         Left/Right to First_To_Previous/Current_To_Last.
928 2014-02-24  Thomas Quinot  <quinot@adacore.com>
930         * adaint.h (struct file_attributes): New component "error"
931         (__gnat_error_attributes): Accessor for the above.
932         * adaint.c (__gnat_error_attributes): New subprogram
933         (__gnat_stat): Fix returned value (expect errno value)
934         (__gnat_stat_to_attr): Add management of error component (set to
935         stat errno value, except for missing files where it is set to 0,
936         and exists is set to 0).
937         * osint.ads (File_Attributes_Size): Update per change above,
938         also clarify documentation.
939         * s-filatt.ads: New file, binding to file attributes related
940         functions.
941         * Makefile.rtl (s-filatt): New runtime unit.
942         * s-crtl.ads (strlen): Expose binding to GCC builtin (falls back
943         to library function if not available on target).
944         * s-os_lib.ads, s-os_lib.adb (Errno_Message): New subprogram.
945         * s-oscons-tmplt.c (SIZEOF_struct_file_attributes,
946         SIZEOF_struct_dirent_alloc): New constants.
947         * Make-generated.in (s-oscons.ads): Now requires adaint.h.
948         * a-direct.adb (Fetch_Next_Entry): Fix incorrect buffer sizes.
949         Perform appropriate error checking if stat fails (do not just
950         ignore existing files if stat fails)
951         * gcc-interface/Make-lang.in (GNAT_ADA_OBJS, GNATBIND_OBJS): Update
952         dependencies.
954 2014-02-24  Hristian Kirtchev  <kirtchev@adacore.com>
956         * sem_prag.adb (Analyze_Global_Item): Move the check concerning
957         the use of volatile objects as global items in a function to
958         the variable related checks section.
959         * sem_util.adb (Async_Readers_Enabled): Directly call
960         Has_Enabled_Property.
961         (Async_Writers_Enabled): Directly call Has_Enabled_Property.
962         (Effective_Reads_Enabled): Directly call Has_Enabled_Property.
963         (Effective_Writes_Enabled): Directly call Has_Enabled_Property.
964         (Has_Enabled_Property): Rename formal parameter State_Id to Item_Id.
965         Update the comment on usage. State_Has_Enabled_Property how handles
966         the original logic of the routine. Add processing for variables.
967         (State_Has_Enabled_Property): New routine.
968         (Variable_Has_Enabled_Property): New routine.
970 2014-02-24  Robert Dewar  <dewar@adacore.com>
972         * sinfo.ads, sem_ch12.adb, sem_res.adb, sem_ch4.adb, par-ch12.adb:
973         Minor reformatting.
974         * atree.ads, atree.adb (Node35): New function.
975         (Set_Node35): New procedure.
976         * debug.adb: Define new debug flag -gnatd.X.
977         * einfo.ads, einfo.adb (Import_Pragma): New field.
978         * freeze.adb (Wrap_Imported_Procedure): New procedure (not
979         really active yet, has to be activated with -gnatd.X.
980         * sem_prag.adb (Set_Imported): Set new Import_Pragma
981         field (Set_Imported): Don't set Is_Public (see
982         Freeze.Wrap_Imported_Subprogram)
983         * par-ch3.adb (P_Component_List): Handle unexpected null component.
985 2014-02-24  Yannick Moy  <moy@adacore.com>
987         * sem_ch3.adb: Correct reference to SPARK RM in error messages.
988         * gnat_rm.texi: Correct documentation of attribute Update.
990 2014-02-24  Ed Schonberg  <schonberg@adacore.com>
992         * sem_ch5.adb (Analyze_Iterator_Specification): Reject container
993         iterator in older versions of Ada.
995 2014-02-24  Gary Dismukes  <dismukes@adacore.com>
997         * sem_ch5.adb, sem_aux.ads, sem_ch12.adb, gnat_ugn.texi, par.adb,
998         par-ch12.adb: Change spelling 'parametrization' to 'parameterization'.
1000 2014-02-24  Ed Schonberg  <schonberg@adacore.com>
1002         * sinfo.ads, sinfo.adb: New attribute Generalized_Indexing, for
1003         indexed_components that are instances of Ada 2012 container
1004         indexing operations. Analysis and resolution of such nodes
1005         is performed on the attribute, and the original source is
1006         preserved for ASIS operations. If expansion is enabled, the
1007         indexed component is replaced by the value of this attribute,
1008         which is in a call to an Indexing aspect, in most case wrapped
1009         in a dereference operation.
1010         * sem_ch4.adb (Analyze_Indexed_Component): Create
1011         Generalized_Indexing attribute when appropriate.
1012         (Analyze_Call): If prefix is not overloadable and has an indexing
1013         aspect, transform into an indexed component so it can be analyzed
1014         as a potential container indexing.
1015         (Analyze_Expression): If node is an indexed component with a
1016         Generalized_ Indexing, do not re-analyze.
1017         * sem_res.adb (Resolve_Generalized_Indexing): Complete resolution
1018         of an indexed_component that has been transformed into a container
1019         indexing operation.
1020         (Resolve_Indexed_Component): Call the above when required.
1021         (Resolve): Do not insert an explicit dereference operation on
1022         an indexed_component whose type has an implicit dereference:
1023         the operation is inserted when resolving the related
1024         Generalized_Indexing.
1026 2014-02-24  Olivier Ramonat  <ramonat@adacore.com>
1028         * gnat_rm.texi, gnat_ugn.texi: Replace Ada Compiler by Ada Development
1029         Environment.
1031 2014-02-24  Hristian Kirtchev  <kirtchev@adacore.com>
1033         * sem_prag.adb (Check_Constituent_Usage): Remove leading spaces in
1034         error messages.
1035         (Inconsistent_Mode_Error): Remove leading spaces in error messages.
1036         Merge the expected and available mode errors.
1037         (Report_Unused_Constituents): Remove leading spaces in error messages.
1038         (Report_Unused_States): Remove leading spaces in error messages.
1040 2014-02-24  Thomas Quinot  <quinot@adacore.com>
1042         * par_sco.adb (Traverse_One): Refine categorization of statement
1043         SCOs.
1045 2014-02-24  Robert Dewar  <dewar@adacore.com>
1047         * aspects.ads, aspects.adb: Remove aspects Ada_2005 and Ada_2012,
1048         Pure_05, Pure_12 and Preelaborate_05.
1049         * gnat_rm.texi: Update accordingly.
1050         * sem_prag.adb: Document one argument form of Ada_05/Ada_2005
1051         pragmas Document one argument form of Ada_12/Ada_2012 pragmas
1052         Recognize one argument form of these pragmas only in GNAT mode
1053         (-gnatg).
1055 2014-02-24  Ed Schonberg  <schonberg@adacore.com>
1057         * s-dimmks.ads: Replace symbol for temperature, previously the
1058         Greek letter Theta, by the ASCII @ sign.
1059         * s-diflio.ads: ditto.
1061 2014-02-24  Robert Dewar  <dewar@adacore.com>
1063         * exp_ch4.adb: Minor code reorganization (use OR for boolean
1064         variables).
1065         * sem_ch3.adb, sem_prag.adb, freeze.adb: Minor reformatting.
1067 2014-02-24  Ben Brosgol  <brosgol@adacore.com>
1069         * gnat_ugn.texi, projects.texi: Added the necessary conditionalization
1070         so that references to gnatmem and ASIS tools do not appear in the FSF
1071         edition of the GNAT User's Guide.
1073 2014-02-24  Yannick Moy  <moy@adacore.com>
1075         * freeze.adb (Freeze_Entity): Do not issue warning
1076         for pre/post being ignored on imported subprogram in GNATprove
1077         mode.
1079 2014-02-24  Robert Dewar  <dewar@adacore.com>
1081         * exp_ch5.adb, sem_ch5.adb, sem_type.adb, sem_res.adb, sem_attr.adb,
1082         stand.ads, sem_eval.adb: Minor reformatting.
1084 2014-02-24  Yannick Moy  <moy@adacore.com>
1086         * sem_prag.adb: Minor rewording in error message.
1088 2014-02-24  Johannes Kanig  <kanig@adacore.com>
1090         * exp_util.adb (Expand_Subtype_From_Expr): Do not expand subtypes in
1091         GNATprove_mode, gnat2why doesn't need nor use these types.
1093 2014-02-24  Gary Dismukes  <dismukes@adacore.com>
1095         * exp_ch4.adb (Expand_N_Op_Expon): On the AAMP
1096         target, in the case of signed integer exponentiation that uses a
1097         run-time routine, always select the Exp_* versions, since overflow
1098         checking is automatically done by AAMP arithmetic instructions.
1100 2014-02-24  Hristian Kirtchev  <kirtchev@adacore.com>
1102         * sem_ch13.adb (Analyze_Aspect_Specifications):
1103         When the related context is a package instace, insert pragma
1104         Abstract_State after all internally-generated renamings related
1105         to the instance "header".
1107 2014-02-24  Ed Schonberg  <schonberg@adacore.com>
1109         * sem_ch3.adb (Analyze_Declarations): Analyze Contract of abstract
1110         subprograms.
1111         * sem_disp.adb (Check_Dispatching_Context): A non-dispatching
1112         call to an abstract subprogram is legal if it appears in a
1113         pre/postcondition of another abstract operation.
1115 2014-02-24  Sergey Rybin  <rybin@adacore.com frybin>
1117         * gnat_ugn.texi: Misc updates.
1119 2014-02-24  Hristian Kirtchev  <kirtchev@adacore.com>
1121         * exp_prag.adb (Expand_Old): Set the type of the generated temporary.
1123 2014-02-24  Gary Dismukes  <dismukes@adacore.com>
1125         * layout.adb (Layout_Variant_Record): Instantiate
1126         Generic_Check_Choices and call Check_Choices before calling
1127         Build_Discr_Checking_Funcs, since we need Others_Discrete_Choices
1128         set to prevent generating incorrect discriminant-checking
1129         functions for 'others' variants (functions that unconditionally
1130         return True rather than accounting for the values covered by the
1131         'others' choice).
1132         * sem_eval.ads (Subtypes_Statically_Compatible): Add formal
1133         Formal_Derived_Matching.
1134         (Subtypes_Statically_Match): Add formal Formal_Derived_Matching.
1135         * sem_eval.adb (Subtypes_Statically_Compatible): Pass new
1136         Formal_Derived_Matching formal to Subtypes_Statically_Match.
1137         (Subtypes_Statically_Match): Suppress the Object_Size matching
1138         test in the case where Formal_Derived_Matching is True.
1139         * sem_ch12.adb (Validate_Derived_Type_Instance): Pass
1140         True for Formal_Derived_Matching_Formal on the call to
1141         Subtypes_Statically_Compatible.
1143 2014-02-23  Eric Botcazou  <ebotcazou@adacore.com>
1145         * gcc-interface/Make-lang.in (ADA_TOOLS_FLAGS_TO_PASS): Robustify.
1147 2014-02-23  Eric Botcazou  <ebotcazou@adacore.com>
1149         * gcc-interface/utils2.c (build_simple_component_ref): Fix formatting.
1150         Look through a conversion between original and packable version to get
1151         the base object.
1152         (build_component_ref): Rework comment and fix formatting.
1154 2014-02-20  Sergey Rybin  <rybin@adacore.com frybin>
1156         * gnat_ugn.texi, vms_data.ads (gnatelim): Add description of
1157         project-specific options.
1159 2014-02-20  Ed Schonberg  <schonberg@adacore.com>
1161         * a-cbdlli.adb (Insert): When capacity exceeded, raise Capacity_Error,
1162         not Constraint_Error.
1163         * a-cbmutr.adb (Append_Child, Insert_Child, Prepend_Child): Ditto.
1164         * sem_ch5.adb: Code clean up.
1166 2014-02-20  Hristian Kirtchev  <kirtchev@adacore.com>
1168         * sem_prag.adb (Usage_Error): Remove local
1169         constant Typ. Remove the specialized diagnostics for unconstrained
1170         or tagged items as those are not part of the explicit input set
1171         of the related subprogram and should not be flagged.
1173 2014-02-20  Ed Schonberg  <schonberg@adacore.com>
1175         * sem_attr.adb: Add guard to preserve all errors.
1177 2014-02-20  Vincent Celier  <celier@adacore.com>
1179         * switch-m.adb (Normalize_Compiler_Switches): Take into account
1180         switches that are recorded in ALI files: -gnateA, -gnateE,
1181         -gnateF, -gnateinn, -gnateu, -gnateV and -gnateY.
1183 2014-02-20  Ed Schonberg  <schonberg@adacore.com>
1185         * sem_ch5.adb (Analyze_Iterator_Specification): Check legality
1186         of an element iterator form over a formal container with an
1187         Iterable aspect.
1188         * exp_ch5.adb (Build_Formal_Container_Iteration): Utility
1189         to create declaration and loop statements for both forms of
1190         container iterators.
1191         (Expand_Formal_Container_Element_Iterator): New procedure
1192         to handle loops of the form  "for E of C" when C is a formal
1193         container.
1194         (Expand_Formal_Container_Iterator): Code cleanup.
1196 2014-02-20  Hristian Kirtchev  <kirtchev@adacore.com>
1198         * sem_prag.adb (Add_Item_To_Name_Buffer): New routine.
1199         (Analyze_Contract_Case): Remove the use of
1200         "may". Replace "aspect Contract_Cases" to avoid categorization
1201         of aspect vs pragma.
1202         (Analyze_External_Property_In_Decl_Part): Remove the use of "formal".
1203         (Analyze_Global_Item): Remove
1204         the use of "formal", specify the subprogram.  Split the
1205         error message about a state with visible refinement into
1206         two. Remove the use of "global" from "volatile global item".
1207         (Analyze_Initialization_Item): Ensure that the SPARK RM reference
1208         is on one line.
1209         (Analyze_Input_Output): Update the call to
1210         Check_Mode. Specify the duplicated item. Reword the error
1211         message concerning an input of a null output list. Use "\"
1212         for error message continuation.
1213         (Analyze_Part_Of): Remove
1214         the use of "may". Use "\" for error message continuation.
1215         (Analyze_Refined_Depends_In_Decl_Part): Update the error
1216         message concerning a useless refinement to match the format
1217         of Refined_Global.
1218         (Analyze_Refined_Global_In_Decl_Part): Reword the error message
1219         concerning a useless refinement.
1220         (Analyze_Refinement_Clause): Use "\" for error message continuation.
1221         (Check_Constituent_Usage): Use "\" for error message continuation.
1222         (Check_Dependency_Clause): Use "\" for error message continuation.
1223         (Check_Matching_Constituent): Use "\" for error message continuation.
1224         (Check_Missing_Part_Of): Use "\" for error message continuation.
1225         (Check_Mode): Renamed to
1226         Check_Role. Update the comment on usage. Redo the error reporting
1227         to use Role_Error.
1228         (Check_Mode_Restriction_In_Enclosing_Context): Use "\" for error
1229         message continuation.
1230         (Find_Mode): Renamed to Find_Role. Update the parameter profile along
1231         with comment on usage. Update all occurrences of Is_Input and Is_Output.
1232         (Inconsistent_Mode_Error): Use "\" for error message continuation.
1233         (Input_Match): Use "\" for error message continuation.
1234         (Role_Error): New routine.
1235         (Set_Convention_From_Pragma): Use "\" for error message continuation.
1236         (Usage_Error): Add local variable Error_Msg. Build specialized error
1237         message showcasing the offending item kind. Redo the diagnostics for
1238         unconstrained types.
1240 2014-02-20  Ed Schonberg  <schonberg@adacore.com>
1242         * exp_util.adb (Is_Iterated_Container): Use high-level primitives
1243         to determine whether a type is a container type, rather than
1244         examining only its type declaration, so that subtypes and derived
1245         types are handled properly.
1247 2014-02-20  Sergey Rybin  <rybin@adacore.com frybin>
1249         * gnat_ugn.texi: gnatmetric: add description of project-specific
1250         options.
1252 2014-02-20  Ed Schonberg  <schonberg@adacore.com>
1254         * sem_attr.adb (Analyze_Attribute, case 'Update): Verify that
1255         all choices in an association for a record type have the same
1256         type, as is done for record aggregates.
1258 2014-02-20  Robert Dewar  <dewar@adacore.com>
1260         * a-cborma.adb, a-cbhama.adb, a-cbdlli.adb, a-cbmutr.adb: Use pragma
1261         Unmodified rather than Warnings (Off). Make comments
1262         uniform in the four affected units.
1264 2014-02-20  Robert Dewar  <dewar@adacore.com>
1266         * sem_ch13.adb (Analyze_Attribute_Definition_Clause, case
1267         Object_Size): For non-scalar types allow any value that is a
1268         multiple of 8.
1269         * gnat_rm.texi: Document Object_Size for composites more clearly.
1271 2014-02-20  Yannick Moy  <moy@adacore.com>
1273         * sem_util.ads, sem_util.adb (Default_Initialization): Remove function.
1275 2014-02-20  Ed Schonberg  <schonberg@adacore.com>
1277         * stand.ads: Raise_Type: new predefined entity, used as the type
1278         of a Raise_Expression prior to resolution.
1279         * cstand.adb: Build entity for Raise_Type.
1280         * sem_ch11.adb (Analyze_Raise_Expression): use Raise_Type as the
1281         initial type of the node.
1282         * sem_type.adb (Covers): Raise_Type is compatible with all
1283         other types.
1284         * sem_res.adb (Resolve): Remove special handling of Any_Type on
1285         Raise_Expression nodes.
1286         (Resolve_Raise_Expression): Signal ambiguity if the type of the
1287         context is still Raise_Type.
1289 2014-02-20  Robert Dewar  <dewar@adacore.com>
1291         * sem_ch12.adb (Validate_Access_Type_Instance): Add message if
1292         mismatching predicates.
1293         * sem_ch6.adb (Check_Conformance): Give better messages on
1294         predicate mismatch.
1295         * sem_eval.adb (Predicates_Match): Move to spec.
1296         * sem_eval.ads (Predicates_Match): Moved here from body.
1298 2014-02-20  Ed Schonberg  <schonberg@adacore.com>
1300         * a-cbmutr.adb: Use default value in Insert_Child.
1302 2014-02-20  Vincent Celier  <celier@adacore.com>
1304         * gnatcmd.adb, make.adb, prj-makr.adb, clean.adb: Call
1305         Stringt.Initialize in all project aware tools.
1307 2014-02-20  Doug Rupp  <rupp@adacore.com>
1309         * gnat_ugn.texi: Document gnatbind -X option.
1310         * vms_data.ads: Minor warnings documentation reformatting.
1312 2014-02-20  Ed Schonberg  <schonberg@adacore.com>
1314         * exp_ch3.adb (Expand_Freeze_Array_Type): Only create invariant
1315         procedure for a base type.
1317 2014-02-20  Robert Dewar  <dewar@adacore.com>
1319         * sem_ch4.adb (Analyze_Case_Expression): Get type from first
1320         expression with type info.
1321         * sem_ch13.adb: Minor reformatting.
1322         * sem_eval.adb (Subtypes_Statically_Match): Make sure we return
1323         False if predicates do not match on the two types.
1325 2014-02-20  Arnaud Charlet  <charlet@adacore.com>
1327         * sem_prag.adb (Analyze_Pragma [pragma Attach_Handler]):
1328         In Relaxed_RM_Semantics mode, allow any static integer value,
1329         for compatibility with other compilers.
1331 2014-02-20  Vincent Celier  <celier@adacore.com>
1333         * errutil.adb (Initialize): Properly initialize entry in table
1334         Warnings when warnings are suppressed.
1336 2014-02-20  Robert Dewar  <dewar@adacore.com>
1338         * s-os_lib.ads: Add warning about non-portability of Rename_File.
1339         * sem_util.ads, sem_util.adb (Is_Junk_Name): New function.
1340         * sem_warn.adb: Use Is_Junk_Name to suppress some warnings.
1341         * gnat_ugn.texi: Document no warnings on junk variable names.
1342         * layout.adb: Minor code reorganization (use Ekind_In).
1343         * stringt.adb: Move initialization of Null_String_Id to Initialize
1344         routine.
1346 2014-02-20  Ed Schonberg  <schonberg@adacore.com>
1348         * sem_ch13.adb: Initialize optional Element_Id.
1350 2014-02-20  Robert Dewar  <dewar@adacore.com>
1352         * s-os_lib.ads (Rename_File): Minor commment addition.
1354 2014-02-20  Thomas Quinot  <quinot@adacore.com>
1356         * einfo.ads: Minor reformatting.
1358 2014-02-20  Hristian Kirtchev  <kirtchev@adacore.com>
1360         * aspects.adb (Exchange_Aspects): New routine.
1361         * aspects.ads (Exchange_Aspects): New routine.
1362         * atree.adb (Rewrite): Do not check whether the save node has
1363         aspects as it never will, instead check the node about to be clobbered.
1364         * einfo.adb (Write_Field25_Name): Abstract_States can appear in
1365         entities of generic packages.
1366         * sem_ch6.adb (Analyze_Expression_Function): Fix the parent
1367         pointer of an aspect specification list after rewriting takes place.
1368         * sem_ch7.adb (Analyze_Package_Body_Helper): Swap the aspect
1369         specifications of the generic template and the copy used for analysis.
1370         * sem_ch12.adb (Analyze_Generic_Package_Declaration): Swap
1371         the aspect specifications of the generic template and the
1372         copy used for analysis.
1373         (Analyze_Package_Instantiation): Propagate the aspect specifications
1374         from the generic template to the instantiation.
1375         (Build_Instance_Compilation_Unit_Nodes): Propagate the aspect
1376         specifications from the generic template to the instantiation.
1377         * sem_ch13.adb (Analyze_Aspect_Specifications): Handle aspects
1378         Abstract_State, Initializes and Initial_Condition when they
1379         apply to a package instantiation.
1381 2014-02-20  Robert Dewar  <dewar@adacore.com>
1383         * stringt.adb: Add call to Initialize in package initialization.
1385 2014-02-20  Robert Dewar  <dewar@adacore.com>
1387         * a-crbtgk.adb, a-cihama.adb, a-coinve.adb, a-ciorse.adb, a-crbtgo.adb,
1388         a-cidlli.adb, a-cimutr.adb, a-cihase.adb, a-cohama.adb, a-coorse.adb,
1389         a-chtgke.adb, a-chtgop.adb, a-comutr.adb, a-ciorma.adb, a-cobove.adb,
1390         a-convec.adb, a-cohase.adb, a-chtgbk.adb, a-chtgbo.adb: Minor
1391         reformatting.
1393 2014-02-20  Bob Duff  <duff@adacore.com>
1395         * s-os_lib.ads: Minor: Remove incorrect comment.
1397 2014-02-20  Robert Dewar  <dewar@adacore.com>
1399         * sem_elab.adb (Check_Elab_Assign): Clearer warning message.
1401 2014-02-20  Ed Schonberg  <schonberg@adacore.com>
1403         * a-cborma.adb (Assign): When creating a node without a specified
1404         element, insert an uninitialized element in the map, because
1405         the instance may provide an element type with a default
1406         initialization, e.g a scalar with a Default_Value aspect.
1407         * a-cbhama.adb (Assign_Key): Remove useless Allocate procedure.
1408         (Insert): In the version without explicit element, provide an
1409         uninitialized element, as above.
1410         * a-cbdlli.adb (Append): In the version without explicit element,
1411         provide an uninitalized element, as above.
1412         (Allocate): Remove unused version.
1414 2014-02-20  Robert Dewar  <dewar@adacore.com>
1416         * sem_elab.adb: Minor code reorganization (use Nkind_In).
1417         * stringt.adb: Remove temporary pragma Warnings (Off).
1418         * stringt.ads: Add pragma Elaborate_Body to ensure initialization
1419         of Null_String_Id.
1421 2014-02-20  Matthew Heaney  <heaney@adacore.com>
1423         * a-chtgbk.adb (Replace): Use correct offset when calculating bucket
1424         index.
1426 2014-02-20  Ed Schonberg  <schonberg@adacore.com>
1428         * sem_ch5.adb (Analyze_Iterator_Specification): Initialize
1429         properly the cursor type for subsequent volatile testing in SPARK
1430         mode, when domain is a formal container with an Iterabe aspect.
1432 2014-02-20  Robert Dewar  <dewar@adacore.com>
1434         * errout.adb (Set_Warnings_Mode_Off): Add Reason argument.
1435         (Set_Specific_Warning_Off): Add Reason argument.
1436         * errout.ads (Set_Warnings_Mode_Off): Add Reason argument.
1437         (Set_Specific_Warning_Off): Add Reason argument.
1438         * erroutc.adb (Warnings_Entry): Add Reason field
1439         (Specific_Warning_Entry): Add Reason field.
1440         (Warnings_Suppressed): return String_Id for Reason.
1441         (Warning_Specifically_Suppressed): return String_Id for Reason.
1442         * erroutc.ads (Warnings_Entry): Add Reason field.
1443         (Specific_Warning_Entry): Add Reason field.
1444         (Set_Specific_Warning_Off): Add Reason argument.
1445         (Set_Warnings_Mode_Off): Add Reason argument.
1446         (Warnings_Suppressed): return String_Id for Reason.
1447         (Warning_Specifically_Suppressed): return String_Id for Reason.
1448         * errutil.adb (Warnings_Suppressed): returns String_Id for Reason
1449         (Warning_Specifically_Suppressed): returns String_Id for Reason
1450         * gnat_rm.texi: Document that Warning parameter is string literal
1451         or a concatenation of string literals.
1452         * par-prag.adb: New handling for Reason argument.
1453         * sem_prag.adb (Analyze_Pragma, case Warning): New handling
1454         for Reason argument.
1455         * sem_util.ads, sem_util.adb (Get_Reason_String): New procedure.
1456         * sem_warn.ads (Warnings_Off_Entry): Add reason field.
1457         * stringt.adb: Set Null_String_Id.
1458         * stringt.ads (Null_String_Id): New constant.
1460 2014-02-20  Robert Dewar  <dewar@adacore.com>
1462         * einfo.ads: Minor comment addition: Etype of package is
1463         Standard_Void_Type.
1464         * checks.adb, exp_aggr.adb, exp_atag.adb, exp_attr.adb, exp_ch13.adb,
1465         exp_ch2.adb, exp_ch3.adb, exp_ch4.adb, exp_ch5.adb, exp_ch6.adb,
1466         exp_ch7.adb, exp_ch9.adb, exp_dbug.adb, exp_disp.adb, exp_imgv.adb,
1467         exp_intr.adb, exp_prag.adb, exp_sel.adb, exp_strm.adb, exp_util.adb,
1468         freeze.adb, rtsfind.adb, sem_aggr.adb, sem_attr.adb, sem_ch10.adb,
1469         sem_ch12.adb, sem_ch13.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
1470         sem_ch6.adb, sem_ch8.adb, sem_dim.adb, sem_prag.adb, sem_res.adb,
1471         sem_util.adb, tbuild.adb, tbuild.ads: Remove New_Reference_To.
1472         Replace all calls with calls to New_Occurrence_Of.
1474 2014-02-20  Robert Dewar  <dewar@adacore.com>
1476         * par-util.adb (Ignore, case of right paren): Make this a
1477         serious error.
1479 2014-02-19  Robert Dewar  <dewar@adacore.com>
1481         * sem_ch5.adb, sem_prag.adb, sem_attr.adb: Minor reformatting.
1482         * debug.adb: Remove -gnatd.X switch, no longer used.
1483         * styleg.adb (Check_Then): Remove check of -gnatd.X, check is
1484         now always made.
1486 2014-02-19  Bob Duff  <duff@adacore.com>
1488         * g-socket.ads: Minor: Correct some comments.
1490 2014-02-19  Ed Schonberg  <schonberg@adacore.com>
1492         * sem_ch5.adb: Inhibit iterator rewriting in ASIS mode.
1494 2014-02-19  Arnaud Charlet  <charlet@adacore.com>
1496         * sem_ch13.adb (Analyze_Aspect_Specifications): Do not generate
1497         an error on out of range priorities if Relaxed_RM_Semantics.
1498         * sem_prag.adb (Analyze_Pragma): Ditto.
1500 2014-02-19  Bob Duff  <duff@adacore.com>
1502         * sem_attr.adb (Resolve_Attribute): Detect the case of F'Access
1503         where F denotes the renaming of an enumeration literal, and
1504         issue a specialized error message.
1506 2014-02-19  Matthew Heaney  <heaney@adacore.com>
1508         * a-chtgop.ads (Checked_Index): New operation.
1509         (Next): Changed mode of hash table.
1510         * a-chtgop.adb (Adjust, Delete_Node_Sans_Free): Detect tampering
1511         (Generic_Read, Reserve_Capacity): Ditto.
1512         (Generic_Equal): Detect tampering.
1513         (Next): Changed mode of hash table, detect tampering.
1514         * a-chtgke.ads (Checked_Index, Checked_Equivalent_Keys): New
1515         operation.
1516         (Find): Changed mode of hash table.
1517         * a-chtgke.adb (Checked_Equivalent_Keys): New operation
1518         (Delete_Key_Sans_Free, Generic_Conditional_Insert): Detect
1519         tampering.
1520         (Find): Changed mode of hash table, check for tampering.
1521         (Generic_Replace_Element): Check for tampering.
1522         * a-chtgbk.ads (Checked_Index, Checked_Equivalent_Keys): New operation.
1523         * a-chtgbk.adb (Checked_Index, Checked_Equivalent_Keys): New
1524         operation (Delete_Key_Sans_Free, Generic_Conditional_Insert):
1525         Detect tampering.
1526         (Find, Generic_Replace_Element): Check for tampering.
1527         * a-chtgbo.ads (Checked_Index): New operation.
1528         * a-chtgbo.adb (Checked_Index): New operation
1529         (Delete_Node_Sans_Free, Generic_Equal): Detect tampering.
1530         (Generic_Read, Next): Ditto.
1531         * a-cohase.adb, a-cihase.adb (Is_In): Changed mode of hash
1532         table (Difference, Intersection): Use variable view of
1533         source, detect tampering (Find, Is_Subset, Overlap): Use
1534         variable view of container (Symmetric_Difference, Union):
1535         Detect tampering (Vet): Use Checked_Index to detect tampering
1536         (Constant_Reference, Element, Find): Use variable view of
1537         container.
1538         (Update_Element_Preserving_Key): Detect tampering.
1539         * a-cbhase.adb (Difference, Find, Is_In): Use variable view
1540         of container.
1541         (Is_Subset): Ditto.
1542         (Equivalent_Sets, Overlap): Use Node's Next component.
1543         (Vet): Use Checked_Index to detect tampering.
1544         (Constant_Reference, Element, Find): Use variable view of container.
1545         (Update_Element_Preserving_Key): Detect tampering.
1546         * a-cohama.adb, a-cihama.adb, a-cbhama.adb (Constant_Reference,
1547         Element, Find): Use variable view of container.
1548         (Reference): Rename hash table component.
1549         (Vet): Use Checked_Index to detect tampering.
1551 2014-02-19  Arnaud Charlet  <charlet@adacore.com>
1553         * adabkend.adb (Scan_Compiler_Arguments): Add missing handling
1554         of -nostdinc.
1556 2014-02-19  Thomas Quinot  <quinot@adacore.com>
1558         * tbuild.adb (New_Occurrence_Of, New_Rerefence_To): Guard
1559         against calls without Def_Id.
1561 2014-02-19  Claire Dross  <dross@adacore.com>
1563         * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads, a-cforse.ads,
1564         a-cofove.ads: Add global annotations to subprograms.
1566 2014-02-19  Hristian Kirtchev  <kirtchev@adacore.com>
1568         * sem_prag.adb (Analyze_Initial_Condition_In_Decl_Part): Remove
1569         constants Errors, Pack_Id and Pack_Init. Remove variable Vars.
1570         Initial_Condition no longer requires the presence of pragma
1571         Initialized. Do not try to diagnose whether all variables mentioned in
1572         pragma Initializes also appear in Initial_Condition.
1573         (Collect_Variables): Removed.
1574         (Match_Variable): Removed.
1575         (Match_Variables): Removed.
1576         (Report_Unused_Variables): Removed.
1578 2014-02-19  Thomas Quinot  <quinot@adacore.com>
1580         * gnat_rm.texi (pragma Stream_Convert): Minor rewording.
1582 2014-02-19  Robert Dewar  <dewar@adacore.com>
1584         * sem_util.adb, sem_util.ads, prj-conf.adb, s-os_lib.adb: Minor
1585         reformatting.
1587 2014-02-19  Vincent Celier  <celier@adacore.com>
1589         * prj-part.adb (Parse_Single_Project): Use the fully resolved
1590         project path, with all symbolic links resolved, to check if the
1591         same project is imported with a different unresolved path.
1592         * prj-tree.ads (Project_Name_And_Node): Component Canonical_Path
1593         changed to Resolved_Path to reflect that all symbolic links
1594         are resolved.
1596 2014-02-19  Ed Schonberg  <schonberg@adacore.com>
1598         * sem_util.ads, sem_util.adb (Get_Cursor_Type): Moved to sem_util
1599         from sem_ch13, for use elsewhere.
1600         * sem_ch13.adb (Get_Cursor_Type): Moved to sem_util.
1601         * sem_ch5.adb (Analyze_Iterator_Specification): Set properly the
1602         cursor type on the loop variable when the iteration is over o
1603         formal container.
1605 2014-02-19  Vincent Celier  <celier@adacore.com>
1607         * prj-conf.adb (Add_Default_GNAT_Naming_Scheme): Add declaration
1608         for an empty Target (Check_Target): Never fail when an empty
1609         target is declared in the configuration project.
1611 2014-02-19  Ed Schonberg  <schonberg@adacore.com>
1613         * sem_prag.adb (Check_Arg_Is_Local_Name): Argument is local if
1614         the pragma comes fron a predicate aspect and the context is a
1615         record declaration within the scope that declares the type.
1617 2014-02-19  Robert Dewar  <dewar@adacore.com>
1619         * gnat_rm.texi: Minor clarifications.
1620         * expander.adb, sem_aggr.adb: Add comments.
1622 2014-02-19  Ed Schonberg  <schonberg@adacore.com>
1624         * sem_prag.adb (Check_Arg_Is_Local_Name): For an aspect that
1625         applies to a subprogram body, the name is the current scope,
1626         rather than being declared in the current scope.
1627         (Analyze_Pragma, case No_Return): Handle properly a No_Return
1628         aspect applied to a subprogram body.
1630 2014-02-19  Ed Schonberg  <schonberg@adacore.com>
1632         * sem_ch13.adb (Resolve_Iterable_Operation): Improve resolution
1633         of overloaded subprograms, and fix bug in handling of primitive
1634         operation Element.
1636 2014-02-19  Pascal Obry  <obry@adacore.com>
1638         * s-os_lib.adb: Minor reformatting.
1640 2014-02-19  Yannick Moy  <moy@adacore.com>
1642         * expander.adb (Expand): Do nothing inside generics.
1643         * sem_aggr.adb (Aggregate_Constraint_Checks): Do nothing inside
1644         generics.
1646 2014-02-19  Yannick Moy  <moy@adacore.com>
1648         * exp_ch2.adb: Remove useless 'with' of unit Uintp.
1650 2014-02-19  Robert Dewar  <dewar@adacore.com>
1652         * sem_ch3.adb, style.adb, sem_prag.adb, sem_ch13.adb: Minor reformatting
1653         * a-sequio.adb: Remove useless pragma Extensions_Allowed (no
1654         longer needed).
1656 2014-02-19  Claire Dross  <dross@adacore.com>
1658         * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
1659         a-cforse.ads, a-cofove.ads: Add Iterable aspect to formal containers.
1661 2014-02-19  Hristian Kirtchev  <kirtchev@adacore.com>
1663         * sem_ch3.adb (Analyze_Declarations): Analyze
1664         a package contract at the end of the private declarations (if
1665         applicable), otherwise analyze it and the end of the visible
1666         declarations.
1668 2014-02-19  Ed Schonberg  <schonberg@adacore.com>
1670         * style.adb (Missing_Overriding): If subprogram is an
1671         instantiation, place warning on the instance node itself,
1672         without mention of the original generic. Do not emit message
1673         if explicit Ada version is older than the introduction of the
1674         overriding indicator.
1676 2014-02-19  Yannick Moy  <moy@adacore.com>
1678         * gnat_rm.texi: Doc clarifications.
1680 2014-02-19  Yannick Moy  <moy@adacore.com>
1682         * exp_util.adb (Remove_Side_Effects): Do not remove side-effects
1683         inside a generic.
1685 2014-02-19  Ed Schonberg  <schonberg@adacore.com>
1687         * sem_ch13.adb (Get_Cursor_Type): Obtain cursor type from
1688         specified First primitive, rather than by name.
1689         (Validate_Iterable_Aspect, Resolve_Iterable_Operation): Use it,
1690         and extend error checking for missing primitives and incorrect
1691         signatures.
1693 2014-02-19  Ed Schonberg  <schonberg@adacore.com>
1695         * sem_ch3.adb (Check_Pragma_Implemented): Detect additional
1696         errors when a Synchronization aspect on an overriding protected
1697         operation does not match the given aspect on the overridden
1698         operation of an ancestor interface.
1700 2014-02-19  Hristian Kirtchev  <kirtchev@adacore.com>
1702         * sem_prag.adb (Check_Loop_Pragma_Grouping): New routine.
1703         (Check_Loop_Pragma_Placement): Update
1704         comment on usage. Remove local variables Orig_Stmt and
1705         Within_Same_Sequence. Check that the current Loop_Invariant or
1706         Loop_Variant pragma is grouped together with other such pragmas.
1707         (Is_Loop_Pragma): New routine.
1708         (Prev_In_Loop): Removed.
1710 2014-02-19  Robert Dewar  <dewar@adacore.com>
1712         * par-ch6.adb (P_Return): For extended return, end column lines
1713         up with RETURN.
1714         * par.adb: Minor documentation clarification.
1716 2014-02-19  Yannick Moy  <moy@adacore.com>
1718         * sem_prag.adb (Check_Loop_Pragma_Placement): Add check
1719         that Loop_Invariant and Loop_Variant appear consecutively.
1720         * gnat_rm.texi Update documentation of Loop_Invariant and
1721         Loop_Variant pragmas.
1723 2014-02-19  Robert Dewar  <dewar@adacore.com>
1725         * debug.adb: Document -gnatd.X.
1726         * par-ch5.adb (P_If_Statement): Always check THEN, even if not
1727         first token
1728         (Check_Then_Column): Ditto.
1729         * styleg.adb (Check_Then): Allow THEN on line after IF.
1730         (Check_Then): Check THEN placement under control of -gnatd.X
1731         * styleg.ads (Check_Then): Now called even if THEN is not first
1732         token on line.
1733         * stylesw.ads (Style_Check_If_Then_Layout): Document new
1734         relaxed rules.
1735         * gnat_ugn.texi: For -gnatyi, THEN can now be on line after IF.
1737 2014-02-19  Robert Dewar  <dewar@adacore.com>
1739         * a-cfhama.adb, a-cfhase.adb, a-cforse.adb, a-cofove.adb, a-ngcefu.adb,
1740         a-teioed.adb, a-wtedit.adb, a-ztedit.adb, exp_ch5.adb, inline.adb,
1741         prj-pp.adb, prj-tree.adb, sem_ch12.adb, sem_ch8.adb,
1742         vms_conv.adb: Fix bad layout of IF statements
1744 2014-02-19  Robert Dewar  <dewar@adacore.com>
1746         * exp_util.adb (Side_Effect_Free): Scalar if expressions can be SEF.
1748 2014-02-19  Robert Dewar  <dewar@adacore.com>
1750         * exp_util.adb: Update comments.
1752 2014-02-19  Doug Rupp  <rupp@adacore.com>
1754         * bindgen.adb (Gen_Adainit) [VMS] New global Float_Format.
1755         * init.c (__gl_float_format): [VMS] New global.
1756         (__gnat_set_features): Call FP_CONTROL to set FPSR for the float
1757         representation in effect.
1759 2014-02-19  Hristian Kirtchev  <kirtchev@adacore.com>
1761         * exp_ch6.adb Add with and use clause for Exp_Prag.
1762         (Expand_Contract_Cases): Relocated to Exp_Prag.
1763         * exp_ch6.ads (Expand_Contract_Cases): Relocated to Exp_Prag.
1764         * exp_prag.adb Add with and use clauses for Checks and Validsw.
1765         (Expand_Contract_Cases): Relocated from Exp_Ch6. Update the
1766         structure of the expanded code to showcase the evaluation of
1767         attribute 'Old prefixes. Add local variable Old_Evals. Expand
1768         any attribute 'Old references found within a consequence. Add
1769         circuitry to evaluate the prefixes of attribute 'Old that
1770         belong to a selected consequence.
1771         (Expand_Old_In_Consequence): New routine.
1772         * exp_prag.ads (Expand_Contract_Cases): Relocated from Exp_Ch6.
1773         * sem_attr.adb (Check_Use_In_Contract_Cases): Warn that a
1774         potentially unevaluated prefix is always evaluated.
1776 2014-02-19  Robert Dewar  <dewar@adacore.com>
1778         * exp_attr.adb (Expand_Min_Max_Attribute): Use Insert_Declaration
1779         (Expand_Min_Max_Attribute): Use Matching_Standard_Type.
1780         * exp_ch4.adb (Expand_N_Expression_With_Actions): Remove special
1781         handling for the case of Modify_Tree_For_C, this approach did
1782         not work.
1783         * exp_util.adb (Matching_Standard_Type): New function
1784         (Side_Effect_Free): New top level functions (from
1785         Remove_Side_Effects).
1786         * exp_util.ads (Side_Effect_Free): New top level functions
1787         (moved from body).
1788         * sinfo.ads: Minor comment updates.
1790 2014-02-19  Ed Schonberg  <schonberg@adacore.com>
1792         * exp_ch6.adb (Expand_Simple_Function_Return): If return
1793         type is unconstrained and uses the secondary stack, mark the
1794         enclosing function accordingly, to ensure that the value is not
1795         prematurely removed.
1797 2014-02-19  Hristian Kirtchev  <kirtchev@adacore.com>
1799         * par.adb Alphabetize the routines in Par.Sync.
1800         (Resync_Past_Malformed_Aspect): New routine.
1801         * par-ch13.adb (Get_Aspect_Specifications): Alphabetize local
1802         variables. Code and comment reformatting. Detect missing
1803         parentheses on aspects [Refined_]Global and [Refined_]Depends
1804         with a non-null definition.
1805         * par-sync.adb: Alphabetize all routines in this separate unit.
1806         (Resync_Past_Malformed_Aspect): New routine.
1808 2014-02-19  Robert Dewar  <dewar@adacore.com>
1810         * sem_eval.ads, sem_eval.adb (Subtypes_Statically_Match): Return False
1811         if Esize values do not match.
1813 2014-02-19  Yannick Moy  <moy@adacore.com>
1815         * sinfo.ads: Minor comment update.
1817 2014-02-19  Hristian Kirtchev  <kirtchev@adacore.com>
1819         * atree.ads: Minor reformatting (change Entity_Info to Einfo).
1821 2014-02-19  Thomas Quinot  <quinot@adacore.com>
1823         * exp_ch7.adb (Find_Node_To_Be_Wrapped): An assignment statement
1824         that has the No_Ctrl_Actions flag is a suitable node to be
1825         wrapped if the assigned expression has no finalization actions.
1826         * sem_eval.adb (Eval_Entity_Name): For a compile time known
1827         boolean value, mark the corresponding condition SCO as constant.
1829 2014-02-19  Robert Dewar  <dewar@adacore.com>
1831         * exp_util.adb: Minor reformatting.
1832         * exp_util.ads (Matching_Standard_Type): New function.
1833         * exp_ch7.adb: Minor reformatting.
1835 2014-02-19  Ed Schonberg  <schonberg@adacore.com>
1837         * sem_ch13.adb (Get_Cursor_Type): Use scope of iterable type
1838         to find declaration for Cursor, to handle properly the case of
1839         a discriminated iterable type.
1841 2014-02-19  Vincent Celier  <celier@adacore.com>
1843         * gnatcmd.adb (GNATCmd): Always replace the object dirs of
1844         imported library projects with the library ALI dirs, when setting
1845         the object paths.
1846         * prj-env.ads (Ada_Objects_Path): Correct comments about
1847         argument Including_Libraries.
1849 2014-02-19  Gary Dismukes  <dismukes@adacore.com>
1851         * gnat_rm.texi: Minor spelling fixes.
1853 2014-02-19  Doug Rupp  <rupp@adacore.com>
1855         * init.c: Remove unneeded code.
1856         * fe.h (Float_Format): New macro
1857         * gcc-interface/trans.c (gigi): On VMS, set vms_float_format.
1859 2014-02-19  Hristian Kirtchev  <kirtchev@adacore.com>
1861         * sem_prag.adb (Check_Refined_Global_Item):
1862         A state or variable acts as a constituent only it is part of an
1863         encapsulating state and the state has visible refinement.
1865 2014-02-19  Ed Schonberg  <schonberg@adacore.com>
1867         * sem_ch6.adb (Analyze_Subprogram_Contract): Do not warn on a
1868         postcondition for a function when the expression does not mention
1869         'Result but the function has in-out parameters.
1871 2014-02-19  Robert Dewar  <dewar@adacore.com>
1873         * gnat_rm.texi: Add documentation on Value_Size forcing biased
1874         representation.
1876 2014-02-19  Hristian Kirtchev  <kirtchev@adacore.com>
1878         * lib-xref.ads Remove the small table of letter and symbol usage as we
1879         already have one.
1881 2014-02-19  Hristian Kirtchev  <kirtchev@adacore.com>
1883         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Emit specific error
1884         messages depending on the offending misplaced aspect specifications.
1885         (Diagnose_Misplaced_Aspect_Specifications): New routine.
1887 2014-02-19  Ed Schonberg  <schonberg@adacore.com>
1889         * sem_ch13.adb (Get_Cursor): Utility to retrieve cursor type
1890         for iterable aspect primitives.
1891         (Resolve_Iterable_Operation): Use expected signature of iterable
1892         aspect to resolve primitive when overloading is present.
1893         (Validate_Iterable_Aspect, Analyze_Aspects_At_Freeze_Point): use it.
1894         (Check_Signature): Removed.
1896 2014-02-19  Yannick Moy  <moy@adacore.com>
1898         * sem_ch10.adb (Analyze_Proper_Body): Issue error on missing
1899         subunit in GNATprove_Mode.
1900         * sinfo.ads (GNATprove_Mode): Document error issued in GNATprove_Mode.
1902 2014-02-19  Hristian Kirtchev  <kirtchev@adacore.com>
1904         * lib-xref.ads Alphabetize the contents of table
1905         Xref_Entity_Letters. Add an entry in table Xref_Entity_Letters
1906         for E_Abstract_State. List all letters and symbols in use.
1907         * sem_prag.adb (Analyze_Abstract_State): Update all calls
1908         to Create_Abstract_State to reflect the new signature.
1909         (Create_Abstract_State): Change subprogram profile and update
1910         the comment on usage. Use the proper location of the state
1911         declaration when creating a new abstract state entity. Do not
1912         generate an external name, but simply reuse the name coming from
1913         the state declaration.
1915 2014-02-19  Robert Dewar  <dewar@adacore.com>
1917         * exp_ch4.adb (Expand_N_Expression_With_Actions): Make sure
1918         declarations get properly inserted in Modify_Tree_For_C mode.
1919         * sinfo.ads: Minor comment addition.
1921 2014-02-19  Robert Dewar  <dewar@adacore.com>
1923         * par-ch9.adb, exp_ch5.adb, sem_ch5.adb, exp_attr.adb, sem_util.adb,
1924         sem_util.ads, sem_ch13.adb, sem_ch13.ads: Minor reformatting.
1926 2014-02-19  Ed Schonberg  <schonberg@adacore.com>
1928         * style.adb (Missing_Overriding): Warning does not apply in
1929         language versions prior to Ada 2005.
1930         * snames.ads-tmpl: Add Name_Iterable and Attribute_Iterable.
1931         * sem_attr.adb: Add Attribute_Iterable where needed.
1932         * exp_attr.adb: ditto.
1933         * exp_ch5.adb (Expand_Formal_Container_Loop): New procedure to
1934         handle loops and quantified expressions over types that have an
1935         iterable aspect.  Called from Expand_Iterator_Loop.
1936         * sem_ch5.adb (Analyze_Iterator_Specification): Recognize types
1937         with Iterable aspect.
1938         * sem_ch13.adb (Validate_Iterable_Aspect): Verify that the
1939         subprograms specified in the Iterable aspect have the proper
1940         signature involving container and cursor.
1941         (Check_Aspect_At_Freeze_Point): Analyze value of iterable aspect.
1942         * sem_ch13.ads (Validate_Iterable_Aspect): New subprogram.
1943         * sem_util.ads, sem_util.adb (Get_Iterable_Type_Primitive):
1944         New procedure to retrieve one of the primitives First, Last,
1945         or Has_Element, from the value of the iterable aspect of a
1946         formal container.
1947         (Is_Container_Element): Predicate to recognize expressions
1948         that denote an element of one of the predefined containers,
1949         for possible optimization.  This subprogram is not currently
1950         used, pending ARG discussions on the legality of the proposed
1951         optimization. Worth preserving for eventual use.
1952         (Is_Iterator): Recognize formal container types.
1953         * aspects.ads, aspects.adb: Add Aspect_Iterable where needed.
1955 2014-02-19  Robert Dewar  <dewar@adacore.com>
1957         * exp_attr.adb (Expand_Min_Max_Attribute): New procedure
1958         (Expand_N_Attribute_Reference): Use this procedure for Min and Max.
1959         * exp_ch4.adb (Expand_N_Expression_With_Actions): Remove object
1960         declarations from list of actions.
1961         * output.ads, output.adb (Delete_Last_Char): New procedure.
1962         * sinfo.ads: Document handling of Mod and expression with actions
1963         in Modify_Tree_For_C mode.
1965 2014-02-19  Ed Schonberg  <schonberg@adacore.com>
1967         * par-ch9.adb (P_Task): Add a null statement to produce a
1968         well-formed task body when due to a previous syntax error the
1969         statement list is empty.
1971 2014-02-19  Hristian Kirtchev  <kirtchev@adacore.com>
1973         * sem_prag.adb (Check_Dependency_Clause): Account
1974         for the case where a state with a non-null refinement matches a
1975         null output list. Comment reformatting.
1976         (Inputs_Match): Copy a solitary input to avoid an assertion failure
1977         when trying to match the same input in multiple clauses.
1979 2014-02-19  Gary Dismukes  <dismukes@adacore.com>
1981         * sem_attr.adb: Minor typo fix.
1983 2014-02-18  Robert Dewar  <dewar@adacore.com>
1985         * cstand.adb (Build_Signed_Integer_Type): Minor change of formal
1986         from Int to Nat (Build_Unsigned_Integer_Type): New procedure
1987         (Create_Standard): Create new unsigned types.
1988         * exp_ch4.adb (Expand_N_Op_Mod): Expand mod in Modify_Tree_For_C
1989         mode (Expand_N_Reference): Removed, problematic and not needed
1990         for now.
1991         * exp_ch4.ads (Expand_N_Reference): Removed, problematic and
1992         not needed for now.
1993         * exp_util.ads, exp_util.adb (Power_Of_Two): New function.
1994         * expander.adb: Remove call to Expand_N_Reference (problematic,
1995         and not needed now).
1996         * sem_aux.ads, sem_aux.adb (Corresponding_Unsigned_Type): New function.
1997         * stand.adb: Read and write unsigned type entities.
1998         * stand.ads: Add new unsigned types.
2000 2014-02-18  Hristian Kirtchev  <kirtchev@adacore.com>
2002         * sem_ch4.adb (Analyze_Call): Do not mark a function call
2003         as being inside an assertion expression as the flag is now removed.
2004         (Check_Ghost_Subprogram_Call): Do not query the
2005         In_Assertion_Expression flag as it is now removed, instead use
2006         a predicate function.
2007         * sem_elab.adb (Check_Internal_Call_Continue): Do not query the
2008         In_Assertion_Expression flag as it is now removed, instead use
2009         a predicate function.
2010         * sem_prag.ads: Add new table Assertion_Expression_Pragma.
2011         * sem_util.adb Add with and use clause for Sem_Prag.
2012         (In_Assertion_Expression_Pragma): New routine.
2013         * sem_util.ads (In_Assertion_Expression_Pragma): New routine.
2014         * sinfo.adb (In_Assertion_Expression): Removed.
2015         (Set_In_Assertion_Expression): Removed.
2016         * sinfo.ads Remove flag In_Assertion_Expression along with its
2017         use in nodes.
2018         (In_Assertion_Expression): Removed along with
2019         pragma Inline.  (Set_In_Assertion_Expression): Removed along
2020         with pragma Inline.
2022 2014-02-18  Sergey Rybin  <rybin@adacore.com frybin>
2024         * gnat_ugn.texi: gnatpp section: add note that '-j' cannot be
2025         used together with '-r', '-rf' or '-rnb' options.
2027 2014-02-18  Hristian Kirtchev  <kirtchev@adacore.com>
2029         * sem_attr.adb (Analyze_Attribute): Comment
2030         and code reformatting. Use separate routines to check the
2031         legality of attribute 'Old in certain pragmas. Verify
2032         the use of 'Old, 'Result and locally declared entities
2033         within the prefix of 'Old.
2034         (Check_References_In_Prefix): New routine.
2035         (Check_Use_In_Contract_Cases): New routine.
2036         (Check_Use_In_Test_Case): New routine.
2038 2014-02-18  Vincent Celier  <celier@adacore.com>
2040         * sem_aux.adb (Is_By_Reference_Type): For each components of
2041         a record type, check also if the component is volatile as it
2042         may have an aspect that makes it volatile. If it is, then the
2043         record type is a by reference type.
2045 2014-02-18  Robert Dewar  <dewar@adacore.com>
2047         * exp_attr.adb: Minor reformatting.
2048         * exp_ch4.ads, exp_ch4.adb (Expand_N_Reference): New procedure.
2049         * exp_util.adb (Remove_Side_Effects): Add conditional expressions
2050         as another case where we don't generate N_Reference nodes for
2051         primitive types.
2052         * expander.adb (Expand): Add call to Expand_N_Reference.
2054 2014-02-06  Hristian Kirtchev  <kirtchev@adacore.com>
2056         * sem_prag.adb (Analyze_Refined_Pragma): Remove
2057         local variable Pack_Spec. Refinement pragmas may now apply to
2058         bodies of both visible and private subprograms.
2060 2014-02-06  Robert Dewar  <dewar@adacore.com>
2062         * exp_attr.adb (Expand_Loop_Entry_Attribute):
2063         Minor change (Attr => N) (Expand_Pred_Succ): New name
2064         Expand_Pred_Succ_Attribute (Expand_N_Attribute_Reference, case
2065         Max): Expand into if expression if Modify_Tree_For_C mode.
2066         (Expand_N_Attribute_Reference, case Min): ditto
2067         * sinfo.ads: Modify_Tree_For_C takes care of expanding Min and
2068         Max attributes.
2070 2014-02-06  Ed Schonberg  <schonberg@adacore.com>
2072         * sem_ch3.adb (Analyze_Object_Declaration): Do not generate
2073         predicate check if this is an internal declaration with
2074         No_Initialization set, as for an expanded aggregate component.
2076 2014-02-06  Doug Rupp  <rupp@adacore.com>
2078         * init.c (__gnat_default_resignal_p) [VMS]: Test for and resignal
2079         conditions with severity of "SUCCESS" or "INFORMATIONAL".
2081 2014-02-06  Yannick Moy  <moy@adacore.com>
2083         * sem_prag.adb (Analyze_Pragma): Analyze pragma
2084         Debug rewritten node before rewriting it as a null statement in
2085         GNATprove mode.
2087 2014-02-06  Robert Dewar  <dewar@adacore.com>
2089         * sem_attr.adb (Min_Max): New procedure.
2090         (Max_Alignment_For_Allocation_Max_Size_In_Storage_Elements): New
2091         procedure.
2093 2014-02-06  Sergey Rybin  <rybin@adacore.com frybin>
2095         * gnat_ugn.texi, vms_data.ads: Add documentation of '-t' option for
2096         gnatmetric/gnatpp.
2098 2014-02-06  Hristian Kirtchev  <kirtchev@adacore.com>
2100         * sem_prag.adb (Analyze_Abstract_State): Update
2101         all calls to Create_Abstract_State to pass the proper state
2102         "declaration".
2103         (Create_Abstract_State): Add new formal parameter
2104         State_Decl along with comment on usage. Establish a link between
2105         the abstract state entity and the state declaration.
2107 2014-02-06  Robert Dewar  <dewar@adacore.com>
2109         * sem_attr.adb (Analyze_Attribute, case Max): Check for improper
2110         comparison of unordered enumeration type.
2111         (Analyze_Attribute, case Max): Check for improper comparison of
2112         unordered enumeration type.
2113         * sem_res.adb (Bad_Unordered_Enumeration_Reference): Moved to
2114         sem_util.adb.
2115         * sem_util.ads, sem_util.adb (Bad_Unordered_Enumeration_Reference):
2116         Moved here from Sem_Res.
2118 2014-02-06  Robert Dewar  <dewar@adacore.com>
2120         * sem_ch3.adb, sem_prag.adb, sem_res.adb, lib-xref.adb: Minor
2121         reformatting.
2123 2014-02-06  Hristian Kirtchev  <kirtchev@adacore.com>
2125         * sem_ch6.adb (Process_Formals): Error message reformatting.
2127 2014-02-06  Hristian Kirtchev  <kirtchev@adacore.com>
2129         * sem_ch3.adb (Handle_Late_Controlled_Primitive): Add local
2130         variable Spec. Do not inherit the null indicator from the
2131         subprogram body when generating the spec.
2133 2014-02-06  Robert Dewar  <dewar@adacore.com>
2135         * casing.adb (Determine_Casing): Consider SPARK_Mode to be
2136         mixed case.
2138 2014-02-06  Ed Schonberg  <schonberg@adacore.com>
2140         * exp_ch6.adb (Is_Build_In_Place_Function): Predicate is false
2141         when the function has a foreign convention, but not if only the
2142         limited return type has such a convention.
2144 2014-02-06  Hristian Kirtchev  <kirtchev@adacore.com>
2146         * sem_ch3.adb (Handle_Late_Controlled_Primitive): Remove local
2147         variable Spec. Comment reformatting. Use Copy_Separate_Tree
2148         rather than New_Copy_Tree when building the corresponding
2149         subprogram declaration.
2151 2014-02-06  Hristian Kirtchev  <kirtchev@adacore.com>
2153         * sem_prag.adb (Analyze_Global_Item): Remove
2154         the mode-related checks on abstract states with enabled external
2155         properties.
2156         (Property_Error): Removed.
2158 2014-02-06  Javier Miranda  <miranda@adacore.com>
2160         * lib-xref.adb (Generate_Reference): When
2161         generating the reference to the first private entity take care
2162         of handling swapped entities.
2164 2014-02-06  Sergey Rybin  <rybin@adacore.com frybin>
2166         * gnat_ugn.texi, vms_data.ads: Add documentation of -j option for
2167         gnatmetric.
2169 2014-02-06  Robert Dewar  <dewar@adacore.com>
2171         * exp_ch4.adb (Expand_N_Shift_Left): Handle shift counts greater
2172         than the word size when operating in Modify_Tree_For_C mode.
2173         * sinfo.ads: Add documentation section on Modify_Tree_For_C mode.
2175 2014-02-06  Robert Dewar  <dewar@adacore.com>
2177         * erroutc.adb (Warning_Specifically_Suppressed.Matches):
2178         compare is case insensitive.
2179         * gnat_rm.texi: Document that string compare for Warnings Off
2180         is now case insensitive.
2182 2014-02-06  Eric Botcazou  <ebotcazou@adacore.com>
2184         * gnat_rm.texi: Small wording tweak.
2186 2014-02-06  Pascal Obry  <obry@adacore.com>
2188         * prj-attr.adb, projects.texi, snames.ads-tmpl: Add Included_Patterns
2189         and Included_Artifact_Patterns attribute definitions.
2191 2014-02-06  Yannick Moy  <moy@adacore.com>
2193         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Set
2194         SPARK_Mode pragma component for all subprograms, including stubs.
2196 2014-02-06  Hristian Kirtchev  <kirtchev@adacore.com>
2198         * sem_ch10.adb (Analyze_Package_Body_Stub): Maintain
2199         the configuration options of the enclosing context in a
2200         stack-like fasion.
2201         (Analyze_Subprogram_Body_Stub): Maintain the
2202         configuration options of the enclosing context in a stack-like
2203         fashion.
2205 2014-02-06  Robert Dewar  <dewar@adacore.com>
2207         * debug.adb: -gnatd.u sets Modify_Tree_For C
2208         * exp_ch4.adb (Expand_N_Op_Rotate_Left): Expand out
2209         if Modify_Tree_For_C (Expand_N_Op_Rotate_Right): ditto.
2210         (Expand_N_Op_Arithmetic_Right_Shift): ditto.
2211         * exp_intr.adb (Expand_Shift): Call expander so we do
2212         Modify_Tree_For_C expansions.
2213         * gnat1drv.adb (Adjust_Global_Switches): Set Modify_Tree_For_C
2214         if -gnatd.u set.
2216 2014-02-06  Fedor Rybin  <frybin@adacore.com>
2218         * prj-proc.ads (Tree_Loaded_Callback): new type Callback used
2219         after the phase 1 of the processing of each aggregated project
2220         to get access to project trees of aggregated projects.
2221         (Process_Project_Tree_Phase_1): new parameter On_New_Tree_Loaded
2222         If specified, On_New_Tree_Loaded is called after each aggregated
2223         project has been processed succesfully.
2224         (Process): new parameter On_New_Tree_Loaded.
2225         * prj-proc.adb (Process_Aggregated_Projects): On_New_Tree_Loaded
2226         callback added after processing of each aggregated project.
2227         (Recursive_Process): new parameter On_New_Tree_Loaded.
2228         (Process): new parameter On_New_Tree_Loaded.
2229         (Process_Project_Tree_Phase_1): new parameter On_New_Tree_Loaded.
2230         * prj-conf.ads (Parse_Project_And_Apply_Config): new parameter
2231         On_New_Tree_Loaded.
2232         * prj-conf.adb (Parse_Project_And_Apply_Config): new parameter
2233         On_New_Tree_Loaded.
2235 2014-02-06  Bob Duff  <duff@adacore.com>
2237         * gnat_ugn.texi: Implement --insert-blank-lines and
2238         --preserve-blank-lines switches.
2240 2014-02-06  Sergey Rybin  <rybin@adacore.com frybin>
2242         * gnat_ugn.texi, vms_data.ads: Add documentation of -j option for
2243         gnatelim.
2245 2014-02-06  Eric Botcazou  <ebotcazou@adacore.com>
2247         * gnat_rm.texi (Pragma Optimize_Alignment): Document the effect
2248         of the pragma on individual objects.
2250 2014-02-06  Hristian Kirtchev  <kirtchev@adacore.com>
2252         * einfo.adb Node29 is now used as BIP_Initialization_Call.
2253         (BIP_Initialization_Call): New routine.
2254         (Set_BIP_Initialization_Call): New routine.
2255         (Write_Field29_Name): Add an entry for constants and variables.
2256         * einfo.ads Add new attribute BIP_Initialization_Call and update
2257         its usage in nodes.
2258         (BIP_Initialization_Call): New routine along with pragma Inline.
2259         (Set_BIP_Initialization_Call): New routine along with pragma Inline.
2260         * exp_ch6.adb (Make_Build_In_Place_Call_In_Object_Declaration):
2261         Add local declaration Res_Decl. Capture the build-in-place
2262         initialization call when the related object declaration has
2263         created a transient block.
2264         * exp_ch7.adb (Process_Transient_Objects): Add local variable
2265         Fin_Insrt. Recognize a scenario where an object declaration acts
2266         as a transient context and is initialized by a build-in-place
2267         function call.
2269 2014-02-06  Pascal Obry  <obry@adacore.com>
2271         * prj-util.adb (For_Interface_Sources): Fix handling of required
2272         bodies for aggregate libs.
2274 2014-02-06  Robert Dewar  <dewar@adacore.com>
2276         * nlists.ads: Minor comment clarifications.
2278 2014-02-06  Robert Dewar  <dewar@adacore.com>
2280         * gnat1drv.adb (Adjust_Global_Switches): Set Modify_Tree_For_C
2281         if gnatd.V set.
2282         * opt.ads (Modify_Tree_For_C): New flag.
2283         * output.ads, output.adb (Last_Char): New function.
2285 2014-02-06  Pascal Obry  <obry@adacore.com>
2287         * projects.texi, prj-env.adb (Initialize_Default_Project_Path): Add
2288         share/gpr for cross-builds.
2290 2014-02-06  Robert Dewar  <dewar@adacore.com>
2292         * exp_util.ads, checks.adb, sem_prag.adb, prj-util.adb, sem_ch13.adb:
2293         Minor reformatting and code clean ups.
2295 2014-02-06  Pascal Obry  <obry@adacore.com>
2297         * prj-util.adb (For_Interface_Sources): Skip non compilable languages.
2298         * prj.ads: Minor typo fix in comment.
2300 2014-02-06  Hristian Kirtchev  <kirtchev@adacore.com>
2302         * sem_prag.adb (Analyze_Depends_In_Decl_Part): Add
2303         local variable Expr. Flag clauses with extra parenthesis as this
2304         is not allowed by the syntax of the pragma. Code reformatting.
2306 2014-02-06  Hristian Kirtchev  <kirtchev@adacore.com>
2308         * exp_attr.adb (Expand_N_Attribute_Reference): Alphabetize
2309         variables. Rename variabme Tnn to Temp. Do not create a temporary
2310         if assertions are disabled. Find enclosing routine _Postconditions
2311         and insert the temporary that captures the value of the prefix
2312         before the routine.
2313         * exp_ch6.adb (Build_Postconditions_Procedure):
2314         Insert the generated _Postconditions routine
2315         before the first source declaration of the related
2316         subprogram.
2317         (Insert_After_Last_Declaration): Removed.
2318         (Insert_Before_First_Source_Declaration): New routine.
2320 2014-02-06  Ed Schonberg  <schonberg@adacore.com>
2322         * exp_util.adb, exp_util.ads (Within_Internal_Subprogram):
2323         Utility to determine whether current expansion is for the body
2324         of a predefined primitive operation.
2325         (Make_Predicate_Check): Use Within_Internal_Subpgram
2326         * checks.adb (Apply_Predicate_Check): Use
2327         Within_Internal_Subprogram
2328         * sem_ch13.adb (Freeze_Entity_Checks): Ditto.
2330 2014-02-06  Pascal Obry  <obry@adacore.com>
2332         * prj.ads, prj-util.adb: Minor reformatting.
2334 2014-02-06  Ed Schonberg  <schonberg@adacore.com>
2336         * exp_ch6.adb (Expand_Subprogram_Contract, Append_Enabled_Item):
2337         Take into account the Split_PPC flag to ensure that conjuncts
2338         in a composite postcondition aspect are tested in source order.
2340 2014-02-06  Hristian Kirtchev  <kirtchev@adacore.com>
2342         * sem_ch6.adb (Analyze_Generic_Subprogram_Body): Flag illegal
2343         use of SPARK_Mode.
2344         * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration): Flag
2345         illegal use of SPARK_Mode.
2346         (Instantiate_Subprogram_Body): Flag illegal use of SPARK_Mode.
2347         * sem_prag.adb (Analyze_Pragma): Code reformatting.
2348         * sem_util.adb Add with and use clause for Aspects.
2349         (Check_SPARK_Mode_In_Generic): New routine.
2350         * sem_util.ads (Check_SPARK_Mode_In_Generic): New routine.
2352 2014-02-06  Thomas Quinot  <quinot@adacore.com>
2354         * a-calend.adb (Formatting_Operations.Split): Ensure that
2355         Time_Error is raised for invalid time values.
2357 2014-02-06  Arnaud Charlet  <charlet@adacore.com>
2359         * sem_prag.adb (Analyze_Pragma): Rewrite as a null statement
2360         in GNATprove_Mode.
2362 2014-02-06  Robert Dewar  <dewar@adacore.com>
2364         * einfo.ads, einfo.adb (Is_Discriminant_Check_Function): New flag.
2365         * exp_ch3.adb (Build_Dcheck_Function): Set
2366         Is_Discriminant_Check_Function.
2368 2014-02-06  Hristian Kirtchev  <kirtchev@adacore.com>
2370         * exp_ch7.adb (Is_Subprogram_Call): Inspect
2371         the original tree in certain cases where a construct has been
2372         factored out and replaced by a reference to a temporary.
2374 2014-02-06  Ed Schonberg  <schonberg@adacore.com>
2376         * sem_ch3.adb (Process_Full_View): Fix typo in the order of
2377         parameters when propagating predicate function to full view.
2378         (Find_Type_Of_Object): Freeze base type of object type to catch
2379         premature use of discriminated private type without a full view.
2381 2014-02-06  Robert Dewar  <dewar@adacore.com>
2383         * sprint.adb: Minor reformatting.
2385 2014-02-06  Hristian Kirtchev  <kirtchev@adacore.com>
2387         * exp_ch4.adb (Process_Transient_Object): Add local variable
2388         Temp_Ins. When the transient object is initialized by an
2389         aggregate, the hook must capture the object after the last
2390         component assignment takes place.
2391         * exp_ch7.adb (Detect_Subprogram_Call): Expose the subprogram to
2392         routine Is_Subprogram_Call.
2393         (Is_Subprogram_Call): Inspect an
2394         aggregate that has been heavily expanded for subprogram calls.
2395         (Process_Transient_Objects): Add local variables Expr, Ptr_Id
2396         and Temp_Ins.  Remove the nested declare block and adjust the
2397         indentation. When the transient object is initialized by an
2398         aggregate, the hook must capture the object after the last
2399         component assignment takes place.
2401 2014-02-06  Hristian Kirtchev  <kirtchev@adacore.com>
2403         * sem_prag.adb (Analyze_Global_Item): Detect illegal uses of
2404         external states with enabled properties that do not match the
2405         global mode.
2406         (Property_Error): New routine.
2407         * sem_res.adb (Property_Error): New routine.
2408         (Resolve_Actuals): Detect illegal uses of external variables with
2409         enabled properties in procedure calls that do not match the mode of
2410         the corresponding formal parameter.
2412 2014-02-06  Hristian Kirtchev  <kirtchev@adacore.com>
2414         * sem_util.adb (Has_Enabled_Property): Rename
2415         formal parameter Prop_Nam to Property. Update the comment on usage
2416         and all occurrences in the body. Add local variable Prop_Nam. When
2417         inspecting a property with an expression, the property name
2418         appears as the first choice of the component association.
2420 2014-02-04  Robert Dewar  <dewar@adacore.com>
2422         * exp_ch5.adb, einfo.ads, freeze.adb, sem_ch8.adb: Minor reformatting.
2424 2014-02-04  Gary Dismukes  <dismukes@adacore.com>
2426         * sem_aggr.adb: Change "runtime" to "run time" in warning message,
2427         for consistency with other messages.
2429 2014-02-04  Ed Schonberg  <schonberg@adacore.com>
2431         * exp_ch5.adb  (Expand_Iterator_Loop):  For a container element
2432         iterator, indicate that the element is a constant if the container
2433         type does not have a variable indexing aspect.
2434         * sem_ch8.adb (Analyze_Object_Renaming): If the entity is already
2435         marked as constant, do not reset its Ekind, to ensure that
2436         container elements in an element loop are not modified if the
2437         container (e.g. a hashed set) only has a constant indexing aspect.
2439 2014-02-04  Arnaud Charlet  <charlet@adacore.com>
2441         * g-souinf.ads: Subprograms in this unit are actually not pure.
2442         * freeze.adb (Freeze_Subprogram): Do not reset Is_Pure for Intrinsics.
2443         * einfo.ads (Is_Pure): Update doc to match implementation.
2445 2014-02-04  Gary Dismukes  <dismukes@adacore.com>
2447         * exp_ch13.adb: Minor spelling fix.
2449 2014-02-04  Robert Dewar  <dewar@adacore.com>
2451         * opt.ads: Minor comment update.
2453 2014-02-04  Robert Dewar  <dewar@adacore.com>
2455         * exp_ch4.adb (Expand_N_Expression_With_Actions): Use Rewrite
2456         instead of Replace.
2458 2014-02-04  Ed Schonberg  <schonberg@adacore.com>
2460         * sem_aggr.adb (Resolve_Array_Aggregate): Suppress warnings
2461         on null expressions if component type is non-null, when the
2462         corresponding association covers an empty range of index values.
2464 2014-02-04  Robert Dewar  <dewar@adacore.com>
2466         * sinfo.ads: Further comments on N_Expression_With_Actions node.
2468 2014-02-04  Hristian Kirtchev  <kirtchev@adacore.com>
2470         * sem_prag.adb (Analyze_Refined_Depends_In_Decl_Part): Remove global
2471         variables Out_Items and Ref_Global. Remove local constant
2472         Body_Id along with dummy variables D1, D2, D3, D4, D5, D6, D7
2473         and D8. Remove the useless collection of global items as this
2474         was a leftover from an earlier version of the routine. Move
2475         several routines out to avoid deep nesting and indentation.
2476         (Inputs_Match): Add formal parameter Dep_Clause. Rename formal
2477         parameter Do_Checks to Post_Errors. Update the comment on usage.
2478         (Is_Matching_Input): Renamed to Input_Match. Add formal parameters
2479         Ref_Inputs and Do_Checks. Rename formal parameter Do_Checks
2480         to Post_Errors. Update the comment on usage. Account for the
2481         case where a self referential state may have a null input_list.
2482         (Is_Self_Referential): New routine.
2484 2014-02-04  Ed Schonberg  <schonberg@adacore.com>
2486         * sem_ch13.adb (Analyze_Attribute_Definition_Clause): If the
2487         entity renames an expression, as in the case of an object of
2488         an unconstrained type initialized by a function call, defer the
2489         rewriting of the expression to the expander.
2490         * exp_ch13.adb (Expand_N_Attribute_Definition_Clause, case
2491         'Alignment): If the entity renames an expression, introduce
2492         temporary to capture value, and rewrite original declaration to
2493         use temporary.
2495 2014-02-04  Gary Dismukes  <dismukes@adacore.com>
2497         * g-comlin.adb: Minor typo fix.
2499 2014-02-04  Ed Schonberg  <schonberg@adacore.com>
2501         * freeze.adb (Freeze_All): Types derived from a formal
2502         access_to_classwide type do not have a finalization master.
2504 2014-02-04  Robert Dewar  <dewar@adacore.com>
2506         * sprint.adb: Minor reformatting.
2508 2014-02-04  Robert Dewar  <dewar@adacore.com>
2510         * exp_ch4.adb (Expand_N_Expression_With_Actions): Eliminate
2511         cases where Actions is a null list.
2512         * sinfo.ads (N_Expression_With_Actions): Actions can be
2513         temporarily empty during semantic analysis, but must be non-empty
2514         in the final expanded tree.
2516 2014-01-31  Robert Dewar  <dewar@adacore.com>
2518         * exp_ch9.adb: Minor reformatting.
2520 2014-01-31  Emmanuel Briot  <briot@adacore.com>
2522         * g-comlin.adb (Set_Command_Line): Take the switches
2523         configuration from the Command_Line_Config.
2525 2014-01-31  Hristian Kirtchev  <kirtchev@adacore.com>
2527         * sem_prag.adb (Analyze_Refinement_Clause): Guard against a malformed
2528         refinement clause.
2530 2014-01-31  Vincent Celier  <celier@adacore.com>
2532         * projects.texi: Add more documentation about others used as an
2533         index in indexed attributes.
2535 2014-01-31  Robert Dewar  <dewar@adacore.com>
2537         * gnat_ugn.texi: Minor update.
2538         * gnat_rm.texi: Add example to Restriction_Warnings documentation.
2539         * exp_util.adb: Minor reformatting.
2541 2014-01-31  Ed Schonberg  <schonberg@adacore.com>
2543         * exp_ch9.adb (Expand_Entry_Barrier): Warn if the barrier
2544         depends on data that is not private to the protected object,
2545         and potentially modifiable in unsynchronized fashion.
2547 2014-01-31  Yannick Moy  <moy@adacore.com>
2549         * erroutc.adb (Validate_Specific_Warnings): Remove special case for
2550         GNATprove_Mode.
2552 2014-01-31  Robert Dewar  <dewar@adacore.com>
2554         * prj-attr.ads (First_Attribute_Of): Returns Empty_Attribute
2555         for Unknown_Package.
2556         * sem_ch6.adb, sem_attr.adb: Minor comment addition.
2558 2014-01-31  Hristian Kirtchev  <kirtchev@adacore.com>
2560         * exp_util.adb (Build_Allocate_Deallocate_Proc): Rewrite
2561         the logic that generates a runtime check to determine the
2562         controlled status of the object about to be allocated or
2563         deallocated. Class-wide types now always use a runtime check
2564         even if they appear as generic actuals.
2565         (Find_Object): Detect
2566         a special case that involves interface class-wide types because
2567         the object appears as a complex expression.
2569 2014-01-31  Ed Schonberg  <schonberg@adacore.com>
2571         * sem_ch6.adb (Process_Formals): In Ada2012 mode, place
2572         subprogram with an incomplete untagged formals on the list of
2573         private dependents, to verify that the type is properly completed
2574         in the private part.
2575         * sem_attr.adb: Code clean up.
2577 2014-01-31  Robert Dewar  <dewar@adacore.com>
2579         * exp_ch6.adb: Minor reformatting.
2581 2014-01-31  Vincent Celier  <celier@adacore.com>
2583         * prj-attr.adb (First_Attribute_Of): Return Unknown_Attribute
2584         when Pkg is unknown.
2586 2014-01-31  Hristian Kirtchev  <kirtchev@adacore.com>
2588         * sem_res.adb (Resolve_Entity_Name): Comment
2589         reformatting. Allow volatile objects in various generated checks.
2591 2014-01-31  Ed Schonberg  <schonberg@adacore.com>
2593         * sem_attr.adb (Analyze_Attribute, case 'Update): For a record
2594         component association, set the etype of the identifier, for
2595         SPARK use.
2597 2014-01-31  Ed Schonberg  <schonberg@adacore.com>
2599         * exp_ch6.adb (Has_Visibility_Of_Subprogram): If type is not
2600         declared in a package, not checks can apply to the subprogram.
2602 2014-01-31  Robert Dewar  <dewar@adacore.com>
2604         * erroutc.adb (Validate_Specific_Warnings): Warnings are
2605         controlled -gnatw.W.
2606         * gnat_ugn.texi: Document new warnings controlled by -gnatw.w.
2607         * opt.ads (Warn_On_Warnings_Off): Now controls more cases.
2609 2014-01-31  Arnaud Charlet  <charlet@adacore.com>
2611         * exp_disp.adb: Update comments.
2613 2014-01-31  Yannick Moy  <moy@adacore.com>
2615         * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration,
2616         Save_Global_References): Guard access to expression in aspect.
2618 2014-01-31  Yannick Moy  <moy@adacore.com>
2620         * sem_prag.adb (Analyze_Pragma/Pragma_SPARK_Mode):
2621         Issue an error when the pragma is applied to a generic unit,
2622         a generic declaration, or inside a generic.
2624 2014-01-31  Yannick Moy  <moy@adacore.com>
2626         * sem_ch8.adb (Analyze_Subprogram_Renaming): Set SPARK_Mode on renaming
2627         entity.
2629 2014-01-31  Robert Dewar  <dewar@adacore.com>
2631         * exp_ch9.adb, s-tassta.adb, s-tposen.adb, s-tposen.ads: Minor
2632         reformatting.
2634 2014-01-31  Tristan Gingold  <gingold@adacore.com>
2636         * exp_disp.adb: Add a historic note.
2638 2014-01-31  Robert Dewar  <dewar@adacore.com>
2640         * sem_warn.adb (Warn_On_Useless_Assignments): Add call to
2641         Process_Deferred_References.
2643 2014-01-31  Yannick Moy  <moy@adacore.com>
2645         * erroutc.adb (Validate_Specific_Warnings): Do not issue a message for
2646         ineffective pragma Warnings(Off) in GNATprove_Mode.
2648 2014-01-31  Bob Duff  <duff@adacore.com>
2650         * s-taskin.ads: Minor comment fix.
2651         * s-tassta.adb (Abort_Dependents): Don't abort all dependents;
2652         just direct dependents. If this is actually an abort, each task
2653         will take care of aborting its dependents, so all dependents will
2654         get aborted, as before. However, when this is called the second
2655         time from Vulnerable_Complete_Master "for convenience" (i.e. to
2656         kill off tasks waiting at terminate alternatives), aborting
2657         indirect dependents is wrong, because it causes some unrelated
2658         tasks to get aborted.
2660 2014-01-31  Robert Dewar  <dewar@adacore.com>
2662         * sem_ch4.adb: Minor reformatting.
2664 2014-01-31  Robert Dewar  <dewar@adacore.com>
2666         * exp_ch2.adb: New calling sequence for Is_LHS.
2667         * frontend.adb: Add call to Process_Deferred_References.
2668         * lib-xref.ads, lib-xref.adb (Process_Deferred_References): New.
2669         (Deferred_References): New table.
2670         * sem_ch8.adb (Find_Direct_Name): Make deferred reference table
2671         entries.
2672         (Find_Expanded_Name): Ditto.
2673         * sem_res.adb: New calling sequence for Is_LHS.
2674         * sem_util.ads, sem_util.adb (Is_LHS): New calling sequence.
2675         * sem_warn.adb: Call Process_Deferred_References before issuing
2676         warnings.
2678 2014-01-31  Tristan Gingold  <gingold@adacore.com>
2680         * exp_util.adb (Corresponding_Runtime_Package): Restrict the
2681         use of System_Tasking_Protected_Objects_Single_Entry.
2682         * exp_ch9.adb (Build_Simple_Entry_Call): Remove Mode parameter
2683         of Protected_Single_Entry_Call.
2684         (Expand_N_Timed_Entry_Call): Remove single_entry case.
2685         * exp_disp.adb (Make_Disp_Asynchronous_Select_Body): Remove
2686         single_entry case.
2687         (Make_Disp_Timed_Select_Body): Likewise.
2688         * rtsfind.ads (RE_Timed_Protected_Single_Entry_Call): Remove.
2689         * s-tposen.adb (Send_Program_Error, PO_Do_Or_Queue): Remove
2690         Self_Id parameter.
2691         (Wakeup_Entry_Caller): Remove Self_ID and New_State parameters.
2692         (Wait_For_Completion_With_Timeout): Remove.
2693         (Protected_Single_Entry_Call): Remove Mode parameter
2694         (always Simple_Call).
2695         (Service_Entry): Remove Self_Id constant (not used anymore).
2696         (Timed_Protected_Single_Entry_Call): Remove.
2697         * s-tposen.ads (Timed_Protected_Single_Entry_Call): Remove.
2698         (Protected_Single_Entry_Call): Remove Mode parameter.
2700 2014-01-29  Hristian Kirtchev  <kirtchev@adacore.com>
2702         * einfo.adb (Get_Pragma): Handle the retrieval of pragma Refined_Post.
2703         * einfo.ads (Get_Pragma): Update the comment on special pragmas
2704         handled by this routine.
2705         * sem_prag.adb (Analyze_Pragma): Add a legal pragma Refined_Post
2706         to the contract of the related subprogram body.
2707         * sem_util.adb (Add_Contract_Item): Handle the insertion of
2708         pragma Refined_Post into the contract of a subprogram body.
2709         * sinfo.ads Update the documentation of node N_Contract.
2710         * sem_res.adb (Resolve_Entity_Name): Add a guard
2711         to detect abstract states and variables only when checking the
2712         SPARK 2014 rules concerning volatile object placement.
2714 2014-01-29  Ed Schonberg  <schonberg@adacore.com>
2716         * sem_ch4.adb (Find_Equality_Types, Try_One_Interp): within an instance,
2717         null is compatible with any access type.
2719 2014-01-29  Hristian Kirtchev  <kirtchev@adacore.com>
2721         * sem_util.adb (Find_Placement_In_State_Space): Assume that the default
2722         placement is not in a package.
2724 2014-01-29  Hristian Kirtchev  <kirtchev@adacore.com>
2726         * sem_util.adb (Has_Enabled_Property): Compare the character field of
2727         the sole property.
2729 2014-01-29  Robert Dewar  <dewar@adacore.com>
2731         * sem_intr.adb, a-ztexio.ads, sinfo.ads, sem_res.adb, gnatlink.adb,
2732         vms_conv.adb, a-except.ads, a-except-2005.ads, a-teioed.adb,
2733         sem_warn.ads, treepr.ads, erroutc.ads, a-excach.adb: Minor reformatting.
2735 2014-01-29  Robert Dewar  <dewar@adacore.com>
2737         * sem_util.ads, sem_util.adb (In_Pragma_Expression): New function.
2738         * sem_warn.adb (Check_References): Suppress warnings if inside
2739         Initial_Condition pragma.
2741 2014-01-29  Hristian Kirtchev  <kirtchev@adacore.com>
2743         * sem_prag.adb (Check_Missing_Part_Of): List all values of
2744         State_Space_Kind for readability reasons. Do not emit an error on
2745         a private item when the enclosing package lacks aspect/pragma
2746         Abstract_State. Do not emit an error on a private package
2747         instantiation when the corresponding generic template lacks
2748         visible state.
2749         (Has_Visible_State): New routine.
2750         * sem_util.adb (Find_Placement_In_State_Space): The visible
2751         declarations of any kind of child units in general act as proper
2752         placement location.
2754 2014-01-29  Robert Dewar  <dewar@adacore.com>
2756         * a-except-2005.adb, a-except.adb, a-excpol-abort.adb, a-exstat.adb,
2757         ali.adb, a-numaux.ads, a-numaux-darwin.ads, a-numaux-libc-x86.ads,
2758         a-numaux-vms.ads, a-numaux-vxworks.ads, a-numaux-x86.ads, aspects.ads,
2759         a-taside.adb, a-teioed.adb, a-textio.adb, a-textio.ads, atree.adb,
2760         atree.ads, a-witeio.adb, a-witeio.ads, a-wtedit.adb, a-ztedit.adb,
2761         a-ztexio.adb, bcheck.adb, binde.adb, checks.adb, comperr.adb,
2762         cstand.adb, debug_a.adb, einfo.ads, errout.adb, erroutc.adb,
2763         eval_fat.adb, exp_aggr.adb, exp_attr.adb, exp_ch11.adb, exp_ch3.adb,
2764         exp_ch4.adb, exp_ch5.adb, exp_ch6.adb, exp_ch9.adb, exp_dbug.adb,
2765         exp_disp.adb, exp_fixd.adb, exp_imgv.adb, exp_intr.adb, exp_util.adb,
2766         freeze.adb, frontend.adb, g-comlin.ads, g-mbdira.adb, gnat1drv.adb,
2767         gprep.adb, g-spipat.adb, i-cpp.ads, i-vxwork.ads, i-vxwork-x86.ads,
2768         krunch.ads, layout.adb, lib-load.adb, lib-writ.adb, lib-writ.ads,
2769         live.adb, namet.ads, osint.adb, osint-c.adb, output.ads, par.adb,
2770         par-ch10.adb, par-ch13.adb, par-ch3.adb, par-ch4.adb, par-ch5.adb,
2771         par-ch6.adb, par-ch9.adb, par-endh.adb, par-labl.adb, par-prag.adb,
2772         par-sync.adb, par-tchk.adb, par-util.adb, prj.adb, repinfo.adb,
2773         rtsfind.adb, s-arit64.adb, s-asthan-vms-alpha.adb,
2774         s-asthan-vms-ia64.adb, s-bignum.adb, scans.adb, scng.adb, s-dimmks.ads,
2775         sem_aggr.adb, sem_attr.adb, sem_aux.adb, sem_cat.adb, sem_ch10.adb,
2776         sem_ch12.adb, sem_ch13.adb, sem_ch13.ads, sem_ch3.adb, sem_ch4.adb,
2777         sem_ch5.adb, sem_ch6.adb, sem_ch8.adb, sem_disp.adb, sem_elab.adb,
2778         sem_elim.adb, sem_eval.adb, sem_intr.adb, sem_prag.adb, sem_res.adb,
2779         sem_type.adb, sem_util.adb, sem_warn.adb, set_targ.adb, s-fatgen.adb,
2780         s-fatgen.ads, s-fileio.adb, s-imgcha.adb, s-imgrea.adb, sinfo.ads,
2781         sinput-c.adb, snames.ads-tmpl, s-os_lib.adb, sprint.adb,
2782         s-regpat.adb, s-secsta.adb, s-stalib.ads,
2783         s-stchop.adb, s-stoele.ads, stand.ads, s-taprop-solaris.adb,
2784         s-tasdeb-vms.adb, s-tasini.adb, s-tassta.adb, s-valdec.adb,
2785         s-valuti.adb, s-wchjis.adb, s-wchwts.adb, system.ads, system-vms_64.ads,
2786         system-vms-ia64.ads, treepr.adb, types.ads, uintp.adb, uname.adb,
2787         urealp.adb, usage.adb, vxaddr2line.adb: Minor reformatting.
2789 2014-01-29  Robert Dewar  <dewar@adacore.com>
2791         * expander.adb: Minor reformatting.
2793 2014-01-29  Javier Miranda  <miranda@adacore.com>
2795         * exp_ch3.adb (Predefined_Primitive_Bodies): Adding documentation to
2796         previous patch.
2798 2014-01-29  Javier Miranda  <miranda@adacore.com>
2800         * exp_ch3.adb (Predefined_Primitive_Bodies): Complete the code
2801         that checks if an interface types defines the predefined "="
2802         function because the compiler was erroneously not generating the
2803         predefined "=" primitive as soon as the name of some interface
2804         primitive is "=" (formals were not checked).
2806 2014-01-29  Ed Schonberg  <schonberg@adacore.com>
2808         * expander.adb (Expander): In GNATprove mode, do not process
2809         transient scopes: they are in general not created in this mode,
2810         and an attempt to examine them will lead to constraint errors when
2811         processing configuration pragmas that have analyzable expressions.
2813 2014-01-29  Vincent Celier  <celier@adacore.com>
2815         * clean.adb (Gnatclean): Fail if main project is an aggregate
2816         project or if there is an aggregate library project in the
2817         project tree.
2818         * gnatcmd.adb: Fail if the main project is an aggregate project
2819         or if there is an aggegate library project in the project tree.
2820         * make.adb (Initialize): : Fail if main project is an aggregate
2821         project or if there is an aggregate library project in the
2822         project tree.
2823         * makeutl.ads (Aggregate_Libraries_In): New Boolean function.
2824         * prj-makr.adb (Initialize): Fail if the main project is an
2825         aggregate project or an aggregate library project.
2827 2014-01-29  Vincent Celier  <celier@adacore.com>
2829         * prj-part.adb (Check_Import_Aggregate): New procedure
2830         to check if an imported project is an aggregate project.
2831         (Parse_Single_Project): Call Check_Import_Aggregate
2832         * projects.texi: Document that aggregate projects cannot be
2833         extended or imported.
2835 2014-01-29  Robert Dewar  <dewar@adacore.com>
2837         * exp_ch9.adb, sem_ch7.ads, s-regexp.adb, sem_ch13.adb: Minor
2838         reformatting and code clean up.
2839         * gnat_ugn.texi: Add documentation section on Atomic Variables
2840         and Optimization.
2842 2014-01-29  Hristian Kirtchev  <kirtchev@adacore.com>
2844         * einfo.adb Flag264 is now unused.
2845         (Has_Body_References): Removed.
2846         (Set_Has_Body_References): Removed.
2847         (Write_Entity_Flags): Remove the output for flag Has_Body_References.
2848         * einfo.ads Update the comment on usage of attribute
2849         Body_References. Remove attribute Has_Body_References and its
2850         usage in nodes.
2851         (Has_Body_References): Removed along with pragma Inline.
2852         (Set_Has_Body_References): Removed along with pragma Inline.
2853         * sem_prag.adb (Analyze_Global_Item): Move the call to
2854         Record_Possible_Body_Reference in the state related checks
2855         section. Add a comment intended function.
2856         (Analyze_Input_Output): Move the call to Record_Possible_Body_Reference
2857         in the state related checks section. Add a comment intended function.
2858         (Analyze_Refinement_Clause): Cleanup the illegal body reference
2859         reporting. Add a comment on timing of error reporting.
2860         (Record_Possible_Body_Reference): Reimplement the routine.
2862 2014-01-29  Vincent Celier  <celier@adacore.com>
2864         * makeutl.adb (Mains.Find_File_Add_Extension): Only look for specs for
2865         unit-based languages.
2866         (Mains.Complete_Mains.Do_Complete): Use the source file project
2867         tree when calling Find_File_Add_Extension. Use the correct
2868         project name when reporting an error.
2870 2014-01-29  Hristian Kirtchev  <kirtchev@adacore.com>
2872         * aspects.adb Add an entry for aspect Part_Of in table
2873         Canonical_Aspect.
2874         * aspects.ads Add an entry for aspect Part_Of in tables Aspect_Id,
2875         Aspect_Argument, Aspect_Names and Aspect_Delay.
2876         * atree.h Define Elist9.
2877         * atree.adb (Elist9): New routine.
2878         (Set_Elist9): New routine.
2879         * atree.ads (Elist9): New routine.
2880         (Set_Elist9): New routine.
2881         * einfo.adb Add Part_Of_Constituents and Encapsulating_State to
2882         the list of node usage.  Remove Refined_State from the list of
2883         node usage.
2884         (Encapsulating_State): New routine.
2885         (Get_Pragma):
2886         Handle pragma Part_Of; (Part_Of_Constituents): New routine.
2887         (Refined_State): Removed.
2888         (Set_Encapsulating_State): New routine.
2889         (Set_Part_Of_Constituents): New routine.
2890         (Set_Refined_State): Removed.
2891         (Write_Field9_Name): Add an entry
2892         for Part_Of_Constituents (Write_Field10_Name): Add an entry for
2893         Encapsulating_State. Remove the entry for Refined_State.
2894         * einfo.ads Add new attributes Encapsulating_State
2895         and Part_Of_Constituents alond with their usage in
2896         entities. Remove attribute Refined_State along with its
2897         usage in entities.
2898         (Encapsulating_State): New routine and
2899         pragma Inline.  (Get_Pragma): Update the comment on usage.
2900         (Part_Of_Constituents): New routine and pragma Inline.
2901         (Refined_State): Removed along with pragma Inline.
2902         (Set_Encapsulating_State): New routine and pragma Inline.
2903         (Set_Part_Of_Constituents): New routine and pragma Inline.
2904         (Set_Refined_State): Removed along with pragma Inline.
2905         * par-prag.adb Pragma Part_Of does not need any special processing
2906         by the parser.
2907         * sem_ch3.adb (Analyze_Declarations): Remove local variables
2908         Body_Id and Prag. Call separate routines to analyze the
2909         contract of a package [body].
2910         (Analyze_Object_Contract):
2911         Update the comment on usage. Remove local variables
2912         Items and Nam. Use Get_Pragma rather than traversing the
2913         classification list.  Verify whether the lack of indicator
2914         Part_Of agrees with the placement of the variable in state space.
2915         (Analyze_Object_Declaration): Initialize the encapsulating state
2916         of a variable.  (Requires_State_Refinement): Moved to sem_util.
2917         * sem_ch7.adb (Analyze_Package_Body_Contract): New routine.
2918         (Analyze_Package_Contract): New routine.
2919         * sem_ch7.ads (Analyze_Package_Body_Contract): New routine.
2920         (Analyze_Package_Contract): New routine.
2921         * sem_ch10.adb (Decorate_State): Initialize the encapsulating
2922         state and Part_Of constituents.
2923         * sem_ch13.adb (Analyze_Aspect_Specifications):
2924         Add processing for aspect Part_Of. Update all
2925         calls to Decorate_Delayed_Aspect_And_Pragma.
2926         (Check_Aspect_At_Freeze_Point): Aspect Part_Of does
2927         not need any special processing at freeze time.
2928         (Decorate_Delayed_Aspect_And_Pragma): Renamed to
2929         Decorate_Aspect_And_Pragma.  Add formal parameter Delayed and
2930         update the associated comment.
2931         * sem_prag.adb Add an entry for pragma Part_Of in table Sig_Flags.
2932         (Analyze_Abstract_State): Add new global variable State_Id. Remove
2933         local constants Errors and Loc. Remove local variables Is_Null
2934         and State_Nam. Create the entity of the abstract state on the
2935         spot, before all remaining checks are performed. Verify that a
2936         missing Part_Of option agrees with the placement of the abstract
2937         state within the state space.
2938         (Analyze_Depends_In_Decl_Part):
2939         Add new global variables Constits_Seen and States_Seen. Check
2940         that a state and a corresponding constituent do not appear
2941         in pragma [Refined_]Depends.
2942         (Analyze_Global_In_Decl_Part):
2943         Add new global variables Constits_Seen and States_Seen. Check
2944         that a state and a corresponding constituent do not appear
2945         in pragma [Refined_]Global.
2946         (Analyze_Global_Item):
2947         Remove the now obsolete code that deals with Part_Of.
2948         Add the entity of the global item to the list of processed
2949         items.  (Analyze_Initializes_In_Decl_Part): Add new global
2950         variables Constits_Seen and States_Seen. Check that a state
2951         and a corresponding constituent do not appear in pragma
2952         Initializes.
2953         (Analyze_Initialization_Item): Add the entity
2954         of the initialization item to the list of processed items.
2955         (Analyze_Input_Item): Add the entity of the initialization
2956         item to the list of processed items.
2957         (Analyze_Input_Output):
2958         Remove the now obsolete code that deals with Part_Of.  Add the
2959         entity of the input/output to the list of processed items.
2960         (Analyze_Part_Of): New routine.
2961         (Analyze_Part_Of_Option): Remove
2962         local constant Par_State. Add local constant Encaps and local
2963         variables Encaps_Id and Legal. Use Analyze_Part of to analyze
2964         the option. Turn the related state into a Part_Of constituent
2965         if the option is legal.
2966         (Analyze_Pragma): Add processing
2967         for pragma Part_Of.
2968         (Analyze_Refined_State_In_Decl_Part):
2969         Remove global constants Pack_Body and Spec_Id. Remove
2970         global variables Abstr_States and Hidden_States. Add new
2971         global variables Available_States, Body_Id, Body_States and
2972         Spec_Id. Add new local constant Body_Decl. Reimplement the
2973         logic that extracts the states available for refinement from
2974         the related package and the body hidden states of the said
2975         package.
2976         (Analyze_Refinement_Clause): Add local variable Part_Of_Constits.
2977         (Check_Applicable_Policy): Alphabetize body.
2978         (Check_Dependency_Clause): Replace Refined_State
2979         with Encapsulating_State.
2980         (Check_Matching_Constituent):
2981         Reimplement the logic that determines whether an item is a valid
2982         / invalid constituent of the current refined state. Return when
2983         a construct does not denote a valid abstract state. Extract the
2984         list of Part_Of constituents for further analysis. Check that all
2985         Part_Of constituents of a state have been used in its refinement.
2986         (Check_Matching_State): Update the comment on usage. Operate
2987         on the list of available states.
2988         (Check_Missing_Part_Of): New routine.
2989         (Check_Refined_Global_Item): Replace Refined_State
2990         with Encapsulating_State.
2991         (Check_State_And_Constituent_Use): New routine.
2992         (Create_Abstract_State): New routine.
2993         (Is_Matching_Input): Replace Refined_State with Encapsulating_State.
2994         (Is_Part_Of): Removed.
2995         (Collect_Body_States): New routine.
2996         (Collect_Constituent): Replace Refined_State with Encapsulating_State.
2997         (Collect_Hidden_States): Removed.
2998         (Report_Unrefined_States): Change the profile of the procedure along
2999         with the comment on usage.
3000         (Report_Unused_Constituents): New routine.
3001         (Report_Unused_Hidden_States): Removed.
3002         (Report_Unused_States): New routine.
3003         * sem_prag.ads (Check_Missing_Part_Of): New routine.
3004         * sem_util.adb (Add_Contract_Item): Pragma Part_Of can now
3005         appear in the classification pragmas of a package instantiation
3006         or a variable.
3007         (Find_Placement_In_State_Space): New routine.
3008         (Is_Child): Removed.
3009         (Is_Child_Or_Sibling): Remove formal
3010         parameter Private_Child. Remove the private child checks.
3011         (Requires_State_Refinement): Moved from sem_ch3.
3012         * sem_util.ads Add new type State_Space_Kind along with
3013         comment on its usage and values.
3014         (Add_Contract_Item): Update the comment on usage.
3015         (Find_Body_Discriminal): Alphabetize spec.
3016         (Find_Placement_In_State_Space): New routine.
3017         (Is_Child_Or_Sibling): Remove formal parameter Private_Child
3018         and update the comment on usage.
3019         (Requires_State_Refinement): Moved from sem_ch3.
3020         * sinfo.ads: Update the documentation of N_Contract.
3021         * snames.ads-tmpl The predefined name for Part_Of is now used
3022         to denote a pragma. Add Pragma_Id for Part_Of.
3024 2014-01-29  Emmanuel Briot  <briot@adacore.com>
3026         * s-regexp.adb (Create_Secondary_Table): Automatically grow the state
3027         machine as needed.
3028         (Dump): New subprogram.
3030 2014-01-29  Tristan Gingold  <gingold@adacore.com>
3032         * exp_ch9.adb (Expand_N_Protected_Type_Declaration): Add
3033         Expand_Entry_Declaration to factorize code.
3035 2014-01-29  Ed Schonberg  <schonberg@adacore.com>
3037         * checks.adb: minor clarification.
3038         * sem_ch7.adb (Declare_Inherited_Private_Subprograms): Limit
3039         search for primitive operations to the entities that immediately
3040         follow the type declaration.
3042 2014-01-29  Tristan Gingold  <gingold@adacore.com>
3044         * exp_ch9.adb (Build_Protected_Entry): Do not call
3045         Complete_Entry_Body anymore.
3046         * rtsfind.ads (RE_Complete_Single_Entry_Body): Remove.
3047         * s-tposen.ads, s-tposen.adb (Complete_Single_Entry_Body): Remove.
3049 2014-01-29  Pierre-Marie Derodat  <derodat@adacore.com>
3051         * s-os_lib.adb, s-os_lib.ads (Normalize_Pathname): Return an empty
3052         string when the Name input bigger than allowed. Adapt the function
3053         specification.
3055 2014-01-29  Ed Schonberg  <schonberg@adacore.com>
3057         * checks.adb (Install_Null_Excluding_Check): Do not emit warning
3058         if expression is within a case_expression of if_expression.
3060 2014-01-29  Robert Dewar  <dewar@adacore.com>
3062         * exp_ch9.adb, inline.ads: Minor reformatting.
3064 2014-01-29  Tristan Gingold  <gingold@adacore.com>
3066         * exp_ch9.adb (Is_Exception_Safe): Return true if no exceptions.
3068 2014-01-29  Yannick Moy  <moy@adacore.com>
3070         * inline.ads (Pending_Body_Info): Add SPARK_Mode and
3071         SPARK_Mode_Pragma components to be able to analyze generic
3072         instance.
3073         * sem_ch12.adb (Analyze_Package_Instantiation,
3074         Inline_Instance_Body, Need_Subprogram_Instance_Body,
3075         Load_Parent_Of_Generic): Pass in SPARK_Mode from instantiation
3076         for future analysis of the instance.
3077         (Instantiate_Package_Body,
3078         Instantiate_Subprogram_Body, Set_Instance_Inv): Set SPARK_Mode
3079         from instantiation to analyze the instance.
3081 2014-01-29  Robert Dewar  <dewar@adacore.com>
3083         * sem_ch7.adb, sem_prag.adb, sem_ch4.adb, sem_ch6.adb: Minor code
3084         reorganization.
3086 2014-01-29  Yannick Moy  <moy@adacore.com>
3088         * gnat_rm.texi: Update description of SPARK_Mode pragma.
3090 2014-01-29  Tristan Gingold  <gingold@adacore.com>
3092         * exp_ch9.adb (Expand_N_Protected_Body): Remove Num_Entries.
3094 2014-01-29  Thomas Quinot  <quinot@adacore.com>
3096         * sem_ch4.adb (Find_Component_In_Instance): Update comment.
3098 2014-01-29  Ed Schonberg  <schonberg@adacore.com>
3100         * exp_util.adb (Build_Task_Image_Prefix): Indicate that the
3101         resulting string is an internal entity. and thus requires no
3102         initialization. This is relevant when Initialize_ Scalars is
3103         enabled, because the resultant spurious initialization may lead to
3104         secondary stack anomalies that produce a mangled name for a task.
3106 2014-01-29  Yannick Moy  <moy@adacore.com>
3108         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): SPARK_Mode
3109         not inherited from spec anymore. Check consistency
3110         rules after processing of declarations.
3111         * sem_ch7.adb (Analyze_Package_Body_Helper): SPARK_Mode not inherited
3112         from spec anymore. Check consistency rules after processing of
3113         declarations.
3114         (Analyze_Package_Declaration): Set SPARK_Mode only for non-generic
3115         packages.
3116         * sem_prag.adb (Analyze_Pragma/Pragma_SPARK_Mode): Implement new
3117         consistency rules.
3119 2014-01-27  Robert Dewar  <dewar@adacore.com>
3121         * sem_res.adb (Resolve_Comparison_Op): Add type name/location
3122         to unordered msg.
3123         (Resolve_Range): Add type name/location to unordered msg.
3125 2014-01-27  Claire Dross  <dross@adacore.com>
3127         * a-cofove.adb/s (Copy): Add precondition so that Copy (Source,
3128         Capacity) is only called with Capacity >= Length (Source) and
3129         Capacity in Capacity_Range.
3130         * a-cfdlli.adb/s, a-cfhase.adb/s, a-cfhama.adb/s, a-cforse.adb/s,
3131         a-cforma.adb/s (Copy): Add precondition so that Copy (Source, Capacity)
3132         is only called with Capacity >= Source.Capacity. Raise Capacity_Error
3133         in the code is this is not the case.
3135 2014-01-27  Thomas Quinot  <quinot@adacore.com>
3137         * sem_ch4.adb (Analyze_Selected_Component): Fix handling of
3138         selected component in an instance where the component of the
3139         actual is not visibile at instantiation.
3141 2014-01-27  Ed Schonberg  <schonberg@adacore.com>
3143         * sem_ch6.adb: sem_ch6.adb (Set_Actual_Subtypes): If the type
3144         has a dynamic predicate, generate freeze node for Actual_Subtype
3145         at once, because the declaration of the corresponding predicate
3146         function will make reference to it.
3148 2014-01-27  Tristan Gingold  <gingold@adacore.com>
3150         * exp_ch7.adb, exp_ch9.adb: Adjust comments.
3152 2014-01-27  Robert Dewar  <dewar@adacore.com>
3154         * exp_ch4.adb (Expand_N_Op_Expon): Remove unsigned type test
3155         for 2**X optimization.
3157 2014-01-27  Ed Schonberg  <schonberg@adacore.com>
3159         * a-suenst.adb: strings.utf_encoding.strings (Decode): Check
3160         explicitly whether value is in range of Character, because the
3161         library is typically compiled with range checks disabled, and
3162         we cannot rely on the implicit check on the argument of 'Val.
3164 2014-01-27  Vincent Celier  <celier@adacore.com>
3166         * a-ciorma.adb, a-cihama.adb (Assign): Copy the Source to the Target,
3167         not the Target to itself.
3169 2014-01-27  Robert Dewar  <dewar@adacore.com>
3171         * vms_conv.ads, ali.adb, sem_ch6.ads, opt.ads, vms_cmds.ads: Minor
3172         changes to avoid incorrect use of unordered enum types.
3174 2014-01-27  Thomas Quinot  <quinot@adacore.com>
3176         * sem_ch4.adb: Minor reformatting.
3178 2014-01-27  Robert Dewar  <dewar@adacore.com>
3180         * scn.adb (Check_End_Of_Line): Removed.
3181         (Error_Long_Line): Removed.
3182         (Determine_License): Use versions of above routines from Scanner.
3183         * scng.adb (Check_End_Of_Line): Moved to spec.
3184         (Error_Long_Line): Removed, no longer used.
3185         * scng.ads (Check_End_Of_Line): Moved here from body.
3187 2014-01-27  Tristan Gingold  <gingold@adacore.com>
3189         * exp_ch7.adb (Build_Cleanup_Statements): Call
3190         Build_Protected_Subprogram_Call_Cleanup to insert the cleanup
3191         for protected body.
3192         * exp_ch9.adb (Build_Protected_Subprogram_Body): Likewise.
3193          Remove Service_Name variable.
3194         (Build_Protected_SUbprogam_Call_Cleanup): New procedure that
3195         factorize code from the above subprograms.
3196         * exp_ch9.ads (Build_Protected_Subprogram_Call_Cleanup): New procedure.
3198 2014-01-27  Hristian Kirtchev  <kirtchev@adacore.com>
3200         * einfo.adb (Has_Option): Reimplemented.
3201         * sem_prag.adb (Analyze_Refinement_Clause): Add global
3202         variables AR_Constit, AW_Constit, ER_Constit, EW_Constit,
3203         External_Constit_Seen and State. Add local variables Body_Ref,
3204         Body_Ref_Elmt and Extra_State. Reimplement part of the logic to
3205         avoid a cumbersome while pool. Verify the legality of an external
3206         state and relevant properties.
3207         (Check_External_Property): New routine.
3208         (Check_Matching_State): Remove parameter profile
3209         and update comment on usage.
3210         (Collect_Constituent): Store the
3211         relevant external property of a constituent.
3212         * sem_util.adb (Async_Readers_Enabled): Update the call to
3213         Has_Enabled_Property.
3214         (Async_Writers_Enabled): Update the call to Has_Enabled_Property.
3215         (Effective_Reads_Enabled): Update the call to Has_Enabled_Property.
3216         (Effective_Writes_Enabled): Update the call to Has_Enabled_Property.
3217         (Has_Enabled_Property): Rename formal parameter Extern to State_Id.
3218         Update comment on usage. Reimplement the logic to recognize the various
3219         formats of properties.
3221 2014-01-27  Ed Schonberg  <schonberg@adacore.com>
3223         * par-ch5.adb: Minor reformatting.
3225 2014-01-27  Tristan Gingold  <gingold@adacore.com>
3227         * s-tposen.ads: Harmonize style and comments.
3229 2014-01-27  Vincent Celier  <celier@adacore.com>
3231         * projects.texi: Document that shared library projects, by
3232         default, cannot import projects that are not shared library
3233         projects.
3235 2014-01-27  Robert Dewar  <dewar@adacore.com>
3237         * sem_ch8.adb (Find_Selected_Component): Use Replace instead
3238         of Rewrite.
3240 2014-01-27  Ed Schonberg  <schonberg@adacore.com>
3242         * a-suenco.adb, a-suenst.adb (Decode): Raise encoding error if
3243         any other exception is raised.
3244         (Convert): If both Input_Scheme and Output_Scheme are UTF_8 it is
3245         still necessary to perform a conversion in order to remove overlong
3246         encodings.
3248 2014-01-27  Robert Dewar  <dewar@adacore.com>
3250         * exp_smem.adb: Minor reformatting.
3252 2014-01-27  Thomas Quinot  <quinot@adacore.com>
3254         * a-calfor.ads: Fix incorrect reference to operator "-" in comment.
3256 2014-01-27  Ed Schonberg  <schonberg@adacore.com>
3258         * sem_res.adb (Make_Call_Into_Operator): In ASIS mode, relocate
3259         nodes for operands to the original node for the call, to preserve
3260         Original_Node pointers within the resolved operands, given that
3261         they may have been rewritten as well. Previous approach copied
3262         the operands into a new tree and lost those pointers.
3264 2014-01-27  Claire Dross  <dross@adacore.com>
3267         * a-cofove.adb, a-cofove.ads: Add Strict_Equal function to the API.
3269 2014-01-27  Ed Schonberg  <schonberg@adacore.com>
3271         * sem_util.adb (Check_Internal_Protected_Use): A call through
3272         an anonymous access parameter of the current protected function
3273         is not a potential modification of the current object.
3275 2014-01-27  Ed Schonberg  <schonberg@adacore.com>
3277         * a-cobove.adb (Reserve_Capacity): Procedure raises
3278         Capacity_Error, not Constraint_Error, when request cannot be
3279         satisfied.
3281 2014-01-27  Vincent Celier  <celier@adacore.com>
3283         * a-coorma.adb, a-cohama.adb (Assign): Copy the Source to the Target,
3284         not the Target to itself.
3286 2014-01-27  Ed Schonberg  <schonberg@adacore.com>
3288         * exp_ch4.adb (Expand_Concatenate): If the target of the
3289         concatenation is a library-level entity, always use the off-line
3290         version of concatenation, regardless of optimization level. This
3291         is space-efficient, and prevents linking problems when some
3292         units are compiled with different optimization levels.
3294 2014-01-27  Ed Schonberg  <schonberg@adacore.com>
3296         * sem_ch5.adb: Code clean up.
3298 2014-01-27  Ed Schonberg  <schonberg@adacore.com>
3300         * par-ch5.adb (P_Iterator_Specification): Improve error recovery
3301         when an array or container iterator includes a subtype indication,
3302         which is only legal in an element iterator.
3304 2014-01-27  Thomas Quinot  <quinot@adacore.com>
3306         * exp_ch7.adb: Minor reformatting.
3308 2014-01-27  Robert Dewar  <dewar@adacore.com>
3310         * opt.adb (SPARK_Mode): Default for library units is None rather
3311         than Off.
3312         * opt.ads: Remove AUTO from SPARK_Mode_Type SPARK_Mode_Type is
3313         no longer ordered.
3314         * sem_prag.adb (Analyze_Pragma, case SPARK_Mode): Remove AUTO
3315         possibility.
3316         * snames.ads-tmpl (Name_Auto): Removed, no longer used.
3318 2014-01-27  Robert Dewar  <dewar@adacore.com>
3320         * par-ch5.adb (P_Sequence_Of_Statements): Make entry in
3321         Suspicious_Labels table if we have identifier; followed by loop
3322         or block.
3323         * par-endh.adb (Evaluate_End_Entry): Search Suspicious_Labels table.
3324         * par.adb (Suspicious_Labels): New table.
3326 2014-01-27  Robert Dewar  <dewar@adacore.com>
3328         * exp_aggr.adb (Check_Bounds): Reason is range check, not
3329         length check.
3331 2014-01-27  Yannick Moy  <moy@adacore.com>
3333         * get_spark_xrefs.adb (Get_SPARK_Xrefs): Accept new type 'c' for
3334         reference.
3335         * lib-xref-spark_specific.adb (Is_Global_Constant): Remove useless
3336         function now.
3337         (Add_SPARK_Xrefs): Include references to constants.
3338         * spark_xrefs.ads Document new character 'c' for references to
3339         constants.
3341 2014-01-27  Thomas Quinot  <quinot@adacore.com>
3343         * exp_smem.adb (Add_Write_After): For a function call, insert write as
3344         an after action in a transient scope.
3346 2014-01-27  Thomas Quinot  <quinot@adacore.com>
3348         * exp_smem.adb (Expand_Shared_Passive_Variable): For a reference
3349         to a shared variable as an OUT formal in a call to an init proc,
3350         the 'Read call must be emitted after, not before, the call.
3352 2014-01-27  Robert Dewar  <dewar@adacore.com>
3354         * gnat_rm.texi: Remove mention of AUTO mode for SPARK_Mode pragma.
3356 2014-01-27  Robert Dewar  <dewar@adacore.com>
3358         * a-wichha.adb (Character_Set_Version): Change to output proper
3359         value.
3361 2014-01-27  Hristian Kirtchev  <kirtchev@adacore.com>
3363         * einfo.adb (Is_Input_Only_State): Removed.
3364         (Is_Non_Volatile_State): Removed.
3365         (Is_Output_State): Removed.
3366         * einfo.ads (Is_Input_Only_State): Remove attribute and
3367         subprogram. Update related entity.
3368         (Is_Non_Volatile_State):
3369         Remove attribute and subprogram. Update related entity.
3370         (Is_Output_State): Removed attribute and subprogram. Update
3371         related entity.
3372         * exp_ch6.adb (Expand_Subprogram_Contract): Update comment on
3373         generated code.
3374         * sem_ch3.adb (Analyze_Declarations): Analyze the contract of
3375         an object, not just variables.
3376         (Analyze_Object_Contract): New routine.
3377         (Analyze_Variable_Contract): Removed.
3378         (Process_Discriminants): Detect an illegal use of volatile
3379         discriminant in SPARK mode.
3380         * sem_ch5.adb (Analyze_Iterator_Specification):
3381         Detect an illegal use of volatile loop variable.
3382         (Analyze_Loop_Parameter_Specification): Detect an illegal use
3383         of volatile loop variable.
3384         * sem_ch6.adb (Process_Formals): Update the volatile object
3385         detection. Detect an illegal formal of mode IN OUT or OUT in
3386         SPARK mode. Enhance the error messages with references.
3387         * sem_ch12.adb (Instantiate_Object): Update the volatile object
3388         detection. Enhance the error messages with references.
3389         * sem_prag.adb (Analyze_Abstract_State): Enhance the error
3390         messages with references.
3391         (Analyze_Contract_Case): Enhance the error messages with references.
3392         (Analyze_External_Property): Call Check_Duplicate_Property to process
3393         an external property.
3394         (Analyze_External_Property_In_Decl_Part): New routine.
3395         (Analyze_External_State_In_Decl_Part): Removed.
3396         (Analyze_Global_Item): Detect an illegal
3397         use of a volatile constant. Detect an illegal use
3398         of a variable with enabled Effective_Reads. Enhance
3399         the error messages with references. Remove obsolete
3400         checks concerning Input_Only and Output_Only states.
3401         (Analyze_Initialization_Item): Enhance the error messages
3402         with references.
3403         (Analyze_Initializes_In_Decl_Part): Do not
3404         collect the states and variables when the initialization list
3405         is null.
3406         (Analyze_Input_Item): Enhance the error messages with references.
3407         (Analyze_Input_Output): Enhance the error messages with references.
3408         (Analyze_Pragma): Enhance the error messages with references.
3409         (Analyze_Refinement_Clause): Code reformatting.
3410         (Analyze_Refined_Depends_In_Decl_Part):
3411         Rename global variable Global to Reg_Global and update all
3412         occurrences. Add local variables D7 and D8. Update the error
3413         messages with references. Update the call to Collect_Global_Items.
3414         (Analyze_Refined_Global_In_Decl_Part): Add local variables
3415         Has_Proof_In_State, Proof_In_Constits and Proof_In_Items. Update
3416         the call to Collect_Global_Items.  Account for a Proof_In state
3417         in null / useless refinement checks. Verify the coverage of
3418         Proof_In states.
3419         (Check_Dependency_Clause): Remove local variable
3420         Out_Constits. Remove the retrieval and removal of constituents
3421         for an Output_Only state. Remove the reporting of unused
3422         Output_Only state constituents.
3423         (Check_Duplicate_Mode): Enhance
3424         the error message with a reference.
3425         (Check_Duplicate_Property): New routine.
3426         (Check_Duplicate_Option): Enhance the error message with a reference.
3427         (Check_External_Properties): Enhance the error message with a reference.
3428         (Check_Function_Return): Enhance the error message with a reference.
3429         (Check_In_Out_States): Update
3430         comment on usage. Add a specialized error message for Proof_In
3431         constituents. Enhance the error message with a reference.
3432         (Check_Input_States): Update comment on usage. Account for
3433         possible Proof_In constituents. Enhance the error message
3434         with a areference.
3435         (Check_Matching_Constituent): Enhance the error message with a
3436         reference.
3437         (Check_Matching_State): Enchance the error message with a reference.
3438         (Check_Mode): Add local variable From_Global. Update the call to
3439         Find_Mode.  Emit more precise error messages concerning extra items
3440         (Check_Mode_Restriction_In_Enclosing_Context): Consider
3441         pragma Refined_Global.  Enhance the error message with a
3442         reference.
3443         (Check_Mode_Restriction_In_Function): Enhance the error message with
3444         a reference.
3445         (Check_Output_States): Update comment on usage. Add local variable
3446         Posted.  Account for possible Proof_In constituents. Produce a detailed
3447         list of missing constituents.
3448         (Check_Proof_In_States): New routine.
3449         (Check_Refined_Global_Item): Handle Proof_In
3450         constituents. Enchance the error message with a reference.
3451         (Collect_Global_Items): Add formal parameters Proof_In_Items
3452         and Has_Proof_In_State. Update the comment on usage. Account
3453         for Proof_In items.
3454         (Create_Or_Modify_Clause): Enchance
3455         the error message with a reference.
3456         (Find_Mode): Add
3457         formal parameter From_Global. Update the comment on usage.
3458         Detect when the mode is governed by pragma [Refined_]Global.
3459         (Output_Constituents): Removed.
3460         (Report_Extra_Constituents):
3461         Report extra Proof_In constituents.
3462         (Report_Unused_Constituents): Removed.
3463         (Usage_Error): Code reformatting. Enhance the error
3464         messages with reference.
3465         * sem_prag.ads (Analyze_External_Property_In_Decl_Part): New routine.
3466         (Analyze_External_State_In_Decl_Part): Removed.
3467         * sem_res.adb (Resolve_Actuals): Update the volatile object
3468         detection. Enhance the error message with a reference.
3469         (Resolve_Entity_Name): Update the volatile object
3470         detection. Enhance the error message with a reference.
3471         * sem_util.adb (Is_Refined_State): Add a guard to avoid a crash.
3472         (Is_SPARK_Volatile_Object): New routine.
3473         (Has_Volatile_Component): New routine.
3474         * sem_util.ads (Is_Delegate): Alphabetized.
3475         (Is_SPARK_Volatile_Object): New routine.
3476         (Has_Volatile_Component): New routine.
3477         * snames.ads-tmpl: Remove names Name_Input_Only and Name_Output_Only.
3479 2014-01-27  Ed Schonberg  <schonberg@adacore.com>
3481         * sem_attr.adb: Resolve fully prefix of 'Update.
3483 2014-01-27  Ben Brosgol  <brosgol@adacore.com>
3485         * gnat_rm.texi: Minor clarifications.
3487 2014-01-27  Robert Dewar  <dewar@adacore.com>
3489         * sem_elab.adb (Check_Internal_Call_Continue): Avoid complaining
3490         about call that is generated as part of an Initial_Condition
3491         check.
3492         * sem_prag.adb: Minor spelling correction.
3494 2014-01-27  Robert Dewar  <dewar@adacore.com>
3496         * sem_prag.adb (Set_Convention_From_Pragma): Check that
3497         convention Ghost can only apply to functions.
3498         * einfo.ads, einfo.adb (Is_Ghost_Subprogram): Add clarifying comment.
3500 2014-01-27  Robert Dewar  <dewar@adacore.com>
3502         * gnat_ugn.texi: Add Short_Enums to documentation of
3503         -gnatet/-gnateT.
3505 2014-01-27  Robert Dewar  <dewar@adacore.com>
3507         * sem_prag.adb (Analyze_Input_Item): Correct check for input
3508         item in same package.
3509         * sem_util.ads, sem_util.adb (Within_Scope): New function.
3511 2014-01-26  Arnaud Charlet  <charlet@adacore.com>
3513         * a-intnam-lynxos.ads, mlib-tgt-specific-lynxos.adb,
3514         s-osinte-lynxos-3.adb, s-osinte-lynxos-3.ads, s-osinte-lynxos.adb,
3515         s-osinte-lynxos.ads, s-taprop-lynxos.adb, s-tpopsp-lynxos.adb,
3516         system-lynxos-ppc.ads, system-lynxos-x86.ads: Removed, no longer
3517         maintained.
3519 2014-01-25  Eric Botcazou  <ebotcazou@adacore.com>
3521         * gcc-interface/Makefile.in: Fix oversight.
3523 2014-01-25  Eric Botcazou  <ebotcazou@adacore.com>
3525         * gcc-interface/utils.c (convert_to_fat_pointer): Un-obfuscate the
3526         conversion from a thin pointer with a shifted value.
3527         * gcc-interface/utils2.c (gnat_build_constructor): Propagate the
3528         read-only flag from the values onto the result.
3529         (gnat_invariant_expr): Accept read-only CONSTRUCTORs.
3531 2014-01-25  Tristan Gingold  <gingold@adacore.com>
3533         * gcc-interface/decl.c (gnat_to_gnu_entity): Always build a variable
3534         for E_Variable with a pragma Linker_Section.
3536 2014-01-25  Robert Dewar  <dewar@adacore.com>
3538         * gcc-interface/decl.c (gnat_to_gnu_param): Make sure an Out parameter
3539         with Default_Value aspect is passed in by copy.
3541 2014-01-24  Eric Botcazou  <ebotcazou@adacore.com>
3543         * set_targ.adb: Set Short_Enums.
3544         * gcc-interface/lang.opt (fshort-enums): New option.
3545         * gcc-interface/misc.c (gnat_handle_option): Handle it.
3546         (gnat_post_options): Do not modify the global settings.
3548 2014-01-24  Robert Dewar  <dewar@adacore.com>
3550         * g-rannum.ads, g-rannum.adb (Random_Ordinary_Fixed): New generic
3551         function.
3552         (Random_Decimal_Fixed): New generic function.
3553         * s-rannum.ads: Minor comment clarifications.
3555 2014-01-24  Robert Dewar  <dewar@adacore.com>
3557         * back_end.adb: Remove Short_Enums handling (handled in
3558         Ttypes/Get_Targ now) Minor added comments.
3559         * freeze.adb: Change name Short_Enums_On_Target to
3560         Target_Short_Enums.
3561         * get_targ.ads, get_targ.adb (Get_Short_Enums): New function.
3562         * opt.ads: Minor comment updates.
3563         * sem_ch13.adb: Change name Short_Enums_On_Target to
3564         Target_Short_Enums.
3565         * set_targ.adb: Set Short_Enums from gcc back end.
3566         * set_targ.ads (Short_Enums): New variable.
3567         * targparm.ads, targparm.adb: Remove Short_Enums entries (handled in
3568         Ttypes/Get_Targ now).
3569         * ttypes.ads (Target_Short_Enums): New constant boolean switch
3571 2014-01-24  Pascal Obry  <obry@adacore.com>
3573         * g-sercom-mingw.adb: Fix serial port name for port number > 10.
3575 2014-01-24  Gary Dismukes  <dismukes@adacore.com>
3577         * exp_disp.adb (Expand_Dispatching_Call): Call Unqualify on Param when
3578         comparing it with Ctrl_Arg, since Ctrl_Arg may have had qualification
3579         stripped off.
3581 2014-01-24  Robert Dewar  <dewar@adacore.com>
3583         * sinfo.ads, make.adb, prj-env.adb: Minor reformatting.
3585 2014-01-24  Vincent Celier  <celier@adacore.com>
3587         * prj.adb (Add_Aggregated_Project): Do not add a project in
3588         the list if it is already there.
3590 2014-01-24  Yannick Moy  <moy@adacore.com>
3592         * lib-xref-spark_specific.adb (Enclosing_Subprogram_Or_Package):
3593         Correct the search for a subrogram declaration to which a pragma is
3594         attached.
3596 2014-01-24  Bob Duff  <duff@adacore.com>
3598         * gnat_ugn.texi: Document --decimal-grouping and
3599         --based-grouping switches in gnatpp.
3601 2014-01-24  Ed Schonberg  <schonberg@adacore.com>
3603         * sinfo.ads: Documentation update.
3605 2014-01-24  Ed Schonberg  <schonberg@adacore.com>
3607         * sem_ch3.adb (Constant_Redeclaration): New declaration is
3608         illegal if previous one has an initial expression that is an
3609         aggregate expanded into assignments.
3611 2014-01-24  Ed Schonberg  <schonberg@adacore.com>
3613         * sem_ch5.adb (Analyze_Loop_Parameter_Specification): Small
3614         code reorganization to remove spurious warning on a loop with
3615         an array element iterator that has a null range.
3617 2014-01-24  Vincent Celier  <celier@adacore.com>
3619         * make.adb (Binding_Phase): When setting the Ada paths, use
3620         the library ALI dir, not the object dir in libraries.
3622 2014-01-24  Yannick Moy  <moy@adacore.com>
3624         * sinfo.ads: Add documentation of check flag fields.
3626 2014-01-24  Ed Schonberg  <schonberg@adacore.com>
3628         * sem_res.adb (Resolve_Actuals): If an actual is a view
3629         conversion of a discriminated object, and the formal type is
3630         discriminated and constrained, apply a discriminant check to
3631         the object itself.
3633 2014-01-24  Robert Dewar  <dewar@adacore.com>
3635         * prj.adb, prj-env.adb, back_end.adb: Add comment, minor code clean ups.
3637 2014-01-24  Ed Schonberg  <schonberg@adacore.com>
3639         * sem_ch3.adb (Analyze_Declarations): At the end of an
3640         appropriate declarative part, call Freeze_All from the first
3641         declaration in the scope, not from the first unfrozen one. This
3642         is necessary to apply visibility checks to entities with delayed
3643         aspects. Otherwise, in the presence of instantiations and cleanups
3644         that they may generate, the delayed aspects may be analyzed too
3645         late and produce spurious visibility errors.
3646         * sem_attr.adb: Place etype on range.
3647         * sem_ch6.adb: Documentation expression functions.
3649 2014-01-24  Robert Dewar  <dewar@adacore.com>
3651         * exp_ch7.adb: Minor change of Indices to Indexes (preferred
3652         terminology in compiler).
3654 2014-01-24  Robert Dewar  <dewar@adacore.com>
3656         * scans.ads: Remove Tok_Raise from Sterm, Eterm, After_SM
3657         categories, now that Ada 95 supports raise expressions.
3659 2014-01-24  Robert Dewar  <dewar@adacore.com>
3661         * freeze.adb (Freeze_Enumeration_Type): Use new target parameter
3662         Short_Enums_On_Target.
3663         * sem_ch13.adb (Set_Enum_Esize): Take Short_Enums_On_Target
3664         into account.
3665         * targparm.ads, targparm.adb: Add new target parameter Short_Enums.
3667 2014-01-24  Ed Schonberg  <schonberg@adacore.com>
3669         * sem_ch5.adb (Analyze_Iterator_Specification): If subtype
3670         indication is given explicity, check that it matches the array
3671         component type or the container element type of the domain
3672         of iteration.
3674 2014-01-24  Tristan Gingold  <gingold@adacore.com>
3676         * back_end.adb (Scan_Compiler_Arguments): Set Short_Enums_On_Target.
3677         * gcc-interface/misc.c (flag_short_enums): Declare.
3678         (gnat_post_options): Set it.
3680 2014-01-24  Vincent Celier  <celier@adacore.com>
3682         * prj-env.adb (Ada_Objects_Path): Use Ada_Objects_Path_No_Libs
3683         to cache the result when Including_Libraries is False.
3684         * prj-env.ads (Ada_Objects_Path): Update documentation
3685         * prj.adb (Free (Project_Id)): Also free Ada_Objects_Path_No_Libs
3686         (Get_Object_Directory): Return the Library_Ali_Dir only when
3687         when Including_Libraries is True.
3688         * prj.ads (Get_Object_Directory): Fix and complete documentation
3689         (Project_Data): New component Ada_Objects_Path_No_Libs
3691 2014-01-24  Robert Dewar  <dewar@adacore.com>
3693         * checks.adb (Expr_Known_Valid): Result of fpt operator never
3694         considered valid.
3696 2014-01-24  Eric Botcazou  <ebotcazou@adacore.com>
3698         * back_end.adb: Minor fix in comment.
3700 2014-01-24  Javier Miranda  <miranda@adacore.com>
3702         * sem_ch3.adb (Check_Abstract_Overriding): Code reestructuration
3703         required to report the error in case of task types.
3705 2014-01-24  Ed Schonberg  <schonberg@adacore.com>
3707         * sem_attr.adb: Additional index checking.
3709 2014-01-24  Ed Schonberg  <schonberg@adacore.com>
3711         * sem_attr.adb (Analyze_Attribute, case 'Update): Analyze
3712         expressions in each component association, and for records note
3713         the entity in each association choice, for subsequent resolution.
3714         (Resolve_Attribute, case 'Update): Complete resolution of
3715         expressions in each component association.
3717 2014-01-24  Robert Dewar  <dewar@adacore.com>
3719         * sem.adb (Sem): Avoid premature reference to Current_Sem_Unit
3720         (this was causing Is_Main_Unit_Or_Main_Unit_Spec to be set wrong,
3721         leading to wrong handling of SPARK_Mode for library units).
3723 2014-01-24  Robert Dewar  <dewar@adacore.com>
3725         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Set SPARK_Mode
3726         on generic instances (do not consider them to be internally
3727         generated)
3729 2014-01-24  Doug Rupp  <rupp@adacore.com>
3731         * s-osinte-android.ads (pthread_sigmask): Import sigprocmask
3732         vice pthread_sigmask.
3734 2014-01-24  Vincent Celier  <celier@adacore.com>
3736         * prj.adb (Debug_Output (Str, Str2)): Output if verbosity is
3737         not default.
3739 2014-01-24  Vincent Celier  <celier@adacore.com>
3741         * prj-ext.adb (Add): Do not output anything when Silent is True,
3742         whatever the verbosity. When Source is From_External_Attribute,
3743         set the corresponding environment variable if it is not already set.
3744         * prj-ext.ads (Add): New Boolean parameter Silent, defaulted
3745         to False
3746         * prj-proc.adb (Process_Expression_For_Associative_Array):
3747         For attribute External, call Prj.Ext.Add with Silent set to
3748         True for the child environment, to avoid useless output in non
3749         default verbosity.
3751 2014-01-24  Ed Schonberg  <schonberg@adacore.com>
3753         * sem_res.adb (Set_Slice_Subtype): Handle properly a discrete
3754         range given by a subtype indication, and force evaluation of
3755         the bounds, as for a simple range.
3756         * exp_util.adb (Evaluate_Slice_Bounds): Utility to force evaluation
3757         of bounds of slice for various kinds of discrete ranges.
3758         (Evaluate_Name, Evaluate_Subtype_From_Expr): use
3759         Evaluate_Slice_Bounds.
3761 2014-01-24  Bob Duff  <duff@adacore.com>
3763         * s-taskin.ads (Activator): Make this Atomic, because
3764         Activation_Is_Complete reads it, and that can be called
3765         from any task. Previously, this component was only
3766         modified by the activator before activation, and by
3767         Self after activation.
3768         * a-taside.ads, a-taside.adb (Environment_Task,
3769         Activation_Is_Complete): Implement these missing functions.
3771 2014-01-24  Doug Rupp  <rupp@adacore.com>
3773         * init.c: Add a handler section for Android.
3775 2014-01-24  Arnaud Charlet  <charlet@adacore.com>
3777         * i-cexten.ads (Unsigned_33..64, Unsigned_33..64): New types.
3779 2014-01-24  Ed Schonberg  <schonberg@adacore.com>
3781         * sem_ch4.adb (Operator_Check): If one operand is a
3782         Raise_Expression, set its type to that of the other operand.
3783         * sem_res.adb (Resolve_Raise_Expression): new procedure.
3784         (Resolve_Actuals): For an actual that is a Raise_Expression,
3785         set the type to that of the formal.
3786         * sem_type.adb (Find_Unique_Type): If one of the operands is a
3787         Raise_Expression, return type of the other operand.
3789 2014-01-24  Ed Schonberg  <schonberg@adacore.com>
3791         * sem_aggr.adb (Resolve_Record_Aggregate): If a scalar
3792         component of the record has a type with a default aspect, and
3793         the corresponding aggregate component is initiaized with a box,
3794         use the default value in the rewritten aggregate.
3796 2014-01-24  Tristan Gingold  <gingold@adacore.com>
3798         * s-interr.ads, s-interr.adb, s-interr-hwint.adb, s-interr-vms.adb,
3799         s-interr-sigaction.adb,
3800         s-interr-dummy.adb (Install_Restricted_Handlers): Add Prio parameter.
3801         * exp_ch9.adb (Make_Initialize_Protection): Add Prio parameter
3802         to the call to Install_Restricted_Handlers.
3804 2014-01-24  Emmanuel Briot  <briot@adacore.com>
3806         * prj-nmsc.adb (Check_File): Add protection when the source is
3807         not fully initialized.
3809 2014-01-24  Ed Schonberg  <schonberg@adacore.com>
3811         * sem_util.adb (Is_Post_State): In a postcondition, a selected
3812         component that denotes an implicit dereference is a reference
3813         to the post state of the subprogram.
3815 2014-01-24  Robert Dewar  <dewar@adacore.com>
3817         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): SPARK_Mode OFF
3818         for generated subprograms.
3819         (Analyze_Subprogram_Specification): Ditto.
3821 2014-01-24  Vincent Celier  <celier@adacore.com>
3823         * prj-dect.adb (Check_Attribute_Allowed): Detect more forbidden
3824         attributes in package Builder of aggregate and aggregate library
3825         projects.
3826         * prj-nmsc.adb (Process_Naming_Scheme.Check.Check_Aggregate):
3827         Remove procedure (Process_Naming_Scheme.Check.Check_Aggregated):
3828         Remove parameters.  Change error message from "... externally
3829         build library ..." to "... externally built project ...".
3830         (Process_Naming_Scheme.Check): Do not do any check in aggregate
3831         project, as attribute Library_Dir and Library_Name have already
3832         been detected as forbidden.
3834 2014-01-24  Vincent Celier  <celier@adacore.com>
3836         * prj-env.adb (Find_Project): If cached project path is not in
3837         project directory, look in current directory first and use cached
3838         project path only if project is not found in project directory.
3840 2014-01-24  Robert Dewar  <dewar@adacore.com>
3842         * sem_util.adb, lib-xref.adb: Correct false positive warnings.
3844 2014-01-24  Vincent Celier  <celier@adacore.com>
3846         * projects.texi: Document that aggregate projects are only
3847         supported by gprbuild, but not by gnatmake.  Document that the
3848         only attribute Switches in package Binder of aggregate projects
3849         will be ignored if its index is not others.  Document that
3850         attribute Global_Config_File is allowed in package Binder of
3851         aggregate projects.
3853 2014-01-24  Robert Dewar  <dewar@adacore.com>
3855         * sem_prag.adb: Minor code reorganization.
3856         * sem_util.adb: Minor fix of potential latent bug in Is_LHS.
3858 2014-01-24  Pascal Obry  <obry@adacore.com>
3860         * prj-attr.adb, projects.texi, snames.ads-tmpl: Add Excluded_Patterns
3861         attribute definition.
3863 2014-01-24  Vincent Celier  <celier@adacore.com>
3865         * makeutl.adb (Queue.Insert_No_Roots): In gprbuild, do not put
3866         in the Queue the same source (same path, same multi-source index)
3867         from the same project file, to avoid compiling several times
3868         the same source.
3870 2014-01-24  Eric Botcazou  <ebotcazou@adacore.com>
3872         * einfo.ads (First_Rep_Item): Remove obsolete stuff.
3873         (Has_Gigi_Rep_Item): Likewise.
3874         * sem_prag.adb (Analyze_Pragma) <Pragma_Linker_Section>: Do not set
3875         Has_Gigi_Rep_Item for objects.
3876         * gcc-interface/decl.c (prepend_one_attribute_to): Rename into...
3877         (prepend_one_attribute): ...this.
3878         (prepend_one_attribute_pragma): New function extracted from...
3879         (prepend_attributes): ...here.  Swap the parameters for consistency.
3880         (gnat_to_gnu_entity): Adjust calls to prepend_one_attribute_to and to
3881         prepend_attributes.
3882         <object>: Deal with a pragma Linker_Section on a constant
3883         or variable.  <E_Function>: Deal with a pragma Linker_Section
3884         on a subprogram.
3885         (get_minimal_subprog_decl): Adjust calls to prepend_one_attribute_to.
3887 2014-01-24  Vincent Celier  <celier@adacore.com>
3889         * opt.ads: Minor comment update.
3891 2014-01-24  Robert Dewar  <dewar@adacore.com>
3893         * sem_prag.adb (Analyze_Input_Output): Add missing error check
3894         for junk operand.
3895         * sem_util.adb (Is_Refined_State): Add defense against junk
3896         tree from error.
3898 2014-01-24  Pascal Obry  <obry@adacore.com>
3900         * projects.texi: Removes Build_Slaves attribute documentation.
3902 2014-01-23  Robert Dewar  <dewar@adacore.com>
3904         * opt.adb (Register_Opt_Config_Switches): Save SPARK_Mode_Pragma
3905         setting.
3907 2014-01-23  Ed Schonberg  <schonberg@adacore.com>
3909         * sem_util.adb (Is_Potentially_Unevaluated): Predicate only
3910         applies to expressions that come from source.
3911         * sem_attr.adb (Analyze_Attribute, case 'Old): Improve error
3912         message.
3913         (Analyze_Attribute, case 'Loop_Entry): Apply SPARK 2014 legality
3914         rule regarding potentially unevaluated expressions, to prefix
3915         of attribute.
3917 2014-01-23  Ed Schonberg  <schonberg@adacore.com>
3919         * exp_util.adb (Make_Invqriant_Call): If type of expression is
3920         a private extension, get invariant from base type.
3922 2014-01-23  Robert Dewar  <dewar@adacore.com>
3924         * sem_util.adb, sem_attr.adb: Minor reformatting.
3926 2014-01-23  Robert Dewar  <dewar@adacore.com>
3928         * opt.adb (Save_Opt_Config_Switches): Save SPARK_Mode_Pragma
3929         (Restore_Opt_Config_Switches): Restore SPARK_Mode_Pragma.
3930         * sem.adb (Semantics): Remove save/restore of
3931         SPARK_Mode[_Pragma]. Not needed since already done in
3932         Save/Restore_Opt_Config_Switches.
3934 2014-01-23  Robert Dewar  <dewar@adacore.com>
3936         * gnat_rm.texi, einfo.adb, einfo.ads, sem_prag.adb, gnat_ugn.texi,
3937         freeze.adb, repinfo.adb, aspects.adb, aspects.ads, sem_ch13.adb:
3938         Linker_Section enhancements.
3940 2014-01-23  Tristan Gingold  <gingold@adacore.com>
3942         * gnat_rm.texi: Minor editing.
3944 2014-01-23  Robert Dewar  <dewar@adacore.com>
3946         * opt.adb (Set_Opt_Config_Switches): Reset SPARK mode for
3947         with'ed internal units.
3948         * sem.adb (Semantics): Save and restore SPARK_Mode[_Pragma].
3950 2014-01-23  Javier Miranda  <miranda@adacore.com>
3952         * lib-xref.adb (Generate_Reference): As part of processing the
3953         "end-of-spec" reference generate an extra reference to the first
3954         private entity of the package.
3955         * xr_tabls.adb (Add_Reference): No action needed for the extra
3956         'E' reference associated; similar to the processing of the
3957         'e' reference.
3959 2014-01-23  Bob Duff  <duff@adacore.com>
3961         * gnat_ugn.texi: Change "--&pp off" to "--!pp off".
3963 2014-01-23  Ed Schonberg  <schonberg@adacore.com>
3965         * sem_util.ads, sem_util.adb (Is_Potentially_Unevaluated): new
3966         predicate to implement rule given in 6.1.1 (20/3).
3967         * sem_attr.adb (Analyze_Attribute, case 'Old): Reject prefix of
3968         'Old in a postcondition, if it is potentially unevaluated and
3969         it is not an entity name.
3971 2014-01-23  Bob Duff  <duff@adacore.com>
3973         * gnat_ugn.texi: Document the new "--&pp off" feature of gnatpp.
3975 2014-01-23  Robert Dewar  <dewar@adacore.com>
3977         * gnatlink.adb (Gnatlink): Fix problem of generating bad name
3978         msg on VMS.
3980 2014-01-23  Bob Duff  <duff@adacore.com>
3982         * g-dynhta.ads: Minor comment fix.
3984 2014-01-23  Yannick Moy  <moy@adacore.com>
3986         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Inherit SPARK_Mode
3987         from spec on body only when not already inherited on spec. Set
3988         SPARK_Mode from context on body without previous spec.  *
3989         * sem_prag.adb (Analyze_Pragma): Check placement of pragma on
3990         library-level entities.  Correct retrieval of entity from
3991         declaration, for cases where the declaration is not a unit.
3992         * sem_ch12.adb (Instantiate_Object): Avoid
3993         calling Is_Volatile_Object on an empty node.
3995 2014-01-23  Robert Dewar  <dewar@adacore.com>
3997         * gnatlink.adb (Gnatlink): Check for suspicious executable file
3998         names on windows.
4000 2014-01-23  Robert Dewar  <dewar@adacore.com>
4002         * a-ngelfu.ads: Remove bad uses of AND which should be AND THEN.
4003         * sem_res.adb (Check_No_Direct_Boolean_Operators): Don't give
4004         style errors in instances.
4005         * g-dynhta.ads (Static_HTable): Comment updates.
4007 2014-01-23  Vincent Celier  <celier@adacore.com>
4009         * prj-conf.adb (Get_Or_Create_Configuration_File): Do not attempt
4010         to find a configuration project file when Config_File_Name is
4011         No_Configuration_File.
4012         * prj-conf.ads (No_Configuration_File): New constant String.
4013         * prj-pars.adb (Parse): Call Get_Or_Create_Configuration_File
4014         with Config_File_Name set to No_Configuration_File, so that
4015         no existing configuration project file will be used, and the
4016         configuration project will be only created in memory when
4017         Add_Default_GNAT_Naming_Scheme is called.
4018         * projects.texi: Minor reformatting.
4020 2014-01-23  Vincent Celier  <celier@adacore.com>
4022         * prj-conf.adb (Get_Or_Create_Configuration_File): Never parse
4023         a config project file if On_Load_Config is not null.
4024         * prj-pars.adb: Minor comment changes.
4026 2014-01-23  Ed Schonberg  <schonberg@adacore.com>
4028         * lib-xref.adb (Output_References): Output progenitors of
4029         synchronized tagged types, for source navigation.
4031 2014-01-23  Robert Dewar  <dewar@adacore.com>
4033         * exp_util.adb, sinfo.adb, sinfo.ads, sem.adb, sem_res.adb,
4034         expander.adb, exp_ch11.adb, exp_ch11.ads, sem_ch11.adb, sem_ch11.ads,
4035         sprint.adb, sprint.ads: Remove unused node N_Subprogram_Info.
4037 2014-01-23  Emmanuel Briot  <briot@adacore.com>
4039         * prj-conf.adb (Get_Or_Create_Configuration_File): call
4040         On_Load_Config later.
4042 2014-01-23  Hristian Kirtchev  <kirtchev@adacore.com>
4044         * sem_ch3.adb (Analyze_Declarations): Do not
4045         generate the spec of the late primitive in ASIS mode. Add two
4046         comments to explain the special cases when the expansion is
4047         not performed.
4049 2014-01-23  Robert Dewar  <dewar@adacore.com>
4051         * sem_util.adb (Note_Possible_Modification): Fix error of
4052         misbehaving for implicit dereference cases in -gnatc mode.
4054 2014-01-23  Emmanuel Briot  <briot@adacore.com>
4056         * prj-pars.adb: Minor reformatting.
4058 2014-01-22  Ed Schonberg  <schonberg@adacore.com>
4060         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): A subprogram
4061         body generated for an expression function within a protected body
4062         needs a set of renaming declarations if the expression function
4063         comes from source.
4065 2014-01-22  Ed Schonberg  <schonberg@adacore.com>
4067         * lib-xref.adb (Get_Type_Reference): In semantics-only mode,
4068         list interface progenitor of a tagged concurrent type, for better
4069         source navigation.
4071 2014-01-22  Robert Dewar  <dewar@adacore.com>
4073         * lib.adb (In_Extended_Main_Code_Unit): Return False for
4074         Standard_Location.
4075         (In_Extended_Main_Source_Unit): Return False for Standard_Location.
4076         * lib.ads (In_Extended_Main_Code_Unit): Add documentation on
4077         treatment of Slocs No_Location and Standard_Location.
4078         * restrict.adb (Check_Restriction_No_Dependence): Explicitly
4079         check for entity with Standard_Location Sloc, rather than relying
4080         on Lib routines to do that.
4081         * sem_res.adb (Resolve_Call): Implement SPARK_05 restriction
4082         that a call cannot occur before a later occuring body within
4083         the same unit.
4085 2014-01-22  Thomas Quinot  <quinot@adacore.com>
4087         * rtsfind.adb: Update comment.
4089 2014-01-22  Hristian Kirtchev  <kirtchev@adacore.com>
4091         * sem_aux.ads, sem_aux.adb (Is_Body): New routine.
4092         * sem_ch3.adb (Analyze_Declarations): Add local variable
4093         Body_Seen. Generate the spec of a late controlled
4094         primitive body that is about to freeze its related type.
4095         (Handle_Late_Controlled_Primitive): New routine.
4097 2014-01-22  Robert Dewar  <dewar@adacore.com>
4099         * a-stream.adb: Minor reformatting.
4101 2014-01-22  Ed Schonberg  <schonberg@adacore.com>
4103         * sem_ch8.adb (From_Actual_Package): Introduce a recursive
4104         sub-procedure Declared_In_Actual to handle properly the visibility
4105         of actuals in actual packages, that are themselves actuals to a
4106         actual package of the current instance. This mimics properly the
4107         visibility of formals of formal packages declared with a box,
4108         within the corresponding generic unit.
4110 2014-01-22  Robert Dewar  <dewar@adacore.com>
4112         * checks.adb: Do not assume that a volatile variable is valid.
4114 2014-01-22  Thomas Quinot  <quinot@adacore.com>
4116         * g-catiio.ads (Image, Value): Clarify that these functions
4117         operate in the local time zone.  Minor documentation update.
4119 2014-01-22  Thomas Quinot  <quinot@adacore.com>
4121         * csets.adb, csets.ads, opt.ads: Minor documentation fixes.
4123 2014-01-22  Robert Dewar  <dewar@adacore.com>
4125         * sem_aux.adb, sem_aux.ads, sem_ch3.adb (Has_Unconstrained_Elements):
4126         Moved to sem_aux.adb.
4128 2014-01-22  Robert Dewar  <dewar@adacore.com>
4130         * vms_data.ads: Minor reformatting.
4132 2014-01-22  Robert Dewar  <dewar@adacore.com>
4134         * debug.adb: Document messages affected by -gnatd.E including
4135         the new ones that relate to late definition of equality.
4136         * sem_ch6.adb (Check_Untagged_Equality): In Ada 2012 mode, if
4137         debug flag -gnatd.E is set, then generate warnings rather than
4138         errors.
4139         (Check_Untagged_Equality): In earlier versions of Ada,
4140         generate warnings if Warn_On_Ada_2012_Incompatibility flag is set.
4142 2014-01-22  Robert Dewar  <dewar@adacore.com>
4144         * sem_prag.adb (Usage_Error): Output additional messages for
4145         unconstrained OUT parameters lacking an input dependency.
4147 2014-01-22  Robert Dewar  <dewar@adacore.com>
4149         * sem_ch4.adb: Minor reformatting.
4151 2014-01-22  Robert Dewar  <dewar@adacore.com>
4153         * restrict.ads: Minor reformatting.
4154         * sem_res.adb (Resolve_Call): Check for SPARK_05 restriction that
4155         forbids a call from within a subprogram to the same subprogram.
4157 2014-01-22  Thomas Quinot  <quinot@adacore.com>
4159         * a-stream.ads (Read_SEA, Write_SEA): New subprograms, optimized
4160         stream attributes for Stream_Element_Array.
4161         * a-stream.adb (Read_SEA, Write_SEA): Bodies for the above.
4162         * rtsfind.adb (Check_CRT): Do not reject a reference to an entity
4163         defined in the current scope.
4165 2014-01-22  Robert Dewar  <dewar@adacore.com>
4167         * debug.adb, exp_ch4.adb, erroutc.adb: Minor reformatting.
4169 2014-01-22  Thomas Quinot  <quinot@adacore.com>
4171         * sem_ch7.adb, sem_ch8.adb, exp_ch3.adb: Minor reformatting.
4173 2014-01-22  Thomas Quinot  <quinot@adacore.com>
4175         * sem_ch3.adb (Analyze_Object_Declaration): For a constant
4176         declaration initialized with a function call, whose type
4177         has variable size, need to remove side effects so that the
4178         initialization expression becomes a dereference of a temporary
4179         reference to the function result.
4181 2014-01-22  Yannick Moy  <moy@adacore.com>
4183         * errout.adb (Initialize): Remove trick to add dummy entry
4184         in Warnings table.
4185         * erroutc.adb (Set_Warnings_Mode_Off,
4186         Set_Warnings_Mode_On): Do nothing if warnings are suppressed by
4187         command line switch.
4188         * opt.ads (Warning_Mode): Document behavior
4189         wrt pragma Warnings, in normal mode and in GNATprove_Mode.
4191 2014-01-22  Robert Dewar  <dewar@adacore.com>
4193         * sem_ch3.adb, errout.adb, erroutc.adb: Minor reformatting.
4195 2014-01-22  Robert Dewar  <dewar@adacore.com>
4197         * sem_ch13.adb (Check_Pool_Size_Clash): New procedure
4198         (Analyze_Attribute_Definition_Clause, case Storage_Pool): call
4199         Check_Pool_Size_Clash (Analyze_Attribute_Definition_Clause,
4200         case Storage_Size): call Check_Pool_Size_Clash.
4202 2014-01-22  Robert Dewar  <dewar@adacore.com>
4204         * sem_ch3.adb, exp_util.adb, sem_dim.adb, sem_elab.adb, sem_ch8.adb,
4205         sem_eval.ads: Minor reformatting.
4207 2014-01-22  Thomas Quinot  <quinot@adacore.com>
4209         * sem_eval.adb (Compile_Time_Known_Bounds): Return False for
4210         Any_Composite to prevent cascaded errors.
4212 2014-01-22  Yannick Moy  <moy@adacore.com>
4214         * errout.adb (Initialize): Do not insert special entry in Warnings
4215         table in GNATprove_Mode.
4216         * erroutc.adb (Set_Warnings_Mode_On): Add info in Warnings table in
4217         GNATprove_Mode.
4218         * gnat1drv.adb (Adjust_Global_Switches): Do not suppress frontend
4219         warnings anymore.
4221 2014-01-22  Robert Dewar  <dewar@adacore.com>
4223         * sem_prag.adb (Analyze_Initializes_In_Decl_Part): Handle null
4224         initializes case.
4226 2014-01-22  Robert Dewar  <dewar@adacore.com>
4228         * snames.ads-tmpl: Update header.
4230 2014-01-22  Thomas Quinot  <quinot@adacore.com>
4232         * exp_util.adb (Insert_Actions): When inserting actions on a
4233         short circuit operator that has already been analyzed, do not park
4234         actions in node; instead introduce an N_Expression_With_Actions
4235         and insert actions immediately.
4236         Add guard for unexpected case of climbing up through statement
4237         in Actions list of an N_Expression_With_Actions.
4238         * sem_elab.adb (Insert_Elab_Check): Remove complex
4239         specialized circuitry for the case where the context is already
4240         analyzed, as it is not needed and introduces irregularities in
4241         finalization. Instead rely on the above change to Insert_Actions
4242         to ensure that late insertion on short circuit operators works
4243         as expected.
4245 2014-01-22  Ed Schonberg  <schonberg@adacore.com>
4247         * sem_ch4.adb (Operator_Check): Improve error message when an
4248         operand of concatenation is an access type.
4250 2014-01-22  Thomas Quinot  <quinot@adacore.com>
4252         * sem_dim.adb (Analyze_Dimension_Identifier): Add guard against
4253         cascaded error.
4255 2014-01-22  Ed Schonberg  <schonberg@adacore.com>
4257         * sem_ch8.adb (Find_Selected_Component): Handle properly the case
4258         of an expanded name in a proper body, whose prefix is a package
4259         in the context of the proper body, when there is a homonym of
4260         the package declared in the parent unit.
4262 2014-01-22  Robert Dewar  <dewar@adacore.com>
4264         * sem_warn.adb (Check_Use_Clause): Don't give no entities used
4265         msg if errors found.
4266         (Check_One_Unit): Same change.
4268 2014-01-22  Robert Dewar  <dewar@adacore.com>
4270         * ug_words: Add missing/wrong entries for VMS warning switches.
4271         * sem_prag.adb (Check_Duplicate_Pragma): Avoid flagging parent type.
4273 2014-01-22  Jerome Guitton  <guitton@adacore.com>
4275         * mlib-tgt-specific-vxworks.adb (Get_Target_Suffix): Replace xscale by
4276         arm.
4278 2014-01-22  Robert Dewar  <dewar@adacore.com>
4280         * gnat_rm.texi, gnat_ugn.texi: Document passive task optimization
4282 2014-01-22  Eric Botcazou  <ebotcazou@adacore.com>
4284         * gcc-interface/Makefile.in: Minor fixes.
4286 2014-01-21  Robert Dewar  <dewar@adacore.com>
4288         * par-ch4.adb (P_If_Expression): Rewritten to improve error recovery.
4289         * par-ch5.adb (P_Condition): New version with expression prescanned.
4290         * par.adb (P_Condition): New version with expression prescanned.
4292 2014-01-21  Robert Dewar  <dewar@adacore.com>
4294         * gnat_rm.texi: Document that Allow_Integer_Address is ignored
4295         if Address is not a private type.
4296         * sem_prag.adb (Analyze_Pragma, case Allow_Integer_Address):
4297         Ignore pragma if System.Address is not a private type.
4299 2014-01-21  Arnaud Charlet  <charlet@adacore.com>
4301         * namet.ads (Name_Len): Initialize to 0 to avoid accessing an
4302         uninitialized value.
4304 2014-01-21  Thomas Quinot  <quinot@adacore.com>
4306         * gnat_rm.texi (Scalar_Storage_Order): Update documentation.
4308 2014-01-21  Ed Schonberg  <schonberg@adacore.com>
4310         * sem_ch12.adb (Set_Instance_Env): In Ada 2012 mode, preserve
4311         the value of Assertions_Enabled flag when compiling an instance of
4312         an internal unit. This facilitates the use of pre/postconditions
4313         in generic internal units, such as the new elementary function
4314         libraries.
4316 2014-01-21  Robert Dewar  <dewar@adacore.com>
4318         * exp_aggr.adb: Minor reformatting.
4319         * sem_attr.adb: Minor reformatting.
4320         * sem_res.adb: Minor comment addition.
4321         * einfo.adb: Minor comment updates.
4322         * freeze.adb: Minor reformatting and code reorganization.
4324 2014-01-21  Ed Schonberg  <schonberg@adacore.com>
4326         * par-ch4.adb (P_If_Expression): Handle more gracefully an
4327         elsif clause that does not have an else part.
4329 2014-01-21  Robert Dewar  <dewar@adacore.com>
4331         * checks.adb, sem_util.ads, sem_ch4.adb: Minor reformatting.
4332         * gcc-interface/Makefile.in: clean up target pairs.
4334 2014-01-21  Pascal Obry  <obry@adacore.com>
4336         * projects.texi: Minor typo fix.
4338 2014-01-21  Thomas Quinot  <quinot@adacore.com>
4340         * freeze.adb (Check_Component_Storage_Order): If a record type
4341         has an explicit Scalar_Storage_Order attribute definition clause,
4342         reject any component that itself is of a composite type and does
4343         not have one.
4345 2014-01-21  Ed Schonberg  <schonberg@adacore.com>
4347         * sem_ch10.adb (Generate_Parent_Reference): Make public so it
4348         can be used to generate proper cross-reference information for
4349         the parent units of proper bodies.
4351 2014-01-21  Thomas Quinot  <quinot@adacore.com>
4353         * exp_pakd.adb (Expand_Packed_Element_Set,
4354         Expand_Packed_Element_Reference): No byte swapping required in
4355         the front-end for the case of a reverse storage order array,
4356         as this is now handled uniformly in the back-end.  However we
4357         still need to swap back an extracted element if it is itself a
4358         nested composite with reverse storage order.
4360 2014-01-21  Hristian Kirtchev  <kirtchev@adacore.com>
4362         * sem_prag.adb (Analyze_External_Property): Add processing for "others".
4363         (Analyze_Pragma): Update the grammar of pragma Abstract_State to
4364         include "others".
4366 2014-01-21  Arnaud Charlet  <charlet@adacore.com>
4368         * gnat_ugn.texi: Minor updates.
4370 2014-01-21  Thomas Quinot  <quinot@adacore.com>
4372         * exp_pakd.adb: Update comment, minor reformatting.
4374 2014-01-21  Hristian Kirtchev  <kirtchev@adacore.com>
4376         * sem_ch3.adb (Analyze_Variable_Contract): Trigger the volatile
4377         object check when SPARK_Mode is on.
4378         * sem_ch6.adb (Process_Formals): Trigger the volatile object
4379         check when SPARK_Mode is on.
4380         * sem_ch12.adb (Instantiate_Object): Trigger the volatile object
4381         check when SPARK_Mode is on.
4382         * sem_ch13.adb (Analyze_Aspect_Specifications): Insert the
4383         corresponding pragma of aspect SPARK_Mode in the visible
4384         declarations of a package declaration.
4385         * sem_prag.adb (Analyze_Pragma): Trigger the volatile object
4386         check when SPARK_Mode is on.
4387         * sem_res.adb (Resolve_Actuals): Trigger the volatile object
4388         check when SPARK_Mode is on.
4389         (Resolve_Entity_Name): Trigger
4390         the volatile object check when SPARK_Mode is on.
4392 2014-01-21  Robert Dewar  <dewar@adacore.com>
4394         * sem_ch3.adb, sem_prag.adb, sem_prag.ads, sem_ch12.adb, sem_res.adb,
4395         sem_ch6.adb, a-except-2005.adb: Minor reformatting.
4397 2014-01-21  Ed Schonberg  <schonberg@adacore.com>
4399         * exp_ch3.adb (Expand_N_Object_Declaration): When a class-wide
4400         object is declared, it is rewritten as a renaming of an dynamic
4401         expression that wraps the initial value.  The renaming declaration
4402         is first given an internal name, to prevent collisions with the
4403         entity already declared, and then the name is modified to reflect
4404         the original one. the modification of the name must preserve
4405         the source location of the original, to prevent spurious errors
4406         when compiling with style checks if the declaration involves
4407         more than one entity.
4409 2014-01-21  Hristian Kirtchev  <kirtchev@adacore.com>
4411         * aspects.adb Add entries for Async_Readers, Async_Writers,
4412         Effective_Reads and Effective_Writes in table Canonical_Aspect.
4413         * aspects.ads Add entries for Async_Readers, Async_Writers,
4414         Effective_Reads and Effective_Writes in tables Aspect_Id,
4415         Aspect_Names, Aspect_Delay and Implementation_Defined_Aspect.
4416         * atree.adb (Ekind_In): New version with 8 parameters.
4417         (Node34): New routine.
4418         (Set_Node34): New routine.
4419         * atree.ads (Ekind_In): New version with 8 parameters.
4420         (Node34): New routine.
4421         (Set_Node34): New routine.
4422         * einfo.adb Contract is now Node34.
4423         (Contract): Update the assertion and node usage.
4424         (Get_Pragma): Include pragmas Async_Readers, Async_Writers,
4425         Effective_Reads and Effective_Writes.
4426         (Set_Contract): Update the assertion and node usage.
4427         (Write_Field24_Name): Remove the output for a contract.
4428         (Write_Field34_Name): Add output for a contract.
4429         * einfo.ads Contract is now Node34. Update the comment on
4430         attribute usage and related node structures.
4431         (Get_Pragma): Update the comment on usage.
4432         * par-prag.adb (Prag): Pragmas Async_Readers, Async_Writers,
4433         Effective_Reads and Effective_Writes do not require special
4434         processing by the parser.
4435         * sem_ch3.adb (Analyze_Variable_Contract): New routine.
4436         (Analyze_Declarations): Analyze the contract of a variable at
4437         the end of the declarative region.
4438         (Analyze_Object_Declaration): Create a contract for a variable.
4439         * sem_ch6.adb (Analyze_Subprogram_Contract): Update the retrieval
4440         of classification pragmas.
4441         (Process_Formals): Detect an illegal
4442         use of a volatile object as a formal in a function.
4443         * sem_ch12.adb (Instantiate_Object): Detect an illegal use of
4444         a volatile object as an actual in generic instantiation.
4445         * sem_prag.adb Add entries for Async_Readers, Async_Writers,
4446         Effective_Reads and Effective_Writes in table Sig_Flags.
4447         (Analyze_External_State_In_Decl_Part): New routine.
4448         (Analyze_Global_Item): Detect an illegal use of a volatile object
4449         as a global item of a function.
4450         (Analyze_Pragma): Reimplement
4451         pragma Abstract_State. Add support for pragmas Async_Readers,
4452         Async_Writers, Effective_Reads and Effective_Writes.
4453         (Check_External_Properties): New routine.
4454         * sem_prag.ads (Analyze_External_State_In_Decl_Part): New routine.
4455         (Check_External_Properties): New routine.
4456         * sem_res.adb (Resolve_Actuals): Detect an illegal use of a
4457         volatile object as an actual in a call.
4458         (Resolve_Entity_Name):
4459         Add local variables Par, Prev and Usage_OK. Detect illegal
4460         contexts of volatile objects.
4461         * sem_util.adb (Add_Contract_Item): Add support for
4462         pragmas associated with the contract of a variable.
4463         (Async_Readers_Enabled): New routine.
4464         (Async_Writers_Enabled): New routine.
4465         (Effective_Reads_Enabled): New routine.
4466         (Effective_Writes_Enabled): New routine.
4467         (Has_Enabled_Property):
4468         New routine.
4469         (Is_Unchecked_Conversion_Instance): New routine.
4470         (Is_Volatile_Object): Add support for entities that may denote
4471         a volatile object.
4472         * sem_util.ads (Add_Contract_Item): Update the
4473         comment on usage.
4474         (Async_Readers_Enabled): New routine.
4475         (Async_Writers_Enabled): New routine.
4476         (Effective_Reads_Enabled): New routine.
4477         (Effective_Writes_Enabled): New routine.
4478         (Is_Unchecked_Conversion_Instance): New routine.
4479         * sinfo.ads Update the comment on the structure of N_Contract.
4480         * snames.ads-tmpl Add predefined names for Async_Readers,
4481         Async_Writers, Effective_Reads and Effective_Writes. Add
4482         pragma ids for Async_Readers, Async_Writers, Effective_Reads
4483         and Effective_Writes.
4485 2014-01-21  Robert Dewar  <dewar@adacore.com>
4487         * exp_ch4.adb (Eval_Op_Expon): Use CRT_Safe_Compile_Time_Known_Value
4488         * sem_eval.adb (Compile_Time_Known_Value): Remove special
4489         handling of CRT mode (CRT_Safe_Compile_Time_Known_Value): New
4490         function (Eval_Op_Expon): Add CRT_Safe in call to Test_Foldable
4491         (Test_Foldable): Add CRT_Safe parameter
4492         * sem_eval.ads (Compile_Time_Known_Value): Remove special
4493         handling of CRT mode.
4494         (CRT_Safe_Compile_Time_Known_Value): New function.
4496 2014-01-21  Robert Dewar  <dewar@adacore.com>
4498         * sem_prag.adb (Analyze_Pragma, case SPARK_Mode): Fix problem
4499         with pragma or aspect that applies to package spec or subprogram
4500         spec.
4502 2014-01-21  Robert Dewar  <dewar@adacore.com>
4504         * exp_aggr.adb: Minor reformatting.
4506 2014-01-21  Johannes Kanig  <kanig@adacore.com>
4508         * gnat1drv.adb (Gnat1drv) remove obsolete reference to -gnatd.H.
4510 2014-01-21  Bob Duff  <duff@adacore.com>
4512         * gnat_ugn.texi: Document the "checks" attribute in gnat2xml.
4514 2014-01-21  Steve Baird  <baird@adacore.com>
4516         * gnat_rm.texi: Improve description of SPARK_Mode pragma.
4518 2014-01-21  Vincent Celier  <celier@adacore.com>
4520         * prj-part.adb (Parse_Single_Project): Accept to extend a project
4521         if it has only be imported by an project being extended. When a
4522         project that has only been imported by a project being extended
4523         is imported by another project that is not being extended,
4524         reset the previous indication, so that it will be an error if
4525         this project is extended later.
4526         * prj-tree.adb (Create_Project): Include component From_Extended
4527         in table Projects_HT
4528         * prj-tree.ads (Project_Name_And_Node): New Boolean component
4529         From_Extended
4531 2014-01-21  Robert Dewar  <dewar@adacore.com>
4533         * atree.ads, atree.adb: Add Node33 and Set_Node33.
4534         * einfo.ads, einfo.adb (SPARK_Pragma): New field (SPARK_Aux_Pragma):
4535         New field (SPARK_Pragma_Inherited): New flag
4536         (SPARK_Aux_Pragma_Inherited): New flag (SPARK_Mode_Pragmas):
4537         Removed.
4538         * lib.ads, lib.adb: Remove SPARK_Mode_Pragma, no longer used.
4539         * opt.ads (SPARK_Mode_Pragma): New global variable.
4540         * sem.ads: Add Save_SPARK_Mode_Pragma field to Scope_Stack_Entry.
4541         * sem_ch3.adb: Use new SPARK_Mode data structures.
4542         * sem_ch6.adb: Set SPARK_Mode fields in subprogram specs and bodies.
4543         * sem_ch7.adb: Set SPARK_Mode fields in package spec and body entities.
4544         * sem_ch8.adb (Push_Scope): Save SPARK_Mode_Pragma.
4545         (Pop_Scope): Restore SPARK_Mode_Pragma.
4546         * sem_prag.adb (Analyze_Pragma, case SPARK_Mode): Rewrite for
4547         new data structures.
4549 2014-01-21  Arnaud Charlet  <charlet@adacore.com>
4551         * back_end.adb: Undo previous change, not needed. Minor reformatting.
4553 2014-01-21  Thomas Quinot  <quinot@adacore.com>
4555         * exp_ch5.adb: Fix comment.
4556         * switch-c.adb: Minor comment update.
4557         * exp_ch3.adb: Minor reformatting.
4559 2014-01-21  Arnaud Charlet  <charlet@adacore.com>
4561         * back_end.adb (Scan_Compiler_Arguments): Do not store object
4562         filename in gnatprove mode.
4564 2014-01-21  Thomas Quinot  <quinot@adacore.com>
4566         * sinfo.ads (No_Ctrl_Actions): Clarify documentation (flag also
4567         suppresses usage of primitive _assign for tagged types).
4568         * exp_aggr.adb (Build_Array_Aggr_Code.Gen_Assign): Set
4569         No_Ctrl_Actions for a tagged type that does not require
4570         finalization, as we want to disable usage of _assign (which
4571         may cause undesirable discriminant checks on an uninitialized,
4572         invalid target).
4574 2014-01-21  Ed Schonberg  <schonberg@adacore.com>
4576         * sem_prag.adb: Reject invariant'class on completion.
4578 2014-01-21  Javier Miranda  <miranda@adacore.com>
4580         * exp_ch3.adb (Build_Init_Procedure): For
4581         derivations of interfaces, do not move the the initialization
4582         of the _parent field since such assignment is not generated.
4584 2014-01-21  Ed Schonberg  <schonberg@adacore.com>
4586         * sem_res.adb (Rewrite_Renamed_Operator): Do not replace entity
4587         with the operator it renames if we are within an expression of
4588         a pre/postcondition, because the expression will be reanalyzed
4589         at a later point, and the analysis of the renaming may affect
4590         the visibility of the operator when in an instance.
4592 2014-01-21  Robert Dewar  <dewar@adacore.com>
4594         * sinfo.ads, sinfo.adb: Change Do_Discriminant_Check to use new Flag1.
4595         Add this flag to type conversion nodes and assignment nodes.
4596         * treepr.adb: Deal properly with Flag 1,2,3.
4597         * treeprs.adt: Minor comment update.
4599 2014-01-21  Robert Dewar  <dewar@adacore.com>
4601         * sem_eval.adb (Compile_Time_Known_Value): Add Ignore_CRT
4602         parameter.
4603         * sem_eval.ads (Compile_Time_Known_Value): Add Ignore_CRT
4604         parameter, completely rewrite spec.
4606 2014-01-21  Ed Schonberg  <schonberg@adacore.com>
4608         * sem_ch10.adb (Install_Withed_Unit): If the unit is a subprogram
4609         instance that is inlined, it may have been rewritten as a wrapper
4610         package. In that case the unit that must be made visible is the
4611         related instance of the package.
4613 2014-01-21  Arnaud Charlet  <charlet@adacore.com>
4615         * exp_ch9.adb (Expand_N_Selective_Accept.Add_Accept): Refine
4616         previous change in codepeer mode.
4618 2014-01-21  Arnaud Charlet  <charlet@adacore.com>
4620         * exp_ch9.adb (Expand_N_Selective_Accept.Add_Accept): Always add
4621         call to Abort_Undefer, as expected by the runtime.
4622         * s-tasren.adb (Local_Complete_Rendezvous): Replace
4623         Defer_Abort_Nestable by Defer_Abort, since we do not expect abort to be
4624         deferred at this point. Update comments.
4626 2014-01-21  Thomas Quinot  <quinot@adacore.com>
4628         * exp_ch4.adb, exp_ch5.adb, checks.adb: Minor reformatting.
4630 2014-01-21  Arnaud Charlet  <charlet@adacore.com>
4632         * switch-c.adb, usage.adb, gnat_ugn.texi: Mark -gnates as internal,
4633         remove from doc.
4635 2014-01-21  Robert Dewar  <dewar@adacore.com>
4637         * switch-c.adb, usage.adb, atree.adb, atree.ads: Minor reformatting.
4639 2014-01-21  Thomas Quinot  <quinot@adacore.com>
4641         * atree.adb, atree.ads (Num_Extension_Nodes): Switch to Node_Id, since
4642         this is value is used in Node_Id arithmetic operations.
4643         (Copy_Node, Exchange_Entities): Use loops indexed by Num_Extension_Nodes
4644         instead of hard-coded unrolled code.
4646 2014-01-21  Yannick Moy  <moy@adacore.com>
4648         * gnat1drv.adb: Minor code cleanup, removing useless code.
4650 2014-01-21  Arnaud Charlet  <charlet@adacore.com>
4652         * opt.ads (SPARK_Switches_File_Name): New.
4653         * switch-c.adb (Scan_Front_End_Switches): Add handling of -gnates=xxx *
4654         * usage.adb (Usage): Document -gnates, in gnatprove mode only.
4655         * gnat_ugn.texi: Document -gnates.
4657 2014-01-21  Yannick Moy  <moy@adacore.com>
4659         * errout.adb (Special_Msg_Delete): Update comment. Remove
4660         special case for GNATprove which should not ignore mismatch
4661         in sizes for representation clauses.
4662         * sem_prag.adb (Analyze_Pragma): Remove special case for GNATprove
4663         which should not ignore pragma Pack.
4665 2014-01-21  Ed Schonberg  <schonberg@adacore.com>
4667         * sem_ch4.adb: Code clean up.
4669 2014-01-21  Steve Baird  <baird@adacore.com>
4671         * gnat_rm.texi: Improve GNAT RM description of SPARK_Mode pragma.
4673 2014-01-21  Robert Dewar  <dewar@adacore.com>
4675         * gcc-interface/gigi.h: Get Flags array address.
4676         * gcc-interface/trans.c: Acquire Flags array address.
4677         * atree.adb: Add support for Flags array and Flag0,1,2,3.
4678         * atree.ads: Add support for Flags array and Flag0,1,2,3.
4679         * atree.h: Add support for Flags array and Flag0,1,2,3.
4680         * back_end.adb: Pass Flags array address to gigi.
4682 2014-01-21  Ed Schonberg  <schonberg@adacore.com>
4684         * sem_ch8.adb (Attribute_Renaming): Transfer original attribute
4685         reference to generated body so that legality checks on stream
4686         attributes are properly applied. If type is tagged and already
4687         frozen, insert generated body at the point of the renaming
4688         declaration.
4690 2014-01-21  Ed Schonberg  <schonberg@adacore.com>
4692         * sem_ch12.adb: Code clean up.
4693         * sem_ch8.adb: Minor reformatting
4695 2014-01-20  Robert Dewar  <dewar@adacore.com>
4697         * checks.adb: Check SPARK_Mode instead of GNATProve_Mode for
4698         converting warnings on inevitable exceptions to errors.
4699         * exp_ch4.adb: Check SPARK_Mode instead of GNATProve_Mode for
4700         converting warnings on inevitable exceptions to errors.
4701         * opt.adb (SPARK_Mode_Config): Handled like other config flags
4702         * opt.ads (SPARK_Mode_Type): Moved here from types (renamed from
4703         SPARK_Mode_Id) (SPARK_Mode_Type): Add pragma Ordered, remove
4704         SPARK_ from names (SPARK_Mode): New flag (SPARK_Mode_Config):
4705         New flag (Config_Switches_Type): Add SPARK_Mode field
4706         * sem.adb: Minor code reorganization (remove unnecessary with)
4707         * sem.ads (Scope_Stack_Entry): Add Save_SPARK_Mode field
4708         * sem_aggr.adb: Check SPARK_Mode instead of GNATProve_Mode for
4709         converting warnings on inevitable exceptions to errors.
4710         * sem_attr.adb: Check SPARK_Mode instead of GNATProve_Mode for
4711         converting warnings on inevitable exceptions to errors.
4712         * sem_ch3.adb: Check SPARK_Mode instead of GNATProve_Mode for
4713         converting warnings on inevitable exceptions to errors.
4714         * sem_ch4.adb: Check SPARK_Mode instead of GNATProve_Mode for
4715         converting warnings on inevitable exceptions to errors.
4716         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Reset SPARK_Mode
4717         from spec if needed
4718         * sem_ch7.adb (Analyze_Package_Body_Helper): Reset SPARK_Mode
4719         from spec if needed
4720         * sem_ch8.adb (Push_Scope): Save SPARK_Mode (Pop_Scope):
4721         Restore SPARK_Mode
4722         * sem_elab.adb: Check SPARK_Mode instead of GNATProve_Mode for
4723         converting warnings on inevitable exceptions to errors.
4724         * sem_prag.adb (Get_SPARK_Mode_From_Pragma): New function
4725         (Get_SPARK_Mode_Id): Removed (Get_SPARK_Mode_Type): New name
4726         of Get_SPARK_Mode_Id
4727         * sem_prag.ads (Get_SPARK_Mode_From_Pragma): New function
4728         * sem_res.adb: Check SPARK_Mode instead of GNATProve_Mode for
4729         converting warnings on inevitable exceptions to errors.
4730         * sem_util.adb: Check SPARK_Mode instead of GNATProve_Mode for
4731         converting warnings on inevitable exceptions to errors.
4732         * types.ads (SPARK_Mode_Id): Moved to opt.ads and renamed
4733         SPARK_Mode_Type
4735 2014-01-20  Ed Schonberg  <schonberg@adacore.com>
4737         * sem_ch13.adb: Add semantic information to rewritten type
4738         reference.
4740 2014-01-20  Ed Schonberg  <schonberg@adacore.com>
4742         * exp_ch5.adb (Expand_N_Assignment_Statement): If both sides
4743         are of a type with unknown discriminants, convert both to the
4744         underlying view of the type, so that the proper constraint check
4745         can be applied to the right-hand side.
4747 2014-01-20  Robert Dewar  <dewar@adacore.com>
4749         * atree.adb (Copy_Node): Fix failure to copy last component
4750         (Exchange_Entities): Fix failure to exchange last entity
4752 2014-01-20  Ed Schonberg  <schonberg@adacore.com>
4754         * sem_ch12.adb: Code clean up.
4756 2014-01-20  Robert Dewar  <dewar@adacore.com>
4758         * gnat_rm.texi, sem_ch4.adb: Minor reformatting.
4760 2014-01-20  Ed Schonberg  <schonberg@adacore.com>
4762         * sem_ch4.adb (Analyze_Quantified_Expression): If after
4763         pre-analysis  the loop parameter specification has been
4764         rewritten as a iterator specification, propagate the change to
4765         the quantified expression, for ASIS navigtion needs.
4767 2014-01-20  Vincent Celier  <celier@adacore.com>
4769         * par-ch10.adb: Minor error message change: escape [ and ].
4771 2014-01-20  Robert Dewar  <dewar@adacore.com>
4773         * checks.adb: Make warnings on exceptions into errors in GNATprove mode.
4774         * errout.adb: Implement [ and ] insertion characters.
4775         * errout.ads: Document new [ and ] insertion characters.
4776         * sem_ch12.adb, restrict.adb, frontend.adb, exp_ch7.adb: Minor
4777         addition of ??? comment.
4778         * lib-xref.adb, exp_util.adb, gnat1drv.adb: Minor reformatting
4779         * exp_ch4.adb, sem_ch3.adb, sem_ch4.adb, sem_ch6.adb, sem_elab.adb,
4780         sem_eval.adb, sem_res.adb, sem_util.adb, sem_attr.adb, sem_aggr.adb:
4781         Make warnings on exceptions into errors in GNATprove mode.
4782         * sem_dim.adb: Minor reformatting throughout Quote [ and ]
4783         in error messages.
4785 2014-01-20  Ed Schonberg  <schonberg@adacore.com>
4787         * sem_ch13.adb: Code clean up.
4789 2014-01-20  Robert Dewar  <dewar@adacore.com>
4791         * errout.ads, errout.adb: Implement >? >x? >X? sequences in error
4792         messages.
4793         * sem_ch6.adb (Check_Statement_Sequence): Missing return is an
4794         error in GNATprove mode.
4796 2014-01-20  Ed Schonberg  <schonberg@adacore.com>
4798         * par-ch4.adb (Is_Parameterless_Attribute): The Ada2012 attribute
4799         reference 'Old takes no parameters, and thus can appear as a
4800         prefix of a slice.
4802 2014-01-20  Eric Botcazou  <ebotcazou@adacore.com>
4804         * exp_aggr.adb: Fix minor typos.
4806 2014-01-20  Ed Schonberg  <schonberg@adacore.com>
4808         * sem_attr.adb (Analyze_Attribute, case 'Constrained): In an
4809         instance the attribute is legal, and its value is determined
4810         statically if the type has no discriminants. This choice is
4811         more useful than rechecking the legality rule in the instance,
4812         is consistent with older usage, and is also consistent with all
4813         existing tests.
4815 2014-01-20  Arnaud Charlet  <charlet@adacore.com>
4817         * sem_cat.adb (Validate_Static_Object_Name): Change error into
4818         warning in Relaxed_Semantic_Mode.
4820 2014-01-20  Ed Schonberg  <schonberg@adacore.com>
4822         * sem_attr.adb: Code and comments cleanup.
4824 2014-01-20  Yannick Moy  <moy@adacore.com>
4826         * debug.adb Free debug flags -gnatd.D, -gnatd.G and -gnatd.V *
4827         * errout.adb (Compilation_Errors): Remove special handling in
4828         GNATprove mode.
4829         * gnat1drv.adb (Adjust_Global_Switches): Remove handling of the
4830         removed debug flags.
4831         * gnat_rm.texi: Initial documentation for Abstract_State, Depends,
4832         Global, Initial_Condition, Initializes and Refined_State pragmas and
4833         aspects.
4834         * opt.ads (Frame_Condition_Mode, Formal_Extensions,
4835         SPARK_Strict_Mode): Remove global flags.
4836         * sem_ch3.adb (Analyze_Object_Declaration): Check of no hidden state
4837         always performed now, on packages declaring a null state.
4838         (Signed_Integer_Type_Declaration): Remove ill-designed attempt
4839         at providing pedantic mode for bounds of integer types.
4840         * sem_ch4.adb (Analyze_Quantified_Expression): Warning on suspicious
4841         "some" quantified expression now issued under control of -gnatw.t,
4842         like the other warning on unused bound variable.
4843         * sem_prag.adb (Check_Precondition_Postcondition): Remove useless test
4844         on removed flag.
4845         (Analyze_Pragma): Remove tests for SPARK 2014
4846         pragmas, not officially allowed by GNAT.
4848 2014-01-20  Hristian Kirtchev  <kirtchev@adacore.com>
4850         * sem_prag.adb (Analyze_Pragma): Ensure that
4851         the sole argument of pragmas Abstract_State, Contract_Cases,
4852         Depends, Global and Initializes in in aggregate form.
4853         (Analyze_Refined_Pragma): Ensure that the sole argument of
4854         pragmas Refined_Depends, Refined_Global and Refined_State is in
4855         aggregate form.
4856         (Ensure_Aggregate_Form): New routine.
4858 2014-01-20  Doug Rupp  <rupp@adacore.com>
4860         * sem_attr.adb (Analyze_Attribute): case
4861         Attribute_Constrained => treat all prefixes as legal for Declib
4862         compatibility.
4864 2014-01-20  Hristian Kirtchev  <kirtchev@adacore.com>
4866         * sem_prag.adb (Check_Mode): Reimplement the routine.
4867         (Find_Mode): New routine.
4869 2014-01-20  Robert Dewar  <dewar@adacore.com>
4871         * sem_ch4.adb (Operator_Check): Handle additional
4872         Allow_Integer_Address cases.
4874 2014-01-20  Robert Dewar  <dewar@adacore.com>
4876         * gnat_rm.texi (Allow_Integer_Address): Remove note about not
4877         allowed if address is non-private, no longer true.
4878         * sem_prag.adb (Analyze_Pragma, case Allow_Integer_Address):
4879         Remove check for address being private, causes difficulty when
4880         pragma used in gnat.adc file and is not needed, since we guard
4881         this in Address_Integer_Convert_OK.
4882         * exp_ch7.adb: Minor reformatting.
4883         * sem_ch4.adb: Handle operator operands in Allow_Integer_Address mode.
4885 2014-01-20  Robert Dewar  <dewar@adacore.com>
4887         * checks.adb (Apply_Range_Check): Remove gnatprove special
4888         casing of exponentiation.
4889         * sem_res.adb (Resolve_Op_Expon): Apply range check to right
4890         operand for integer case to check range against Natural.
4892 2014-01-20  Robert Dewar  <dewar@adacore.com>
4894         * s-tataat.adb: Minor reformatting.
4896 2014-01-20  Robert Dewar  <dewar@adacore.com>
4898         * einfo.adb (Is_Descendent_Of_Address): Now applies to all
4899         entities, and also fix documentation to remove mention of visible
4900         integer type, since this is not what the implementation does.
4901         * einfo.ads (Is_Descendent_Of_Address): Now applies to all
4902         entities, and also fix documentation to remove mention of visible
4903         integer type, since this is not what the implementation does.
4904         * gnat_rm.texi: Minor clarification of Allow_Integer_Address
4905         function.
4906         * sem_ch4.adb (Analyze_One_Call): Handle Allow_Integer_Address
4907         case for parameter type check.
4908         * sem_res.adb (Resolve): Use new function
4909         Address_Integer_Convert_OK.
4910         * sem_type.adb: Minor code reorganization (use Ekind_In) Minor
4911         reformatting throughout.
4912         * sem_util.adb (Address_Integer_Convert_OK): New function.
4913         * sem_util.ads: Minor reformatting (put specs in alpha order)
4914         (Address_Integer_Convert_OK): New function.
4916 2014-01-20  Thomas Quinot  <quinot@adacore.com>
4918         * exp_ch7.adb (Wrap_Transient_Expression):
4919         Insertion extra conditional expression only if
4920         Opt.Suppress_Control_Flow_Optimizations is set.
4922 2014-01-20  Arnaud Charlet  <charlet@adacore.com>
4924         * s-tataat.adb (Initialize_Attributes): Abort might already be
4925         deferred in Create_Task.
4927 2014-01-20  Hristian Kirtchev  <kirtchev@adacore.com>
4929         * checks.adb (Apply_Scalar_Range_Check): Flag
4930         the exponent as requiring a range check when the expression is
4931         an exponentiation.
4933 2014-01-20  Fedor Rybin  <frybin@adacore.com>
4935         * gnat_ugn.texi: Documenting --passed-tests option for gnattest.
4937 2014-01-20  Hristian Kirtchev  <kirtchev@adacore.com>
4939         * sem_util.adb (Default_Initialization): New routine.
4940         * sem_util.ads: Add new type Default_Initialization_Kind.
4941         (Default_Initialization): New routine.
4943 2014-01-20  Hristian Kirtchev  <kirtchev@adacore.com>
4945         * sem_prag.adb (Check_Mode): Correct all error
4946         message logic dealing with in/in out parameters that may appear
4947         as inputs or have a self reference.
4949 2014-01-20  Robert Dewar  <dewar@adacore.com>
4951         * exp_ch9.adb, checks.adb, exp_intr.adb: Minor reformatting.
4952         * sem_res.adb (Resolve): Fix error causing infinite loop for
4953         integer used as address. Allow addresses as integers.
4955 2014-01-20  Arnaud Charlet  <charlet@adacore.com>
4957         * s-osinte-linux.ads (struct_sigaction): Fix rep clause.
4959 2014-01-20  Bob Duff  <duff@adacore.com>
4961         * par-ch8.adb (P_Use_Type_Clause): Detect syntax
4962         error when "use all" is not followed by "type".
4964 2014-01-20  Bob Duff  <duff@adacore.com>
4966         * exp_intr.adb (Expand_Unc_Deallocation): Remove warning on abort
4967         followed by free.
4969 2014-01-20  Ed Schonberg  <schonberg@adacore.com>
4971         * checks.adb (Apply_Address_Clause_Check): If there is an
4972         alignment check on the expression in an address clause, and there
4973         is no local exception propagation, add an additional explanatory
4974         message to clarify the cause of previous warning.
4976 2014-01-20  Robert Dewar  <dewar@adacore.com>
4978         * exp_ch7.adb: Minor reformatting.
4979         * opt.ads: Minor comment updates.
4980         * sem.adb: Minor name change Is_Main_Unit =>
4981         Is_Main_Unit_Or_Main_Unit_Spec.
4982         * sem_ch6.adb: Minor reformatting and code reorganization.
4984 2014-01-20  Bob Duff  <duff@adacore.com>
4986         * gnat_ugn.texi: Update gnatpp switches.
4988 2014-01-20  Thomas Quinot  <quinot@adacore.com>
4990         * exp_ch9.adb: Minor comment edit.
4992 2014-01-20  Robert Dewar  <dewar@adacore.com>
4994         * gnat_rm.texi: Document that Allow_Integer_Address is permitted
4995         only if System.Address is a private type.
4996         * opt.ads (Allow_Integer_Address): No longer set by -gnates.
4997         * sem_prag.adb (Analyze_Pragma, case Allow_Integer_Address):
4998         Allowed only if type System.Address is private, since otherwise
4999         it makes no sense.
5000         * sem_res.adb: Fix failure to properly Analyze unchecked
5001         conversions that were introduced by Allow_Integer_Address.
5002         * switch-c.adb: Remove -gnates switch.
5003         * usage.adb: Remove -gnates switch.
5004         * gnat_ugn.texi: Remove documentation of -gnates flag.
5006 2014-01-20  Ed Schonberg  <schonberg@adacore.com>
5008         * sem_ch6.adb (Analyze_Expression_Function): Pre-analyze and
5009         resolve expression to perform proper name capture.
5011 2014-01-20  Ed Schonberg  <schonberg@adacore.com>
5013         * sem.adb (Semantics): When saving/restoring configuration
5014         switches, the spec of a pre- defined unit that is the main unit
5015         must be treated as a predefined unit as well.
5017 2014-01-20  Thomas Quinot  <quinot@adacore.com>
5019         * exp_ch7.adb (Wrap_Transient_Expression): For a Boolean
5020         expression, insert an extra conditional expression when saving
5021         the value of the expression, for the benefit of control flow
5022         graph based coverage analysis.
5023         * exp_ch3.adb: Minor reformatting.
5025 2014-01-20  Robert Dewar  <dewar@adacore.com>
5027         * gnat1drv.adb: Set Allow_Integer_Address in relaxed semantics mode.
5028         * gnat_rm.texi: Document pragma Allow_Integer_Address.
5029         * gnat_ugn.texi: Document pragma Allow_Integer_Address, -gnates.
5030         * opt.ads: New flag Allow_Integer_Address.
5031         * par-prag.adb: Dummy entry for pragma Allow_Integer_Address.
5032         * sem_ch5.adb: Minor reformatting.
5033         * sem_prag.adb: Implement pragma Allow_Integer_Address.
5034         * sem_res.adb (Resolve): Allow integer address value if
5035         switch set.
5036         * sem_util.adb: Minor reformatting.
5037         * snames.ads-tmpl: Add entry for pragma Allow_Integer_Address.
5038         * switch-c.adb: Recognize flag -gnates.
5039         * usage.adb: Document flag -gnates.
5041 2014-01-20  Thomas Quinot  <quinot@adacore.com>
5043         * s-tadeca.adb: Fix minor typos in comment.
5045 2014-01-20  Pascal Obry  <obry@adacore.com>
5047         * s-win32.ads (FreeLibrary): New import.
5049 2014-01-20  Robert Dewar  <dewar@adacore.com>
5051         * sem_res.adb, sem_cat.adb: Minor reformatting.
5052         * sem_ch11.adb (Analyze_Raise_Statement): Only give warning about
5053         assigning to OUT parameters for the current subprogram scope.
5054         * exp_ch4.adb: Minor reformatting.
5056 2014-01-20  Ed Schonberg  <schonberg@adacore.com>
5058         * exp_ch4.adb (Process_Transient_Object,
5059         Find_Enclosing_Contexts): If the top-level if-expression that
5060         generated the transient object is an actual in a call, the proper
5061         Hook_Context is a construct enclosing the call.
5062         * einfo.ads: Indicate that Related_Expression is used to link a
5063         loop variable to the container expression over which the loop
5064         takes place.
5065         (Analyze_Iterator_Specification): Set the Related_Expression of
5066         the loop variable in a container element iterator.
5067         (Note_Possible_Modification): If the variable is the loop
5068         variable in a container element iterator, indicate that the
5069         enclosing container is also modified.
5071 2014-01-20  Hristian Kirtchev  <kirtchev@adacore.com>
5073         * aspects.adb (Move_Or_Merge_Aspects): Reimplemented.
5075 2014-01-20  Robert Dewar  <dewar@adacore.com>
5077         * s-taasde.ads, gnat_ugn.texi, s-tadeca.adb, sem_res.adb, s-tadeca.ads:
5078         Minor reformatting and code clean up.
5080 2014-01-20  Arnaud Charlet  <charlet@adacore.com>
5082         * sem_cat.adb (Validate_Object_Declaration): Relax semantics
5083         of objects of private type if Relaxed_RM_Semantics.
5085 2014-01-20  Claire Dross  <dross@adacore.com>
5087         * a-cofove.ads (Vector): Capacity discriminant
5088         should be in range of the index.
5090 2014-01-20  Thomas Quinot  <quinot@adacore.com>
5092         * a-caldel.ads(To_Duration), s-taasde.ads(Time_Enqueue):
5093         Clarify specs s-tadeca.adb(Enqueue_Calendar): Compensate for
5094         possible difference between epoch of Ada.Calendar clock and Ada
5095         real-time/tasking clock.
5096         * s-taprop-posix.adb: Minor comment fix.
5098 2014-01-20  Doug Rupp  <rupp@adacore.com>
5100         * sysdep.c [vxworks]: Remove Vxworks version noise for RTP.
5102 2014-01-20  Hristian Kirtchev  <kirtchev@adacore.com>
5104         * exp_attr.adb (Expand_N_Attribute_Reference): Generate validity
5105         checks on the prefix of attribute 'Old.
5106         * sem_ch3.adb (Process_Range_Expr_In_Decl): Suppress the
5107         generation of validity checks on a range that belongs to the
5108         iteration scheme of a quantified expression.
5109         * sem_ch5.adb (One_Bound): Suppress the generation of validity
5110         checks on a bound that belongs to the iteration scheme of a
5111         quantified expression, generate the check in all other cases.
5113 2014-01-20  Bob Duff  <duff@adacore.com>
5115         * gnat_ugn.texi: Enable --pp-new by default. Minor reorganization.
5117 2014-01-20  Ed Schonberg  <schonberg@adacore.com>
5119         * sem_res.adb (Resolve): When compiling a predefined unit, ignore
5120         interpretations that do not come from other predefined units,
5121         to prevent spurious ambiguities in the presence of user-defined
5122         operators in the context of (an instance of) a predefined unit.
5124 2014-01-20  Robert Dewar  <dewar@adacore.com>
5126         * gnat_rm.texi: Document that Loop_Variant is included in
5127         Statement_Assertions.
5128         * sem_prag.adb (Check_Kind): Add Loop_Variant to
5129         Statement_Assertions (Check_Applicable_Policy): Add Loop_Variant
5130         to Statement_Assertions.
5132 2014-01-20  Doug Rupp  <rupp@adacore.com>
5134         * sysdep.c (__gnat_is_file_not_found_error) [vxworks6]: Add case
5135         for errno ENOENT from RTP on NFS mounted file system.
5137 2014-01-20  Ed Schonberg  <schonberg@adacore.com>
5139         * sem_util.adb (Check_Function_Writable_Actuals): 1) Do not
5140         examine code that does not come from source. The check does not
5141         apply to code generated for constraint checks, and such code may
5142         generate spurious error messages when compiled with expansion
5143         disabled (as in a generic unit) because side effects may not
5144         have been removed.
5145         2) Make error messages more explicit: indicate the component
5146         of the  construct whose value is indeterminate because of a
5147         call to a function with in-out parameter in another component,
5148         when there is no mandated order of execution between the two
5149         components (actuals, aggregate components, alternatives).
5151 2014-01-20  Robert Dewar  <dewar@adacore.com>
5153         * gnat_rm.texi: Minor cleanup.
5155 2014-01-20  Hristian Kirtchev  <kirtchev@adacore.com>
5157         * sem_attr.adb (Analyze_Attribute): Attributes 'Old and 'Result
5158         can now apply to a refined postcondition.
5159         * sem_ch6.adb (Analyze_Subprogram_Contract): Remove local
5160         variable Result_Seen. Add variables Case_Prag, Post_Prag,
5161         Seen_In_Case and Seen_In_Post. Update the mechanism that detects
5162         whether postconditions and/or constract-cases mention attribute
5163         'Result and introduce a post-state when applied to functions.
5164         (Check_Result_And_Post_State): Removed.
5165         * sem_prag.adb (Analyze_Pragma): Add local variable
5166         Result_Seen. Verify that the expression of pragma Refined_Post
5167         mentions attribute 'Result and introduces a post-state.
5168         * sem_util.ads, sem_util.adb (Check_Result_And_Post_State): New routine.
5170 2014-01-20  Hristian Kirtchev  <kirtchev@adacore.com>
5172         * exp_ch7.adb (Is_Subprogram_Call): New routine.
5173         (Process_Transient_Objects): Make variable Must_Hook global with
5174         respect to all locally declared subprograms. Search the context
5175         for at least one subprogram call.
5176         (Requires_Hooking): Removed.
5178 2014-01-20  Claire Dross  <dross@adacore.com>
5180         * a-cfdlli.ads a-cfhama.ads a-cfhase.ads a-cforma.ads
5181         * a-cforse.ads a-cofove.ads: Add pragma Annotate (GNATprove,
5182         External_Axiomatization);
5184 2014-01-20  Robert Dewar  <dewar@adacore.com>
5186         * sem_attr.adb (Analyze_Attribute, case Loop_Entry): Allow
5187         Loop_Entry in Assert, Assert_And_Cut, and Assume pragmas.
5188         * sem_prag.adb (Analyze_Pragma, case Assert[_And_Cut], Assume):
5189         Allow Loop_Entry to be used in these pragmas if they appear in
5190         an appropriate context.
5191         (Placement_Error): Specialize error
5192         message for pragma Assert[_And_Cut] or pragma Assume containing
5193         Loop_Entry attribute.
5194         * a-exexpr-gcc.adb, sinput.adb: Minor reformatting.
5195         * s-excmac-arm.ads, s-except.ads, s-excmac-gcc.ads: Minor reformatting
5196         and code clean ups.
5198 2014-01-20  Robert Dewar  <dewar@adacore.com>
5200         * gnat1drv.adb: Minor comment update.
5202 2014-01-20  Tristan Gingold  <gingold@adacore.com>
5204         * raise-gcc.c (PERSONALITY_FUNCTION/arm): Remove unused
5205         variables, comment out unused code.
5206         * a-exexpr-gcc.adb: Move declarations to s-excmac-gcc.ads
5207         * s-excmac-gcc.ads: New file, extracted from a-exexpr-gcc.adb
5208         * s-excmac-arm.ads: New file.
5210 2014-01-20  Hristian Kirtchev  <kirtchev@adacore.com>
5212         * exp_ch4.adb (Expand_N_Slice): Remove constant D and variables
5213         Drange and Index_Typ. Remove the circuitry which creates a
5214         range check to compare the index type of the array against the
5215         discrete_range.
5216         * sem_res.adb (Resolve_Slice): Add local variable Dexpr. Update
5217         the circuitry which creates a range check to handle a
5218         discrete_range denoted by a subtype indication.
5220 2014-01-20  Pierre-Marie Derodat  <derodat@adacore.com>
5222         * sinput.adb, sinput.ads (Sloc_Range): Traverse the tree of original
5223         nodes to get the original sloc range.
5225 2014-01-20  Hristian Kirtchev  <kirtchev@adacore.com>
5227         * sem_prag.adb (Analyze_Pragma): Use Defining_Entity to obtain the
5228         entity of a [library level] package.
5230 2014-01-20  Tristan Gingold  <gingold@adacore.com>
5232         * raise-gcc.c (exception_class_eq): New function.
5233         (is_handled_by): Use it to compare exception classes.
5234         (PERSONALITY_STORAGE): Define.  (continue_unwind): New function to
5235         be called to return URC_CONTINUE_UNWIND.
5236         (personality_body): New function, extracted from PERSONALITY_ROUTINE.
5237         (PERSONALITY_ROUTINE): Add an implementation for the ARM unwinder.
5239 2014-01-20  Robert Dewar  <dewar@adacore.com>
5241         * opt.ads: Minor comment update.
5243 2014-01-20  Hristian Kirtchev  <kirtchev@adacore.com>
5245         * exp_ch4.adb (Expand_N_Slice): Relocate some variables and
5246         constants to the "Local variables" area. Add new constant D. Add
5247         new variables Drange and Index_Typ.  Rename Pfx to Rep and Ptp
5248         to Pref_Typ and update all occurrences. Add circuitry to extract
5249         the discrete_range and the index type and build a range check.
5251 2014-01-20  Arnaud Charlet  <charlet@adacore.com>
5253         * gnat1drv.adb (Adjust_Global_Switches): Enable
5254         Treat_Categorization_Errors_As_Warnings when Relaxed_RM_Semantics
5255         is set.
5257 2014-01-20  Thomas Quinot  <quinot@adacore.com>
5259         * sem_ch5.adb, sem_ch4.adb: Minor reformatting.
5261 2014-01-20  Hristian Kirtchev  <kirtchev@adacore.com>
5263         * sem_ch13.adb (Analyze_Aspect_Specifications):
5264         When aspect SPARK_Mode appears on a package body, insert the
5265         generated pragma at the top of the body declarations.
5267 2014-01-20  Robert Dewar  <dewar@adacore.com>
5269         * sem_aggr.adb, exp_prag.adb, sem_aux.adb, sinfo.ads, sem_ch10.adb,
5270         checks.adb, sem_prag.adb, sem_ch12.adb, freeze.adb, g-arrspl.adb,
5271         expander.adb, gnat1drv.adb, exp_ch4.adb, sem_ch6.adb,
5272         sem_ch8.adb, exp_dist.adb: Minor reformatting.
5274 2014-01-20  Yannick Moy  <moy@adacore.com>
5276         * gnat1drv.adb (Gnat1drv): Call Write_ALI with Object=True in GNATprove
5277         mode.
5279 2014-01-20  Pascal Obry  <obry@adacore.com>
5281         * g-arrspl.ads (Slice_Set): New definition (will use a copy on
5282         write scheme).
5283         * g-arrspl.adb: Adapt all routine to this new implementation.
5284         (Set): Copy the Slice_Set definition before reusing it.
5286 2014-01-20  Arnaud Charlet  <charlet@adacore.com>
5288         * sem_prag.adb (Process_Import_Or_Interface): In
5289         Relaxed_RM_Semantics, support old Ada 83 style of pragma Import.
5290         (Analyze_Pragma): Ditto for pragma Export.
5291         * exp_prag.adb (Expand_Pragma_Import_Or_Interface): Handle old pragma
5292         Import style.
5294 2014-01-20  Hristian Kirtchev  <kirtchev@adacore.com>
5296         * einfo.ads: E_Abstract_State is now part of the entities that
5297         can be overloaded. Update type Overloadable_Kind to reflect the
5298         inclusion of abstract states.
5299         * sem_ch6.adb (New_Overloaded_Entity): A function can now
5300         overload an abstract state.
5301         * sem_prag.adb (Analyze_Constituent): Handle the overloading
5302         of states by functions. Use Entity_Of to obtain the entity of
5303         a constituent.  (Analyze_Global_Item): Handle the overloading of
5304         states by functions.
5305         (Analyze_Initialization_Item): Handle the
5306         overloading of states by functions.  Use Entity_Of to obtain the
5307         entity of an item.
5308         (Analyze_Input_Item): Handle the overloading
5309         of states by functions. Use Entity_Of to obtain the entity of an item.
5310         (Analyze_Input_Output): Handle the overloading of states by functions.
5311         (Analyze_Refinement_Clause): Handle the overloading
5312         of states by functions.  Use Entity_Of to obtain the entity of an item.
5313         (Appears_In): Use Entity_Of to obtain the entity of an element.
5314         (Check_Usage): Use Entity_Of to obtain the entity of
5315         an item. Add a guard to prevent a crash due to a previous error.
5316         (Resolve_State): New routine.
5318 2014-01-20  Yannick Moy  <moy@adacore.com>
5320         * spark_xrefs.ads, debug.adb, gnat1drv.adb, errout.adb, errout.ads,
5321         opt.ads: Minor comments updates.
5323 2014-01-20  Hristian Kirtchev  <kirtchev@adacore.com>
5325         * einfo.adb (Non_Limited_View): Applies to abstract states.
5326         (Set_From_Limited_With): Applies to abstract states.
5327         (Set_Non_Limited_View): Applies to abstract states.
5328         (Write_Field17): Output the non-limited view of an abstract state.
5329         * einfo.ads: Update the comment on usage and occurrences in
5330         nodes for attributes From_Limited_With and Non_Limited_View.
5331         * sem_aux.adb (Available_View): This routine can now handle
5332         abstract states.
5333         * sem_aux.ads (Available_View): This routine can now handle
5334         abstract states. Update the comment on usage.
5335         * sem_ch8.adb (Find_Expanded_Name): Handle abstract views
5336         of states and variables.
5337         (In_Pragmas_Depends_Or_Global): New routine.
5338         * sem_ch10.adb (Build_Limited_Views): Implement
5339         abstract (limited) views of variables and states.
5340         (Build_Shadow_Entity): This routine is now a procedure. Add
5341         formal parameter Shadow. Update the comment on usage. Add
5342         context-specific decoration for states and variables.
5343         (Decorate_State): New routine.  (Decorate_Variable): New routine.
5344         (Find_And_Process_States): New routine.
5345         (Process_Declarations): Renamed to Process_Declarations_And_States.
5346         (Process_Declarations_And_States): Add formal parameters
5347         Pack and Create_Abstract_Views. Update the comment on usage.
5348         (Process_States): New routine.
5349         * sem_prag.adb (Check_Dependency_Clause): Handle abstract
5350         views of states and variables. Match the abstract view of a state
5351         against its corresponding non-abstract view.
5352         (Is_Matching_Input):
5353         Handle abstract views of states and variables. Match the abstract
5354         view of a state against its corresponding non-abstract view.
5355         (Process_Global_Item): Handle abstract views of states and
5356         variables.
5358 2014-01-20  Bob Duff  <duff@adacore.com>
5360         * sem_ch10.adb (Expand_With_Clause): Don't
5361         recurse on the prefix if the current with-ed name refers to a
5362         package that renames its own parent, eg "package P.Q renames P;".
5364 2014-01-20  Yannick Moy  <moy@adacore.com>
5366         * exp_spark.adb (Expand_SPARK_Call): Remove procedure.
5367         * opt.adb, opt.ads (Full_Expander_Active): Remove function.
5368         * checks.adb, exp_ch6.adb, exp_ch9.adb, exp_disp.adb, sem_aggr.adb,
5369         * sem_ch10.adb, sem_ch5.adb, sem_ch6.adb, sem_ch8.adb, sem_ch9.adb,
5370         * sem_disp.adb, sem_res.adb Replace Full_Expander_Active by
5371         Expander_Active.
5373 2014-01-20  Yannick Moy  <moy@adacore.com>
5375         * sinfo.ads Update documentation of GNATprove mode.
5377 2014-01-20  Yannick Moy  <moy@adacore.com>
5379         * adabkend.adb, ali-util.adb, errout.adb, exp_ch7.adb,
5380         * exp_dbug.adb, freeze.adb, lib-xref.adb, restrict.adb,
5381         * sem_attr.adb, sem_ch4.adb, sem_ch5.adb, sem_ch6.adb, sem_ch8.adb,
5382         * sem_prag.adb, sem_res.adb, sem_util.adb Rename SPARK_Mode into
5383         GNATprove_Mode.
5384         * sem_ch13.adb: Remove blank.
5385         * exp_spark.adb, exp_spark.ads (Expand_SPARK_Call): Only replace
5386         subprograms by alias for renamings, not for inherited primitive
5387         operations.
5388         * exp_util.adb (Expand_Subtype_From_Expr): Apply the expansion
5389         in GNATprove mode.
5390         (Remove_Side_Effects): Apply the removal in
5391         GNATprove mode, for the full analysis of expressions.
5392         * expander.adb (Expand): Call the light SPARK expansion in GNATprove
5393         mode.
5394         (Expander_Mode_Restore, Expander_Mode_Save_And_Set): Ignore
5395         save/restore actions for Expander_Active flag in GNATprove mode,
5396         similar to what is done in ASIS mode.
5397         * frontend.adb (Frontend): Generic bodies are instantiated in
5398         GNATprove mode.
5399         * gnat1drv.adb (Adjust_Global_Switches): Set operating
5400         mode to Check_Semantics in GNATprove mode, although a light
5401         expansion is still performed.
5402         (Gnat1drv): Set Back_End_Mode to
5403         Declarations_Only in GNATprove mode, and later on special case
5404         the GNATprove mode to continue analysis anyway.
5405         * lib-writ.adb (Write_ALI): Always generate ALI files in
5406         GNATprove mode.
5407         * opt.adb, opt.ads (Full_Expander_Active): Make it equivalent to
5408         Expander_Active.
5409         (SPARK_Mode): Renamed as GNATprove_Mode.
5410         * sem_aggr.adb (Aggregate_Constraint_Checks): Add checks in the
5411         tree in GNATprove_Mode.
5412         * sem_ch12.adb (Analyze_Package_Instantiation): Always instantiate
5413         body in GNATprove mode.
5414         (Need_Subprogram_Instance_Body): Always instantiate body in GNATprove
5415         mode.
5416         * sem_ch3.adb (Constrain_Index, Process_Range_Expr_In_Decl):
5417         Make sure side effects are removed in GNATprove mode.
5419 2014-01-20  Eric Botcazou  <ebotcazou@adacore.com>
5421         * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Robustify tests
5422         for aliased objects with an unconstrained nominal subtype.
5423         * gcc-interface/trans.c (Call_to_gnu): Likewise.
5424         (gnat_to_gnu) <case N_Op_Not>: Robustify test for private type.
5425         <case N_Op_Minus>: Remove useless code.
5426         (Exception_Handler_to_gnu_zcx): Minor tweaks.
5428 2014-01-20  Eric Botcazou  <ebotcazou@adacore.com>
5430         * gcc-interface/decl.c (gnat_to_gnu_entity) <case E_Record_Subtype>:
5431         Tidy up.  For a subtype with discriminants and variant part, if a
5432         variant is statically selected and the fields all have a constant
5433         position, put them in order of increasing position.  Likewise if
5434         no variant part but representation clause is present.
5435         * gcc-interface/utils.c (make_packable_type): Robustify.
5436         (maybe_pad_type): Use local variable and tidy up condition.  If no
5437         alignment is specified, use the original one.
5438         (create_type_stub_decl): Minor tweak.
5439         (convert) <case VECTOR_CST>: Fix typo.
5440         <case CONSTRUCTOR>: Deal with padding types around the same type.
5441         Do not punt on missing fields.
5442         (unchecked_convert): Call finish_record_type to lay out the special
5443         record types made for conversions from/to problematic integer types.
5444         Bump the alignment of CONSTRUCTORs before converting them to a more
5445         aligned type.
5447 2014-01-20  Eric Botcazou  <ebotcazou@adacore.com>
5449         * gcc-interface/decl.c (gnat_to_gnu_entity) <case E_Component>: Remove
5450         obsolete code for type_annotate_only mode, simplify code and slightly
5451         improve wording of comments.
5453 2014-01-12  Eric Botcazou  <ebotcazou@adacore.com>
5455         PR ada/59772
5456         * gcc-interface/cuintp.c (build_cst_from_int): Use 32-bit integer type
5457         as intermediate type.
5458         (UI_To_gnu): Likewise.
5460 2014-01-03  Eric Botcazou  <ebotcazou@adacore.com>
5462         * gnatvsn.ads (Current_Year): Bump to 2014.
5464 2014-01-02  Tobias Burnus  <burnus@net-b.de>
5466         * gnat_ugn.texi: Bump @copying's copyright year.
5468 Copyright (C) 2014 Free Software Foundation, Inc.
5470 Copying and distribution of this file, with or without modification,
5471 are permitted in any medium without royalty provided the copyright
5472 notice and this notice are preserved.