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