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