]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/ada/ChangeLog
function.h: Flatten file.
[thirdparty/gcc.git] / gcc / ada / ChangeLog
CommitLineData
83685514
AM
12014-10-16 Andrew MacLeod <amacleod@redhat.com>
2
3 * gcc-interface/misc.c: Adjust include files.
4
e7da0c23
EB
52014-10-13 Eric Botcazou <ebotcazou@adacore.com>
6 Alan Modra <amodra@gmail.com>
7
8 PR ada/63225
9 * uintp.adb (Vector_To_Uint): Move from here to...
10 * uintp.ads (UI_Vector): Make public.
11 (Vector_To_Uint): ...here.
12
9ceeaf9d
AC
132014-10-10 Robert Dewar <dewar@adacore.com>
14
15 * freeze.adb, sem_attr.adb: Minor reformatting.
16
172014-10-10 Johannes Kanig <kanig@adacore.com>
18
19 * a-cfdlli.ads, a-cfhama.ads, a-cfhase.ads, a-cforma.ads,
20 a-cforse.ads, a-cofove.ads: add "Default_Initial_Condition"
21 to container type.
22
232014-10-10 Vincent Celier <celier@adacore.com>
24
25 * prj-conf.adb (Do_Autoconf): In Codepeer mode, do not try to get
26 any configuration switches from the project file.
27
282014-10-10 Ed Schonberg <schonberg@adacore.com>
29
30 * sem_ch12.adb (Build_Wrapper): Renamed as Build_Operator_Wrapper.
31 (Build_Function_Wrapper): New function, to construct a wrapper
32 function for actuals that are functions with an arbitrary
33 number of parameters. Used in GNATProve mode to simplify proof
34 propagation in instantiations.
35
4d1429b2
AC
362014-10-10 Robert Dewar <dewar@adacore.com>
37
38 * freeze.adb, gnat1drv.adb, sem_ch13.adb: Minor reformatting and
39 code clean up.
40
412014-10-10 Hristian Kirtchev <kirtchev@adacore.com>
42
43 * sem_res.adb (Is_OK_Volatile_Context): Allow
44 a volatile object reference to appear as the expression of a
45 type conversion.
46
c9f95e4c
AC
472014-10-10 Ed Schonberg <schonberg@adacore.com>
48
49 * sem_ch13.adb (Analyze_Aspect_Specifications, Library_Unit_Aspects):
50 Aspect specification is legal on a local instantiation of a
51 library-level generic unit.
52
532014-10-10 Gary Dismukes <dismukes@adacore.com>
54
55 * gnat1drv.adb (Adjust_Global_Switches): Set Front_End_Inlining
56 if inlining has been enabled via -gnatn and the target is not GCC.
57
582014-10-10 Ed Schonberg <schonberg@adacore.com>
59
60 * freeze.adb (Freeze_Entity): Freezing a subprogram does
61 not always freeze its profile. In particular, an attribute
62 reference that takes the access type does not freeze the types
63 of the formals.
64
32a21096
AC
652014-10-10 Robert Dewar <dewar@adacore.com>
66
67 * errout.adb (Adjust_Name_Case): New procedure.
68 (Set_Msg_Node): Use Adjust_Name_Case.
69 * errout.ads (Adjust_Name_Case): New procedure.
70 * exp_intr.adb (Add_Source_Info): Minor code reorganization
71 (use Ekind_In).
72 (Write_Entity_Name): Use Errout.Adjust_Name_Case.
73 * sem_prag.adb (Is_Non_Significant_Pragma_Reference): Review
74 and fix up entries in Sig_Flags, and correct logical errors in
75 function itself.
76 * sprint.adb (Sprint_Node_Actual): Properly print string for
77 raise statement.
78
792014-10-10 Ed Schonberg <schonberg@adacore.com>
80
81 * sem_ch3.adb (Analyze_Object_Declaration): For an object of an
82 anonymous array type with delayed aspects, defer freezing of
83 type until object itself is frozen.
84 * freeze.adb (Freeze_Entity): When freezing an object of an
85 anonymous array type with delayed aspects, remove freeze node of
86 object after freezing type, to prevent out-of-order elaboration
87 in the back-end. The initialization call for the object has
88 already been constructed when expanding the object declaration.
89
8f819471
RD
902014-10-10 Robert Dewar <dewar@adacore.com>
91
92 * exp_intr.adb (Write_Entity_Name): Moved to outer level
93 (Write_Entity_Name): Properly handle operator names
94 (Expand_Source_Info): New procedure.
95 * exp_intr.ads (Add_Source_Info): New procedure.
96
972014-10-10 Robert Dewar <dewar@adacore.com>
98
99 * butil.ads: Minor reformatting.
100 * sem_ch5.adb: Code clean up.
101
1022014-10-10 Robert Dewar <dewar@adacore.com>
103
104 * exp_ch11.adb (Expand_N_Raise_Statement): Handle
105 Prefix_Exception_Messages.
106 * opt.adb: Handle new flags Prefix_Exception_Message[_Config].
107 * opt.ads: New flags Prefix_Exception_Message[_Config].
108 * par-prag.adb: New dummy entry for pragma Prefix_Exception_Messages.
109 * snames.ads-tmpl: Add entries for new pragma Prefix_Exception_Messages.
110 * sem_prag.adb: Implement new pragma Prefix_Exception_Messages
111 * gnat_rm.texi: Document pragma Prefix_Exception_Messages.
112
d6cd5d34
AC
1132014-10-10 Gary Dismukes <dismukes@adacore.com>
114
115 * sinfo.ads, gnat_ugn.texi, a-except.adb, a-except-2005.adb,
116 raise-gcc.c Spelling changes (prolog => prologue, epilog => epilogue).
117
1182014-10-10 Ed Schonberg <schonberg@adacore.com>
119
120 * sem_ch5.adb (Is_Wrapped_In_Block): Handle properly blocks that
121 contain pragmas generated for loop invariants and type predicates.
122 Clarify use of this subprogram.
123
33b87152
AC
1242014-10-10 Yannick Moy <moy@adacore.com>
125
126 * sem_prag.adb (Analyze_Global_Item): Accept formal objects in Global
127 contracts.
128 * errout.adb, errout.ads (SPARK_Msg_NE): Issue error unless
129 SPARK_Mode is Off.
130
1312014-10-10 Vadim Godunko <godunko@adacore.com>
132
133 * a-stwima.adb (To_Sequence): Compute size of result array.
134
1352014-10-10 Javier Miranda <miranda@adacore.com>
136
137 * gnat_ugn.texi (Interfacing with C++ at the Class Level): Update the
138 sources of the example to avoid a warning when the Ada files are
139 automatically generated by the binding generator.
140
1412014-10-10 Ed Schonberg <schonberg@adacore.com>
142
143 * sem_attr.adb (Resolve_Attribute, case 'Update): Set
144 Do_Range_Check on the expression of a record component
145 association when needed, as is done for array components, when
146 the corresponding type is a scalar type.
147
79904ebc
AC
1482014-10-10 Gary Dismukes <dismukes@adacore.com>
149
150 * a-coinho-shared.adb: Minor typo fix.
151 * prj-env.ads: Minor reformatting.
152
1532014-10-10 Hristian Kirtchev <kirtchev@adacore.com>
154
155 * sem_res.adb (Resolve_String_Literal): Do not
156 generate a string literal subtype for the default expression of
157 a formal parameter in GNATprove mode.
158
1592014-10-10 Yannick Moy <moy@adacore.com>
160
161 * errout.adb (SPARK_Msg_N): Issue error unless SPARK_Mode is Off.
162
1632014-10-10 Ed Schonberg <schonberg@adacore.com>
164
165 * exp_ch5.adb (Expand_Formal_Container_Element_Loop): Analyze
166 declaration for loop parameter before rest of loop, and set
167 entity kind to prevent assignments to it in the user code.
168 * sem_ch3.adb (Analyze_Object_Contract): No contracts apply to the
169 loop parameter in an element iteration over o formal container.
170
1712014-10-10 Robert Dewar <dewar@adacore.com>
172
173 * gnat_ugn.texi: Document use of user-level routines to handle
174 e.g. col major arrays.
175
1762014-10-10 Doug Rupp <rupp@adacore.com>
177
178 * s-osinte-android.adb: Fix misspelling.
179 * gsocket.h: Tweak the Android quirks.
180
1812014-10-10 Robert Dewar <dewar@adacore.com>
182
183 * errout.ads (SPARK_Msg_N): Fix spec to match change in body.
184
80363c2f
AC
1852014-10-10 Robert Dewar <dewar@adacore.com>
186
187 * sem_ch13.adb: Minor code reorganization.
188
1892014-10-10 Pat Rogers <rogers@adacore.com>
190
191 * gnat_rm.texi: Text now indicates pragma No_Run_Time is not
192 for users.
193
1942014-10-10 Vadim Godunko <godunko@adacore.com>
195
196 * a-coinho-shared.adb: Add minor comment.
197 * a-stzmap.adb (To_Sequence): Compute size of result array.
198
d56f4479
JM
1992014-10-10 Javier Miranda <miranda@adacore.com>
200
201 * exp_ch3.adb (Build_Init_Procedure): Complete the condition of an
202 if-stmt to match its current documentation.
203
b9696ffb
AC
2042014-10-10 Robert Dewar <dewar@adacore.com>
205
206 * sem_ch7.adb, einfo.adb, einfo.ads, sem_prag.adb, sem_ch12.adb,
207 freeze.adb, sem_util.adb, sem_res.adb, exp_ch6.adb, exp_ch13.adb,
208 sem_ch6.adb, sem_cat.adb, sem_disp.adb
209 (Is_Subprogram_Or_Generic_Subprogram): New primitive. Use this primitive
210 throughout where appropriate.
211
2122014-10-10 Bob Duff <duff@adacore.com>
213
214 * a-coinho-shared.ads: Minor reformatting.
215 * s-traceb.adb: Minor clean up.
216
2172014-10-10 Robert Dewar <dewar@adacore.com>
218
219 * ali.adb (Scan_ALI): Read and process new GP flag on ALI P line.
220 * ali.ads (GNATprove_Mode): New component in ALI table.
221 (GNATprove_Mode_Specified): New global.
222 * gnatbind.adb (Gnatbind): Give fatal error if any file compiled
223 in GNATProve mode.
224 * lib-writ.ads, lib-writ.adb (GP): New flag on P line for
225 GNATProve_Mode.
226
2272014-10-10 Javier Miranda <miranda@adacore.com>
228
229 * exp_ch3.adb (Build_Init_Procedure): Adding assertion.
230 (Build_Init_Statement): Ensure that statements
231 associated with the parent components are located at the beginning
232 of the returned list of statements.
233
2342014-10-10 Ed Schonberg <schonberg@adacore.com>
235
236 * sem_ch13.adb (Inherit_Aspects_At_Freeze_Node): If the full
237 view of a private type T that has a type invariant is a scalar
238 or constrained array type, the base type created for the full
239 view has the same type invariant.
240
1e3ed0fc
RD
2412014-10-10 Robert Dewar <dewar@adacore.com>
242
243 * exp_util.ads, sem_ch12.adb, exp_util.adb, i-fortra.ads: Minor code
244 reorganization.
245
53f3f4e3
EB
2462014-09-22 Eric Botcazou <ebotcazou@adacore.com>
247
248 * gcc-interface/decl.c (gnat_to_gnu_entity): Adjust comment.
249 * gcc-interface/utils.c (gnat_write_global_declarations): Fix typo.
250
717c4789
JJ
2512014-09-15 Jakub Jelinek <jakub@redhat.com>
252
253 * gcc-interface/Make-lang.in (check_acats_numbers0,
254 check_acats_numbers1, check_acats_numbers2, check_acats_numbers3,
255 check_acats_numbers4, check_acats_numbers5, check_acats_numbers6,
256 check_acats_numbers, check_acats_subdirs): New variables.
257 (check_acats_targets): Use $(check_acats_subdirs).
258 (check-acats, check-acats%): Rewritten so that for parallelized
259 testing each job runs all the chapters files, with
260 GCC_RUNTEST_PARALLELIZE_DIR set in environment. Prepare the support
261 directory sequentially and share it.
262 (check-acats-subtargets): Always print just check-acats.
263
347990b7
ML
2642014-08-25 Martin Liska <mliska@suse.cz>
265
266 * gcc-interface/utils.c (rest_of_subprog_body_compilation): Adjust to
267 new cgraph interface.
268 (gnat_write_global_declarations): Likewise.
269
f9089781
SL
2702014-08-13 Sylvestre Ledru <sylvestre@debian.org>
271
272 * 9drpc.adb: Fix a typo
273 * s-interr.ads: Likewise
274 * s-taskin.ads: Likewise
275 * s-traces.ads: Likewise
276 * sysdep.c: Likewise
277
06a1d02e
JS
2782014-08-12 Joel Sherrill <joel.sherrill@oarcorp.com>
279
280 * socket.c: For RTEMS, use correct prototype of gethostbyname_r().
281 * gsocket.h Add include of <unistd.h> on RTEMS.
282
a001528d
JS
2832014-08-11 Joel Sherrill <joel.sherrill@oarcorp.com>
284
285 * s-osinte-rtems.adb: Correct formatting of line in license block.
286
eefe9555
AC
2872014-08-04 Claire Dross <dross@adacore.com>
288
289 * exp_util.adb (Get_First_Parent_With_Ext_Axioms_For_Entity):
290 For an instance, look at the scope before the generic parent.
291
2922014-08-04 Yannick Moy <moy@adacore.com>
293
294 * lib-writ.ads: Update comments.
295 * sem_disp.ads, sem_disp.adb (Inherited_Subprograms): Add
296 parameters to filter inherited subprograms.
297
9a9d35ff
AC
2982014-08-04 Robert Dewar <dewar@adacore.com>
299
300 * gnat_rm.texi: Add section on use of address clause for memory
301 mapped I/O.
302
3032014-08-04 Ed Schonberg <schonberg@adacore.com>
304
305 * sem_ch3.adb (Analyze_Subtype_Declaration): A subtype, in
306 particular the subtype created for a generic actual, inherits
307 invariant information from the base type.
308
c2a2dbcc
RD
3092014-08-04 Robert Dewar <dewar@adacore.com>
310
311 * aspects.ads, aspects.adb: Add entries for aspect Obsolescent.
312 * gnat_rm.texi: Add documentation for aspect Obsolescent.
313 * sem_ch13.adb (Analyze_Aspect_Specifications): Implement aspect
314 Obsolescent.
315 (Check_Aspect_At_Freeze_Point): Add dummy entry for pragma Obsolescent.
316 * s-osprim-mingw.adb: Minor reformatting.
317 * sem_res.adb (Is_Atomic_Ref_With_Address): New function
318 (Resolve_Indexed_Component): Rework warnings for non-atomic access
319 (Resolve_Selected_Component): Add warnings for non-atomic access.
320
6cf7eae6
AC
3212014-08-04 Doug Rupp <rupp@adacore.com>
322
323 * g-calend.adb (timeval_to_duration, duration_to_timeval): Change sec
324 formal to long_long.
325 * g-calend.ads (timeval): Bump up size to accomodate sec type.
326 * s-taprop-linux.adb (timeval_to_duration): Change sec formal to
327 long_long
328 * s-osprim-posix.adb (timeval): Bump up size to accomodate
329 new sec type.
330 (timeval_to_duration): Change sec formal to Long_Long_Integer
331 * s-osinte-darwin.adb (timeval): Bump up
332 size to accomodate new sec type.
333 (timeval_to_duration): Change sec formal to long_long
334 * s-osinte-android.adb: Likewise.
335 * cal.c (__gnat_timeal_to_duration, __gnat_duration_to_timeval): Change
336 sec formal from long to long long.
337
3382014-08-04 Robert Dewar <dewar@adacore.com>
339
340 * sem_res.adb (Resolve_Qualified_Expression): Make sure
341 Do_Range_Check flag gets set.
342
bc3c2eca
AC
3432014-08-04 Robert Dewar <dewar@adacore.com>
344
345 * einfo.ads, einfo.adb (Is_Standard_String_Type): New function.
346 * exp_ch3.adb (Build_Array_Init_Proc): Use
347 Is_Standard_String_Type.
348 (Expand_Freeze_Array_Type): ditto.
349 (Get_Simple_Init_Val): ditto.
350 (Needs_Simple_Initialization): ditto.
351 * sem_eval.adb (Eval_String_Literal): Use Is_Standard_String_Type.
352 * sem_warn.adb (Is_Suspicious_Type): Use Is_Standard_String_Type.
353
3542014-08-04 Pascal Obry <obry@adacore.com>
355
356 * adaint.c (__gnat_try_lock): Use _tcscpy and _tcscat instead of
357 _stprintf which insert garbage into the wfull_path buffer.
358
3592014-08-04 Arnaud Charlet <charlet@adacore.com>
360
361 * cal.c: Remove old VMS/nucleus code. Remove obsolete vxworks
362 code.
363 * fe.h: Minor reformatting.
364
3652014-08-04 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
366
367 * cstreams.c: (_LARGEFILE_SOURCE): Guard definition.
368
3692014-08-04 Robert Dewar <dewar@adacore.com>
370
371 * par-ch13.adb (Get_Aspect_Specifications): Improve error
372 recovery, fixing a -gnatQ bomb.
373
24d4b3d5
AC
3742014-08-04 Yannick Moy <moy@adacore.com>
375
376 * sem_ch3.adb (Analyze_Object_Declaration): In GNATprove mode,
377 do not generate two Itypes with the same name for an array
378 definition.
379 * sinfo.ads: Expand doc on GNATprove mode.
380
3812014-08-04 Hristian Kirtchev <kirtchev@adacore.com>
382
383 * exp_ch3.adb (Expand_Freeze_Record_Type): Set the finalization
384 master and storage pool attributes on the root type of an
385 anonymous access type.
386 * exp_ch4.adb (Expand_N_Allocator): Set the finalization master
387 and storage pool attributes on the root type of an anonymous
388 access type.
389
3902014-08-04 Arnaud Charlet <charlet@adacore.com>
391
392 * exp_ch3.adb: Minor reformatting.
393 * tb-alvms.c, tb-alvxw.c, tb-ivms.c: Removed.
394 * tracebak.c: Remove use of above files.
395 * gcc-interface/Makefile.in: Update dependencies.
396
3972014-08-04 Pierre-Marie Derodat <derodat@adacore.com>
398
399 * gcc-interface/utils.c (gnat_set_type_context): Also set the
400 context for parallel types' TYPE_STUB_DECL. Do not change
401 anything if the context is already set for them.
402 (gnat_pushdecl): Update the comment for calls to
403 gnat_set_type_context to mention parallel types.
404 (add_parallel_type): When adding a context-less parallel type to
405 a type that has a context, propagate the context from the latter
406 type to the former.
407 (process_deferred_decl_context): Call gnat_set_type_context
408 rather than manually setting the type context.
409 (build_unc_object_type): Call gnat_set_type_context on the
410 template type.
411
69fff50e
AC
4122014-08-04 Ed Schonberg <schonberg@adacore.com>
413
414 * exp_ch5.adb (Expand_N_Case_Statement): If a choice is a
415 subtype indication and the case statement has only two choices,
416 replace subtype indication with its range, because the resulting
417 membership test cannot have a subtype indication as an operand.
418
4192014-08-04 Arnaud Charlet <charlet@adacore.com>
420
421 * exp_ch3.adb: Update comments, minor reformatting.
422
e85f4337
HK
4232014-08-04 Hristian Kirtchev <kirtchev@adacore.com>
424
425 * sem_ch3.adb (Analyze_Declarations): Explain why the bodies of
426 the default initial condition procedures are build here.
427 * sem_util.adb (Build_Default_Init_Cond_Procedure): Wrap the
428 analyzed argument of pragma Default_Initial_Condition in some
429 dummy code as GNATprove mode disables assertions, but still
430 needs to see the argument.
431
135da41f
RD
4322014-08-04 Robert Dewar <dewar@adacore.com>
433
434 * exp_ch6.adb, sem_util.adb: Minor reformatting.
435
6a74a7b0
AC
4362014-08-04 Olivier Hainque <hainque@adacore.com>
437
438 * a-comutr.ads: Set Root_Node_Type'Alignment to
439 Standard'Maximum_Alignment, so that it is at least as large as
440 the max default for Tree_Node_Type'Alignment.
441
4422014-08-04 Hristian Kirtchev <kirtchev@adacore.com>
443
444 * exp_ch3.adb (Freeze_Type): Remove the generation and inheritance
445 of the default initial condition procedure [body].
446 * sem_ch3.adb (Analyze_Declarations): Create the bodies of
447 all default initial condition procedures at the end of private
448 declaration analysis.
449 * sem_util.adb (Build_Default_Init_Cond_Procedure_Bodies): New
450 routine.
451 (Build_Default_Init_Cond_Procedure_Body): Merged in the
452 processing of routine Build_Default_Init_Cond_Procedure_Bodies.
453 * sem_util.ads (Build_Default_Init_Cond_Procedure_Bodies):
454 New routine.
455 (Build_Default_Init_Cond_Procedure_Body): Removed.
456
4572014-08-04 Ed Schonberg <schonberg@adacore.com>
458
459 * sem_elab.adb (Check_Elab_Call): Do not check a call to a
460 postcondtion.
461 * exp_ch6.adb (Expand_Call): Clarify handling of inserted
462 postcondition call.
463
51dcceec
AC
4642014-08-04 Hristian Kirtchev <kirtchev@adacore.com>
465
466 * sem_prag.adb (Analyze_Pragma): Ensure that an
467 internally generated spec for a stand alone body is recognized
468 as a proper context for pragma SPARK_Mode.
469
4702014-08-04 Robert Dewar <dewar@adacore.com>
471
472 * erroutc.adb (Delete_Msg): Do not decrement Warnings_Treated_As_Errors.
473
4742014-08-04 Arnaud Charlet <charlet@adacore.com>
475
476 * adabkend.adb (Scan_Back_End_Switches): Ignore extra -o
477 when -gnatO has already been specified, for compatibility
478 with gcc driver.
479 (Scan_Compiler_Args): Do not call Set_Output_Object_File_Name in
480 codepeer mode.
481 * g-expect.ads: Fix typo.
482
4832014-08-04 Thomas Quinot <quinot@adacore.com>
484
485 * exp_ch4.adb (Insert_Dereference_Action): the actual Size
486 must account for the bounds template if the designated type is
487 an unconstrained array.
488
df910722
HK
4892014-08-04 Hristian Kirtchev <kirtchev@adacore.com>
490
491 * a-cfhama.adb, a-cfhase.adb, a-cforma.adb, a-cforse.adb Add
492 SPARK_Mode in the body.
493 * sem_ch7.adb (Analyze_Package_Body_Helper): Restore the original
494 way to verify the consistency of SPARK_Mode between a spec and
495 a body.
496 * sem_ch12.adb (Analyze_Package_Instantiation): Remove the call
497 to Set_Ignore_Pragma_SPARK_Mode. Set flag Ignore_Pragma_SPARK_Mode
498 manually.
499 (Analyze_Subprogram_Instantiation): Remove the call to
500 Set_Ignore_Pragma_SPARK_Mode. Set flag Ignore_Pragma_SPARK_Mode
501 manually.
502 * sem_prag.adb (Analyze_Pragma): Remove local variable
503 Inst_Id. SPARK_Mode can no longer be applied to a package or
504 subprogram instantiation.
505 * sem_util.adb, sem_util.ads (Set_Ignore_Pragma_SPARK_Mode):
506 Removed.
507
4ff2b6dc
AC
5082014-08-04 Robert Dewar <dewar@adacore.com>
509
510 * sem_prag.adb, osint.adb, osint.ads: Minor reformatting.
511
5122014-08-04 Yannick Moy <moy@adacore.com>
513
514 * sem_ch3.adb (Derive_Type_Declaration,
515 Process_Discriminants): Remove SPARK-specific legality checks.
516
5172014-08-04 Thomas Quinot <quinot@adacore.com>
518
519 * g-sechas.ads, g-sechas.adb (HMAC_Initial_Context): New subprogram.
520 * gnat_rm.texi (GNAT.MD5/SHA1/SHA224/SHA256/SHA512): Document support
521 for HMAC.
522
e72a92e4
HK
5232014-08-04 Hristian Kirtchev <kirtchev@adacore.com>
524
525 * sem_ch7.adb (Analyze_Package_Body_Helper): When verifying the
526 compatibility of SPARK_Mode between a spec and a body, use the
527 SPARK_Mode of the public part.
528 * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration): Use
529 the already available routine to exchange the aspects between
530 the template and its copy. Analyze the aspects of copy to
531 ensure that the corresponding pragmas perform their semantic
532 effects. The partial analysis of aspects is no longer needed.
533 (Analyze_Package_Instantiation): Save and restore the SPARK_Mode
534 of the context.
535 (Analyze_Subprogram_Instantiation): Save and restore the SPARK_Mode of
536 the context.
537 * sem_prag.adb (Analyze_Pragma): Do not bypass a subprogram
538 instantiation which does not come from source.
539
f1c7be38
AC
5402014-08-04 Hristian Kirtchev <kirtchev@adacore.com>
541
542 * a-cfhama.ads, a-cfhase.ads, a-cforma.ads, a-cforse.ads Add
543 SPARK_Mode pragmas to the public and private part of the unit.
544 * sem_ch3.adb (Derive_Type_Declaration): Ensure that a derived
545 type cannot have discriminants if the parent type already has
546 discriminants.
547 (Process_Discriminants): Ensure that the type of a discriminant is
548 discrete.
549 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): The check on
550 SPARK_Mode compatibility between a spec and a body can now be
551 safely performed while processing a generic.
552 * sem_ch7.adb (Analyze_Package_Body_Helper): The check on
553 SPARK_Mode compatibility between a spec and a body can now be
554 safely performed while processing a generic.
555 * sem_prag.adb (Analyze_Pragma): Pragma SPARK_Mode can now be
556 safely analyzed when processing a generic.
557
5582014-08-04 Nicolas Roche <roche@adacore.com>
559
560 * g-dirope.adb: Minor reformating.
561
3ccedacc
AC
5622014-08-04 Robert Dewar <dewar@adacore.com>
563
564 * sem_ch6.adb: Minor reformatting.
565
5662014-08-04 Ed Schonberg <schonberg@adacore.com>
567
568 * sem_prag.adb (Analyze_Pragma, case Assert and related pragmas):
569 Before normalizing these pragmas into a pragma Check, preanalyze
570 the optional Message argument, (which is subsequently copied)
571 so that it has the proper semantic information for ASIS use.
572 * sem_case.adb: Initialize flag earlier.
573 * osint.adb, osint.ads (Find_File): Add parameter Full_Name, used when
574 the full source path of a configuration file is requested.
575 (Read_Source_File): Use Full_Name parameter..
576
f3124d8f
HK
5772014-08-04 Hristian Kirtchev <kirtchev@adacore.com>
578
579 * opt.ads Alphabetize various global flags. New flag
580 Ignore_Pragma_SPARK_Mode along with a comment on usage.
581 * sem_ch6.adb (Analyze_Generic_Subprogram_Body):
582 Pragma SPARK_Mode is now allowed in generic units.
583 (Analyze_Subprogram_Body_Helper): Do not verify the compatibility
584 between the SPARK_Mode of a spec and that of a body when inside
585 a generic.
586 * sem_ch7.adb (Analyze_Package_Body_Helper): Do not verify the
587 compatibility between the SPARK_Mode of a spec and that of a
588 body when inside a generic.
589 * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration):
590 Pragma SPARK_Mode is now allowed in generic units.
591 (Analyze_Package_Instantiation): Save and restore the value of
592 flag Ignore_ Pragma_SPARK_Mode in a stack-like fasion. Set
593 the governing SPARK_Mode before analyzing the instance.
594 (Analyze_Subprogram_Instantiation): Save and restore the value
595 of flag Ignore_ Pragma_SPARK_Mode in a stack-like fasion. Set
596 the governing SPARK_Mode before analyzing the instance.
597 * sem_ch13.adb (Analyze_Aspect_Specifications): Emulate the
598 placement of a source pragma when inserting the generated pragma
599 for aspect SPARK_Mode.
600 * sem_prag.adb (Analyze_Pragma): Reimplement the handling of
601 pragma SPARK_Mode to allow for generics and their respective
602 instantiations.
603 * sem_util.ads, sem_util.adb (Check_SPARK_Mode_In_Generic): Removed.
604 (Set_Ignore_Pragma_SPARK_Mode): New routine.
605
f10ff6cc
AC
6062014-08-04 Eric Botcazou <ebotcazou@adacore.com>
607
53f3f4e3
EB
608 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Component>: Deal with
609 renaming discriminants in tagged types first.
610 * gcc-interface/trans.c (gnat_to_gnu) <N_Selected_Component>: Test
611 the underlying type of the prefix.
612 (Pragma_to_gnu, case Pragma_Warning): Ignore Reason => "..."
613 (process_freeze_entity): Reset the nodes of all the view of a type,
614 if any.
f10ff6cc
AC
615
6162014-08-04 Doug Rupp <rupp@adacore.com>
617 Olivier Hainque <hainque@adacore.com>
618
53f3f4e3 619 * gcc-interface/Makefile.in (x86 VxWorks): Add filter-out for vxworks7
f10ff6cc 620 and remove incorrect EH_MECHANISM macros.
53f3f4e3 621 Add sigtramp.h to EXTRA_LIBGNAT_SRCS when we add sigtramp-vxworks.o to
f10ff6cc
AC
622 EXTRA_LIBGNAT_OBJS.
623
74014283
RD
6242014-08-04 Robert Dewar <dewar@adacore.com>
625
626 * exp_attr.adb (Expand_N_Attribute_Reference): Make sure prefix
627 of constructed 'Valid attribute in -gnatVa mode does not appear
628 to come from source.
629 * sem_attr.adb (Analyze_Access_Attribute): Don't set
630 Never_Set_In_Source for non-source reference.
631 * sem_util.adb: Minor reformatting.
632 * sem_warn.adb (Check_References): Don't check Address_Taken,
633 not necessary, see comment.
634
536a2daf
AC
6352014-08-04 Robert Dewar <dewar@adacore.com>
636
637 * sem_util.adb, sem_case.adb: Minor reformatting.
638
6392014-08-04 Ed Schonberg <schonberg@adacore.com>
640
641 * exp_ch9.adb (Extract_Entry): If the synchronized object is a
642 limited view, replace with non-limited view, which is available
643 at the point of an entry call.
644
6452014-08-04 Ed Schonberg <schonberg@adacore.com>
646
647 * exp_ch6.adb (Expand_Call): If the call is to a function in
648 a run-time unit that is marked Inline_Always, we must suppress
649 debugging information on it, so that the code that is eventually
650 inlined will not affect debugging of the user program.
651
2e1295ad
AC
6522014-08-04 Robert Dewar <dewar@adacore.com>
653
654 * inline.adb, einfo.ads, s-tassta.adb, s-tarest.adb: Minor comment
655 fixes.
656
6572014-08-04 Ed Schonberg <schonberg@adacore.com>
658
659 * sem_prag.adb (Process_Import_Or_Interface): Handle properly
660 an aspect Import that specifies a False value.
661
6622014-08-04 Robert Dewar <dewar@adacore.com>
663
664 * gnat_rm.texi: Add section on aspect Invariant'Class.
665
6662014-08-04 Ed Schonberg <schonberg@adacore.com>
667
668 * sem_case.adb (Check_Choice_Set): New flag Predicate_Error,
669 for better control of cascaded error messages when some choice
670 in a case statement over a predicated type violates the given
671 static predicate.
672
6732014-08-04 Hristian Kirtchev <kirtchev@adacore.com>
674
675 * sem_ch3.adb (Build_Derived_Type): Modify the
676 inheritance of the rep chain to ensure that a non-tagged type's
677 items are not clobbered during the inheritance.
678
82701811
AC
6792014-08-04 Robert Dewar <dewar@adacore.com>
680
681 * sem_ch3.adb, einfo.ads: Minor reformatting.
682
6832014-08-04 Yannick Moy <moy@adacore.com>
684
685 * inline.adb (Can_Be_Inlined_In_GNATprove_Mode): Fix
686 detection of subprograms that cannot be inlined in GNATprove mode.
687
6882014-08-04 Ed Schonberg <schonberg@adacore.com>
689
690 * einfo.adb: Add guard to Returns_Limited_View.
691
6922014-08-04 Jose Ruiz <ruiz@adacore.com>
693
694 * s-tassta.adb, s-tarest.adb (Task_Wrapper): Force maximum alignment of
695 the secondary stack to respect the alignments of the returned objects.
696
a4b07ff0
AC
6972014-08-04 Ed Schonberg <schonberg@adacore.com>
698
699 * einfo.ads, einfo.adb (Returns_Limited_View): New flag defined
700 on function entities whose return type is a limited view.
701 * freeze.adb (Freeze_Entity): Use Returns_Limited_View to determine
702 where to place the freeze node for a function that returns the
703 limited view of a type, when the function is called and frozen
704 in a different unit.
705
7062014-08-04 Eric Botcazou <ebotcazou@adacore.com>
707
708 * sem_ch3.adb (Build_Derived_Private_Type): Minor code
709 refactoring.
710
d10bb9d5
AC
7112014-08-04 Robert Dewar <dewar@adacore.com>
712
713 * gnat_ugn.texi: Clarify documentation on assertions.
714
7152014-08-04 Ed Schonberg <schonberg@adacore.com>
716
717 * sem_aggr.adb (Resolve_Record_Aggregate, Get_Value): Warn
718 if a component association has a box initialization when the
719 component type has no default initialization, either through an
720 initial value, an aspect, or an implicit initialization procedure.
721
7222014-08-04 Ed Schonberg <schonberg@adacore.com>
723
724 * freeze.adb: Code clean up.
725
0fea901b
AC
7262014-08-04 Thomas Quinot <quinot@adacore.com>
727
728 * sem_ch5.adb: Minor reformatting.
729
7302014-08-04 Ed Schonberg <schonberg@adacore.com>
731
732 * freeze.adb (Late_Freeze_Subprogram): Following AI05-151,
733 a function can return a limited view of a type declared
734 elsewhere. In that case the function cannot be frozen at the end
735 of its enclosing package. If its first use is in a different unit,
736 it cannot be frozen there, but if the call is legal the full view
737 of the return type is available and the subprogram can now be
738 frozen. However the freeze node cannot be inserted at the point
739 of call, but rather must go in the package holding the function,
740 so that the backend can process it in the proper context.
741
11261647
AC
7422014-08-04 Robert Dewar <dewar@adacore.com>
743
744 * exp_ch5.adb, sem_ch5.adb, einfo.ads: Minor reformatting.
745
7462014-08-04 Arnaud Charlet <charlet@adacore.com>
747
748 * sem_ch4.adb (Operator_Check): Refine previous change.
749
1e3689bd
AC
7502014-08-04 Arnaud Charlet <charlet@adacore.com>
751
752 * sem_scil.ads: Improve comments.
753 * sem_ch4.adb (Analyze_Equality_Op): Add support for
754 Allow_Integer_Address (equality between Address and Integer).
755
7562014-08-04 Yannick Moy <moy@adacore.com>
757
758 * a-cfhama.adb, a-cforse.adb: Minor fixes to avoid using prefix
759 notation on untagged objects.
760 * sem.ads: Update comment.
761 * inline.adb (Can_Be_Inlined_In_GNATprove_Mode): Do
762 not inline subprograms declared in the visible part of a package.
763
aa499784
ES
7642014-08-04 Ed Schonberg <schonberg@adacore.com>
765
766 * exp_ch5.adb: minor reformatting.
767 * einfo.ads, einfo.adb (Is_Processed_Transient): Applies to loop
768 parameters.
769
8f4a8bef
AC
7702014-08-04 Thomas Quinot <quinot@adacore.com>
771
772 * s-fatgen.adb: Minor reformatting.
773
7742014-08-04 Arnaud Charlet <charlet@adacore.com>
775
776 * exp_util.adb (Is_Possibly_Unaligned_Object): Always return
777 False on .NET.
778
7792014-08-04 Ed Schonberg <schonberg@adacore.com>
780
781 * sem_ch5.adb (Analyze_Loop_Statement): Set properly the kind of
782 the loop parameter for element iterators over containers and
783 arrays, so that improper uses of it are detected in the loop
784 body when expansion is disabled.
785 * exp_ch5.adb (Expand_Iterator_Loop): The entity kind of the
786 generated cursor is that of the analyzed loop parameter.
787
6d0b56ad
AC
7882014-08-04 Hristian Kirtchev <kirtchev@adacore.com>
789
790 * exp_ch3.adb (Build_CPP_Init_Procedure): Remove
791 Flag_Decl. Do not analyze the declaration of the flag as it is
792 not part of the tree yet, instead add it to the freeze actions
793 of the C++ type.
794
7952014-08-04 Robert Dewar <dewar@adacore.com>
796
797 * checks.adb (Apply_Scalar_Range_Check): Make sure we handle
798 case of OUT and IN OUT parameter correctly (where Source_Typ is
799 set), we were missing one case where a check must be applied.
800
8012014-08-04 Hristian Kirtchev <kirtchev@adacore.com>
802
803 * sem_ch8.adb (Build_Class_Wide_Wrapper): Update the comment on
804 the generated code. Instead of hiding the renaming and using the
805 wrapper as the proper association, have the subprogram renaming
806 alias the wrapper.
807 (Build_Spec): The entity of the wrapper is
808 now derived from the entity of the related primitive.
809
8102014-08-04 Emmanuel Briot <briot@adacore.com>
811
812 * s-regpat.adb: s-regpat.adb (Parse): fix incorrect link when
813 using non-capturing groups.
814
8152014-08-04 Ed Schonberg <schonberg@adacore.com>
816
817 * inline.adb (Build_Body_To_Inline): Remove Unmodified and
818 related pragmas before copying the original body, to prevent
819 spurious errors when the pragmas apply to formals that will not
820 appear in the inlined body.
821
ff7a5bcb
RD
8222014-08-04 Robert Dewar <dewar@adacore.com>
823
824 * exp_prag.adb, sem_ch7.adb, einfo.adb, sem_prag.adb, sem_util.adb,
825 exp_ch3.adb: Minor reformatting.
826
e477d718
AC
8272014-08-04 Robert Dewar <dewar@adacore.com>
828
829 * prj-strt.adb, prj-strt.ads, sem_attr.adb: Minor reformatting.
830
8312014-08-04 Hristian Kirtchev <kirtchev@adacore.com>
832
833 * aspects.adb Add an entry in table Canonical_Aspect for
834 Default_Initial_Condition.
835 * aspects.ads Add an entry in tables Aspect_Id, Aspect_Argument,
836 Aspect_Names and Aspect_Delay for Default_Initial_Condition.
837 * einfo.adb Flag3 is now Has_Default_Init_Cond. Flag132
838 is now Is_Default_Init_Cond_ Procedure. Flag133 is now
839 Has_Inherited_Default_Init_Cond.
840 (Default_Init_Cond_Procedure): New routine.
841 (Has_Default_Init_Cond): New routine.
842 (Has_Inherited_Default_Init_Cond): New routine.
843 (Is_Default_Init_Cond_Procedure): New routine.
844 (Set_Default_Init_Cond_Procedure): New routine.
845 (Set_Has_Default_Init_Cond): New routine.
846 (Set_Has_Inherited_Default_Init_Cond): New routine.
847 (Set_Is_Default_Init_Cond_Procedure): New routine.
848 (Write_Entity_Flags): Output all the new flags.
849 * einfo.ads New attributes Default_Init_Cond_Procedure,
850 Has_Inherited_Default_Init_Cond and Is_Default_Init_Cond_Procedure
851 along with usage in nodes.
852 (Default_Init_Cond_Procedure): New routine.
853 (Has_Default_Init_Cond): New routine and pragma Inline.
854 (Has_Inherited_Default_Init_Cond): New routine and
855 pragma Inline.
856 (Is_Default_Init_Cond_Procedure): New routine and
857 pragma Inline.
858 (Set_Default_Init_Cond_Procedure): New routine.
859 (Set_Has_Default_Init_Cond): New routine and pragma Inline.
860 (Set_Has_Inherited_Default_Init_Cond): New routine and pragma Inline.
861 (Set_Is_Default_Init_Cond_Procedure): New routine and pragma Inline.
862 * exp_ch3.adb (Expand_N_Object_Declaration): New constant
863 Next_N. Generate a call to the default initial condition procedure
864 if the object's type is subject to the pragma. (Freeze_Type):
865 Generate the body of the default initial condition procedure or
866 inherit the spec from a parent type.
867 * exp_ch7.adb Add with and use clause for Exp_Prag.
868 (Expand_Pragma_Initial_Condition): Removed.
869 * exp_prag.ads, exp_prag.adb (Expand_Pragma_Initial_Condition): New
870 routine.
871 * par-prag.adb (Prag): Pragma Default_Initial_Condition does
872 not need special treatment by the parser.
873 * sem_ch3.adb (Build_Derived_Record_Type): Propagate the
874 attributes related to pragma Default_Initial_Condition to the
875 derived type.
876 (Process_Full_View): Propagate the attributes
877 related to pragma Default_Initial_Condition to the full view.
878 * sem_ch7.adb (Analyze_Package_Specification): Build the
879 declaration of the default initial condition procedure for all
880 types that qualify or inherit the one from the parent type.
881 * sem_ch13.adb (Analyze_Aspect_Specifications):
882 Add processing for aspect Default_Initial_Condition.
883 (Check_Aspect_At_Freeze_Point): Aspect
884 Default_Initial_Condition does not require delayed analysis.
885 (Replace_Type_References_Generic): Moved to spec.
886 * sem_ch13.ads (Replace_Type_References_Generic): Moved from body.
887 * sem_prag.adb Add an entry in table Sif_Glags for
888 Default_Initial_Condition.
889 (Analyze_Pragma): Pragma
890 Default_Initial_Condition is now part of assertion
891 policy. Add processing for pragma Default_Initial_Condition.
892 (Is_Valid_Assertion_Kind): Pragma Default_Initial_Condition is
893 now recognized as a proper assertion policy.
894 * sem_util.ads, sem_util.adb (Build_Default_Init_Cond_Call): New
895 routine.
896 (Build_Default_Init_Cond_Procedure_Body): New routine.
897 (Build_Default_Init_Cond_Procedure_Declaration): New routine.
898 (Inherit_Default_Init_Cond_Procedure): New routine.
899 * snames.ads-tmpl Add new predefined name and pragma id for
900 Default_Initial_Condition.
901
bb304287
AC
9022014-08-04 Vincent Celier <celier@adacore.com>
903
904 * prj-dect.adb (Parse_Case_Construction): It is no longer
905 an error if the variable for a case construction is not
906 typed, only if the variable value is not a single string. Call
907 Parse_Choice_List and End_Case_Construction with the new parameter
908 to indicate that the variable is typed.
909 * prj-strt.adb (End_Case_Construction): Only check the labels
910 if the variable is typed. If the variable is not typed,
911 issue a warning when there is no "when others" allternative.
912 (Parse_Choice_List): Manage the labels only if the variable
913 is typed.
914 * prj-strt.ads (End_Case_Construction): New Boolean parameter
915 String_Type.
916 (Parse_Choice_List): Ditto.
917
9182014-08-04 Ed Schonberg <schonberg@adacore.com>
919
920 * sem_ch5.adb: Additional fix to Check_Predicate_Use.
921
9222014-08-04 Vincent Celier <celier@adacore.com>
923
924 * projects.texi: Update documentation of case constructions with
925 variables that are not typed.
926
9272014-08-04 Ed Schonberg <schonberg@adacore.com>
928
929 * sem_ch8.adb (Build_Class_Wide_Wrapper): If the operator carries
930 an Eliminated pragma, indicate that the wrapper is also to be
931 eliminated, to prevent spurious errors when using gnatelim on
932 programs that include box-initialization of equality operators
933 (consequence of AI05-071)..
934
9352014-08-04 Robert Dewar <dewar@adacore.com>
936
937 * checks.adb (Activate_Overflow_Check): Handle floating-point
938 case correctly.
939 * checks.ads (Activate_Overflow_Check): Clarify handling of
940 floating-point cases.
941 * exp_util.adb (Check_Float_Op_Overflow): Reset Do_Overflow_Check
942 flag if we generate an explicit overflow check (for
943 Check_Float_Overflow mode).
944
7ed57189
AC
9452014-08-04 Robert Dewar <dewar@adacore.com>
946
947 * prj-proc.adb, prj-part.adb, prj-strt.adb, prj.adb, prj.ads,
948 prj-attr.adb, prj-attr.ads: Minor reformatting.
949
9502014-08-04 Yannick Moy <moy@adacore.com>
951
952 * expander.adb (Expand): Always perform special
953 expansion in GNATprove mode, even when doing pre-analysis.
954
9552014-08-04 Thomas Quinot <quinot@adacore.com>
956
957 * repinfo.adb (List_Scalar_Storage_Order): List bit order if
958 not default. Also list bit order if SSO is specified. Do not
959 assume that bit order is always equal to scalar storage order.
960
9612014-08-04 Thomas Quinot <quinot@adacore.com>
962
963 * freeze.adb (Set_SSO_From_Default): Do not set scalar storage
964 order to reverse SSO for a type that has an explicit native
965 Bit_Order.
966
9672014-08-04 Doug Rupp <rupp@adacore.com>
968
969 * cal.c: Macro check for VxWorks7.
970 * init.c (getpid): Likewise.
971 * mkdir.c (__gnat_mkdir): Likewise.
972 * sysdep.c (__gnat_is_file_not_found_error): Likewise.
973
9742014-08-04 Gary Dismukes <dismukes@adacore.com>
975
976 * exp_ch3.adb (Expand_N_Object_Declaration): Inhibit generation
977 of an invariant check in the case where No_Initialization is set,
978 since the object is uninitialized.
979
9802014-08-04 Thomas Quinot <quinot@adacore.com>
981
982 * snames.ads-tmpl (Default_Scalar_Storage_Order): Now an attribute
983 name, in addition to a pragma name.
984 * snames.adb-tmpl (Get_Pragma_Id, Is_Configuration_Pragma_Name,
985 Is_Pragma_Name): Adjust accordingly.
986 * sem_attr.ads, sem_attr.adb, exp_attr.adb
987 (Attribute_Default_Scalar_Storage_Order): Add handling of new
988 attribute.
989 * gnat_rm.texi: Document the above.
990
af6478c8
AC
9912014-08-04 Arnaud Charlet <charlet@adacore.com>
992
993 * exp_util.adb (Check_Float_Op_Overflow): No-op in codepeer
994 mode for now, to revert to previous behavior.
995 * checks.adb: Revert previous change, no longer needed.
996
9972014-08-04 Robert Dewar <dewar@adacore.com>
998
999 * gnat1drv.adb (Adjust_Global_Switches): Don't set
1000 Check_Float_Overflow if Machine_Oveflows_On_Target is True.
1001 * sem_prag.adb (Analyze_Pragma, case Check_Float_Overflow): Don't
1002 set Check_Float_Overflow if Machine_Oveflows_On_Target is True.
1003 * switch-c.adb (Scan_Front_End_Switches): Don't set
1004 Check_Float_Overflow if Machine_Oveflows_On_Target is True.
1005
10062014-08-04 Vincent Celier <celier@adacore.com>
1007
1008 * prj-attr.adb: Add new default indications for
1009 attributes Object_Dir, Exec_Dir, Source_Dirs and Target.
1010 (Attribute_Default_Of): New function (Initialize): Set the
1011 default for those attributes that have one specified.
1012 * prj-attr.ads (Attribute_Data): New component Default.
1013 * prj-proc.adb (Expression): Take into account the new defaults
1014 for attributes Object_Dir, Exec_Dir and Source_Dirs.
1015 * prj-strt.adb (Attribute_Reference): Set the default for
1016 the attribute.
1017 * prj-tree.ads, prj-tree.adb (Default_Of): New function.
1018 (Set_Default_Of): New procedure.
1019 * prj.adb (The_Dot_String): New global Name_Id variable,
1020 initialized in procedure Initialize.
1021 (Dot_String): New function
1022 (Initialize): Initialize The_Dot_String.
1023 (Reset): Create the string list Shared.Dot_String_List.
1024 * prj.ads (Attribute_Default_Value): New enumeration type.
1025 (Project_Qualifier): Change enumeration value Dry to Abstract_Project.
1026 (Dot_String): New function.
1027 (Shared_Project_Tree_Data): New string list component Dot_String_List.
1028 * projects.texi: Document new defaults for attribute Object_Dir,
1029 Exec_Dir and Source_Dirs.
1030
e943fe8a
AC
10312014-08-04 Robert Dewar <dewar@adacore.com>
1032
1033 * sem_ch12.adb: Minor reformatting.
1034
10352014-08-04 Arnaud Charlet <charlet@adacore.com>
1036
1037 * exp_util.adb, checks.adb (Check_Float_Op_Overflow): Add special
1038 expansion in CodePeer_Mode.
1039 (Selected_Range_Checks): Add handling of overflow checks in
1040 CodePeer_Mode.
1041
29049f0b
AC
10422014-08-04 Robert Dewar <dewar@adacore.com>
1043
1044 * exp_attr.adb (Expand_N_Attribute_Reference, case Pred):
1045 Remove special test for Float'First, no longer required.
1046 (Expand_N_Attribute_Reference, case Succ): Remove special test
1047 for Float'First, no longer required.
1048 * s-fatgen.adb (Pred): return infinity unchanged.
1049 (Succ): ditto.
1050
10512014-08-04 Claire Dross <dross@adacore.com>
1052
1053 * sem_ch12.adb (Analyze_Associations): Defaults should only be
1054 used if there is no explicit match.
1055 * exp_util.adb (Get_First_Parent_With_Ext_Axioms_For_Entity):
1056 Also check for pragma external_axiomatization on generic units.
1057
d26d790d
AC
10582014-08-04 Robert Dewar <dewar@adacore.com>
1059
1060 * checks.adb (Activate_Overflow_Check): Remove
1061 Check_Float_Overflow processing.
1062 (Apply_Scalar_Range_Check): Ditto.
1063 (Generate_Range_Check): Ditto.
1064 * exp_ch4.adb (Expand_N_Op_Add): Add call to
1065 Check_Float_Op_Overflow.
1066 (Expand_N_Op_Divide): ditto.
1067 (Expand_N_Op_Multiply): ditto.
1068 (Expand_N_Op_Subtract): ditto.
1069 * exp_util.ads, exp_util.adb (Check_Float_Op_Overflow): New procedure.
1070 * sem_attr.adb (Analyze_Attribute, case Pred): Make sure
1071 Do_Range_Check is set for floating-point case in -gnatc or
1072 GNATprove mode.
1073 (Analyze_Attribute, case Succ): Make sure
1074 Do_Range_Check is set for floating-point case in -gnatc or
1075 GNATprove mode.
1076 * sem_res.adb (Resolve_Type_Conversion): Make sure Do_Range_Check
1077 flag is set for real to integer conversion in GNATprove or
1078 -gnatc mode.
1079
10802014-08-04 Gary Dismukes <dismukes@adacore.com>
1081
1082 * sem_ch13.adb (Analyze_Aspect_Specifications): Resolve
1083 the expression of an Import or Export aspect as type Boolean
1084 and require it to be static. Add ??? comment. Also, set the
1085 Is_Exported flag when appropriate.
1086
dfaff97b
RD
10872014-08-04 Robert Dewar <dewar@adacore.com>
1088
1089 * exp_ch4.adb: Minor reformatting.
1090 * exp_attr.adb: Minor reformatting.
1091
8575023c
AC
10922014-08-04 Thomas Quinot <quinot@adacore.com>
1093
1094 * s-fatgen.ads, s-fatgen.adb (S, P): New visible type declarations
1095 (Unaligned_Valid): Remove now unused subprogram.
1096 * exp_attr.adb (Expand_N_Attribute_Reference, case
1097 Attribute_Valid): If the prefix is in reverse SSO or potentially
1098 unaligned, copy it using a byte copy operation to a temporary
1099 variable.
1100 * einfo.adb: Minor comment fix.
1101
11022014-08-04 Hristian Kirtchev <kirtchev@adacore.com>
1103
1104 * freeze.adb (Freeze_Entity): Do not freeze formal subprograms.
1105
8616baee
RD
11062014-08-04 Robert Dewar <dewar@adacore.com>
1107
1108 * s-imgrea.adb (Image_Floating_Point): Don't add space before +Inf.
1109 * s-fatgen.adb (Pred): Handle Float'First.
1110 (Succ): Handle Float'Last.
1111
98bf4cf4
AC
11122014-08-04 Ed Schonberg <schonberg@adacore.com>
1113
1114 * sem_util.adb (Is_Potentially_Unevaluated): If the original
1115 node of a parent node in the tree is a short-circuit operation,
1116 the node is potentially unevaluated.
1117
11182014-08-04 Robert Dewar <dewar@adacore.com>
1119
1120 * sem_res.adb (Resolve_Type_Conversion): Set Do_Range_Check on
1121 conversion from a real type to an integer type.
1122
ce5ba43a
AC
11232014-08-04 Yannick Moy <moy@adacore.com>
1124
1125 * sem_aggr.adb, sem_ch3.adb, sem_ch5.adb, sem_ch7.adb, sem_ch9.adb,
1126 sem_ch12.adb, sem_util.adb, sem_util.ads, sem_res.adb, sem_attr.adb,
1127 exp_ch6.adb, sem_ch4.adb, restrict.adb, restrict.ads, sem_ch6.adb,
1128 sem_ch8.adb, sem_ch11.adb: Update some subprogram names to refer to
1129 SPARK_05 instead of SPARK.
1130
11312014-08-04 Robert Dewar <dewar@adacore.com>
1132
1133 * sem.ads: Minor reformatting.
1134 * sem_ch13.adb (Analyze_Aspect_External_Or_Link_Name): Minor
1135 reformatting.
1136 (Analyze_Aspect_Specifications, case Convention): Put External_Name
1137 before Link_Name when constructing pragma.
1138
3dd7e28d
YM
11392014-08-04 Yannick Moy <moy@adacore.com>
1140
1141 * sem.adb, sem.ads (In_Default_Expr): Global flag that is set
1142 to True during analysis of a default component expression.
1143 (Semantics): Save and restore In_Default_Expr around analysis.
1144 * sem_ch3.adb, sem_ch3.ads (Analyze_Component_Declaration):
1145 Call new wrapper Preanalyze_Default_Expression.
1146 (Preanalyze_Default_Expression): New wrapper on
1147 Preanalyze_Spec_Expression which sets and restores In_Default_Expr.
1148 * sem_res.adb (Resolve_Call): Mark calls inside default
1149 expressions as not inlined in GNATprove mode.
1150
6c56d9b8
AC
11512014-08-04 Robert Dewar <dewar@adacore.com>
1152
1153 * exp_ch4.adb: Minor reformatting.
1154
11552014-08-04 Olivier Hainque <hainque@adacore.com>
1156
1157 * link.c: remove const on __gnat_objlist_file_supported for AIX
1158
11592014-08-04 Robert Dewar <dewar@adacore.com>
1160
1161 * sem_util.ads: Minor addition of comment.
1162
11632014-08-04 Vincent Celier <celier@adacore.com>
1164
1165 * prj-dect.adb (Check_Package_Allowed): Allow package IDE in
1166 all projects, including aggregate and aggregate library projects.
1167
11682014-08-04 Yannick Moy <moy@adacore.com>
1169
1170 * back_end.adb (Call_Back_End): Do not call gigi in GNATprove mode.
1171
11722014-08-04 Robert Dewar <dewar@adacore.com>
1173
1174 * sem_eval.adb (Test_In_Range): Always in range for
1175 Is_Known_Valid target type, where input type has smaller or
1176 equal size and does not have biased rep.
1177
11782014-08-04 Ed Schonberg <schonberg@adacore.com>
1179
1180 * sem_attr.adb (Eval_Attribute): Constrained is not treated as
1181 a static attribute, and the Static flag must not be set on it
1182 during resolution. It may be constant-folded during expansion,
1183 but if expansion is disabled it is not a static expression.
1184
ad5edba5
AC
11852014-08-04 Hristian Kirtchev <kirtchev@adacore.com>
1186
1187 * sem_ch8.adb (Build_Class_Wide_Wrapper): Mark the primitive as
1188 referenced once resolution has taken place.
1189
11902014-08-04 Gary Dismukes <dismukes@adacore.com>
1191
1192 * exp_ch4.adb (Expand_N_Type_Conversion): Don't
1193 compare access levels in the case where the target type is the
1194 anonymous type of an access discriminant, since the level of
1195 such types is defined based on context. Add comment.
1196
b6621d10
AC
11972014-08-04 Hristian Kirtchev <kirtchev@adacore.com>
1198
1199 * sem_ch8.adb (Build_Class_Wide_Wrapper): Handle various special
1200 cases related to equality. Remove the special processing
1201 for dispatching abstract subprograms as it is not needed.
1202 (Interpretation_Error): Add a specialized error message for
1203 predefined operators.
1204 (Is_Intrinsic_Equality): New routine.
1205 (Is_Suitable_Candidate): New routine.
1206
12072014-08-04 Gary Dismukes <dismukes@adacore.com>
1208
1209 * checks.adb: Minor comment reformatting.
1210
12112014-08-04 Ed Schonberg <schonberg@adacore.com>
1212
1213 * restrict.adb (Check_Restriction): For checked max_parameter
1214 restrictions reset Violated flag, so that subsequent violations
1215 are properly detected.
1216
12172014-08-04 Robert Dewar <dewar@adacore.com>
1218
1219 * sem_ch3.adb (Check_Initialization): Fix bad test of GNATprove
1220 mode.
1221 (Process_Discriminants): Fix bad test of GNATprove mode
1222
12232014-08-04 Hristian Kirtchev <kirtchev@adacore.com>
1224
1225 * sem_ch12.adb (Instantiate_Formal_Subprogram):
1226 Move variable to their own section. Propagate the source
1227 location of a formal parameter to the corresponding formal of
1228 the subprogram renaming declaration. Code reformatting.
1229
f5655e4a
AC
12302014-08-04 Arnaud Charlet <charlet@adacore.com>
1231
1232 * g-trasym-vms-ia64.adb, g-trasym-vms-alpha.adb: Removed.
1233
12342014-08-04 Ed Schonberg <schonberg@adacore.com>
1235
1236 * exp_aggr.adb (Expand_Array_Aggregate): Do not attempt expansion
1237 if error already detected. We may reach this point in spite of
1238 previous errors when compiling with -gnatq, to force all possible
1239 errors (this is the usual ACATS mode).
1240
12412014-08-04 Gary Dismukes <dismukes@adacore.com>
1242
1243 * checks.adb (Generate_Range_Check): For the case of converting
1244 a base type with a larger range to a smaller target subtype, only
1245 use unchecked conversions of bounds in the range check followed
1246 by conversion in the case where both types are discrete. In other
1247 cases, convert to the target base type and save in a temporary
1248 followed by the range check.
1249 (Convert_And_Check_Range): New procedure factoring code to save
1250 conversion to a temporary followed by a range check (called two
1251 places in Generate_Range_Check).
1252 * exp_ch4.adb (Expand_N_Type_Conversion): Relax previous
1253 check-in, to generate range checks for conversions between
1254 any floating-point types rather than limiting it to matching
1255 base types.
1256
6e2830c3
TS
12572014-08-02 Trevor Saunders <tsaunders@mozilla.com>
1258
1259 * gcc-interface/trans.c: Use hash_set instead of pointer_set.
1260
1696d58d
ES
12612014-08-01 Ed Schonberg <schonberg@adacore.com>
1262
1263 * restrict.adb (Update_Restrictions): For restrictions with a
1264 maximum parameter (e.g. number of protected entries in Ravenscar)
1265 do not compute the maximum of the violation over several objects,
1266 because the restriction is per-object.
1267 (Check_Restriction): After possible message, reset the value
1268 of of a checked max_parameter restriction to zero, to prevent
1269 cascaded errors.
1270 * sem_ch3.adb (Build_Derived_Private_Type): Use base of parent
1271 (sub)type to determine whether derived type should be on the
1272 list of private dependents of a type whose full view may become
1273 visible subsequently.
1274
9a30c7c4
AC
12752014-08-01 Olivier Hainque <hainque@adacore.com>
1276
1277 * gcc-interface/Make-lang.in (ADA_TOOLS_FLAGS_TO_PASS, native): use
1278 $(CXX) instead of ../../xg++ to feed CXX.
1279 (CXX_LFLAGS): Remove. Now unused as the proper flags
1280 are expected to be included in the CXX variable.
1281
12822014-08-01 Pierre-Marie Derodat <derodat@adacore.com>
1283
1284 * gcc-interface/decl.c (elaborate_expression_1): Return the new
1285 variable when debug info is needed and the expression is not
1286 constant. Tag as external only new variables that are global.
1287 (gnat_to_gnu_entity): Call it after the GNU declaration is saved.
1288 * gcc-interface/trans.c (Attribute_to_gnu): Do not cache
1289 attributes for IN array parameters when their actual subtype
1290 needs debug info.
1291 (Compilation_Unit_to_gnu): Call it to process all remaining nodes.
1292 * gcc-interface/gigi.h (process_deferred_decl_context): New.
1293 * gcc-interface/utils.c (gnat_write_global_declarations): Do not
1294 emit debug info for ignored global declarations.
1295 (struct deferred_decl_context_node,
1296 add_deferred_decl_context, add_deferred_type_context,
1297 compute_deferred_decl_context, defer_or_set_type_context,
1298 deferred_decl_context_queue, get_debug_scope,
1299 get_global_context, process_deferred_decl_context): New.
1300 (gnat_pushdecl): Re-implement the DECL_CONTEXT and TYPE_CONTEXT
1301 computation machinery to rely on the GNAT Scope attribute.
1302
13032014-08-01 Eric Botcazou <ebotcazou@adacore.com>
1304
1305 * gcc-interface/utils2.c (build_simple_component_ref): Add guard.
1306
a43f6434
AC
13072014-08-01 Robert Dewar <dewar@adacore.com>
1308
1309 * sem_ch8.adb, opt.ads Minor comment updates.
1310
13112014-08-01 Hristian Kirtchev <kirtchev@adacore.com>
1312
1313 * exp_intr.adb (Expand_Unc_Deallocation): Request a renaming
1314 from the side effects removal machinery.
1315 * exp_util.adb (Duplicate_Subexpr): Add formal parameter
1316 Renaming_Req. Update the nested call to Remove_Side_Effects.
1317 (Duplicate_Subexpr_No_Checks): Add formal parameter
1318 Renaming_Req. Update the nested call to Remove_Side_Effects.
1319 (Duplicate_Subexpr_Move_Checks): Add formal parameter
1320 Renaming_Req. Update the nested call to Remove_Side_Effects.
1321 (Remove_Side_Effects): Add formal parameter Renaming_Req. Generate
1322 an object renaming declaration when the caller requests it.
1323 * exp_util.ads (Duplicate_Subexpr): Add formal
1324 parameter Renaming_Req. Update comment on usage.
1325 (Duplicate_Subexpr_No_Checks): Add formal parameter Renaming_Req.
1326 (Duplicate_Subexpr_Move_Checks): Add formal parameter
1327 Renaming_Req.
1328
bdc193ba
AC
13292014-08-01 Bob Duff <duff@adacore.com>
1330
1331 * gnat_ugn.texi: Minor updates.
1332
13332014-08-01 Robert Dewar <dewar@adacore.com>
1334
1335 * atree.adb: Minor reformatting.
1336
13372014-08-01 Ed Schonberg <schonberg@adacore.com>
1338
1339 * exp_aggr.adb (Init_Hidden_Discriminants): If some ancestor is a
1340 private extension, get stored constraint, if any, from full view.
1341
8bef7ba9
AC
13422014-08-01 Robert Dewar <dewar@adacore.com>
1343
1344 * opt.ads (No_Elab_Code_All_Pragma): New global variable.
1345 * sem_ch10.adb (Check_No_Elab_Code_All): New procedure
1346 (Analyze_Compilation_Unit): Call Check_No_Elab_Code_All
1347 (Analyze_Subunit_Context): Call Check_No_Elab_Code_All.
1348 * sem_prag.adb (Analyze_Pragma, case No_Elaboration_Code_All):
1349 Remove code for checking with's, now in sem_ch10.adb, set
1350 Opt.No_Elab_Code_All_Pragma.
1351
13522014-08-01 Eric Botcazou <ebotcazou@adacore.com>
1353
1354 * sem_ch3.adb (Copy_And_Build): Copy the declaration for
1355 access types as well and adjust the subtype mark if there are
1356 no constraints.
1357
13582014-08-01 Robert Dewar <dewar@adacore.com>
1359
1360 * sem_eval.adb (Test_In_Range): Return Unknown if error posted.
1361
316e3a13
RD
13622014-08-01 Robert Dewar <dewar@adacore.com>
1363
1364 * sem_ch3.adb, einfo.ads, exp_ch4.adb: Code clean ups.
1365
7f1a5156
EB
13662014-08-01 Eric Botcazou <ebotcazou@adacore.com>
1367
1368 * einfo.ads (Has_Private_Ancestor): Remove obsolete usage.
1369 * exp_ch4.adb (Expand_Composite_Equality): Add conversion
1370 of the actuals in the case of untagged record types too.
1371 * sem_ch3.adb (Build_Full_Derivation): New procedure to create the
1372 full derivation of a derived private type, extracted from...
1373 (Copy_And_Build): In the case of record types and most
1374 enumeration types, copy the original declaration. Build the
1375 full derivation according to the approach extracted from...
1376 (Build_Derived_Private_Type): ...here. Call Build_Full_Derivation
1377 to create the full derivation in all existing cases and also
1378 create it in the no-discriminants/discriminants case instead of
1379 deriving directly from the full view.
1380 (Is_Visible_Component): Remove obsolete code.
1381 * sem_aggr.adb (Resolve_Record_Aggregate): Likewise.
1382
5b2bf62c
AC
13832014-08-01 Arnaud Charlet <charlet@adacore.com>
1384
1385 * fe.h (GNAT_Mode): New.
1386 * gcc-interface/decl.c (gnat_to_gnu_entity): Do not error out on
1387 reverse SSO in GNAT mode.
1388
7b536495
AC
13892014-08-01 Thomas Quinot <quinot@adacore.com>
1390
1391 * freeze.adb: Minor reformatting.
1392
13932014-08-01 Thomas Quinot <quinot@adacore.com>
1394
1395 * exp_ch3.adb (Default_Initialize_Object): Do not generate
1396 default initialization for an imported object.
1397
13982014-08-01 Olivier Hainque <hainque@adacore.com>
1399
1400 * seh_init.c (__gnat_map_SEH): Cast argument of IsBadCodePtr
1401 to the expected FARPROC type instead of void *.
1402 * adaint.c (f2t): Expect __time64_t * as second argument, in line with
1403 other datastructures.
1404 (__gnat_file_time_name_attr): Adjust accordingly.
1405 (__gnat_check_OWNER_ACL): Declare pSD as PSECURITY_DESCRIPTOR,
1406 in line with uses.
1407 (__gnat_check_OWNER_ACL): Declare AccessMode
1408 parameter as ACCESS_MODE instead of DWORD, in line with callers
1409 and uses.
1410 (__gnat_set_executable): Add ATTRIBUTE_UNUSED on mode,
1411 unused on win32. Correct cast of "args" on call to spawnvp.
1412 (add_handle): Cast realloc calls into their destination types.
1413 (win32_wait): Remove declaration and initialization of unused variable.
1414 (__gnat_locate_exec_on_path): Cast alloca calls
1415 into their destination types.
1416 * initialize.c (append_arg, __gnat_initialize): Cast xmalloc calls into
1417 their destination types.
1418
14192014-08-01 Gary Dismukes <dismukes@adacore.com>
1420
1421 * exp_ch4.adb (Expand_N_Type_Conversion): Expand
1422 range checks for conversions between floating-point subtypes
1423 when the target and source types are the same.
1424
14252014-08-01 Robert Dewar <dewar@adacore.com>
1426
1427 * exp_aggr.adb: Minor reformatting.
1428
14292014-08-01 Eric Botcazou <ebotcazou@adacore.com>
1430
1431 * sem_ch13.adb (Check_Indexing_Functions): Initialize
1432 Indexing_Found.
1433
14342014-08-01 Arnaud Charlet <charlet@adacore.com>
1435
1436 * gnat1drv.adb (Gnat1drv): In gnatprove mode, we now write the
1437 ALI file before we call the backend (so that gnat2why can append
1438 to it).
1439
14402014-08-01 Thomas Quinot <quinot@adacore.com>
1441
1442 * exp_pakd.adb (Expand_Bit_Packed_Element_Set,
1443 Expand_Packed_Element_Reference): Pass additional Rev_SSO
1444 parameter indicating whether the packed array type has reverse
1445 scalar storage order to the s-pack* Set/Get routines.
1446 * s-pack*.ad* (Get, Set, GetU, SetU): New formal Rev_SSO
1447 indicating reverse scalar storage order.
1448
14492014-08-01 Robert Dewar <dewar@adacore.com>
1450
1451 * sem_ch3.adb (Check_Initialization): Set Do_Range_Check
1452 for initial component value in -gnatc or GNATprove mode.
1453 (Process_Discriminants): Same fix for default discriminant values.
1454 * sem_eval.adb (Test_In_Range): Improve accuracy of results by
1455 checking subtypes.
1456
14572014-08-01 Robert Dewar <dewar@adacore.com>
1458
1459 * sinfo.ads: Minor comment clarification.
1460
41d8ee1d
AC
14612014-08-01 Hristian Kirtchev <kirtchev@adacore.com>
1462
1463 * sem_ch13.adb (Analyze_Aspect_Specifications): Code
1464 reformatting. Store the generated pragma Import in the related
1465 subprogram as routine Wrap_Imported_Subprogram will need it later.
1466 * sem_prag.adb (Is_Unconstrained_Or_Tagged_Item): An item of
1467 a private type with discriminants is considered to fall in the
1468 category of unconstrained or tagged items.
1469
14702014-08-01 Arnaud charlet <charlet@adacore.com>
1471
1472 * s-os_lib.adb (Open_Append): New functions to open a file for
1473 appending. This binds to the already existing (but not used)
1474 __gnat_open_append.
1475 * osint.ads, osint.adb (Open_File_To_Append_And_Check): New procedure
1476 to open a file for appending.
1477 * osint-c.ads, osint-c.adb (Open_Output_Library_Info): New procedure
1478 to open the ALI file for appending.
1479
2feb1f84
AC
14802014-08-01 Robert Dewar <dewar@adacore.com>
1481
1482 * sem_ch8.adb: Minor reformatting.
1483
14842014-08-01 Yannick Moy <moy@adacore.com>
1485
1486 * sem_ch13.adb (Insert_Pragma): Add special case for precondition
1487 pragmas from aspects, which need to be inserted in proper order.
1488
14892014-08-01 Ed Schonberg <schonberg@adacore.com>
1490
1491 * exp_aggr.adb (Expand_Record_Aggregate, Init_Hidden_Discriminants):
1492 Handle properly a type extension that constrains a discriminated
1493 derived type that renames other discriminants of an ancestor.
1494
14952014-08-01 Thomas Quinot <quinot@adacore.com>
1496
1497 * s-pack06.adb, s-pack10.adb, s-pack03.ads, s-pack12.adb, s-pack14.ads,
1498 s-pack25.adb: Fix minor inconsistencies and typos.
1499
fc193526
HK
15002014-08-01 Hristian Kirtchev <kirtchev@adacore.com>
1501
1502 * sem_ch8.adb (Analyze_Subprogram_Renaming): Alphabetize
1503 globals and move certain variables to the "local
1504 variable" section. Call Build_Class_Wide_Wrapper when
1505 renaming a default actual subprogram with a class-wide actual.
1506 (Build_Class_Wide_Wrapper): New routine.
1507 (Check_Class_Wide_Actual): Removed.
1508 (Find_Renamed_Entity): Code reformatting.
1509 (Has_Class_Wide_Actual): Alphabetize. Change the
1510 logic of the predicate as the renamed name may not necessarely
1511 denote the correct subprogram.
1512
4887624e
AC
15132014-08-01 Eric Botcazou <ebotcazou@adacore.com>
1514
1515 * sem_ch7.adb: Fix minor oversight in condition.
1516
15172014-08-01 Bob Duff <duff@adacore.com>
1518
1519 * projects.texi: Minor documentation improvements.
1520
15212014-08-01 Robert Dewar <dewar@adacore.com>
1522
1523 * aspects.ads, aspects.adb: Add aspect No_Elaboration_Code_All.
1524 * gnat_rm.texi: Document No_Elaboration_Code_All pragma and aspect.
1525 * lib-load.adb: Initialize No_Elab_Code_All field.
1526 * lib-writ.adb: Initialize No_Elab_Code_All.
1527 * lib.ads, lib.adb: New field No_Elab_Code_All.
1528 * par-prag.adb: Add dummy entry for pragma No_Elaboration_Code_All.
1529 * restrict.ads, restrict.adb: Restriction No_Elaboration_Code_All no
1530 longer exists.
1531 * sem_ch10.adb (Analyze_Context): Processing for
1532 No_Elaboration_Code_All removed.
1533 (Generate_Parent_References): Moved to Sem_Util.
1534 * sem_prag.adb: Add processing for pragma No_Elaboration_Code_All.
1535 * sem_util.ads, sem_util.adb (Get_Parent_Entity): Moved here from
1536 Sem_Ch10.
1537 * snames.ads-tmpl: Add entry for pragma No_Elaboration_Code_All.
1538 * targparm.adb: Minor comment updates Add comments on ignoring
1539 pragma No_Elaboration_Code_All.
1540
15412014-08-01 Nicolas Roche <roche@adacore.com>
1542
1543 * adaint.c (__gnat_set_close_on_exec): Ensure that
1544 we can unset "close_on_exec" flag.
1545
15462014-08-01 Ed Schonberg <schonberg@adacore.com>
1547
1548 * exp_ch9.adb (Build_Wrapper_Spec, Replicate_Formals): When building
1549 the parameter specs of the wrapper program for a primitive operation
1550 of a synchronized type that implements an interface, copy the
1551 null_exclusion indicator as well.
1552
15532014-08-01 Robert Dewar <dewar@adacore.com>
1554
1555 * sem_eval.ads: Minor reformatting.
1556
625d8a9f
EB
15572014-08-01 Eric Botcazou <ebotcazou@adacore.com>
1558
1559 * exp_ch3.adb (Build_Initialization_Call): Call Underlying_Type
1560 to go down the chain of private derivations.
1561 * freeze.adb (Freeze_Entity): Fix typo in comment.
1562
38cea80d
ES
15632014-08-01 Ed Schonberg <schonberg@adacore.com>
1564
1565 * sem_ch3.adb (Access_Type_Declaration): If designated type is
1566 a limited view, create a master entity (as is already done for
1567 class-wide types) in case the full view designates a type that
1568 contains tasks.
1569 * sem_ch8.adb (Find_Selected_Component): If prefix is a dereference
1570 and the designated type is a limited view, use the non-limited
1571 view if available.
1572
1eb58520
AC
15732014-08-01 Eric Botcazou <ebotcazou@adacore.com>
1574
1575 * gcc-interface/ada-tree.h (DECL_BY_DESCRIPTOR_P): Delete.
1576 (DECL_FUNCTION_STUB): Likewise.
1577 (SET_DECL_FUNCTION_STUB): Likewise.
1578 (DECL_PARM_ALT_TYPE): Likewise.
1579 (SET_DECL_PARM_ALT_TYPE): Likewise.
1580 (TYPE_VAX_FLOATING_POINT_P): Delete.
1581 (TYPE_DIGITS_VALUE): Likewise.
1582 (SET_TYPE_DIGITS_VALUE): Likewise.
1583 * gcc-interface/gigi.h (standard_datatypes): Remove ADT_malloc32_decl.
1584 (malloc32_decl): Delete.
1585 (build_vms_descriptor): Likewise.
1586 (build_vms_descriptor32): Likewise.
1587 (fill_vms_descriptor): Likewise.
1588 (convert_vms_descriptor): Likewise.
1589 (TARGET_ABI_OPEN_VMS): Likewise.
1590 (TARGET_MALLOC64): Likewise.
1591 * gcc-interface/decl.c (add_parallel_type_for_packed_array): New.
1592 (gnat_to_gnu_entity): Call it to add the original type as a parallel
1593 type to the implementation type of a packed array type.
1594 <E_Procedure>: Remove now obsolete kludge.
1595 <E_Exception>: Delete obsolete comment.
1596 <object>: Small tweak.
1597 <E_Subprogram_Type>: Remove support for stub subprograms, as well as
1598 for the descriptor passing mechanism.
1599 (gnat_to_gnu_param): Likewise.
1600 * gcc-interface/misc.c (gnat_init_gcc_fp): Remove special case.
1601 (gnat_print_type): Adjust.
1602 * gcc-interface/trans.c (gigi): Remove obsolete initializations.
1603 (vms_builtin_establish_handler_decl): Delete.
1604 (gnat_vms_condition_handler_decl): Likewise.
1605 (establish_gnat_vms_condition_handler): Likewise.
1606 (build_function_stub): Likewise.
1607 (Subprogram_Body_to_gnu): Do not call above functions.
1608 (Call_to_gnu): Remove support for the descriptor passing mechanism.
1609 * gcc-interface/utils.c (make_descriptor_field): Delete.
1610 (build_vms_descriptor32): Likewise.
1611 (build_vms_descriptor): Likewise.
1612 (fill_vms_descriptor): Likewise.
1613 (convert_vms_descriptor64): Likewise.
1614 (convert_vms_descriptor32): Likewise.
1615 (convert_vms_descriptor): Likewise.
1616 * gcc-interface/utils.c (unchecked_convert): Likewise.
1617 * gcc-interface/utils2.c (maybe_wrap_malloc): Remove obsolete stuff.
1618
16192014-08-01 Eric Botcazou <ebotcazou@adacore.com>
1620
1621 * gcc-interface/trans.c (gigi): Use gnat_to_gnu_type for the exception
1622 type and get_unpadded_type for the longest FP type.
1623 (Attribute_to_gnu) <Machine>: Compare the precision of the types.
1624 (convert_with_check): Adjust formatting and remove FIXME.
1625
16262014-08-01 Eric Botcazou <ebotcazou@adacore.com>
1627
1628 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Signed_Integer_Subtype>:
1629 Do not convert the RM bounds to the base type.
1630 (E_Floating_Point_Subtype): Likewise.
1631 (E_Array_Subtype): Convert the bounds to the base type.
1632 * gcc-interface/trans.c (get_type_length): New function.
1633 (Attribute_to_gnu) <Range_Length>: Call it.
1634 <Length>: Likewise.
1635 (Loop_Statement_to_gnu): Convert the bounds to the base type.
1636 (gnat_to_gnu) <N_In>: Likewise.
1637 * gcc-interface/utils.c (make_type_from_size): Do not convert the RM
1638 bounds to the base type.
1639 (create_range_type): Likewise.
1640 (convert): Convert the bounds to the base type for biased types.
1641 * gcc-interface/utils2.c (compare_arrays): Convert the bounds to the
1642 base type.
1643
16442014-08-01 Eric Botcazou <ebotcazou@adacore.com>
1645
1646 * gcc-interface/trans.c (gnat_to_gnu) <N_Selected_Component>: Remove
1647 incorrect implicit type derivation.
1648 * gcc-interface/utils.c (max_size) <tcc_reference>: Convert the bounds
1649 to the base type.
1650
16512014-08-01 Hristian Kirtchev <kirtchev@adacore.com>
1652
1653 * sem_attr.adb (Analyze_Attribute): Preanalyze and resolve the
1654 prefix of attribute Loop_Entry.
1655 * sem_prag.adb (Analyze_Pragma): Verify the placement of pragma
1656 Loop_Variant with respect to an enclosing loop (if any).
1657 (Contains_Loop_Entry): Update the parameter profile and all
1658 calls to this routine.
1659 * sem_res.adb (Resolve_Call): Code reformatting. Do not ask
1660 for the corresponding body before determining the nature of the
1661 ultimate alias's declarative node.
1662
16632014-08-01 Robert Dewar <dewar@adacore.com>
1664
1665 * gnat1drv.adb, sem_ch4.adb: Minor reformatting.
1666
16672014-08-01 Robert Dewar <dewar@adacore.com>
1668
1669 * sem_eval.adb (Rewrite_In_Raise_CE): Don't try to reuse inner
1670 constraint error node since it is a list member.
1671
16722014-08-01 Robert Dewar <dewar@adacore.com>
1673
1674 * sem_warn.adb: Minor reformatting.
1675
16762014-08-01 Eric Botcazou <ebotcazou@adacore.com>
1677
1678 * einfo.adb (Underlying_Type): Return the underlying full view
1679 of a private type if present.
1680 * freeze.adb (Freeze_Entity):
1681 Build a single freeze node for partial, full and underlying full
1682 views, if any.
1683 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Private_Type>: Add a
1684 missing guard before the access to the Underlying_Full_View.
1685 * gcc-interface/trans.c (process_freeze_entity): Deal with underlying
1686 full view if present.
1687 * gcc-interface/utils.c (make_dummy_type): Avoid superfluous work.
1688
ecda544d
ES
16892014-08-01 Ed Schonberg <schonberg@adacore.com>
1690
1691 * sem_res.adb (Resolve_Entry_Call): When an entry has
1692 preconditions, the entry call is wrapped in a procedure call
1693 that incorporates the precondition checks. To prevent a double
1694 expansion, with possible duplication of extra formals, that
1695 procedure call must only be pre-analyzed and resolved. Expansion
1696 takes place upon return to the caller Resolve_Call.
1697
10671e7a
AC
16982014-08-01 Hristian Kirtchev <kirtchev@adacore.com>
1699
1700 * sem_res.adb (Resolve_Call): Do not perform
1701 GNATprove-specific inlining while within a generic.
1702
17032014-08-01 Ed Schonberg <schonberg@adacore.com>
1704
1705 * sem_ch4.adb (Analyze_Case_Expression): Handle properly a
1706 case expression with incompatible alternatives, when the first
1707 alternative is overloaded.
1708
b80a2b4b
AC
17092014-08-01 Ed Schonberg <schonberg@adacore.com>
1710
1711 * sem_res.adb (Check_Parameterless_Call): Use Relocate_Node
1712 to create the name of the parameterless call, rather than
1713 New_Copy, to preserve the tree structure when the name is a
1714 complex expression, e.g. a selected component that denotes a
1715 protected operation, whose prefix is itself a selected component.
1716
17172014-08-01 Ed Schonberg <schonberg@adacore.com>
1718
1719 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Use
1720 Unit_Declaration_Node to retrieve body when inlining, to handle
1721 properly subprogram child units.
1722
17232014-08-01 Robert Dewar <dewar@adacore.com>
1724
1725 * sem_attr.adb: Minor reformatting.
1726
4b259b2d
AC
17272014-08-01 Vincent Celier <celier@adacore.com>
1728
1729 * debug.adb: Minor documentation addition for -dn switch.
1730
17312014-08-01 Robert Dewar <dewar@adacore.com>
1732
1733 * sem_aggr.adb, exp_ch9.adb, sem_prag.adb, sem_util.adb,
1734 sem_attr.adb, sem_eval.ads, sem_cat.adb, sem_ch13.adb: Improve
1735 documentation of Is_Static_Expression vs Is_OK_Static_Expression.
1736 In several places, use the Is_OK version as suggested by the spec.
1737
17382014-08-01 Vincent Celier <celier@adacore.com>
1739
1740 * gnatcmd.adb: Revert last change which was not correct.
1741
17422014-08-01 Hristian Kirtchev <kirtchev@adacore.com>
1743
1744 * freeze.adb (Find_Constant): Ensure that the constant being
1745 inspected is still an object declaration (i.e. not a renaming).
1746
12c5f1ef
AC
17472014-08-01 Ed Schonberg <schonberg@adacore.com>
1748
1749 * sem_ch5.adb (Analyze_Loop_Parameter_Specification): a)
1750 An attribute_reference to Loop_Entry denotes an iterator
1751 specification: its prefix is an object, as is the case for 'Old.
1752 b) If the domain of iteration is an expression whose type has
1753 the Iterable aspect defined, this is an iterator specification.
1754
17552014-08-01 Robert Dewar <dewar@adacore.com>
1756
1757 * gnatcmd.adb: Minor reformatting.
1758
17592014-08-01 Robert Dewar <dewar@adacore.com>
1760
1761 * atree.ads (Info_Messages): New counter.
1762 * err_vars.ads: Minor comment update.
1763 * errout.adb (Delete_Warning_And_Continuations): Deal
1764 with new Info_Messages counter.
1765 (Error_Msg_Internal): ditto.
1766 (Delete_Warning): ditto.
1767 (Initialize): ditto.
1768 (Write_Error_Summary): ditto.
1769 (Output_Messages): ditto.
1770 (To_Be_Removed): ditto.
1771 * erroutc.adb (Delete_Msg): Deal with Info_Messages counter.
1772 (Compilation_Errors): ditto.
1773 * errutil.adb (Error_Msg): Deal with Info_Messages counter.
1774 (Finalize): ditto.
1775 (Initialize): ditto.
1776 * sem_prag.adb (Analyze_Pragma): Minor comment addition.
1777 * gnat_ugn.texi: Document that -gnatwe does not affect info
1778 messages.
1779
511c5197
AC
17802014-08-01 Robert Dewar <dewar@adacore.com>
1781
1782 * debug.adb: Document debug switch -gnatd.Z.
1783 * sem.adb (Semantics): Force expansion on in no or configurable
1784 run time mode.
1785
17862014-08-01 Ed Schonberg <schonberg@adacore.com>
1787
1788 * sem_ch5.adb (Analyze_Loop_Parameter_Specification): An
1789 unchecked conversion denotes an iterator specification. Such a
1790 conversion will be inserted in the context of an inlined call
1791 when needed, and its argument is always an object.
1792
a21d245c
AC
17932014-08-01 Robert Dewar <dewar@adacore.com>
1794
1795 * make.adb, makeutl.ads: Minor reformatting.
1796 * debug.adb, opt.ads: Clarify documentation of Front_End_Inlining and
1797 Back_End_Inlining.
1798
17992014-08-01 Tristan Gingold <gingold@adacore.com>
1800
1801 * gnatcmd.adb (GNATCmd): Set AAMP_On_Target using command name.
1802
0f345950
JM
18032014-08-01 Javier Miranda <miranda@adacore.com>
1804
1805 * gnat1drv.adb (Adjust_Global_Switches): Reverse meaning of
1806 -gnatd.z.
1807 * debug.adb: Updating documentation.
1808 * exp_ch6.adb (Expand_Call): Remove assertion.
1809
b330e3c8
AC
18102014-08-01 Robert Dewar <dewar@adacore.com>
1811
1812 * sem_aggr.adb, sem_ch3.adb, sem_ch5.adb, sem_util.adb,
1813 sem_res.adb: Minor reformatting.
1814
18152014-08-01 Vincent Celier <celier@adacore.com>
1816
1817 * make.adb (Initialize): Set Keep_Temporary_Files to True when
1818 -dn is specified.
1819 * makeusg.adb: Add line for new switch --keep-temp-files.
1820 * makeutl.ads (Keep_Temp_Files_Option): New constant String.
1821 * opt.ads (Keep_Temporary_Files): Document that it is also used
1822 by gnatmake and gprbuild.
1823 * switch-m.adb: Recognize new switch --keep-temp-files.
1824
24de083f
AC
18252014-08-01 Tristan Gingold <gingold@adacore.com>
1826
1827 * sem_ch9.adb (Analyze_Task_Type_Declaration): Move code from ...
1828 * exp_ch9.adb (Make_Task_Create_Call): ... here.
1829
18302014-08-01 Vincent Celier <celier@adacore.com>
1831
1832 * gnat1drv.adb: Do not try to get the target parameters when
1833 invoked with -gnats.
1834
18352014-08-01 Hristian Kirtchev <kirtchev@adacore.com>
1836
1837 * exp_ch7.adb (Find_Last_Init): Nothing to do for an object
1838 declaration subject to No_Initialization.
1839
18402014-08-01 Ed Schonberg <schonberg@adacore.com>
1841
1842 * sem_aggr.adb (Resolve_Array_Aggregate): Reject choice that
1843 is a subtype with dynamic predicates, or a non-static subtype
1844 with predicates.
1845 * sem_ch3.adb (Analyze_Number_Declaration): Reject qualified
1846 expression if subtype has a dynamic predicate.
1847 (Constrain_Index): Reject subtype indication if subtype mark
1848 has predicates.
1849 (Inerit_Predicate_Flags): Inherit Has_Predicates as well.
1850 (Make_Index): If index is a subtype indication, itype inhereits
1851 predicate flags for subsequent testing.
1852 * sem_ch5.adb (Analyze_Loop_Parameter_Specification): New
1853 procedure Check_Predicate_Use, to reject illegal uses of domains
1854 of iteration that have dynamic predicates.
1855 * sem_res.adb (Resolve_Slice): Reject slices given by a subtype
1856 indication to which a predicate applies.
1857 * sem_util.adb (Bad_Predicated_Subtype_Use): Add guard to
1858 prevent cascaded errors when subtype is invalid.
1859
73999267
AC
18602014-08-01 Robert Dewar <dewar@adacore.com>
1861
1862 * sem_ch10.adb: Minor reformatting.
1863
18642014-08-01 Ed Schonberg <schonberg@adacore.com>
1865
1866 * sem_ch6.adb (Same_Generic_Actual): Make function symmetric,
1867 because either type may be a subtype of the other.
1868
18692014-08-01 Vincent Celier <celier@adacore.com>
1870
1871 * makeusg.adb: Add documentation for debug switch -dn.
1872
18732014-08-01 Ed Schonberg <schonberg@adacore.com>
1874
1875 * sem_dim.adb (Process_Minus, Process_Divide): Label dimension
1876 expression with standard operator and type, for pretty-printing
1877 use, when in ASIS_Mode. When generating code dimensional analysis
1878 is not involved and dimension expressions are handled statically,
1879 and other operators are resolved in the usual way.
1880
18812014-08-01 Ed Schonberg <schonberg@adacore.com>
1882
1883 * sem_ch3.adb (Build_Derived_Record_Type): Remove setting of
1884 Parent_Subtype in ASIS mode, leads to several failures.
1885 * sem_ch4.adb (Analyze_Selected_Component): In an instance,
1886 if the prefix is a type extension, check whether component is
1887 declared in the parent type, possibly in a parent unit. Needed
1888 in ASIS mode when Parent_Subtype is not set.
1889
885e570a
AC
18902014-08-01 Robert Dewar <dewar@adacore.com>
1891
1892 * sem_prag.adb: Minor reformatting.
1893 * s-regpat.adb: Minor reformatting.
1894 * sem_ch3.adb (Analyze_Object_Declaration): Do not set
1895 Treat_As_Volatile on constants.
1896
18972014-08-01 Tristan Gingold <gingold@adacore.com>
1898
1899 * exp_ch9.adb (Make_Task_Create_Call): Improve error message.
1900
19012014-08-01 Ed Schonberg <schonberg@adacore.com>
1902
1903 * sem_ch10.adb (Analyze_Compilation_Unit): Do not place a
1904 warning on a with_clause created for the renaming of a parent
1905 unit in an explicit with_clause.
1906
8894aa20
AC
19072014-08-01 Ed Schonberg <schonberg@adacore.com>
1908
1909 * sem_ch13.adb (Analyze_Aspect_Specifications, case Aspect_Import):
1910 Set Is_Imported flag at once, to simplify subsequent legality
1911 checks. Reject the aspect on an object whose declaration has an
1912 explicit initial value.
1913 * sem_prag.adb (Process_Import_Or_Interface): Use original node
1914 to check legality of an initial value for an imported entity.
1915 Set Is_Imported flag in case of error to prevent cascaded errors.
1916 Do not set the Is_Imported flag if the pragma comes from an
1917 aspect, because it is already done when analyzing the aspect.
1918
19192014-08-01 Emmanuel Briot <briot@adacore.com>
1920
1921 * g-regpat.adb (Parse): Add support for non-capturing parenthesis.
1922
7b4ebba5
AC
19232014-08-01 Robert Dewar <dewar@adacore.com>
1924
1925 * sem_ch7.adb, einfo.adb, einfo.ads, sem_ch13.adb: Minor change of
1926 identifier name.
1927
19282014-08-01 Hristian Kirtchev <kirtchev@adacore.com>
1929
1930 * sem_ch3.adb (Analyze_Object_Contract): Enable the volatility
1931 checks when the related variable comes from source.
1932 * sem_res.adb (Resolve_Actuals): Enable the volatility checks
1933 when the related actual parameter comes from source. Update comment.
1934 * freeze.adb (Freeze_Record_Type): Do not freeze the designated
1935 type of an array of pointers when the designated type is
1936 class-wide and its root type is the record being currently frozen.
1937
19382014-08-01 Ed Schonberg <schonberg@adacore.com>
1939
1940 * sem_ch5.adb (Analyze_Iterator_Specification): Preserve Ekind
1941 of renaming declaration created for domain of iteration.
1942 * sem_aggr.adb (Resolve_Array_Aggregate): Better placement
1943 for error messages on aggregates whose index subtypes have
1944 predicates. The new placement avoids posting messages on previous
1945 subtype declarations rather than on the aggregate itself.
1946 * sem_disp.adb (Is_Inherited_Public_Operation): New predicate for
1947 Add_Dispatching_Operation, to handle properly the overriding of
1948 the predefined operations on controlled types, when the partial
1949 view of a type is not visibly controlled.
1950
19512014-08-01 Ben Brosgol <brosgol@adacore.com>
1952
1953 * gnat_ugn.texi: Add tutorial on portable fixed-point types as an
1954 appendix.
1955
79859568
AC
19562014-08-01 Hristian Kirtchev <kirtchev@adacore.com>
1957
1958 * einfo.adb (Is_Hidden_Non_Overridden_Subprogram): Remove the
1959 assertion check as the attribute is defined for all entities.
1960 (Set_Is_Hidden_Non_Overridden_Subprogram): Remove the assertion
1961 check as the attribute is defined for all entities.
1962 * einfo.ads Update the documentation of attribute
1963 Is_Hidden_Non_Overridden_Subprogram.
1964 * sem_ch7.adb (Install_Package_Entity): No need to check the
1965 entity kind of the Id.
1966 * sem_ch13.adb (Hide_Matching_Homograph): Update the comment on
1967 usage. Ensure that the homographs are of the same entity kind
1968 and not fully conformant.
1969 (Hide_Non_Overridden_Subprograms): Update the comment on usage.
1970
19712014-08-01 Robert Dewar <dewar@adacore.com>
1972
1973 * inline.adb: Minor code reorganization.
1974 * sem_ch12.adb, s-tasdeb.ads: Minor reformatting.
1975
3fe5cead
AC
19762014-08-01 Robert Dewar <dewar@adacore.com>
1977
1978 * inline.adb, s-os_lib.ads: Minor reformatting.
1979
19802014-08-01 Arnaud Charlet <charlet@adacore.com>
1981
1982 * s-tasdeb.ads, s-tasdeb.adb (Master_Hook, Master_Completed_Hook): New.
1983 * s-tassta.adb (Task_Wrapper, Vulnerable_Complete_Master): Call new
1984 hooks.
1985
39521a94
AC
19862014-08-01 Yannick Moy <moy@adacore.com>
1987
1988 * inline.adb (Cannot_Inline): Issue info message instead of
1989 warning for subprograms not inlined in GNATprove mode.
1990 * sem_res.adb (Resolve_Call): Take body into account for deciding
1991 whether subprogram can be inlined in GNATprove mode or not.
1992
19932014-08-01 Claire Dross <dross@adacore.com>
1994
1995 * exp_util.ads (Get_First_Parent_With_Ext_Axioms_For_Entity): Renaming
1996 of Get_First_Parent_With_External_Axiomatization_For_Entity for
1997 shorter.
1998 * sem_ch12.adb (Analyze_Associations): Only call Build_Wrapper
1999 for parameters of packages with external axiomatization.
2000
4d49c6e1
AC
20012014-08-01 Robert Dewar <dewar@adacore.com>
2002
2003 * sem_res.adb: Minor comment addition.
2004
20052014-08-01 Arnaud Charlet <charlet@adacore.com>
2006
2007 * s-crtl.ads, i-cstrea.ads, adaint.c, adaint.h, osint.adb,
2008 s-fileio.adb (__gnat_fopen, __gnat_freopen): Remove vms_form parameter,
2009 no longer used.
2010 * s-os_lib.ads: Minor reformatting.
2011
d18bbd25
AC
20122014-08-01 Arnaud Charlet <charlet@adacore.com>
2013
2014 * exp_attr.adb (Is_Inline_Floating_Point_Attribute): Restore more
2015 completely previous code since only GCC back-ends are prepared
2016 to handle e.g. 'Machine attribute.
2017 * targparm.adb, targparm.ads: Remove remaining refs and
2018 handling of OpenVMS_On_Target, VAX_Float_On_Target and
2019 RTX_RTSS_Kernel_Module_On_Target.
2020 * hostparm.ads (OpenVMS, Max_Debug_Name_Length): Removed,
2021 no longer used.
2022
20232014-08-01 Robert Dewar <dewar@adacore.com>
2024
2025 * exp_dist.adb, exp_attr.adb: Minor reformatting.
2026 * sem_ch3.adb, mlib-tgt-specific-hpux.adb, a-direct.ads,
2027 a-synbar-posix.adb, exp_ch9.adb, sem_ch10.adb, sem_prag.adb,
2028 sem_ch12.adb, sem.ads, sem_res.adb, s-exctra.adb, s-soflin.ads,
2029 g-alveop.ads, sem_ch8.adb, vxaddr2line.adb, sem_cat.ads: Remove
2030 improper use of shall.
2031
37368818
RD
20322014-08-01 Robert Dewar <dewar@adacore.com>
2033
2034 * sem_aggr.adb, exp_atag.adb, layout.adb, nlists.adb, nlists.ads,
2035 exp_attr.adb, exp_ch9.adb, par-ch12.adb, exp_aggr.adb,
2036 exp_ch3.adb: Minor reformatting & code reorganization.
2037
e08add8e
AC
20382014-08-01 Robert Dewar <dewar@adacore.com>
2039
2040 * gnat_rm.texi: Remove VMS specific rules for pragma Ident.
2041 * Makefile.rtl, adaint.c, gnat_rm.texi, s-asthan.adb, s-asthan.ads,
2042 s-filofl.ads, s-fishfl.ads, s-fvadfl.ads, s-fvaffl.ads, s-fvagfl.ads,
2043 s-po32gl.adb, s-po32gl.ads, s-vaflop.adb, s-vaflop.ads, s-vmexta.adb,
2044 s-vmexta.ads, sem_vfpt.adb, sem_vfpt.ads, socket.c: Remove VMS specific
2045 code.
2046 * gcc-interface/decl.c, gcc-interface/Makefile.in,
2047 gcc-interface/Make-lang.in: Ditto. Also remove refs to rTX.
2048
20492014-08-01 Pascal Obry <obry@adacore.com>
2050
2051 * s-os_lib.ads: Rename File_Size to Large_File_Size.
2052
21c51f53
RD
20532014-08-01 Robert Dewar <dewar@adacore.com>
2054
2055 * a-numaux-vxworks.ads, a-numaux-x86.adb, a-numaux-x86.ads,
2056 a-numaux-darwin.adb, a-numaux-darwin.ads, a-numaux.ads,
2057 a-numaux-libc-x86.ads: Fix bad package header comments.
2058 * elists.ads, elists.adb (Append_New_Elmt): New procedure.
2059 * gnat_rm.texi, a-calend.adb, gnatcmd.adb, einfo.adb, einfo.ads,
2060 checks.adb, sem_prag.adb, sem_prag.ads, rtsfind.ads, freeze.adb,
2061 sem_util.adb, sem_attr.adb, exp_dbug.adb, exp_dbug.ads, gnat1drv.adb,
2062 targparm.adb, targparm.ads, exp_ch6.adb, switch-b.adb, s-shasto.ads,
2063 stand.ads, s-auxdec.ads, opt.adb, opt.ads, mlib-tgt.ads, s-fatgen.adb,
2064 s-fatgen.ads, system.ads, snames.ads-tmpl, s-stalib.ads,
2065 s-os_lib.adb: Remove VMS-specific code.
2066
78433fec
AC
20672014-08-01 Arnaud Charlet <charlet@adacore.com>
2068
2069 * exp_attr.adb (Is_Inline_Floating_Point_Attribute): Revert to
2070 previous state in CodePeer_Mode.
2071
09c954dc
AC
20722014-08-01 Robert Dewar <dewar@adacore.com>
2073
2074 * hostparm.ads: Put back definition of OpenVMS as False to aid
2075 the transition process.
2076 * sem_ch7.adb: Minor reformatting.
2077 * prj-env.adb: Minor code fix.
2078 * gnat_rm.texi: Complete previous change.
2079 * sem_ch3.adb: Minor reformatting.
2080 * sem_ch6.adb: Minor reformatting.
2081 * sem_elab.adb: Minor reformatting.
2082 * exp_strm.adb: Complete previous change.
2083
20842014-08-01 Vincent Celier <celier@adacore.com>
2085
2086 * sem_warn.adb (Warn_On_Unreferenced_Entity): Do not issue a
2087 warning when a constant is unreferenced and its type has pragma
2088 Unreferenced_Objects.
2089
20902014-08-01 Hristian Kirtchev <kirtchev@adacore.com>
2091
2092 * einfo.adb: Flag2 is now known as
2093 Is_Hidden_Non_Overridden_Subprogram.
2094 (Is_Hidden_Non_Overridden_Subprogram): New routine.
2095 (Set_Is_Hidden_Non_Overridden_Subprogram): New routine.
2096 (Write_Entity_Fields): Output Flag2.
2097 * einfo.ads: New attribute Is_Hidden_Non_Overridden_Subprogram
2098 along with occurrences in entities.
2099 (Is_Hidden_Non_Overridden_Subprogram): New routine and pragma Inline.
2100 (Set_Is_Hidden_Non_Overridden_Subprogram): New routine
2101 and pragma Inline.
2102 * sem_ch7.adb (Install_Package_Entity): Do not enter implicitly
2103 declared non-overriden homographs into visibility.
2104 * sem_ch13.adb (Freeze_Entity_Checks): Hide all
2105 implicitly declared non-overriden homographs.
2106 (Hide_Non_Overridden_Subprograms): New routine.
2107
78f8727c
RD
21082014-08-01 Robert Dewar <dewar@adacore.com>
2109
2110 * snames.ads-tmpl, s-os_lib.adb, s-os_lib.ads, s-fileio.adb: Remove
2111 VMS-specific code.
2112 * prj-conf.adb: Minor reformatting.
2113 * xr_tabls.adb (Read_File): Restore code which was enabled on
2114 non VMS platforms before.
2115 * prj-env.adb (Initialize_Default_Project_Path): Ditto.
2116 * sem_ch5.adb: Minor reformatting.
2117 * lib-writ.adb, lib-writ.ads, bindgen.adb, sem_vfpt.adb,
2118 sem_vfpt.ads, ali.adb, ali.ads, opt.ads, bcheck.adb, exp_strm.adb:
2119 Remove VMS-specific code.
2120
7a5b62b0
AC
21212014-08-01 Vincent Celier <celier@adacore.com>
2122
2123 * make.adb (Await_Compile): Remove loop that was only needed
2124 for VMS.
2125
21262014-08-01 Robert Dewar <dewar@adacore.com>
2127
2128 * a-calcon.ads, a-direct.adb, a-dirval-mingw.adb, a-dirval.adb,
2129 a-dirval.ads, a-except-2005.adb, a-excpol-abort.adb,
2130 a-numaux-darwin.ads, a-numaux.ads, bindgen.adb, bindusg.adb,
2131 einfo.adb, einfo.ads, err_vars.ads, errout.ads, errutil.adb,
2132 exp_ch3.adb, exp_ch4.adb, exp_ch7.adb, exp_ch7.ads, fname-uf.adb,
2133 fname.adb, fname.ads, freeze.adb, g-debpoo.adb, g-dirope.ads,
2134 g-excact.ads, g-expect.ads, g-socket.adb, g-socket.ads, g-sothco.ads,
2135 g-traceb.ads, gnat_rm.texi, gnatlink.adb, gnatls.adb, i-cstrea.adb,
2136 krunch.adb, krunch.ads, layout.adb, lib-util.adb, make.adb,
2137 mlib.adb, osint-b.adb, osint-b.ads, osint-c.adb, osint.adb,
2138 osint.ads, output.ads, par.adb, prj-conf.adb, prj-env.adb,
2139 prj-makr.adb, prj-nmsc.adb, prj.adb, prj.ads, repinfo.adb, rtsfind.adb,
2140 rtsfind.ads, s-excmac-gcc.ads, s-fatgen.adb, s-mastop.ads,
2141 s-parame-ae653.ads, s-parame-hpux.ads, s-parame-vxworks.ads,
2142 s-parame.ads, s-soflin.ads, s-stoele.adb, s-tasini.adb,
2143 s-taspri-dummy.ads, s-taspri-hpux-dce.ads, s-taspri-mingw.ads,
2144 s-taspri-posix-noaltstack.ads, s-taspri-posix.ads,
2145 s-taspri-solaris.ads, s-taspri-vxworks.ads, s-trasym.ads,
2146 sem_ch12.adb, sem_ch4.adb, sem_eval.adb, sem_intr.adb, sem_mech.adb,
2147 sem_mech.ads, sem_prag.adb, sem_res.adb, sem_util.adb, sem_util.ads,
2148 sinfo.adb, sinfo.ads, sinput-c.adb, symbols.ads, targparm.adb,
2149 treepr.adb, types.ads, xr_tabls.adb, xr_tabls.ads: Remove VMS
2150 specific code and comments.
2151
21522014-08-01 Ed Schonberg <schonberg@adacore.com>
2153
2154 * sem_ch5.adb (Analyze_Iterator_Specification): New procedure
2155 Check_Reverse_Iteration, to verify the legality of the Reverse
2156 indicator on various container types, and to detect illegal
2157 reverse iterations on containers that only supoort forward
2158 iteration.
2159
935a9145
AC
21602014-08-01 Vincent Celier <celier@adacore.com>
2161
2162 * gnatcmd.adb: Remove the VMS specific stuff. Integrate in
2163 procedure GNATCmd the relevant declarations from packages VMS_Cmds
2164 and VMS_Conv.
2165 * gnatcmd.ads: Update comments to remove any trace of VMS
2166
21672014-08-01 Ed Schonberg <schonberg@adacore.com>
2168
2169 * sem_ch12.adb: sem_ch12.adb (Build_Wrapper): Capture entity for
2170 defaulted actual that is an operator, before building wrapper
2171 for it in GNATprove mode. Restrict construction of wrapper to
2172 actuals that are operators.
2173
21742014-08-01 Vincent Celier <celier@adacore.com>
2175
2176 * vms_conv.adb, vms_conv.ads, vms_data.ads, vms_cmds.ads: Remove VMS
2177 specific packages no longer needed.
2178
21792014-08-01 Pascal Obry <obry@adacore.com>
2180
2181 * s-os_lib.ads (System.CRTL): Move with clause to body.
2182 (File_Size): New type.
2183 (File_Length64): Use it.
2184 (File_Length): Restore previous spec returning a Long_Integer.
2185 * s-os_lib.adb (System.CRTL): Move with clause here.
2186
21872014-08-01 Vincent Celier <celier@adacore.com>
2188
2189 * mlib-prj.adb: Update comments to remove any mention of VMS.
2190
24228312
AC
21912014-08-01 Arnaud Charlet <charlet@adacore.com>
2192
2193 * ug_words, xgnatugn.adb, gcc-interface/Make-lang.in: Remove
2194 xgnatugn.adb and ug_words.
2195
21962014-08-01 Eric Botcazou <ebotcazou@adacore.com>
2197
2198 * exp_attr.adb (Expand_N_Attribute_Reference): Check whether
2199 expansion can be avoid for Machine, Model and Rounding.
2200 (Is_Inline_Floating_Point_Attribute): Return true for Machine
2201 & Model, as well as Rounding if wrapped in a conversion to an
2202 integer type.
2203 * sem_res.adb (Simplify_Type_Conversion): Deal with Rounding as well.
2204 * gcc-interface/gigi.h (fp_arith_may_widen): Declare.
2205 * gcc-interface/utils.c (fp_arith_may_widen): New global variable.
2206 * gcc-interface/misc.c (enumerate_modes): Compute it.
2207 * gcc-interface/trans.c (FP_ARITH_MAY_WIDEN): Delete.
2208 (lvalue_required_for_attribute_p): Deal with Descriptor_Size,
2209 Machine and Model.
2210 (Attribute_to_gnu) <Attr_Model>: New case.
2211 <Attr_Machine>): Likewise.
2212 (convert_with_check): Test
2213 fp_arith_may_widen variable.
2214
22152014-08-01 Pascal Obry <obry@adacore.com>
2216
2217 * adaint.h (GNAT_FOPEN): New definition for Windows.
2218 (GNAT_OPEN): Likewise.
2219 (GNAT_STAT): Likewise.
2220 (GNAT_FSTAT): Likewise.
2221 (GNAT_LSTAT): Likewise.
2222 (GNAT_STRUCT_STAT): Likewise.
2223 * adaint.c (__gnat_stat): Fix computation of file size for
2224 Windows.
2225
22262014-08-01 Vincent Celier <celier@adacore.com>
2227
2228 * Makefile.rtl: Minor comment update.
2229
22302014-08-01 Vincent Celier <celier@adacore.com>
2231
2232 * Make-generated.in: Remove dependencies for vms-help.
2233
d77cfab2
AC
22342014-08-01 Gary Dismukes <dismukes@adacore.com>
2235
2236 * makeutl.ads, opt.ads: Minor grammar fixes.
2237 * makeutl.adb: Minor code reorganization.
2238
22392014-08-01 Arnaud Charlet <charlet@adacore.com>
2240
2241 * gcc-interface/Makefile.in, gcc-interface/Make-lang.in,
2242 gnatsym.adb: Remove gnatsym (VMS only tool).
2243
22442014-08-01 Ben Brosgol <brosgol@adacore.com>
2245
2246 * gnat_ugn.texi, projects.texi, xgnatugn.adb: Removed all VMS
2247 conditionalization from gnat_ugn.texi and projects.texi, and updated
2248 (considerably simplified) xgnatugn.adb, to be removed soon.
2249
3849c246
VC
22502014-08-01 Vincent Celier <celier@adacore.com>
2251
2252 * debug.adb: Remove doc for gnatmake/gprbuild switch -ds.
2253 * make.adb (List_Bad_Compilations): Use Opt.No_Exit_Message
2254 instead of Debug.Debug_Flag_S.
2255 * makeutl.adb (Finish_Program, Fail_Program): Use Opt flag
2256 No_Exit_Message instead of Debug.Debug_Flag_S to suppress exit
2257 error messages.
2258 * makeutl.ads (No_Exit_Message_Option): New constant string
2259 for switch --no-exit-message.
2260 * opt.ads (No_Exit_Message): New Boolean flag, defaulted to False.
2261 * switch-m.adb (Scan_Make_Switches): Recognize new switch
2262 --no-exit-message.
2263
16b10ccc
AC
22642014-08-01 Arnaud Charlet <charlet@adacore.com>
2265
2266 * exp_vfpt.adb, exp_vfpt.ads: Removed, no longer used.
2267 * gcc-interface/Make-lang.in: Remove exp_vfpt.o
2268
22692014-08-01 Javier Miranda <miranda@adacore.com>
2270
2271 * inline.ads (Inlined_Calls, Backend_Calls,
2272 Backend_Inlined_Subps, Backend_Not_Inlined_Subps): Declarations
2273 moved to inline.adb (Cannot_Inline): Update documentation.
2274 (Check_And_Build_Body_To_Inline): Renamed.
2275 (List_Inlining_Info): Subprogram moved here from package exp_ch6.
2276 * inline.adb (Check_Inlining_Restrictions): New local variable.
2277 (Inlined_Calls, Backend_Calls, Backend_Inlined_Subps,
2278 Backend_Not_Inlined_Subps): Declarations moved here
2279 from inline.ads (Number_Of_Statements): Removed.
2280 (Remove_Pragmas): Avoid duplicated version of this subprogram.
2281 (Build_Body_To_Inline): Code cleanup.
2282 (Build_Body_To_Inline.Has_Excluded_Statament): Removed.
2283 (Check_And_Build_Body_To_Inline): Renamed. Code cleanup.
2284 (Check_Body_To_Inline): Removed.
2285 (Generate_Body_To_Inline): Renamed as Generate_Subprogram_Body.
2286 (Has_Excluded_Declaration): No action if not
2287 Check_Inlining_Restrictions.
2288 (Has_Excluded_Statement): No action if not Check_Inlining_Restrictions.
2289 (Initialize): Initialize the lists of inlined calls and subprograms.
2290 (List_Inlining_Info): Subprogram moved here from package exp_ch6.
2291 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Update call
2292 to Check_And_Build_Body_To_Inline since it has been renamed as
2293 Check_And_Split_Unconstrained_Function
2294 * exp_ch6.ad[sb] (List_Inlining_Info): Subprogram moved to
2295 package inline.
2296 * gnat1drv.adb Update call to Inline.List_Inlining_Info.
2297
22982014-08-01 Vincent Celier <celier@adacore.com>
2299
2300 * debug.adb: Add documentation for new debug switch -ds.
2301 * make.adb (List_Bad_Compilations): Do not issue any message
2302 when switch -ds is specified.
2303 * makeutl.adb (Fail_Program): Do not issue any message when
2304 -ds is specified.
2305 (Finish_Program): Ditto.
2306
23072014-08-01 Robert Dewar <dewar@adacore.com>
2308
2309 * s-exnint.adb, s-exnint.ads, s-wwdwch.ads, s-carsi8.ads,
2310 s-casi32.ads, indepsw.adb, a-timoau.ads, s-explli.adb, s-explli.ads,
2311 s-casi16.ads, s-powtab.ads, g-wistsp.ads, a-ztmoau.adb,
2312 indepsw-gnu.adb, s-imgllb.ads, types.adb, gnat.ads, s-proinf.adb,
2313 indepsw-aix.adb, s-caun64.ads, s-imgllw.ads, s-traces-default.adb,
2314 s-vxwork-x86.ads, s-expllu.adb, s-exnlli.adb, s-exnlli.ads,
2315 s-traces.adb, widechar.ads, stand.adb, s-expint.adb,
2316 s-tratas-default.adb, s-expint.ads, s-geveop.ads, s-caun32.ads,
2317 s-expuns.adb, s-mantis.adb, s-mantis.ads, s-caun16.ads, s-tasinf.adb,
2318 s-memcop.ads, s-dsaser.ads, s-imgbiu.ads, a-szmzco.ads, g-strspl.ads,
2319 s-casi64.ads, g-zstspl.ads, indepsw-mingw.adb, tree_io.adb,
2320 s-boarop.ads, uname.ads, s-fore.adb, s-fore.ads, g-timsta.adb,
2321 g-timsta.ads, s-assert.adb, s-vector.ads, s-tratas.adb,
2322 s-tratas.ads: Minor fix to copyright notices.
2323
23242014-08-01 Eric Botcazou <ebotcazou@adacore.com>
2325
2326 * sinfo.ads: Remove long obsolete comment.
5e01ce12
ES
23272014-08-01 Ed Schonberg <schonberg@adacore.com>
2328
2329 * sem_util.adb: Add guard to setting of No_Predicate_On_Actual.
2330 * sem_ch3.adb: Minor reformatting.
2331
8616f0a2
PO
23322014-08-01 Pascal Obry <obry@adacore.com>
2333
2334 * cstreams.c: Only enable large file support on know supported
2335 platforms. Add missing defines/includes.
2336
a6282852
ES
23372014-08-01 Ed Schonberg <schonberg@adacore.com>
2338
2339 * einfo.ads, einfo.adb New flags No_Predicate_On_Actual and
2340 No_Dynamic_Predicate_On_Actual, to enforce the generic contract
2341 on generic units that contain constructs that forbid subtypes
2342 with predicates.
2343 * sem_ch3.adb (Analyze_Subtype_Declaration, Process_Subtype):
2344 Inherit flags indicating the presence of predicates in subtype
2345 declarations with and without constraints.
2346 (Inherit_Predicate_Flags): Utility for the above.
2347 * sem_util.adb (Bad_Predicated_Subtype_Use): In a generic context,
2348 indicate that the actual cannot have predicates, and preserve
2349 warning. In an instance, report error if actual has predicates
2350 and the construct appears in a package declaration.
2351 * sem_ch12.adb (Diagnose_Predicated_Actual): Report error
2352 for an actual with predicates, if the corresponding formal
2353 carries No_Predicate_On_Actual or (in the case of a loop)
2354 No_Dynamic_Predicate_On_Actual.
2355 * sem_ch13.adb (Build_Predicate_Functions); Do not build a
2356 Static_Predicate function if the type is non-static (in the
2357 presence of previous errors),
2358 * sem_ch5.adb (Analyze_Loop_Parameter_Specification): Set flag
2359 No_Dynamic_Predicate_On_Actual in a generic context, to enforce
2360 generic contract on actuals that cannot have predicates.
2361
0ef40c64
PO
23622014-08-01 Pascal Obry <obry@adacore.com>
2363
2364 * a-direct.adb (C_Size): Returns an int64.
2365 * osint.adb (System.CRTL): New with clause.
2366 (File_Length.Internal): Returns an int64.
2367 * s-os_lib.ads (File_Length): Returns an int64.
2368
ea0c8cfb
RD
23692014-08-01 Robert Dewar <dewar@adacore.com>
2370
2371 * gnatchop.adb, gnatcmd.adb, make.adb, mlib-prj.adb, bindgen.adb,
2372 mlib.ads, butil.adb, clean.adb, binde.adb, gnatls.adb, gnatname.adb,
2373 osint.adb, krunch.adb: Minor reformatting.
2374
23752014-08-01 Robert Dewar <dewar@adacore.com>
2376
2377 * inline.adb, inline.ads, fe.h, einfo.adb, einfo.ads, sem_util.adb,
2378 sem_util.ads, exp_ch4.adb, exp_ch11.adb, exp_ch6.adb, cstand.adb,
2379 sem_mech.adb, sem_ch6.adb, sem_ch8.adb, sem_ch11.adb, snames.ads-tmpl:
2380 Remove VMS-specific code.
f1a85fe7 2381 * gcc-interface/decl.c, gcc-interface/trans.c: Ditto.
ea0c8cfb 2382
62883e6b
AC
23832014-08-01 Arnaud Charlet <charlet@adacore.com>
2384
2385 * binde.adb, bindgen.adb, butil.adb, clean.adb, gnatbind.adb,
2386 gnatchop.adb, gnatcmd.adb, gnatls.adb, gnatname.adb, krunch.adb,
2387 make.adb, makeutl.adb, memtrack.adb, mlib-prj.adb, mlib.adb,
2388 mlib.ads, tempdir.adb: Remove VMS handling.
2389
148c744a
PO
23902014-08-01 Pascal Obry <obry@adacore.com>
2391
2392 * adaint.h, adaint.c (__gnat_file_length): Returns an __int64.
2393 (__gnat_named_file_length): Likewise.
2394 (__gnat_file_length_attr): Likewise.
2395 * a-direct.adb (C_Size): Use size_t as returned type.
2396 * osint.adb (File_Length): Adjust spec for Internal routine
2397 (returns size_t).
2398 * s-os_lib.adb (File_Length): Now returns a CRTL.size_t.
2399 (System.CRTL): With claused moved to spec.
2400 * s-os_lib.ads (System.CRTL): With clause moved to here.
2401
479f9059
PO
24022014-08-01 Pascal Obry <obry@adacore.com>
2403
2404 * adaint.h, adaint.c (__gnat_open): Added.
2405 * s-crtl.ads (open): Import __gnat_open for large file support.
2406
2b9fbec9
AC
24072014-08-01 Robert Dewar <dewar@adacore.com>
2408
2409 * sem_case.adb (Dup_Choice): Improve message for integer constants.
2410
24112014-08-01 Arnaud Charlet <charlet@adacore.com>
2412
2413 * gnatlink.adb: Remove special handling of VMS, RTX and JVM.
2414
24152014-08-01 Pascal Obry <obry@adacore.com>
2416
2417 * adaint.h (GNAT_OPEN): Defines as open64 where supported.
2418 * adaint.c (GNAT_OPEN): Uses new macro where needed.
2419
5cb7516d
EB
24202014-07-31 Eric Botcazou <ebotcazou@adacore.com>
2421
2422 * gcc-interface/utils.c (lookup_and_insert_pad_type): New function
53f3f4e3
EB
2423 extracted from...
2424 (maybe_pad_type): ...here. Call it to canonicalize the pad type.
5cb7516d
EB
2425 * gcc-interface/gigi.h: Update comment.
2426
6c26bac2
AC
24272014-07-31 Javier Miranda <miranda@adacore.com>
2428
2429 * debug.adb Remove documentation of -gnatd.k (no longer needed).
2430 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Code cleanup.
2431 * inline.ads (Backend_Inlined_Subps): New
2432 Elist. (Backend_Not_Inlined_Subps): New Elist.
2433 (Has_Excluded_Declaration): Declaration previously located in
2434 * inline.adb (Has_Excluded_Statement): Declaration previously
2435 located in inline.adb
2436 * inline.adb (Has_Single_Return): Moved out of
2437 Build_Body_To_Inline to avoid having duplicated code.
2438 (Number_Of_Statements): New subprogram.
2439 (Register_Backend_Inlined_Subprogram): New subprogram.
2440 (Register_Backend_Not_Inlined_Subprogram): New subprogram.
2441 (Add_Inlined_Subprogram): Register backend inlined subprograms and
2442 also register subprograms that cannot be inlined by the backend.
2443 (Has_Excluded_Declaration): Moved out of Build_Body_To_Inline
2444 to avoid having duplicated code. Replace occurrences of
2445 Debug_Flag_Dot_K by Back_End_Inlining.
2446 * sem_res.adb (Resolve_Call): Code cleanup.
2447 * exp_ch6.adb (Expand_Call): Complete previous patch. Replace
2448 occurrence of Debug_Flag_Dot_K by Back_End_Inlining.
2449 (List_Inlining_Info): Add listing of subprograms passed to the
2450 backend and listing of subprograms that cannot be inlined by
2451 the backend.
2452 * sem_ch12.adb, sem_ch3.adb Replace occurrences of
2453 Debug_Flag_Dot_K by Back_End_Inlining.
2454
24552014-07-31 Robert Dewar <dewar@adacore.com>
2456
2457 * nlists.ads: Minor code fix (remove unwise Inline for
2458 List_Length).
2459
80211802
AC
24602014-07-31 Arnaud Charlet <charlet@adacore.com>
2461
2462 * einfo.adb: Remove VMS specific code.
2463 * exp_attr.adb: Remove VAX specific code.
2464 * set_targ.adb: Remove handling of VAX_Float.
2465 * sem_vfpt.adb: Remove references to Vax_Native.
2466 * sem_attr.adb (Is_VAX_Float): Remove ref to VAX_Native.
2467
24682014-07-31 Robert Dewar <dewar@adacore.com>
2469
2470 * sem_ch4.adb: Minor reformatting.
2471
3f1be5be
AC
24722014-07-31 Arnaud Charlet <charlet@adacore.com>
2473
2474 * gcc-interface/trans.c, gcc-interface/misc.c: Remove references
2475 to VMS. Misc clean ups.
6c26bac2 2476 * gcc-interface/Makefile.in (gnatlib-shared-vms): Remove.
3f1be5be 2477
ba0c6e47
RD
24782014-07-31 Robert Dewar <dewar@adacore.com>
2479
2480 * cstand.adb, einfo.adb, einfo.ads, errout.adb, exp_attr.adb,
2481 exp_prag.adb, frontend.adb, interfac.ads,
2482 par-prag.adb, s-auxdec.ads, s-filofl.ads, s-fishfl.ads, s-fvadfl.ads,
2483 s-fvaffl.ads, s-fvagfl.ads, s-vaflop.ads, sem_attr.adb, sem_attr.ads,
2484 sem_ch13.adb, sem_ch3.adb, sem_ch8.adb, sem_prag.adb, snames.adb-tmpl,
2485 snames.ads-tmpl: Remove obsolete VMS-specific code.
2486
f9648959
AC
24872014-07-31 Robert Dewar <dewar@adacore.com>
2488
2489 * sem_ch3.adb, sem_ch13.adb: Minor reformatting.
2490
24912014-07-31 Arnaud Charlet <charlet@adacore.com>
2492
2493 * a-intnam-linux.ads: Minor: update obsolete comments.
2494 * s-taasde.adb: Minor: fix comment header.
2495
24962014-07-31 Arnaud Charlet <charlet@adacore.com>
2497
2498 * s-auxdec-vms-ia64.adb, s-parame-vms-alpha.ads, s-asthan-vms-alpha.adb,
2499 s-tpopde-vms.adb, s-mastop-vms.adb, s-tpopde-vms.ads, s-taprop-vms.adb,
2500 mlib-tgt-vms_common.adb, mlib-tgt-vms_common.ads, s-inmaop-vms.adb,
2501 g-enblsp-vms-alpha.adb, s-ransee-vms.adb, s-osprim-vms.adb,
2502 s-osprim-vms.ads, g-socthi-vms.adb, g-socthi-vms.ads, system-vms_64.ads,
2503 s-osinte-vms.adb, s-osinte-vms.ads, g-eacodu-vms.adb,
2504 s-vaflop-vms-alpha.adb, s-parame-vms-ia64.ads, a-dirval-vms.adb,
2505 a-caldel-vms.adb, mlib-tgt-specific-vms-alpha.adb, s-tasdeb-vms.adb,
2506 symbols-vms.adb, a-intnam-vms.ads, g-expect-vms.adb,
2507 symbols-processing-vms-alpha.adb, mlib-tgt-specific-vms-ia64.adb,
2508 s-traent-vms.adb, s-traent-vms.ads, i-cstrea-vms.adb, a-numaux-vms.ads,
2509 symbols-processing-vms-ia64.adb, s-interr-vms.adb, s-memory-vms_64.adb,
2510 s-memory-vms_64.ads, g-enblsp-vms-ia64.adb, s-taspri-vms.ads,
2511 s-auxdec-vms_64.ads, s-intman-vms.adb, s-intman-vms.ads,
2512 s-tpopsp-vms.adb, s-asthan-vms-ia64.adb, a-calend-vms.adb,
2513 a-calend-vms.ads, system-vms-ia64.ads, s-auxdec-vms-alpha.adb: Removed.
2514 * namet.h (Is_Non_Ada_Error): Remove.
2515
fd7215d7
AC
25162014-07-31 Robert Dewar <dewar@adacore.com>
2517
2518 * exp_util.adb, lib-writ.adb, sem_ch12.adb, s-direio.adb: Minor
2519 reformatting.
2520
25212014-07-31 Hristian Kirtchev <kirtchev@adacore.com>
2522
2523 * exp_attr.adb (Expand_Loop_Entry_Attribute): Update the comment
2524 which demonstrates the expansion of while loops subject to
2525 attribute 'Loop_Entry. The condition of a while loop along with
2526 related condition actions is now wrapped in a function. Instead
2527 of repeating the condition, the expansion now calls the function.
2528
25292014-07-31 Ed Schonberg <schonberg@adacore.com>
2530
2531 * sem_case.adb (Check_Against_Predicate): Correct off-by-one
2532 error when reporting of missing values in a case statement for
2533 a type with a static predicate.
2534 (Check_Choices): Reject a choice given by a subtype to which a
2535 Dynamic_Predicate applies.
2536 * sem_ch3.adb (Analyze_Subtype_Declaration): Inherit
2537 Has_Dynamic_Predicate_Aspect flag from parent.
2538
25392014-07-31 Ed Schonberg <schonberg@adacore.com>
2540
2541 * sem_ch13.adb (Analyze_Aspect_Specifications): A predicate
2542 cannot apply to a subtype of an incomplete type.
2543 (Is_Static_Choice): Treat an Others_Clause as static. The
2544 staticness of the expression and of the range are checked
2545 elsewhere.
2546
25472014-07-31 Pascal Obry <obry@adacore.com>
2548
2549 * adaint.h (__gnat_ftell64): Added.
2550 (__gnat_fseek64): Added.
2551 (__int64): Added.
2552 * cstreams.c (__int64): Removed.
2553
d1e0e148
AC
25542014-07-31 Pascal Obry <obry@adacore.com>
2555
2556 * a-stream.ads (Stream_Element_Offset): Now a signed 64bit type.
2557 * i-cstrea.ads, s-crtl.ads (fseek64): Offset is always a 64bit value.
2558 (ftell64): Always returns a 64bit value.
2559 * cstreams.c (int64): New definition.
2560 (_FILE_OFFSET_BITS): Set to 64 to enable 64bit offset support.
2561 (__gnat_ftell64): Always returns a 64bit value. The implemenation now
2562 uses ftello() on UNIX.
2563 (__gnat_fseek64): Offset is always a 64bit value. The
2564 implementation now uses fseeko() on UNIX.
2565 * a-ststio.adb, s-direio.adb (Set_Position): Simplify code,
2566 always use fseek64 to set the offset.
2567 (Size): Simplify code, always use fseek64/ftell64.
2568 * s-direio.ads (Count): Now an int64.
2569 * g-socket.ads (Vector_Element): Adjust definition for Length
2570 to be a size_t. This matches the C definition and avoid using
2571 a 64bit integer on 32bit platforms now that Count is always 64bit.
2572 * g-socthi-mingw.adb (Ada.Streams): Removed as not used anymore.
2573 (C_Recvmsg): Change some conversion to account for change in
2574 Vector_Element.
2575 (C_Sendmsg): Likewise.
2576
25772014-07-31 Robert Dewar <dewar@adacore.com>
2578
2579 * cstand.adb (Create_Standard): Remove handling of -gnatdm flag.
2580 * debug.adb: Remove documentation of -gnatdm flag.
2581 * gnat1drv.adb (Adjust_Global_Switches): Remove handling of
2582 -gnatdm flag.
2583
fce54763
AC
25842014-07-31 Arnaud Charlet <charlet@adacore.com>
2585
2586 * lib-writ.adb (Write_Unit_Information): Fix case where U =
2587 No_Unit.
2588
25892014-07-31 Claire Dross <dross@adacore.com>
2590
2591 * exp_util.adb, exp_util.ads
2592 (Get_First_Parent_With_External_Axiomatization_For_Entity):
2593 New routine to find the first parent of an entity with
2594 a pragma Annotate (GNATprove, External_Axiomatization).
2595 (Has_Annotate_Pragma_For_External_Axiomatization): New function
2596 to check if a package has a pragma Annotate (GNATprove,
2597 External_Axiomatization).
2598 * einfo.ads, einfo.adb (Is_Generic_Actual_Subprogram): New
2599 flag on the entity for the declaration created for a formal
2600 subprogram in an instance. This is a renaming declaration,
2601 or in GNATprove_Mode the declaration of an expression function
2602 that captures the axiomatization of the actual.
2603 * sem_ch6.adb (Analyze_Expression_Function): For a
2604 Generic_Actual_Subprogram, place body immediately after the
2605 declaration because it may be used in a subsequent declaration
2606 in the instance.
2607 * sem_ch12.adb (Build_Wrapper): Add code to handle instances where
2608 the actual is a function, not an operator. Handle functions with
2609 one and two parameters and binary and unary operators.
2610
26112014-07-31 Pascal Obry <obry@adacore.com>
2612
2613 * cstreams.c (__gnat_is_regular_file_fd): Removed.
2614 * adaint.c (__gnat_is_regular_file_fd): Added.
2615
7f3d273a
AC
26162014-07-31 Robert Dewar <dewar@adacore.com>
2617
2618 * exp_strm.adb: Minor reformatting.
2619
26202014-07-31 Ed Schonberg <schonberg@adacore.com>
2621
2622 * sem_ch12.adb (Build_Wrapper): New procedure, subsidiary to
2623 Analyze_Associations, to create a wrapper around operators that
2624 are actuals to formal subprograms. This is done in GNATProve
2625 mode in order to propagate the contracts of the operators to
2626 the body of the instance.
2627
f4510e5e
ES
26282014-07-31 Ed Schonberg <schonberg@adacore.com>
2629
2630 * sem_attr.adb (Analyze_Attribute, case 'Old): The reference is
2631 legal if within an aspect specification for a generic subprogram.
2632
d7a93e45
AC
26332014-07-31 Javier Miranda <miranda@adacore.com>
2634
2635 * gnat1drv.adb (Back_End_Inlining): Set to false if
2636 Suppress_All_Inlining is set.
2637 * debug.adb: Adding documentation for -gnatd.z.
2638 * inline.adb (Add_Inlined_Body): Extend the -gnatn2
2639 processing to -gnatn1 for calls to Inline_Always routines.
2640 (Add_Inlined_Subprogram): Remove previous patch.
2641
26422014-07-31 Ed Schonberg <schonberg@adacore.com>
2643
2644 * sem_ch13.adb (Check_One_Function): Apply properly the static
2645 semantic rules for indexing aspects and the functions they denote.
2646
16a569d2
AC
26472014-07-31 Javier Miranda <miranda@adacore.com>
2648
2649 * debug.adb: Complete documentation of -gnatd.z.
2650
26512014-07-31 Bob Duff <duff@adacore.com>
2652
2653 * gnat_ugn.texi: Minor doc fixes.
2654
26552014-07-31 Robert Dewar <dewar@adacore.com>
2656
2657 * sem_aggr.adb (Resolve_Array_Aggregate): Fix posting of missing
2658 index value.
2659
26602014-07-31 Tristan Gingold <gingold@adacore.com>
2661
2662 * s-unstyp.ads (Packed_Byte): Make this type universal aliasing.
2663 (Packed_Bytes1): Make component aliased.
2664
26652014-07-31 Robert Dewar <dewar@adacore.com>
2666
2667 * s-unstyp.ads, s-fileio.adb: Minor reformatting.
2668
c5670cb4
RD
26692014-07-31 Robert Dewar <dewar@adacore.com>
2670
2671 * inline.adb, gnat1drv.adb, exp_ch6.adb, s-fileio.adb: Minor
2672 reformatting.
2673
c1b37eda
EB
26742014-07-31 Eric Botcazou <ebotcazou@adacore.com>
2675
2676 * gcc-interface/utils2.c ((build_binary_op): Don't set TREE_THIS_NOTRAP
2677 on array references here, now done more selectively in trans.c.
2678
20bebd4c
DR
26792014-07-31 Doug Rupp <rupp@adacore.com>
2680
2681 * gcc-interface/misc.c (gnat_init_gcc_fp(): Set flag_errno_math to 0.
2682
f087ea44
AC
26832014-07-31 Hristian Kirtchev <kirtchev@adacore.com>
2684
2685 * sem_util.adb (Is_Effectively_Volatile): New routine.
2686
26872014-07-31 Fedor Rybin <frybin@adacore.com>
2688
2689 * gnat_ugn.texi: Document --test-duration option for gnattest.
2690
26912014-07-31 Javier Miranda <miranda@adacore.com>
384e3fb1 2692 Eric Botcazou <ebotcazou@adacore.com>
f087ea44
AC
2693
2694 * opt.ads (Back_End_Inlining): New variable which controls
2695 activation of inlining by back-end expansion.
2696 * gnat1drv.adb (Adjust_Global_Switches): Initialize Back_End_Inlining
2697 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Do not build
2698 the body to be inlined by the frontend if Back_End_Inlining
2699 is enabled.
2700 * exp_ch6.adb (Register_Backend_Call): Moved to inline.adb.
2701 (Expand_Call): If backend inlining is enabled let the backend to
2702 handle inlined subprograms.
2703 * inline.ads (Register_Backend_Call): Moved here from exp_ch6
2704 * inline.adb (Register_Backend_Call): Moved here from exp_ch6.
2705 (Add_Inlined_Subprogram): Add subprograms when Back_End_Inlining is set.
2706 (Must_Inline): Do not return Inline_Call if Back_End_Inlining is
2707 enabled.
2708 * debug.adb Document -gnatd.z
2709 * fe.h Import Back_End_Inlining variable.
2710 * gcc-interface/utils.c (create_subprog_decl): If Back_End_Inlining is
2711 enabled then declare attribute "always inline"
384e3fb1
JM
2712 * gcc-interface/decl.c, gcc-interface/trans.c,
2713 gcc-interface/gigi.h: Add handling of Inline_Always pragma.
f087ea44
AC
2714
27152014-07-31 Robert Dewar <dewar@adacore.com>
2716
2717 * a-ngelfu.ads: Minor comment fix.
2718
d780e54f
AC
27192014-07-31 Hristian Kirtchev <kirtchev@adacore.com>
2720
2721 * freeze.adb (Freeze_Record_Type): Replace all calls to
2722 Is_SPARK_Volatile with Is_Effectively_Volatile and update
2723 related comments.
2724 * sem_ch3.adb (Analyze_Object_Contract, Process_Discriminants):
2725 Replace all calls to Is_SPARK_Volatile with
2726 Is_Effectively_Volatile and update related comments.
2727 * sem_ch5.adb (Analyze_Iterator_Specification,
2728 Analyze_Loop_Parameter_Specification): Replace all calls to
2729 Is_SPARK_Volatile with Is_Effectively_Volatile and update
2730 related comments.
2731 * sem_ch6.adb (Process_Formals): Replace all calls to
2732 Is_SPARK_Volatile with Is_Effectively_Volatile and update
2733 related comments.
2734 * sem_ch12.adb (Instantiate_Object): Replace the call to
2735 Is_SPARK_Volatile_Object with Is_Effectively_Volatile_Object
2736 and update related comment.
2737 * sem_prag.adb (Analyze_External_Property_In_Decl_Part,
2738 Analyze_Global_Item): Replace all calls to Is_SPARK_Volatile
2739 with Is_Effectively_Volatile and update related comments.
2740 * sem_res.adb (Resolve_Actuals, Resolve_Entity_Name): Replace
2741 all calls to Is_SPARK_Volatile with Is_Effectively_Volatile and
2742 update related comments.
2743 * sem_util.adb (Has_Enabled_Property,
2744 Variable_Has_Enabled_Property): Replace all calls
2745 to Is_SPARK_Volatile with Is_Effectively_Volatile and
2746 update related comments.
2747 (Is_Effectively_Volatile): New routine.
2748 (Is_Effectively_Volatile_Object): New routine.
2749 (Is_SPARK_Volatile): Removed.
2750 (Is_SPARK_Volatile_Object): Removed.
2751 * sem_util.ads (Is_Effectively_Volatile): New routine.
2752 (Is_Effectively_Volatile_Object): New routine.
2753 (Is_SPARK_Volatile): Removed.
2754 (Is_SPARK_Volatile_Object): Removed.
2755
27562014-07-31 Pascal Obry <obry@adacore.com>
2757
2758 * s-fileio.adb (Open): Make sure a shared file gets inserted into
2759 the global list atomically. This ensures that the file descriptor
2760 won't be freed because another tasks is closing the file.
2761
16b5e0b7
RD
27622014-07-31 Robert Dewar <dewar@adacore.com>
2763
2764 * sem_ch3.adb (Process_Range_Expr_In_Decl): Add comments on
2765 generation of _FIRST and _LAST variables even in GNATprove_Mode.
2766 * gnat_ugn.texi: Minor editing.
2767 * sem_prag.adb (Ensure_Aggregate_Form): Make sure generated
2768 aggregate is marked Comes_From_Source if argument is CFS.
2769
f15749aa
AC
27702014-07-31 Pascal Obry <obry@adacore.com>
2771
2772 * s-fileio.adb: Remove obsolete comment.
2773
27742014-07-31 Vincent Celier <celier@adacore.com>
2775
2776 * a-strbou.ads ("=" (Bounded_String, Bounded_String): Add
2777 overriding keyword before function to avoid error when compiler
2778 is called with -gnatyO (check overriding indicators).
2779
27802014-07-31 Tucker Taft <taft@adacore.com>
2781
2782 * gnat_ugn.texi: Add a paragraph pointing the reader
2783 to the "plugins" example.
2784
27852014-07-31 Hristian Kirtchev <kirtchev@adacore.com>
2786
2787 * freeze.adb (Freeze_Expression): Document the
2788 purpose of the parent chain traversal.
2789
396eb900
AC
27902014-07-31 Robert Dewar <dewar@adacore.com>
2791
2792 * checks.ads, checks.adb (Activate_Overflow_Check): Do not set flag for
2793 unconstrained fpt ops.
2794
27952014-07-31 Pascal Obry <obry@adacore.com>
2796
2797 * s-fileio.adb (Open): Make sure a shared file gets inserted into
2798 the global list atomically. This ensures that the file descriptor
2799 won't be freed because another tasks is closing the file.
2800
e8cddc3b
AC
28012014-07-31 Vincent Celier <celier@adacore.com>
2802
2803 * projects.texi: Minor spelling error fix.
2804
28052014-07-31 Robert Dewar <dewar@adacore.com>
2806
2807 * gnat_rm.texi: Document No_Elaboration_Code_All restriction.
2808 * lib-writ.adb, lib-load.adb: Initialize No_Elab_Code field in unit
2809 information.
2810 * lib.ads, lib.adb (No_Elab_Code): New field in unit information.
2811 * restrict.adb (Process_Restriction_Synonyms): Add handling
2812 of No_Elaboration_Code_All.
2813 * restrict.ads (Process_Restriction_Synonyms): Now handles
2814 No_Elaboration_Code_All.
2815 * sem_ch10.adb (Analyze_Context): Enforce transitive with for
2816 No_Elaboration_Code_All.
2817 * sem_prag.adb (Process_Restrictions_Or_Restriction_Warnings):
2818 Handle setting of No_Elab_Code in unit information. Handle
2819 No_Elaboration_Code_All.
2820 * snames.ads-tmpl (Name_No_Elaboration_Code): New name for
2821 pragma processing.
2822 (Name_No_Elaboration_Code_All): New name for pragma processing.
2823
28242014-07-31 Eric Botcazou <ebotcazou@adacore.com>
2825
2826 * exp_aggr.adb (Aggr_Assignment_OK_For_Backend): Reject array
2827 types with a null range and use the Esize of the component
2828 instead of its RM_Size to identify appropriate values.
2829
28302014-07-31 Hristian Kirtchev <kirtchev@adacore.com>
2831
2832 * freeze.adb Add with and use clause for Aspects.
2833 (Freeze_Expression): Emit an error when a volatile constant lacks
2834 Boolean aspect Import.
2835 (Has_Boolean_Aspect_Import): New routine.
2836
f3296dd3
AC
28372014-07-31 Gary Dismukes <dismukes@adacore.com>
2838
2839 * exp_util.adb: Minor reformatting.
2840
28412014-07-31 Vincent Celier <celier@adacore.com>
2842
2843 * errutil.adb (Error_Msg): Make sure that all components of
2844 the error message object are initialized.
2845
28462014-07-31 Ed Schonberg <schonberg@adacore.com>
2847
2848 * sem_ch4.adb (Try_Container_Indexing): If the container type is
2849 class-wide, use specific type to locate iteration primitives.
2850 * sem_ch13.adb (Check_Indexing_Functions): Add legality checks for
2851 rules in RM 4.1.6 (Illegal_Indexing): New diagnostic procedure.
2852 Minor error message reformating.
2853 * exp_ch5.adb (Expand_Iterator_Loop): Handle properly Iterator
2854 aspect for a derived type.
2855
28562014-07-31 Robert Dewar <dewar@adacore.com>
2857
2858 * debug.adb: Document debug flag d.X.
2859
3dddb11e
ES
28602014-07-31 Ed Schonberg <schonberg@adacore.com>
2861
2862 * sem_util.ads (Find_Specific_Type): Moved here from exp_disp.adb.
2863 * sem_util.adb (Find_Specific_Type): If type is untagged private,
2864 retrieve full view so that primitive operations can be located.
2865 * exp_disp.adb Move Find_Specific_Type to sem_util.
2866 * exp_ch4.adb (Expand_N_Op_Eq): If operands are class-wide, use
2867 Find_Specific_Type to locate primitive equality.
2868 * exp_util.adb (Make_CW_Equivalent_Type): A class_wide equivalent
2869 type does not require initialization.
2870 * exp_attr.adb (Compile_Stream_Body_In_Scope): Within an instance
2871 body all visibility is established, and the enclosing package
2872 declarations must not be installed.
2873
9420f51f
YM
28742014-07-31 Yannick Moy <moy@adacore.com>
2875
2876 * sem_parg.adb, sem_prag.ads (Collect_Subprogram_Inputs_Outputs):
2877 Make subprogram public.
2878
022ed178
AC
28792014-07-31 Ed Schonberg <schonberg@adacore.com>
2880
2881 * exp_ch9.adb (Expand_N_Protected_Type_Declaration): New
2882 predicate Discriminated_Size, to distinguish between private
2883 components that depend on discriminants from those whose size
2884 depends on some other non-static expression.
2885
28862014-07-31 Nicolas Setton <setton@adacore.com>
2887
2888 * g-exptty.adb (Close): Fix binding to Waitpid: use the
2889 tty version.
2890
9d827cd5
AC
28912014-07-31 Ed Schonberg <schonberg@adacore.com>
2892
2893 * sem_ch3.adb (Make_Index): Reject properly the use of 'Length
2894 in a discrete range, when 'range was probably intended.
2895
28962014-07-31 Robert Dewar <dewar@adacore.com>
2897
2898 * sem_warn.adb, sem_warn.ads (Has_Junk_Name): Moved from body to spec.
2899
9d2a2071
AC
29002014-07-31 Robert Dewar <dewar@adacore.com>
2901
2902 * frontend.adb: Minor reformatting.
2903 * sem.adb: Minor reformatting.
2904 * sem_ch6.adb (Analyze_Null_Procedure): Set proper sloc for
2905 identifiers on rewrite.
2906 * par.adb: Minor comment updates.
2907 * a-ngelfu.adb (Cos): Minor simplification.
2908 * par-ch13.adb (Get_Aspect_Specifications): Improve messages
2909 and recovery for bad aspect.
2910 * exp_ch3.adb: Code clean up.
2911 * sem_util.ads: Minor comment correction.
2912 * sem_ch13.adb (Check_Array_Type): Properly handle large types.
2913 * sem_ch3.adb: Code clean up.
2914 * binderr.ads: Minor comment correction.
2915
29162014-07-31 Ed Schonberg <schonberg@adacore.com>
2917
2918 * exp_disp.adb (Expand_Interface_Conversion): A call whose
2919 prefix is a static conversion to an interface type that is not
2920 class-wide is not dispatching.
2921
7bfff488
AC
29222014-07-31 Robert Dewar <dewar@adacore.com>
2923
2924 * inline.adb, s-traceb.adb, s-traceb-hpux.adb, memtrack.adb,
2925 s-traceb-mastop.adb: Minor reformatting.
2926
29272014-07-31 Ed Schonberg <schonberg@adacore.com>
2928
2929 * exp_ch3.adb (Expand_Record_Extension): In ASIS_Mode perform
2930 expansion, to handle properly visibility of selected components
2931 in instance bodies.
2932
aa3efecd
AC
29332014-07-31 Robert Dewar <dewar@adacore.com>
2934
2935 * par-ch13.adb (Get_Aspect_Specifications): Set Inside_Depends.
2936 * par-ch2.adb (P_Pragma): Set Inside_Depends.
2937 * par-ch4.adb (P_Simple_Expression): Pass Inside_Depends to
2938 Check_Unary_Plus_Or_Minus.
2939 * scans.ads (Inside_Depends): New flag.
2940 * scng.adb (Scan): Pass Inside_Depends to Check_Arrow.
2941 * style.ads: Add Inside_Depends parameter to Check_Arrow Add
2942 Inside_Depends parameter to Check_Unary_Plus_Or_Minus.
2943 * styleg.adb (Check_Arrow): Handle Inside_Depends case.
2944 (Check_Unary_Plus_Or_Minus): Handle Inside_Depends case.
2945 * styleg.ads: Add Inside_Depends parameter to Check_Arrow Add.
2946 Inside_Depends parameter to Check_Unary_Plus_Or_Minus.
2947
29482014-07-31 Javier Miranda <miranda@adacore.com>
2949
2950 * s-vaflop.adb Move the body of function T_To_G before
2951 T_To_D. Required for frontend inlining.
2952 * inline.adb (Has_Excluded_Contract): New subprogram used to
2953 check if a subprogram inlined by the frontend has contracts
2954 which cannot be inlined.
2955
29562014-07-31 Bob Duff <duff@adacore.com>
2957
2958 * s-traceb.adb, s-traceb-hpux.adb, s-traceb-mastop.adb:
2959 (Call_Chain): Add 1 to number of frames to skip, to account for
2960 the fact that there's one more frame on the stack.
9697805c 2961 * gcc-interface/Makefile.in (s-traceb.o): Adjust rules.
aa3efecd 2962
b7c874a7
AC
29632014-07-31 Robert Dewar <dewar@adacore.com>
2964
2965 * checks.adb (Enable_Overflow_Check): More precise setting of
2966 Do_Overflow_Check flag for division.
2967
29682014-07-31 Eric Botcazou <ebotcazou@adacore.com>
2969
2970 * exp_aggr.adb (Aggr_Assignment_OK_For_Backend): Reject packed
2971 array types with implementation type.
2972
29732014-07-31 Hristian Kirtchev <kirtchev@adacore.com>
2974
2975 * sem_ch10.adb (Process_State): Remove local variable Name. Add
2976 local variable Decl. Partially declare an abstract state by
2977 generating an entity and storing it in the state declaration.
2978 * sem_prag.adb (Create_Abstract_State): Fully declare a
2979 semi-declared abstract state.
2980
e1360f50
AC
29812014-07-31 Robert Dewar <dewar@adacore.com>
2982
2983 * prj-nmsc.adb: Minor reformatting.
2984
29852014-07-31 Bob Duff <duff@adacore.com>
2986
2987 * s-tasdeb.adb (System.Tasking.Debug): Remove
2988 all usage of the secondary stack from this package.
2989
33ca2867
AC
29902014-07-31 Hristian Kirtchev <kirtchev@adacore.com>
2991
2992 * freeze.adb (Freeze_Expression): Update the loop in charge
2993 of finding a proper insertion place for freeze nodes to handle
2994 N_Expression_With_Actions nodes.
2995
0407af53
RD
29962014-07-31 Robert Dewar <dewar@adacore.com>
2997
2998 * sem_util.adb, a-ngelfu.ads, prj-nmsc.adb, prj-conf.adb: Minor
2999 reformatting.
3000
3affd6d4
PO
30012014-07-31 Pascal Obry <obry@adacore.com>
3002
3003 * prj-nmsc.adb: Minor reformatting.
3004
972fb59e
AC
30052014-07-31 Ed Schonberg <schonberg@adacore.com>
3006
3007 * sem_util.adb (Has_Preelaborable_Initialization): Check that
3008 type is tagged before checking whether a user-defined Initialize
3009 procedure is present.
3010
30112014-07-31 Gary Dismukes <dismukes@adacore.com>
3012
3013 * a-ngelfu.ads (Sqrt): Augment postcondition.
3014
30152014-07-31 Pascal Obry <obry@adacore.com>
3016
3017 * prj-nmsc.adb (Check_Library_Attributes): An aggegate library
3018 directory and ALI directory must be different than all object
3019 and library directories of aggregated projects.
3020
30212014-07-31 Vincent Celier <celier@adacore.com>
3022
3023 * prj-pars.adb, prj-conf.ads, prj-conf.adb (Locate_Runtime): Move spec
3024 to package body, as it is not called from outside. Remove argument
3025 Project_Tree, no longer used. When runtime cannot be found,
3026 call Raise_Invalid_Config instead of failing the program.
3027
c1c82472
RD
30282014-07-31 Robert Dewar <dewar@adacore.com>
3029
3030 * bindgen.adb (Gen_Output_File_Ada): Generate pragma Suppress
3031 (Overflow_Check).
3032 * gnatlink.adb (Process_Args): Remove generation of -gnato0,
3033 no longer needed.
3034
e95ad7ea
RD
30352014-07-31 Robert Dewar <dewar@adacore.com>
3036
3037 * gnat_ugn.texi: Document new switch -gnato0.
3038 * sem_ch3.ads: Minor reformatting.
3039 * gnatlink.adb (Process_Args): Compile bind file with -gnato0
3040 (we do not want overflow checks when incrementing elaboration
3041 counters).
3042 * einfo.ads: Minor reformatting.
3043
e9a79435
RD
30442014-07-31 Robert Dewar <dewar@adacore.com>
3045
3046 * exp_ch5.adb, freeze.adb, exp_ch3.adb: Minor comment correction.
3047 * s-arit64.adb: Minor reformatting.
3048
30492014-07-31 Robert Dewar <dewar@adacore.com>
3050
3051 * gnat1drv.adb (Adjust_Global_Switches): Default for overflow
3052 checking is enabled except in GNAT_Mode.
3053 * switch-c.adb (Scan_Front_End_Switches): Implement -gnato0
3054 (suppress overflow checks).
3055
7c0c194b
AC
30562014-07-31 Ed Schonberg <schonberg@adacore.com>
3057
3058 * exp_ch3.adb (Expand_Freeze_Record_Type): Do not build an
3059 invariant procedure for an internally generated subtype that is
3060 created for an object of a class-wide type.
3061
30622014-07-31 Vincent Celier <celier@adacore.com>
3063
3064 * prj-nmsc.adb, errutil.adb: Make code similar to Errout.
3065
30662014-07-31 Gary Dismukes <dismukes@adacore.com>
3067
3068 * gnat_rm.texi, sem_aux.ads, einfo.ads, sem_util.ads, sem_ch6.adb,
3069 exp_disp.adb: Minor reformatting.
3070
1fb63e89
RD
30712014-07-31 Robert Dewar <dewar@adacore.com>
3072
3073 * exp_ch5.adb, sem_ch3.adb, exp_ch7.adb, exp_util.adb, exp_ch9.adb,
3074 sem_ch7.adb, checks.adb, s-exctra.adb, exp_ch6.adb, exp_disp.adb,
3075 exp_dist.adb, sem_ch13.adb, exp_strm.adb, exp_ch3.adb: Minor
3076 reformatting.
3077
2fe258bf
AC
30782014-07-31 Robert Dewar <dewar@adacore.com>
3079
3080 * sem_ch13.adb: Minor reformatting.
3081
30822014-07-31 Ed Schonberg <schonberg@adacore.com>
3083
3084 * exp_ch3.adb (Build_Invariant_Checks): If the enclosing record
3085 is an unchecked_union, warn that invariants will not be checked
3086 on components that have them.
3087
30882014-07-31 Robert Dewar <dewar@adacore.com>
3089
3090 * freeze.adb (Freeze_Entity): Check for error of
3091 Type_Invariant'Class applied to a untagged type.
3092 * sem_ch6.adb (Analyze_Null_Procedure): Unconditionally rewrite
3093 as null body, so that we perform error checks even if expansion
3094 is off.
3095
3e50df4d
ES
30962014-07-31 Ed Schonberg <schonberg@adacore.com>
3097
3098 * sem_ch13.adb (Build_Invariant_Procedure): If body of procedure
3099 is already present, nothing to do.
3100 * exp_ch3.adb (Build_Component_Invariant_Call): For an access
3101 component, check whether the access type has an invariant before
3102 checking the designated type.
3103 (Build_Record_Invariant_Proc): Change suffix of generated
3104 name to prevent ambiguity when record type has invariants
3105 in addition to those of components, and two subprograms are
3106 constructed. Consistent with handling of array types.
3107 (Insert_Component_Invariant_Checks): Build invariant procedure
3108 body when one has not been created yet, in the case of composite
3109 types that are completions and whose full declarations carry
3110 invariants.
3111
0be7dcbb
AC
31122014-07-30 Thomas Quinot <quinot@adacore.com>
3113
3114 * gnat_rm.texi: Minor doc fixes.
3115
31162014-07-30 Robert Dewar <dewar@adacore.com>
3117
3118 * a-rbtgbo.adb, sem_ch13.adb: Minor reformatting.
3119
31202014-07-30 Vincent Celier <celier@adacore.com>
3121
3122 * errutil.adb (Set_Msg_Text): Process tilde ('~'): no processing
3123 of error message.
3124 * prj-nmsc.adb (Locate_Directory): Use a tilde ('~') in the
3125 message to report that a directory cannot be created, to avoid
3126 processing of the directory path that may contains special
3127 insertion characters.
3128
a18e3d62
AC
31292014-07-30 Ed Schonberg <schonberg@adacore.com>
3130
3131 * a-crdlli.ads: Place declaration of Empty_List after full type
3132 declaration for Curosr, to prevent freezing error.
3133
31342014-07-30 Robert Dewar <dewar@adacore.com>
3135
3136 * get_targ.adb: Minor code reorganization.
3137 * prj-proc.adb, prj-proc.ads, get_targ.ads, sem_ch6.adb: Minor
3138 reformatting.
3139
31402014-07-30 Ed Schonberg <schonberg@adacore.com>
3141
3142 * a-cbhase.adb: a-cbhase.adb (Insert): Raise Constraint_Error,
3143 not Program_Error, when attempting to remove an element not in
3144 the set. This is the given semantics for all set containers.
3145
31462014-07-30 Ed Schonberg <schonberg@adacore.com>
3147
0be7dcbb 3148 * a-rbtgbo.adb (Delete_Node_Sans_Free): If
a18e3d62
AC
3149 element is not present in tree return rather than violating
3150 an assertion. Constraint_Error will be raised in the caller if
3151 element is not in the container.
3152
1ebc2612
AC
31532014-07-30 Arnaud Charlet <charlet@adacore.com>
3154
3155 * set_targ.adb (Read_Target_Dependent_Values): New subprogram.
3156 (elab body): Add provision for default target config file.
3157 * get_targ.ads, get_targ.adb (Get_Back_End_Config_File): New subprogram.
3158
31592014-07-30 Ed Schonberg <schonberg@adacore.com>
3160
3161 * a-cbhase.adb (Delete): Raise Constraint_Error, not Program_Error,
3162 when attempting to remove an element not in the set. This is
3163 the given semantics for all set containers.
3164 * a-cborse.adb (Delete): Attempt removal first, to check for
3165 tampering, before checking whether this is an attempt to
3166 delete a non-existing element, and in fthe latter case raise
3167 Constraint_Error.
3168
31692014-07-30 Vincent Celier <celier@adacore.com>
3170
3171 * prj-proc.adb (Recursive_Process): Do not create a new
3172 Project_Id if the project is already in the list of projects of
3173 the tree.
3174
31752014-07-30 Ed Schonberg <schonberg@adacore.com>
3176
3177 * sem_ch6.adb (Analyze_Function_Return): Reject a return expression
3178 whose type is an incomplete formal type.
3179 (Analyze_Return_Type): Reject a return type that is an untagged
3180 imcomplete formal type.
3181 (Process_Formals): Reject a formal parameter whose type is an
3182 untagged formal incomplete type.
3183 * sem_res.adb (Resolve_Actuals): Reject an actual whose type is
3184 an untagged formal incomplete type.
3185
45ec05e1
RD
31862014-07-30 Robert Dewar <dewar@adacore.com>
3187
3188 * gnat_ugn.texi: Minor spelling correction.
3189 * makeutl.adb: Minor code reorganization.
3190 * exp_ch4.adb, exp_aggr.adb, exp_ch3.adb: Minor reformatting.
3191
31922014-07-30 Robert Dewar <dewar@adacore.com>
3193
3194 * einfo.ads (Has_Unchecked_Union): Document that this is used
3195 to check for illegal Valid_Scalars attribute references.
3196 * exp_attr.adb (Build_Record_VS_Func): New function
3197 (Expand_N_Attribute_Reference, case Valid_Scalars): Call this
3198 function.
3199 * gnat_rm.texi: Document 'Valid_Scalars cannot be applied to
3200 Unchecked_Union Add note on 'Valid_Scalars generating a lot
3201 of code.
3202 * sem_attr.adb (Analyze_Attribute, case Valid_Scalars): Give
3203 error on attempt to apply Valid_Scalars to Unchecked_Union type.
3204
ad9560ea
AC
32052014-07-30 Steve Baird <baird@adacore.com>
3206
3207 * exp_ch4.adb (Expand_N_Indexed_Component): Disable optimized handling
3208 of A(I..J)(K) in CodePeer_Mode.
3209
32102014-07-30 Ben Brosgol <brosgol@adacore.com>
3211
3212 * gnat_ugn.texi: Fix typo.
3213
b3f5eef0
AC
32142014-07-30 Thomas Quinot <quinot@adacore.com>
3215
3216 * lib-writ.ads: document format change.
3217
32182014-07-30 Pascal Obry <obry@adacore.com>
3219
3220 * prj-util.adb (For_Interface_Sources): Do not
3221 include sources from withed externally built projects.
3222
32232014-07-30 Robert Dewar <dewar@adacore.com>
3224
3225 * lib.adb: Minor reformatting.
3226 * prj-util.adb: Minor reformatting.
3227
32282014-07-30 Ed Schonberg <schonberg@adacore.com>
3229
3230 * exp_aggr.adb (Build_Record_Aggr_Code): For an array component
3231 that depends on discriminants, and which is given by an others
3232 clause, create an explicit subtype with the discriminant values
3233 of the enclosing aggregate, because the backend cannot otherwise
3234 retrieve the actual bounds of the array.
3235
32362014-07-30 Fedor Rybin <frybin@adacore.com>
3237
3238 * gnat_ugn.texi: Improve gnattest documentation.
3239
32402014-07-30 Pascal Obry <obry@adacore.com>
3241
3242 * makeutl.adb (Insert_Project_Sources): Properly handle sources
3243 that are aggregated. We want to include sources not only part
3244 of libraries but also if part of an aggregated project from an
3245 aggregate library.
3246 * prj.adb (For_Project_And_Aggregated_Context): Properly check
3247 state of root project.
3248
9e5a6ee7
TQ
32492014-07-30 Thomas Quinot <quinot@adacore.com>
3250
3251 * lib-load.ads: Minor reformatting.
3252 * sinfo.ads (Library_Unit): Update comment.
3253 * lib.ads (Notes): Simplify. The Unit component in Notes_Entry
3254 is redundant. Instead used the pragma Node_Id directly as the
3255 element type.
3256
32572014-07-30 Thomas Quinot <quinot@adacore.com>
3258
3259 * lib.adb (Store_Note): Store only notes that do not come from
3260 an instance, and that are in the extended main source unit.
3261 * lib-writ (Write_Unit_Information): Annotations from subunits
3262 must be emitted along with those for the main unit, and they
3263 must carry a specific file name.
3264 * ali.ads (Notes_Record): Use a File_Name_Type instead of a
3265 Unit_Id for the source file containing the pragma, as in the
3266 case of annotations from subunits we might not have a readily
3267 available unit id.
3268 * ali.adb (Scan_ALI): Account for above change in data structure.
3269
3ea8f61e
AC
32702014-07-30 Vincent Celier <celier@adacore.com>
3271
3272 * makeutl.adb (Insert_Project_Sources): When the library project
3273 is an aggregate Stand-Alone Library, insert in the queue the
3274 Ada interface units, with Closure set to True;
3275
32762014-07-30 Eric Botcazou <ebotcazou@adacore.com>
3277
3278 * sem_util.adb: Fix minor typo.
3279 * makeutl.adb: Minor reformatting.
3280
41c79d60
AC
32812014-07-30 Robert Dewar <dewar@adacore.com>
3282
3283 * exp_ch7.adb, checks.adb, makeutl.adb, makeutl.ads: Minor reformatting.
3284
32852014-07-30 Yannick Moy <moy@adacore.com>
3286
3287 * checks.ads: Fix typo in comment.
3288
32892014-07-30 Pierre-Marie Derodat <derodat@adacore.com>
3290
3291 * sem_util.adb (Set_Debug_Info_Needed): For scalar types, recurse on
3292 entities that materialize range bounds, if any.
3293
32942014-07-30 Vincent Celier <celier@adacore.com>
3295
3296 * projects.texi: Minor spelling fix.
3297
8e888920
AC
32982014-07-30 Hristian Kirtchev <kirtchev@adacore.com>
3299
3300 * checks.adb (Make_Bignum_Block): Use the new secondary stack
3301 build routines to manage the mark.
3302 * exp_ch7.adb (Create_Finalizer, Expand_Cleanup_Actions):
3303 Use the new secodary stack build routines to manage the mark.
3304 (Insert_Actions_In_Scope_Around): Add new formal parameter
3305 Manage_SS along with comment on its usage. Code and comment
3306 reformatting. Mark and release the secondary stack when the
3307 context warrants it.
3308 (Make_Transient_Block): Update the call
3309 to Insert_Actions_In_Scope_Around to account for parameter Manage_SS.
3310 (Wrap_Transient_Declaration): Remove local variable
3311 Uses_SS. Ensure that the secondary stack is marked and released
3312 when the related object declaration appears in a library level
3313 package or package body. Code and comment reformatting.
3314 * exp_util.ads, exp_util.adb (Build_SS_Mark_Call): New routine.
3315 (Build_SS_Release_Call): New routine.
3316
33172014-07-30 Steve Baird <baird@adacore.com>
3318
3319 * exp_attr.adb: Revert previous change, not needed after all.
3320
33212014-07-30 Vincent Celier <celier@adacore.com>
3322
3323 * makeutl.adb (Queue.Insert_Project_Sources): Insert with
3324 Closure => True for interfaces of Stand-Alone Libraries.
3325 * makeutl.ads (Source_Info (Format => Gprbuild)): Add new
3326 Boolean component Closure, defaulted to False.
3327
33282014-07-30 Yannick Moy <moy@adacore.com>
3329
3330 * sem_res.adb: Fix typo in error message.
3331
63a4aa43
AC
33322014-07-30 Robert Dewar <dewar@adacore.com>
3333
3334 * sem_ch3.adb (Process_Range_Expr_In_Decl): Use _FIRST/_LAST
3335 as name suffixes rather than L/H for subtype bounds.
3336 * tbuild.ads: Minor comment improvements and fixes
3337 (Make_External_Name): Document that suffix can start with an
3338 underscore.
3339
33402014-07-30 Bob Duff <duff@adacore.com>
3341
3342 * gnat_ugn.texi: Document --rep-clauses switch.
3343
33c9f9af
AC
33442014-07-30 Ed Schonberg <schonberg@adacore.com>
3345
3346 * sem_ch13.adb (Analyze_Aspect_Specifications): Default_Value and
3347 Default_Component_Value can only be specified for scalar type or
3348 arrays of scalar types respectively. This legality check must
3349 be performed at the point the aspect is analyzed, in order to
3350 reject aspect specifications that apply to a partial view.
3351
33522014-07-30 Thomas Quinot <quinot@adacore.com>
3353
3354 * freeze.adb: Minor reformatting.
3355
33562014-07-30 Robert Dewar <dewar@adacore.com>
3357
3358 * exp_attr.adb (Expand_Attribute, case First/Last): Don't expand in
3359 codepeer mode.
3360
18c56840
ES
33612014-07-30 Ed Schonberg <schonberg@adacore.com>
3362
3363 * freeze.adb (Check_Expression_Function): At the freeze point
3364 of an expression function, verify that the expression in the
3365 function does not contain references to any deferred constants
3366 that have no completion yet.
3367 (Freeze_Expression, Freeze_Before): call
3368 Check_Expression_Function.
3369 * a-ciorse.ads: Add Reference_Control_Type to detect tampering.
3370 * a-ciorse.adb: Add Adjust and Finalize routines for
3371 Reference_Control_Type. Use it in the construction of Reference
3372 and Constant_Reference values.
3373
41a58113
RD
33742014-07-30 Robert Dewar <dewar@adacore.com>
3375
3376 * exp_aggr.adb: Update comments.
3377 * a-chtgbo.adb, a-chtgbo.ads, a-cbhase.adb, a-cbhase.ads: Minor
3378 reformatting.
3379
33802014-07-30 Robert Dewar <dewar@adacore.com>
3381
3382 * cstand.adb (New_Standard_Entity): New version takes name
3383 string to call Make_Name.
3384 (Create_Standard): Use this routine to set name before setting other
3385 fields.
3386
33872014-07-30 Robert Dewar <dewar@adacore.com>
3388
3389 * exp_attr.adb (Expand_Attribute, case First): Rewrite simple
3390 entity reference.
3391 (Expand_Attribute, case Last): Ditto.
3392 * exp_ch3.adb (Constrain_Index): New calling sequence for
3393 Process_Range_Expr_In_Decl.
3394 (Expand_N_Object_Declaration): Avoid setting Is_Known_Valid in one
3395 problematical case.
3396 * sem_ch3.adb (Constrain_Index): New calling sequence for
3397 Process_Range_Expr_In_Decl.
3398 (Set_Scalar_Range_For_Subtype): ditto.
3399 (Process_Range_Expr_In_Decl): Create constants to hold bounds for
3400 subtype.
3401 * sem_ch3.ads (Process_Range_Expr_In_Decl): Add Subtyp parameter.
3402 * sem_eval.adb (Compile_Time_Compare): Make sure we use base
3403 types if we are not assuming no invalid values.
3404
2b4c962d
AC
34052014-07-30 Robert Dewar <dewar@adacore.com>
3406
3407 * clean.adb: Minor reformatting.
3408 * opt.ads: Minor fix to incorrect comment.
3409
34102014-07-30 Ed Schonberg <schonberg@adacore.com>
3411
3412 * a-chtgbo.ads, a-chtgbo.adb (Delete_Node_At_Index): New
3413 subprogram, used by bounded hashed sets, to delete a node at
3414 a given index, whose element may have been improperly updated
3415 through a Reference_Preserving key.
3416 * a-cbhase.ads: Add Reference_Control_Type to package Generic_Keys.
3417 * a-cbhase.adb: Add Adjust and Finalize routines for
3418 Reference_Control_Type.
3419 (Delete, Insert): Raise Program_Error, not Constraint_Error,
3420 when operation is illegal.
3421 (Reference_Preserving_Key): Build aggregate for Reference_Control_Type
3422 * a-cmbutr.ads: Add Reference_Control_Type to detect tampering. Add
3423 private with_clause for Ada.Finalization.
3424 * a-cbmutr.adb: Add Adjust and Finalize routines for
3425 Reference_Control_Type. Use it in the construction of Reference
3426 and Constant_Reference values.
3427
c98b8253
AC
34282014-07-30 Robert Dewar <dewar@adacore.com>
3429
3430 * sem_ch3.adb, sem_ch3.ads: Minor code reorganization.
3431
34322014-07-30 Pascal Obry <obry@adacore.com>
3433
3434 * clean.adb (Clean_Project): Properly check for directory
3435 existence before trying to enter it.
3436
2e471ec7
RD
34372014-07-30 Robert Dewar <dewar@adacore.com>
3438
3439 * sem_ch3.ads, prj.ads, prj-nmsc.adb: Minor reformatting.
3440
43174f15
AC
34412014-07-30 Robert Dewar <dewar@adacore.com>
3442
3443 * par-ch5.adb (P_Sequence_Of_Statements): Properly handle
3444 missing semicolon after name.
3445
34462014-07-30 Pascal Obry <obry@adacore.com>
3447
3448 * prj.ads (Gprinstall_Flags): New constant.
3449 * prj-nmsc.adb (Check_Library_Attributes): Do not fails for
3450 missing library dir if Directories_Must_Exist_In_Projects
3451 is false.
3452
734e72dd
BD
34532014-07-30 Bob Duff <duff@adacore.com>
3454
3455 * a-except-2005.adb, a-except.adb: Remove obsolete comments.
3456 * s-traceb.ads: Updagte comments.
3457
d6e8719d
RD
34582014-07-30 Robert Dewar <dewar@adacore.com>
3459
3460 * checks.adb, a-cihase.adb, a-cihase.ads, a-chtgop.adb, a-chtgop.ads,
3461 a-except.adb, a-except-2005.adb, a-cborse.adb, a-cborse.ads,
3462 a-exexda.adb, a-elchha.adb, exp_aggr.adb, a-cohase.adb: Minor
3463 reformatting.
3464
6b6bce61
AC
34652014-07-30 Ed Schonberg <schonberg@adacore.com>
3466
3467 * a-chtgop.ads, a-chtgop.adb (Delete_Node_At_Index): New
3468 subprogram, used by all versions of hashed sets, to delete a node
3469 whose element has been improperly updated through a Reference_
3470 Preserving key.
3471 * a-cohase.adb: Remove Delete_Node, use new common procedure
3472 Delete_Node_At_Index.
3473 * a-cihase.ads: Add Reference_Control_Type to package Generic_Keys.
3474 * a-cihase.adb: Add Adjust and Finalize routines for
3475 Reference_Control_Type.
3476 (Reference_Preserving_Key): Build aggregate for
3477 Reference_Control_Type
3478
34792014-07-30 Yannick Moy <moy@adacore.com>
3480
3481 * checks.adb, checks.ads (Determine_Range_R): New procedure to
3482 determine the possible range of a floating-point expression.
3483
34842014-07-30 Ed Schonberg <schonberg@adacore.com>
3485
3486 * a-cborse.ads: Add Reference_Control_Type to package Generic_Keys.
3487 * a-cborse.adb: Add Adjust and Finalize routines for
3488 Reference_Control_Type.
3489 (Reference_Preserving_Key): Build aggregate for
3490 Reference_Control_Type.
3491 (Delete): Check for tampering, and raise Program_Error (not
3492 Constraint_Error) when attempting to delete an element not in
3493 the set.
3494 (Insert): Ditto.
3495
34962014-07-30 Bob Duff <duff@adacore.com>
3497
3498 * a-elchha.adb, a-except-2005.adb, a-except.adb, a-exexda.adb,
3499 * a-exextr.adb, a-exstat.adb, exp_intr.ads, s-tassta.adb:
3500 Exception_Information is used to produce useful debugging
3501 information for the programmer. However, it was also used to
3502 implement the stream attributes for type Exception_Occurrence. The
3503 latter requires a stable and portable interface, which meant
3504 that we couldn't include a symbolic traceback. A separate set of
3505 routines was used to provide symbolic tracebacks under program
3506 control (i.e. not automatically). The goal of this ticket is
3507 to provide such automatic tracebacks, so the change here is to
3508 split the two functionalities: Exception_Information gives the
3509 maximally useful information for debugging (i.e. it now includes
3510 a symbolic traceback when a decorator is set, and it can be
3511 improved freely in the future without disturbing streaming).
3512 Untailored_Exception_Information always uses hexadecimal addresses
3513 in the traceback, has a stable and portable output, and is now
3514 used for streaming.
3515
35162014-07-30 Eric Botcazou <ebotcazou@adacore.com>
3517
3518 * exp_aggr.adb (Expand_Array_Aggregate): Add missing test
3519 on the target of the assignment to find out whether it
3520 can be directly done by the back-end.
3521 * exp_util.adb (Is_Possibly_Unaligned_Slice): Remove obscure test.
3522
facfa165
RD
35232014-07-30 Robert Dewar <dewar@adacore.com>
3524
3525 * inline.adb, a-coorse.adb, a-coorse.ads, a-cohase.adb, a-cohase.ads,
3526 a-tasatt.adb: Minor reformatting.
3527
35282014-07-30 Robert Dewar <dewar@adacore.com>
3529
3530 * exp_ch4.adb: Minor reformatting.
3531
29ad9ea5
AC
35322014-07-30 Ed Schonberg <schonberg@adacore.com>
3533
3534 * a-coorse.adb, a-coorse.ads (Generic_Keys): Add a
3535 Reference_Control_Type to generic package, to keep additional
3536 information for Reference_Types that manipulate keys. Add Adjust and
3537 Finalize procedures for this type.
3538 (Finalize): When finalizing a reference_preserving_key, verify
3539 that the key of the new value is equivalent to the key of the
3540 original element, raise Program_Error otherwise.
3541 (Insert): Detect tampering.
3542 (Reference_Preserving_Key): Build proper Reference_Control_Type,
3543 and update Busy and Lock bits to detect tampering.
3544 * a-cohase.ads: Keep with-clause private.
3545
35462014-07-30 Hristian Kirtchev <kirtchev@adacore.com>
3547
3548 * exp_ch4.adb (Expand_N_Op_Eq): Emit a warning when the operands
3549 of an equality are of an Unchecked_Union type and lack inferable
3550 discriminants.
3551
995683a6
AC
35522014-07-30 Bob Duff <duff@adacore.com>
3553
3554 * g-exctra.adb, g-exctra.ads, s-exctra.adb, s-exctra.ads, Makefile.rtl,
3555 g-trasym.adb, g-trasym.ads, s-trasym.adb, s-trasym.ads: Move
3556 GNAT.Traceback.Symbolic and GNAT.Exception_Traces into the System
3557 hierarchy (System.Traceback.Symbolic and System.Exception_Traces), so
3558 we can call them from the runtimes. Leave renamings in place under GNAT.
3559
35602014-07-30 Yannick Moy <moy@adacore.com>
3561
3562 * inline.adb (Check_And_Build_Body_To_Inline): Include code for
3563 inlining in GNATprove mode.
3564
35652014-07-30 Ed Schonberg <schonberg@adacore.com>
3566
3567 * a-cohase.adb, a-cohase.ads (Generic_Keys): Add a
3568 Reference_Control_Type to generic package, to keep additional
3569 information for Reference_Types that manipulate keys. Add Adjust and
3570 Finalize procedures for this type.
3571 (Delete_Node): New procedure called when finalizing a
3572 Reference_Control_Type, to remove a node whose element has been
3573 improperly updated through a Reference.
3574 (Insert): Detect tampering.
3575 (Reference_Preserving_Key): Build proper Reference_Control_Type,
3576 and update Busy and Lock bits to detect tampering.
3577
35782014-07-30 Bob Duff <duff@adacore.com>
3579
3580 * exp_intr.ads: Minor comment fix.
3581
793c5f05
AC
35822014-07-30 Gary Dismukes <dismukes@adacore.com>
3583
3584 * exp_prag.adb, a-tags.ads: Minor typo fixes.
3585
35862014-07-30 Bob Duff <duff@adacore.com>
3587
3588 * a-excach.adb, a-excach-cert.adb, a-except-2005.ads,
3589 a-except.ads, g-traceb.adb, memtrack.adb,
3590 s-traceb.adb, s-traceb.ads, s-traceb-hpux.adb, s-traceb-mastop.adb:
3591 Cleanup: Make the three versions of System.Traceback.Call_Chain
3592 have the same interface. Use an array for the Traceback parameter
3593 instead of an Address. This will enable reduction in code
3594 duplication.
3595
35962014-07-30 Pat Rogers <rogers@adacore.com>
3597
3598 * gnat_ugn.texi: Corrected minor textual error in description
3599 of switch -gnatwl.
3600
36012014-07-30 Bob Duff <duff@adacore.com>
3602
3603 * Makefile.rtl: Sort file names.
3604
36052014-07-30 Arnaud Charlet <charlet@adacore.com>
3606
3607 * a-tasatt.adb: Complete previous change: kill spurious warning
3608 on e.g. sparc, and make sure we only use the fast path when the
3609 alignment is compatible.
3610
36112014-07-30 Yannick Moy <moy@adacore.com>
3612
3613 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Mark new Spec_Id as
3614 coming from source.
3615
1eb31e60
YM
36162014-07-30 Yannick Moy <moy@adacore.com>
3617
3618 * inline.adb (Build_Body_To_Inline): Issue more precise messages
3619 for declarations that prevent inlining.
3620 (Cannot_Inline): Change usual start of message to refer to contextual
3621 analysis in GNATprove mode.
3622 * sem_res.adb (Resolve_Call): Change usual start of message to
3623 refer to contextual analysis in GNATprove mode, when inlining
3624 not possible.
3625
eb1ee757
AC
36262014-07-30 Robert Dewar <dewar@adacore.com>
3627
3628 * sem_res.adb, sem_ch6.adb: Minor code reorganization.
3629 * inline.adb: Minor reformatting.
3630
36312014-07-30 Javier Miranda <miranda@adacore.com>
3632
3633 * a-tags.ads: Add comments.
3634
2178830b
AC
36352014-07-30 Pat Rogers <rogers@adacore.com>
3636
3637 * gnat_rm.texi: Minor word error.
3638
36392014-07-30 Ed Schonberg <schonberg@adacore.com>
3640
3641 * exp_prag.adb (Expand_Old): Insert declarationss of temporaries
3642 created to capture the value of the prefix of 'Old at the
3643 beginning of the current declarative part, to prevent data flow
3644 anomalies in the postcondition procedure that will follow.
3645
36462014-07-30 Yannick Moy <moy@adacore.com>
3647
3648 * debug.adb: Retire debug flag -gnatdQ.
3649 * inline.adb (Can_Be_Inlined_In_GNATprove_Mode): Check SPARK_Mode
3650 on decl, not on body. Ignore predicate functions.
3651 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Remove use of
3652 debug flag -gnatdQ. Correctly analyze SPARK_Mode on decl and
3653 body when generating a decl for a body on which SPARK_Mode aspect
3654 is given.
3655 * sem_prag.adb (Analyze_Pragma|SPARK_Mode): Reorder tests for
3656 attaching pragma to entity, to account for declaration not coming
3657 from source.
3658 * sem_res.adb (Resolve_Call): Issue warning and flag subprogram
3659 as not always inlined in GNATprove mode, when called in an
3660 assertion context.
3661
d3e16619
AC
36622014-07-30 Vincent Celier <celier@adacore.com>
3663
3664 * debug.adb: Minor comment update.
3665
36662014-07-30 Robert Dewar <dewar@adacore.com>
3667
3668 * s-tasuti.adb, s-tassta.adb: Minor reformatting.
3669 * sprint.adb (Sprint_Node): Handle N_Contract case.
3670 * exp_prag.adb: Minor reformatting.
3671 * freeze.adb (Freeze_Entity): Check useless postcondition for
3672 No_Return subprogram.
3673 * sem_prag.adb: Minor reformatting.
3674
36752014-07-30 Javier Miranda <miranda@adacore.com>
3676
3677 * a-tags.ads: Complete comments about performance.
3678
36792014-07-30 Fedor Rybin <frybin@adacore.com>
3680
3681 * gnat_ugn.texi: Adding description for --exit-status option to
3682 gnattest section. Fixing index entry of --passed-tests option
3683 in gnattest section.
3684
36852014-07-30 Javier Miranda <miranda@adacore.com>
3686
3687 * Makefile.rtl, gnat_rm.texi, i-cpp.adb, i-cpp.ads, impunit.adb,
3688 rtsfind.ads: Remove references to package Interfaces.CPP since this
3689 package is no longer needed.
3690
fccaf220
BD
36912014-07-30 Bob Duff <duff@adacore.com>
3692
3693 * s-taasde.adb (Timer_Queue): Don't use a
3694 build-in-place function call to initialize the Timer_Queue.
3695 * s-traent.adb, s-traent.ads, s-traent-vms.adb, s-traent-vms.ads:
3696 Turn off polling in these units, because otherwise we get
3697 elaboration circularities with Ada.Exceptions when the -gnatP
3698 switch is used.
3699 * s-tassta.adb (Create_Task): Make sure independent tasks
3700 are created with Parent = Environment_Task. This was not true,
3701 for example, in s-interr.adb, when Interrupt_Manager does "new
3702 Server_Task"; the Server_Task had Parent = Interrupt_Manager,
3703 which is wrong because the master is determined by the access
3704 type, which is at library level.
3705 * s-tasuti.adb (Make_Independent): Avoid setting Parent; it is
3706 now set correctly by Create_Task.
3707 (Make_Passive): Remove the workaround for the race condition in
3708 Make_Independent.
3709 * frontend.adb (Frontend): Revert to previous method of detecting
3710 temporary configuration pragma files, recognizing such files by
3711 ".tmp" in the name. This is more general than detecting pragmas
3712 Source_File_Name_Project, because it allows any tool to use
3713 this naming convention, no matter the content of the file.
3714 * gnat_ugn.texi: Document this naming convention.
3715
3aac5551
RD
37162014-07-30 Robert Dewar <dewar@adacore.com>
3717
3718 * exp_ch7.adb, s-tataat.adb, s-tataat.ads, s-parame-vms-alpha.ads,
3719 inline.adb, s-parame-hpux.ads, exp_smem.adb, s-tasini.adb,
3720 s-tasini.ads, s-parame-vms-ia64.ads, s-parame.ads, s-taskin.ads,
3721 s-parame-vxworks.ads, a-tasatt.adb, a-tasatt.ads: Minor reformatting.
3722 * a-suenco.adb (Convert): Handle overlong encodings in UTF8-UTF8
3723 conversion.
3724
274d2584
ES
37252014-07-30 Ed Schonberg <schonberg@adacore.com>
3726
3727 * sem_ch5.adb: Improve error recovery.
3728 * inline.adb (Build_Body_To_Inline): Set Full_Analysis to false
3729 before analyzing the body, so that in GNATprove mode there is
3730 no light expansion. Whatever expansion is required by SPARK will
3731 be performed when analysing the inlined code.
3732
2afa8fdd
AC
37332014-07-30 Bob Duff <duff@adacore.com>
3734
3735 * s-tataat.adb, s-tataat.ads, a-tasatt.adb: Minor comment fixes.
3736
37372014-07-30 Ed Schonberg <schonberg@adacore.com>
3738
3739 * sem_ch5.adb (Analyze_Loop_Statement): If loop has a label,
3740 verify that it is not hidden by an inner implicit declaration.
3741
8071b771
AC
37422014-07-30 Thomas Quinot <quinot@adacore.com>
3743
3744 * sem.ads (Scope_Table_Entry): New component Locked_Shared_Objects.
3745 * sem_ch8.adb (Push_Scope): Initialize Locked_Shared_Objects.
3746 * exp_smem.adb (Add_Shared_Var_Lock_Procs): Handle the case where
3747 the call returns an unconstrained type: in this case there is
3748 already a transient scope, and we should not establish a new one.
3749 * exp_ch7.adb (Insert_Actions_In_Scope_Around): New formal Clean. If
3750 True, also insert cleanup actions in the tree.
3751 (Wrap_Transient_Declaration): Call Insert_Actions_In_Scope_Around
3752 with Clean set True.
3753
37542014-07-30 Arnaud Charlet <charlet@adacore.com>
3755
3756 * s-taskin.ads (Direct_Index, Direct_Index_Range,
3757 Direct_Attribute_Element, Direct_Attribute_Array,
3758 Direct_Index_Vector, Direct_Attributes, Is_Defined,
3759 Indirect_Attributes): Removed. (Atomic_Address,
3760 Attribute_Array, Attributes): New.
3761 * s-tasini.ads, s-tasini.adb (Proc_T, Initialize_Attributes,
3762 Finalize_Attributes_Link, Initialize_Attributes_Link): Removed.
3763 (Finalize_Attributes): Reimplement.
3764 * s-tassta.adb (Create_Task): Remove call to
3765 Initialize_Attributes_Link (Free_Task, Vulnerable_Free_Task):
3766 Replace Finalize_Attributes_Link by Finalize_Attributes.
3767 * a-tasatt.ads, a-tasatt.adb, s-tataat.ads, s-tataat.adb:
3768 Reimplement from scratch, using a simpler and more efficient
3769 implementation.
3770 * s-tporft.adb (Register_Foreign_Thread): Remove now obsolete comment.
3771 * s-parame.ads, s-parame-hpux.ads,
3772 * s-parame-vms-alpha.ads, s-parame-vms-ia64.ads,
3773 * s-parame-vxworks.ads (Max_Attribute_Count): New, replace
3774 Default_Attribute_Count.
3775
4bd4bb7f
AC
37762014-07-30 Olivier Hainque <hainque@adacore.com>
3777
3778 * vxworks-ppc-link.spec: New file. Extra link
3779 instructions for ppc-vxworks.
3780 * vxworks-crtbe-link.spec: Likewise, for ZCX related support.
3781 * system-vxworks-ppc.ads: Adjust linker options to use spec files.
3782 * system-vxworks-arm.ads: Likewise.
3783 * gcc-interface/Makefile.in: Enable .spec files.
3784
37852014-07-30 Ed Schonberg <schonberg@adacore.com>
3786
3787 * sem_aggr.adb: Minor comment reformatting.
3788
37892014-07-30 Robert Dewar <dewar@adacore.com>
3790
3791 * sem_util.ads, sem_util.adb (Is_Junk_Name): Removed.
3792 * sem_warn.adb (Has_Junk_Name): New function
3793 (Check_References): Use Has_Junk_Name to delete junk warnings
3794 (Check_Unset_Reference): ditto.
3795 (Warn_On_Unreferenced_Entity): ditto.
3796 (Warn_On_Useless_Assignment): ditto.
3797
37982014-07-30 Ed Schonberg <schonberg@adacore.com>
3799
3800 * checks.adb (Insert_Valid_Check): Do not check for the packed
3801 array type of a prefix that is an access type.
3802
38032014-07-30 Ed Schonberg <schonberg@adacore.com>
3804
3805 * sem_attr.adb (Eval_Attribute): Evaluate the GNAT attribute
3806 Unconstrained_Array even if prefix is not frozen yet, as can
3807 occur with a private subtype used as a generic actual.
3808
38092014-07-30 Gary Dismukes <dismukes@adacore.com>
3810
3811 * sem_attr.adb: Minor reformatting.
3812
38132014-07-30 Pat Rogers <rogers@adacore.com>
3814
3815 * gnat_rm.texi: Corrected minor wording error in description
3816 of No_Exception_Registration.
3817
38182014-07-30 Yannick Moy <moy@adacore.com>
3819
3820 * einfo.ads, einfo.adb: New flag Is_Inlined_Always for use in GNATprove
3821 mode. Realphabetize two subprograms.
3822 * inline.adb (Cannot_Inline): Use Is_Inlined_Always in GNATprove mode.
3823 (Can_Be_Inlined_In_GNATprove_Mode): Adapt to possible Empty Body_Id.
3824 (Check_And_Build_Body_To_Inline): Use Is_Inlined_Always in GNATprove
3825 mode.
3826 (Expand_Inline_Call): Use Is_Inlined_Always in GNATprove mode.
3827 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Do not use
3828 Is_Inline in GNATprove mode.
3829 (Analyze_Subprogram_Specification):
3830 Set Is_Inlined_Always at subprogram entity creation.
3831 * sem_res.adb (Resolve_Call): Do not deal with inlining during
3832 pre-analysis. Issue warning on call to possibly inlined
3833 subprogram when body not seen.
3834
38352014-07-30 Yannick Moy <moy@adacore.com>
3836
3837 * lib-xref.adb (Generate_Reference): Add special
3838 case for compiler-generated formals in GNATprove mode.
3839
480156b2
AC
38402014-07-30 Yannick Moy <moy@adacore.com>
3841
3842 * sem_ch6.adb: Add comments.
3843
38442014-07-30 Thomas Quinot <quinot@adacore.com>
3845
3846 * s-os_lib.ads (GM_Time_Of): Clarify documentation.
3847
38482014-07-30 Robert Dewar <dewar@adacore.com>
3849
3850 * sem_aggr.adb, sem_res.adb: Minor reformatting.
3851
38522014-07-30 Thomas Quinot <quinot@adacore.com>
3853
3854 * sem_ch13.adb (Analyze_Attribute_Definition_Clause, case
3855 Bit_Order): Set Reverse_Bit_Order on the base type of the
3856 specified first subtype.
3857
36428cc4
AC
38582014-07-30 Ed Schonberg <schonberg@adacore.com>
3859
3860 * inline.adb (Expand_Inlined_Call): Use a renaming declaration
3861 to capture the value of actuals of a limited type rather than
3862 an object declaration, to prevent spurious errors when analyzing
3863 the inlined body.
3864
38652014-07-30 Ed Schonberg <schonberg@adacore.com>
3866
3867 * sem_ch4.adb (Analyze_Type_Conversion): Treat an inlined body
3868 as an instance, and inhibit semantic checks on already analyzed
3869 code to prevent spurious errors.
3870
38712014-07-30 Arnaud Charlet <charlet@adacore.com>
3872
3873 * a-exctra.ads ("="): New function, to restore compatibility.
3874
38752014-07-30 Pascal Obry <obry@adacore.com>
3876
3877 * adaint.c (__gnat_to_os_time): Set isdst to -1 for the mktime
3878 routine to use the OS dst setting.
3879
38802014-07-30 Pat Rogers <rogers@adacore.com>
3881
3882 * gnat_ugn.texi: Minor correction to description of -gnatw.K.
3883
38842014-07-30 Ed Schonberg <schonberg@adacore.com>
3885
3886 * sem_util.adb (Wrong_Type): Disable some checks equally within
3887 instances and within inlined bodies, to suppress spurious type
3888 errors on already analyzed code.
3889 * sem_aggr.adb (Check_Expr_OK_In_Limited_Aggregate): Expression
3890 is legal in an inlined body, juts as it is in an instance body.
3891
38922014-07-30 Ed Schonberg <schonberg@adacore.com>
3893
3894 * sem_res.adb (Resolve_Unchecked_Conversion): Within an inlined
3895 body the operand of an unchecked conversion may be a literal, in
3896 which case its type is the target type of the conversion. This
3897 is in contrast to conversions in other contexts, where the
3898 operand cannot be a literal and must be resolvable independent
3899 of the context.
3900
e8fa3dcd
PMR
39012014-07-30 Pierre-Marie Derodat <derodat@adacore.com>
3902
3903 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create a
3904 mere scalar constant instead of a reference for a renaming of
3905 scalar literal.
3906 * gcc-interface/utils.c (renaming_from_generic_instantiation_p): New.
3907 * gcc-interface/gigi.h (renaming_from_generic_instantiation_p): New.
3908
7b2888e6
AC
39092014-07-30 Robert Dewar <dewar@adacore.com>
3910
3911 * s-tasuti.adb, s-tasuti.ads, einfo.ads, sem_prag.adb, s-taasde.adb,
3912 g-socthi-vms.adb, s-taprop-mingw.adb, s-interr.adb, s-interr-hwint.adb,
3913 g-decstr.adb, s-tasdeb-vms.adb, g-expect-vms.adb, makeutl.adb,
3914 s-interr-vms.adb, g-socthi.adb, exp_aggr.adb, s-tasdeb.adb,
3915 g-awk.adb, gnatls.adb, s-taspri-posix.ads, g-catiio.adb,
3916 s-interr-sigaction.adb, s-os_lib.adb, s-fileio.adb: Minor reformatting
3917 & code reorganization.
3918
39192014-07-30 Bob Duff <duff@adacore.com>
3920
3921 * s-tassta.adb, sem_util.ads: Minor reformatting.
3922
39232014-07-30 Yannick Moy <moy@adacore.com>
3924
3925 * inline.adb (Build_Body_To_Inline): Detect when
3926 subprogram has multiple returns, or not a single last return
3927 statement, in GNATprove mode.
3928 (Cannot_Inline): Simplify logic to handle case of GNATprove
3929 inlining first.
3930
39312014-07-30 Ed Schonberg <schonberg@adacore.com>
3932
3933 * sem_ch6.adb: Stubs are not subject to inlining.
3934
b0c5fdda
AC
39352014-07-30 Bob Duff <duff@adacore.com>
3936
3937 * s-tasuti.ads, s-tasuti.adb (Make_Independent): Change this
3938 from a procedure to a function, so that it can more easily be
3939 called before the "begin" of a task.
3940 * s-taasde.ads (Delay_Block): Make this type immutably limited,
3941 so we can use a build-in-place function call to initialize
3942 Timer_Queue in the body.
3943 * a-rttiev.adb, s-asthan-vms-alpha.adb, s-asthan-vms-ia64.adb,
3944 * s-interr.adb, s-interr-hwint.adb, s-interr-sigaction.adb,
3945 * s-interr-vms.adb, s-taasde.adb: Each independent task now calls
3946 Make_Independent before reaching its "begin", to avoid race
3947 conditions. This causes the activating task to wait until after
3948 Make_Independent is complete before proceeding. In addition,
3949 we initialize data structures used by independent tasks before
3950 activating those tasks, to avoid possible use of uninitialized data.
3951 * s-interr.ads, s-intman.ads, s-taspri-posix.ads, s-tasdeb.ads:
3952 Minor comment fixes.
3953
39542014-07-30 Bob Duff <duff@adacore.com>
3955
3956 * a-exctra.ads, s-traent-vms.ads, s-traent.ads (Tracebacks_Array): Move
3957 the declaration of Tracebacks_Array from Ada.Exceptions.Traceback to
3958 System.Traceback_Entries (s-traent.ads and s-traent-vms.ads). Add
3959 subtypes renaming Tracebacks_Array in Ada.Exceptions.Traceback.
3960 * g-debpoo.adb: Refer to Tracebacks_Array in its new home.
3961
39622014-07-30 Arnaud Charlet <charlet@adacore.com>
3963
3964 * a-tasatt.adb: Remove old comments.
3965
52c1498c
YM
39662014-07-30 Yannick Moy <moy@adacore.com>
3967
3968 * einfo.ads (Is_Inlined): Document new use in GNATprove mode.
3969 * inline.adb (Can_Be_Inlined_In_GNATprove_Mode): Add comments
3970 to explain rationale for inlining or not in GNATprove mode.
3971 (Expand_Inlined_Call): In GNATprove mode, set Is_Inlined flag
3972 to False when inlining is not possible.
3973 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Set Is_Inlined
3974 flag to indicate that subprogram is fully inlined. To be reversed
3975 if inlining problem is found.
3976 * sem_res.adb (Resolve_Call): Set Is_Inlined flag to False when
3977 call in potentially unevaluated context.
3978
e5c4e2bc
AC
39792014-07-30 Jose Ruiz <ruiz@adacore.com>
3980
3981 * s-tarest.adb, s-tarest.ads: Fix comments.
3982
39832014-07-30 Robert Dewar <dewar@adacore.com>
3984
3985 * exp_attr.adb, checks.adb, sem_util.adb, sem_util.ads, sem_attr.adb:
3986 Change No_Scalar_Parts predicate to Scalar_Part_Present and
3987 invert sense of test. This avoids the "not No_xxx" situation
3988 which is always ugly.
3989
39902014-07-30 Ed Schonberg <schonberg@adacore.com>
3991
3992 * inline.adb (Expand_Inlined_Call): When generating code for
3993 an internal subprogram the expansion uses the location of the
3994 call, so that gdb can skip over it. In GNATprove mode we want to
3995 preserve slocs of original subprogram when expanding an inlined
3996 call, to obtain better warnings, even though subprogram appears
3997 not to come from source if it is the inlining of a subprogram
3998 body without a previous spec.
3999
40002014-07-30 Eric Botcazou <ebotcazou@adacore.com>
4001
4002 * exp_aggr.adb (Aggr_Assignment_OK_For_Backend): Reject array
4003 types with atomic components.
4004
40052014-07-30 Thomas Quinot <quinot@adacore.com>
4006
4007 * Make-generated.in: Remove now unnecessary targets after s-oscons
4008 reorg.
4009
40102014-07-30 Yannick Moy <moy@adacore.com>
4011
4012 * sem_res.adb (Resolve_Call): Use ultimate alias
4013 of callee when available.
4014
40152014-07-30 Ed Schonberg <schonberg@adacore.com>
4016
4017 * sem_ch6.adb (Analyze_Expression_Function): To check whether
4018 an expression function is a completion, use the specification of
4019 the previous declaration, not its entity, which may be internally
4020 generated in an inlined context.
4021
93a87598
AC
40222014-07-30 Doug Rupp <rupp@adacore.com>
4023
4024 * adaint.c (__gnat_tmp_name) [__ANDROID__]: Default to putting
4025 temp files in /cache directory unless overridden by TMPDIR.
4026
40272014-07-30 Jose Ruiz <ruiz@adacore.com>
4028
4029 * s-tassta.adb, s-tarest.adb (Initialize, Create_Task,
4030 Create_Restricted_Task): Remove redundant check. Number_Of_CPUs returns
4031 type CPU, so it can never be greater than CPU_Range'Last.
4032
40332014-07-30 Bob Duff <duff@adacore.com>
4034
4035 * s-taskin.ads: Minor comment fix.
4036
40372014-07-30 Thomas Quinot <quinot@adacore.com>
4038
4039 * g-socket.adb: Remove now useless WITH, USE, and USE TYPE
4040 clauses.
4041
40422014-07-30 Yannick Moy <moy@adacore.com>
4043
4044 * debug.adb: Free debug flag dQ used for frontend inlining in
4045 GNATprove mode..
4046 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Remove test of
4047 debug flag..
4048
40492014-07-30 Thomas Quinot <quinot@adacore.com>
4050
4051 * Make-generated.in: Remove generation of s-oscons.ads, only
4052 generate the xoscons utility, in runtime-agnostic rules.
4053 * gcc-interface/Makefile.in: Clean up rules. Remove VMS parts,
4054 no longer supported.
4055
1399d355
AC
40562014-07-30 Bob Duff <duff@adacore.com>
4057
4058 * exp_ch6.adb (Add_Task_Actuals_To_Build_In_Place_Call): New
4059 parameter Chain to be used in the allocator case.
4060 (Make_Build_In_Place_Call_In_Allocator): If the allocated object
4061 has tasks, wrap the code in a block that will activate them,
4062 including the usual finalization code to kill them off in case
4063 of exception or abort.
4064
40652014-07-30 Robert Dewar <dewar@adacore.com>
4066
4067 * treepr.adb, treepr.ads; Reorganize documentation for new pp routines
4068 Remove renamings (don't work for gdb).
4069 (par): New synonym for p (avoid gdb ambiguities).
4070 * inline.adb, sem_ch6.adb, sem_ch13.adb: Minor reformatting.
4071
6be44a9a
BD
40722014-07-30 Bob Duff <duff@adacore.com>
4073
4074 * exp_ch9.ads, sem_prag.adb, exp_ch4.adb, sem_ch13.adb: Minor comment
4075 fixes.
4076 * treepr.ads, treepr.adb (ppp): Make this debugging routine
4077 accept any type covered by Union_Id.
4078
ac072cb2
AC
40792014-07-30 Robert Dewar <dewar@adacore.com>
4080
4081 * sem_ch4.adb (Analyze_If_Expression): Resolve condition before
4082 analyzing branches.
4083 * sem_eval.adb (Out_Of_Range): Check for statically unevaluated
4084 expression case.
4085
40862014-07-30 Robert Dewar <dewar@adacore.com>
4087
4088 * sem_ch13.adb (Analyze_Aspect, predicate cases): Diagnose use
4089 of predicate aspect on entity other than a type.
4090
40912014-07-30 Ed Schonberg <schonberg@adacore.com>
4092
4093 * sem_ch6.adb (Body_Has_Contract): New predicate to determine
4094 when a subprogram body without a previous spec cannot be inlined
4095 in GNATprove mode, because it includes aspects or pragmas that
4096 generate a SPARK contract clause.
4097 * inline.adb (Can_Be_Inlined_In_GNATprove_Mode): A subprogram
4098 instance cannot be inlined.
4099
cc6f5d75
AC
41002014-07-30 Robert Dewar <dewar@adacore.com>
4101
4102 * debug.adb: Document that d7 suppresses compilation time output.
4103 * errout.adb (Write_Header): Include compilation time in
4104 header output.
4105 * exp_intr.adb (Expand_Intrinsic_Call): Add
4106 Compilation_Date/Compilation_Time (Expand_Source_Info): Expand
4107 Compilation_Date/Compilation_Time.
4108 * g-souinf.ads (Compilation_Date): New function
4109 (Compilation_Time): New function.
4110 * gnat1drv.adb (Gnat1drv): Set Opt.Compilation_Time.
4111 * gnat_rm.texi (Compilation_Date): New function
4112 (Compilation_Time): New function.
4113 * opt.ads (Compilation_Time): New variable.
4114 * s-os_lib.ads, s-os_lib.adb (Current_Time_String): New function.
4115 * sem_intr.adb (Compilation_Date): New function.
4116 (Compilation_Time): New function.
4117 * snames.ads-tmpl (Name_Compilation_Date): New entry.
4118 (Name_Compilation_Time): New entry.
4119
41202014-07-30 Yannick Moy <moy@adacore.com>
4121
4122 * inline.adb: Add comment.
4123
41242014-07-30 Ed Schonberg <schonberg@adacore.com>
4125
4126 * par-ch4.adb (Is_Parameterless_Attribute): 'Result is a
4127 parameterless attribute, and a postondition can mention an
4128 indexed component or a slice whose prefix is an attribute
4129 reference F'Result.
4130
41312014-07-30 Robert Dewar <dewar@adacore.com>
4132
4133 * sprint.adb (Sprint_Node_Actual, case Object_Declaration):
4134 Avoid bomb when printing package Standard.
4135
41362014-07-30 Ed Schonberg <schonberg@adacore.com>
4137
4138 * sem_elab.adb (Check_Internal_Call_Continue): If an elaboration
4139 entity is created at this point, ensure that the name of the
4140 flag is unique, because the subprogram may be overloaded and
4141 other homonyms may also have elaboration flags created on the fly.
4142
41432014-07-30 Hristian Kirtchev <kirtchev@adacore.com>
4144
4145 * sem_attr.adb (Analyze_Array_Component_Update): New routine.
4146 (Analyze_Attribute): Major cleanup of attribute
4147 'Update. The logic is now split into two distinct routines
4148 depending on the type of the prefix. The use of <> is now illegal
4149 in attribute 'Update.
4150 (Analyze_Record_Component_Update): New routine.
4151 (Check_Component_Reference): Removed.
4152 (Resolve_Attribute): Remove the return statement and ??? comment
4153 following the processing for attribute 'Update. As a result,
4154 the attribute now freezes its prefix.
4155
41562014-07-30 Javier Miranda <miranda@adacore.com>
4157
4158 * exp_ch4.adb (Apply_Accessibility_Check): Do
4159 not call Base_Address() in VM targets.
4160
43478196
YM
41612014-07-30 Yannick Moy <moy@adacore.com>
4162
4163 * gnat1drv.adb (Adjust_Global_Switches): Set
4164 Ineffective_Inline_Warnings to True in GNATprove mode.
4165 * inline.adb (Cannot_Inline): Prepare new semantics for GNATprove
4166 mode of inlining.
4167 * opt.ads (Ineffective_Inline_Warnings): Add comment that
4168 describes use in GNATprove mode.
4169 * sem_prag.adb (Analyze_Pragma|SPARK_Mode): Ignore
4170 pragma when applied to the special body created for inlining.
4171
662c2ad4
RD
41722014-07-30 Robert Dewar <dewar@adacore.com>
4173
4174 * inline.adb, exp_ch4.adb, sinput.adb, sem_ch6.adb, sem_ch13.adb:
4175 Minor reformatting.
4176
4e6768ab
AC
41772014-07-30 Hristian Kirtchev <kirtchev@adacore.com>
4178
4179 * aspects.ads Add a comment explaining why SPARK 2014 aspects are
4180 not delayed. Update the delay status of most SPARK 2014 aspects.
4181 * sem_ch13.adb (Analyze_Aspect_Specifications): Update all calls
4182 to Decorate_Aspect_And_Pragma and Insert_Delayed_Pragma to refert
4183 to Decorate and Insert_Pragma. Add various comments concerning
4184 the delay status of several SPARK 2014 aspects. The insertion
4185 of Refined_State now uses routine Insert_After_SPARK_Mode.
4186 (Decorate): New routine.
4187 (Decorate_Aspect_And_Pragma): Removed.
4188 (Insert_Delayed_Pragma): Removed.
4189 (Insert_Pragma): New routine.
4190
41912014-07-30 Ed Schonberg <schonberg@adacore.com>
4192
4193 * inline.adb (Expand_Inlined_Call): In GNATprove mode, emit
4194 only a warning, not an error on an attempt to inline a recursive
4195 subprogram.
4196
b6c8e5be
AC
41972014-07-30 Robert Dewar <dewar@adacore.com>
4198
4199 * g-forstr.adb: Minor code reorganization (use J rather than I
4200 as a variable name).
4201 * gnat_rm.texi, sem_prag.adb, sem_util.adb, sem_ch13.adb,
4202 g-forstr.ads: Minor reformatting.
4203
42042014-07-30 Eric Botcazou <ebotcazou@adacore.com>
4205
4206 * sprint.adb (Set_Debug_Sloc): Also reset the end location if
4207 we are debugging the generated code.
4208
42092014-07-30 Yannick Moy <moy@adacore.com>
4210
4211 * sinput.ads, sinput.adb (Comes_From_Inlined_Body): New function that
4212 returns True for source pointer for an inlined body.
4213
42142014-07-30 Javier Miranda <miranda@adacore.com>
4215
4216 * exp_ch4.adb (Apply_Accessibility_Check): Add
4217 missing calls to Base_Address().
4218
42192014-07-30 Ed Schonberg <schonberg@adacore.com>
4220
4221 * sem_ch6.adb (Hanalyze_Subprogram_Body_Helper): In GNATprove
4222 mode, subprogram bodies without a previous declaration are also
4223 candidates for front-end inlining.
4224
2f6f8285
AC
42252014-07-30 Hristian Kirtchev <kirtchev@adacore.com>
4226
4227 * aspects.ads Aspects Async_Readers, Async_Writers,
4228 Effective_Reads and Effective_Writes do not need to be delayed.
4229 * sem_ch13.adb (Analyze_Aspect_Specifications): Propagate the
4230 optional Boolean expression when generating the corresponding
4231 pragma for an external property aspect.
4232 * sem_prag.adb (Analyze_External_Property_In_Decl_Part): Remove
4233 local constant Obj. Add local constant Obj_Id. Reimplement the
4234 check which ensures that the related variable is in fact volatile.
4235 (Analyze_Pragma): Reimplement the analysis of external property pragmas.
4236 * sem_util.adb (Is_Enabled): New routine.
4237 (Variable_Has_Enabled_Property): Reimplement the detection of
4238 an enabled external property.
4239
42402014-07-30 Sergey Rybin <rybin@adacore.com frybin>
4241
4242 * gnat_ugn.texi, vms_data.ads: gnatstub: describe generating subunits
4243 for body stubs.
4244
42452014-07-30 Pascal Obry <obry@adacore.com>
4246
4247 * g-forstr.adb, g-forstr.ads: New.
4248 * gnat_rm.texi, impunit.adb Makefile.rtl: Add new unit
4249 GNAT.Formatted_String.
4250
ac43e11e
AC
42512014-07-30 Eric Botcazou <ebotcazou@adacore.com>
4252
4253 * exp_aggr.adb (Aggr_Assignment_OK_For_Backend): New predicate.
4254 (Expand_Array_Aggregate): Also enable in-place expansion for
4255 code generated by the compiler. For an object declaration,
4256 set the kind of the object in addition to its type. If an
4257 in-place assignment is to be generated and it can be directly
4258 done by the back-end, do not expand the aggregate.
4259 * fe.h (Is_Others_Aggregate): Declare.
4260 * gcc-interface/trans.c
4261 (gnat_to_gnu) <N_Assignment_Statement>: Add support for an
4262 aggregate with a single Others choice on the RHS by means of
4263 __builtin_memset. Tidy up.
4264
42652014-07-30 Ed Schonberg <schonberg@adacore.com>
4266
4267 * gnat_rm.texi: minor reformatting.
4268
42692014-07-30 Yannick Moy <moy@adacore.com>
4270
4271 * sem_ch6.adb (Analyze_Subprogram_Helper_Body): Remove body to inline
4272 in SPARK_Mode Off.
4273
eb16ddf8
AC
42742014-07-30 Robert Dewar <dewar@adacore.com>
4275
4276 * gnat_rm.texi: Document additional implementation-defined use
4277 of Constrained.
4278
66288b9c
RD
42792014-07-30 Robert Dewar <dewar@adacore.com>
4280
4281 * prj-proc.adb, prj-strt.adb: Update comments.
4282
12e4e81e
AC
42832014-07-30 Gary Dismukes <dismukes@adacore.com>
4284
4285 * sinfo.ads, einfo.ads, checks.ads: Minor typo fix and reformatting.
4286
42872014-07-30 Vincent Celier <celier@adacore.com>
4288
4289 * prj-proc.adb (Imported_Or_Extended_Project_From): New Boolean
4290 parameter No_Extending, defaulted to False. When No_Extending
4291 is True, do not look for an extending project.
4292 (Expression): For a variable reference that is not for the current
4293 project, get its Id calling Imported_Or_Extended_Project_From
4294 with No_Extending set to True.
4295 * prj-strt.adb (Parse_Variable_Reference): If a referenced
4296 variable is not found in the current project, check if it is
4297 defined in one of the projects it extends.
4298
79185f5f
AC
42992014-07-30 Robert Dewar <dewar@adacore.com>
4300
4301 * sem_util.adb (Predicate_Tests_On_Arguments): Omit tests for
4302 some additional cases of internally generated routines.
4303
43042014-07-30 Ed Schonberg <schonberg@adacore.com>
4305
4306 * sem_ch10.adb (Analyze_Proper_Body): When compiling for ASIS,
4307 if the compilation unit is a subunit, extend optional processing
4308 to all subunits of the current one. This allows gnatstub to
4309 supress generation of spurious bodies.
4310
ec622246
HK
43112014-07-30 Hristian Kirtchev <kirtchev@adacore.com>
4312
4313 * a-cbmutr.adb (Insert_Child): Use local variable First to keep
4314 track of the initial element's index within the tree.
4315
36a66365
AC
43162014-07-29 Hristian Kirtchev <kirtchev@adacore.com>
4317
4318 * a-cbmutr.adb (Allocate_Node): Remove the two parameter version.
4319 (Insert_Child): Add local variable First. Capture the index of the
4320 first node being created to ensure correct cursor construction
4321 later on. Use the three parameter version of Allocate_Node
4322 when creating multiple children as this method allows aspect
4323 Default_Value to take effect (if applicable).
4324
43252014-07-29 Eric Botcazou <ebotcazou@adacore.com>
4326
4327 * exp_aggr.adb (Safe_Slice_Assignment): Remove.
4328 (Expand_Array_Aggregate): For a safe slice assignment, just set
4329 the target and use the common code path.
4330
b8e6830b
AC
43312014-07-29 Robert Dewar <dewar@adacore.com>
4332
4333 * sem_util.adb, sem_util.ads, sem_res.adb, exp_ch6.adb: Invert
4334 predicate No_Predicate_Test_On_Arguments, new name is
4335 Predicate_Tests_On_Arguments (with the opposite sense).
4336
43372014-07-29 Hristian Kirtchev <kirtchev@adacore.com>
4338
4339 * sem_attr.adb (Resolve_Attribute): Clean up the code for
4340 attribute 'Access. Do not generate an elaboration flag for a
4341 stand alone expression function. The expression of an expression
4342 function is now frozen when the expression function appears as
4343 the prefix of attribute 'Access.
4344 * sem_ch6.adb (Analyze_Expression_Function): Remove local
4345 variable New_Decl and update all references to it after the
4346 rewriting has taken place. Establish the linkages between the
4347 generated spec and body.
4348
094cf333
AC
43492014-07-29 Robert Dewar <dewar@adacore.com>
4350
4351 * sem_prag.adb (ip, rv): Prevent from being optimized away.
4352 * gnatls.adb (gnatls): Set E_Fatal exit status if ali file not found.
4353 * s-imgllb.adb, s-imgllw.adb, s-imgwiu.adb, s-imgbiu.adb: Minor
4354 reformatting.
4355
43562014-07-29 Vincent Celier <celier@adacore.com>
4357
4358 * prj-pp.adb: Minor comment update.
4359 * frontend.adb: If a target dependency info file has been read
4360 through switch -gnateT= add it to the dependencies of the source
4361 being compiled.
4362
38564f81
AC
43632014-07-29 Robert Dewar <dewar@adacore.com>
4364
4365 * sem_ch3.adb, prj.adb: Minor reformatting.
4366
43672014-07-29 Vincent Celier <celier@adacore.com>
4368
4369 * prj-pp.adb (Pretty_Print.Output_Project_File): New
4370 procedure to output project file names between quotes without
4371 concatenation, even if the line is too long.
4372 (Pretty_Print): Use Output_Project_File for project being extended and
4373 project imported.
4374
5f6fb720
AC
43752014-07-29 Vincent Celier <celier@adacore.com>
4376
4377 * gnat_ugn.texi: Document that configuration pragmas files are
4378 added to the dependencies, unless they contain only pragmas
4379 Source_File_Name_Project.
4380
43812014-07-29 Robert Dewar <dewar@adacore.com>
4382
4383 * frontend.adb: Minor reformatting.
4384
43852014-07-29 Robert Dewar <dewar@adacore.com>
4386
4387 * exp_ch6.adb (Add_Call_By_Copy_Code): Minor reformatting
4388 (Expand_Actuals): Make sure predicate checks are properly applied
4389 for the case of OUT or IN OUT parameters.
4390 * sem_res.adb: Minor reformatting (Resolve_Actuals): Skip
4391 predicate tests on arguments for Finalize
4392 * sem_util.adb (No_Predicate_Test_On_Arguments): Returns True
4393 if predicate tests on subprogram arguments should be skipped.
4394 * sem_util.ads (No_Predicate_Test_On_Arguments): New function
4395
43962014-07-29 Ed Schonberg <schonberg@adacore.com>
4397
4398 * sem_ch3.adb (Analyze_Object_Declaration): If there is an address
4399 clause for the object and the expression is an aggregate, defer
4400 resolution and expansion of the aggregate until the freeze point
4401 of the entity.
4402 * sem_aggr.adb (Resolve_Aggregate): An others_clause is legal if
4403 the parent node is an N_Reference generated during expansion.
4404
44052014-07-29 Vincent Celier <celier@adacore.com>
4406
4407 * prj.adb (Add_To_Buffer): Effectively double the size of the buffer.
4408
fc27e20e
RD
44092014-07-29 Robert Dewar <dewar@adacore.com>
4410
4411 * frontend.adb, inline.adb, sem_util.adb, sem_res.adb,
4412 prepcomp.ads: Minor reformatting and code clean up.
4413 * exp_ch6.adb (Expand_Actuals): Generate predicate test
4414 unconditionally for case of OUT or IN OUT actual (before this
4415 was generated only for certain subcases, which is wrong, the
4416 test is always needed).
4417
f3691f46
ES
44182014-07-29 Ed Schonberg <schonberg@adacore.com>
4419
4420 * sem_ch3.adb: Move Has_Defaulted_Discriminants to sem_util.
4421 * sem_ch4.adb (Analyze_Allocator): Defer resolution of expression
4422 until context type is available.
4423 * sem_res.adb (Resolve_Allocator): In the case of a qualified
4424 expression, complete resolution of expression.
4425 (Check_Aliased_Parameter): New procedure within Resolve_Actuals,
4426 to apply Ada2012 checks on aliased formals, as well as
4427 accesibility checks when the context of the call is an allocator
4428 or a qualified expression.
4429 * sem_util.ads, sem_util.adb (Has_Defaulted_Discriminants):
4430 Moved here from sem_ch3.
4431 (Object_Access_Level): Handle properly aliased formals and
4432 aggregates.
4433 * exp_ch6.adb (Expand_Call): Remove check on aliased parameters,
4434 now properly performed in sem_res (Resolve_Actuals,
4435 Check_Aliased_Parameter).
4436
2d180af1
YM
44372014-07-29 Yannick Moy <moy@adacore.com>
4438
4439 * debug.adb Enable GNATprove inlining under debug flag -gnatdQ for now.
4440 * inline.ads, inline.adb (Can_Be_Inlined_In_GNATprove_Mode): New
4441 function to decide when a subprogram can be inlined in GNATprove mode.
4442 (Check_And_Build_Body_To_Inline): Include GNATprove_Mode as a
4443 condition for possible inlining.
4444 * sem_ch10.adb (Analyze_Compilation_Unit): Remove special case
4445 for Inline_Always in GNATprove mode.
4446 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Build inlined
4447 body for subprograms in GNATprove mode, under debug flag -gnatdQ.
4448 * sem_prag.adb Minor change in comments.
4449 * sem_res.adb (Resolve_Call): Only perform GNATprove inlining
4450 inside subprograms marked as SPARK_Mode On.
4451 * sinfo.ads: Minor typo fix.
4452
5ae24312
AC
44532014-07-29 Vincent Celier <celier@adacore.com>
4454
4455 * frontend.adb: Add dependency on gnat.adc when taken into account
4456 and on non-temporary configuration pragmas files specified in
4457 switches -gnatec.
4458 * prepcomp.ads, prepcomp.adb (Add_Dependency): New procedure to add
4459 dependencies on configuration pragmas files.
4460
44612014-07-29 Pat Rogers <rogers@adacore.com>
4462
4463 * gnat_ugn.texi: Minor clarification to the explanation for the
4464 GNATtest -v switch.
4465
3c04da40
RD
44662014-07-29 Robert Dewar <dewar@adacore.com>
4467
4468 * types.ads (Mechanism_Type): Change range back to -18 .. Int'Last with
4469 documentation that explains the need for this extended range
4470 (use by C_Pass_By_Copy).
4471
09176aea
AC
44722014-07-29 Robert Dewar <dewar@adacore.com>
4473
4474 * gnat_rm.texi, sem_prag.adb: Minor reformatting.
4475
44762014-07-29 Sergey Rybin <rybin@adacore.com frybin>
4477
4478 * gnat_ugn.texi: gnatmetric: clarify documentation for cyclomatic
4479 complexity metrics.
4480
44812014-07-29 Thomas Quinot <quinot@adacore.com>
4482
4483 PR ada/60652
4484 * s-oscons-tmplt.c: For Linux, define _BSD_SOURCE in order for
4485 CRTSCTS to be visible.
4486
44872014-07-29 Bob Duff <duff@adacore.com>
4488
4489 * g-trasym.adb, g-trasym.ads: Code cleanup.
4490
1b4ada8f
DR
44912014-07-29 Doug Rupp <rupp@adacore.com>
4492
4493 * sigtramp-vxworks.c: Minor reformatting.
4494
155562cb
AC
44952014-07-29 Ed Schonberg <schonberg@adacore.com>
4496
4497 * gnat_rm.texi: No doc needed for Ada2012 aspect
4498 Implicit_dereference.
4499
45002014-07-29 Robert Dewar <dewar@adacore.com>
4501
4502 * sem_attr.adb (Attribute_12): New array
4503 (Analyze_Attribute): Check impl-defined Ada 2012 attributes.
4504 (Check_Ada_2012_Attribute): Removed.
4505
45062014-07-29 Doug Rupp <rupp@adacore.com>
4507
4508 * init.c (vxworks6): Call sigtramp for RTP (as well as DKM) for ARM,
4509 PPC, and e500.
4510 * sigtramp-vxworks.c: New file.
4511 * sigtramp-armvxw.c, sigtramp-ppcvxw.c: removed files.
4512
ad8bd3f4
ES
45132014-07-29 Ed Schonberg <schonberg@adacore.com>
4514
4515 * lib-xref.adb (Output_Refs, Check_Type_Reference): For a
4516 derived array type, add information about component type, which
4517 was previously missing in ali file.
4518 * gnat_rm.texi: Add documentation for Atomic_Always_Lock_Free.
4519
422e02cf
AC
45202014-07-29 Thomas Quinot <quinot@adacore.com>
4521
4522 * sem_ch3.adb (Constrain_Corresponding_Record): For the case
4523 of the subtype created for a record component, do not mark
4524 the subtype as frozen. For one thing, this is anomalous (in
4525 particular, the base type might not itself be frozen yet);
4526 furthermore, proper freezing of the subtype must happen in any
4527 case. So, we just mark the subtype as requiring delayed freezing
4528 (and we'll actually freeze it when generating the init_proc of
4529 the enclosing record).
4530 Also change the name of the constrained record subtype (append a
4531 'C' so that it is clearly different from the unconstrained record
4532 type, "related_idV") to make debugging easier.
4533 (Process_Full_View): When creating a full subtype for a pending
4534 private subtype, re-establish the scope of the private subtype
4535 so that we get proper visibility on outer discriminants.
4536 * exp_ch3.adb (Build_Init_Statements): Freeze any component
4537 subtype that is not frozen yet.
4538
45392014-07-29 Vincent Celier <celier@adacore.com>
4540
4541 * prj-proc.adb (Recursive_Process): Always initialize the
4542 environment when the project is an aggregate project, even when
4543 it is not the root tree.
0677a1c7
RD
45442014-07-29 Robert Dewar <dewar@adacore.com>
4545
4546 * exp_ch5.adb, exp_ch9.adb: Minor comment additions.
4547 * gnat_rm.texi: Complete list of implementation aspects.
4548 * aspects.ads: Minor comment clarification.
4549
a2cc9797
AC
45502014-07-29 Ed Schonberg <schonberg@adacore.com>
4551
4552 * exp_ch5.adb (Expand_N_Assignment_Statement): If the target type
4553 is a null-excluding access type, do not generate a constraint
4554 check if Suppress_Assignment_Checks is set on assignment node.
4555 * exp_ch9.adb (Build_Simple_Entry_Call): If actual is an out
4556 parameter of a null-excluding access type, there is access check
4557 on entry, so set Suppress_Assignment_Checks on generated statement
4558 that assigns actual to parameter block.
4559 * sinfo.ads: Document additional use of Suppress_Assignment_Checks.
4560
effdbb7d
AC
45612014-07-29 Robert Dewar <dewar@adacore.com>
4562
4563 * gnat_rm.texi: Change theta to @ in documentation of aspect
4564 Dimension_System.
4565
45662014-07-29 Robert Dewar <dewar@adacore.com>
4567
4568 * sem_attr.adb (Uneval_Old_Msg): Flags Uneval_Old_Accept/Warn
4569 are now on pragma.
4570 * sem_ch13.adb (Analyze_Aspect_Specifications): Remove setting
4571 of Uneval_Old_*
4572 * sem_prag.adb (Analyze_Pragma): Set Uneval_Old_* flags
4573 * sinfo.ads, sinfo.adb: Move Uneval_Old_Accept/Warn to N_Pragma node.
4574
45752014-07-29 Javier Miranda <miranda@adacore.com>
4576
4577 * types.ads Update documentation on how to add new reason codes
4578 for exceptions.
4579 (RT_Exception_Code): Keep values ordered by their
4580 reason code. Required by the .NET backend.
4581 (RT_CE_Exceptions): Subtype declaration removed.
4582 (RT_PE_Exceptions): Subtype declaration removed.
4583 (RT_SE_Exceptions): Subtype declaration removed.
4584 (Kind): New mapping table of RT_Exception_Codes.
4585 * exp_ch11.adb (Get_RT_Exception_Entity): Updated to use the
4586 new mapping table.
4587 * tbuild.adb (Make_Raise_Storage_Error): Updated to use the new
4588 mapping table. (Make_Raise_Program_Error): Updated to use the
4589 new mapping table.
4590 (Make_Raise_Storage_Error): Updated to use the new mapping table.
4591 * a-except.adb Keep Rcheck_CE_xxx entities ordered according to
4592 their reason code.
4593
09d67391
AC
45942014-07-29 Thomas Quinot <quinot@adacore.com>
4595
4596 * gnat_rm.texi: Document internal attributes used for PolyORB/DSA
4597 distributed stubs generation.
4598 * exp_ch3.adb: Minor reformatting.
4599
46002014-07-29 Yannick Moy <moy@adacore.com>
4601
4602 * sinfo.ads: Document constraint between frontend and GNATprove.
4603
c93af807
RD
46042014-07-29 Robert Dewar <dewar@adacore.com>
4605
4606 * a-except.adb: Minor comment clarification.
4607
46082014-07-29 Robert Dewar <dewar@adacore.com>
4609
4610 * gnat_rm.texi: Complete list of implementation attributes.
4611 * snames.ads-tmpl: Clean up list of impl-defined attributes.
4612
f9e333ab
AC
46132014-07-29 Hristian Kirtchev <kirtchev@adacore.com>
4614
4615 * freeze.adb (Freeze_Record_Type): Perform various
4616 volatility-related checks.
4617
46182014-07-29 Robert Dewar <dewar@adacore.com>
4619
4620 * sem_ch3.adb, sem_eval.adb: Minor reformatting.
4621
46222014-07-29 Ed Schonberg <schonberg@adacore.com>
4623
4624 * sem_attr.adb: sem_attr.adb (Access_Attribute): Handle properly
4625 the case where the attribute reference appears in a nested scope
4626 from that of the subprogram prefix.
4627 * sem_attr.adb: Minor reformatting.
4628
46292014-07-29 Robert Dewar <dewar@adacore.com>
4630
4631 * gnat_ugn.texi: Clarify documentation of Initialize_Scalar
4632 initialization options.
4633
87e69720
AC
46342014-07-29 Robert Dewar <dewar@adacore.com>
4635
4636 * sinfo.ads: Minor comment addition.
4637
46382014-07-29 Bob Duff <duff@adacore.com>
4639
4640 * sem_eval.adb, sem_ch13.adb: Minor reformatting.
4641
113a9fb6
AC
46422014-07-29 Doug Rupp <rupp@adacore.com>
4643
4644 * init.c: Complete previous change.
4645
46462014-07-29 Robert Dewar <dewar@adacore.com>
4647
4648 * exp_ch4.adb (Expand_N_If_Expression): Deal with unconstrained
4649 array case.
4650
46512014-07-29 Ed Schonberg <schonberg@adacore.com>
4652
4653 * sem_attr.adb (Access_Attribute): If the prefix is a subprogram
4654 and the completion will appear in the same declarative part,
4655 create elaboration flag.
4656 * exp_util.adb (Set_Elaboration_Flag): If the subprogram body
4657 is a completion of a declaration in the same declarative part,
4658 and the subprogram has had its address taken, add elaboration
4659 check inside the subprogram body, to detect elaboration errors
4660 that may occur through indirect calls.
4661
3808a9c7
AC
46622014-07-29 Doug Rupp <rupp@adacore.com>
4663
4664 * sigtramp-armvxw.c: Enhance to handle RTP trampolining.
4665 * init.c: Remove guard on sigtramp for ARM VxWorks RTP.
4666
46672014-07-29 Vincent Celier <celier@adacore.com>
4668
4669 * switch-c.adb (Scan_Front_End_Switches): Do not fail when two
4670 runtime directorie specified with two switches --RTS= designate
4671 the same directory, even when there are no literarily the same.
4672
46732014-07-29 Robert Dewar <dewar@adacore.com>
4674
4675 * gnat_ugn.texi: Minor documentation clarification.
4676 * switch-c.adb: Minor reformatting.
4677
24d14b91
AC
46782014-07-29 Robert Dewar <dewar@adacore.com>
4679
4680 * sem_prag.adb (Analyze_Pragma, case Allow_Integer_Address):
4681 Fix incorrect RTE call which caused bomb if pragma was in
4682 configuration pragma file.
4683
46842014-07-29 Jerome Lambourg <lambourg@adacore.com>
4685
4686 * expect.c (__gnat_expect_poll): Fix typo in previous change.
4687 * g-expect.adb: Update comments.
4688
46892014-07-29 Arnaud Charlet <charlet@adacore.com>
4690
4691 * s-parame-hpux.ads, s-parame-vms-ia64.ads, s-parame.ads
4692 (Default_Attribute_Count): Bump to 16 on native platforms.
4693
46942014-07-29 Ed Schonberg <schonberg@adacore.com>
4695
4696 * sem_res.adb: Add guard to front-end inlining for SPARK.
4697
b94b6c56
RD
46982014-07-29 Robert Dewar <dewar@adacore.com>
4699
4700 * sem_ch10.adb, debug.adb, sem_prag.adb, sem_res.adb, sem_ch6.adb:
4701 Minor reformatting.
4702
ecad37f3
ES
47032014-07-29 Ed Schonberg <schonberg@adacore.com>
4704
4705 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Build body to
4706 inline in GNATprove mode when subprogran is marked Inline_Always.
4707 * sem_res.adb (Resolve_Call): Expand call in place in GNATProve
4708 mode if body to inline is available.
4709 * sem_prag.adb (Analyze_Pragma, case Inline_Always): Make pragma
4710 effective in GNATprove mode.
4711 * sem_ch10.adb (Analyze_Compilation_Unit): Call
4712 Check_Package_Body_For_Inlining in GNATprove mode, so that body
4713 containing subprograms with Inline_Always can be available before
4714 calls to them.
4715
1773d80b
AC
47162014-07-29 Ed Schonberg <schonberg@adacore.com>
4717
4718 * inline.ads, inline.adb, sem_ch10.adb: Rename Check_Body_For_Inlining
4719 to Check_Package_Body_For_Inlining, to prevent confusion with other
4720 inlining subprograms.
4721
47222014-07-29 Robert Dewar <dewar@adacore.com>
4723
4724 * opt.ads: Minor comment update.
4725 * sem_attr.adb (Uneval_Old_Msg): Deal with case of aspect, where
4726 we want setting of Uneval_Old at time of encountering the aspect.
4727 * sem_ch13.adb (Analyze_Aspect_Specifications): Capture setting
4728 of Opt.Uneval_Old.
4729 * sinfo.adb (Uneval_Old_Accept): New function (Uneval_Old_Warn):
4730 New function (Set_Uneval_Old_Accept): New procedure.
4731 (Set_Uneval_Old_Warn): New procedure.
4732 * sinfo.ads: Uneval_Old_Accept: New flag Uneval_Old_Warn: New flag.
4733
3f80a182
AC
47342014-07-29 Robert Dewar <dewar@adacore.com>
4735
4736 * sinfo.ads, inline.adb, inline.ads, sem_ch6.adb: Minor reformatting.
4737 * snames.ads-tmpl: Minor reformatting.
4738 * xsnamest.adb (XSnamesT): Remove special casing of Name_Error
4739 to give <Error>. Not clear why this was there, but the compiler
4740 sources do not reference Name_Error, and this interfered with
4741 the circuits for pragma Unevaluated_Use_Of_Old.
4742
47432014-07-29 Hristian Kirtchev <kirtchev@adacore.com>
4744
4745 * sem_prag.adb (Process_Atomic_Shared_Volatile): Allow volatile
4746 types in SPARK 2014 (again).
4747 * sem_res.adb (Is_OK_Volatile_Context): New routine.
4748 (Resolve_Entity_Name): Ensure that a volatile object with
4749 enabled properties Async_Writers or Effectire_Reads appears in
4750 a non-interfering context.
4751
540d8610
ES
47522014-07-29 Ed Schonberg <schonberg@adacore.com>
4753
4754 * sem_ch6.adb: Move Build_Body_To_Inline,
4755 Check_And_Buid_Body_To_Inline, and Cannot_Inline to package Inline.
4756 * exp_ch6.adb: Mode Expand_Inlined_Body to package Inline.
4757 * inline.ads, inline.adb: Package now contains subprograms that
4758 implement front-end inlining. No functional changes, no test
4759 needed.
4760
b973629e
AC
47612014-07-29 Robert Dewar <dewar@adacore.com>
4762
4763 * exp_dbug.adb, g-expect.adb, sem_elab.adb: Minor typo fix.
4764
47652014-07-29 Ed Schonberg <schonberg@adacore.com>
4766
4767 * sem_ch6.adb (Analyze_Return_Type): Reject a return type that
4768 is a limited view when the context is a package body, because
4769 there is no subsequent place at which the non-limited view may
4770 become visible.
4771 (Process_Formals): Ditto.
4772 * sinfo.ads, par-ch3.adb: Minor reformatting.
4773
a7737c19
AC
47742014-07-29 Jerome Lambourg <lambourg@adacore.com>
4775
4776 * expect.c (__gnat_expect_poll): New parameter dead_process
4777 used to return the dead process among the array of file
4778 descriptors. The Windows, VMS and HPUX implementations now
4779 properly report the dead process via this parameter. Other unixes
4780 don't need it.
4781 * g-expect.adb (Poll): Adapt to the C profile.
4782 (Expect_Internal): Use the new parameter to properly close the
4783 File Descriptor. This then can be properly reported by the
4784 function First_Dead_Process as is expected.
4785
47862014-07-29 Robert Dewar <dewar@adacore.com>
4787
4788 * gnat_ugn.texi: Minor clarification of -gnatQ switch.
4789
ab01e614
AC
47902014-07-29 Robert Dewar <dewar@adacore.com>
4791
4792 * einfo.adb (Derived_Type_Link): New function
4793 (Set_Derived_Type_Link): New procedure.
4794 (Write_Field31_Name): Output Derived_Type_Link.
4795 * einfo.ads: New field Derived_Type_Link.
4796 * exp_ch6.adb (Expand_Call): Warn if change of representation
4797 needed on call.
4798 * sem_ch13.adb: Minor addition of ??? comment.
4799 (Rep_Item_Too_Late): Warn on case that is legal but could cause an
4800 expensive implicit conversion.
4801 * sem_ch3.adb (Build_Derived_Type): Set Derived_Type_Link if needed.
4802
48032014-07-29 Hristian Kirtchev <kirtchev@adacore.com>
4804
4805 * exp_ch3.adb (Build_Init_Procedure): Renamed Local_DF_Id
4806 to DF_Id. Add new local variable DF_Call. Do not perform any
4807 elaboration-related checks on the call to the partial finalization
4808 routine within an init proc to avoid generating bogus elaboration
4809 warnings on expansion-related code.
4810 * sem_elab.adb (Check_A_Call): Move constant Access_Case to
4811 the top level of the routine. Ensure that Output_Calls takes
4812 into account flags -gnatel and -gnatwl when emitting warnings
4813 or info messages.
4814 (Check_Internal_Call_Continue): Update the call to Output_Calls.
4815 (Elab_Warning): Moved to the top level of routine Check_A_Call.
4816 (Emit): New routines.
4817 (Output_Calls): Add new formal parameter Check_Elab_Flag along with a
4818 comment on usage. Output all warnings or info messages only when the
4819 caller context demands it and the proper elaboration flag is set.
4820
48212014-07-29 Yannick Moy <moy@adacore.com>
4822
4823 * sem_attr.adb (Analyze_Attribute/Attribute_Old):
4824 Check rule about Old appearing in potentially unevaluated
4825 expression everywhere, not only in Post.
4826
48272014-07-29 Arnaud Charlet <charlet@adacore.com>
4828
4829 * sem_prag.adb: Update comment.
4830 * a-except.adb, a-except-2005.adb: Minor editing.
4831
48322014-07-29 Pierre-Marie Derodat <derodat@adacore.com>
4833
4834 * exp_dbug.adb (Debug_Renaming_Declaration):
4835 Do not create renaming entities for renamings of non-packed
4836 objects and for exceptions.
4837
a8b346d2
RD
48382014-07-29 Robert Dewar <dewar@adacore.com>
4839
4840 * sem_ch3.adb, sinfo.ads, types.ads, sem_prag.adb, a-except-2005.adb,
4841 sem_ch6.adb, par-ch3.adb: Minor reformatting.
4842
84c0a895
AC
48432014-07-29 Ed Schonberg <schonberg@adacore.com>
4844
4845 * sem_ch6.adb (Check_Return_Subtype_Indication): Reject a return
4846 subtype indication in an extended return statement when the
4847 return value is an ancestor of the return type of the function,
4848 and that return type is a null record extension.
4849
48502014-07-29 Thomas Quinot <quinot@adacore.com>
4851
4852 * sem_ch13.adb (Rep_Item_Too_Late): Specialize/clarify error
4853 message produced for the case of a type-related representation
4854 item that is made illegal by 13.10(1).
4855 * gnat_rm.texi (Scalar_Storage_Order): Minor change in
4856 documentation.
4857
7a2c2277
AC
48582014-07-29 Robert Dewar <dewar@adacore.com>
4859
4860 * gnat_ugn.texi: Add section on Wide_Wide_Character encodings.
4861 * erroutc.adb (Output_Error_Msgs): Take wide characters into
4862 account in computing position of error flags.
4863 * sinput.adb (Get_Column_Number): Take wide characters into
4864 account.
4865
48662014-07-29 Ed Schonberg <schonberg@adacore.com>
4867
4868 * par-ch3.adb (P_Access_Type_Definition): The subtype indication
4869 in an access type definition can carry a null_exclusion indicator.
4870 * sem_ch3.adb (Access_Type_Declaration): If the subtype indication
4871 carries a null_exclusion indicator, verify that the subtype
4872 indication denotes an access type, and create a null-excluding
4873 subtype for it.
4874 * sinfo.ads, sinfo.adb: New attribute Null_Excluding_Subtype,
4875 defined on N_Access_To_Object_Definition to indicate that the
4876 subtype indication carries a null_exclusion indicator.
4877
48782014-07-29 Hristian Kirtchev <kirtchev@adacore.com>
4879
4880 * exp_ch6.adb (Add_Extra_Actual): Do not construct
4881 the extra actual by name, generate a reference instead.
4882
48832014-07-29 Arnaud Charlet <charlet@adacore.com>
4884
4885 * sem_prag.adb (Analyze_Pragma): Do not crash analyzing
4886 Allow_Integer_Address if already set.
4887 * a-except-2005.adb (Rcheck_PE_Stream_Operation_Not_Allowed):
4888 Fix order, for consistency with Rmsg_xx declarations.
4889
28e18b4f
AC
48902014-07-29 Ed Schonberg <schonberg@adacore.com>
4891
4892 * sem_ch4.adb (Complete_Object_Operation): If the type of the
4893 candidate subprogram is a limited view, use non-limited view
4894 when available.
4895
48962014-07-29 Robert Dewar <dewar@adacore.com>
4897
4898 * sem_ch13.adb: Minor change in RM reference.
4899 * sem_mech.ads: Minor reformatting.
4900 * einfo.ads: Minor comment fix.
4901 * types.ads: Minor correction to range given for Mechanism_Type.
4902 * exp_ch6.adb (Add_Invariant_And_Predicate_Checks): Do not
4903 check predicate on way out for OUT or IN OUT parameters.
4904 * par-ch3.adb (P_Constraint_Opt): Handle missing RANGE keyword
4905 better (P_Range_Constraint): Corresponding fix.
4906 * checks.ads: Minor comment clarification.
4907
49082014-07-29 Gary Dismukes <dismukes@adacore.com>
4909
4910 * sem_ch8.adb (Analyze_Object_Renaming): Set the Is_Volatile
4911 and Treat_As_Volatile flags based on whether the renamed object
4912 is a volatile object.
4913
f8c79ade
AC
49142014-07-29 Olivier Hainque <hainque@adacore.com>
4915
4916 * g-debpoo.adb
4917 (Default_Alignment): Rename as Storage_Alignment. This is not
4918 a "default" that can be overriden. Augment comment to clarify
4919 intent and document why we need to manage alignment padding.
4920 (Header_Offset): Set to Header'Object_Size instead of 'Size
4921 rounded up to Storage_Alignment. Storage_Alignment on the
4922 allocation header is not required by our internals so was
4923 overkill. 'Object_Size is enough to ensure proper alignment
4924 of the header address when substracted from a storage address
4925 aligned on Storage_Alignment.
4926 (Minimum_Allocation): Rename as Extra_Allocation, conveying that
4927 this is always added on top of the incoming allocation requests.
4928 (Align): New function, to perform alignment rounding operations.
4929 (Allocate): Add comments on the Storage_Address computation
4930 scheme and adjust so that the alignment padding applies to that
4931 (Storage_Address) only.
4932
49332014-07-29 Robert Dewar <dewar@adacore.com>
4934
4935 * exp_ch3.adb (Default_Initialize_Object): Remove incorrect
4936 pragma Unreferenced.
4937 * cstand.adb (Create_Standard): Use E_Array_Type for standard
4938 string types. Make sure index of Any_String/Any_Array is in a list.
4939 * errout.adb: Minor reformatting.
4940
b329a739
AC
49412014-07-29 Robert Dewar <dewar@adacore.com>
4942
4943 * gnat_ugn.texi: Clean up and correct documentation of warnings.
4944 * usage.adb: Minor corrections to make sure warnings are properly
4945 documented.
4946 * warnsw.adb (Set_Warning_Switch): Remove redundant return statement.
4947 (WA_Warnings): Add Warn_On_Suspicious_Modulus_Value.
4948
49492014-07-29 Ed Schonberg <schonberg@adacore.com>
4950
4951 * exp_ch3.adb (Expand_N_Object_Declaration): The dummy block
4952 created to match internal sequence numbers between compilations
4953 with/without abort must have its type properly set.
4954
220d1fd9
AC
49552014-07-29 Robert Dewar <dewar@adacore.com>
4956
4957 * ali.adb (Initialize_ALI): Initialize SSO_Default_Specified
4958 (Scan_ALI): Set SSO_Default in ALIs_Record (Scan_ALI): Set
4959 SSO_Default_Specified.
4960 * ali.ads (ALIs_Record): Add field SSO_Default
4961 (SSO_Default_Specified): New global switch.
4962 * bcheck.adb (Check_Consistent_SSO_Default): New procedure
4963 (Check_Configuration_Consistency): Call this procedure
4964 * einfo.adb (SSO_Set_High_By_Default): New
4965 function (SSO_Set_Low_By_Default): New function
4966 (Set_SSO_Set_High_By_Default): New procedure
4967 (Set_SSO_Set_Low_By_Default): New procedure (Write_Entity_Flags):
4968 List new flags
4969 * einfo.ads (SSO_Set_Low_By_Default): New flag
4970 (SSO_Set_High_By_Default): New flag
4971 * freeze.adb (Set_SSO_From_Default): New procedure
4972 (Freeze_Array_Type): Call Set_SSO_From_Default
4973 (Freeze_Record_Type): Call Set_SSO_From_Default
4974 * gnat_rm.texi: Document pragma Default_Scalar_Storage_Order
4975 * lib-writ.adb (Write_ALI): Set OL/OH in P line as needed
4976 * lib-writ.ads: Add OL/OH parameters to P line
4977 * opt.adb: Set Default_SSO, Default_SSO_Config as appropriate
4978 * opt.ads (Default_SSO): New global switch (Default_SSO_Config):
4979 New global switch
4980 * repinfo.adb (List_Scalar_Storage_Order): List SSO when it is
4981 set by default using pragma Default_Scalar_Storage_Order.
4982 * sem.ads (Scope_Stack_Entry): Add component Save_Default_SSO
4983 * sem_ch13.adb (Inherit_Delayed_Rep_Aspects):
4984 Clear SSO defaults when explicit SSO is inherited.
4985 (Analyze_Attribute_Definition_Clause): Clear SSO defaults when
4986 explicit SSO is specified.
4987 (Inherit_Aspects_At_Freeze_Point):
4988 Clear SSO default when inheriting SSO.
4989 * sem_ch3.adb (Set_Default_SSO): New procedure
4990 (Analyze_Private_Extension_Declaration): Set defualt SSO
4991 (Array_Type_Declaration): ditto (Build_Derived_Array_Type): ditto
4992 (Build_Derived_Private_Type): ditto (Build_Derived_Record_Type):
4993 ditto (Build_Derived_Type): ditto (Make_Class_Wide_Type): ditto
4994 (Record_Type_Declaration): ditto
4995 * sem_ch8.adb (Pop_Scope): Restore Default_SSO (Push_Scope):
4996 Save Default_SSO
4997 * sem_prag.adb (Analyze_Pragma, case
4998 Default_Scalar_Storage_Order): Set Default_SSO
4999
50002014-07-29 Ed Schonberg <schonberg@adacore.com>
5001
5002 * sem_ch6.adb (Valid_Operator_Definition): Verify that
5003 all parameter have mode IN. This check must be done here for
5004 subprogram instantiations that have operator names, because their
5005 analysis does not follow the same path as that for subprogram
5006 declarations.
5007
a08bf2de
RD
50082014-07-29 Robert Dewar <dewar@adacore.com>
5009
5010 * freeze.adb (Freeze_Entity, Concurrent_Type case): Add a guard
5011 to make sure that the Etype of a component of the corresponding
5012 record type is present before trying to freeze it.
5013 * sem_ch5.adb: Minor reformatting.
5014
b8b2d982
AC
50152014-07-29 Robert Dewar <dewar@adacore.com>
5016
5017 * exp_attr.adb, types.ads, types.h, exp_ch11.adb, a-except.adb,
5018 a-except-2005.adb: Add new reason code PE_Stream_Operation_Not_Allowed,
5019 and then use it when a stream operation is used from a library generic
5020 when the restriction (No_Streams) is active.
5021
50222014-07-29 Thomas Quinot <quinot@adacore.com>
5023
5024 * projects.texi: Fix minor typo.
5025
50262014-07-29 Yannick Moy <moy@adacore.com>
5027
5028 * sem_attr.adb (Analyze_Attribute): Fix generation of warning.
5029
50302014-07-29 Arnaud Charlet <charlet@adacore.com>
5031
5032 * sem_ch5.adb (Check_Unreachable_Code): Do not remove code in
5033 CodePeer mode.
5034
50352014-07-29 Hristian Kirtchev <kirtchev@adacore.com>
5036
5037 * exp_ch7.adb (Find_Last_Init): Add local variable
5038 Deep_Init_Found. Check the statement immediately following the
5039 declaration if [Deep_]Initialization was not found.
5040
50412014-07-29 Hristian Kirtchev <kirtchev@adacore.com>
5042
5043 * exp_util.adb (Is_Aliased): It appears that
5044 'reference-d and renamed objects still play some role in Boolean
5045 expression with actions and cannot be finalized immediately.
5046
50472014-07-29 Ed Schonberg <schonberg@adacore.com>
5048
5049 * exp_dbug.adb (Qualify_Needed): For debugging purposes,
5050 Loop names are not part of the full qualification of entity names.
5051
02bb0765
AC
50522014-07-29 Robert Dewar <dewar@adacore.com>
5053
5054 * einfo.adb (Has_Protected): Test base type.
5055 * sem_ch4.adb (Analyze_Allocator): Reorganize code to make sure
5056 that we always properly check No_Protected_Type_Allocators.
5057
50582014-07-29 Ed Schonberg <schonberg@adacore.com>
5059
5060 * sem_util.ads, sem_util.adb (Defining_Entity): Now applies to
5061 loop declarations as well.
5062 * exp_ch5.adb (Expand_Loop_Statement): Apply Qualify_Entity_Names
5063 to an iterator loop, because it may contain local renaming
5064 declarations that require debugging information.
5065
50662014-07-29 Robert Dewar <dewar@adacore.com>
5067
5068 * sem_util.ads, exp_util.adb, sem_attr.adb: Minor reformatting.
5069
fc3a3f3b
RD
50702014-07-29 Robert Dewar <dewar@adacore.com>
5071
5072 * einfo.ads, einfo.adb (Static_Real_Or_String_Predicate): New function
5073 (Set_Static_Real_Or_String_Predicate): New procedure
5074 * sem_ch13.adb (Build_Predicate_Functions): Accomodate static
5075 string predicates (Is_Predicate_Static): Handle static string
5076 predicates.
5077 * sem_eval.adb (Real_Or_String_Static_Predicate_Matches):
5078 New procedure (Check_Expression_Against_Static_Predicate):
5079 Deal with static string predicates, now fully implemented
5080 (Eval_Relational_Op): Allow string equality/inequality as static
5081 if not comes from source.
5082
60f908dd
RD
50832014-07-29 Robert Dewar <dewar@adacore.com>
5084
5085 * sem_aggr.adb, exp_ch5.adb, sem_ch5.adb, exp_util.adb, einfo.adb,
5086 einfo.ads, sem_util.adb, sem_attr.adb, sem_case.adb, sem_eval.adb,
5087 sem_eval.ads, sem_ch13.adb: General cleanup of static predicate
5088 handling. Change name of Discrete_Predicate to
5089 Discrete_Static_Predicate, and replace testing of the presence of this
5090 field by testing the flag Has_Static_Expression.
5091
96e90ac1
RD
50922014-07-29 Robert Dewar <dewar@adacore.com>
5093
5094 * gnat_rm.texi: Document pragma Unevaluated_Use_Of_Old.
5095 * opt.adb: Handle Uneval_Old.
5096 * opt.ads (Uneval_Old, Uneval_Old_Config): New variables.
5097 * par-prag.adb: Add dummy entry for pragma Unevaluated_Use_Of_Old.
5098 * sem.ads (Save_Uneval_Old): New field in Scope_Stack_Entry.
5099 * sem_attr.adb (Uneval_Old_Msg): New procedure.
5100 * sem_ch8.adb (Push_Scope): Save Uneval_Old.
5101 (Pop_Scope): Restore Uneval_Old.
5102 * sem_prag.adb (Analyze_Pragma, case Unevaluated_Use_Of_Old):
5103 Implemented.
5104 * snames.ads-tmpl: Add entries for pragma Unevaluated_Use_Of_Old
5105 Add entries for Name_Warn, Name_Allow.
5106
edab6088
RD
51072014-07-29 Robert Dewar <dewar@adacore.com>
5108
5109 * sem_aggr.adb (Resolve_Array_Aggregate): Change Is_Static_Range
5110 to Is_OK_Static_Range.
5111 * sem_attr.adb (Eval_Attribute): Make sure we properly flag
5112 static attributes (Eval_Attribute, case Size): Handle size of
5113 zero properly (Eval_Attribute, case Value_Size): Handle size of
5114 zero properly.
5115 * sem_ch13.adb: Minor reformatting.
5116 * sem_ch3.adb (Process_Range_Expr_In_Decl): Change
5117 Is_Static_Range to Is_OK_Static_Range.
5118 * sem_eval.adb (Eval_Case_Expression): Total rewrite, was
5119 wrong in several ways (Is_Static_Range): Moved here from spec
5120 (Is_Static_Subtype): Moved here from spec Change some incorrect
5121 Is_Static_Subtype calls to Is_OK_Static_Subtype.
5122 * sem_eval.ads: Add comments to section on
5123 Is_Static_Expression/Raises_Constraint_Error (Is_OK_Static_Range):
5124 Add clarifying comments (Is_Static_Range): Moved to body
5125 (Is_Statically_Unevaluated): New function.
5126 * sem_util.ads, sem_util.adb (Is_Preelaborable_Expression): Change
5127 Is_Static_Range to Is_OK_Static_Range.
5128 * sinfo.ads: Additional commments for Is_Static_Expression noting
5129 that clients should almost always use Is_OK_Static_Expression
5130 instead. Many other changes throughout front end units to obey
5131 this rule.
5132 * tbuild.ads, tbuild.adb (New_Occurrence_Of): Set Is_Static_Expression
5133 for enumeration literal.
5134 * exp_ch5.adb, sem_intr.adb, sem_ch5.adb, exp_attr.adb, exp_ch9.adb,
5135 lib-writ.adb, sem_ch9.adb, einfo.ads, checks.adb, checks.ads,
5136 sem_prag.adb, sem_ch12.adb, freeze.adb, sem_res.adb, exp_ch4.adb,
5137 exp_ch6.adb, sem_ch4.adb, sem_ch6.adb, exp_aggr.adb, sem_cat.adb:
5138 Replace all occurrences of Is_Static_Expression by
5139 Is_OK_Static_Expression.
5140
c5c780e6
HK
51412014-07-29 Hristian Kirtchev <kirtchev@adacore.com>
5142
5143 * exp_ch4.adb (Process_Transient_Object): Remove constant
5144 In_Cond_Expr, use its initialization expression in place.
5145 * exp_ch7.adb (Process_Declarations): There is no need to check
5146 that a transient object being hooked is controlled as it would
5147 not have been hooked in the first place.
5148 * exp_util.adb (Is_Aliased): 'Reference-d or renamed transient
5149 objects are not considered aliased when the related context is
5150 a Boolean expression_with_actions.
5151 (Requires_Cleanup_Actions): There is no need to check that a transient
5152 object being hooked is controlled as it would not have been hooked in
5153 the first place.
5154
e2bc5465
AC
51552014-07-29 Robert Dewar <dewar@adacore.com>
5156
5157 * errout.adb: Minor reformatting.
5158
51592014-07-29 Hristian Kirtchev <kirtchev@adacore.com>
5160
5161 * exp_ch3.adb (Default_Initialize_Object): Add new variables
5162 Abrt_Blk and Dummy. Generate a dummy temporary when aborts are
5163 not allowed to ensure the symmetrical generation of symbols.
5164 * exp_ch7.adb (Build_Object_Declarations): Remove variables A_Expr
5165 and E_Decl. Add new variables Decl and Dummy. Generate a dummy
5166 temporary when aborts are not allowed to ensure symmertrical
5167 generation of symbols.
5168 * exp_intr.adb (Expand_Unc_Deallocation): Add new variable
5169 Dummy. Generate a dummy temporary when aborts are not allowed
5170 to ensure symmertrical generation of symbols.
5171
51722014-07-29 Ed Schonberg <schonberg@adacore.com>
5173
5174 * exp_dbug.adb (Debug_Renaming_Declaration): For an object
5175 renaming, indicate that the renamed entity itself needs debug
5176 information. This is necessary if that entity is a temporary,
5177 e.g. part of the expansion of an explicit dereference in an
5178 iterator.
5179
414c6563
AC
51802014-07-29 Thomas Quinot <quinot@adacore.com>
5181
5182 * errout.adb (Set_Error_Posted): When propagating flag to
5183 an enclosing named association, also propagate to the parent
5184 of that node, so that named and positional associations are
5185 treated consistently.
5186
51872014-07-29 Ed Schonberg <schonberg@adacore.com>
5188
5189 * sem_attr.adb (Resolve_Attribute, case 'Update): Set
5190 Do_Range_Check properly on array component expressions that
5191 have a scalar type. In GNATprove mode, only checks on scalar
5192 components must be marked by the front-end.
5193
51942014-07-29 Ed Schonberg <schonberg@adacore.com>
5195
5196 * sem_res.adb (Resolve_Type_Conversion): If the type of the
5197 expression is a limited view, use the non-limited view when
5198 available.
5199
52002014-07-29 Hristian Kirtchev <kirtchev@adacore.com>
5201
5202 * exp_ch4.adb (Expand_N_Case_Expression): Mark the generated
5203 case statement as coming from a conditional expression.
5204 (Expand_N_If_Expression): Mark the generated if statement as
5205 coming from a conditional expression.
5206 * exp_ch5.adb (Expand_N_Case_Statement): Do not process controlled
5207 objects found in case statement alternatives when the case
5208 statement is actually a case expression.
5209 (Expand_N_If_Statement):
5210 Do not process controlled objects found in an if statement when
5211 the if statement is actually an if expression.
5212 * sinfo.adb (From_Conditional_Expression): New routine.
5213 (Set_From_Conditional_Expression): New routine.
5214 * sinfo.ads Add new semantic flag From_Conditional_Expression and
5215 update related nodes.
5216 (From_Conditional_Expression): New routine along with pragma Inline.
5217 (Set_From_Conditional_Expression): New routine along with pragma Inline.
5218
0382062b
AC
52192014-07-29 Hristian Kirtchev <kirtchev@adacore.com>
5220
5221 * exp_ch7.adb (Build_BIP_Cleanup_Stmts): Remove
5222 formal parameter Obj_Id and update the comment on usage. Renamed
5223 Obj_Typ to Func_Typ and update all occurrences.
5224 (Find_Last_Init): Remove formal parameter Decl and update the comment
5225 on usage.
5226 Remove local constants Obj_Id and Obj_Typ. Remove local variables
5227 Init_Typ and Is_Conc. Remove the extraction of the initialization type.
5228 (Find_Last_Init_In_Block): Remove formal parameter
5229 Init_Typ and update the comment on usage.
5230 (Is_Init_Call): Remove formal parameter Init_Typ and update the comment
5231 on usage. Check whether the procedure call is an initialization
5232 procedure of either the object type or the initialization type.
5233 (Is_Init_Proc_Of): New routine.
5234 (Process_Object_Declaration): Obj_Id and Obj_Typ are now global to this
5235 routine. Add new variable Init_Typ. Add circuitry to extract the object
5236 type as well as the initialization type.
5237
52382014-07-29 Robert Dewar <dewar@adacore.com>
5239
5240 * sem_case.adb: Minor reformatting.
5241 * sem_aux.ads: Minor reformatting.
5242
52432014-07-29 Ed Schonberg <schonberg@adacore.com>
5244
5245 * sinfo.adb (Set_Else_Actions, Set_Then_Actions): Set parent
5246 pointer on these fields, even though they are semantic, because
5247 subsequent analysis and expansion of action nades may require
5248 exploring the tree, for example to locate a node to be wrapped
5249 when a function with controlled result is called.
5250
52512014-07-29 Claire Dross <dross@adacore.com>
5252
5253 * sem_aux.adb (Get_Binary_Nkind): Use case on
5254 Name_Id instead of an intermediate string.
5255 (Get_Unary_Nkind): Use case on Name_Id instead of an intermediate
5256 string.
5257
52582014-07-29 Sergey Rybin <rybin@adacore.com frybin>
5259
5260 * gnat_ugn.texi (gnatelim, gnatstub, gnatmetric): Add note
5261 about processing sources with preprocessor directives.
5262
037e5573
ML
52632014-07-24 Martin Liska <mliska@suse.cz>
5264
04db0548 5265 * gcc-interface/trans.c (finalize_nrv): Adjust function call.
037e5573
ML
5266 * gcc-interface/utils.c (rest_of_subprog_body_compilation): Likewise.
5267 (gnat_write_global_declarations): Likewise.
5268
a9bc2242
DW
52692014-07-19 David Wohlferd <dw@LimeGreenSocks.com>
5270
5271 * gnat_rm.texi: Clean up for makeinfo 5.2.
5272
c6d27333
DW
52732014-07-19 David Wohlferd <dw@LimeGreenSocks.com>
5274
5275 * gnat_rm.texi (Machine Code Insertions): Clean up.
5276
4b03d946
AC
52772014-07-18 Robert Dewar <dewar@adacore.com>
5278
5279 * exp_ch7.adb: Minor reformatting.
5280
52812014-07-18 Claire Dross <dross@adacore.com>
5282
5283 * sem_aux.ads (Get_Binary_Nkind): New function that returns
5284 the Node_Kind value of an entity defining a binary operator.
5285 (Get_Unary_Nkind): New function that returns the Node_Kind value
5286 of an entity defining a unary operator.
5287
52882014-07-18 Pascal Obry <obry@adacore.com>
5289
5290 * sysdep.c: comment update.
5291 * adaint.c (__gnat_fputwc): Use wchar_t on a limited set of
5292 platforms where it is known to be supported.
5293
52942014-07-18 Thomas Quinot <quinot@adacore.com>
5295
5296 * sem_dist.adb (Process_Remote_AST_Declaration): Need
5297 to set Fat_Type's Ekind in order to be able to use its
5298 Corresponding_Remote_Type attribute.
5299
4ac2bbbd
AC
53002014-07-18 Hristian Kirtchev <kirtchev@adacore.com>
5301
5302 * einfo.adb Last_Aggregate_Assignment is now Node 30.
5303 (Last_Aggregate_Assignment): Include
5304 constants in the assertion. Update the underlying node.
5305 (Set_Last_Aggregate_Assignment): Include constants in the
5306 assertion. Update the underlying node. (Write_Field11_Name):
5307 Remove the entry for Last_Aggregate_Assignment.
5308 (Write_Field30_Name): Add an entry for Last_Aggregate_Assignment.
5309 * einfo.ads Update the node designation and usage of attribute
5310 Last_Aggregate_Assignment.
5311 * exp_aggr.adb (Expand_Array_Aggregate): Store the last
5312 assignment statement used to initialize a controlled object.
5313 (Late_Expansion): Store the last assignment statement used to
5314 initialize a controlled record or an array of controlled objects.
5315 * exp_ch3.adb (Expand_N_Object_Declaration): Default
5316 initialization of objects is now performed in a separate routine.
5317 (Default_Initialize_Object): New routine.
5318 * exp_ch7.adb (Build_BIP_Cleanup_Stmts): Add formal parameter
5319 Obj_Id. Update the comment on usage.
5320 (Find_Last_Init): Remove formal parameter Typ. Update comment on usage.
5321 Reimplement the logic. (Find_Last_Init_In_Block): New routine.
5322 (Is_Init_Call): Add formal parameter Init_Typ. Update the
5323 comment on usage. Account for the type init proc when trying
5324 to determine whether a statement is an initialization call.
5325 (Make_Adjust_Call): Rename formal parameter For_Parent to
5326 Skip_Self. Update all occurrences of For_Parent. Account for
5327 non-tagged types. Update the call to Make_Call.
5328 (Make_Call): Rename formal parameter For_Parent to Skip_Self. Update
5329 comment on usage. Update all occurrences of For_Parent.
5330 (Make_Final_Call): Rename formal parameter For_Parent to
5331 Skip_Self. Update all occurrences of For_Parent. Account
5332 for non-tagged types. Update the call to Make_Call.
5333 (Process_Object_Declaration): Most variables and constants are
5334 now local to the routine.
5335 * exp_ch7.ads (Make_Adjust_Call): Rename formal parameter
5336 For_Parent to Skip_Self. Update the comment on usage.
5337 (Make_Final_Call): Rename formal parameter For_Parent to
5338 Skip_Self. Update the comment on usage.
5339
53402014-07-18 Ed Schonberg <schonberg@adacore.com>
5341
5342 * sem_ch9.adb (Analyze_Requeue): The entry being referenced
5343 can be a procedure that is implemented by entry, and have a
5344 formal that is a synchronized interface. It does not have to
5345 be declared as a protected operation.
5346
676fa397
AC
53472014-07-18 Robert Dewar <dewar@adacore.com>
5348
2941bf7d
AC
5349 * gnat_rm.texi: Remove mention of obsolete attributes
5350 Max[_Interrupt]_Priority, which have never been implemented
5351 (or at the very least were removed long ago if they ever were
5352 implemented. Add documentation of Max[_Interrupt]_Priority
5353 constants in package System.
5354 * ttypes.ads: Document actual handling of package System,
5355 rather than a historical fantasy version. Remove mention of
5356 non-existent attributes Max[_Interrupt]_Priority.
5357
53582014-07-18 Pascal Obry <obry@adacore.com>
5359
5360 * a-witeio.adb (Put): No 16-bit character output when text
5361 translation is disabled.
5362 * i-cstrea.ads: Code clean up.
04db0548 5363
2941bf7d
AC
53642014-07-18 Robert Dewar <dewar@adacore.com>
5365
676fa397
AC
5366 * gnat_rm.texi: Document that Wchar_T_Size and Word_Size are
5367 static attributes.
5368
53692014-07-18 Arnaud Charlet <charlet@adacore.com>
5370
5371 * a-witeio.adb, initialize.c: Update comments. Minor clean ups.
5372
53732014-07-18 Pascal Obry <obry@adacore.com>
5374
5375 * adaint.c: Do not include wchar.h on VxWorks.
5376 * mingw32.h: Remove obsolete definition.
5377
cd077efd
PO
53782014-07-18 Pascal Obry <obry@adacore.com>
5379
5380 * a-textio.adb, a-witeio.adb, a-ztexio.adb: Use C_Streams Default_Text.
5381 * i-cstrea.ads (Content_Encoding): Moved here, add convention C.
5382 * s-ficobl.ads (Content_Encoding): Moved to C_Streams.
5383 * s-fileio.adb (Open): Adjust to use Content_Encoding from C_Streams.
5384
18f2c460
PO
53852014-07-18 Pascal Obry <obry@adacore.com>
5386
5387 * a-textio.adb: Rename Is_Text_File to Text_Encoding.
5388 * a-ztexio.adb: Likewise.
5389 * a-witeio.adb: Likewise.
5390 (Open): Pass file's translation mode to set_text_mode.
5391 * s-ficobl.ads (Content_Encoding): New type.
5392 (Text_Content_Encoding): New subtype.
5393 (AFCB): Rename Is_Text_File to Text_Encoding.
5394 * s-fileio.adb (Open): Handles new text_translation
5395 values. Remove Is_Text_File which is equivalent to Text_Encoding
5396 in Text_Content_Encoding.
5397 * adaint.h (__gnat_set_mode): New routine.
5398 * sysdep.c (__gnat_set_wide_text_mode): Removed.
5399 (__gnat_set_mode): New routine.
5400
1a4cb227
AC
54012014-07-18 Arnaud Charlet <charlet@adacore.com>
5402
5403 * gcc-interface/decl.c, gcc-interface/trans.c,
5404 gcc-interface/utils.c (Is_Packed_Array_Type): Renamed
5405 Is_Packed_Array_Impl_Type.
5406
c74afd84
AC
54072014-07-18 Gary Dismukes <dismukes@adacore.com>
5408
5409 * sem_util.adb: Minor typo correction.
5410
54112014-07-18 Ben Brosgol <brosgol@adacore.com>
5412
5413 * gnat_rm.texi: Complete previous change.
5414
54152014-07-18 Pascal Obry <obry@adacore.com>
5416
5417 * s-fileio.adb: Minor style fix.
5418
54192014-07-18 Ed Schonberg <schonberg@adacore.com>
5420
5421 * sem_ch13.adb (Analyze_Aspect_Specifications): Detect improper
5422 specification of stream attributes for subtypes that are not
5423 first subtypes, to prevent malformed rep_item chains in the case
5424 of such illegal specifications for discriminated private subtypes.
5425 (Check_Overloaded_Name): Verify that the name is an entity name
5426 before other checks.
5427
54282014-07-18 Pascal Obry <obry@adacore.com>
5429
5430 * adaint.c (__gnat_fputwc) Do not disable on cross-build.
5431
50ea6357
AC
54322014-07-18 Robert Dewar <dewar@adacore.com>
5433
5434 * sem_prag.adb, sem_attr.adb,
5435 sem_aggr.adb, sinfo.ads, sem_eval.ads: Minor reformatting.
5436
54372014-07-18 Pascal Obry <obry@adacore.com>
5438
5439 * sysdep.c (__gnat_wide_text_translation_required): Removed from here.
5440 * initialize.c (__gnat_wide_text_translation_required): Defined here.
5441
54422014-07-18 Pascal Obry <obry@adacore.com>
5443
5444 * adaint.c (__gnat_fputwc): New routine.
5445 * s-crtl.ads (fputwc): Now imported as __gnat_fputwc.
5446
54472014-07-18 Hristian Kirtchev <kirtchev@adacore.com>
5448
5449 * einfo.adb: Flag 270 is now used as Stores_Attribute_Old_Prefix.
5450 (Set_Stores_Attribute_Old_Prefix): New routine.
5451 (Stores_Attribute_Old_Prefix): New routine.
5452 (Write_Entity_Flags):
5453 Output flag Stores_Attribute_Old_Prefix.
5454 * einfo.ads Add new flag Stores_Attribute_Old_Prefix along with
5455 comment on usage.
5456 (Set_Stores_Attribute_Old_Prefix): New routine
5457 along with pragma Inline.
5458 (Stores_Attribute_Old_Prefix): New
5459 routine along with pragma Inline.
5460 * exp_attr.adb (Expand_N_Attribute_Reference): Mark the generated
5461 constant which captures the result of attribute 'Old's prefix.
5462 * sem_util.adb (In_Assertion_Expression_Pragma): Recognize a
5463 relocated expression which acted as a prefix of attribute 'Old.
5464
54652014-07-18 Bob Duff <duff@adacore.com>
5466
5467 * s-spsufi.adb (Finalize_And_Deallocate): Set Subpool.Owner to
5468 null before dispatching to Deallocate_Subpool.
5469 * s-stposu.ads (Default_Subpool_For_Pool): Change mode of
5470 parameter of Default_Subpool_For_Pool to 'in out'.
5471 * s-stposu.adb (Set_Pool_Of_Subpool): Use raise expression. Add
5472 a message to the raise.
5473 * sem_util.adb: Minor reformatting.
5474
c624298a
AC
54752014-07-18 Robert Dewar <dewar@adacore.com>
5476
5477 * sem_util.adb (Check_Expression_Against_Static_Predicate):
5478 Mark expression as non-static if it fails static predicate check,
5479 and issue additional warning.
5480
54812014-07-18 Pascal Obry <obry@adacore.com>
5482
5483 * a-witeio.adb (Put): Control translation based on
5484 wide_text_translation_required.
5485 * adaint.c (CurrentCCSEncoding): New variable.
5486 * initialize.c (__gnat_initialize): On Windows initialize
5487 CurrentCCSEncoding based on values in GNAT_CCS_ENCODING
5488 environment variable.
5489 * mingw32.h (CurrentCCSEncoding): New external.
5490 (__gnat_wide_text_translation_required): Likewise.
5491 * sysdep.c (wide_text_translation_required): New variable.
5492 (__gnat_set_wide_text_mode): Set mode based on CurrentCCSEncoding.
5493
54942014-07-18 Hristian Kirtchev <kirtchev@adacore.com>
5495
5496 * sem_prag.adb (Analyze_Refined_Depends_In_Decl_Part): Remove global
5497 variable Refined_States. Add global variable Matched_Items.
5498 (Check_Dependency_Clause): Account for dependency
5499 clauses utilizing states with visible null refinements.
5500 (Is_Null_Refined_State): New routine.
5501 (Match_Items): Record each successfully matched item of pragma Depends.
5502 (Record_Item): New routine.
5503
55042014-07-18 Ed Schonberg <schonberg@adacore.com>
5505
5506 * sem_attr.adb (Analyze_Attribute, case 'Update): Set
5507 Do_Range_Check flag on a dynamic index expression used in a
5508 component association in the argument of Update.
5509
55102014-07-18 Gary Dismukes <dismukes@adacore.com>
5511
5512 * einfo.ads, sem_eval.ads, sem_ch13.adb: Minor reformatting.
5513
55142014-07-18 Hristian Kirtchev <kirtchev@adacore.com>
5515
5516 * exp_ch6.adb (Expand_Simple_Function_Return): Redo the marking
5517 of enclosing blocks, loops and the enclosing function using a
5518 parent-based traversal.
5519 * exp_util.adb (Wrap_Statements_In_Block): Suppress the secondary
5520 stack reclamation if the iterator loop contains a return statement
5521 that uses the stack.
5522 * sem_ch5.adb (Analyze_Loop_Statement): There is no need to
5523 patch up the scope stack as the secondary stack management now
5524 takes into account the enclosing function of the iterator loop.
5525
ee4eee0a
AC
55262014-07-18 Robert Dewar <dewar@adacore.com>
5527
5528 * sem_ch3.adb, g-memdum.ads, i-cstrea.ads: Minor reformatting.
5529
55302014-07-18 Robert Dewar <dewar@adacore.com>
5531
5532 * einfo.adb (Has_Static_Predicate): New function.
5533 (Set_Has_Static_Predicate): New procedure.
5534 * einfo.ads (Has_Static_Predicate): New flag.
5535 * sem_ch13.adb (Is_Predicate_Static): New function
5536 (Build_Predicate_Functions): Use Is_Predicate_Static to reorganize
5537 (Add_Call): Minor change in Sloc of generated expression
5538 (Add_Predicates): Remove setting of Static_Pred, no longer used.
5539 * sem_ch4.adb (Has_Static_Predicate): Removed this function,
5540 replace by use of the entity flag Has_Static_Predicate_Aspect.
5541 * sem_eval.adb (Eval_Static_Predicate_Check): Check real case
5542 and issue warning that predicate is not checked for now.
5543 * sem_eval.ads (Eval_Static_Predicate_Check): Fix comments in
5544 spec.
5545 * sem_util.adb (Check_Expression_Against_Static_Predicate):
5546 Carry out check for any case where there is a static predicate,
5547 and output appropriate message.
5548 * sinfo.ads: Minor comment corrections.
5549
55502014-07-18 Ed Schonberg <schonberg@adacore.com>
5551
5552 * exp_ch3.adb (Expand_Freeze_Record_Type): If the type is derived
5553 from an untagged private type whose full view is tagged, the type
5554 is marked tagged for layout reasons, but it has no dispatch table,
5555 so Set_All_DT_Position must not be called.
5556 * exp_ch13.adb: If the freeze node is for a type internal to a
5557 record declaration, as is the case for a class-wide subtype
5558 of a parent component, the relevant scope is the scope of the
5559 enclosing record.
5560
3b8481cb
AC
55612014-07-18 Thomas Quinot <quinot@adacore.com>
5562
5563 * g-memdum.adb, g-memdum.ads: Code clean ups.
5564
55652014-07-18 Hristian Kirtchev <kirtchev@adacore.com>
5566
5567 * sem_prag.adb (Check_Dependency_Clause):
5568 Update the comment on usage. Reimplement the mechanism which
5569 attempts to match a single clause of Depends against one or
5570 more clauses of Refined_Depends.
5571 (Input_Match): Removed.
5572 (Inputs_Match): Removed.
5573 (Is_Self_Referential): Removed.
5574 (Normalize_Clause): Update the call to Split_Multiple_Outputs.
5575 (Normalize_Outputs): Rename variable Split to New_Claue and update
5576 all its occurrences.
5577 (Report_Extra_Clauses): Update the comment on usage.
5578 (Split_Multiple_Outputs): Renamed to Normalize_Outputs.
5579
55802014-07-18 Gary Dismukes <dismukes@adacore.com>
5581
5582 * i-cstrea.ads: Minor reformatting.
5583
55842014-07-18 Hristian Kirtchev <kirtchev@adacore.com>
5585
5586 * exp_util.adb (Wrap_Statements_In_Block): Propagate both
5587 secondary stack-related flags to the generated block.
5588 * sem_ch5.adb (Analyze_Loop_Statement): Update the scope chain
5589 once the loop is relocated in a block.
5590
daff5ab7
AC
55912014-07-18 Robert Dewar <dewar@adacore.com>
5592
5593 * repinfo.ads: Add documentation on handling of back annotation
5594 for dynamic case.
5595
55962014-07-18 Ed Schonberg <schonberg@adacore.com>
5597
5598 * sinfo.ads, sinfo.adb (Incomplete_View): New semantic attribute
5599 of full type declaration, denotes previous declaration for
5600 incomplete view of the type.
5601 * sem_ch3.adb (Analyze_Full_Type_Declaration): Set Incomplete_View
5602 of declaration if one is present.
5603 (Replace_Type): When constructing the signature of an inherited
5604 operation, handle properly the case where the operation has a
5605 formal whose type is an incomplete view.
5606 * sem_util.adb (Collect_Primitive_Operations): Handle properly
5607 the case of an operation declared after an incomplete declaration
5608 for a type T and before the full declaration of T.
5609
56102014-07-18 Pascal Obry <obry@adacore.com>
5611
5612 * i-cstrea.ads: Add documentation for set_wide_text_mode.
5613
c45e5332
AC
56142014-07-18 Robert Dewar <dewar@adacore.com>
5615
5616 * a-witeio.adb: Minor code reorganization.
5617 * i-cstrea.ads: Add comment.
5618
56192014-07-18 Thomas Quinot <quinot@adacore.com>
5620
5621 * s-oscons-tmplt.c (NAME_MAX): Minor cleaup and comment
5622 clarifications.
5623
adc1de25
AC
56242014-07-18 Robert Dewar <dewar@adacore.com>
5625
5626 * g-memdum.adb, g-memdum.ads, exp_strm.adb: Minor reformatting.
5627
56282014-07-18 Pascal Obry <obry@adacore.com>
5629
5630 * s-crtl.ads, i-cstrea.ads (fputwc): New routine.
5631 * a-witeio.adb (Put): On platforms where there is translation
5632 done by the OS output the raw text.
5633 (New_Line): Use Put above to properly handle the LM wide characters.
5634
6128aad4
AC
56352014-07-18 Thomas Quinot <quinot@adacore.com>
5636
5637 * g-memdum.adb, g-memdum.ads (Dump): New parameter Prefix, defaulted
5638 to Absolute_Address.
5639
56402014-07-18 Eric Botcazou <ebotcazou@adacore.com>
5641
5642 * opt.ads (Suppress_Back_Annotation): Remove as unused.
5643 * fe.h (Back_Annotate_Rep_Info): Likewise.
5644 (Global_Discard_Names): Likewise.
5645
623267dc
AC
56462014-07-18 Robert Dewar <dewar@adacore.com>
5647
5648 * sem_ch13.adb (Is_Type_Ref): Check that type name is not
5649 parenthesized.
5650
56512014-07-18 Vincent Celier <celier@adacore.com>
5652
5653 * s-osinte-vms.ads: Fix style errors.
5654
56552014-07-18 Thomas Quinot <quinot@adacore.com>
5656
5657 * s-oscons-tmplt.c (_POSIX_SOURCE): Define in order to get
5658 NAME_MAX and PATH_MAX.
5659
56602014-07-18 Bob Duff <duff@adacore.com>
5661
5662 * exp_strm.adb (Build_Record_Or_Elementary_Input_Function,
5663 Build_Record_Or_Elementary_Output_Procedure): For Input and
5664 Output attributes, do not read/write the discriminants if they
5665 have default values; that will be done by Read/Write.
5666
8ca597af
RD
56672014-07-18 Robert Dewar <dewar@adacore.com>
5668
5669 * sem_aggr.adb, exp_ch5.adb, sem_ch3.adb, layout.adb, sem_type.adb,
5670 exp_util.adb, exp_attr.adb, einfo.adb, einfo.ads, exp_pakd.adb,
5671 checks.adb, exp_pakd.ads, freeze.adb, sem_util.adb, exp_dbug.adb,
5672 exp_dbug.ads, exp_ch4.adb, sem_ch8.adb, exp_aggr.adb, sem_eval.adb,
5673 sem_ch13.adb: Change name Packed_Array_Type to Packed_Array_Impl_Type.
5674
5aa0548d
AC
56752014-07-18 Robert Dewar <dewar@adacore.com>
5676
5677 * lib-writ.adb, makeutl.adb, ali.ads: Minor reformatting.
5678
56792014-07-18 Vincent Celier <celier@adacore.com>
5680
5681 * lib-writ.ads: Update documentation about the D lines.
5682
8b034336
AC
56832014-07-18 Ed Schonberg <schonberg@adacore.com>
5684
5685 * sem_ch13.adb (Replace_Type_References_Generic): Use type entity
5686 as a parameter, rather than its Chars field, in order to locate
5687 freeze node of type. If the predicate or invariant has references
5688 to types other than the one to which the contract applies, these
5689 types must be frozen, and the corresponding predicate functions
5690 created, before that freeze node.
5691
56922014-07-18 Robert Dewar <dewar@adacore.com>
5693
5694 * freeze.adb, einfo.ads, einfo.adb: Minor code reorganization.
5695 * par_sco.adb: Minor reformatting.
5696
56972014-07-18 Gary Dismukes <dismukes@adacore.com>
5698
5699 * exp_ch4.adb (Real_Range_Check): Turn off
5700 the Do_Range_Check flag on the conversion's current Expression
5701 argument rather than on the originally captured Operand node,
5702 as Expression may reflect a rewriting (as in conversions to a
5703 fixed-point type).
5704
57052014-07-18 Vincent Celier <celier@adacore.com>
5706
5707 * ali.adb (Scan_ALI): Set Sdep_Record.Unit_Name, when the unit
5708 is not a subunit.
5709 * ali.ads (Sdep_Record): New component Unit_Name.
5710 * lib-writ.adb (Write_ALI): Write the unit name in D lines.
5711 * makeutl.adb (Check_Source_Info_In_ALI): Return False if a
5712 dependent unit is in a project and the source file name is not
5713 one of its sources.
5714
47a98b97
BD
57152014-07-18 Bob Duff <duff@adacore.com>
5716
5717 * s-addima.ads: Minor: add comment.
5718
e191e5ae
TQ
57192014-07-18 Thomas Quinot <quinot@adacore.com>
5720
5721 * freeze.adb (Check_Component_Storage_Order): Fix enforcement
5722 of nesting rules for composites with different SSOs.
5723
57242014-07-18 Thomas Quinot <quinot@adacore.com>
5725
5726 * par_sco.adb (Is_Logical_Operator): An If_Expression is not
5727 a proper logical operator.
5728 (Has_Decision): An If_Expression indicates the presence of a decision
5729 although it is not a logical operator.
5730
783d035b
AC
57312014-07-18 Robert Dewar <dewar@adacore.com>
5732
5733 * gnat_ugn.texi: Remove note that -gnatR not allowed with -gnatc.
5734 * switch-c.adb: Remove prohibition of -gnatR and -gnatc together.
5735
57362014-07-18 Eric Botcazou <ebotcazou@adacore.com>
5737
5738 * sem_ch13.adb (Kill_Rep_Clause): Clear Comes_From_Source flag
5739 on the null statement.
5740
57412014-07-18 Thomas Quinot <quinot@adacore.com>
5742
5743 * adaint.c: Minor comment rewording.
5744 * socket.c: Define macros _REENTRANT and _THREAD_SAFE so that
5745 use of errno in this file is thread safe.
5746
39678b1c
AC
57472014-07-18 Arnaud Charlet <charlet@adacore.com>
5748
5749 * gnat_ugn.texi: Doc clarification.
5750 * sem_ch13.adb (Kill_Rep_Clause): Use Replace not Rewrite.
5751 * sem_ch13.ads: Minor comment update.
5752
57532014-07-18 Robert Dewar <dewar@adacore.com>
5754
5755 * repinfo.ads: Minor comment fix.
5756
57572014-07-18 Robert Dewar <dewar@adacore.com>
5758
5759 * par-prag.adb: Add dummy entry for Default_Scalar_Storage_Order.
5760 * sem_prag.adb: Add dummy implementation of
5761 Default_Scalar_Storage_Order.
5762 * snames.ads-tmpl: Add dummy entry for
5763 Default_Scalar_Storage_Order pragma.
5764
57652014-07-18 Robert Dewar <dewar@adacore.com>
5766
5767 * opt.adb (Tree_Read): Read Address_Is_Private,
5768 Ignore_Rep_Clauses, Ignore_Style_Check_Pragmas, Multiple_Unit_Index.
5769 (Tree_Write): Corresponding writes
5770 * opt.ads: Minor comment reformatting and fixes.
5771 * tree_io.ads: Increment ASIS_Version_Number.
5772
cf28c974
RD
57732014-07-18 Robert Dewar <dewar@adacore.com>
5774
5775 * sem_attr.adb, s-os_lib.ads, prj-tree.adb: Minor reformatting.
5776 * types.h: Fix typo.
5777
57782014-07-18 Robert Dewar <dewar@adacore.com>
5779
5780 * freeze.adb (Check_Address_Clause): Use Kill_Rep_Clause (no
5781 functional change).
5782 * gnat_ugn.texi: Document that -gnatI removes rep clauses from
5783 ASIS trees.
5784 * sem_ch13.adb (Kill_Rep_Clause): New procedure
5785 (Analyze_Attribute_Definition_Clause): Use
5786 Kill_Rep_Clause. This is just a cleanup, no functional effect.
5787 (Analyze_Enumeration_Representation_Clause):
5788 Use Kill_Rep_Clause. This means that enum rep
5789 clauses are now properly removed from -gnatct trees.
5790 (Analyze_Record_Representation_Clause): Same change.
5791 * sem_ch13.ads (Kill_Rep_Clause): New procedure.
5792
c3d01e19
PO
57932014-07-18 Pascal Obry <obry@adacore.com>
5794
5795 * s-os_lib.ads, s-os_lib.adb (GM_Time_Of): New routine to create an
5796 OS_Time from time parts.
5797 * adaint.h, adaint.c (__gnat_to_os_time): New routine.
5798
6907542d
AC
57992014-07-18 Ed Schonberg <schonberg@adacore.com>
5800
5801 * sem_ch4.adb (Try_Container_Indexing): Refine previous patch for
5802 indexing over containers that are derived types: check whether
5803 signature of found operation has the correct first parameter
5804 before retrieving directly a primitive operation.
5805
58062014-07-18 Ed Schonberg <schonberg@adacore.com>
5807
5808 * sem_attr.adb (Analyze_Attribute, case 'Update): Set
5809 Do_Range_Check flag on dynamic bounds of a range used in a
5810 component association in the argument of Update.
5811
58122014-07-18 Thomas Quinot <quinot@adacore.com>
5813
5814 * adaint.c: #define _REENTRANT and _THREAD_SAFE in order for
5815 accesses to errno(3) to be thread safe.
5816
58172014-07-18 Vincent Celier <celier@adacore.com>
5818
5819 * prj-tree.adb (Imported_Or_Extended_Project_Of): For each non
5820 limited imported project that is an extending project, return
5821 a project being extended if it has the expected name.
5822
58232014-07-18 Pascal Obry <obry@adacore.com>
5824
5825 * s-os_lib.ads, s-os_lib.adb (Set_File_Last_Modify_Time_Stamp): New
5826 routine to set the last modification time stamp for the given file.
5827 * gnatchop.adb (File_Time_Stamp): Removed.
5828 (Write_Unit): Use
5829 Set_File_Last_Modify_Time_Stamp instead of ad-hoc implementation.
5830
3f433bc0
ES
58312014-07-18 Ed Schonberg <schonberg@adacore.com>
5832
5833 * sem_aggr.adb (Aggregate_Constraint_Checks): Moved to sem_util.
5834 * sem_util.ads, sem_util.adb (Aggregate_Constraint_Checks):
5835 Moved here, so it can be shared with the resolution of 'Update,
5836 whose argument shares some features with aggregates.
5837 * sem_attr.adb (Resolve_Attribute, case 'Update): Apply
5838 Aggregate_Constraint_Checks with the expression of each
5839 association, so that the Do_Range_Check flag is set when needed.
5840
58412014-07-18 Ed Schonberg <schonberg@adacore.com>
5842
5843 * sem_ch4.adb (Try_Container_Indexing): If the container
5844 type is a derived type, the value of the inherited aspect is
5845 the Reference operation declared for the parent type. However,
5846 Reference is also a primitive operation of the new type, and
5847 the inherited operation has a different signature. We retrieve
5848 the right one from the list of primitive operations of the
5849 derived type.
5850
0439c912
AC
58512014-07-18 Vincent Celier <celier@adacore.com>
5852
5853 * debug.adb: Update comment.
5854
58552014-07-18 Hristian Kirtchev <kirtchev@adacore.com>
5856
5857 * exp_util.adb (Needs_Finalization): There is no reason why a
5858 C type should not benefit from finalization actions.
5859
58602014-07-18 Thomas Quinot <quinot@adacore.com>
5861
5862 * s-oscons-tmplt.c (NAME_MAX): Fix definition for Solaris
5863 (FILENAME_MAX): Remove unneeded definition.
5864
5b89faaf
RD
58652014-07-18 Robert Dewar <dewar@adacore.com>
5866
5867 * exp_attr.adb, debug.adb: Update comments.
5868
c7a7f405
AC
58692014-07-18 Vincent Celier <celier@adacore.com>
5870
5871 * par-ch4.adb (Simple_Expression): Add missing style check
5872 for binary adding operators.
5873 (Term): Add missing style check for multiplying operators.
5874
58752014-07-18 Robert Dewar <dewar@adacore.com>
5876
5877 * impunit.adb: Minor comment correction.
5878 * widechar.adb, s-wchcon.ads: Minor comment corrections.
5879
baa571ab
AC
58802014-07-18 Robert Dewar <dewar@adacore.com>
5881
5882 * sem_ch13.adb (Build_Discrete_Static_Predicate): New name
5883 for Build_Static_Predicate (Build_Predicate_Functions):
5884 Don't try to build discrete predicate for real type.
5885 (Build_Predicate_Functions): Report attempt to use
5886 Static_Predicate function on real type as unimplemented.
5887 * sem_util.adb (Check_Expression_Against_Static_Predicate):
5888 Add guard to prevent blow up on predicate for real type.
5889
58902014-07-18 Ed Schonberg <schonberg@adacore.com>
5891
5892 * einfo.adb (Set_Static_Predicate): Simplify assertion to handle
5893 properly static predicate on enumeration types and modular types
5894 (not subtypes).
5895
58962014-07-18 Pierre-Marie Derodat <derodat@adacore.com>
5897
5898 * scos.ads (SCO_Unit_Table_Entry): Add a field to keep track of
5899 the corresponding source file index.
5900 * get_scos.ads (Get_SCOs): Add a default value for it.
5901 * par_sco.adb (SCO_Record): Fill the corresponding value.
5902 * scos.h: New.
5903
59042014-07-18 Vincent Celier <celier@adacore.com>
5905
5906 * a-strunb-shared.adb, s-auxdec.ads, s-rannum.adb, atree.ads,
5907 urealp.adb, vms_data.ads, lib.ads, s-auxdec-vms_64.ads: Minor
5908 reformatting.
5909 * gnat_ugn.texi: Add documentation for new gnatmem switch -t.
5910
59112014-07-18 Thomas Quinot <quinot@adacore.com>
5912
5913 * g-sercom.ads (Set): document possible data loss.
5914
59152014-07-18 Ed Schonberg <schonberg@adacore.com>
5916
5917 * exp_attr.adb (Expand_N_Attribute_Reference, cases Input,
5918 Output, Read, Write): If the restriction No_Streams is active,
5919 replace each occurrence of a stream attribute by an explicit
5920 Raise statement.
5921
fc999c5d
RD
59222014-07-18 Robert Dewar <dewar@adacore.com>
5923
5924 * par_sco.adb, a-reatim.ads, exp_attr.adb, sem_util.adb: Minor
5925 reformatting.
5926
59272014-07-18 Robert Dewar <dewar@adacore.com>
5928
5929 * einfo.ads, einfo.adb (Has_Out_Or_In_Out_Parameter): New flag and
5930 function.
5931 (Set_Has_Out_Or_In_Out_Parameter): New procedure.
5932 * sem_ch6.adb (Set_Formal_Mode): Set Has_Out_Or_In_Out_Parameter flag.
5933 * sem_res.adb (Resolve_Call): Error if call of Ada 2012 function
5934 with OUT or IN OUT from earlier Ada mode (e.g. Ada 2005)
5935
b3b26ace
AC
59362014-07-18 Robert Dewar <dewar@adacore.com>
5937
5938 * bcheck.adb (Check_Consistent_Restrictions):
5939 Remove obsolete code checking for violation of
5940 No_Standard_Allocators_After_Elaboration (main program)
5941 * bindgen.adb (Gen_Adainit): Handle
5942 No_Standard_Allocators_After_Elaboration
5943 (Gen_Output_File_Ada): ditto.
5944 * exp_ch4.adb (Expand_N_Allocator): Handle
5945 No_Standard_Allocators_After_Elaboration.
5946 * Makefile.rtl: Add entry for s-elaall
5947 * rtsfind.ads: Add entry for Check_Standard_Allocator.
5948 * s-elaall.ads, s-elaall.adb: New files.
5949 * sem_ch4.adb (Analyze_Allocator): Handle
5950 No_Standard_Allocators_After_Elaboration.
5951
59522014-07-18 Robert Dewar <dewar@adacore.com>
5953
5954 * lib.adb, lib.ads, lib-writ.adb, lib-writ.ads, ali.adb,
5955 ali.ads, lib-load.adb: Remove Lib.Has_Allocator and all uses.
5956 Remove AB parameter from ali files and all uses.
5957 Remove Allocator_In_Body and all uses.
5958
59592014-07-18 Robert Dewar <dewar@adacore.com>
5960
5961 * g-expect-vms.adb: Add comment.
5962
59632014-07-18 Thomas Quinot <quinot@adacore.com>
5964
5965 * par_sco.adb (Is_Logical_Operation): return True for
5966 N_If_Expression.
5967
59682014-07-18 Ed Schonberg <schonberg@adacore.com>
5969
5970 * sem_attr.adb (Resolve_Attribute, case 'Update): Do full
5971 analysis and resolution of each choice in the associations within
5972 the argument of Update, because they may be variable names.
5973
59742014-07-18 Hristian Kirtchev <kirtchev@adacore.com>
5975
5976 * exp_attr.adb (Expand_Loop_Entry_Attribute): Insert any condition
5977 actions before the generated if statement.
5978
59792014-07-18 Hristian Kirtchev <kirtchev@adacore.com>
5980
5981 * gnat_ugn.texi Enhance the documentation of
5982 switches -gnateA and -gnateV.
5983
59842014-07-18 Ed Schonberg <schonberg@adacore.com>
5985
5986 * sem_util.adb (Build_Default_Subtype): Add missing condition
5987 so that code matches description: use the full view of the base
5988 only if the base is private and the subtype is not.
5989
6782b1ef
AC
59902014-07-17 Gary Dismukes <dismukes@adacore.com>
5991
5992 * exp_disp.adb: Minor reformatting.
5993 * exp_disp.adb: Minor code reorganization.
5994
59952014-07-17 Thomas Quinot <quinot@adacore.com>
5996
5997 * gnat_rm.texi, freeze.adb (Check_Component_Storage_Order): Do not
5998 require an explicit SSO attribute definition clause on a composite type
5999 just because one of its components has one.
6000
60012014-07-17 Robert Dewar <dewar@adacore.com>
6002
6003 * sem_attr.adb (Analyze_Attribute, case Loop_Entry): Rewrite
6004 attribute out of existence if the enclosing pragma is ignored.
6005 * sem_util.adb: Minor reformatting.
6006
60072014-07-17 Ed Schonberg <schonberg@adacore.com>
6008
6009 * exp_aggr.adb (Expand_Array_Aggregate): Handle properly an
6010 array aggregate expanded into assignments when it appears as a
6011 local declaration in an inlined body.
6012
60132014-07-17 Doug Rupp <rupp@adacore.com>
6014
6015 * init.c [__ANDROID__]: Modify for ZCX.
6016 * exp_aggr.adb: Minor reformatting
6017 * sigtramp-armvxw.c, sigtramp-ppcvxw.c: Update comments.
6018
60192014-07-17 Robert Dewar <dewar@adacore.com>
6020
6021 * a-strunb-shared.ads, a-stwiun-shared.ads, a-stzunb-shared.ads,
6022 exp_ch7.adb, g-pehage.ads, g-socket.ads, gnat_ugn.texi, gnat_ugx.texi,
6023 scng.adb: Remove incorrect usage "allow to" and "allows to".
6024
60252014-07-17 Robert Dewar <dewar@adacore.com>
6026
6027 * exp_dist.adb: Minor reformatting.
6028
6ccdd977
AC
60292014-07-17 Bob Duff <duff@adacore.com>
6030
6031 * gnat_ugn.texi: Improve documentation of Unrestricted_Access.
6032
60332014-07-17 Robert Dewar <dewar@adacore.com>
6034
6035 * sem_ch13.adb (Build_Invariant_Procedure): Add variable Nam
6036 (Add_Invariants): Set Nam to Name_Type_Invariant if from aspect.
6037
60382014-07-17 Thomas Quinot <quinot@adacore.com>
6039
6040 * exp_pakd.adb (Create_Packed_Array_Type.Install_PAT): For a
6041 non-bit-packed array, propagate Reverse_Storage_Order to the
6042 packed array type.
6043
60442014-07-17 Javier Miranda <miranda@adacore.com>
6045
6046 * exp_disp.adb: Fix comment.
6047 * exp_pakd.adb: Minor reformatting.
6048
d8941160
RD
60492014-07-17 Robert Dewar <dewar@adacore.com>
6050
6051 * bindgen.adb (Gen_Elab_Calls): Skip reference to elab
6052 entity if none exists (Gen_Elab_Calls): Complain if clash with
6053 No_Multiple_Elaboration.
6054 * s-rident.ads, restrict.ads: Add restriction No_Multiple_Elaboration.
6055 * sem_util.adb (Build_Elaboration_Entity): Skip building entity
6056 if not needed.
6057 * gnat_rm.texi: Document restriction No_Multiple_Elaboration.
6058 * sem_ch4.adb: Minor comment updates.
6059
bf561f2b
AC
60602014-07-17 Ed Schonberg <schonberg@adacore.com>
6061
6062 * exp_ch9.adb (Buid_Protected_Subprogram_Call): Preserve type
6063 of function call for later use when shared passive objects
6064 are involved.
6065
60662014-07-17 Hristian Kirtchev <kirtchev@adacore.com>
6067
6068 * par-ch13.adb (Get_Aspect_Specifications):
6069 Catch a case where the argument of SPARK aspect Refined_State
6070 is not properly parenthesized.
6071
60722014-07-17 Hristian Kirtchev <kirtchev@adacore.com>
6073
6074 * exp_ch6.adb (Expand_Ctrl_Function_Call): Do not extend
6075 the lifetime of a reference to an Ada 2012 container element.
6076 (Is_Element_Reference): New routine.
6077
60782014-07-17 Robert Dewar <dewar@adacore.com>
6079
6080 * ali.ads: Minor comment fix.
6081 * lib-writ.adb: Minor reformatting.
6082
60832014-07-17 Ed Schonberg <schonberg@adacore.com>
6084
6085 * sem_ch10.adb (Analyze_Proper_Body): When analyzing a subunit
6086 in ASIS mode, load another subunit only if it a subunit of the
6087 current one, not a sibling that has been reached through the
6088 analysis of an ancestor. This allows the construction of the
6089 ASIS tree for the subunit even when sibling subunits have errors.
6090
60912014-07-17 Hristian Kirtchev <kirtchev@adacore.com>
6092
6093 * sem_ch3.adb (Analyze_Declarations): Remove the guard which
6094 prevents the analysis of various contracts when the associated
6095 construct is erroneous.
6096 * sem_util.adb (Save_SPARK_Mode_And_Set): Do not query the
6097 SPARK_Pragma of an illegal or a partially decorated construct.
6098
8a5e4b2a
AC
60992014-07-17 Robert Dewar <dewar@adacore.com>
6100
6101 * s-imguns.ads: Minor reformatting.
6102
61032014-07-17 Hristian Kirtchev <kirtchev@adacore.com>
6104
6105 * exp_ch7.adb (Build_Finalization_Master): Move all local
6106 variables to the proper code section. When looking for an existing
6107 finalization master, inspect the ultimate ancestor type of the
6108 full view.
6109 * sem_util.ads, sem_util.adb (Root_Type_Of_Full_View): New routine.
6110
52d9ba4d
AC
61112014-07-17 Robert Dewar <dewar@adacore.com>
6112
6113 * aspects.ads, aspects.adb: Add entries for aspect Annotate.
6114 * gnat_rm.texi: Document Entity argument for pragma Annotate and
6115 Annotate aspect.
6116 * sem_ch13.adb (Analyze_Aspect_Specification): Add processing
6117 for Annotate aspect.
6118 * sem_prag.adb (Analyze_Pragma, case Annotate): Allow optional
6119 Entity argument at end.
6120 * sinfo.ads (N_Aspect_Specification): Add note on Annotate aspect.
6121
61222014-07-17 Tristan Gingold <gingold@adacore.com>
6123
6124 * s-imguns.ads: Fix minor typo.
6125
61262014-07-17 Thomas Quinot <quinot@adacore.com>
6127
6128 * sprint.adb: Minor reformatting.
6129
b16ffa33
AC
61302014-07-17 Robert Dewar <dewar@adacore.com>
6131
6132 * sprint.adb (Write_Itype): Print proper header for string
6133 literal subtype.
6134
61352014-07-17 Steve Baird <baird@adacore.com>
6136
6137 * sinfo.ads, sem_scil.ads: Improve comments, minor reformatting.
6138
7b966a95
AC
61392014-07-17 Vincent Celier <celier@adacore.com>
6140
6141 * gnatbind.adb: Change in message "try ... for more information".
6142
61432014-07-17 Robert Dewar <dewar@adacore.com>
6144
6145 * sprint.adb: Code clean up.
6146
61472014-07-17 Hristian Kirtchev <kirtchev@adacore.com>
6148
6149 * exp_ch7.adb (Find_Last_Init): Relocate local variables to
6150 the relevant code section. Add new local constant Obj_Id. When
6151 a limited controlled object is initialized by a function call,
6152 the build-in-place object access function call acts as the last
6153 initialization statement.
6154 * exp_util.adb (Is_Object_Access_BIP_Func_Call): New routine.
6155 (Is_Secondary_Stack_BIP_Func_Call): Code reformatting.
6156 * exp_util.ads (Is_Object_Access_BIP_Func_Call): New routine.
6157
61582014-07-17 Ed Schonberg <schonberg@adacore.com>
6159
6160 * sem_ch8.adb (Analyze_Generic_Renaming): For generic subprograms,
6161 propagate intrinsic flag to renamed entity, to allow e.g. renaming
6162 of Unchecked_Conversion.
6163 * sem_ch3.adb (Analyze_Declarations): Do not analyze contracts
6164 if the declaration has errors.
6165
61662014-07-17 Ed Schonberg <schonberg@adacore.com>
6167
6168 * a-rbtgbk.adb: a-rbtgbk.adb (Generic_Insert_Post): Check whether
6169 container is busy before checking whether capacity allows for
6170 a further insertion. Insertion in a busy container that is full
6171 raises Program_Error rather than Capacity_Error. Previous to that
6172 patch which exception was raised varied among container types.
6173
44ccf4b4
AC
61742014-07-17 Robert Dewar <dewar@adacore.com>
6175
6176 * g-comlin.ads, g-comlin.adb: Minor clean up.
6177
61782014-07-17 Bob Duff <duff@adacore.com>
6179
6180 * gnat_ugn.texi: Update gnatpp doc.
6181
bb012790
AC
61822014-07-17 Robert Dewar <dewar@adacore.com>
6183
6184 * gnat_rm.texi: Document new restriction No_Long_Long_Integers.
6185 * exp_ch4.adb (Make_Array_Comparison_Op): Add note that we
6186 could do this by actually expanding a real generic.
6187 * a-tags.ads: Add comments about performance.
6188 * sprint.adb (Sprint_Node_Actual, case N_Object_Declaration):
6189 Print Etype of defining identifier, rather than the object
6190 definition. More information.
6191
61922014-07-17 Thomas Quinot <quinot@adacore.com>
6193
6194 * exp_dist.adb: Minor documentation clarification.
6195
61962014-07-17 Hristian Kirtchev <kirtchev@adacore.com>
6197
6198 * exp_util.adb (Is_Aliased): Revert previous change.
6199
62002014-07-17 Vincent Celier <celier@adacore.com>
6201
6202 * g-comlin.adb (Try_Help): New procedure.
6203 (Getopt): Use new procedure Try_Help.
6204 * g-comlin.ads (Try_Help): New procedure.
6205
62062014-07-17 Bob Duff <duff@adacore.com>
6207
6208 * gnat_ugn.texi: Minor update.
6209
ee10c0ec
RD
62102014-07-17 Robert Dewar <dewar@adacore.com>
6211
6212 * gnat_rm.texi: Improve documentation of Unrestricted_Access.
6213 * sinfo.ads: Document restriction on aggregates (must expand to
6214 assignments if one or more assignments needs expansion, e.g. for
6215 controlled types).
6216 * sem_ch13.adb: All warning messages regarding bit order should
6217 be info: messages.
6218 * gnat_ugn.texi: Minor correction of missing @ on @code
6219
62202014-07-17 Robert Dewar <dewar@adacore.com>
6221
6222 * restrict.ads (Implementation_Restriction): Add No_Long_Long_Integer.
6223 * s-rident.ads (Partition_Boolean_Restrictions): Add
6224 No_Long_Long_Integer.
6225 * sem_ch3.adb (Modular_Type_Declaration): Size must be <=
6226 Long_Integer'Size if restriction No_Long_Long_Integer is active.
6227 (Signed_Integer_Type_Declaration): Do not allow Long_Long_Integer
6228 as the implicit base type for a signed integer type declaration
6229 if restriction No_Long_Long_Integer is active.
6230 * sem_util.ads, sem_util.adb (Set_Entity_With_Checks): Include check for
6231 No_Long_Long_Integer.
6232
e80f0cb0
RD
62332014-07-17 Robert Dewar <dewar@adacore.com>
6234
6235 * sem_ch3.adb, a-ztexio.ads, exp_imgv.adb, casing.adb, casing.ads,
6236 einfo.ads, checks.adb, sem_ch12.adb, a-textio.ads, freeze.adb,
6237 repinfo.adb, exp_ch6.adb, sem_ch4.adb, a-witeio.ads, sem_ch8.adb,
6238 sem_warn.adb, exp_aggr.adb, exp_dist.adb, par-tchk.adb, s-fatgen.adb,
6239 treepr.adb, lib-xref.adb: Remove the word kludge from ada sources.
6240
2bd67690
RD
62412014-07-17 Robert Dewar <dewar@adacore.com>
6242
6243 * debug.adb: Remove -gnatdQ.
6244 * exp_disp.adb: Remove -gnatdQ.
6245 * a-ztenio.ads, a-wtinio.ads, a-wtmoio.ads, a-ztcoau.ads, a-tiinio.ads,
6246 a-wtfiio.ads, a-timoio.ads, sem_ch12.adb, a-tifiio.ads, a-ztinio.ads,
6247 rtsfind.adb, rtsfind.ads, a-ztmoio.ads, a-wtdeio.ads, a-ztfiio.ads,
6248 a-tideio.ads, a-wtflio.ads, a-ztdeio.ads, sem_ch8.adb, a-tiflio.ads,
6249 sprint.adb, a-ztflio.ads, snames.ads-tmpl, a-wtenio.ads,
6250 a-tienio.ads: Rename Text_IO_Kludge to Text_IO_Special_Unit.
6251
59f4d038
RD
62522014-07-17 Robert Dewar <dewar@adacore.com>
6253
6254 * back_end.adb: Minor reformatting and comment additions.
6255 * checks.ads, checks.adb (Duplicated_Tag_Checks_Suppressed): New
6256 function.
6257 * exp_disp.adb (Make_DT): Use Duplicated_Tag_Checks_Suppressed.
6258 (Make_VM_TSD): Use Duplicated_Tag_Checks_Suppressed.
6259 * gnat_rm.texi: Document new check Duplicated_Tag_Checks_Suppressed.
6260 * gnat_ugn.texi: Additional documentation for Duplicated_Tag_Check.
6261 * snames.ads-tmpl (Duplicated_Tag_Checks_Suppressed): New check.
6262 * types.ads (Duplicated_Tag_Checks_Suppressed): New check.
6263
26d5fb62
AC
62642014-07-17 Robert Dewar <dewar@adacore.com>
6265
6266 * gnat_rm.texi: Minor comment updates.
6267
62682014-07-17 Ed Schonberg <schonberg@adacore.com>
6269
6270 * sem_util.adb (Make_Explicit_Dereference): If the expression
6271 being dereferenced is a generalized indexing, reset the overloaded
6272 flag on the generalized indexing call, consistent with the
6273 resetting of the flag on the original indexed component.
6274
62752014-07-17 Robert Dewar <dewar@adacore.com>
6276
6277 * gnat_ugn.texi: Document advise not to mix -gnatV? and
6278 optimization.
6279
62802014-07-17 Robert Dewar <dewar@adacore.com>
6281
6282 * checks.adb (Insert_Valid_Check): Don't insist on a name
6283 for the prefix when we make calls to Force_Evaluation and
6284 Duplicate_Subexpr_No_Checks.
6285 * exp_util.adb (Is_Volatile_Reference): Handle all cases properly
6286 (Remove_Side_Effects): Handle all volatile references right
6287 (Side_Effect_Free): Volatile reference is never side effect free
6288 * sinfo.ads (N_Attribute_Reference): Add comments explaining
6289 that in the tree, the prefix can be a general expression.
6290
62912014-07-17 Hristian Kirtchev <kirtchev@adacore.com>
6292
6293 * sem_ch6.adb (Analyze_Subprogram_Body_Contract,
6294 Analyze_Subprogram_Contract): Add comments on SPARK_Mode save/restore.
6295 * sem_ch7.adb (Analyze_Package_Body_Contract,
6296 Analyze_Package_Contract): Add comments on SPARK_Mode save/restore.
6297
62982014-07-17 Robert Dewar <dewar@adacore.com>
6299
6300 * exp_ch7.ads, exp_util.ads: Document Insert_Action_After,
6301 Store_After_Actions_In_Scope.
6302
c61ef416
AC
63032014-07-17 Robert Dewar <dewar@adacore.com>
6304
6305 * sem_aux.ads: Minor comment addition.
6306
63072014-07-17 Ed Schonberg <schonberg@adacore.com>
6308
6309 * sem_res.adb (Make_Call_Into_Operator): If the call is already
6310 a rewriting of an operator node, there are no actuals to be
6311 propagated from original node to rewritten node when in ASIS mode.
6312
63132014-07-17 Hristian Kirtchev <kirtchev@adacore.com>
6314
6315 * sem_ch6.adb (Analyze_Subprogram_Body_Contract,
6316 Analyze_Subprogram_Contract): Add new local variable Mode. Save
6317 and restore the SPARK mode of the related construct in a
6318 stack-like fashion.
6319 * sem_ch7.adb (Analyze_Package_Body_Contract,
6320 Analyze_Package_Contract): Add new local variable Mode. Save and
6321 restore the SPARK mode of the related construct in a stack-like fashion.
6322 * sem_util.adb Remove with and use clause for Opt.
6323 (Restore_SPARK_Mode): New routine.
6324 (Save_SPARK_Mode_And_Set): New routine.
6325 * sem_util.ads Add with and use clause for Opt.
6326 (Restore_SPARK_Mode): New routine.
6327 (Save_SPARK_Mode_And_Set): New routine.
6328
63292014-07-17 Hristian Kirtchev <kirtchev@adacore.com>
6330
6331 * exp_util.adb (Is_Aliased): Transient objects
6332 within an expression with actions cannot be considered aliased.
6333
36295779
AC
63342014-07-17 Thomas Quinot <quinot@adacore.com>
6335
6336 * sem.ads (Scope_Stack_Entry): Reorganize storage of action lists;
6337 introduce a new list (cleanup actions) for each (transient) scope.
6338 * sinfo.ads, sinfo.adb (Cleanup_Actions): New attribute for
6339 N_Block_Statement
6340 * exp_ch7.ads (Store_Cleanup_Actions_In_Scope): New subprogram.
6341 * exp_ch7.adb (Store_Actions_In_Scope): New subprogram, common
6342 processing for Store_xxx_Actions_In_Scope.
6343 (Build_Cleanup_Statements): Allow for a list of additional
6344 cleanup statements to be passed by the caller.
6345 (Expand_Cleanup_Actions): Take custom cleanup actions associated
6346 with an N_Block_Statement into account.
6347 (Insert_Actions_In_Scope_Around): Account for Scope_Stack_Entry
6348 reorganization (refactoring only, no behaviour change).
6349 (Make_Transient_Block): Add assertion to ensure that the current
6350 scope is indeed a block (namely, the entity for the transient
6351 block being constructed syntactically, which has already been
6352 established as a scope). If cleanup actions are present in the
6353 transient scope, transfer them now to the transient block.
6354 * exp_ch6.adb (Expand_Protected_Subprogram_Call): Freeze the
6355 called function while it is still present as the name in a call
6356 in the tree. This may not be the case later on if the call is
6357 rewritten into a transient block.
6358 * exp_smem.adb (Add_Shared_Var_Lock_Procs): The post-actions
6359 inserted after calling a protected operation on a shared passive
6360 protected must be performed in a block finalizer, not just
6361 inserted in the tree, so that they are executed even in case of
6362 a normal (RETURN) or abnormal (exception) transfer of control
6363 outside of the current scope.
6364 * exp_smem.ads (Add_Shared_Var_Lock_Procs): Update documentation
6365 * sem_ch8.adb, expander.adb, exp_ch11.adb: Adjust for
6366 Scope_Stack_Entry reorganization.
6367
63682014-07-17 Thomas Quinot <quinot@adacore.com>
6369
6370 * exp_disp.adb (Make_DT, Make_VM_TSD): Do not omit Check_TSD
6371 call for types that do not have an explicit attribute definition
6372 clause for External_Tag, as their default tag may clash with an
6373 explicit tag defined for some other type.
6374
63752014-07-17 Hristian Kirtchev <kirtchev@adacore.com>
6376
6377 * exp_util.adb (Is_Controlled_Function_Call): Recognize a
6378 controlled function call with multiple actual parameters that
6379 appears in Object.Operation form.
6380
63812014-07-17 Thomas Quinot <quinot@adacore.com>
6382
6383 * einfo.ads, einfo.adb (Has_External_Tag_Rep_Clause): Remove
6384 entity flag.
6385 * sem_ch13.adb (Analyze_Attribute_Definition_Clause, case
6386 External_Tag): No need to set entity flag.
6387 * sem_aux.ads, sem_aux.adb (Has_External_Tag_Rep_Clause):
6388 Reimplement correctly in terms of Has_Rep_Item.
6389
f65c67d3
TQ
63902014-07-17 Thomas Quinot <quinot@adacore.com>
6391
6392 * exp_ch7.adb (Establish_Transient_Scope.Find_Node_To_Be_Wrapped):
6393 Start examining the tree at the node passed to
6394 Establish_Transient_Scope (not its parent).
6395 * exp_ch6.adb (Make_Build_In_Place_Call_In_Object_Declaration):
6396 The access type for the variable storing the reference to
6397 the call must be declared and frozen prior to establishing a
6398 transient scope.
6399 * exp_ch9.adb: Minor reformatting.
6400
a1d3851b
AC
64012014-07-17 Pascal Obry <obry@adacore.com>
6402
6403 * s-os_lib.ads: Minor comment update.
6404
64052014-07-17 Tristan Gingold <gingold@adacore.com>
6406
6407 * sysdep.c: Add ATTRIBUTE_UNUSED to avoid warnings. Fix some
6408 indentation.
6409 * socket.c: Remove #warning to avoid warning.
6410 * expect.c: Indent some preprocessor directives to clarify
6411 nested if. Do not use wait.h on PikeOS. Add ATTRIBUTE_UNUSED
6412 to remove warnings.
6413 * env.c: Fix indentation. Port to PikeOS.
6414 * gsocket.h: Port to PikeOS. Remove #warning.
6415 * terminals.c: Port to PikeOS. Fix indentation of the stubs.
6416 Add ATTRIBUTE_UNUSED to stubs arguments. Fix return statement
6417 of stubbed __gnat_setup_parent_communication.
6418 * adaint.c: Port to PikeOS. Reindent some preprocessor
6419 directives to clarify nested if. Fix indentation. Add missing
6420 ATTRIBUTE_UNUSED.
6421
64222014-07-17 Robert Dewar <dewar@adacore.com>
6423
6424 * sem_attr.adb: Minor reformatting.
6425
d2d8b2a7
AC
64262014-07-17 Robert Dewar <dewar@adacore.com>
6427
6428 * exp_ch7.adb, exp_ch7.ads, sinfo.ads: Minor reformatting.
6429
64302014-07-17 Ed Schonberg <schonberg@adacore.com>
6431
6432 * sem_case.adb (Check_Choice_Set): If the case expression is the
6433 expression in a predicate, do not recheck coverage against itself,
6434 to prevent spurious errors.
6435 * sem_ch13.adb (Check_Aspect_At_End_Of_Declarations): Indicate that
6436 expression comes from an aspect specification, to prevent spurious
6437 errors when expression is a case expression in a predicate.
6438
64392014-07-17 Pascal Obry <obry@adacore.com>
6440
6441 * adaint.c, adaint.h (__gnat_set_executable): Add mode parameter.
6442 * s-os_lib.ads, s-os_lib.adb (Set_Executable): Add Mode parameter.
6443
64442014-07-17 Vincent Celier <celier@adacore.com>
6445
6446 * gnatchop.adb, make.adb, gnatbind.adb, clean.adb, gprep.adb,
6447 gnatxref.adb, gnatls.adb, gnatfind.adb, gnatname.adb: Do not output
6448 the usage for an erroneous invocation of a gnat tool.
6449
9dc30a5f
AC
64502014-07-16 Vincent Celier <celier@adacore.com>
6451
6452 * gnatls.adb: Get the target parameters only if -nostdinc was
6453 not specified.
6454
64552014-07-16 Ed Schonberg <schonberg@adacore.com>
6456
6457 * checks.adb (Insert_Valid_Check): If the expression is a packed
6458 component of a modular type of the right size the data is always
6459 valid. This os particularly useful if the component is part of
6460 a volatile variable.
6461
64622014-07-16 Robert Dewar <dewar@adacore.com>
6463
6464 * gnat_rm.texi, sinfo.ads, freeze.adb, exp_aggr.adb: Minor reformatting
6465
64662014-07-16 Thomas Quinot <quinot@adacore.com>
6467
6468 * exp_ch7.ads: Minor documentation fix.
6469
2ffcbaa5
AC
64702014-07-16 Ed Schonberg <schonberg@adacore.com>
6471
6472 * sem_ch3.adb (Find_Type_Name): Diagnose properly
6473 a private extension completion that is an interface definition
6474 with an interface list.
6475
64762014-07-16 Arnaud Charlet <charlet@adacore.com>
6477
6478 * gnatls.adb (Gnatls): Code clean ups.
6479
64802014-07-16 Thomas Quinot <quinot@adacore.com>
6481
6482 * sinfo.ads, sinfo.adb (N_Compound_Statement): New node kind.
6483 * sem.adb (Analyze): Handle N_Compound_Statement.
6484 * sprint.adb (Sprint_Node_Actual): Ditto.
6485 * sem_ch5.ads, sem_ch5.adb (Analyze_Compound_Statement): New
6486 procedure to handle N_Compound_Statement.
6487 * exp_aggr.adb (Collect_Initialization_Statements):
6488 Use a proper compound statement node, instead of a bogus
6489 expression-with-actions with a NULL statement as its expression,
6490 to wrap collected initialization statements.
6491 * freeze.ads, freeze.adb
6492 (Explode_Initialization_Compound_Statement): New public procedure,
6493 lifted from Freeze_Entity.
6494 (Freeze_Entity): When freezing
6495 an object with captured initialization statements and without
6496 delayed freezing, explode compount statement.
6497 * sem_ch4.adb (Analyze_Expression_With_Actions): Remove special
6498 case that used to handle bogus EWAs with NULL statement as
6499 the expression.
6500 * exp_ch13.adb (Expand_N_Freeze_Entity): For an object with
6501 delayed freezing and captured initialization statements, explode
6502 compound statement.
6503
76241f8f
AC
65042014-07-16 Gary Dismukes <dismukes@adacore.com>
6505
6506 * g-rewdat.adb, g-rewdat.ads: Minor reformatting.
6507
65082014-07-16 Doug Rupp <rupp@adacore.com>
6509
6510 * s-interr-hwint.adb: Casing error on parameter.
6511
65122014-07-16 Pascal Obry <obry@adacore.com>
6513
6514 * Makefile.rtl: Add g-rewdat.o dependencies in
6515 GNATRTL_NONTASKING_OBJS.
6516
65172014-07-16 Ed Schonberg <schonberg@adacore.com>
6518
6519 * sem_case.adb: Code clean up.
6520
36f6df66
AC
65212014-07-16 Vincent Celier <celier@adacore.com>
6522
6523 * make.adb: Do not read gnat.adc when gnatmake is invoked
6524 with -gnatA.
6525
65262014-07-16 Pascal Obry <obry@adacore.com>
6527
6528 * gnat_rm.texi, impunit.adb, g-rewdat.adb, g-rewdat.ads: Initial
6529 implementation of GNAT.Rewrite_Data.
6530
c624a26b
AC
65312014-07-16 Vincent Celier <celier@adacore.com>
6532
6533 * gnatls.adb (Normalize): New function.
6534 (Gnatls): Get the target parameters. On targets other than VMS,
6535 normalize the path names in the source search path, the object search
6536 path and the project search path.
6537
65382014-07-16 Ed Schonberg <schonberg@adacore.com>
6539
6540 * sem_case.adb: Avoid self-checking of case expressions in
6541 dynamic predicates.
6542
65432014-07-16 Robert Dewar <dewar@adacore.com>
6544
6545 * gnat_rm.texi: Document effect of Suppress_Initialization on tags and
6546 discriminants.
6547
ff1f1705
AC
65482014-07-16 Eric Botcazou <ebotcazou@adacore.com>
6549
6550 * switch-b.adb (Scan_Binder_Switches): Add missing guard.
6551
65522014-07-16 Ben Brosgol <brosgol@adacore.com>
6553
6554 * gnat_ugn.texi: Fix typo.
6555
65562014-07-16 Ed Schonberg <schonberg@adacore.com>
6557
6558 * exp_ch4.adb (Expand_N_Case_Expression): Do not expand case
6559 expression if it is the specification of a subtype predicate:
6560 it will be expanded when the return statement is analyzed, or
6561 when a static predicate is transformed into a static expression
6562 for evaluation by the front-end.
6563 * sem_ch13.adb (Get_RList): If the expression for a static
6564 predicate is a case expression, extract the alternatives of the
6565 branches with a True value to create the required statically
6566 evaluable expression.
6567
65682014-07-16 Thomas Quinot <quinot@adacore.com>
6569
6570 * exp_prag.adb (Expand_Pragma_Check): Use the location of the
6571 expression, not the location of the aspect, for all generated
6572 code, so that in particular the call to raise_assert_failure
6573 gets the sloc of the associated condition.
6574 * exp_ch6.adb
6575 (Expand_Subprogram_Contract.Build_Postconditions_Procedure):
6576 Set an explicit End_Label on the handled sequence of statements
6577 for the _Postconditions procedure so that the implicit return
6578 statement does not erroneously get associated with code generated
6579 for the last condition in postconditions.
6580
65812014-07-16 Thomas Quinot <quinot@adacore.com>
6582
6583 * ug_words: Fix name of VMS synonym for -gnatw.z (SIZE_ALIGNMENT,
6584 not SIZE_ALIGN) and -gnatw.Z (NOSIZE_ALIGNMENT, not NOSIZE_ALIGN).
6585 * vms_data.ads: Add missing spaces in VMS synonyms for -gnatw.z /
6586 -gnatw.Z.
6587
3f1bc2cf
AC
65882014-07-16 Robert Dewar <dewar@adacore.com>
6589
6590 * sem_ch3.adb, sem_prag.adb, sem_util.adb, sem_res.adb, sem_ch13.adb:
6591 Minor code reorganization (use Is_Access_Type, not in Access_Kind).
6592 * exp_ch3.adb: Minor code reorganization, use Is_Access_Type,
6593 not in Access_Kind.
6594 * par-ch4.adb (At_Start_Of_Attribute): New function
6595 (P_Simple_Expression): Better msg for bad attribute prefix.
6596 * scans.ads: Minor reformatting.
6597
65982014-07-16 Ed Schonberg <schonberg@adacore.com>
6599
6600 * sem_attr.adb (Resolve_Attribute, case 'Update): If choice is a
6601 static constant, check that in belongs to the corresponding index
6602 subtype, to produce the proer warning when expansion is disabled.
6603
66042014-07-16 Robert Dewar <dewar@adacore.com>
6605
6606 * freeze.adb (Freeze_Entity): Warn on incompatible size/alignment.
6607 * gnat_ugn.texi: Document -gnatw.z and -gnatw.Z.
6608 * ug_words: VMS synonyms (WARNINGS=[NO]SIZE_ALIGN) for -gnatw.z/-gnatw.Z
6609 * usage.adb: Add lines for -gnatw.z/-gnatw.Z.
6610 * vms_data.ads: VMS synonyms (WARNINGS=[NO]SIZE_ALIGN) for
6611 -gnatw.z/-gnatw.Z
6612 * warnsw.adb: Set Warn_On_Size_Alignment appropriately.
6613 * warnsw.ads (Warn_On_Size_Alignment): New flag Minor
6614 reformatting.
6615
b07b7ace
AC
66162014-07-16 Hristian Kirtchev <kirtchev@adacore.com>
6617
6618 * exp_ch7.adb (Process_Declarations): Reinstate the check on
6619 a hook object to ensure that the related transient declaration
6620 is finalizable.
6621 * exp_util.adb (Is_Aliased): Do not consider expresison with
6622 actions as a special context.
6623 (Requires_Cleanup_Actions): Reinstate the check on a hook object to
6624 ensure that the related transient declaration is finalizable.
6625
66262014-07-16 Robert Dewar <dewar@adacore.com>
6627
6628 * checks.ads, checks.adb (Allocation_Checks_Suppressed): New function.
6629 * snames.ads-tmpl: Add Allocation_Check to list of check names.
6630 * types.ads: Add Allocation_Check to list of check names.
6631
66322014-07-16 Thomas Quinot <quinot@adacore.com>
6633
6634 * sem_util.adb (Enter_Name): replace bogus test for presence of
6635 Corresponding_Remote_Type with correct test on Ekind.
6636 * sem_res.adb (Valid_Conversion): ditto; also clarify validity
6637 of calls to Corresponding_ Remote_Type (documentation fix).
6638
66392014-07-16 Robert Dewar <dewar@adacore.com>
6640
6641 * gnat_rm.texi: Document illegal case of Unrestricted_Access.
6642 * sem_attr.adb (Analyze_Access_Attribute): Set_Non_Aliased_Prefix
6643 where it applies.
6644 (Resolve_Attribute, case Access): Flag illegal Unrestricted_Access use.
6645 * sinfo.ads, sinfo.adb (Non_Aliased_Prefix): New flag.
6646
904aac81
AC
66472014-07-16 Robert Dewar <dewar@adacore.com>
6648
6649 * gnat_ugn.texi: Document binder switch -Ra.
6650 * gnatbind.adb (List_Closure_Display): Implement -Ra switch
6651 (List_Closure_All).
6652 * opt.ads (List_Closure_All): New switch.
6653 * switch-b.adb (Scan_Binder_Switches): Recognize -Ra to set
6654 List_Closure_All.
6655
66562014-07-16 Ben Brosgol <brosgol@adacore.com>
6657
6658 * gnat_rm.texi: Minor edits, to make case consistent in names
6659 of types and fields.
6660
3bd783ec
AC
66612014-07-16 Robert Dewar <dewar@adacore.com>
6662
6663 * gnat_rm.texi: Document erroneous mixing of thin pointers and
6664 unrestricted access
6665 * gnat_ugn.texi: Add note on size of access types about thin
6666 pointers and the use of attribute Unrestricted_Access.
6667
66682014-07-16 Ed Schonberg <schonberg@adacore.com>
6669
6670 * a-cbdlli.ads, a-cbdlli.adb, a-cbhama.ads, a-cbhama.adb,
6671 * a-cbhase.ads, a-cbhase.adb, a-cborma.ads, a-cborma.adb,
6672 * a-cborse.ads, a-cborse.adb, a-cobove.ads a-cobove.adb: Add Control
6673 machinery to detect tampering on bounded vectors.
6674
800b8653
RD
66752014-07-16 Robert Dewar <dewar@adacore.com>
6676
6677 * gnat_rm.texi: Document that leading/trailing asterisks are
6678 now implied for the pattern match string for pragma Warnings
6679 and Warning_As_Error.
6680 * sem_prag.adb (Acquire_Warning_Match_String): New procedure.
6681 (Analyze_Pragma, case Warning_As_Error): Call
6682 Acquire_Warning_Match_String.
6683 (Analyze_Pragma, case Warnings): Call Acquire_Warning_Match_String.
6684
350f5d3b
AC
66852014-07-16 Bob Duff <duff@adacore.com>
6686
6687 * gnat_ugn.texi: Document need for project file
6688 for --incremental switch for gnat2xml.
6689
66902014-07-16 Robert Dewar <dewar@adacore.com>
6691
6692 * gnat_rm.texi: Fix example of non-packable components in packed
6693 records section.
6694
66952014-07-16 Robert Dewar <dewar@adacore.com>
6696
6697 * s-tpoben.adb, s-tasren.adb, s-interr.adb, s-interr-hwint.adb,
6698 s-shasto.adb, s-interr-vms.adb, s-interr-sigaction.adb: Avoid use of
6699 upper case in exception messages.
6700
ea70f3d0
RD
67012014-07-16 Robert Dewar <dewar@adacore.com>
6702
6703 * snames.ads-tmpl, sem_attr.adb, exp_attr.adb: Same_Storage attribute
6704 is renamed Has_Same_Storage.
6705 * gnat_rm.texi: Document missing SPARK pragmas and attributes.
6706 * sem_prag.adb: Minor comment fix (use LOCAL_NAME in syntax
6707 descriptions).
6708
9ab5d86b
RD
67092014-07-16 Robert Dewar <dewar@adacore.com>
6710
6711 * exp_util.adb, sem_attr.adb, exp_ch4.adb, a-cohase.ads,
6712 a-coinho-shared.adb, a-coinho-shared.ads: Minor reformatting.
6713
67142014-07-16 Robert Dewar <dewar@adacore.com>
6715
6716 * gnat_ugn.texi: Add note that integrated
6717 preprocessing cannot be applied to configuration pragma files.
6718
6cade1b0
AC
67192014-07-16 Yannick Moy <moy@adacore.com>
6720
6721 * sem_attr.adb (Analyze_Attribute/cases Pred
6722 and Succ): Always enable range check on fixed-point types if
6723 not suppressed for the type.
6724
67252014-07-16 Hristian Kirtchev <kirtchev@adacore.com>
6726
6727 * sem_util.adb (State_Has_Enabled_Property):
6728 Account for an external property denoted by an others choice.
6729
e59243fa
AC
67302014-07-16 Hristian Kirtchev <kirtchev@adacore.com>
6731
6732 * exp_ch4.ads, exp_ch4.adb (Find_Hook_Context): Relocated to Exp_Util.
6733 * exp_ch7.adb (Process_Declarations): There is no need to check
6734 that a transient object being hooked is controlled as it would
6735 not have been hooked in the first place.
6736 * exp_ch9.adb Remove with and use clause for Exp_Ch4.
6737 * exp_util.adb (Find_Hook_Context): Relocated from Exp_Ch4.
6738 (Is_Aliased): A renaming of a transient controlled object is
6739 not considered aliasing when it occurs within an expression
6740 with actions.
6741 (Requires_Cleanup_Actions): There is no need to
6742 check that a transient object being hooked is controlled as it
6743 would not have been hooked in the first place.
6744 * exp_util.ads (Find_Hook_Context): Relocated from Exp_Ch4.
6745
67462014-07-16 Hristian Kirtchev <kirtchev@adacore.com>
6747
6748 * sem_ch13.adb (Insert_After_SPARK_Mode): Moved to
6749 the outer level of routine Analyze_Aspect_Specifications. Ensure
6750 that the corresponding pragmas of aspects Initial_Condition and
6751 Initializes are inserted after pragma SPARK_Mode.
6752
67532014-07-16 Ed Schonberg <schonberg@adacore.com>
6754
6755 * sem_attr.adb (Analyze_Attribute, case 'Update): Handle
6756 properly a choice list with more than one choice, where each
6757 is an aggregate denoting a sequence of array indices for a
6758 multidimentional array. For SPARK use.
6759
8942b30c
AC
67602014-07-16 Vadim Godunko <godunko@adacore.com>
6761
6762 * a-coinho-shared.adb (Adjust): Create
6763 copy of internal shared object and element when source container
6764 is locked.
6765 (Copy): Likewise.
6766 (Query_Element): Likewise.
6767 (Update_Element): Likewise.
6768 (Constant_Reference): Likewise. Raise Constraint_Error on attempt
6769 to get reference for empty holder.
6770 (Reference): Likewise.
6771
67722014-07-16 Thomas Quinot <quinot@adacore.com>
6773
6774 * exp_ch4.adb (Find_Hook_Context): New subprogram, extracted
6775 from Process_Transient_Oject.
6776 * exp_ch4.ads: Ditto.
6777 * exp_ch9.adb (Build_Class_Wide_Master): Insert the _master
6778 declaration as an action on the topmost enclosing expression,
6779 not on a possibly conditional subexpreession.
6780
d6f824bf
VG
67812014-07-16 Vadim Godunko <godunko@adacore.com>
6782
6783 * a-coinho.adb, a-coinho-shared.adb, a-coinho.ads, a-coinho-shared.ads:
6784 Fix parameter mode of Update_Element.
6785
ab476638
AC
67862014-07-16 Robert Dewar <dewar@adacore.com>
6787
6788 * a-coinho.adb, a-coinho-shared.adb, a-coinho-shared.ads: Minor
6789 reformatting.
6790
67912014-07-16 Ed Schonberg <schonberg@adacore.com>
6792
6793 * a-cohase.ads: Type Iterator must be controlled, so that the
6794 tampering bit is properly set through an iteration.
6795 * a-cohase.adb: Add Finalize operation for type Iterator.
6796
3a859cff
ES
67972014-07-16 Ed Schonberg <schonberg@adacore.com>
6798
6799 * a-coinho-shared.adb, a-coinho-shared.ads: Proper structures for
6800 tampering checks.
6801
88c90b68
ES
68022014-07-16 Ed Schonberg <schonberg@adacore.com>
6803
6804 * a-coinho-shared.adb: Fix spurious accessibility check.
6805
56363ffd
JH
68062014-06-15 Jan Hubicka <hubicka@ucw.cz>
6807
9495e947 6808 * gcc-interface/utils.c (process_attributes): Use set_decl_tls_model.
56363ffd 6809
ab938b41
BE
68102014-06-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
6811
6812 PR ada/61505
6813 * gnat_rm.texi: Fix errors with makeinfo 5.1.
6814
56444a32
AC
68152014-06-14 Arnaud Charlet <charlet@adacore.com>
6816
6817 PR ada/61505
9495e947 6818 * gnat_rm.texi: Attempt to fix error with makeinfo 5.1.
56444a32 6819
783da331
AC
68202014-06-13 Yannick Moy <moy@adacore.com>
6821
9495e947 6822 * exp_attr.adb: Fix typo in comment.
783da331
AC
6823 * gnat1drv.adb (Adjust_Global_Switches): Force float overflow
6824 checking in GNATprove_Mode.
6825
68262014-06-13 Ed Schonberg <schonberg@adacore.com>
6827
6828 * a-coinho-shared.adb, a-coinho-shared.ads: Update shared version.
6829
129bbe43
RD
68302014-06-13 Robert Dewar <dewar@adacore.com>
6831
6832 * sem_ch3.adb, sem_ch9.adb, a-coinho.adb, a-coinho.ads: Minor
6833 reformatting.
6834
aca670a0
AC
68352014-06-13 Hristian Kirtchev <kirtchev@adacore.com>
6836
6837 * sem_prag.adb (Analyze_Pragma): Add local
6838 variable Missing_Parentheses. Emit an error when a state
6839 declaration with options appears without parentheses. Add a
6840 guard to prevent a bogus error when a state declaration may be
6841 interpreted as an option if a previous declaration with options
6842 was not parenthesized.
6843
68442014-06-13 Robert Dewar <dewar@adacore.com>
6845
6846 * checks.adb: Validate_Alignment_Check_Warnings: New procedure
6847 (Apply_Address_Clause_Check): Make Aligment_Warnings table entry.
6848 * checks.ads (Alignment_Warnings_Record): New type.
6849 (Alignment_Warnings): New table
6850 (Validate_Alignment_Check_Warnings): New procedure.
6851 * errout.adb (Delete_Warning_And_Continuations): New procedure
6852 (Error_Msg_Internal): Set Warning_Msg (Delete_Warning): Handle
6853 Warnings_Treated_As_Errors (Finalize): Minor reformatting
6854 * errout.ads (Warning_Msg): New variable
6855 (Delete_Warning_And_Continuations): New procedure
6856 * erroutc.adb (Delete_Msg): Handle Warnings_Treated_As_Errors count.
6857 * gnat1drv.adb (Post_Compilation_Validation_Checks): New procedure.
6858
68592014-06-13 Ed Schonberg <schonberg@adacore.com>
6860
6861 * a-coinho.adb, a-coinho.ads: Add Reference machinery.
6862
d2adb45e
AC
68632014-06-13 Hristian Kirtchev <kirtchev@adacore.com>
6864
6865 * errout.adb (SPARK_Msg_N): New routine.
6866 (SPARK_Msg_NE): New routine.
6867 * errout.ads Add a section on SPARK-related error routines.
6868 (SPARK_Msg_N): New routine.
6869 (SPARK_Msg_NE): New routine.
6870 * sem_ch13.adb (Analyze_Aspect_Specifications): Ensure that
6871 pragma Abstract_State is always inserted after SPARK_Mode.
6872 (Insert_After_SPARK_Mode): New routine.
6873 * sem_prag.adb (Analyze_Abstract_State,
6874 Analyze_Constituent, Analyze_External_Property,
6875 Analyze_External_Property_In_Decl_Part, Analyze_Global_Item,
6876 Analyze_Global_List, Analyze_Initialization_Item,
6877 Analyze_Initialization_Item_With_Inputs, Analyze_Input_Item,
6878 Analyze_Input_List, Analyze_Input_Output, Analyze_Part_Of,
6879 Analyze_Pragma, Analyze_Refined_Depends_In_Decl_Part,
6880 Analyze_Refined_Global_In_Decl_Part,
6881 Analyze_Refined_State_In_Decl_Part, Analyze_Refinement_Clause,
6882 Check_Aspect_Specification_Order, Check_Constituent_Usage,
6883 Check_Declaration_Order, Check_Dependency_Clause,
6884 Check_Duplicate_Mode, Check_Duplicate_Option,
6885 Check_Duplicate_Property, Check_External_Properties,
6886 Check_External_Property, Check_Function_Return,
6887 Check_Matching_Constituent, Check_Matching_State,
6888 Check_Mode_Restriction_In_Enclosing_Context,
6889 Check_Mode_Restriction_In_Function, Check_Refined_Global_Item,
6890 Check_State_And_Constituent_Use, Create_Or_Modify_Clause,
6891 Has_Extra_Parentheses, Inconsistent_Mode_Error,
6892 Match_Error, Propagate_Part_Of, Report_Extra_Clauses,
6893 Report_Extra_Constituents_In_List, Report_Extra_Inputs,
6894 Report_Unrefined_States, Report_Unused_Constituents,
6895 Report_Unused_States, Role_Error, Usage_Error):
6896 Convert Error_Msg_XXX calls to SPARK_Msg_XXX calls
6897 to report semantic errors only when SPARK_Mode is on.
6898 (Analyze_Depends_In_Decl_Part): Do not check the syntax of
6899 pragma Depends explicitly, this is now done by the analysis.
6900 (Analyze_Global_In_Decl_List): Do not check the syntax of
6901 pragma Global explicitly, this is now done by the analysis.
6902 (Analyze_Initializes_In_Decl_Part): Do not check the syntax of
6903 pragma Initializes explicitly, this is now done by the analysis.
6904 (Analyze_Part_Of): Do not check the syntax of the encapsulating
6905 state, this is now done by the analysis.
6906 (Analyze_Pragma): Do
6907 not check the syntax of a state declaration, this is now done
6908 by the analysis.
6909 (Analyze_Refined_Depends_In_Decl_Part): Do not
6910 check the syntax of pragma Refined_Depends explicitly, this is now
6911 done by the analysis.
6912 (Analyze_Refined_Global_In_Decl_Part): Do
6913 not check the syntax of pragma Refined_Global explicitly, this is
6914 now done by the analysis.
6915 (Analyze_Refined_State_In_Decl_Part):
6916 Do not check the syntax of pragma Refined_State explicitly, this
6917 is now done by the analysis.
6918 (Check_Dependence_List_Syntax): Removed.
6919 (Check_Global_List_Syntax): Removed.
6920 (Check_Initialization_List_Syntax): Removed.
6921 (Check_Item_Syntax): Removed.
6922 (Check_Missing_Part_Of): Do not consider items from an instance.
6923 (Check_Refinement_List_Syntax): Removed.
6924 (Check_State_Declaration_Syntax): Removed.
6925 (Collect_Global_List): Do not raise Program_Error when the input is
6926 malformed.
6927 (Process_Global_List): Do not raise Program_Error when the input
6928 is malformed.
6929 * sem_ch13.adb: Minor reformatting.
9495e947 6930
d2adb45e
AC
69312014-06-13 Ed Schonberg <schonberg@adacore.com>
6932
6933 * sem_ch3.adb (Find_Type_Name): Diagnose a private type completion
6934 that is an interface definition with an interface list.
6935 (Process_Full_View): Move error message on missmatched interfaces
6936 between views to the declaration of full view, for clarity.
6937 * sem_ch9.adb (Check_Interfaces): Move error message to full view,
6938 for clarity.
6939
80298c3b
AC
69402014-06-13 Robert Dewar <dewar@adacore.com>
6941
6942 * exp_attr.adb (Expand_N_Attribute_Reference, case Pred/Succ): Change
6943 reason to Overflow.
6944
69452014-06-13 Robert Dewar <dewar@adacore.com>
6946
6947 * makeutl.adb: Minor reformatting.
6948
69492014-06-13 Gail Schenker <schenker@adacore.com>
6950
6951 * debug.adb, sem_eval.adb (Why_Not_Static): Remove temporary code and
6952 associated flag (d.z), no longer needed.
6953
69542014-06-13 Ed Schonberg <schonberg@adacore.com>
6955
6956 * sem_ch13.adb (Analyze_Aspect_Specifications): For Import and
6957 Export aspects, do not check whether a corresponding Convention
6958 aspect has been specified. Convention is optional in Ada2012,
6959 and defaults to Convention_Ada.
6960
0083dd66
AC
69612014-06-13 Eric Botcazou <ebotcazou@adacore.com>
6962
6963 * checks.adb (Apply_Address_Clause_Check): Only issue the new
6964 warning if the propagation warning is issued.
6965
69662014-06-13 Thomas Quinot <quinot@adacore.com>
6967
6968 * exp_ch4.adb: Minor reformatting.
6969
69702014-06-13 Robert Dewar <dewar@adacore.com>
6971
6972 * exp_attr.adb (Expand_N_Attribute_Reference, case Pred):
6973 Handle float range check case (Expand_N_Attribute_Reference,
6974 case Succ): Handle float range check case.
6975 * sem_attr.adb (Analyze_Attribute, case Pred/Succ): Handle float
6976 range check case.
6977
69782014-06-13 Vincent Celier <celier@adacore.com>
6979
6980 * makeutl.ads (Compute_Builder_Switches): Change name of
6981 parameter Root_Environment to Env.
6982 * prj-conf.adb (Check_Switches): Call Locate_Runtime with the
6983 Env parameter of procedure Get_Or_Create_Configuration_File.
6984 (Locate_Runtime): Call Find_Rts_In_Path with the Project_Path
6985 of new parameter Env.
6986 * prj-conf.ads (Locate_Runtime): New parameter Env of type
6987 Prj.Tree.Environment.
6988
69892014-06-13 Robert Dewar <dewar@adacore.com>
6990
6991 * gnat_rm.texi: Minor comment clarification for Check_Float_Overflow.
6992
890f1954
RD
69932014-06-13 Robert Dewar <dewar@adacore.com>
6994
6995 * exp_attr.adb, exp_ch9.adb, lib-writ.adb, g-comlin.adb: Minor
6996 reformatting.
6997 * sem_attr.adb: Minor code reformatting and simplification.
6998 * checks.adb: Fix minor typo.
6999
4de10025
AC
70002014-06-13 Emmanuel Briot <briot@adacore.com>
7001
7002 * g-comlin.adb (Get_Argument): fix expansion
7003 of command line arguments (e.g. "*.adb") when using a custom
7004 parser. The parser was not passed to the recursive call, and
7005 thus we were trying to do the expansion on the default command
7006 line parser.
7007
70082014-06-13 Thomas Quinot <quinot@adacore.com>
7009
7010 * exp_ch9.adb: Minor reformatting.
7011
70122014-06-13 Ed Schonberg <schonberg@adacore.com>
7013
7014 * exp_attr.adb (Expand_N_Attribute_Reference, case 'Old):
7015 To determine whether the attribute should be expanded, examine
7016 whether the enclosing postcondition pragma is to be checked,
7017 rather than using the internal flag Assertions_Enabled.
7018
17a35641
AC
70192014-06-13 Ben Brosgol <brosgol@adacore.com>
7020
7021 * gnat_rm.texi: Minor fixes.
7022 * gnat_ugn.texi: Added a missing "@itemize".
7023
70242014-06-13 Robert Dewar <dewar@adacore.com>
7025
7026 * debug.adb: Remove -gnatd.1 flag documentation.
7027 * layout.adb (Layout_Type): Remove special handling of size
7028 for anonymous access type.
7029 * sem_ch3.adb (Replace_Type): Remove special handling of size
7030 for anonymous access type.
7031
19634e40
RD
70322014-06-13 Robert Dewar <dewar@adacore.com>
7033
7034 * debug.adb: Document debug flag -gnatd.1.
7035 * layout.adb (Layout_Type): Size change for anonymous access
7036 types under -gnatd.1.
7037 * sem_ch3.adb (Replace_Type): Size change for anonymous access
7038 types under -gnatd.1.
7039
446ebdbb
AC
70402014-06-13 Robert Dewar <dewar@adacore.com>
7041
7042 * layout.adb (Layout_Type): Anonymous access types designating
7043 unconstrained arrays are always thin pointers.
7044 * sem_ch3.adb (Replace_Type): Anonymous access types designating
7045 unconstrained arrays are always thin pointers.
7046
70472014-06-13 Ed Schonberg <schonberg@adacore.com>
7048
7049 * sem_attr.adb (Analyze_Attribute): Use Check_Parameterless_Call
7050 to resolve the prefix of an attribute that is an entity name
7051 and may be a parameterless call. Minor code reorganization.
7052
c86cf714
RD
70532014-06-13 Robert Dewar <dewar@adacore.com>
7054
7055 * lib.ads, lib.adb, lib-writ.adb, lib-load.adb (Is_Compiler_Unit):
7056 Removed.
7057 * opt.ads (Compiler_Unit): New flag.
7058 * par-ch5.adb (Test_Statement_Required): Call Check_Compiler_Unit
7059 for null statement sequence (not allowed in compiler unit).
7060 * par-prag.adb (Prag): Handle Compiler_Unit[_Warning] during
7061 parsing.
7062 * restrict.ads, restrict.adb (Check_Compiler_Unit): New version and new
7063 calling sequence.
7064 * sem_ch11.adb, sem_ch3.adb, sem_ch4.adb: New calling sequence for
7065 Check_Compiler_Unit.
7066 * sem_ch6.adb (Analyze_Extended_Return_Statement): Call
7067 Check_Compiler_Unit (this construct is not allowed in compiler
7068 units).
7069 * sem_prag.adb (Analyze_Pragma, case Compiler_Unit[_Warning]):
7070 Set Opt.Compiler_Unit.
7071
65ede005
AC
70722014-06-13 Geert Bosch <bosch@adacore.com>
7073
7074 * gnat_rm.texi, s-tasinf-solaris.ads, sem_prag.adb, gnat_ugn.texi,
7075 s-tasinf-mingw.ads, s-tasinf.ads, s-tasinf-linux.ads,
7076 s-tasinf-vxworks.ads: Make Task_Info pragma and package obsolescent.
7077
70782014-06-13 Robert Dewar <dewar@adacore.com>
7079
7080 * s-tasini.adb, s-tarest.adb, s-taprob.adb: Minor reformatting.
7081
c00b86e2
HK
70822014-06-13 Hristian Kirtchev <kirtchev@adacore.com>
7083
7084 * freeze.adb (Freeze_Entity): Remove the check concerning volatile
7085 types in SPARK as it is poorly placed and poorly formulated. The
7086 check was flagging ALL volatile entities as illegal in SPARK.
7087 * sem_prag.adb (Process_Atomic_Shared_Volatile): Flag volatile
7088 types as illegal in SPARK.
7089
e3a325f2
AC
70902014-06-13 Robert Dewar <dewar@adacore.com>
7091
7092 * sem_cat.adb: Minor reformatting.
7093
70942014-06-13 Yannick Moy <moy@adacore.com>
7095
7096 * sem_prag.adb (Analyze_Pragma/Post_Class): Fix typo.
7097
70982014-06-13 Arnaud Charlet <charlet@adacore.com>
7099
7100 * gnat_rm.texi: Add detail on SPARK_05 restriction.
7101
71022014-06-13 Bob Duff <duff@adacore.com>
7103
7104 * s-solita.adb (Get_Sec_Stack_Addr, Init_Tasking_Soft_Links):
7105 Add assertions requiring the secondary stack to be initialized.
7106 * s-solita.ads (Init_Tasking_Soft_Links): Comment.
7107 * s-taprob.adb, s-tarest.adb, s-tasini.adb (elab code): Make sure the
7108 secondary stack is initialized before calling Init_Tasking_Soft_Links,
7109 by adding pragmas Elaborate_Body.
7110
71112014-06-13 Thomas Quinot <quinot@adacore.com>
7112
7113 * sem_ch13.adb (Analyze_Stream_TSS_Definition): Remove temporary
7114 kludge disabling new legality check.
7115
aa611332
AC
71162014-06-13 Hristian Kirtchev <kirtchev@adacore.com>
7117
7118 * freeze.adb (Freeze_Record_Type): Remove checks related to SPARK
7119 volatile types.
7120 (Freeze_Type): Volatile types are now illegal in SPARK.
7121
71222014-06-13 Robert Dewar <dewar@adacore.com>
7123
7124 * aspects.ads, aspects.adb: Add aspect Thread_Local_Storage.
7125 * gnat_rm.texi: Document aspect Thread_Local_Storage.
7126
71272014-06-13 Ed Schonberg <schonberg@adacore.com>
7128
7129 * sem_cat.adb (Validate_Static_Object_Name): A constant whose
7130 value is a temporary that renames an aggregate is legal in a
7131 preelaborated unit. Illegalities, if any will be detected in
7132 the aggregate components.
7133
71342014-06-13 Ed Schonberg <schonberg@adacore.com>
7135
7136 * einfo.ads: Minor reformatting an comment expansion.
7137
5af638c8
AC
71382014-06-13 Robert Dewar <dewar@adacore.com>
7139
7140 * back_end.ads, back_end.adb: Make_Id, Make_SC, Set_RND are moved to
7141 Tbuild.
7142 * tbuild.ads, tbuild.adb: Make_Id, Make_SC, Set_RND are moved here from
7143 Back_End.
7144 * gnat1drv.adb: Make_Id, Make_SC, Set_RND are moved to Tbuild
7145 * sem_warn.adb: Minor reformatting.
7146
71472014-06-13 Doug Rupp <rupp@adacore.com>
7148
7149 * adaint.c (__gnat_open_new_temp) [VMS]: Open binary
7150 files with rfm=udf.
7151
7f2c8954
AC
71522014-06-13 Yannick Moy <moy@adacore.com>
7153
7154 * sem_warn.adb (Check_Unset_References): Take
7155 case of Refined_Post into account in Within_Postcondition check.
7156
71572014-06-13 Hristian Kirtchev <kirtchev@adacore.com>
7158
7159 * freeze.adb (Freeze_Record_Type): Volatile types are not allowed in
7160 SPARK.
7161
71622014-06-13 Yannick Moy <moy@adacore.com>
7163
7164 * sem_ch13.adb (Analyze_Aspect_Specifications/Aspect_Import,
7165 Aspect_Export): Consider that variables may be set outside the program.
7166
28bc3323
AC
71672014-06-13 Robert Dewar <dewar@adacore.com>
7168
7169 * back_end.adb (Make_Id): New function.
7170 (Make_SC): New function.
7171 (Set_RND): New procedure.
7172 * back_end.ads (Make_Id): New function.
7173 (Make_SC): New function.
7174 (Set_RND): New procedure.
7175 * einfo.ads: Minor comment updates.
7176 * frontend.adb: Move Atree.Initialize call to Gnat1drv.
7177 * gnat1drv.adb (Gnat1drv): New calling sequence for
7178 Get_Target_Parameters.
7179 (Gnat1drv): Move Atree.Initialize here from Frontend.
7180 * targparm.adb (Get_Target_Parameters): New calling
7181 sequence (Get_Target_Parameters): Handle pragma Restriction
7182 (No_Dependence,..)
7183 * targparm.ads (Get_Target_Parameters): New calling sequence.
7184
71852014-06-13 Gary Dismukes <dismukes@adacore.com>
7186
7187 * sem_prag.adb (Process_Import_Or_Interface): Exit the homonym
7188 loop if the pragma does not come from source, so that an implicit
7189 pragma Import only applies to the first declaration, avoiding
7190 possible conflicts with earlier explicit and implicit declarations
7191 due to multiple Provide_Shift_Operators pragmas.
7192 (Set_Imported): Remove previous fix that bypassed pragma duplication
7193 error.
7194 * gnat_rm.texi: Change 'equivalent' to 'similar' in description
7195 of Provide_Shift_Operators.
7196
0ab75824 71972014-06-12 Jan Hubicka <hubicka@ucw.cz>
f961457f 7198
0ab75824
JH
7199 * gcc-interface/utils.c (process_attributes) <ATTR_LINK_SECTION>: Pass
7200 string pointer directly to set_decl_section_name.
f961457f 7201
f8c59c05
AC
72022014-06-11 Robert Dewar <dewar@adacore.com>
7203
7204 * sem_ch13.adb: Minor reformatting.
7205
72062014-06-11 Hristian Kirtchev <kirtchev@adacore.com>
7207
7208 * sem_prag.adb (Check_Clause_Syntax): Add new
7209 local variable Outputs. Account for the case where multiple
7210 output items appear as an aggregate.
7211
72122014-06-11 Robert Dewar <dewar@adacore.com>
7213
7214 * sem_warn.adb (Output_Obsolescent_Entity_Warnings): Tag warning
7215 with ?j? not ??.
7216
72172014-06-11 Ed Schonberg <schonberg@adacore.com>
7218
7219 * einfo.ads: Minor reformatting.
7220
72212014-06-11 Hristian Kirtchev <kirtchev@adacore.com>
7222
7223 * a-cbdlli.adb, a-cdlili.adb, a-cidlli.adb, a-crdlli.adb (Insert): Add
7224 new variable First_Node. Update the position after all insertions have
7225 taken place to First_Node.
7226
72272014-06-11 Robert Dewar <dewar@adacore.com>
7228
7229 * debug.adb: Remove debug flag -gnatd.1, no longer needed.
7230 * layout.adb (Layout_Type): Remove test of -gnatd.1.
7231
72322014-06-11 Robert Dewar <dewar@adacore.com>
7233
7234 * sem_ch13.adb: Minor reformatting.
7235
72362014-06-11 Hristian Kirtchev <kirtchev@adacore.com>
7237
7238 * sem_prag.adb (Check_Clause_Syntax): Add new
7239 local variable Outputs. Account for the case where multiple
7240 output items appear as an aggregate.
7241
72422014-06-11 Robert Dewar <dewar@adacore.com>
7243
7244 * sem_warn.adb (Output_Obsolescent_Entity_Warnings): Tag warning
7245 with ?j? not ??.
7246
72472014-06-11 Ed Schonberg <schonberg@adacore.com>
7248
7249 * einfo.ads: Minor reformatting.
7250
72512014-06-11 Hristian Kirtchev <kirtchev@adacore.com>
7252
7253 * a-cbdlli.adb, a-cdlili.adb, a-cidlli.adb, a-crdlli.adb (Insert): Add
7254 new variable First_Node. Update the position after all insertions have
7255 taken place to First_Node.
7256
72572014-06-11 Robert Dewar <dewar@adacore.com>
7258
7259 * debug.adb: Remove debug flag -gnatd.1, no longer needed.
7260 * layout.adb (Layout_Type): Remove test of -gnatd.1.
7261
3e65bfab
AC
72622014-06-11 Thomas Quinot <quinot@adacore.com>
7263
7264 * freeze.ads: Minor reformatting.
7265 * checks.adb (Determine_Range): Do not attempt to determine
7266 the range of a deferred constant whose full view has not been
7267 seen yet.
7268 * sem_res.adb (Resolve): Remove undesirable guard against
7269 resolving expressions from expression functions.
7270
72712014-06-11 Robert Dewar <dewar@adacore.com>
7272
7273 * debug.adb (Debug_Flag_Dot_1): Set to enable fix for anonymous
7274 access types.
7275 * layout.adb (Layout_Type): Make anonymous access types for
7276 subprogram formal types and return types always thin. For now
7277 only enabled if -gnatd.1 set.
7278
72792014-06-11 Ed Schonberg <schonberg@adacore.com>
7280
7281 * sem_ch13.adb (Analyze_Stream_TSS_Definition): Apply legality
7282 rule for stream attributes of interface types (RM 13.13.2 (38/3)):
7283 subprogram must be a null procedure.
7284
40f4dbbe
AC
72852014-06-11 Hristian Kirtchev <kirtchev@adacore.com>
7286
7287 * sem_prag.adb (Analyze_Input_Item): Allow formal
7288 parameters to appear as input_items in an initialization_list
7289 of pragma Initializes. Encapsulation now applies to states and
7290 variables only (as it should). Add RM references to key errors.
7291 * sem_prag.adb (Set_Imported): Suppress errors
7292 about preceding Imports when the pragma does not come from source,
7293 which can happen through use of pragma Provide_Shift_Operators.
7294
72952014-06-11 Thomas Quinot <quinot@adacore.com>
7296
7297 * sem_ch3.adb: Minor reformatting.
7298 * einfo.ads (Full_View): Minor comment update.
7299
73002014-06-11 Robert Dewar <dewar@adacore.com>
7301
7302 * einfo.adb (Is_Independent): New flag.
7303 * einfo.ads (Is_Independent): New flag.
7304 (Has_Independent_Components): Clean up and fix comments.
7305 * sem_prag.adb (Fix_Error): Deal with changing argument
7306 [of] to entity [for].
7307 (Analyze_Pragma, case Independent): Set Is_Independent flag
7308 (Analyze_Pragma, case Independent_Components): Set Is_Independent flag
7309 in all components of specified record.
7310
73112014-06-11 Thomas Quinot <quinot@adacore.com>
7312
7313 * sem_ch12.adb (Analyze_Formal_Decimal_Fixed_Point_Type):
7314 Set proper Etype on bounds of dummy type created for analysis
7315 of the generic.
7316
73172014-06-11 Robert Dewar <dewar@adacore.com>
7318
7319 * debug.adb: Minor comment fix (add missing section of dot
7320 numeric flags).
7321
e9daba51
AC
73222014-06-11 Robert Dewar <dewar@adacore.com>
7323
7324 * gnat_rm.texi, switch-c.adb, sem_prag.adb, a-tgdico.ads, par-prag.adb,
7325 opt.ads, a-finali.ads, snames.ads-tmpl: Remove all traces of
7326 pragma/aspects Pure_05 Pure_12 Preelaborate_05.
7327 * errout.adb (Output_Messages): Avoid duplicate output for
7328 library level instance.
7329 * sem_elab.adb (Is_Call_Of_Generic_Formal): Moved to outer level
7330 (Check_Elab_Call): Add call to Is_Call_Of_Generic_Formal
7331 * exp_ch4.adb (Expand_N_Op_Expon): New interface for Exp_Modular.
7332 * s-expmod.ads, s-expmod.adb (Exp_Modular): Change interface to
7333 accomodate largest modulus value.
7334 * gnat_ugn.texi: Minor updates.
7335
73362014-06-11 Ed Schonberg <schonberg@adacore.com>
7337
7338 * sem_ch12.adb (Instantiate_Package_Body): Do not attempt to
7339 load body of generic package or its parent, if body is optional
7340 and the unit does not require a body.
7341
f852ffee
RD
73422014-06-11 Robert Dewar <dewar@adacore.com>
7343
7344 * gnat_rm.texi: Document System.Unsigned_Types.
7345 * impunit.adb: System.Unsigned_Types (s-unstyp.ads) is user accessible.
7346 * s-unstyp.ads: Update comments (this is now user available unit).
7347
9926efec
AC
73482014-06-11 Robert Dewar <dewar@adacore.com>
7349
7350 * make.adb, sem_res.adb: Minor reformatting.
7351
73522014-06-11 Thomas Quinot <quinot@adacore.com>
7353
7354 * a-astaco.ads, a-tags.ads, s-excdeb.ads, a-tgdico.ads, a-stmaco.ads,
7355 a-except-2005.ads, s-except.ads, a-taside.ads, a-dynpri.ads,
7356 a-chahan.ads, a-sytaco.ads, s-stalib.ads, a-strmap.ads: Change pragmas
7357 Preelaborate_05 to just Preelaborate in runtime units, and similarly
7358 change Pure_05 to just Pure.
7359
dda38714
AC
73602014-06-11 Ed Schonberg <schonberg@adacore.com>
7361
7362 * sem_ch6.adb (Analyze_Subprogram_Body_Contract): Do not attempt
7363 analysis if error has been posted on subprogram body.
7364
73652014-06-11 Ed Schonberg <schonberg@adacore.com>
7366
7367 * sem_ch13.adb (Analyze_Stream_TSS_Definition): Apply legality
7368 rule given in RM 13.1 (8/1) for operational attributes to stream
7369 attributes: the attribute must apply to a first subtype. Fixes
7370 missing errors in ACATS test bdd2004.
7371
73722014-06-11 Robert Dewar <dewar@adacore.com>
7373
7374 * exp_ch3.adb (Build_Record_Init_Proc): Don't build for variant
7375 record type if restriction No_Implicit_Conditionals is active.
7376 (Expand_N_Object_Declaration): Don't allow default initialization
7377 for variant record type if restriction No_Implicit_Condition is active.
7378 (Build_Variant_Record_Equality): Don't build for variant
7379 record type if restriction No_Implicit_Conditionals is active.
7380 * exp_ch4.adb (Expand_N_Op_Eq): Error if variant records with
7381 No_Implicit_Conditionals.
7382 * sem_aux.ads, sem_aux.adb (Has_Variant_Part): New function.
7383
73842014-06-11 Ramon Fernandez <fernandez@adacore.com>
7385
7386 * i-cstrin.ads: Update comments.
7387
73882014-06-11 Ed Schonberg <schonberg@adacore.com>
7389
7390 * sem_res.adb (Resolve_Selected_Component): Handle properly a
7391 selected component whose prefix is overloaded, when none of the
7392 interpretations matches the expected type.
7393
73942014-06-11 Bob Duff <duff@adacore.com>
7395
7396 * make.adb (Wait_For_Available_Slot): Give a more
7397 informative error message; if the ALI file is not found, print
7398 the full path of what it's looking for.
7399
810241a5
AC
74002014-06-11 Sergey Rybin <rybin@adacore.com frybin>
7401
7402 * gnat_ugn.texi, vms_data.ads: add description of gnatstub -W<par>
7403 option to specify the result file encoding.
7404
74052014-06-11 Robert Dewar <dewar@adacore.com>
7406
7407 * errout.ads, sem_ch12.adb: Minor reformatting.
7408 * debug.adb, erroutc.adb: Remove -gnatd.q debug switch.
7409 * lib-xref.adb: Minor reformatting.
7410 * restrict.adb: Minor code reorganization (put routines in
7411 alpha order).
7412
2c8d828a
AC
74132014-06-11 Yannick Moy <moy@adacore.com>
7414
7415 * einfo.ads: Minor typo in comment
7416
74172014-06-11 Ed Schonberg <schonberg@adacore.com>
7418
7419 * sinfo.ads, sinfo.adb: New attribute Uninitialized_Variable, for
7420 formal private types and private type extensions, to indicate
7421 variable in a generic unit whose uninitialized use suggest that
7422 actual type should be fully initialized.
7423 Needs_Initialized_Actual: removed, functionaity replaced by
7424 the above.
7425 * lib-xref.adb (Generate_Reference): Generate a reference for
7426 variables of a formal type when the unit is not the main unit,
7427 to enable appropriate warnings in an instance.
7428 * sem_ch12.adb (Check_Ininialized_Type): Improve warning on use
7429 of variable in a generic unit that suggests that actual type
7430 should be full initialized.
7431 * sem_warn.adb; (May_Need_Initialized_Actual): Make into procedure
7432 and do not emot warning, which now only appears in an instance.
7433
74342014-06-11 Eric Botcazou <ebotcazou@adacore.com>
7435
7436 * gnat_ugn.texi: Fix minor typo.
7437
74382014-06-11 Hristian Kirtchev <kirtchev@adacore.com>
7439
7440 * sem_ch3.adb Add with and use clause for Sem_Ch10.
7441 (Analyze_Declarations): Code reformatting. Analyze the contract
7442 of a subprogram body stub at the end of the declarative region.
7443 * sem_ch6.adb (Analyze_Subprogram_Body_Contract): Spec_Id is
7444 now a variable. Do not process the body if its contract is not
7445 available. Account for subprogram body stubs when extracting
7446 the corresponding spec.
7447 * sem_ch6.ads (Analyze_Subprogram_Contract): Update the comment
7448 on usage.
7449 * sem_ch10.ads, sem_ch10.adb (Analyze_Subprogram_Body_Stub_Contract):
7450 New routine.
7451 * sem_prag.adb (Analyze_Depends_In_Decl_Part):
7452 Account for subprogram body stubs when extracting the
7453 corresponding spec.
7454 (Analyze_Global_In_Decl_List):
7455 Account for subprogram body stubs when extracting the
7456 corresponding spec.
7457 (Analyze_Refined_Depends_In_Decl_Part):
7458 Use Find_Related_Subprogram_Or_Body to retrieve the declaration
7459 of the related body. Spec_Is now a variable. Account for
7460 subprogram body stubs when extracting the corresponding spec.
7461 (Analyze_Refined_Global_In_Decl_Part): Use
7462 Find_Related_Subprogram_Or_Body to retrieve the declaration
7463 of the related body. Spec_Is now a variable. Account for
7464 subprogram body stubs when extracting the corresponding spec.
7465 (Collect_Subprogram_Inputs_Output): Account for subprogram body
7466 stubs when extracting the corresponding spec.
7467
74682014-06-11 Vincent Celier <celier@adacore.com>
7469
7470 * gnatcmd.adb (Process_Link): Do not invoke gnatlink with
7471 -lgnarl or -lgnat.
7472
b785e0b8
AC
74732014-06-11 Robert Dewar <dewar@adacore.com>
7474
7475 * debug.adb: Add debug flag -gnatd.q.
7476 * erroutc.adb (Prescan_Message): Bomb if untagged warning with
7477 -gnatd.q set.
7478 * styleg.adb (Check_Xtra_Parens): Message should be a style
7479 message.
7480 * sem_aggr.adb, sem_ch3.adb, exp_ch9.adb, checks.adb, sem_prag.adb,
7481 par-endh.adb, eval_fat.adb, freeze.adb, sem_util.adb, sem_attr.adb,
7482 sem_elab.adb, sem_ch6.adb, sem_warn.adb, sem_cat.adb,
7483 sem_ch13.adb, lib-xref.adb: Add remaining warning tags.
7484
74852014-06-11 Ben Brosgol <brosgol@adacore.com>
7486
7487 * gnat_rm.texi: Revised chapter on Implementation Defined
7488 Characteristics.
7489
2e57f88b
AC
74902014-06-11 Geert Bosch <bosch@adacore.com>
7491
7492 * s-exctab.adb: avoid race conditions in exception registration.
7493
74942014-06-11 Robert Dewar <dewar@adacore.com>
7495
7496 * errout.adb (Warn_Insertion): New function.
7497 (Error_Msg): Use Warn_Insertion and Prescan_Message.
7498 (Error_Msg_Internal): Set Info field of error object.
7499 (Error_Msg_NEL): Use Prescan_Message.
7500 (Set_Msg_Text): Don't store info: at start of message.
7501 (Skip_Msg_Insertion_Warning): New name for Set_Msg_Insertion_Warning.
7502 (Skip_Msg_Insertion_Warning): Now just skips warning insertion.
7503 * errout.ads: Document new ?$? and >$> insertion sequences
7504 Document use of "(style)" and "info: "
7505 * erroutc.adb (dmsg): Print several missing fields
7506 (Get_Warning_Tag): Handle -gnatel case (?$?) (Output_Msg_Text):
7507 Deal with new tagging of info messages
7508 * erroutc.ads: Is_Info_Msg: New global (Error_Msg_Object):
7509 Add field Info (Prescan_Message): New procedure, this procedure
7510 replaces the old Test_Style_Warning_Serious_Unconditional_Msg
7511 * errutil.adb, exp_util.adb, par-ch7.adb, sem_ch13.adb, sem_ch7.adb,
7512 sem_elab.adb: Follow new rules for info message (info belongs
7513 only at the start of a message, and only in the first message,
7514 not in any of the continuations).
7515 * gnat_ugn.texi: Document full set of warning tags.
7516
c230ed0b
AC
75172014-06-11 Gary Dismukes <dismukes@adacore.com>
7518
7519 * sem_util.adb: Minor typo fix.
7520
75212014-06-11 Ed Schonberg <schonberg@adacore.com>
7522
7523 * sem_warn.adb (Check_References): Do not emit spurious warnings
7524 on uninitialzed variable of a formal private type if variable
7525 is not read.
7526
af0e1429 75272014-06-09 Jan Hubicka <hubicka@ucw.cz>
24d047a3 7528
af0e1429
JH
7529 * gcc-interface/utils.c (process_attributes) <ATTR_LINK_SECTION>: Use
7530 set_decl_section_name accessor.
24d047a3 7531
f6a7cffc
TS
75322014-05-22 Thomas Schwinge <thomas@codesourcery.com>
7533
7534 * gcc-interface/utils.c (DEF_FUNCTION_TYPE_0, DEF_FUNCTION_TYPE_6)
7535 (DEF_FUNCTION_TYPE_7, DEF_FUNCTION_TYPE_8)
7536 (DEF_FUNCTION_TYPE_VAR_5): Cosmetic fixes.
7537
0688dac8
RD
75382014-05-21 Robert Dewar <dewar@adacore.com>
7539
7540 * layout.adb: Minor reformatting.
7541 * sem_prag.adb (Analyze_Pragma, case Inspection_Point): Call
7542 dummy procedure ip.
7543
75442014-05-21 Robert Dewar <dewar@adacore.com>
7545
7546 * restrict.ads (Implementation_Restriction): Add entry for
7547 No_Fixed_IO.
7548 * rtsfind.ads: Add entries for Fixed_IO and Decimal_IO in
7549 Ada.[Wide_[Wide_]Text_IO.
7550 * s-rident.ads (Restriction_Id): Add entry for No_Fixed_IO.
7551 * sem_attr.adb (Analyze_Attribute): Disallow fixed point types
7552 for Img, Image, Value, Wide_Image, Wide_Value, Wide_Wide_Image,
7553 Wide_Wide_Value if restriction No_Fixed_IO is set.
7554 * sem_util.adb (Set_Entity_Checks): Check restriction No_Fixed_IO.
7555
ee6208f2
AC
75562014-05-21 Robert Dewar <dewar@adacore.com>
7557
7558 * gnatcmd.adb: Minor error msg changes (no upper case letter
7559 at start).
7560 * sem_ch12.adb, sem_ch5.adb, sem_res.adb, sem_util.adb: Minor
7561 reformatting.
7562
75632014-05-21 Robert Dewar <dewar@adacore.com>
7564
7565 * debug.adb: Debug flag -gnatd.G inhibits static elab tracing
7566 via generic formals.
7567 * sem_elab.adb (Is_Call_Of_Generic_Formal): Return False if
7568 -gnatd.G is set.
7569
75702014-05-21 Thomas Quinot <quinot@adacore.com>
7571
7572 * exp_pakd.adb (Revert_Storage_Order): Renamed from Byte_Swap to
7573 more accurately describe that this subprogram needs to come into
7574 play also in cases where no byte swapping is involved, because
7575 it also takes care of some required shifts (left-justification
7576 of values).
7577
75782014-05-21 Thomas Quinot <quinot@adacore.com>
7579
7580 * freeze.adb (Check_Component_Storage_Order): Indicate whether
7581 a Scalar_Storage_Order attribute definition is present for the
7582 component's type.
7583 (Freeze_Record_Type): Suppress junk warnings
7584 about purportedly junk Bit_Order / Scalar_Storage_Order attribute
7585 definitions.
7586
75872014-05-21 Robert Dewar <dewar@adacore.com>
7588
7589 * sem_ch8.adb (Analyze_Subprogram_Renaming): Put back call
7590 to Kill_Elaboration_Checks.
7591
75922014-05-21 Gary Dismukes <dismukes@adacore.com>
7593
7594 * layout.adb (Assoc_Add): Suppress the optimization of the (E
7595 - C1) + C2 case, when the expression type is unsigned and C1 <
7596 C2, to avoid creating a negative literal when folding.
7597
ea26c8e4
HK
75982014-05-21 Hristian Kirtchev <kirtchev@adacore.com>
7599
7600 * freeze.adb (Freeze_Record_Type): Update the use of
7601 Is_SPARK_Volatile.
7602 * sem_ch3.adb (Analyze_Object_Contract): Update the use of
7603 Is_SPARK_Volatile.
7604 (Process_Discriminants): Update the use of Is_SPARK_Volatile.
7605 * sem_ch5.adb (Analyze_Iterator_Specification): Update the use
7606 of Is_SPARK_Volatile.
7607 (Analyze_Loop_Parameter_Specification):
7608 Update the use of Is_SPARK_Volatile.
7609 * sem_ch6.adb (Process_Formals): Catch an illegal use of an IN
7610 formal parameter when its type is volatile.
7611 * sem_prag.adb (Analyze_Global_Item): Update the use of
7612 Is_SPARK_Volatile.
7613 * sem_res.adb (Resolve_Entity_Name): Correct the guard which
7614 determines whether an entity is a volatile source SPARK object.
7615 * sem_util.adb (Has_Enabled_Property): Accout for external
7616 properties being set on objects other than abstract states
7617 and variables. An example would be a formal parameter.
7618 (Is_SPARK_Volatile): New routine.
7619 (Is_SPARK_Volatile_Object):
7620 Remove the entity-specific tests. Call routine Is_SPARK_Volatile
7621 when checking entities and/or types.
7622 * sem_util.ads (Is_SPARK_Volatile): New routine.
7623
65529f74
AC
76242014-05-21 Robert Dewar <dewar@adacore.com>
7625
7626 * sem_warn.adb: Minor fix to warning messages (use ?? instead
7627 of ?).
7628
76292014-05-21 Vincent Celier <celier@adacore.com>
7630
7631 * gnatcmd.adb (GNATCmd): For platforms other than VMS, recognize
7632 switch --version and --help.
7633
76342014-05-21 Robert Dewar <dewar@adacore.com>
7635
7636 * sem_elab.adb (Is_Call_Of_Generic_Formal): New function.
7637
76382014-05-21 Ed Schonberg <schonberg@adacore.com>
7639
7640 * sem_ch5.adb (Analyze_Iterator_Specification): Set type of
7641 iterator variable when the domain of iteration is a formal
7642 container and this is an element iterator.
7643
76442014-05-21 Bob Duff <duff@adacore.com>
7645
7646 * sem_ch12.adb: Minor reformatting.
7647
d3289ba2
RD
76482014-05-21 Robert Dewar <dewar@adacore.com>
7649
7650 * sinfo.ads, sem_ch12.adb, sem_warn.adb: Minor reformatting.
7651
c8a3028c
AC
76522014-05-21 Robert Dewar <dewar@adacore.com>
7653
7654 * sem_elab.adb: Minor reformatting.
7655 * s-taprop.ads: Minor comment fix.
7656 * sem_ch8.adb (Analyze_Subprogram_Renaming): Remove call to
7657 Kill_Elaboration_Checks.
7658 * errout.adb, erroutc.adb: Minor reformatting.
7659
76602014-05-21 Thomas Quinot <quinot@adacore.com>
7661
7662 * exp_pakd.adb (Byte_Swap): Handle the case of a sub-byte
7663 component. No byte swapping occurs, but this procedure also takes
7664 care of appropriately justifying the argument.
7665
76662014-05-21 Hristian Kirtchev <kirtchev@adacore.com>
7667
7668 * sem_ch6.adb: sem_ch6.adb (Analyze_Aspects_On_Body_Or_Stub):
7669 New routine.
7670 (Analyze_Subprogram_Body_Helper): Move the
7671 analysis of aspect specifications and the processing of the
7672 subprogram body contract after inlining has taken place.
7673 (Diagnose_Misplaced_Aspect_Specifications): Removed.
7674
76752014-05-21 Javier Miranda <miranda@adacore.com>
7676
7677 * sem_ch3.adb (Build_Derived_Record_Type): Revert previous change.
7678
76792014-05-21 Robert Dewar <dewar@adacore.com>
7680
7681 * sem_eval.ads, sem_eval.adb (Why_Not_Static): Messages are not
7682 continuations any more.
7683
76842014-05-21 Ed Schonberg <schonberg@adacore.com>
7685
7686 * sinfo.ads, sinfo.adb: New flag Needs_Initialized_Actual,
7687 present in formal_Private_Definitions and on private extension
7688 declarations of a formal derived type. Set when the use of the
7689 formal type in a generic suggests that the actual should be a
7690 fully initialized type.
7691 * sem_warn.adb (May_Need_Initialized_Actual): new subprogram
7692 to indicate that an entity of a generic type has default
7693 initialization, and that the corresponing actual type in any
7694 subsequent instantiation should be fully initialized.
7695 * sem_ch12.adb (Check_Initialized_Type): new subprogram,
7696 to emit a warning if the actual for a generic type on which
7697 Needs_Initialized_Actual is set is not a fully initialized type.
7698
23e28b42
AC
76992014-05-21 Robert Dewar <dewar@adacore.com>
7700
7701 * sem_elab.adb, prj-dect.adb: Minor reformatting.
7702
77032014-05-21 Robert Dewar <dewar@adacore.com>
7704
7705 * erroutc.ads: Minor comment addition.
7706
77072014-05-21 Robert Dewar <dewar@adacore.com>
7708
7709 * errout.ads: Add documentation for use of >*> tag.
7710 * restrict.adb: Make sure we use >*> tag for restriction warnings.
7711
77122014-05-21 Gary Dismukes <dismukes@adacore.com>
7713
7714 * debug.adb: Add case of illegal overriding_indicator for a
7715 protected subprogram body to description of -gnatd.E switch.
7716 * sem_ch6.adb (Verify_Overriding_Indicator): Issue error message
7717 for cases of giving overriding_indicators on protected subprogram
7718 bodies, but change this to a warning if -gnatd.E is enabled. No
7719 longer give a style warning about missing indicators on protected
7720 subprogram bodies.
7721
b7b92f15
AC
77222014-05-21 Robert Dewar <dewar@adacore.com>
7723
7724 * prj.ads, sem_ch12.adb, prj.adb, exp_pakd.adb,
7725 sem_elab.ads: Minor reformatting.
7726 * erroutc.adb, erroutc.ads (Warning_Specifically_Suppressed): Make Tag
7727 parameter optional.
7728
77292014-05-21 Pascal Obry <obry@adacore.com>
7730
7731 * prj-dect.adb: Allow package Install in aggregate project.
7732
0df5ae93
AC
77332014-05-21 Robert Dewar <dewar@adacore.com>
7734
7735 * sem_ch13.adb (Analyze_Aspect_Specifications):
7736 Insert_Delayed_Pragma is now used for the case of Attach_Handler.
7737 * sem_prag.adb: Minor comment improvements.
7738
77392014-05-21 Ed Schonberg <schonberg@adacore.com>
7740
7741 * sem_ch12.adb (Install_Body): When checking whether freezing of
7742 instantiation must be delayed, verify that the common enclosing
7743 subprogram to generic and instance is in fact an overloadable
7744 entity.
7745
77462014-05-21 Vincent Celier <celier@adacore.com>
7747
7748 * makeutl.adb (Mains.Complete_Mains.Do_Complete): Look for all
7749 mains with the same name and fail if there is more than one.
7750 * prj.ads, prj.adb (Find_All_Sources): New function
7751
9db78a42
RD
77522014-05-21 Robert Dewar <dewar@adacore.com>
7753
7754 * sem_ch13.adb: Minor reformatting.
7755 * lib-xref-spark_specific.adb, sem_util.adb: Minor reformatting.
7756 * sem_prag.adb: Minor error message improvement.
7757
63b5225b
YM
77582014-05-21 Yannick Moy <moy@adacore.com>
7759
7760 * lib-xref-spark_specific.adb, lib-xref.ads, lib-xref.adb
7761 (Enclosing_Subprogram_Or_Package): Only return a library-level
7762 package.
7763
a8a89b74
JM
77642014-05-21 Javier Miranda <miranda@adacore.com>
7765
7766 * sem_ch3.adb (Build_Derived_Record_Type): Initialize Parent_Base
7767 to the full view of the parent type when processing a derived type
7768 which is the full view of a private type not defined in a generic
7769 unit which is derived from a private type with discriminants
7770 whose full view is a non-tagged record type.
7771
601bb6b3
AC
77722014-05-21 Javier Miranda <miranda@adacore.com>
7773
7774 * exp_ch4.adb (Expand_Allocator_Expression.Apply_Accessibility_Check):
7775 Complete previous patch.
7776
77772014-05-21 Thomas Quinot <quinot@adacore.com>
7778
95bc61b2 7779 PR ada/9535
601bb6b3
AC
7780 * g-socket.adb (Read and Write for Datagram_Socket_Stream_Type):
7781 Provide a behaviour more consistent with underlying datagram
7782 socket: do not attempt to loop over Send_Socket/Receive_Socket
7783 iterating along the buffer.
7784
77852014-05-21 Hristian Kirtchev <kirtchev@adacore.com>
7786
7787 * freeze.adb (Freeze_Record_Type): Ensure that a discriminated
7788 or a tagged type is not labelled as volatile. Ensure that a
7789 non-volatile type has no volatile components.
7790 * sem_ch3.adb (Analyze_Object_Contract): Add local constant
7791 Obj_Typ. Code reformatting. Ensure that a discriminated or
7792 tagged object is not labelled as volatile.
7793 * sem_prag.adb (Process_Atomic_Shared_Volatile): Ensure that
7794 pragma Volatile applies to a full type declaration or an object
7795 declaration when SPARK mode is on.
7796
77972014-05-21 Sergey Rybin <rybin@adacore.com frybin>
7798
7799 * gnat_ugn.texi: For ASIS tools, reword the paragraph about
7800 providing options needed for compiling the argument source for
7801 the situation when a project file can be used as a tool parameter.
7802
78032014-05-21 Gary Dismukes <dismukes@adacore.com>
7804
7805 * gnat_rm.texi: Minor typo fix.
7806
da574a86
AC
78072014-05-21 Robert Dewar <dewar@adacore.com>
7808
7809 * stand.adb (Tree_Read): Read missing entities.
7810 (Tree_Write): Write missing entities.
7811
78122014-05-21 Ben Brosgol <brosgol@adacore.com>
7813
7814 * gnat_ugn.texi: Wordsmithing edits to Coupling Metrics Control
7815 section in gnatmetric chapter.
7816
78172014-05-21 Robert Dewar <dewar@adacore.com>
7818
7819 * exp_ch6.adb (Expand_Actuals): Spec moved here, since not used
7820 outside Exp_Ch6 (Expand_Actuals): Deal with proper insertion of
7821 post-call copy write back (see detailed comment in code).
7822 * exp_ch6.ads (Expand_Actuals): Moved to body, not used outside
7823 Exp_Ch6.
7824 * tbuild.ads: Minor reformatting.
7825
78262014-05-21 Robert Dewar <dewar@adacore.com>
7827
7828 * stand.ads: Add warning about adding new entities and
7829 Tree_Read/Tree_Write.
7830
78312014-05-21 Robert Dewar <dewar@adacore.com>
7832
7833 * sem_util.adb (Set_Entity_With_Checks): Don't complain about
7834 references to restricted entities within the units in which they
7835 are declared.
7836
78372014-05-21 Robert Dewar <dewar@adacore.com>
7838
7839 * gnat1drv.adb (Check_Bad_Body): Use Source_File_Is_Body to
7840 simplify the needed test, and also deal with failure to catch
7841 situations with non-standard names.
7842 * sinput-l.ads, sinput-l.adb (Source_File_Is_No_Body): New function
7843 (Source_File_Is_Subunit): Removed, no longer used.
7844
78452014-05-21 Javier Miranda <miranda@adacore.com>
7846
7847 * exp_ch4.adb
7848 (Expand_Allocator_Expression.Apply_Accessibility_Check): for a
7849 renaming of an access to interface object there is no need to
7850 generate extra code to reference the tag.
7851
77a40ec1
AC
78522014-05-21 Robert Dewar <dewar@adacore.com>
7853
7854 * errout.adb, erroutc.adb, erroutc.ads: Allow warning tag in pragma
7855 Warnings (Off, string).
7856
78572014-05-21 Robert Dewar <dewar@adacore.com>
7858
7859 * osint.adb: Fix three error messages to say invalid instead
7860 of erroneous.
7861 * par-ch4.adb, exp_aggr.adb, sem_attr.adb, sem_aux.adb, sem_ch3.adb,
7862 sem_ch5.adb, sem_ch6.adb, sem_ch7.adb, sem_dim.adb, sem_res.adb,
7863 sem_util.adb, sem_util.ads: Fix incorrect use of erroneous in comments.
7864
78652014-05-21 Ed Schonberg <schonberg@adacore.com>
7866
7867 * freeze.adb, sem_ch13.adb, sem_ch13.ads, sem_ch9.adb,
7868 sem_ch9.ads: Move discriminant manipulation routines for analysis of
7869 aspect specifications from sem_ch9 to sem_ch13, where they belong.
7870
17cf9038
AC
78712014-05-21 Robert Dewar <dewar@adacore.com>
7872
7873 * gnat_ugn.texi: Clearly document -gnatw.g (GNAT warnings).
7874 Clearly document -gnatyg (GNAT style switches).
7875 * usage.adb: Add line line for -gnatw.g (GNAT warnings) More
7876 detail for line for -gnatyg (GNAT style switches) -gnatw.d/D is
7877 available for VMS after all.
7878 * warnsw.adb: Reorganize to eliminate duplicated code
7879 (Restore_Warnings): Add a couple of missing entries
7880 (Save_Warnings): Add a couple of missing entries.
7881 * warnsw.ads: Add missing entries to Warning_Record (not clear
7882 what the impact is).
7883
78842014-05-21 Robert Dewar <dewar@adacore.com>
7885
7886 * errout.adb (Set_Msg_Insertion_Warning): Handle ?*? (restriction
7887 warning) case.
7888 * errout.ads: Document ?*? (restriction warning) insertion.
7889 * erroutc.adb (Get_Warning_Tag): Deal with ?*? (restriction
7890 warning) case.
7891 * erroutc.ads: Document use of * for restriction warning tag.
7892 * restrict.adb (Restriction_Msg): Tag with ?*? instead of ??.
7893
78942014-05-21 Ed Schonberg <schonberg@adacore.com>
7895
7896 * sem_ch9.adb (Push_Scope_And_Install_Discriminants): Do not
7897 make discriminants immediately visible when analyzing an aspect
7898 of a subtype declaration.
7899 (Uninstall_Discriminants): Do not apply to the entity in a
7900 subtype declaration.
7901
31382249
AC
79022014-05-21 Ed Schonberg <schonberg@adacore.com>
7903
7904 * sem_util.adb: Code clean up.
7905
79062014-05-21 Eric Botcazou <ebotcazou@adacore.com>
7907
7908 * gnat_ugn.texi: Document -Werror.
7909
6413dd81
AC
79102014-05-21 Bob Duff <duff@adacore.com>
7911
7912 * sem_util.adb (Is_Dependent_Component_Of_Mutable_Object):
7913 This was returning False if the Object is a constant view. Fix
7914 it to return True in that case, because it might be a view of
7915 a variable.
7916 (Has_Discriminant_Dependent_Constraint): Fix latent
7917 bug; this function was crashing when passed a discriminant.
7918
79192014-05-21 Robert Dewar <dewar@adacore.com>
7920
7921 * gnat_ugn.texi: Remove misplaced section that is now obsolete.
7922 * s-arit64.adb: Minor code reorganization.
7923 * sem_prag.adb: Minor comment fix (remove erroneous use of the
7924 term erroneous).
7925
79262014-05-21 Robert Dewar <dewar@adacore.com>
7927
7928 * g-table.adb, g-dyntab.adb (Reallocate): Fix possible overflow in
7929 computing new table size.
7930
2735b82d
AC
79312014-05-21 Robert Dewar <dewar@adacore.com>
7932
7933 * einfo.ads: Minor reformatting.
7934 * ceinfo.adb: Deal with slight format change of einfo.ads.
7935
79362014-05-21 Ed Schonberg <schonberg@adacore.com>
7937
7938 * sem_prag.adb (Analyze_Part_Of): Further work on the proper
7939 implementation of the SPARK 2014 rule concerning private child
7940 units (LRM 7.2.6).
7941
79422014-05-21 Vincent Celier <celier@adacore.com>
7943
7944 * makeusg.adb: Add switch -d to usage.
7945
79462014-05-21 Ed Schonberg <schonberg@adacore.com>
7947
7948 * sem_util.adb (Find_Actual): If an actual that is the prefix
7949 of an enclosing prefixed call has been rewritten, use Nkind
7950 and Sloc to identify the corresponding formal, when handling
7951 deferred references.
7952
79532014-05-21 Robert Dewar <dewar@adacore.com>
7954
7955 * debug.adb: Document -gnatd.z switch.
7956 * sem_eval.adb (Why_Non_Static): Test -gnatd.z switch.
7957
149604e4
RD
79582014-05-21 Robert Dewar <dewar@adacore.com>
7959
7960 * einfo.ads (Can_Never_Be_Null): Minor comment update.
7961 * sem_prag.adb (Check_Arg_Is_Task_Dispatching_Policy): Minor
7962 error message change.
7963 * s-arit64.adb ("abs"): New function. Use expression functions
7964 for the simple conversions and arithmetic.
7965
40e63ada
EB
79662014-05-18 Eric Botcazou <ebotcazou@adacore.com>
7967
7968 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Rework comment and
7969 set function_start_locus.
7970
dd25fe0a
EB
79712014-05-18 Eric Botcazou <ebotcazou@adacore.com>
7972
7973 * utils.c (gnat_write_global_declarations): Adjust the flags put on
7974 dummy_global.
7975
4aecc2f8
EB
79762014-05-18 Eric Botcazou <ebotcazou@adacore.com>
7977
7978 * gcc-interface/decl.c (change_qualified_type): New static function.
7979 (gnat_to_gnu_entity): Use it throughout to add qualifiers on types.
7980 <E_Array_Type>: Set TYPE_VOLATILE on the array type directly.
7981 <E_Array_Subtype>: Likewise.
7982 Do not set flags on an UNCONSTRAINED_ARRAY_TYPE directly.
7983 (gnat_to_gnu_component_type): Likewise.
7984 (gnat_to_gnu_param): Likewise.
7985
08b8b90c
EB
79862014-05-18 Eric Botcazou <ebotcazou@adacore.com>
7987
7988 * fe.h (Set_Present_Expr): Move around.
7989 (End_Location): New macro.
7990 * gcc-interface/trans.c (Case_Statement_to_gnu): Use End_Location.
7991
43a4dd82
EB
79922014-05-18 Eric Botcazou <ebotcazou@adacore.com>
7993
7994 * gcc-interface/decl.c (gnat_to_gnu_entity): Use Underlying_Type in
7995 lieu of more verbose construct.
7996 * gcc-interface/trans.c (Call_to_gnu): Likewise.
7997 (gnat_to_gnu): Likewise. Remove obsolete code.
7998
f9d7d7c1
EB
79992014-05-18 Eric Botcazou <ebotcazou@adacore.com>
8000
8001 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Subtype>: Do not
8002 consider that regular packed arrays can never be superflat.
8003
766090c2
TS
80042014-05-17 Trevor Saunders <tsaunders@mozilla.com>
8005
8006 * gcc-interface/ada-tree.h: Remove usage of variable_size gty
8007 annotation.
8008 * gcc-interface/decl.c (annotate_value): Adjust.
8009 * gcc-interface/trans.c (Attribute_to_gnu): Likewise.
8010 (push_range_check_info): Likewise.
8011 (Loop_Statement_to_gnu): Likewise.
8012 (Subprogram_Body_to_gnu): Likewise.
8013 (Compilation_Unit_to_gnu): Likewise.
8014 (start_stmt_group): Likewise.
8015 * gcc-interface/utils.c (init_gnat_utils): Likewise.
8016 (gnat_pushlevel): Likewise.
8017 (maybe_pad_type): Likewise.
8018
0263d678
EB
80192014-05-14 Eric Botcazou <ebotcazou@adacore.com>
8020
8021 * seh_init.c: Fix copyright year.
8022
d40aeed8
BE
80232014-05-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
8024
d40aeed8
BE
8025 * seh_init.c (__gnat_map_SEH): Compile also when __CYGWIN__ and __SEH__
8026 are defined. Move include windows.h before system.h.
8027 * s-oscons-tmplt.c (DTR_CONTROL_ENABLE, RTS_CONTROL_ENABLE): Compile
8028 also when __CYGWIN__ is defined. Include windef.h before winbase.h.
8029
8b9aec86
RS
80302014-05-14 Richard Sandiford <r.sandiford@uk.ibm.com>
8031
0263d678
EB
8032 * gcc-interface/decl.c (gnat_to_gnu_entity): Convert integer_one_node
8033 to the appropriate type.
8b9aec86
RS
8034 * gcc-interface/trans.c (gnat_to_gnu): Likewise.
8035 (pos_to_constructor): Likewise.
8036
f0035dca
EB
80372014-05-13 Eric Botcazou <ebotcazou@adacore.com>
8038
8039 * gcc-interface/decl.c (annotate_value): Fix thinko in latest change.
8040
1d60af08
KZ
80412014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
8042 Mike Stump <mikestump@comcast.net>
8043 Richard Sandiford <rdsandiford@googlemail.com>
8044
8045 * gcc-interface/cuintp.c (UI_From_gnu): Use wide-int interfaces.
8046 * gcc-interface/decl.c (gnat_to_gnu_entity): Use TYPE_SIGN.
8047 (annotate_value): Use wide-int interfaces.
8048 * gcc-interface/utils.c (get_nonnull_operand): Use tree_fits_uhwi_p.
8049
bc76a4d5
RH
80502014-04-28 Richard Henderson <rth@redhat.com>
8051
8052 * gcc-interface/Makefile.in: Support aarch64-linux.
8053
93582885
EB
80542014-04-28 Eric Botcazou <ebotcazou@adacore.com>
8055
8056 * exp_dbug.ads (Get_External_Name): Add 'False' default to Has_Suffix,
8057 add 'Suffix' parameter and adjust comment.
8058 (Get_External_Name_With_Suffix): Delete.
8059 * exp_dbug.adb (Get_External_Name_With_Suffix): Merge into...
8060 (Get_External_Name): ...here. Add 'False' default to Has_Suffix, add
8061 'Suffix' parameter.
8062 (Get_Encoded_Name): Remove 2nd argument in call to Get_External_Name.
8063 Call Get_External_Name instead of Get_External_Name_With_Suffix.
8064 (Get_Secondary_DT_External_Name): Likewise.
8065 * exp_cg.adb (Write_Call_Info): Likewise.
8066 * exp_disp.adb (Export_DT): Likewise.
8067 (Import_DT): Likewise.
8068 * comperr.ads (Compiler_Abort): Remove Code parameter and add From_GCC
8069 parameter with False default.
8070 * comperr.adb (Compiler_Abort): Likewise. Adjust accordingly.
8071 * types.h (Fat_Pointer): Rename into...
8072 (String_Pointer): ...this. Add comment on interfacing rules.
8073 * fe.h (Compiler_Abort): Adjust for above renaming.
8074 (Error_Msg_N): Likewise.
8075 (Error_Msg_NE): Likewise.
8076 (Get_External_Name): Likewise. Add third parameter.
8077 (Get_External_Name_With_Suffix): Delete.
8078 * gcc-interface/decl.c (STDCALL_PREFIX): Define.
8079 (create_concat_name): Adjust call to Get_External_Name, remove call to
8080 Get_External_Name_With_Suffix, use STDCALL_PREFIX, adjust for renaming.
8081 * gcc-interface/trans.c (post_error): Likewise.
8082 (post_error_ne): Likewise.
8083 * gcc-interface/misc.c (internal_error_function): Likewise.
8084
22869a37
RB
80852014-04-28 Richard Biener <rguenther@suse.de>
8086
8087 PR middle-end/60092
8088 * gcc-interface/utils.c: Define flag_isoc11.
8089
9e3f7c4b
EB
80902014-04-26 Eric Botcazou <ebotcazou@adacore.com>
8091
8092 * gnatvsn.ads (Library_Version): Bump to 4.10.
8093
8f78ecdb
EB
80942014-04-23 Eric Botcazou <ebotcazou@adacore.com>
8095
8096 Revert
8097 2014-04-22 Richard Henderson <rth@redhat.com>
8098
8099 * gcc-interface/Makefile.in: Support aarch64-linux.
8100
8101 2014-04-22 Eric Botcazou <ebotcazou@adacore.com>
8102
8103 * fe.h (Compiler_Abort): Replace Fat_Pointer with String_Pointer.
8104 (Error_Msg_N): Likewise.
8105 (Error_Msg_NE): Likewise.
8106 (Get_External_Name_With_Suffix): Likewise.
8107 * types.h (Fat_Pointer): Delete.
8108 (String_Pointer): New type.
8109 (DECLARE_STRING_POINTER): New macro.
8110 * gcc-interface/decl.c (create_concat_name): Adjust.
8111 * gcc-interface/trans.c (post_error): Likewise.
8112 (post_error_ne): Likewise.
8113 * gcc-interface/misc.c (internal_error_function): Likewise.
8114
19a0be3d
RH
81152014-04-22 Richard Henderson <rth@redhat.com>
8116
4a980bdc
RH
8117 * gcc-interface/Makefile.in: Support aarch64-linux.
8118
19a0be3d
RH
8119 * init.c [__linux__] (HAVE_GNAT_ALTERNATE_STACK): New define.
8120 (__gnat_alternate_stack): Enable for all linux except ia64.
8121
b6918051
EB
81222014-04-22 Eric Botcazou <ebotcazou@adacore.com>
8123
8124 * fe.h (Compiler_Abort): Replace Fat_Pointer with String_Pointer.
8125 (Error_Msg_N): Likewise.
8126 (Error_Msg_NE): Likewise.
8127 (Get_External_Name_With_Suffix): Likewise.
8128 * types.h (Fat_Pointer): Delete.
8129 (String_Pointer): New type.
8130 (DECLARE_STRING_POINTER): New macro.
8131 * gcc-interface/decl.c (create_concat_name): Adjust.
8132 * gcc-interface/trans.c (post_error): Likewise.
8133 (post_error_ne): Likewise.
8134 * gcc-interface/misc.c (internal_error_function): Likewise.
8135
e297e2ea 81362014-04-15 Eric Botcazou <ebotcazou@adacore.com>
53f3f4e3 8137 Pierre-Marie de Rodat <derodat@adacore.com>
e297e2ea
EB
8138
8139 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create a mere
8140 scalar constant instead of a reference for renaming of scalar literal.
8141 Do not create a new object for constant renaming except for a function
8142 call. Make sure a VAR_DECL is created for the renaming pointer.
8143 * gcc-interface/trans.c (constant_decl_with_initializer_p): New.
8144 (fold_constant_decl_in_expr): New function.
8145 (Identifier_to_gnu): Use constant_decl_with_initializer_p.
8146 For a constant renaming, try to fold a constant DECL in the result.
8147 (lvalue_required_p) <N_Object_Renaming_Declaration>: Always return 1.
8148 (Identifier_to_gnu): Reference the renamed object of constant renaming
8149 pointers directly.
e297e2ea
EB
8150 * gcc-interface/utils.c (invalidate_global_renaming_pointers): Do not
8151 invalidate constant renaming pointers.
8152
e63b36bd
EB
81532014-04-15 Eric Botcazou <ebotcazou@adacore.com>
8154
8155 * gcc-interface/utils.c (type_for_vector_element_p): New predicate.
8156 (build_vector_type_for_size): New function.
8157 (build_vector_type_for_array): Likewise.
8158 (unchecked_convert): Build an intermediate vector type to convert
8159 from a generic array type to a vector type.
8160 (handle_vector_size_attribute): Reimplement.
8161 (handle_vector_type_attribute): Likewise.
8162
bd6a077a
EB
81632014-04-15 Eric Botcazou <ebotcazou@adacore.com>
8164
8165 * gcc-interface/decl.c (prepend_one_attribute_pragma): Call
8166 Is_OK_Static_Expression in lieu of Is_Static_Expression to
8167 detect valid arguments.
8168
718c4601
EB
81692014-04-15 Eric Botcazou <ebotcazou@adacore.com>
8170
8171 * gcc-interface/trans.c (gnat_gimplify_stmt): Propagate loop hints.
8172
9dba4b55
PC
81732014-04-14 Paolo Carlini <paolo.carlini@oracle.com>
8174
d6d215ac
EB
8175 * gcc-interface/decl.c (gnat_to_gnu_entity): Use TYPE_IDENTIFIER.
8176 (components_to_record): Likewise.
8177 * gcc-interface/utils.c (make_aligning_type): Likewise.
8178 (maybe_pad_type): Likewise.
8179 (finish_record_type): Likewise.
8180 (rest_of_record_type_compilation): Likewise.
9dba4b55 8181
3418f5e9
EB
81822014-04-14 Eric Botcazou <ebotcazou@adacore.com>
8183
8184 * snames.ads-tmpl (Name_Ivdep): New pragma-related name.
8185 * sem_prag.adb (Analyze_Pragma) <Pragma_Loop_Optimize>: Add support
8186 for Ivdep hint.
8187 * gnat_rm.texi (Implementation Defined Pragmas): Document new Ivdep
8188 hint for Loop_Optimize.
8189 * gnat_ugn.texi (Vectorization of loops): Mention new Ivdep hint.
8190 * gcc-interface/trans.c (Pragma_to_gnu) <Pragma_Loop_Optimize>: Deal
8191 with new Ivdep hint.
8192 * gcc-interface/ada-tree.h (LOOP_STMT_IVDEP): New macro.
8193 * gcc-interface/trans.c (Pragma_to_gnu) <Pragma_Loop_Optimize>: Deal
8194 with new Ivdep hint.
d6d215ac 8195 (gnat_gimplify_stmt) <LOOP_STMT>: Propagate loop hints.
3418f5e9 8196
4116e7d0 81972014-04-14 Eric Botcazou <ebotcazou@adacore.com>
53f3f4e3 8198 Robert Dewar <dewar@adacore.com>
4116e7d0
EB
8199
8200 * opt.ads (Suppress_Back_Annotation): Remove as unused.
8201 * fe.h (Back_Annotate_Rep_Info): Likewise.
8202 (Global_Discard_Names): Likewise.
8203 (List_Representation_Info): Declare.
8204 * types.h (Uint_Minus_1): Likewise.
8205 * repinfo.ads: Document back-annotation change.
8206 * gcc-interface/gigi.h (init_gnat_decl): Declare.
8207 (destroy_gnat_decl): Likewise.
8208 * gcc-interface/decl.c (annotate_value): Do not create the cache of
8209 annotated values here but...
8210 <CALL_EXPR>: Only inline the call if -gnatR3 is specified or we are
8211 in ASIS mode.
8212 (init_gnat_decl): ...here instead. New function.
8213 (destroy_gnat_decl): Likewise.
8214 * gcc-interface/trans.c (gigi): Call {init|destroy}_gnat_decl.
8215 * gcc-interface/utils.c (init_gnat_utils): Minor reformatting.
8216
cb27986c
EB
82172014-04-14 Eric Botcazou <ebotcazou@adacore.com>
8218
8219 * gcc-interface/decl.c (create_field_decl_from): Finalize non-constant
8220 offset for the field, if any.
8221
ebe0249e 82222014-04-09 Eric Botcazou <ebotcazou@adacore.com>
d6d215ac 8223 Svante Signell <svante.signell@gmail.com>
ebe0249e
EB
8224
8225 PR ada/54040
8226 PR ada/59346
8227 * s-osinte-x32.adb: New file.
8228 * s-linux.ads (Time): New section.
8229 * s-linux-alpha.ads (Time): Likewise.
8230 * s-linux-android.ads (Time: Likewise.
8231 * s-linux-hppa.ads (Time): Likewise.
8232 * s-linux-mipsel.ads (Time): Likewise.
8233 * s-linux-sparc.ads (Time): Likewise.
8234 * s-linux-x32.ads (Time): Likewise.
8235 * s-osprim-x32.ads (timespec): Adjust.
7056f58f
EB
8236 (Clock): Likewise.
8237 (To_Timespec): Likewise.
ebe0249e
EB
8238 * s-osinte-linux.ads (Time): Define local subtypes for those defined
8239 in System.Linux.
8240 * s-taprop-linux.adb (Monotonic_Clock): Do not define timeval.
8241 * s-osinte-hpux.ads (timespec): Revert POSIX breakage.
8242 * s-osinte-kfreebsd-gnu.ads (timespec): Likewise.
8243 * s-osinte-solaris-posix.ads (timespec): Likewise.
8244 * s-osinte-posix.adb (To_Timespec): Likewise.
8245 * gcc-interface/Makefile.in (x32/Linux): Use s-osinte-x32.adb.
8246
f3d6c7cb
EB
82472014-04-08 Eric Botcazou <ebotcazou@adacore.com>
8248
8249 PR ada/60411
8250 * gcc-interface/Makefile.in (arm% linux-android): Switch to EHABI.
8251 * s-linux-android.ads: New file.
8252 * s-intman-android.adb: Likewise.
303a0cea 8253 * s-osinte-android.ads: Adjust.
55f31857 8254 * sigtramp-armdroid.c: Likewise.
edb2b1b1 8255 * sigtramp.h: Add Android support.
f3d6c7cb 8256
aabc3aff
EB
82572014-04-07 Eric Botcazou <ebotcazou@adacore.com>
8258
8259 * gcc-interface/Makefile.in (alpha-vms): Add missing line.
8260
368348ab
EB
82612014-03-30 Eric Botcazou <ebotcazou@adacore.com>
8262
8263 PR ada/60703
8264 * system-linux-alpha.ads: Adjust for Ada 2005.
8265 * system-linux-mips.ads: Likewise.
8266 * system-linux-mips64el.ads: Likewise.
8267 * system-linux-mipsel.ads: Likewise.
8268 * system-linux-s390.ads: Likewise.
8269 * system-linux-s390x.ads: Likewise.
8270 * system-linux-sparc.ads: Likewise.
8271 * system-linux-sparcv9.ads: Likewise.
8272 * system-rtems.ads: Likewise.
8273 * system-vxworks-arm.ads: Likewise.
8274
ab684dae
AS
82752014-03-16 Andreas Schwab <schwab@linux-m68k.org>
8276
8277 PR ada/39172
8278 * gcc-interface/Makefile.in (target_cpu_default): Revert
8279 2013-10-11 change.
8280
00c5acd3
EB
82812014-03-13 Eric Botcazou <ebotcazou@adacore.com>
8282
8283 PR ada/51483
8284 * cstand.adb (Register_Float_Type): Add 'precision' parameter and use
8285 it to set the RM size. Use directly 'size' for the Esize.
8286 (Create_Back_End_Float_Types): Adjust call to above.
8287 * get_targ.ads (Register_Type_Proc): Add 'precision' parameter.
8288 * set_targ.ads (FPT_Mode_Entry): Add 'precision' component.
8289 (Write_Target_Dependent_Values): Adjust comment.
8290 * set_targ.adb (Register_Float_Type): Add 'precision' parameter and
8291 deal with it.
8292 (Write_Target_Dependent_Values): Write the precision in lieu of size.
8293 (Initialization): Read the precision in lieu of size and compute the
8294 size from the precision and the alignment.
8295 * gcc-interface/gigi.h (enumerate_modes): Add integer parameter.
8296 * gcc-interface/misc.c (enumerate_modes): Likewise. Do not register
8297 types for vector modes, pass the size in addition to the precision.
8298
8f241ff5
EB
82992014-03-10 Eric Botcazou <ebotcazou@adacore.com>
8300
8301 * gcc-interface/Make-lang.in (ADA_DEPFILES): Fix typo.
8302
a92a6b88
DR
83032014-03-07 Doug Rupp <rupp@adacore.com>
8304
8305 PR ada/60411
8306 * system-linux-armel.ads (Backend_Overflow_Checks): Set to True.
8307 (Support_64_Bit_Divides): Removed, no longer used.
8308 (ZCX_By_Default): Enabled.
8309
3af78158
DR
83102014-02-25 Doug Rupp <rupp@adacore.com>
8311
8312 * gcc-interface/Makefile.in (arm-linux):
8313 (EH_MECHANISM): Use ARM unwinder (-arm)
8314 (LIBGNAT_TARGET_PAIRS: Override defaults with a-exexpr-gcc.adb and
8315 s-excmac-arm.ads.
8316 (EXTRA_LIBGNAT_OBJS): Add raise-gcc.o
8317 (EXTRA_GNATRTL_NONTASKING_OBJS): Add g-cppexc.o s-excmac.o.
8318 (arm-wrs-vxworks): Add EH_MECHANISM=-gcc for kernel mode.
8319 (EXTRA_LIBGNAT_OBJS): Add sigtramp-armvxw.o
8320 Add dependencies for sigtramp-armvxw.o.
8321
2749b01b
EB
83222014-02-25 Eric Botcazou <ebotcazou@adacore.com>
8323
8324 * gcc-interface/trans.c (Pragma_to_gnu): Deal with Warning_As_Error.
8325
e7ba564f
RD
83262014-02-25 Robert Dewar <dewar@adacore.com>
8327
8328 * rtsfind.adb (Is_RTE): Protect against entity with no scope
8329 field (previously this call blew up on the Standard entity).
8330 * sem_attr.adb (Analyze_Attribute, case Access): Remove
8331 test for No_Abort_Statements, this is now handled in
8332 Set_Entity_With_Checks.
8333 * exp_ch6.adb, sem_ch10.adb, sem_ch4.adb, sem_ch8.adb, sem_res.adb:
8334 Change name Set_Entity_With_Style_Check => Set_Entity_With_Checks.
8335 * sem_util.ads, sem_util.adb: Change name Set_Entity_With_Style_Check =>
8336 Set_Entity_With_Checks.
8337 (Set_Entity_With_Checks): Add checks for No_Dynamic_Attachment,
8338 Add checks for No_Abort_Statements.
8339
83402014-02-25 Robert Dewar <dewar@adacore.com>
8341
8342 * exp_ch9.adb (Expand_Entry_Barrier): Add comment that call to
8343 Check_Restriction is OK.
8344
2886a495
ES
83452014-02-25 Ed Schonberg <schonberg@adacore.com>
8346
8347 * sem_ch3.adb (Process_Full_View): Better error message when
8348 the full view of a private type without discriminants is an
8349 unconstrained type.
8350 * sem_ch7.adb (Uninstall_Declarations): Ditto.
8351
fb12497d
AC
83522014-02-25 Eric Botcazou <ebotcazou@adacore.com>
8353
8354 * sigtramp-armvxw.c: Also restore r0.
8355
83562014-02-25 Robert Dewar <dewar@adacore.com>
8357
8358 * errout.adb (Error_Msg_Internal): Warning_Msg_Char set
8359 unconditionally (Set_Msg_Insertion_Warning): Warning_Msg_Char
8360 set unconditionally.
8361 * erroutc.adb (Get_Warning_Tag): Does not give a leading space
8362 any more (Output_Msg_Text): Rewritten with new convention on
8363 output of warnings that are treated as errors.
8364 * erroutc.ads (Error_Msg_Object): Warn_Chr is always set even
8365 if Warn is False.
8366 * gnat_rm.texi: Updates to documentation on pragma
8367 Warning_As_Error.
8368 * warnsw.adb (Set_Dot_Warning_Switch): -gnatw.e should not
8369 set Warning_Doc_Switch.
8370 * lib-writ.ads: Add documentation note on ALI file generation
8371 for C.
8372 * exp_ch6.adb (Expand_Call): Remove check for No_Abort_Statements
8373 (belongs in Sem).
8374 * sem_attr.adb (Resolve_Attribute, case Access):
8375 Abort_Task'Access violates the No_Abort_Statements restriction.
8376 * sem_res.adb (Resolve_Call): Check restriction
8377 No_Abort_Statements for call to Abort_Task or a renaming of it.
8378
0c3985a9
AC
83792014-02-25 Robert Dewar <dewar@adacore.com>
8380
8381 * sem_ch3.adb (Array_Type_Declaration): Check for case of using
8382 type name as index.
8383 * lib.ads: Minor reformatting.
8384 * einfo.ads: Minor reformatting.
8385
83862014-02-25 Doug Rupp <rupp@adacore.com>
8387
8388 * sem_mech.adb (Set_Mechanisms): For convention Fortran on VMS
8389 use Short_Descriptor(S) as the argument passing mechanism.
8390
83912014-02-25 Eric Botcazou <ebotcazou@adacore.com>
8392
8393 * sigtramp-ppcvxw.c (CFI_COMMON_REGS): Also include r0.
8394
83952014-02-25 Robert Dewar <dewar@adacore.com>
8396
8397 * atree.ads (Warnings_Treated_As_Errors): New variable.
8398 * errout.adb (Error_Msg_Internal): Set Warn_Err flag in
8399 error object (Initialize): Initialize Warnings_As_Errors_Count
8400 (Write_Error_Summary): Include count of warnings treated as errors.
8401 * erroutc.adb (Warning_Treated_As_Error): New function.
8402 (Matches): Function moved to outer level of package.
8403 * erroutc.ads (Error_Msg_Object): Add Warn_Err flag.
8404 (Warning_Treated_As_Error): New function.
8405 * gnat_rm.texi: Document pragma Treat_Warning_As_Error.
8406 * opt.adb: Add handling of Warnings_As_Errors_Count[_Config].
8407 * opt.ads (Config_Switches_Type): Add entry for
8408 Warnings_As_Errors_Count.
8409 (Warnings_As_Errors_Count): New variable.
8410 (Warnings_As_Errors): New array.
8411 * par-prag.adb: Add dummy entry for Warning_As_Error.
8412 * sem_prag.adb (Analyze_Pragma): Implement new pragma
8413 Warning_As_Error.
8414 * snames.ads-tmpl: Add entries for Warning_As_Error pragma.
8415
5acb4d29
AC
84162014-02-25 Eric Botcazou <ebotcazou@adacore.com>
8417
8418 * sigtramp.h: Fix minor inaccuracy.
8419
84202014-02-25 Ben Brosgol <brosgol@adacore.com>
8421
8422 * gnat_ugn.texi: Added description of kill command.
8423
84242014-02-25 Robert Dewar <dewar@adacore.com>
8425
8426 * gnat_rm.texi (Address_Clauses): Add a section discussing the
8427 problem of address clauses causing unexpected initialization,
8428 including the effect of Initialize_Scalars.
8429
80c2c202
AC
84302014-02-25 Robert Dewar <dewar@adacore.com>
8431
8432 * errout.adb: Various changes for better msgs for anonmous access
8433 subprogram types.
8434 * erroutc.ads, erroutc.adb (Buffer_Ends_With): Version with character
8435 argument.
8436 (Buffer_Remove): Version with character argument.
8437 * sem_attr.adb (Resolve_Attribute, case Access): Better handling
8438 of mismatching conventions for access-to-subprogram case.
8439 * sem_prag.adb (Set_Convention_From_Pragma): Deal with anonymous
8440 access types in record.
8441 * sem_util.ads, sem_util.adb (Set_Convention): Handle anonymous access
8442 types, including in records.
8443
84442014-02-25 Doug Rupp <rupp@adacore.com>
8445
8446 * sigtramp-ppcvxw.c, sigtramp.h, sigtramp-armvxw.c: Comment
8447 enhancements and corrections.
8448
84492014-02-25 Robert Dewar <dewar@adacore.com>
8450
8451 * gnat_rm.texi: New section "Conventions and Anonymous Access Types"
8452
9972d439
RD
84532014-02-25 Robert Dewar <dewar@adacore.com>
8454
8455 * gnat_rm.texi: First set of documentation additions for
8456 predefined RM units.
8457 * checks.adb: Minor reformatting.
8458 * sem_elab.adb (Check_Task_Activation): Minor fix to error
8459 message.
8460 * sem_util.adb: Minor reformatting.
8461
592574f5
AC
84622014-02-25 Arnaud Charlet <charlet@adacore.com>
8463
8464 * usage.adb (Usage): Add help on -gnateC.
8465 * switch-c.adb (Scan_Front_End_Switches): Add handling of -gnateC.
8466 * opt.ads (Generate_CodePeer_Messages): New flag.
8467 * gnat_ugn.texi: Document new switch -gnateC.
8468
84692014-02-25 Ben Brosgol <brosgol@adacore.com>
8470
8471 * gnat_rm.texi: Corrected minor typos in Implementation Defined
8472 Aspects.
8473 * opt.ads: Minor reformatting.
8474
fe2194df
RD
84752014-02-25 Robert Dewar <dewar@adacore.com>
8476
8477 * binde.adb: Change messages to mention -gnatel instead of -gnatwl.
8478 * gnat_ugn.texi: Update documentation of -gnatwl Add documentation
8479 of -gnatel/-gnateL.
8480 * opt.ads (Warn_Info_Messages): New flag.
8481 * sem_elab.adb: Use Elab_Warnings, Elab_Info_Messages to control
8482 messages.
8483 * sem_prag.adb: Use Elab_Warnings, Elab_Info_Messages to control
8484 messages.
8485 * switch-m.ad, switch-c.adb: Recognize new -gnatel/EL switches.
8486 * usage.adb: Add documentation of -gnatel/-gnateL Update
8487 documentation of -gnatwl/-gnatwL.
8488 * warnsw.adb: New handling of Elab_Warnings, Elab_Info_Messages
8489 * warnsw.ads (Elab_Info_Messages): New field in Warning_Record
8490
4c51ff88
AC
84912014-02-25 Robert Dewar <dewar@adacore.com>
8492
8493 * einfo.ads, einfo.adb (Has_Shift_Operator): New flag.
8494 * gnat_rm.texi: Document pragma Provide_Shift_Operators.
8495 * interfac.ads: Minor code reorganization (add pragma
8496 Compiler_Unit_Warning).
8497 * par-prag.adb: Add dummy entry for Provide_Shift_Operators.
8498 * sem_ch3.adb (Build_Derived_Numeric_Type): Copy
8499 Has_Shift_Operator flag.
8500 * sem_intr.adb (Check_Intrinsic_Subprogram): Make sure
8501 Check_Shift is always called (Check_Shift): Set Has_Shift_Operator.
8502 * sem_prag.adb: Implement pragma Provide_Shift_Operators.
8503 * snames.ads-tmpl: Add entries for pragma Provide_Shift_Operators
8504 Add entry for Name_Amount.
8505 * checks.adb (Selected_Range_Checks): When checking for a null
8506 range, make sure we use the base type, and not the subtype for
8507 deciding a range is null.
8508 * sem_ch5.adb (Analyze_Loop_Parameter_Specification): Check
8509 for suspicious loop bound which is outside the range of the
8510 loop subtype.
8511 * gnat_ugn.texi: Add documentation section "Determining the
8512 Chosen Elaboration Order"
8513 * sem_ch13.adb (UC_Entry): Add field Act_Unit
8514 (Validate_Unchecked_Conversion): Store Act_Unit
8515 (Validate_Unchecked_Conversions): Test Warnings_Off in Act_Unit
8516 * treepr.adb: Minor reformatting.
8517
85182014-02-25 Arnaud Charlet <charlet@adacore.com>
8519
8520 * usage.adb: Minor: fix typo.
8521
0355e3eb
AC
85222014-02-25 Robert Dewar <dewar@adacore.com>
8523
8524 * lib.ads, s-bitops.adb, s-bitops.ads, s-conca5.adb, gnat_rm.texi,
8525 s-conca5.ads, s-conca7.adb, s-conca7.ads, s-crc32.adb, s-crc32.ads,
8526 s-conca9.adb, s-conca9.ads, g-dyntab.adb, s-crtl.ads, g-dyntab.ads,
8527 s-excdeb.adb, s-addope.adb, s-addope.ads, s-carun8.adb, s-carun8.ads,
8528 g-htable.adb, g-htable.ads, g-hesora.adb, g-hesora.ads, s-conca2.adb,
8529 s-conca2.ads, a-comlin.adb, a-chlat1.ads, a-comlin.ads, errout.ads,
8530 a-except.adb, s-conca4.adb, a-except.ads, s-conca4.ads, s-conca6.adb,
8531 s-conca6.ads, g-spchge.adb, g-spchge.ads, g-u3spch.adb, g-u3spch.ads,
8532 a-strhas.ads, restrict.adb, aspects.adb, aspects.ads, s-conca8.adb,
8533 s-conca8.ads, back_end.adb, par-prag.adb, g-byorma.adb, g-byorma.ads,
8534 a-elchha.adb, a-elchha.ads, g-speche.adb, g-speche.ads, s-casuti.adb,
8535 s-assert.adb, s-casuti.ads, s-assert.ads, a-clrefi.adb, a-clrefi.ads,
8536 s-conca3.adb, s-conca3.ads, a-ioexce.ads: Implement pragma
8537 Compiler_Unit_Warning, change Compiler_Unit everywhere to
8538 Compiler_Unit_Warning.
8539
85402014-02-25 Sergey Rybin <rybin@adacore.com frybin>
8541
8542 * sem_prag.adb (Analyze_Depends_In_Decl_Part): Do not normalize
8543 in ASIS mode aggregates that are used as aspect definitions.
8544
e917e3b8
AC
85452014-02-25 Robert Dewar <dewar@adacore.com>
8546
8547 * exp_ch7.adb, sem_util.adb, sem_util.ads, exp_ch6.adb: Minor
8548 reformatting.
8549
85502014-02-25 Ed Schonberg <schonberg@adacore.com>
8551
8552 * freeze.adb (Freeze_Entity): If the return type of a function
8553 is a limited view, and the non-limited view has not been seen yet,
8554 defer freezing to some later point.
8555
85562014-02-25 Robert Dewar <dewar@adacore.com>
8557
8558 * sem_ch3.adb: Minor reformatting.
8559
85602014-02-25 Robert Dewar <dewar@adacore.com>
8561
8562 * s-excdeb.ads, s-except.ads, s-exctab.adb, s-exctab.ads, s-finmas.ads,
8563 s-htable.adb, s-htable.ads, s-imenne.adb, s-imenne.ads, s-imgenu.adb,
8564 s-imgenu.ads, s-mastop.adb, s-mastop.ads, s-memory-vms_64.adb,
8565 s-memory-vms_64.ads, s-memory.adb, s-memory.ads, s-os_lib.adb,
8566 s-os_lib.ads, s-parame.adb, s-parame.ads, s-purexc.ads, s-restri.adb,
8567 s-restri.ads, s-rident.ads, s-secsta.adb, s-secsta.ads, s-soflin.adb,
8568 s-soflin.ads, s-sopco3.adb, s-sopco3.ads, s-sopco4.adb, s-sopco4.ads,
8569 s-sopco5.adb, s-sopco5.ads, s-spsufi.ads, s-stache.adb, s-stache.ads,
8570 s-stalib.adb, s-stalib.ads, s-stoele.adb, s-stoele.ads, s-strcom.adb,
8571 s-strcom.ads, s-strhas.adb, s-string.adb, s-string.ads, s-strops.adb,
8572 s-strops.ads, s-ststop.adb, s-ststop.ads, s-traceb.adb, s-traceb.ads,
8573 s-traent.adb, s-traent.ads, s-unstyp.ads, s-utf_32.adb, s-utf_32.ads,
8574 s-wchcnv.adb, s-wchcnv.ads, s-wchcon.adb, s-wchcon.ads, s-wchjis.adb,
8575 s-wchjis.ads, sem_ch11.adb, sem_ch4.adb, sem_ch5.adb, sem_prag.adb,
8576 snames.ads-tmpl: Change Compiler_Unit everywhere to
8577 Compiler_Unit_Warning.
8578
5f24a82a
HK
85792014-02-25 Hristian Kirtchev <kirtchev@adacore.com>
8580
8581 * exp_ch6.adb (Add_Or_Save_Precondition): New routine.
8582 (Collect_Body_Postconditions_In_Decls): New routine.
8583 (Collect_Body_Postconditions_Of_Kind): Factor out code. Handle
8584 postcondition aspects or pragmas that appear on a subprogram
8585 body stub.
8586 (Collect_Spec_Preconditions): Factor out code. Handle
8587 precondition aspects or pragmas that appear on a subprogram
8588 body stub.
8589 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): The analysis of
8590 aspects that apply to a subprogram body stub is no longer delayed,
8591 the aspects are analyzed on the spot.
8592 (SPARK_Aspect_Error):
8593 Aspects that apply to a subprogram declaration cannot appear in
8594 a subunit.
8595 * sem_ch10.adb Remove with and use clause for Sem_Ch13.
8596 (Analyze_Proper_Body): Add local variable Comp_Unit. Unum
8597 is now a local variable. Code cleanup. Analysis related to
8598 the aspects of a subprogram body stub is now carried out by
8599 Analyze_Subprogram_Body_Helper. Do not propagate the aspects
8600 and/or pragmas of a subprogram body stub to the proper body
8601 as this is no longer needed. Do not analyze the aspects of a
8602 subprogram stub when the corresponding source unit is missing.
8603 (Analyze_Protected_Body_Stub): Flag the illegal use of aspects
8604 on a stub.
8605 (Analyze_Task_Body_Stub): Flag the illegal use of
8606 aspects on a stub.
8607 (Optional_Subunit): Add local variable Unum.
8608 * sem_ch13.adb (Insert_Delayed_Pragma): Do not analyze a generated
8609 pragma when it applies to a subprogram body stub.
8610 * sem_prag.adb (Analyze_Pragma): Pragmas Contract_Cases,
8611 Depends and Global can now apply to a subprogram body stub as
8612 long as it acts as its own spec.
8613 (Analyze_Refined_Pragma):
8614 Code reformatting. Refinement pragmas cannot apply to a subunit.
8615
7edfb4c6
HK
86162014-02-25 Hristian Kirtchev <kirtchev@adacore.com>
8617
8618 * einfo.ads Update the usage of flag
8619 Uses_Sec_Stack. Uses_Sec_Stack now applies to E_Loop entities.
8620 * exp_ch5.adb (Expand_Iterator_Loop): The temporary for a cursor
8621 now starts with the letter 'C'. This makes reading expanded
8622 code easier.
8623 * exp_ch7.adb (Establish_Transient_Scope): Add local variable
8624 Iter_Loop. Signal that an Ada 2012 iterator loop requires
8625 secondary stack management when creating a transient scope for
8626 an element reference.
8627 * exp_util.adb (Process_Statements_For_Controlled_Objects):
8628 When wrapping the statements of a loop, pass the E_Loop entity
8629 to the wrapping machinery.
8630 (Wrap_Statements_In_Block): Add
8631 formal parameter Scop along with comment on usage. Add local
8632 variables Block_Id, Block_Nod and Iter_Loop. Mark the generated
8633 block as requiring secondary stack management when the block is
8634 created inside an Ada 2012 iterator loop. This ensures that any
8635 reference objects are reclaimed on each iteration of the loop.
8636 * sem_ch5.adb (Analyze_Loop_Statement): Mark the generated block
8637 tasked with the handling of container iterators as requiring
8638 secondary stack management. This ensures that iterators are
8639 reclaimed when the loop terminates or is exited in any fashion.
8640 * sem_util.adb (Add_Block_Identifier): New routine.
8641 (Find_Enclosing_Iterator_Loop): New routine.
8642 * sem_util.ads (Add_Block_Identifier): New routine.
8643 (Find_Enclosing_Iterator_Loop): New routine.
8644
bbe9779c
AC
86452014-02-25 Robert Dewar <dewar@adacore.com>
8646
8647 * sinfo.ads: Minor reformatting.
8648
86492014-02-25 Tristan Gingold <gingold@adacore.com>
8650
8651 * s-expllu.ads, s-expuns.ads, s-expmod.ads: Minor comment fix.
8652
86532014-02-25 Pascal Obry <obry@adacore.com>
8654
8655 * sinput-l.adb, osint.adb, osint.ads: Add Prep_Suffix to factorize code.
8656
1ae8beef
AC
86572014-02-25 Tristan Gingold <gingold@adacore.com>
8658
8659 * sem_ch10.adb: Minor comment fix.
8660
86612014-02-25 Bob Duff <duff@adacore.com>
8662
8663 * s-tasdeb.adb: Misc cleanup of this package,
8664 including printing addresses in hexadecimal.
8665 (Write): Fix minor bug when taking 'Address of an empty string.
8666
86672014-02-25 Ed Schonberg <schonberg@adacore.com>
8668
8669 * sem_prag.adb (Analyze_Part_Of): Reject state refinement in a
8670 public child unit when it does not refer to the abstract state
8671 of a public ancestor.
8672
ca11219d
AC
86732014-02-25 Yannick Moy <moy@adacore.com>
8674
8675 * sem_prag.adb (Analyze_Pragma/Pragma_Validity_Checks): Ignore pragma
8676 Validity_Checks in GNATprove and CodePeer modes.
8677
86782014-02-25 Pascal Obry <obry@adacore.com>
8679
8680 * prj-attr.adb, projects.texi, snames.ads-tmpl: Add package Install's
8681 Artifacts attribute.
8682
6e32b1ab
AC
86832014-02-25 Yannick Moy <moy@adacore.com>
8684
8685 * sem_prag.adb: Minor reformatting to get consistent messages.
8686
86872014-02-25 Robert Dewar <dewar@adacore.com>
8688
8689 * checks.adb: Minor reformatting.
8690 * sinfo.ads (Do_Range_Check): Document that this flag is never
8691 passed to the back end.
8692
f9966234
AC
86932014-02-25 Yannick Moy <moy@adacore.com>
8694
8695 * sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_prag.adb, sem_attr.adb,
8696 sem_ch6.adb: Remove useless references to SPARK RM in error messages.
8697
86982014-02-25 Hristian Kirtchev <kirtchev@adacore.com>
8699
8700 * sem_res.adb (Appears_In_Check): New routine.
8701 (Resolve_Entity_Name): Remove local variables Prev and
8702 Usage_OK. Par is now a constant. Remove the parent chain traversal
8703 as the placement of a volatile object with enabled property
8704 Async_Writers and/or Effective_Reads must appear immediately
8705 within a legal construct.
8706
87072014-02-25 Hristian Kirtchev <kirtchev@adacore.com>
8708
8709 * checks.adb (Apply_Selected_Range_Checks):
8710 Alphabetize local constants and variables. Add comments.
8711 Always insert a range check that requires runtime evaluation into
8712 the tree.
8713
a6abfd78
AC
87142014-02-25 Robert Dewar <dewar@adacore.com>
8715
8716 * sem_attr.adb, sem_ch6.adb, par-ch3.adb: Minor reformatting.
8717
87182014-02-25 Bob Duff <duff@adacore.com>
8719
8720 * s-tassta.adb (Finalize_Global_Tasks): Limit the number of loop
8721 iterations while waiting for independent tasks to terminate;
8722 if an independent task does not terminate, we do not want to
8723 hang here. In that case, the thread will be terminated when the
8724 process exits.
8725 * s-taprop-linux.adb (Abort_Task): Fix Assert to allow for ESRCH.
8726
87272014-02-25 Ed Schonberg <schonberg@adacore.com>
8728
8729 * sem_prag.adb (Check_SPARK_Aspect_For_ASIS): New subprogram,
8730 used to perform pre-analysis of the expression for SPARK
8731 aspects that have a non-standard syntax, such as GLobal and
8732 Initializes. The procedure applies to the original expression
8733 in an aspect specification, prior to the analysis of the
8734 corresponding pragma, in order to provide semantic information
8735 for ASIS navigation purposes.
8736 (Analyze_Global_In_Decl_List, Analyze_Initializes_In_Decl_Part):
8737 Call new subprogram.
8738
64e86d00
AC
87392014-02-25 Yannick Moy <moy@adacore.com>
8740
8741 * sem_prag.adb: Remove obsolete reference to SPARK RM in error message.
8742
87432014-02-25 Doug Rupp <rupp@adacore.com>
8744
8745 * init.c (HAVE_GNAT_ADJUST_CONTEXT_FOR_RAISE): Enable for ARM.
8746 (__gnat_adjust_context_for_raise): Bump the PC by 2.
8747
87482014-02-25 Ed Schonberg <schonberg@adacore.com>
8749
8750 * par-ch3.adb (P_Basic_Declarative_Items): In the case of a
8751 misplaced IS, add a statement sequence to improper body only if
8752 one has not been parsed already.
8753
87542014-02-25 Ed Schonberg <schonberg@adacore.com>
8755
8756 * sem_attr.adb (Analyze_Attribute, case 'Update): Check for
8757 mismatch when multidimensional array is updated with a single
8758 index.
8759
3684d1fc
YM
87602014-02-25 Yannick Moy <moy@adacore.com>
8761
8762 * sem_ch3.adb, sem_ch5.adb, sem_prag.adb, sem_attr.adb, errout.ads,
8763 sem_ch6.adb: Mark most references to SPARK RM in error messages
8764 for removal.
8765
b2afe274
AC
87662014-02-24 Ed Schonberg <schonberg@adacore.com>
8767
8768 * par-ch3.adb (P_Basic_Declarative_Items): If an improper body
8769 appears in a list of basic declarations, complete the tree with
8770 an empty statement list, to prevent cascaded errors and crashes
8771 if semantic analysis is attempted.
8772
b5eccd0c
AC
87732014-02-24 Thomas Quinot <quinot@adacore.com>
8774
8775 * g-sercom-mingw.adb (Open): Fix incorrect test for error return
8776 value.
8777 * erroutc.adb: Minor reformatting.
8778
87792014-02-24 Hristian Kirtchev <kirtchev@adacore.com>
8780
8781 * sem_prag.adb (Check_Clause_Syntax): Account
8782 for a solitary input item in a dependency list.
8783
87842014-02-24 Yannick Moy <moy@adacore.com>
8785
8786 * gnat1drv.adb (Adjust_Global_Switches): Do not
8787 use validity checks at all in GNATprove_Mode.
8788
f34b5d88
RD
87892014-02-24 Robert Dewar <dewar@adacore.com>
8790
8791 * g-sercom-mingw.adb, g-sercom-linux.adb, sem_prag.adb, freeze.adb,
8792 atree.adb, atree.ads: Minor reformatting.
8793
2dade097
HK
87942014-02-24 Hristian Kirtchev <kirtchev@adacore.com>
8795
8796 * sem_ch6.adb (Analyze_Subprogram_Body_Contract): Do not enforce
8797 global and dependence refinement when SPARK_Mode is off.
8798 * sem_ch7.adb (Analyze_Package_Body_Contract): Do not enforce
8799 state refinement when SPARK_Mode is off.
8800 * sem_ch13.adb (Analyze_Aspect_Specifications): Add local
8801 variable Decl. Insert the generated pragma for Refined_State
8802 after a potential pragma SPARK_Mode.
8803 * sem_prag.adb (Analyze_Depends_In_Decl_Part): Add local
8804 constant Deps. Remove local variable Expr. Check the syntax
8805 of pragma Depends when SPARK_Mode is off. Factor out the
8806 processing for extra parenthesis around individual clauses.
8807 (Analyze_Global_In_Decl_List): Items is now a constant. Check
8808 the syntax of pragma Global when SPARK_Mode is off.
8809 (Analyze_Initializes_In_Decl_Part): Check the syntax of pragma
8810 Initializes when SPARK_Mode is off.
8811 (Analyze_Part_Of): Check
8812 the syntax of the encapsulating state when SPARK_Mode is off.
8813 (Analyze_Pragma): Check the syntax of pragma Abstract_State when
8814 SPARK_Mode is off. Move the declaration order check with respect
8815 to pragma Initializes to the end of the processing. Do not verify
8816 the declaration order for pragma Initial_Condition when SPARK_Mode
8817 is off. Do not complain about a useless package refinement when
8818 SPARK_Mode is off.
8819 (Analyze_Refined_Depends_In_Decl_Part): Refs
8820 is now a constant. Check the syntax of pragma Refined_Depends
8821 when SPARK_Mode is off.
8822 (Analyze_Refined_Global_In_Decl_Part):
8823 Check the syntax of pragma Refined_Global when SPARK_Mode is off.
8824 (Analyze_Refined_State_In_Decl_Part): Check the syntax of pragma
8825 Refined_State when SPARK_Mode is off.
8826 (Check_Dependence_List_Syntax): New routine.
8827 (Check_Global_List_Syntax): New routine.
8828 (Check_Initialization_List_Syntax): New routine.
8829 (Check_Item_Syntax): New routine.
8830 (Check_State_Declaration_Syntax): New routine.
8831 (Check_Refinement_List_Syntax): New routine.
8832 (Has_Extra_Parentheses): Moved to the top level of Sem_Prag.
8833
158d55fa
AC
88342014-02-24 Robert Dewar <dewar@adacore.com>
8835
8836 * a-tags.adb, s-os_lib.adb: Minor reformatting.
8837
88382014-02-24 Thomas Quinot <quinot@adacore.com>
8839
8840 * g-sercom-mingw.adb, g-sercom-linux.adb (Raise_Error): Include
8841 strerror message, not just numeric errno value.
8842
88432014-02-24 Doug Rupp <rupp@adacore.com>
8844
8845 * raise-gcc.c (exception_class_eq): Make endian neutral.
8846
88472014-02-24 Ed Schonberg <schonberg@adacore.com>
8848
8849 * atree.ads, atree,adb (Copy_Separate_Tree): Remove Syntax_Only
8850 flag, and reset Etype and Analyzed attributes unconditionally
8851 when copying a tree that may be partly analyzed.
8852 * freeze.adb: Change calls to Copy_Separate_Tree accordingly.
8853 * sem_ch6.adb (Check_Inline_Pragma): If the Inline pragma appears
8854 within a subprogram body and applies to it, remove it from the
8855 body before making a copy of it, to prevent spurious errors when
8856 analyzing the copied body.
8857
f1a3590e
AC
88582014-02-24 Thomas Quinot <quinot@adacore.com>
8859
8860 * s-os_lib.adb (Errno_Message): Do not depend on Integer'Image.
8861 * s-oscons-tmplt.c: On VxWorks, include adaint.h only after
8862 vxWorks.h has been included. Also ensure that file attributes
8863 related definitions are output even in cases where socket support
8864 is not enabled.
8865 * a-tags.adb: Code clean up.
8866 * Make-generated.in (OSCONS_CPP, OSCONS_EXTRACT): Use -iquote
8867 instead of -I to add the main ada source directory to the header
8868 search path, in order to avoid conflict between our own "types.h"
8869 and VxWork's <types.h>.
8870
88712014-02-24 Robert Dewar <dewar@adacore.com>
8872
8873 * atree.ads, atree.adb (Copy_Separate_Tree): Add Syntax_Only parameter.
8874 * debug.adb: Remove documentation of -gnatd.X, no longer used.
8875 * freeze.adb (Wrap_Imported_Subprogram): Fixed and activated.
8876
88772014-02-24 Bob Duff <duff@adacore.com>
8878
8879 * gnat_ugn.texi: Improve documentation of gnatpp.
8880
47752af2
TQ
88812014-02-24 Thomas Quinot <quinot@adacore.com>
8882
8883 * g-stheme.adb, g-socthi-vms.adb, g-socthi-vms.ads,
8884 g-socthi-vxworks.adb, g-socthi-vxworks.ads, g-stseme.adb,
8885 g-socthi-mingw.adb, g-socthi-mingw.ads, g-socthi.adb,
8886 g-socthi.ads, g-socket.adb (Host_Error_Message): Return a string, not
8887 a chars_ptr, because on Windows this is a renaming of
8888 Socket_Error_Message.
8889
1b31321b
AC
88902014-02-24 Robert Dewar <dewar@adacore.com>
8891
8892 * a-direct.adb, sem_ch5.adb, a-cfdlli.adb, a-cfhase.adb, a-tags.adb,
8893 s-filatt.ads, a-cforma.adb, sem_ch6.adb, g-socthi-mingw.adb,
8894 a-cfhama.adb, a-cforse.adb, a-cofove.adb: Minor reformatting and code
8895 reorganization.
8896
88972014-02-24 Thomas Quinot <quinot@adacore.com>
8898
8899 * Make-generated.in (OSCONS_CPP, OSCONS_EXTRACT): Make sure
8900 that the source directory containing s-oscons-tmplt.c is on the
8901 include path, so that all internal header files are available.
8902
28108618
ES
89032014-02-24 Ed Schonberg <schonberg@adacore.com>
8904
8905 * sem_ch5.adb (Analyze_Loop_Parameter_Specification): If the
8906 domain of iteration is an attribute reference 'Old, this is an
8907 Ada 2012 iterator and the loop must be rewritten as such.
8908
3e5b1f32
TQ
89092014-02-24 Thomas Quinot <quinot@adacore.com>
8910
8911 * s-fileio.adb (Errno_Message): Remove, use shared version from
8912 s-os_lib instead.
8913 * s-crtrun.ads, Makefile.rtl: Remove now unused unit.
8914 * g-stseme (Socket_Error_Message): Reimplement in terms of new
8915 s-os_lib function.
8916 * g-socthi.ads, g-socthi.adb: Change profile of
8917 Socket_Error_Message to return String to allow the above.
8918 * g-socket.adb, g-socthi-mingw.adb, g-socthi-mingw.ads,
8919 * g-socthi-vms.adb, g-socthi-vms.ads, g-socthi-vxworks.adb,
8920 * g-socthi-vxworks.ads: Update to account for the above profile
8921 change.
8922 * a-tags.adb: Use strlen builtin binding provided by s-crtl.
8923 * s-crtl.ads (strncpy): New procedure.
8924 * s-os_lib.adb (Copy_Attributes): Import just once (strncpy):
8925 Use import from s-crtl.
8926 * a-envvar.adb, osint.adb: Use imports of C runtime functions
8927 from s-crtl instead of re-importing locally.
8928
c6d2191a
AC
89292014-02-24 Hristian Kirtchev <kirtchev@adacore.com>
8930
8931 * sem_prag.adb (Analyze_Global_Item): Emit the
8932 variable related checks concerning volatile objects only when
8933 SPARK_Mode is on.
8934
89352014-02-24 Robert Dewar <dewar@adacore.com>
8936
8937 * sem_ch5.adb (Analyze_Iterator_Specification): use
8938 Error_Msg_Ada_2012_Feature.
8939
89402014-02-24 Jose Ruiz <ruiz@adacore.com>
8941
8942 * s-rident.ads (Profile_Info): For Ravenscar, the restrictions
8943 No_Local_Timing_Events and No_Specific_Termination_Handlers
8944 must be set, according to the Ravenscar profile definition
8945 in D.13(6/3).
8946
89472014-02-24 Ed Schonberg <schonberg@adacore.com>
8948
8949 * sem_ch6.adb (Analyze_Expression_Function): If this is a
8950 completion, freeze return type and its designated type if needed.
8951
89522014-02-24 Thomas Quinot <quinot@adacore.com>
8953
8954 * sem_ch13.adb (Analyze_Attribute_Definition_Clause, case
8955 'Address): When moving initialization statements to a freeze
8956 entity, keep them under a single node (i.e. do not unwrap
8957 expressions with actions), and set the Initialization_Statements
8958 attribute again so that processing of a later pragma Import can
8959 still remove them.
8960
89612014-02-24 Claire Dross <dross@adacore.com>
8962
8963 * a-cfdlli.adb, a-cfdlli.ads, a-cfhama.adb, a-cfhama.ads,
8964 a-cfhase.adb, a-cfhase.ads, a-cforma.adb, a-cforma.ads,
8965 a-cforse.adb, a-cforse.ads, a-cofove.adb, a-cofove.ads: Rename
8966 Left/Right to First_To_Previous/Current_To_Last.
8967
89682014-02-24 Thomas Quinot <quinot@adacore.com>
8969
8970 * adaint.h (struct file_attributes): New component "error"
8971 (__gnat_error_attributes): Accessor for the above.
8972 * adaint.c (__gnat_error_attributes): New subprogram
8973 (__gnat_stat): Fix returned value (expect errno value)
8974 (__gnat_stat_to_attr): Add management of error component (set to
8975 stat errno value, except for missing files where it is set to 0,
8976 and exists is set to 0).
8977 * osint.ads (File_Attributes_Size): Update per change above,
8978 also clarify documentation.
8979 * s-filatt.ads: New file, binding to file attributes related
8980 functions.
8981 * Makefile.rtl (s-filatt): New runtime unit.
8982 * s-crtl.ads (strlen): Expose binding to GCC builtin (falls back
8983 to library function if not available on target).
8984 * s-os_lib.ads, s-os_lib.adb (Errno_Message): New subprogram.
8985 * s-oscons-tmplt.c (SIZEOF_struct_file_attributes,
8986 SIZEOF_struct_dirent_alloc): New constants.
8987 * Make-generated.in (s-oscons.ads): Now requires adaint.h.
8988 * a-direct.adb (Fetch_Next_Entry): Fix incorrect buffer sizes.
8989 Perform appropriate error checking if stat fails (do not just
8990 ignore existing files if stat fails)
8991 * gcc-interface/Make-lang.in (GNAT_ADA_OBJS, GNATBIND_OBJS): Update
8992 dependencies.
8993
ec77b144
HK
89942014-02-24 Hristian Kirtchev <kirtchev@adacore.com>
8995
8996 * sem_prag.adb (Analyze_Global_Item): Move the check concerning
8997 the use of volatile objects as global items in a function to
8998 the variable related checks section.
8999 * sem_util.adb (Async_Readers_Enabled): Directly call
9000 Has_Enabled_Property.
9001 (Async_Writers_Enabled): Directly call Has_Enabled_Property.
9002 (Effective_Reads_Enabled): Directly call Has_Enabled_Property.
9003 (Effective_Writes_Enabled): Directly call Has_Enabled_Property.
9004 (Has_Enabled_Property): Rename formal parameter State_Id to Item_Id.
9005 Update the comment on usage. State_Has_Enabled_Property how handles
9006 the original logic of the routine. Add processing for variables.
9007 (State_Has_Enabled_Property): New routine.
9008 (Variable_Has_Enabled_Property): New routine.
9009
32bba3c9
AC
90102014-02-24 Robert Dewar <dewar@adacore.com>
9011
9012 * sinfo.ads, sem_ch12.adb, sem_res.adb, sem_ch4.adb, par-ch12.adb:
9013 Minor reformatting.
9014 * atree.ads, atree.adb (Node35): New function.
9015 (Set_Node35): New procedure.
9016 * debug.adb: Define new debug flag -gnatd.X.
9017 * einfo.ads, einfo.adb (Import_Pragma): New field.
9018 * freeze.adb (Wrap_Imported_Procedure): New procedure (not
9019 really active yet, has to be activated with -gnatd.X.
9020 * sem_prag.adb (Set_Imported): Set new Import_Pragma
9021 field (Set_Imported): Don't set Is_Public (see
9022 Freeze.Wrap_Imported_Subprogram)
9023 * par-ch3.adb (P_Component_List): Handle unexpected null component.
9024
90252014-02-24 Yannick Moy <moy@adacore.com>
9026
9027 * sem_ch3.adb: Correct reference to SPARK RM in error messages.
9028 * gnat_rm.texi: Correct documentation of attribute Update.
9029
90302014-02-24 Ed Schonberg <schonberg@adacore.com>
9031
9032 * sem_ch5.adb (Analyze_Iterator_Specification): Reject container
9033 iterator in older versions of Ada.
9034
97027f64
GD
90352014-02-24 Gary Dismukes <dismukes@adacore.com>
9036
9037 * sem_ch5.adb, sem_aux.ads, sem_ch12.adb, gnat_ugn.texi, par.adb,
9038 par-ch12.adb: Change spelling 'parametrization' to 'parameterization'.
9039
5f50020a
ES
90402014-02-24 Ed Schonberg <schonberg@adacore.com>
9041
9042 * sinfo.ads, sinfo.adb: New attribute Generalized_Indexing, for
9043 indexed_components that are instances of Ada 2012 container
9044 indexing operations. Analysis and resolution of such nodes
9045 is performed on the attribute, and the original source is
9046 preserved for ASIS operations. If expansion is enabled, the
9047 indexed component is replaced by the value of this attribute,
9048 which is in a call to an Indexing aspect, in most case wrapped
9049 in a dereference operation.
9050 * sem_ch4.adb (Analyze_Indexed_Component): Create
9051 Generalized_Indexing attribute when appropriate.
9052 (Analyze_Call): If prefix is not overloadable and has an indexing
9053 aspect, transform into an indexed component so it can be analyzed
9054 as a potential container indexing.
9055 (Analyze_Expression): If node is an indexed component with a
9056 Generalized_ Indexing, do not re-analyze.
9057 * sem_res.adb (Resolve_Generalized_Indexing): Complete resolution
9058 of an indexed_component that has been transformed into a container
9059 indexing operation.
9060 (Resolve_Indexed_Component): Call the above when required.
9061 (Resolve): Do not insert an explicit dereference operation on
9062 an indexed_component whose type has an implicit dereference:
9063 the operation is inserted when resolving the related
9064 Generalized_Indexing.
9065
ec4e8e9a
AC
90662014-02-24 Olivier Ramonat <ramonat@adacore.com>
9067
9068 * gnat_rm.texi, gnat_ugn.texi: Replace Ada Compiler by Ada Development
9069 Environment.
9070
90712014-02-24 Hristian Kirtchev <kirtchev@adacore.com>
9072
9073 * sem_prag.adb (Check_Constituent_Usage): Remove leading spaces in
9074 error messages.
9075 (Inconsistent_Mode_Error): Remove leading spaces in error messages.
9076 Merge the expected and available mode errors.
9077 (Report_Unused_Constituents): Remove leading spaces in error messages.
9078 (Report_Unused_States): Remove leading spaces in error messages.
9079
e19137bc
AC
90802014-02-24 Thomas Quinot <quinot@adacore.com>
9081
9082 * par_sco.adb (Traverse_One): Refine categorization of statement
9083 SCOs.
9084
90852014-02-24 Robert Dewar <dewar@adacore.com>
9086
9087 * aspects.ads, aspects.adb: Remove aspects Ada_2005 and Ada_2012,
9088 Pure_05, Pure_12 and Preelaborate_05.
9089 * gnat_rm.texi: Update accordingly.
9090 * sem_prag.adb: Document one argument form of Ada_05/Ada_2005
9091 pragmas Document one argument form of Ada_12/Ada_2012 pragmas
9092 Recognize one argument form of these pragmas only in GNAT mode
9093 (-gnatg).
9094
1037b0f4
AC
90952014-02-24 Ed Schonberg <schonberg@adacore.com>
9096
9097 * s-dimmks.ads: Replace symbol for temperature, previously the
9098 Greek letter Theta, by the ASCII @ sign.
9099 * s-diflio.ads: ditto.
9100
91012014-02-24 Robert Dewar <dewar@adacore.com>
9102
9103 * exp_ch4.adb: Minor code reorganization (use OR for boolean
9104 variables).
9105 * sem_ch3.adb, sem_prag.adb, freeze.adb: Minor reformatting.
9106
91072014-02-24 Ben Brosgol <brosgol@adacore.com>
9108
9109 * gnat_ugn.texi, projects.texi: Added the necessary conditionalization
9110 so that references to gnatmem and ASIS tools do not appear in the FSF
9111 edition of the GNAT User's Guide.
9112
ebb6b0bd
AC
91132014-02-24 Yannick Moy <moy@adacore.com>
9114
9115 * freeze.adb (Freeze_Entity): Do not issue warning
9116 for pre/post being ignored on imported subprogram in GNATprove
9117 mode.
9118
91192014-02-24 Robert Dewar <dewar@adacore.com>
9120
9121 * exp_ch5.adb, sem_ch5.adb, sem_type.adb, sem_res.adb, sem_attr.adb,
9122 stand.ads, sem_eval.adb: Minor reformatting.
9123
91242014-02-24 Yannick Moy <moy@adacore.com>
9125
9126 * sem_prag.adb: Minor rewording in error message.
9127
91282014-02-24 Johannes Kanig <kanig@adacore.com>
9129
9130 * exp_util.adb (Expand_Subtype_From_Expr): Do not expand subtypes in
9131 GNATprove_mode, gnat2why doesn't need nor use these types.
9132
91332014-02-24 Gary Dismukes <dismukes@adacore.com>
9134
9135 * exp_ch4.adb (Expand_N_Op_Expon): On the AAMP
9136 target, in the case of signed integer exponentiation that uses a
9137 run-time routine, always select the Exp_* versions, since overflow
9138 checking is automatically done by AAMP arithmetic instructions.
9139
91402014-02-24 Hristian Kirtchev <kirtchev@adacore.com>
9141
9142 * sem_ch13.adb (Analyze_Aspect_Specifications):
9143 When the related context is a package instace, insert pragma
9144 Abstract_State after all internally-generated renamings related
9145 to the instance "header".
9146
91472014-02-24 Ed Schonberg <schonberg@adacore.com>
9148
9149 * sem_ch3.adb (Analyze_Declarations): Analyze Contract of abstract
9150 subprograms.
9151 * sem_disp.adb (Check_Dispatching_Context): A non-dispatching
9152 call to an abstract subprogram is legal if it appears in a
9153 pre/postcondition of another abstract operation.
9154
c97d7285
AC
91552014-02-24 Sergey Rybin <rybin@adacore.com frybin>
9156
9157 * gnat_ugn.texi: Misc updates.
9158
91592014-02-24 Hristian Kirtchev <kirtchev@adacore.com>
9160
9161 * exp_prag.adb (Expand_Old): Set the type of the generated temporary.
9162
91632014-02-24 Gary Dismukes <dismukes@adacore.com>
9164
9165 * layout.adb (Layout_Variant_Record): Instantiate
9166 Generic_Check_Choices and call Check_Choices before calling
9167 Build_Discr_Checking_Funcs, since we need Others_Discrete_Choices
9168 set to prevent generating incorrect discriminant-checking
9169 functions for 'others' variants (functions that unconditionally
9170 return True rather than accounting for the values covered by the
9171 'others' choice).
9172 * sem_eval.ads (Subtypes_Statically_Compatible): Add formal
9173 Formal_Derived_Matching.
9174 (Subtypes_Statically_Match): Add formal Formal_Derived_Matching.
9175 * sem_eval.adb (Subtypes_Statically_Compatible): Pass new
9176 Formal_Derived_Matching formal to Subtypes_Statically_Match.
9177 (Subtypes_Statically_Match): Suppress the Object_Size matching
9178 test in the case where Formal_Derived_Matching is True.
9179 * sem_ch12.adb (Validate_Derived_Type_Instance): Pass
9180 True for Formal_Derived_Matching_Formal on the call to
9181 Subtypes_Statically_Compatible.
9182
9fbb94f2
EB
91832014-02-23 Eric Botcazou <ebotcazou@adacore.com>
9184
9185 * gcc-interface/Make-lang.in (ADA_TOOLS_FLAGS_TO_PASS): Robustify.
9186
086de490
EB
91872014-02-23 Eric Botcazou <ebotcazou@adacore.com>
9188
9189 * gcc-interface/utils2.c (build_simple_component_ref): Fix formatting.
9190 Look through a conversion between original and packable version to get
9191 the base object.
9192 (build_component_ref): Rework comment and fix formatting.
9193
350b83cc
AC
91942014-02-20 Sergey Rybin <rybin@adacore.com frybin>
9195
9196 * gnat_ugn.texi, vms_data.ads (gnatelim): Add description of
9197 project-specific options.
9198
91992014-02-20 Ed Schonberg <schonberg@adacore.com>
9200
9201 * a-cbdlli.adb (Insert): When capacity exceeded, raise Capacity_Error,
9202 not Constraint_Error.
9203 * a-cbmutr.adb (Append_Child, Insert_Child, Prepend_Child): Ditto.
9204 * sem_ch5.adb: Code clean up.
9205
8880426d
AC
92062014-02-20 Hristian Kirtchev <kirtchev@adacore.com>
9207
9208 * sem_prag.adb (Usage_Error): Remove local
9209 constant Typ. Remove the specialized diagnostics for unconstrained
9210 or tagged items as those are not part of the explicit input set
9211 of the related subprogram and should not be flagged.
9212
92132014-02-20 Ed Schonberg <schonberg@adacore.com>
9214
9215 * sem_attr.adb: Add guard to preserve all errors.
9216
92172014-02-20 Vincent Celier <celier@adacore.com>
9218
9219 * switch-m.adb (Normalize_Compiler_Switches): Take into account
9220 switches that are recorded in ALI files: -gnateA, -gnateE,
9221 -gnateF, -gnateinn, -gnateu, -gnateV and -gnateY.
9222
92232014-02-20 Ed Schonberg <schonberg@adacore.com>
9224
9225 * sem_ch5.adb (Analyze_Iterator_Specification): Check legality
9226 of an element iterator form over a formal container with an
9227 Iterable aspect.
9228 * exp_ch5.adb (Build_Formal_Container_Iteration): Utility
9229 to create declaration and loop statements for both forms of
9230 container iterators.
9231 (Expand_Formal_Container_Element_Iterator): New procedure
9232 to handle loops of the form "for E of C" when C is a formal
9233 container.
9234 (Expand_Formal_Container_Iterator): Code cleanup.
9235
46de64ca
AC
92362014-02-20 Hristian Kirtchev <kirtchev@adacore.com>
9237
9238 * sem_prag.adb (Add_Item_To_Name_Buffer): New routine.
9239 (Analyze_Contract_Case): Remove the use of
9240 "may". Replace "aspect Contract_Cases" to avoid categorization
9241 of aspect vs pragma.
9242 (Analyze_External_Property_In_Decl_Part): Remove the use of "formal".
9243 (Analyze_Global_Item): Remove
9244 the use of "formal", specify the subprogram. Split the
9245 error message about a state with visible refinement into
9246 two. Remove the use of "global" from "volatile global item".
9247 (Analyze_Initialization_Item): Ensure that the SPARK RM reference
9248 is on one line.
9249 (Analyze_Input_Output): Update the call to
9250 Check_Mode. Specify the duplicated item. Reword the error
9251 message concerning an input of a null output list. Use "\"
9252 for error message continuation.
9253 (Analyze_Part_Of): Remove
9254 the use of "may". Use "\" for error message continuation.
9255 (Analyze_Refined_Depends_In_Decl_Part): Update the error
9256 message concerning a useless refinement to match the format
9257 of Refined_Global.
9258 (Analyze_Refined_Global_In_Decl_Part): Reword the error message
9259 concerning a useless refinement.
9260 (Analyze_Refinement_Clause): Use "\" for error message continuation.
9261 (Check_Constituent_Usage): Use "\" for error message continuation.
9262 (Check_Dependency_Clause): Use "\" for error message continuation.
9263 (Check_Matching_Constituent): Use "\" for error message continuation.
9264 (Check_Missing_Part_Of): Use "\" for error message continuation.
9265 (Check_Mode): Renamed to
9266 Check_Role. Update the comment on usage. Redo the error reporting
9267 to use Role_Error.
9268 (Check_Mode_Restriction_In_Enclosing_Context): Use "\" for error
9269 message continuation.
9270 (Find_Mode): Renamed to Find_Role. Update the parameter profile along
9271 with comment on usage. Update all occurrences of Is_Input and Is_Output.
9272 (Inconsistent_Mode_Error): Use "\" for error message continuation.
9273 (Input_Match): Use "\" for error message continuation.
9274 (Role_Error): New routine.
9275 (Set_Convention_From_Pragma): Use "\" for error message continuation.
9276 (Usage_Error): Add local variable Error_Msg. Build specialized error
9277 message showcasing the offending item kind. Redo the diagnostics for
9278 unconstrained types.
9279
92802014-02-20 Ed Schonberg <schonberg@adacore.com>
9281
9282 * exp_util.adb (Is_Iterated_Container): Use high-level primitives
9283 to determine whether a type is a container type, rather than
9284 examining only its type declaration, so that subtypes and derived
9285 types are handled properly.
9286
92872014-02-20 Sergey Rybin <rybin@adacore.com frybin>
9288
9289 * gnat_ugn.texi: gnatmetric: add description of project-specific
9290 options.
9291
92922014-02-20 Ed Schonberg <schonberg@adacore.com>
9293
9294 * sem_attr.adb (Analyze_Attribute, case 'Update): Verify that
9295 all choices in an association for a record type have the same
9296 type, as is done for record aggregates.
9297
3e586e10
AC
92982014-02-20 Robert Dewar <dewar@adacore.com>
9299
9300 * a-cborma.adb, a-cbhama.adb, a-cbdlli.adb, a-cbmutr.adb: Use pragma
9301 Unmodified rather than Warnings (Off). Make comments
9302 uniform in the four affected units.
9303
93042014-02-20 Robert Dewar <dewar@adacore.com>
9305
9306 * sem_ch13.adb (Analyze_Attribute_Definition_Clause, case
9307 Object_Size): For non-scalar types allow any value that is a
9308 multiple of 8.
9309 * gnat_rm.texi: Document Object_Size for composites more clearly.
9310
93112014-02-20 Yannick Moy <moy@adacore.com>
9312
9313 * sem_util.ads, sem_util.adb (Default_Initialization): Remove function.
9314
93152014-02-20 Ed Schonberg <schonberg@adacore.com>
9316
9317 * stand.ads: Raise_Type: new predefined entity, used as the type
9318 of a Raise_Expression prior to resolution.
9319 * cstand.adb: Build entity for Raise_Type.
9320 * sem_ch11.adb (Analyze_Raise_Expression): use Raise_Type as the
9321 initial type of the node.
9322 * sem_type.adb (Covers): Raise_Type is compatible with all
9323 other types.
9324 * sem_res.adb (Resolve): Remove special handling of Any_Type on
9325 Raise_Expression nodes.
9326 (Resolve_Raise_Expression): Signal ambiguity if the type of the
9327 context is still Raise_Type.
9328
7f568bfa
AC
93292014-02-20 Robert Dewar <dewar@adacore.com>
9330
9331 * sem_ch12.adb (Validate_Access_Type_Instance): Add message if
9332 mismatching predicates.
9333 * sem_ch6.adb (Check_Conformance): Give better messages on
9334 predicate mismatch.
9335 * sem_eval.adb (Predicates_Match): Move to spec.
9336 * sem_eval.ads (Predicates_Match): Moved here from body.
9337
93382014-02-20 Ed Schonberg <schonberg@adacore.com>
9339
9340 * a-cbmutr.adb: Use default value in Insert_Child.
9341
308aab0b
AC
93422014-02-20 Vincent Celier <celier@adacore.com>
9343
9344 * gnatcmd.adb, make.adb, prj-makr.adb, clean.adb: Call
9345 Stringt.Initialize in all project aware tools.
9346
93472014-02-20 Doug Rupp <rupp@adacore.com>
9348
9349 * gnat_ugn.texi: Document gnatbind -X option.
9350 * vms_data.ads: Minor warnings documentation reformatting.
9351
93522014-02-20 Ed Schonberg <schonberg@adacore.com>
9353
9354 * exp_ch3.adb (Expand_Freeze_Array_Type): Only create invariant
9355 procedure for a base type.
9356
93572014-02-20 Robert Dewar <dewar@adacore.com>
9358
9359 * sem_ch4.adb (Analyze_Case_Expression): Get type from first
9360 expression with type info.
9361 * sem_ch13.adb: Minor reformatting.
9362 * sem_eval.adb (Subtypes_Statically_Match): Make sure we return
9363 False if predicates do not match on the two types.
9364
93652014-02-20 Arnaud Charlet <charlet@adacore.com>
9366
9367 * sem_prag.adb (Analyze_Pragma [pragma Attach_Handler]):
9368 In Relaxed_RM_Semantics mode, allow any static integer value,
9369 for compatibility with other compilers.
9370
0f361206
AC
93712014-02-20 Vincent Celier <celier@adacore.com>
9372
9373 * errutil.adb (Initialize): Properly initialize entry in table
9374 Warnings when warnings are suppressed.
9375
93762014-02-20 Robert Dewar <dewar@adacore.com>
9377
9378 * s-os_lib.ads: Add warning about non-portability of Rename_File.
9379 * sem_util.ads, sem_util.adb (Is_Junk_Name): New function.
9380 * sem_warn.adb: Use Is_Junk_Name to suppress some warnings.
9381 * gnat_ugn.texi: Document no warnings on junk variable names.
9382 * layout.adb: Minor code reorganization (use Ekind_In).
9383 * stringt.adb: Move initialization of Null_String_Id to Initialize
9384 routine.
9385
93862014-02-20 Ed Schonberg <schonberg@adacore.com>
9387
9388 * sem_ch13.adb: Initialize optional Element_Id.
9389
c0cdbd39
AC
93902014-02-20 Robert Dewar <dewar@adacore.com>
9391
9392 * s-os_lib.ads (Rename_File): Minor commment addition.
9393
93942014-02-20 Thomas Quinot <quinot@adacore.com>
9395
9396 * einfo.ads: Minor reformatting.
9397
93982014-02-20 Hristian Kirtchev <kirtchev@adacore.com>
9399
9400 * aspects.adb (Exchange_Aspects): New routine.
9401 * aspects.ads (Exchange_Aspects): New routine.
9402 * atree.adb (Rewrite): Do not check whether the save node has
9403 aspects as it never will, instead check the node about to be clobbered.
9404 * einfo.adb (Write_Field25_Name): Abstract_States can appear in
9405 entities of generic packages.
9406 * sem_ch6.adb (Analyze_Expression_Function): Fix the parent
9407 pointer of an aspect specification list after rewriting takes place.
9408 * sem_ch7.adb (Analyze_Package_Body_Helper): Swap the aspect
9409 specifications of the generic template and the copy used for analysis.
9410 * sem_ch12.adb (Analyze_Generic_Package_Declaration): Swap
9411 the aspect specifications of the generic template and the
9412 copy used for analysis.
9413 (Analyze_Package_Instantiation): Propagate the aspect specifications
9414 from the generic template to the instantiation.
9415 (Build_Instance_Compilation_Unit_Nodes): Propagate the aspect
9416 specifications from the generic template to the instantiation.
9417 * sem_ch13.adb (Analyze_Aspect_Specifications): Handle aspects
9418 Abstract_State, Initializes and Initial_Condition when they
9419 apply to a package instantiation.
9420
94212014-02-20 Robert Dewar <dewar@adacore.com>
9422
9423 * stringt.adb: Add call to Initialize in package initialization.
9424
fe4552f4
AC
94252014-02-20 Robert Dewar <dewar@adacore.com>
9426
9427 * a-crbtgk.adb, a-cihama.adb, a-coinve.adb, a-ciorse.adb, a-crbtgo.adb,
9428 a-cidlli.adb, a-cimutr.adb, a-cihase.adb, a-cohama.adb, a-coorse.adb,
9429 a-chtgke.adb, a-chtgop.adb, a-comutr.adb, a-ciorma.adb, a-cobove.adb,
9430 a-convec.adb, a-cohase.adb, a-chtgbk.adb, a-chtgbo.adb: Minor
9431 reformatting.
9432
94332014-02-20 Bob Duff <duff@adacore.com>
9434
9435 * s-os_lib.ads: Minor: Remove incorrect comment.
9436
94372014-02-20 Robert Dewar <dewar@adacore.com>
9438
9439 * sem_elab.adb (Check_Elab_Assign): Clearer warning message.
9440
94412014-02-20 Ed Schonberg <schonberg@adacore.com>
9442
9443 * a-cborma.adb (Assign): When creating a node without a specified
9444 element, insert an uninitialized element in the map, because
9445 the instance may provide an element type with a default
9446 initialization, e.g a scalar with a Default_Value aspect.
9447 * a-cbhama.adb (Assign_Key): Remove useless Allocate procedure.
9448 (Insert): In the version without explicit element, provide an
9449 uninitialized element, as above.
9450 * a-cbdlli.adb (Append): In the version without explicit element,
9451 provide an uninitalized element, as above.
9452 (Allocate): Remove unused version.
9453
3730c4a0
AC
94542014-02-20 Robert Dewar <dewar@adacore.com>
9455
9456 * sem_elab.adb: Minor code reorganization (use Nkind_In).
9457 * stringt.adb: Remove temporary pragma Warnings (Off).
9458 * stringt.ads: Add pragma Elaborate_Body to ensure initialization
9459 of Null_String_Id.
9460
94612014-02-20 Matthew Heaney <heaney@adacore.com>
9462
9463 * a-chtgbk.adb (Replace): Use correct offset when calculating bucket
9464 index.
9465
0c7e0c32
AC
94662014-02-20 Ed Schonberg <schonberg@adacore.com>
9467
9468 * sem_ch5.adb (Analyze_Iterator_Specification): Initialize
9469 properly the cursor type for subsequent volatile testing in SPARK
9470 mode, when domain is a formal container with an Iterabe aspect.
9471
94722014-02-20 Robert Dewar <dewar@adacore.com>
9473
9474 * errout.adb (Set_Warnings_Mode_Off): Add Reason argument.
9475 (Set_Specific_Warning_Off): Add Reason argument.
9476 * errout.ads (Set_Warnings_Mode_Off): Add Reason argument.
9477 (Set_Specific_Warning_Off): Add Reason argument.
9478 * erroutc.adb (Warnings_Entry): Add Reason field
9479 (Specific_Warning_Entry): Add Reason field.
9480 (Warnings_Suppressed): return String_Id for Reason.
9481 (Warning_Specifically_Suppressed): return String_Id for Reason.
9482 * erroutc.ads (Warnings_Entry): Add Reason field.
9483 (Specific_Warning_Entry): Add Reason field.
9484 (Set_Specific_Warning_Off): Add Reason argument.
9485 (Set_Warnings_Mode_Off): Add Reason argument.
9486 (Warnings_Suppressed): return String_Id for Reason.
9487 (Warning_Specifically_Suppressed): return String_Id for Reason.
9488 * errutil.adb (Warnings_Suppressed): returns String_Id for Reason
9489 (Warning_Specifically_Suppressed): returns String_Id for Reason
9490 * gnat_rm.texi: Document that Warning parameter is string literal
9491 or a concatenation of string literals.
9492 * par-prag.adb: New handling for Reason argument.
9493 * sem_prag.adb (Analyze_Pragma, case Warning): New handling
9494 for Reason argument.
9495 * sem_util.ads, sem_util.adb (Get_Reason_String): New procedure.
9496 * sem_warn.ads (Warnings_Off_Entry): Add reason field.
9497 * stringt.adb: Set Null_String_Id.
9498 * stringt.ads (Null_String_Id): New constant.
9499
e4494292
RD
95002014-02-20 Robert Dewar <dewar@adacore.com>
9501
9502 * einfo.ads: Minor comment addition: Etype of package is
9503 Standard_Void_Type.
9504 * checks.adb, exp_aggr.adb, exp_atag.adb, exp_attr.adb, exp_ch13.adb,
9505 exp_ch2.adb, exp_ch3.adb, exp_ch4.adb, exp_ch5.adb, exp_ch6.adb,
9506 exp_ch7.adb, exp_ch9.adb, exp_dbug.adb, exp_disp.adb, exp_imgv.adb,
9507 exp_intr.adb, exp_prag.adb, exp_sel.adb, exp_strm.adb, exp_util.adb,
9508 freeze.adb, rtsfind.adb, sem_aggr.adb, sem_attr.adb, sem_ch10.adb,
9509 sem_ch12.adb, sem_ch13.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
9510 sem_ch6.adb, sem_ch8.adb, sem_dim.adb, sem_prag.adb, sem_res.adb,
9511 sem_util.adb, tbuild.adb, tbuild.ads: Remove New_Reference_To.
9512 Replace all calls with calls to New_Occurrence_Of.
9513
95142014-02-20 Robert Dewar <dewar@adacore.com>
9515
9516 * par-util.adb (Ignore, case of right paren): Make this a
9517 serious error.
9518
d7cb47b4
AC
95192014-02-19 Robert Dewar <dewar@adacore.com>
9520
9521 * sem_ch5.adb, sem_prag.adb, sem_attr.adb: Minor reformatting.
9522 * debug.adb: Remove -gnatd.X switch, no longer used.
9523 * styleg.adb (Check_Then): Remove check of -gnatd.X, check is
9524 now always made.
9525
95262014-02-19 Bob Duff <duff@adacore.com>
9527
9528 * g-socket.ads: Minor: Correct some comments.
9529
53f697ee
AC
95302014-02-19 Ed Schonberg <schonberg@adacore.com>
9531
9532 * sem_ch5.adb: Inhibit iterator rewriting in ASIS mode.
9533
95342014-02-19 Arnaud Charlet <charlet@adacore.com>
9535
9536 * sem_ch13.adb (Analyze_Aspect_Specifications): Do not generate
9537 an error on out of range priorities if Relaxed_RM_Semantics.
9538 * sem_prag.adb (Analyze_Pragma): Ditto.
9539
95402014-02-19 Bob Duff <duff@adacore.com>
9541
9542 * sem_attr.adb (Resolve_Attribute): Detect the case of F'Access
9543 where F denotes the renaming of an enumeration literal, and
9544 issue a specialized error message.
9545
47fb6ca8
AC
95462014-02-19 Matthew Heaney <heaney@adacore.com>
9547
9548 * a-chtgop.ads (Checked_Index): New operation.
9549 (Next): Changed mode of hash table.
9550 * a-chtgop.adb (Adjust, Delete_Node_Sans_Free): Detect tampering
9551 (Generic_Read, Reserve_Capacity): Ditto.
9552 (Generic_Equal): Detect tampering.
9553 (Next): Changed mode of hash table, detect tampering.
9554 * a-chtgke.ads (Checked_Index, Checked_Equivalent_Keys): New
9555 operation.
9556 (Find): Changed mode of hash table.
9557 * a-chtgke.adb (Checked_Equivalent_Keys): New operation
9558 (Delete_Key_Sans_Free, Generic_Conditional_Insert): Detect
9559 tampering.
9560 (Find): Changed mode of hash table, check for tampering.
9561 (Generic_Replace_Element): Check for tampering.
9562 * a-chtgbk.ads (Checked_Index, Checked_Equivalent_Keys): New operation.
9563 * a-chtgbk.adb (Checked_Index, Checked_Equivalent_Keys): New
9564 operation (Delete_Key_Sans_Free, Generic_Conditional_Insert):
9565 Detect tampering.
9566 (Find, Generic_Replace_Element): Check for tampering.
9567 * a-chtgbo.ads (Checked_Index): New operation.
9568 * a-chtgbo.adb (Checked_Index): New operation
9569 (Delete_Node_Sans_Free, Generic_Equal): Detect tampering.
9570 (Generic_Read, Next): Ditto.
9571 * a-cohase.adb, a-cihase.adb (Is_In): Changed mode of hash
9572 table (Difference, Intersection): Use variable view of
9573 source, detect tampering (Find, Is_Subset, Overlap): Use
9574 variable view of container (Symmetric_Difference, Union):
9575 Detect tampering (Vet): Use Checked_Index to detect tampering
9576 (Constant_Reference, Element, Find): Use variable view of
9577 container.
9578 (Update_Element_Preserving_Key): Detect tampering.
9579 * a-cbhase.adb (Difference, Find, Is_In): Use variable view
9580 of container.
9581 (Is_Subset): Ditto.
9582 (Equivalent_Sets, Overlap): Use Node's Next component.
9583 (Vet): Use Checked_Index to detect tampering.
9584 (Constant_Reference, Element, Find): Use variable view of container.
9585 (Update_Element_Preserving_Key): Detect tampering.
9586 * a-cohama.adb, a-cihama.adb, a-cbhama.adb (Constant_Reference,
9587 Element, Find): Use variable view of container.
9588 (Reference): Rename hash table component.
9589 (Vet): Use Checked_Index to detect tampering.
9590
95912014-02-19 Arnaud Charlet <charlet@adacore.com>
9592
9593 * adabkend.adb (Scan_Compiler_Arguments): Add missing handling
9594 of -nostdinc.
9595
95962014-02-19 Thomas Quinot <quinot@adacore.com>
9597
9598 * tbuild.adb (New_Occurrence_Of, New_Rerefence_To): Guard
9599 against calls without Def_Id.
9600
96012014-02-19 Claire Dross <dross@adacore.com>
9602
9603 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads, a-cforse.ads,
9604 a-cofove.ads: Add global annotations to subprograms.
9605
96062014-02-19 Hristian Kirtchev <kirtchev@adacore.com>
9607
9608 * sem_prag.adb (Analyze_Initial_Condition_In_Decl_Part): Remove
9609 constants Errors, Pack_Id and Pack_Init. Remove variable Vars.
9610 Initial_Condition no longer requires the presence of pragma
9611 Initialized. Do not try to diagnose whether all variables mentioned in
9612 pragma Initializes also appear in Initial_Condition.
9613 (Collect_Variables): Removed.
9614 (Match_Variable): Removed.
9615 (Match_Variables): Removed.
9616 (Report_Unused_Variables): Removed.
9617
96182014-02-19 Thomas Quinot <quinot@adacore.com>
9619
9620 * gnat_rm.texi (pragma Stream_Convert): Minor rewording.
9621
13f39091
AC
96222014-02-19 Robert Dewar <dewar@adacore.com>
9623
9624 * sem_util.adb, sem_util.ads, prj-conf.adb, s-os_lib.adb: Minor
9625 reformatting.
9626
96272014-02-19 Vincent Celier <celier@adacore.com>
9628
9629 * prj-part.adb (Parse_Single_Project): Use the fully resolved
9630 project path, with all symbolic links resolved, to check if the
9631 same project is imported with a different unresolved path.
9632 * prj-tree.ads (Project_Name_And_Node): Component Canonical_Path
9633 changed to Resolved_Path to reflect that all symbolic links
9634 are resolved.
9635
110e2969
AC
96362014-02-19 Ed Schonberg <schonberg@adacore.com>
9637
9638 * sem_util.ads, sem_util.adb (Get_Cursor_Type): Moved to sem_util
9639 from sem_ch13, for use elsewhere.
9640 * sem_ch13.adb (Get_Cursor_Type): Moved to sem_util.
9641 * sem_ch5.adb (Analyze_Iterator_Specification): Set properly the
9642 cursor type on the loop variable when the iteration is over o
9643 formal container.
9644
96452014-02-19 Vincent Celier <celier@adacore.com>
9646
9647 * prj-conf.adb (Add_Default_GNAT_Naming_Scheme): Add declaration
9648 for an empty Target (Check_Target): Never fail when an empty
9649 target is declared in the configuration project.
9650
96512014-02-19 Ed Schonberg <schonberg@adacore.com>
9652
9653 * sem_prag.adb (Check_Arg_Is_Local_Name): Argument is local if
9654 the pragma comes fron a predicate aspect and the context is a
9655 record declaration within the scope that declares the type.
9656
96572014-02-19 Robert Dewar <dewar@adacore.com>
9658
9659 * gnat_rm.texi: Minor clarifications.
9660 * expander.adb, sem_aggr.adb: Add comments.
9661
ffdeb702
AC
96622014-02-19 Ed Schonberg <schonberg@adacore.com>
9663
9664 * sem_prag.adb (Check_Arg_Is_Local_Name): For an aspect that
9665 applies to a subprogram body, the name is the current scope,
9666 rather than being declared in the current scope.
9667 (Analyze_Pragma, case No_Return): Handle properly a No_Return
9668 aspect applied to a subprogram body.
9669
96702014-02-19 Ed Schonberg <schonberg@adacore.com>
9671
9672 * sem_ch13.adb (Resolve_Iterable_Operation): Improve resolution
9673 of overloaded subprograms, and fix bug in handling of primitive
9674 operation Element.
9675
96762014-02-19 Pascal Obry <obry@adacore.com>
9677
9678 * s-os_lib.adb: Minor reformatting.
9679
96802014-02-19 Yannick Moy <moy@adacore.com>
9681
9682 * expander.adb (Expand): Do nothing inside generics.
9683 * sem_aggr.adb (Aggregate_Constraint_Checks): Do nothing inside
9684 generics.
9685
96862014-02-19 Yannick Moy <moy@adacore.com>
9687
9688 * exp_ch2.adb: Remove useless 'with' of unit Uintp.
9689
edbd98c4
AC
96902014-02-19 Robert Dewar <dewar@adacore.com>
9691
9692 * sem_ch3.adb, style.adb, sem_prag.adb, sem_ch13.adb: Minor reformatting
9693 * a-sequio.adb: Remove useless pragma Extensions_Allowed (no
9694 longer needed).
9695
96962014-02-19 Claire Dross <dross@adacore.com>
9697
9698 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
9699 a-cforse.ads, a-cofove.ads: Add Iterable aspect to formal containers.
9700
476b301a
AC
97012014-02-19 Hristian Kirtchev <kirtchev@adacore.com>
9702
9703 * sem_ch3.adb (Analyze_Declarations): Analyze
9704 a package contract at the end of the private declarations (if
9705 applicable), otherwise analyze it and the end of the visible
9706 declarations.
9707
97082014-02-19 Ed Schonberg <schonberg@adacore.com>
9709
9710 * style.adb (Missing_Overriding): If subprogram is an
9711 instantiation, place warning on the instance node itself,
9712 without mention of the original generic. Do not emit message
9713 if explicit Ada version is older than the introduction of the
9714 overriding indicator.
9715
a6ce7e76
AC
97162014-02-19 Yannick Moy <moy@adacore.com>
9717
9718 * gnat_rm.texi: Doc clarifications.
9719
97202014-02-19 Yannick Moy <moy@adacore.com>
9721
9722 * exp_util.adb (Remove_Side_Effects): Do not remove side-effects
9723 inside a generic.
9724
97252014-02-19 Ed Schonberg <schonberg@adacore.com>
9726
9727 * sem_ch13.adb (Get_Cursor_Type): Obtain cursor type from
9728 specified First primitive, rather than by name.
9729 (Validate_Iterable_Aspect, Resolve_Iterable_Operation): Use it,
9730 and extend error checking for missing primitives and incorrect
9731 signatures.
9732
97332014-02-19 Ed Schonberg <schonberg@adacore.com>
9734
9735 * sem_ch3.adb (Check_Pragma_Implemented): Detect additional
9736 errors when a Synchronization aspect on an overriding protected
9737 operation does not match the given aspect on the overridden
9738 operation of an ancestor interface.
9739
97402014-02-19 Hristian Kirtchev <kirtchev@adacore.com>
9741
9742 * sem_prag.adb (Check_Loop_Pragma_Grouping): New routine.
9743 (Check_Loop_Pragma_Placement): Update
9744 comment on usage. Remove local variables Orig_Stmt and
9745 Within_Same_Sequence. Check that the current Loop_Invariant or
9746 Loop_Variant pragma is grouped together with other such pragmas.
9747 (Is_Loop_Pragma): New routine.
9748 (Prev_In_Loop): Removed.
9749
0b7f0f0e
AC
97502014-02-19 Robert Dewar <dewar@adacore.com>
9751
9752 * par-ch6.adb (P_Return): For extended return, end column lines
9753 up with RETURN.
9754 * par.adb: Minor documentation clarification.
9755
97562014-02-19 Yannick Moy <moy@adacore.com>
9757
9758 * sem_prag.adb (Check_Loop_Pragma_Placement): Add check
9759 that Loop_Invariant and Loop_Variant appear consecutively.
9760 * gnat_rm.texi Update documentation of Loop_Invariant and
9761 Loop_Variant pragmas.
9762
97632014-02-19 Robert Dewar <dewar@adacore.com>
9764
9765 * debug.adb: Document -gnatd.X.
9766 * par-ch5.adb (P_If_Statement): Always check THEN, even if not
9767 first token
9768 (Check_Then_Column): Ditto.
9769 * styleg.adb (Check_Then): Allow THEN on line after IF.
9770 (Check_Then): Check THEN placement under control of -gnatd.X
9771 * styleg.ads (Check_Then): Now called even if THEN is not first
9772 token on line.
9773 * stylesw.ads (Style_Check_If_Then_Layout): Document new
9774 relaxed rules.
9775 * gnat_ugn.texi: For -gnatyi, THEN can now be on line after IF.
9776
97772014-02-19 Robert Dewar <dewar@adacore.com>
9778
9779 * a-cfhama.adb, a-cfhase.adb, a-cforse.adb, a-cofove.adb, a-ngcefu.adb,
9780 a-teioed.adb, a-wtedit.adb, a-ztedit.adb, exp_ch5.adb, inline.adb,
9781 prj-pp.adb, prj-tree.adb, sem_ch12.adb, sem_ch8.adb,
9782 vms_conv.adb: Fix bad layout of IF statements
9783
e7cff5af
RD
97842014-02-19 Robert Dewar <dewar@adacore.com>
9785
9786 * exp_util.adb (Side_Effect_Free): Scalar if expressions can be SEF.
9787
a767d69b
AC
97882014-02-19 Robert Dewar <dewar@adacore.com>
9789
9790 * exp_util.adb: Update comments.
9791
97922014-02-19 Doug Rupp <rupp@adacore.com>
9793
9794 * bindgen.adb (Gen_Adainit) [VMS] New global Float_Format.
9795 * init.c (__gl_float_format): [VMS] New global.
9796 (__gnat_set_features): Call FP_CONTROL to set FPSR for the float
9797 representation in effect.
9798
97992014-02-19 Hristian Kirtchev <kirtchev@adacore.com>
9800
9801 * exp_ch6.adb Add with and use clause for Exp_Prag.
9802 (Expand_Contract_Cases): Relocated to Exp_Prag.
9803 * exp_ch6.ads (Expand_Contract_Cases): Relocated to Exp_Prag.
9804 * exp_prag.adb Add with and use clauses for Checks and Validsw.
9805 (Expand_Contract_Cases): Relocated from Exp_Ch6. Update the
9806 structure of the expanded code to showcase the evaluation of
9807 attribute 'Old prefixes. Add local variable Old_Evals. Expand
9808 any attribute 'Old references found within a consequence. Add
9809 circuitry to evaluate the prefixes of attribute 'Old that
9810 belong to a selected consequence.
9811 (Expand_Old_In_Consequence): New routine.
9812 * exp_prag.ads (Expand_Contract_Cases): Relocated from Exp_Ch6.
9813 * sem_attr.adb (Check_Use_In_Contract_Cases): Warn that a
9814 potentially unevaluated prefix is always evaluated.
9815
adb252d8
AC
98162014-02-19 Robert Dewar <dewar@adacore.com>
9817
9818 * exp_attr.adb (Expand_Min_Max_Attribute): Use Insert_Declaration
9819 (Expand_Min_Max_Attribute): Use Matching_Standard_Type.
9820 * exp_ch4.adb (Expand_N_Expression_With_Actions): Remove special
9821 handling for the case of Modify_Tree_For_C, this approach did
9822 not work.
9823 * exp_util.adb (Matching_Standard_Type): New function
9824 (Side_Effect_Free): New top level functions (from
9825 Remove_Side_Effects).
9826 * exp_util.ads (Side_Effect_Free): New top level functions
9827 (moved from body).
9828 * sinfo.ads: Minor comment updates.
9829
98302014-02-19 Ed Schonberg <schonberg@adacore.com>
9831
9832 * exp_ch6.adb (Expand_Simple_Function_Return): If return
9833 type is unconstrained and uses the secondary stack, mark the
9834 enclosing function accordingly, to ensure that the value is not
9835 prematurely removed.
9836
98372014-02-19 Hristian Kirtchev <kirtchev@adacore.com>
9838
9839 * par.adb Alphabetize the routines in Par.Sync.
9840 (Resync_Past_Malformed_Aspect): New routine.
9841 * par-ch13.adb (Get_Aspect_Specifications): Alphabetize local
9842 variables. Code and comment reformatting. Detect missing
9843 parentheses on aspects [Refined_]Global and [Refined_]Depends
9844 with a non-null definition.
9845 * par-sync.adb: Alphabetize all routines in this separate unit.
9846 (Resync_Past_Malformed_Aspect): New routine.
9847
a0367005
RD
98482014-02-19 Robert Dewar <dewar@adacore.com>
9849
9850 * sem_eval.ads, sem_eval.adb (Subtypes_Statically_Match): Return False
9851 if Esize values do not match.
9852
e03f7ccf
AC
98532014-02-19 Yannick Moy <moy@adacore.com>
9854
9855 * sinfo.ads: Minor comment update.
9856
98572014-02-19 Hristian Kirtchev <kirtchev@adacore.com>
9858
9859 * atree.ads: Minor reformatting (change Entity_Info to Einfo).
9860
98612014-02-19 Thomas Quinot <quinot@adacore.com>
9862
9863 * exp_ch7.adb (Find_Node_To_Be_Wrapped): An assignment statement
9864 that has the No_Ctrl_Actions flag is a suitable node to be
9865 wrapped if the assigned expression has no finalization actions.
9866 * sem_eval.adb (Eval_Entity_Name): For a compile time known
9867 boolean value, mark the corresponding condition SCO as constant.
9868
98692014-02-19 Robert Dewar <dewar@adacore.com>
9870
9871 * exp_util.adb: Minor reformatting.
9872 * exp_util.ads (Matching_Standard_Type): New function.
9873 * exp_ch7.adb: Minor reformatting.
9874
98752014-02-19 Ed Schonberg <schonberg@adacore.com>
9876
9877 * sem_ch13.adb (Get_Cursor_Type): Use scope of iterable type
9878 to find declaration for Cursor, to handle properly the case of
9879 a discriminated iterable type.
9880
98812014-02-19 Vincent Celier <celier@adacore.com>
9882
9883 * gnatcmd.adb (GNATCmd): Always replace the object dirs of
9884 imported library projects with the library ALI dirs, when setting
9885 the object paths.
9886 * prj-env.ads (Ada_Objects_Path): Correct comments about
9887 argument Including_Libraries.
9888
4877d85f
AC
98892014-02-19 Gary Dismukes <dismukes@adacore.com>
9890
9891 * gnat_rm.texi: Minor spelling fixes.
9892
98932014-02-19 Doug Rupp <rupp@adacore.com>
9894
9895 * init.c: Remove unneeded code.
9896 * fe.h (Float_Format): New macro
9897 * gcc-interface/trans.c (gigi): On VMS, set vms_float_format.
9898
f660fba6
AC
98992014-02-19 Hristian Kirtchev <kirtchev@adacore.com>
9900
9901 * sem_prag.adb (Check_Refined_Global_Item):
9902 A state or variable acts as a constituent only it is part of an
9903 encapsulating state and the state has visible refinement.
9904
99052014-02-19 Ed Schonberg <schonberg@adacore.com>
9906
9907 * sem_ch6.adb (Analyze_Subprogram_Contract): Do not warn on a
9908 postcondition for a function when the expression does not mention
9909 'Result but the function has in-out parameters.
9910
99112014-02-19 Robert Dewar <dewar@adacore.com>
9912
9913 * gnat_rm.texi: Add documentation on Value_Size forcing biased
9914 representation.
9915
b4f149c2
AC
99162014-02-19 Hristian Kirtchev <kirtchev@adacore.com>
9917
9918 * lib-xref.ads Remove the small table of letter and symbol usage as we
9919 already have one.
9920
99212014-02-19 Hristian Kirtchev <kirtchev@adacore.com>
9922
9923 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Emit specific error
9924 messages depending on the offending misplaced aspect specifications.
9925 (Diagnose_Misplaced_Aspect_Specifications): New routine.
9926
99272014-02-19 Ed Schonberg <schonberg@adacore.com>
9928
9929 * sem_ch13.adb (Get_Cursor): Utility to retrieve cursor type
9930 for iterable aspect primitives.
9931 (Resolve_Iterable_Operation): Use expected signature of iterable
9932 aspect to resolve primitive when overloading is present.
9933 (Validate_Iterable_Aspect, Analyze_Aspects_At_Freeze_Point): use it.
9934 (Check_Signature): Removed.
9935
ddd2bec5
AC
99362014-02-19 Yannick Moy <moy@adacore.com>
9937
9938 * sem_ch10.adb (Analyze_Proper_Body): Issue error on missing
9939 subunit in GNATprove_Mode.
9940 * sinfo.ads (GNATprove_Mode): Document error issued in GNATprove_Mode.
9941
99422014-02-19 Hristian Kirtchev <kirtchev@adacore.com>
9943
9944 * lib-xref.ads Alphabetize the contents of table
9945 Xref_Entity_Letters. Add an entry in table Xref_Entity_Letters
9946 for E_Abstract_State. List all letters and symbols in use.
9947 * sem_prag.adb (Analyze_Abstract_State): Update all calls
9948 to Create_Abstract_State to reflect the new signature.
9949 (Create_Abstract_State): Change subprogram profile and update
9950 the comment on usage. Use the proper location of the state
9951 declaration when creating a new abstract state entity. Do not
9952 generate an external name, but simply reuse the name coming from
9953 the state declaration.
9954
3a845e07
RD
99552014-02-19 Robert Dewar <dewar@adacore.com>
9956
9957 * exp_ch4.adb (Expand_N_Expression_With_Actions): Make sure
9958 declarations get properly inserted in Modify_Tree_For_C mode.
9959 * sinfo.ads: Minor comment addition.
9960
82d4f390
RD
99612014-02-19 Robert Dewar <dewar@adacore.com>
9962
9963 * par-ch9.adb, exp_ch5.adb, sem_ch5.adb, exp_attr.adb, sem_util.adb,
9964 sem_util.ads, sem_ch13.adb, sem_ch13.ads: Minor reformatting.
9965
dd2bf554
ES
99662014-02-19 Ed Schonberg <schonberg@adacore.com>
9967
9968 * style.adb (Missing_Overriding): Warning does not apply in
9969 language versions prior to Ada 2005.
9970 * snames.ads-tmpl: Add Name_Iterable and Attribute_Iterable.
9971 * sem_attr.adb: Add Attribute_Iterable where needed.
9972 * exp_attr.adb: ditto.
9973 * exp_ch5.adb (Expand_Formal_Container_Loop): New procedure to
9974 handle loops and quantified expressions over types that have an
9975 iterable aspect. Called from Expand_Iterator_Loop.
9976 * sem_ch5.adb (Analyze_Iterator_Specification): Recognize types
9977 with Iterable aspect.
9978 * sem_ch13.adb (Validate_Iterable_Aspect): Verify that the
9979 subprograms specified in the Iterable aspect have the proper
9980 signature involving container and cursor.
9981 (Check_Aspect_At_Freeze_Point): Analyze value of iterable aspect.
9982 * sem_ch13.ads (Validate_Iterable_Aspect): New subprogram.
9983 * sem_util.ads, sem_util.adb (Get_Iterable_Type_Primitive):
9984 New procedure to retrieve one of the primitives First, Last,
9985 or Has_Element, from the value of the iterable aspect of a
9986 formal container.
9987 (Is_Container_Element): Predicate to recognize expressions
9988 that denote an element of one of the predefined containers,
9989 for possible optimization. This subprogram is not currently
9990 used, pending ARG discussions on the legality of the proposed
9991 optimization. Worth preserving for eventual use.
9992 (Is_Iterator): Recognize formal container types.
9993 * aspects.ads, aspects.adb: Add Aspect_Iterable where needed.
9994
e0f63680
AC
99952014-02-19 Robert Dewar <dewar@adacore.com>
9996
9997 * exp_attr.adb (Expand_Min_Max_Attribute): New procedure
9998 (Expand_N_Attribute_Reference): Use this procedure for Min and Max.
9999 * exp_ch4.adb (Expand_N_Expression_With_Actions): Remove object
10000 declarations from list of actions.
10001 * output.ads, output.adb (Delete_Last_Char): New procedure.
10002 * sinfo.ads: Document handling of Mod and expression with actions
10003 in Modify_Tree_For_C mode.
10004
100052014-02-19 Ed Schonberg <schonberg@adacore.com>
10006
10007 * par-ch9.adb (P_Task): Add a null statement to produce a
10008 well-formed task body when due to a previous syntax error the
10009 statement list is empty.
10010
100112014-02-19 Hristian Kirtchev <kirtchev@adacore.com>
10012
10013 * sem_prag.adb (Check_Dependency_Clause): Account
10014 for the case where a state with a non-null refinement matches a
10015 null output list. Comment reformatting.
10016 (Inputs_Match): Copy a solitary input to avoid an assertion failure
10017 when trying to match the same input in multiple clauses.
10018
100192014-02-19 Gary Dismukes <dismukes@adacore.com>
10020
10021 * sem_attr.adb: Minor typo fix.
10022
2c9f8c0a
AC
100232014-02-18 Robert Dewar <dewar@adacore.com>
10024
10025 * cstand.adb (Build_Signed_Integer_Type): Minor change of formal
10026 from Int to Nat (Build_Unsigned_Integer_Type): New procedure
10027 (Create_Standard): Create new unsigned types.
10028 * exp_ch4.adb (Expand_N_Op_Mod): Expand mod in Modify_Tree_For_C
10029 mode (Expand_N_Reference): Removed, problematic and not needed
10030 for now.
10031 * exp_ch4.ads (Expand_N_Reference): Removed, problematic and
10032 not needed for now.
10033 * exp_util.ads, exp_util.adb (Power_Of_Two): New function.
10034 * expander.adb: Remove call to Expand_N_Reference (problematic,
10035 and not needed now).
10036 * sem_aux.ads, sem_aux.adb (Corresponding_Unsigned_Type): New function.
10037 * stand.adb: Read and write unsigned type entities.
10038 * stand.ads: Add new unsigned types.
10039
100402014-02-18 Hristian Kirtchev <kirtchev@adacore.com>
10041
10042 * sem_ch4.adb (Analyze_Call): Do not mark a function call
10043 as being inside an assertion expression as the flag is now removed.
10044 (Check_Ghost_Subprogram_Call): Do not query the
10045 In_Assertion_Expression flag as it is now removed, instead use
10046 a predicate function.
10047 * sem_elab.adb (Check_Internal_Call_Continue): Do not query the
10048 In_Assertion_Expression flag as it is now removed, instead use
10049 a predicate function.
10050 * sem_prag.ads: Add new table Assertion_Expression_Pragma.
10051 * sem_util.adb Add with and use clause for Sem_Prag.
10052 (In_Assertion_Expression_Pragma): New routine.
10053 * sem_util.ads (In_Assertion_Expression_Pragma): New routine.
10054 * sinfo.adb (In_Assertion_Expression): Removed.
10055 (Set_In_Assertion_Expression): Removed.
10056 * sinfo.ads Remove flag In_Assertion_Expression along with its
10057 use in nodes.
10058 (In_Assertion_Expression): Removed along with
10059 pragma Inline. (Set_In_Assertion_Expression): Removed along
10060 with pragma Inline.
10061
100622014-02-18 Sergey Rybin <rybin@adacore.com frybin>
10063
10064 * gnat_ugn.texi: gnatpp section: add note that '-j' cannot be
10065 used together with '-r', '-rf' or '-rnb' options.
10066
100672014-02-18 Hristian Kirtchev <kirtchev@adacore.com>
10068
10069 * sem_attr.adb (Analyze_Attribute): Comment
10070 and code reformatting. Use separate routines to check the
10071 legality of attribute 'Old in certain pragmas. Verify
10072 the use of 'Old, 'Result and locally declared entities
10073 within the prefix of 'Old.
10074 (Check_References_In_Prefix): New routine.
10075 (Check_Use_In_Contract_Cases): New routine.
10076 (Check_Use_In_Test_Case): New routine.
10077
3b821fe9
VC
100782014-02-18 Vincent Celier <celier@adacore.com>
10079
10080 * sem_aux.adb (Is_By_Reference_Type): For each components of
10081 a record type, check also if the component is volatile as it
10082 may have an aspect that makes it volatile. If it is, then the
10083 record type is a by reference type.
10084
365c8496
RD
100852014-02-18 Robert Dewar <dewar@adacore.com>
10086
10087 * exp_attr.adb: Minor reformatting.
10088 * exp_ch4.ads, exp_ch4.adb (Expand_N_Reference): New procedure.
10089 * exp_util.adb (Remove_Side_Effects): Add conditional expressions
10090 as another case where we don't generate N_Reference nodes for
10091 primitive types.
10092 * expander.adb (Expand): Add call to Expand_N_Reference.
10093
aa9b151a
AC
100942014-02-06 Hristian Kirtchev <kirtchev@adacore.com>
10095
10096 * sem_prag.adb (Analyze_Refined_Pragma): Remove
10097 local variable Pack_Spec. Refinement pragmas may now apply to
10098 bodies of both visible and private subprograms.
10099
101002014-02-06 Robert Dewar <dewar@adacore.com>
10101
10102 * exp_attr.adb (Expand_Loop_Entry_Attribute):
10103 Minor change (Attr => N) (Expand_Pred_Succ): New name
10104 Expand_Pred_Succ_Attribute (Expand_N_Attribute_Reference, case
10105 Max): Expand into if expression if Modify_Tree_For_C mode.
10106 (Expand_N_Attribute_Reference, case Min): ditto
10107 * sinfo.ads: Modify_Tree_For_C takes care of expanding Min and
10108 Max attributes.
10109
101102014-02-06 Ed Schonberg <schonberg@adacore.com>
10111
10112 * sem_ch3.adb (Analyze_Object_Declaration): Do not generate
10113 predicate check if this is an internal declaration with
10114 No_Initialization set, as for an expanded aggregate component.
10115
101162014-02-06 Doug Rupp <rupp@adacore.com>
10117
10118 * init.c (__gnat_default_resignal_p) [VMS]: Test for and resignal
10119 conditions with severity of "SUCCESS" or "INFORMATIONAL".
10120
85d6bf87
AC
101212014-02-06 Yannick Moy <moy@adacore.com>
10122
10123 * sem_prag.adb (Analyze_Pragma): Analyze pragma
10124 Debug rewritten node before rewriting it as a null statement in
10125 GNATprove mode.
10126
101272014-02-06 Robert Dewar <dewar@adacore.com>
10128
10129 * sem_attr.adb (Min_Max): New procedure.
10130 (Max_Alignment_For_Allocation_Max_Size_In_Storage_Elements): New
10131 procedure.
10132
c3b266d6
AC
101332014-02-06 Sergey Rybin <rybin@adacore.com frybin>
10134
10135 * gnat_ugn.texi, vms_data.ads: Add documentation of '-t' option for
10136 gnatmetric/gnatpp.
10137
101382014-02-06 Hristian Kirtchev <kirtchev@adacore.com>
10139
10140 * sem_prag.adb (Analyze_Abstract_State): Update
10141 all calls to Create_Abstract_State to pass the proper state
10142 "declaration".
10143 (Create_Abstract_State): Add new formal parameter
10144 State_Decl along with comment on usage. Establish a link between
10145 the abstract state entity and the state declaration.
10146
428684fd
RD
101472014-02-06 Robert Dewar <dewar@adacore.com>
10148
10149 * sem_attr.adb (Analyze_Attribute, case Max): Check for improper
10150 comparison of unordered enumeration type.
10151 (Analyze_Attribute, case Max): Check for improper comparison of
10152 unordered enumeration type.
10153 * sem_res.adb (Bad_Unordered_Enumeration_Reference): Moved to
10154 sem_util.adb.
10155 * sem_util.ads, sem_util.adb (Bad_Unordered_Enumeration_Reference):
10156 Moved here from Sem_Res.
10157
8c35b40a
AC
101582014-02-06 Robert Dewar <dewar@adacore.com>
10159
10160 * sem_ch3.adb, sem_prag.adb, sem_res.adb, lib-xref.adb: Minor
10161 reformatting.
10162
101632014-02-06 Hristian Kirtchev <kirtchev@adacore.com>
10164
10165 * sem_ch6.adb (Process_Formals): Error message reformatting.
10166
79b49b87
HK
101672014-02-06 Hristian Kirtchev <kirtchev@adacore.com>
10168
10169 * sem_ch3.adb (Handle_Late_Controlled_Primitive): Add local
10170 variable Spec. Do not inherit the null indicator from the
10171 subprogram body when generating the spec.
10172
4446a13f
AC
101732014-02-06 Robert Dewar <dewar@adacore.com>
10174
10175 * casing.adb (Determine_Casing): Consider SPARK_Mode to be
10176 mixed case.
10177
101782014-02-06 Ed Schonberg <schonberg@adacore.com>
10179
10180 * exp_ch6.adb (Is_Build_In_Place_Function): Predicate is false
10181 when the function has a foreign convention, but not if only the
10182 limited return type has such a convention.
10183
101842014-02-06 Hristian Kirtchev <kirtchev@adacore.com>
10185
10186 * sem_ch3.adb (Handle_Late_Controlled_Primitive): Remove local
10187 variable Spec. Comment reformatting. Use Copy_Separate_Tree
10188 rather than New_Copy_Tree when building the corresponding
10189 subprogram declaration.
10190
101912014-02-06 Hristian Kirtchev <kirtchev@adacore.com>
10192
10193 * sem_prag.adb (Analyze_Global_Item): Remove
10194 the mode-related checks on abstract states with enabled external
10195 properties.
10196 (Property_Error): Removed.
10197
101982014-02-06 Javier Miranda <miranda@adacore.com>
10199
10200 * lib-xref.adb (Generate_Reference): When
10201 generating the reference to the first private entity take care
10202 of handling swapped entities.
10203
e09a5598
AC
102042014-02-06 Sergey Rybin <rybin@adacore.com frybin>
10205
10206 * gnat_ugn.texi, vms_data.ads: Add documentation of -j option for
10207 gnatmetric.
10208
102092014-02-06 Robert Dewar <dewar@adacore.com>
10210
10211 * exp_ch4.adb (Expand_N_Shift_Left): Handle shift counts greater
10212 than the word size when operating in Modify_Tree_For_C mode.
10213 * sinfo.ads: Add documentation section on Modify_Tree_For_C mode.
10214
102152014-02-06 Robert Dewar <dewar@adacore.com>
10216
10217 * erroutc.adb (Warning_Specifically_Suppressed.Matches):
10218 compare is case insensitive.
10219 * gnat_rm.texi: Document that string compare for Warnings Off
10220 is now case insensitive.
10221
5216b599
AC
102222014-02-06 Eric Botcazou <ebotcazou@adacore.com>
10223
10224 * gnat_rm.texi: Small wording tweak.
10225
102262014-02-06 Pascal Obry <obry@adacore.com>
10227
10228 * prj-attr.adb, projects.texi, snames.ads-tmpl: Add Included_Patterns
10229 and Included_Artifact_Patterns attribute definitions.
10230
102312014-02-06 Yannick Moy <moy@adacore.com>
10232
10233 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Set
10234 SPARK_Mode pragma component for all subprograms, including stubs.
10235
102362014-02-06 Hristian Kirtchev <kirtchev@adacore.com>
10237
10238 * sem_ch10.adb (Analyze_Package_Body_Stub): Maintain
10239 the configuration options of the enclosing context in a
10240 stack-like fasion.
10241 (Analyze_Subprogram_Body_Stub): Maintain the
10242 configuration options of the enclosing context in a stack-like
10243 fashion.
10244
102452014-02-06 Robert Dewar <dewar@adacore.com>
10246
10247 * debug.adb: -gnatd.u sets Modify_Tree_For C
10248 * exp_ch4.adb (Expand_N_Op_Rotate_Left): Expand out
10249 if Modify_Tree_For_C (Expand_N_Op_Rotate_Right): ditto.
10250 (Expand_N_Op_Arithmetic_Right_Shift): ditto.
10251 * exp_intr.adb (Expand_Shift): Call expander so we do
10252 Modify_Tree_For_C expansions.
10253 * gnat1drv.adb (Adjust_Global_Switches): Set Modify_Tree_For_C
10254 if -gnatd.u set.
10255
102562014-02-06 Fedor Rybin <frybin@adacore.com>
10257
10258 * prj-proc.ads (Tree_Loaded_Callback): new type Callback used
10259 after the phase 1 of the processing of each aggregated project
10260 to get access to project trees of aggregated projects.
10261 (Process_Project_Tree_Phase_1): new parameter On_New_Tree_Loaded
10262 If specified, On_New_Tree_Loaded is called after each aggregated
10263 project has been processed succesfully.
10264 (Process): new parameter On_New_Tree_Loaded.
10265 * prj-proc.adb (Process_Aggregated_Projects): On_New_Tree_Loaded
10266 callback added after processing of each aggregated project.
10267 (Recursive_Process): new parameter On_New_Tree_Loaded.
10268 (Process): new parameter On_New_Tree_Loaded.
10269 (Process_Project_Tree_Phase_1): new parameter On_New_Tree_Loaded.
10270 * prj-conf.ads (Parse_Project_And_Apply_Config): new parameter
10271 On_New_Tree_Loaded.
10272 * prj-conf.adb (Parse_Project_And_Apply_Config): new parameter
10273 On_New_Tree_Loaded.
10274
102752014-02-06 Bob Duff <duff@adacore.com>
10276
10277 * gnat_ugn.texi: Implement --insert-blank-lines and
10278 --preserve-blank-lines switches.
10279
8c7ff9a0
AC
102802014-02-06 Sergey Rybin <rybin@adacore.com frybin>
10281
10282 * gnat_ugn.texi, vms_data.ads: Add documentation of -j option for
10283 gnatelim.
10284
102852014-02-06 Eric Botcazou <ebotcazou@adacore.com>
10286
10287 * gnat_rm.texi (Pragma Optimize_Alignment): Document the effect
10288 of the pragma on individual objects.
10289
102902014-02-06 Hristian Kirtchev <kirtchev@adacore.com>
10291
10292 * einfo.adb Node29 is now used as BIP_Initialization_Call.
10293 (BIP_Initialization_Call): New routine.
10294 (Set_BIP_Initialization_Call): New routine.
10295 (Write_Field29_Name): Add an entry for constants and variables.
10296 * einfo.ads Add new attribute BIP_Initialization_Call and update
10297 its usage in nodes.
10298 (BIP_Initialization_Call): New routine along with pragma Inline.
10299 (Set_BIP_Initialization_Call): New routine along with pragma Inline.
10300 * exp_ch6.adb (Make_Build_In_Place_Call_In_Object_Declaration):
10301 Add local declaration Res_Decl. Capture the build-in-place
10302 initialization call when the related object declaration has
10303 created a transient block.
10304 * exp_ch7.adb (Process_Transient_Objects): Add local variable
10305 Fin_Insrt. Recognize a scenario where an object declaration acts
10306 as a transient context and is initialized by a build-in-place
10307 function call.
10308
a0367a97
AC
103092014-02-06 Pascal Obry <obry@adacore.com>
10310
10311 * prj-util.adb (For_Interface_Sources): Fix handling of required
10312 bodies for aggregate libs.
10313
103142014-02-06 Robert Dewar <dewar@adacore.com>
10315
10316 * nlists.ads: Minor comment clarifications.
10317
103182014-02-06 Robert Dewar <dewar@adacore.com>
10319
10320 * gnat1drv.adb (Adjust_Global_Switches): Set Modify_Tree_For_C
10321 if gnatd.V set.
10322 * opt.ads (Modify_Tree_For_C): New flag.
10323 * output.ads, output.adb (Last_Char): New function.
10324
103252014-02-06 Pascal Obry <obry@adacore.com>
10326
10327 * projects.texi, prj-env.adb (Initialize_Default_Project_Path): Add
10328 share/gpr for cross-builds.
10329
155b4fcc
RD
103302014-02-06 Robert Dewar <dewar@adacore.com>
10331
10332 * exp_util.ads, checks.adb, sem_prag.adb, prj-util.adb, sem_ch13.adb:
10333 Minor reformatting and code clean ups.
10334
49d8d177
PO
103352014-02-06 Pascal Obry <obry@adacore.com>
10336
10337 * prj-util.adb (For_Interface_Sources): Skip non compilable languages.
10338 * prj.ads: Minor typo fix in comment.
10339
8e1e62e3
AC
103402014-02-06 Hristian Kirtchev <kirtchev@adacore.com>
10341
10342 * sem_prag.adb (Analyze_Depends_In_Decl_Part): Add
10343 local variable Expr. Flag clauses with extra parenthesis as this
10344 is not allowed by the syntax of the pragma. Code reformatting.
10345
103462014-02-06 Hristian Kirtchev <kirtchev@adacore.com>
10347
10348 * exp_attr.adb (Expand_N_Attribute_Reference): Alphabetize
10349 variables. Rename variabme Tnn to Temp. Do not create a temporary
10350 if assertions are disabled. Find enclosing routine _Postconditions
10351 and insert the temporary that captures the value of the prefix
10352 before the routine.
10353 * exp_ch6.adb (Build_Postconditions_Procedure):
10354 Insert the generated _Postconditions routine
10355 before the first source declaration of the related
10356 subprogram.
10357 (Insert_After_Last_Declaration): Removed.
10358 (Insert_Before_First_Source_Declaration): New routine.
10359
103602014-02-06 Ed Schonberg <schonberg@adacore.com>
10361
10362 * exp_util.adb, exp_util.ads (Within_Internal_Subprogram):
10363 Utility to determine whether current expansion is for the body
10364 of a predefined primitive operation.
10365 (Make_Predicate_Check): Use Within_Internal_Subpgram
10366 * checks.adb (Apply_Predicate_Check): Use
10367 Within_Internal_Subprogram
10368 * sem_ch13.adb (Freeze_Entity_Checks): Ditto.
10369
103702014-02-06 Pascal Obry <obry@adacore.com>
10371
10372 * prj.ads, prj-util.adb: Minor reformatting.
10373
cbee4f74
AC
103742014-02-06 Ed Schonberg <schonberg@adacore.com>
10375
10376 * exp_ch6.adb (Expand_Subprogram_Contract, Append_Enabled_Item):
10377 Take into account the Split_PPC flag to ensure that conjuncts
10378 in a composite postcondition aspect are tested in source order.
10379
103802014-02-06 Hristian Kirtchev <kirtchev@adacore.com>
10381
10382 * sem_ch6.adb (Analyze_Generic_Subprogram_Body): Flag illegal
10383 use of SPARK_Mode.
10384 * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration): Flag
10385 illegal use of SPARK_Mode.
10386 (Instantiate_Subprogram_Body): Flag illegal use of SPARK_Mode.
10387 * sem_prag.adb (Analyze_Pragma): Code reformatting.
10388 * sem_util.adb Add with and use clause for Aspects.
10389 (Check_SPARK_Mode_In_Generic): New routine.
10390 * sem_util.ads (Check_SPARK_Mode_In_Generic): New routine.
10391
103922014-02-06 Thomas Quinot <quinot@adacore.com>
10393
10394 * a-calend.adb (Formatting_Operations.Split): Ensure that
10395 Time_Error is raised for invalid time values.
10396
e2ef0ff6
AC
103972014-02-06 Arnaud Charlet <charlet@adacore.com>
10398
10399 * sem_prag.adb (Analyze_Pragma): Rewrite as a null statement
10400 in GNATprove_Mode.
10401
104022014-02-06 Robert Dewar <dewar@adacore.com>
10403
10404 * einfo.ads, einfo.adb (Is_Discriminant_Check_Function): New flag.
10405 * exp_ch3.adb (Build_Dcheck_Function): Set
10406 Is_Discriminant_Check_Function.
10407
104082014-02-06 Hristian Kirtchev <kirtchev@adacore.com>
10409
10410 * exp_ch7.adb (Is_Subprogram_Call): Inspect
10411 the original tree in certain cases where a construct has been
10412 factored out and replaced by a reference to a temporary.
10413
104142014-02-06 Ed Schonberg <schonberg@adacore.com>
10415
10416 * sem_ch3.adb (Process_Full_View): Fix typo in the order of
10417 parameters when propagating predicate function to full view.
10418 (Find_Type_Of_Object): Freeze base type of object type to catch
10419 premature use of discriminated private type without a full view.
10420
97779c34
AC
104212014-02-06 Robert Dewar <dewar@adacore.com>
10422
10423 * sprint.adb: Minor reformatting.
10424
104252014-02-06 Hristian Kirtchev <kirtchev@adacore.com>
10426
10427 * exp_ch4.adb (Process_Transient_Object): Add local variable
10428 Temp_Ins. When the transient object is initialized by an
10429 aggregate, the hook must capture the object after the last
10430 component assignment takes place.
10431 * exp_ch7.adb (Detect_Subprogram_Call): Expose the subprogram to
10432 routine Is_Subprogram_Call.
10433 (Is_Subprogram_Call): Inspect an
10434 aggregate that has been heavily expanded for subprogram calls.
10435 (Process_Transient_Objects): Add local variables Expr, Ptr_Id
10436 and Temp_Ins. Remove the nested declare block and adjust the
10437 indentation. When the transient object is initialized by an
10438 aggregate, the hook must capture the object after the last
10439 component assignment takes place.
10440
104412014-02-06 Hristian Kirtchev <kirtchev@adacore.com>
10442
10443 * sem_prag.adb (Analyze_Global_Item): Detect illegal uses of
10444 external states with enabled properties that do not match the
10445 global mode.
10446 (Property_Error): New routine.
10447 * sem_res.adb (Property_Error): New routine.
10448 (Resolve_Actuals): Detect illegal uses of external variables with
10449 enabled properties in procedure calls that do not match the mode of
10450 the corresponding formal parameter.
10451
104522014-02-06 Hristian Kirtchev <kirtchev@adacore.com>
10453
10454 * sem_util.adb (Has_Enabled_Property): Rename
10455 formal parameter Prop_Nam to Property. Update the comment on usage
10456 and all occurrences in the body. Add local variable Prop_Nam. When
10457 inspecting a property with an expression, the property name
10458 appears as the first choice of the component association.
10459
3e247e58
RD
104602014-02-04 Robert Dewar <dewar@adacore.com>
10461
10462 * exp_ch5.adb, einfo.ads, freeze.adb, sem_ch8.adb: Minor reformatting.
10463
2db5b47e
AC
104642014-02-04 Gary Dismukes <dismukes@adacore.com>
10465
10466 * sem_aggr.adb: Change "runtime" to "run time" in warning message,
10467 for consistency with other messages.
10468
104692014-02-04 Ed Schonberg <schonberg@adacore.com>
10470
10471 * exp_ch5.adb (Expand_Iterator_Loop): For a container element
10472 iterator, indicate that the element is a constant if the container
10473 type does not have a variable indexing aspect.
10474 * sem_ch8.adb (Analyze_Object_Renaming): If the entity is already
10475 marked as constant, do not reset its Ekind, to ensure that
10476 container elements in an element loop are not modified if the
10477 container (e.g. a hashed set) only has a constant indexing aspect.
10478
104792014-02-04 Arnaud Charlet <charlet@adacore.com>
10480
10481 * g-souinf.ads: Subprograms in this unit are actually not pure.
10482 * freeze.adb (Freeze_Subprogram): Do not reset Is_Pure for Intrinsics.
10483 * einfo.ads (Is_Pure): Update doc to match implementation.
10484
5a521b8a
AC
104852014-02-04 Gary Dismukes <dismukes@adacore.com>
10486
10487 * exp_ch13.adb: Minor spelling fix.
10488
104892014-02-04 Robert Dewar <dewar@adacore.com>
10490
10491 * opt.ads: Minor comment update.
10492
104932014-02-04 Robert Dewar <dewar@adacore.com>
10494
10495 * exp_ch4.adb (Expand_N_Expression_With_Actions): Use Rewrite
10496 instead of Replace.
10497
104982014-02-04 Ed Schonberg <schonberg@adacore.com>
10499
10500 * sem_aggr.adb (Resolve_Array_Aggregate): Suppress warnings
10501 on null expressions if component type is non-null, when the
10502 corresponding association covers an empty range of index values.
10503
81bd8c90
AC
105042014-02-04 Robert Dewar <dewar@adacore.com>
10505
10506 * sinfo.ads: Further comments on N_Expression_With_Actions node.
10507
105082014-02-04 Hristian Kirtchev <kirtchev@adacore.com>
10509
10510 * sem_prag.adb (Analyze_Refined_Depends_In_Decl_Part): Remove global
10511 variables Out_Items and Ref_Global. Remove local constant
10512 Body_Id along with dummy variables D1, D2, D3, D4, D5, D6, D7
10513 and D8. Remove the useless collection of global items as this
10514 was a leftover from an earlier version of the routine. Move
10515 several routines out to avoid deep nesting and indentation.
10516 (Inputs_Match): Add formal parameter Dep_Clause. Rename formal
10517 parameter Do_Checks to Post_Errors. Update the comment on usage.
10518 (Is_Matching_Input): Renamed to Input_Match. Add formal parameters
10519 Ref_Inputs and Do_Checks. Rename formal parameter Do_Checks
10520 to Post_Errors. Update the comment on usage. Account for the
10521 case where a self referential state may have a null input_list.
10522 (Is_Self_Referential): New routine.
10523
105242014-02-04 Ed Schonberg <schonberg@adacore.com>
10525
10526 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): If the
10527 entity renames an expression, as in the case of an object of
10528 an unconstrained type initialized by a function call, defer the
10529 rewriting of the expression to the expander.
10530 * exp_ch13.adb (Expand_N_Attribute_Definition_Clause, case
10531 'Alignment): If the entity renames an expression, introduce
10532 temporary to capture value, and rewrite original declaration to
10533 use temporary.
10534
ebdaa81b
AC
105352014-02-04 Gary Dismukes <dismukes@adacore.com>
10536
10537 * g-comlin.adb: Minor typo fix.
10538
105392014-02-04 Ed Schonberg <schonberg@adacore.com>
10540
10541 * freeze.adb (Freeze_All): Types derived from a formal
10542 access_to_classwide type do not have a finalization master.
10543
105442014-02-04 Robert Dewar <dewar@adacore.com>
10545
10546 * sprint.adb: Minor reformatting.
10547
105482014-02-04 Robert Dewar <dewar@adacore.com>
10549
10550 * exp_ch4.adb (Expand_N_Expression_With_Actions): Eliminate
10551 cases where Actions is a null list.
10552 * sinfo.ads (N_Expression_With_Actions): Actions can be
10553 temporarily empty during semantic analysis, but must be non-empty
10554 in the final expanded tree.
10555
d66f9f0b
AC
105562014-01-31 Robert Dewar <dewar@adacore.com>
10557
10558 * exp_ch9.adb: Minor reformatting.
10559
105602014-01-31 Emmanuel Briot <briot@adacore.com>
10561
10562 * g-comlin.adb (Set_Command_Line): Take the switches
10563 configuration from the Command_Line_Config.
10564
105652014-01-31 Hristian Kirtchev <kirtchev@adacore.com>
10566
10567 * sem_prag.adb (Analyze_Refinement_Clause): Guard against a malformed
10568 refinement clause.
10569
105702014-01-31 Vincent Celier <celier@adacore.com>
10571
10572 * projects.texi: Add more documentation about others used as an
10573 index in indexed attributes.
10574
f3920a13
AC
105752014-01-31 Robert Dewar <dewar@adacore.com>
10576
10577 * gnat_ugn.texi: Minor update.
10578 * gnat_rm.texi: Add example to Restriction_Warnings documentation.
10579 * exp_util.adb: Minor reformatting.
10580
105812014-01-31 Ed Schonberg <schonberg@adacore.com>
10582
10583 * exp_ch9.adb (Expand_Entry_Barrier): Warn if the barrier
10584 depends on data that is not private to the protected object,
10585 and potentially modifiable in unsynchronized fashion.
10586
31d922e3
AC
105872014-01-31 Yannick Moy <moy@adacore.com>
10588
10589 * erroutc.adb (Validate_Specific_Warnings): Remove special case for
10590 GNATprove_Mode.
10591
105922014-01-31 Robert Dewar <dewar@adacore.com>
10593
10594 * prj-attr.ads (First_Attribute_Of): Returns Empty_Attribute
10595 for Unknown_Package.
10596 * sem_ch6.adb, sem_attr.adb: Minor comment addition.
10597
105982014-01-31 Hristian Kirtchev <kirtchev@adacore.com>
10599
10600 * exp_util.adb (Build_Allocate_Deallocate_Proc): Rewrite
10601 the logic that generates a runtime check to determine the
10602 controlled status of the object about to be allocated or
10603 deallocated. Class-wide types now always use a runtime check
10604 even if they appear as generic actuals.
10605 (Find_Object): Detect
10606 a special case that involves interface class-wide types because
10607 the object appears as a complex expression.
10608
5b6f12c7
AC
106092014-01-31 Ed Schonberg <schonberg@adacore.com>
10610
10611 * sem_ch6.adb (Process_Formals): In Ada2012 mode, place
10612 subprogram with an incomplete untagged formals on the list of
10613 private dependents, to verify that the type is properly completed
10614 in the private part.
10615 * sem_attr.adb: Code clean up.
10616
106172014-01-31 Robert Dewar <dewar@adacore.com>
10618
10619 * exp_ch6.adb: Minor reformatting.
10620
106212014-01-31 Vincent Celier <celier@adacore.com>
10622
10623 * prj-attr.adb (First_Attribute_Of): Return Unknown_Attribute
10624 when Pkg is unknown.
10625
d950f051
AC
106262014-01-31 Hristian Kirtchev <kirtchev@adacore.com>
10627
10628 * sem_res.adb (Resolve_Entity_Name): Comment
10629 reformatting. Allow volatile objects in various generated checks.
10630
106312014-01-31 Ed Schonberg <schonberg@adacore.com>
10632
10633 * sem_attr.adb (Analyze_Attribute, case 'Update): For a record
10634 component association, set the etype of the identifier, for
10635 SPARK use.
10636
106372014-01-31 Ed Schonberg <schonberg@adacore.com>
10638
10639 * exp_ch6.adb (Has_Visibility_Of_Subprogram): If type is not
10640 declared in a package, not checks can apply to the subprogram.
10641
74c10109
AC
106422014-01-31 Robert Dewar <dewar@adacore.com>
10643
10644 * erroutc.adb (Validate_Specific_Warnings): Warnings are
10645 controlled -gnatw.W.
10646 * gnat_ugn.texi: Document new warnings controlled by -gnatw.w.
10647 * opt.ads (Warn_On_Warnings_Off): Now controls more cases.
10648
106492014-01-31 Arnaud Charlet <charlet@adacore.com>
10650
10651 * exp_disp.adb: Update comments.
10652
106532014-01-31 Yannick Moy <moy@adacore.com>
10654
10655 * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration,
10656 Save_Global_References): Guard access to expression in aspect.
10657
106582014-01-31 Yannick Moy <moy@adacore.com>
10659
10660 * sem_prag.adb (Analyze_Pragma/Pragma_SPARK_Mode):
10661 Issue an error when the pragma is applied to a generic unit,
10662 a generic declaration, or inside a generic.
10663
106642014-01-31 Yannick Moy <moy@adacore.com>
10665
10666 * sem_ch8.adb (Analyze_Subprogram_Renaming): Set SPARK_Mode on renaming
10667 entity.
10668
bdfb8ec4
AC
106692014-01-31 Robert Dewar <dewar@adacore.com>
10670
10671 * exp_ch9.adb, s-tassta.adb, s-tposen.adb, s-tposen.ads: Minor
10672 reformatting.
10673
106742014-01-31 Tristan Gingold <gingold@adacore.com>
10675
10676 * exp_disp.adb: Add a historic note.
10677
106782014-01-31 Robert Dewar <dewar@adacore.com>
10679
10680 * sem_warn.adb (Warn_On_Useless_Assignments): Add call to
10681 Process_Deferred_References.
10682
106832014-01-31 Yannick Moy <moy@adacore.com>
10684
10685 * erroutc.adb (Validate_Specific_Warnings): Do not issue a message for
10686 ineffective pragma Warnings(Off) in GNATprove_Mode.
10687
5b0e6852
BD
106882014-01-31 Bob Duff <duff@adacore.com>
10689
10690 * s-taskin.ads: Minor comment fix.
10691 * s-tassta.adb (Abort_Dependents): Don't abort all dependents;
10692 just direct dependents. If this is actually an abort, each task
10693 will take care of aborting its dependents, so all dependents will
10694 get aborted, as before. However, when this is called the second
10695 time from Vulnerable_Complete_Master "for convenience" (i.e. to
10696 kill off tasks waiting at terminate alternatives), aborting
10697 indirect dependents is wrong, because it causes some unrelated
10698 tasks to get aborted.
10699
a54ffd6c
AC
107002014-01-31 Robert Dewar <dewar@adacore.com>
10701
10702 * sem_ch4.adb: Minor reformatting.
10703
107042014-01-31 Robert Dewar <dewar@adacore.com>
10705
10706 * exp_ch2.adb: New calling sequence for Is_LHS.
10707 * frontend.adb: Add call to Process_Deferred_References.
10708 * lib-xref.ads, lib-xref.adb (Process_Deferred_References): New.
10709 (Deferred_References): New table.
10710 * sem_ch8.adb (Find_Direct_Name): Make deferred reference table
10711 entries.
10712 (Find_Expanded_Name): Ditto.
10713 * sem_res.adb: New calling sequence for Is_LHS.
10714 * sem_util.ads, sem_util.adb (Is_LHS): New calling sequence.
10715 * sem_warn.adb: Call Process_Deferred_References before issuing
10716 warnings.
10717
107182014-01-31 Tristan Gingold <gingold@adacore.com>
10719
10720 * exp_util.adb (Corresponding_Runtime_Package): Restrict the
10721 use of System_Tasking_Protected_Objects_Single_Entry.
10722 * exp_ch9.adb (Build_Simple_Entry_Call): Remove Mode parameter
10723 of Protected_Single_Entry_Call.
10724 (Expand_N_Timed_Entry_Call): Remove single_entry case.
10725 * exp_disp.adb (Make_Disp_Asynchronous_Select_Body): Remove
10726 single_entry case.
10727 (Make_Disp_Timed_Select_Body): Likewise.
10728 * rtsfind.ads (RE_Timed_Protected_Single_Entry_Call): Remove.
10729 * s-tposen.adb (Send_Program_Error, PO_Do_Or_Queue): Remove
10730 Self_Id parameter.
10731 (Wakeup_Entry_Caller): Remove Self_ID and New_State parameters.
10732 (Wait_For_Completion_With_Timeout): Remove.
10733 (Protected_Single_Entry_Call): Remove Mode parameter
10734 (always Simple_Call).
10735 (Service_Entry): Remove Self_Id constant (not used anymore).
10736 (Timed_Protected_Single_Entry_Call): Remove.
10737 * s-tposen.ads (Timed_Protected_Single_Entry_Call): Remove.
10738 (Protected_Single_Entry_Call): Remove Mode parameter.
10739
4f7c83ca
AC
107402014-01-29 Hristian Kirtchev <kirtchev@adacore.com>
10741
10742 * einfo.adb (Get_Pragma): Handle the retrieval of pragma Refined_Post.
10743 * einfo.ads (Get_Pragma): Update the comment on special pragmas
10744 handled by this routine.
10745 * sem_prag.adb (Analyze_Pragma): Add a legal pragma Refined_Post
10746 to the contract of the related subprogram body.
10747 * sem_util.adb (Add_Contract_Item): Handle the insertion of
10748 pragma Refined_Post into the contract of a subprogram body.
10749 * sinfo.ads Update the documentation of node N_Contract.
10750 * sem_res.adb (Resolve_Entity_Name): Add a guard
10751 to detect abstract states and variables only when checking the
10752 SPARK 2014 rules concerning volatile object placement.
10753
107542014-01-29 Ed Schonberg <schonberg@adacore.com>
10755
10756 * sem_ch4.adb (Find_Equality_Types, Try_One_Interp): within an instance,
10757 null is compatible with any access type.
10758
385e1a99
HK
107592014-01-29 Hristian Kirtchev <kirtchev@adacore.com>
10760
10761 * sem_util.adb (Find_Placement_In_State_Space): Assume that the default
10762 placement is not in a package.
10763
159a5104
AC
107642014-01-29 Hristian Kirtchev <kirtchev@adacore.com>
10765
10766 * sem_util.adb (Has_Enabled_Property): Compare the character field of
10767 the sole property.
10768
107692014-01-29 Robert Dewar <dewar@adacore.com>
10770
10771 * sem_intr.adb, a-ztexio.ads, sinfo.ads, sem_res.adb, gnatlink.adb,
10772 vms_conv.adb, a-except.ads, a-except-2005.ads, a-teioed.adb,
10773 sem_warn.ads, treepr.ads, erroutc.ads, a-excach.adb: Minor reformatting.
10774
87e9b935
RD
107752014-01-29 Robert Dewar <dewar@adacore.com>
10776
10777 * sem_util.ads, sem_util.adb (In_Pragma_Expression): New function.
10778 * sem_warn.adb (Check_References): Suppress warnings if inside
10779 Initial_Condition pragma.
10780
98b5d298
HK
107812014-01-29 Hristian Kirtchev <kirtchev@adacore.com>
10782
10783 * sem_prag.adb (Check_Missing_Part_Of): List all values of
10784 State_Space_Kind for readability reasons. Do not emit an error on
10785 a private item when the enclosing package lacks aspect/pragma
10786 Abstract_State. Do not emit an error on a private package
10787 instantiation when the corresponding generic template lacks
10788 visible state.
10789 (Has_Visible_State): New routine.
10790 * sem_util.adb (Find_Placement_In_State_Space): The visible
10791 declarations of any kind of child units in general act as proper
10792 placement location.
10793
a90bd866
RD
107942014-01-29 Robert Dewar <dewar@adacore.com>
10795
10796 * a-except-2005.adb, a-except.adb, a-excpol-abort.adb, a-exstat.adb,
10797 ali.adb, a-numaux.ads, a-numaux-darwin.ads, a-numaux-libc-x86.ads,
10798 a-numaux-vms.ads, a-numaux-vxworks.ads, a-numaux-x86.ads, aspects.ads,
10799 a-taside.adb, a-teioed.adb, a-textio.adb, a-textio.ads, atree.adb,
10800 atree.ads, a-witeio.adb, a-witeio.ads, a-wtedit.adb, a-ztedit.adb,
10801 a-ztexio.adb, bcheck.adb, binde.adb, checks.adb, comperr.adb,
10802 cstand.adb, debug_a.adb, einfo.ads, errout.adb, erroutc.adb,
10803 eval_fat.adb, exp_aggr.adb, exp_attr.adb, exp_ch11.adb, exp_ch3.adb,
10804 exp_ch4.adb, exp_ch5.adb, exp_ch6.adb, exp_ch9.adb, exp_dbug.adb,
10805 exp_disp.adb, exp_fixd.adb, exp_imgv.adb, exp_intr.adb, exp_util.adb,
10806 freeze.adb, frontend.adb, g-comlin.ads, g-mbdira.adb, gnat1drv.adb,
10807 gprep.adb, g-spipat.adb, i-cpp.ads, i-vxwork.ads, i-vxwork-x86.ads,
10808 krunch.ads, layout.adb, lib-load.adb, lib-writ.adb, lib-writ.ads,
10809 live.adb, namet.ads, osint.adb, osint-c.adb, output.ads, par.adb,
10810 par-ch10.adb, par-ch13.adb, par-ch3.adb, par-ch4.adb, par-ch5.adb,
10811 par-ch6.adb, par-ch9.adb, par-endh.adb, par-labl.adb, par-prag.adb,
10812 par-sync.adb, par-tchk.adb, par-util.adb, prj.adb, repinfo.adb,
10813 rtsfind.adb, s-arit64.adb, s-asthan-vms-alpha.adb,
10814 s-asthan-vms-ia64.adb, s-bignum.adb, scans.adb, scng.adb, s-dimmks.ads,
10815 sem_aggr.adb, sem_attr.adb, sem_aux.adb, sem_cat.adb, sem_ch10.adb,
10816 sem_ch12.adb, sem_ch13.adb, sem_ch13.ads, sem_ch3.adb, sem_ch4.adb,
10817 sem_ch5.adb, sem_ch6.adb, sem_ch8.adb, sem_disp.adb, sem_elab.adb,
10818 sem_elim.adb, sem_eval.adb, sem_intr.adb, sem_prag.adb, sem_res.adb,
10819 sem_type.adb, sem_util.adb, sem_warn.adb, set_targ.adb, s-fatgen.adb,
10820 s-fatgen.ads, s-fileio.adb, s-imgcha.adb, s-imgrea.adb, sinfo.ads,
10821 sinput-c.adb, snames.ads-tmpl, s-os_lib.adb, sprint.adb,
10822 s-regpat.adb, s-secsta.adb, s-stalib.ads,
10823 s-stchop.adb, s-stoele.ads, stand.ads, s-taprop-solaris.adb,
10824 s-tasdeb-vms.adb, s-tasini.adb, s-tassta.adb, s-valdec.adb,
10825 s-valuti.adb, s-wchjis.adb, s-wchwts.adb, system.ads, system-vms_64.ads,
10826 system-vms-ia64.ads, treepr.adb, types.ads, uintp.adb, uname.adb,
10827 urealp.adb, usage.adb, vxaddr2line.adb: Minor reformatting.
10828
0d66cee5
AC
108292014-01-29 Robert Dewar <dewar@adacore.com>
10830
10831 * expander.adb: Minor reformatting.
10832
108332014-01-29 Javier Miranda <miranda@adacore.com>
10834
10835 * exp_ch3.adb (Predefined_Primitive_Bodies): Adding documentation to
10836 previous patch.
10837
b7cb4a61
AC
108382014-01-29 Javier Miranda <miranda@adacore.com>
10839
10840 * exp_ch3.adb (Predefined_Primitive_Bodies): Complete the code
10841 that checks if an interface types defines the predefined "="
10842 function because the compiler was erroneously not generating the
10843 predefined "=" primitive as soon as the name of some interface
10844 primitive is "=" (formals were not checked).
10845
108462014-01-29 Ed Schonberg <schonberg@adacore.com>
10847
10848 * expander.adb (Expander): In GNATprove mode, do not process
10849 transient scopes: they are in general not created in this mode,
10850 and an attempt to examine them will lead to constraint errors when
10851 processing configuration pragmas that have analyzable expressions.
10852
35d4d899
VC
108532014-01-29 Vincent Celier <celier@adacore.com>
10854
10855 * clean.adb (Gnatclean): Fail if main project is an aggregate
10856 project or if there is an aggregate library project in the
10857 project tree.
10858 * gnatcmd.adb: Fail if the main project is an aggregate project
10859 or if there is an aggegate library project in the project tree.
10860 * make.adb (Initialize): : Fail if main project is an aggregate
10861 project or if there is an aggregate library project in the
10862 project tree.
10863 * makeutl.ads (Aggregate_Libraries_In): New Boolean function.
10864 * prj-makr.adb (Initialize): Fail if the main project is an
10865 aggregate project or an aggregate library project.
10866
88de755d
VC
108672014-01-29 Vincent Celier <celier@adacore.com>
10868
10869 * prj-part.adb (Check_Import_Aggregate): New procedure
10870 to check if an imported project is an aggregate project.
10871 (Parse_Single_Project): Call Check_Import_Aggregate
10872 * projects.texi: Document that aggregate projects cannot be
10873 extended or imported.
10874
d0e69402
RD
108752014-01-29 Robert Dewar <dewar@adacore.com>
10876
10877 * exp_ch9.adb, sem_ch7.ads, s-regexp.adb, sem_ch13.adb: Minor
10878 reformatting and code clean up.
10879 * gnat_ugn.texi: Add documentation section on Atomic Variables
10880 and Optimization.
10881
5627964c
AC
108822014-01-29 Hristian Kirtchev <kirtchev@adacore.com>
10883
10884 * einfo.adb Flag264 is now unused.
10885 (Has_Body_References): Removed.
10886 (Set_Has_Body_References): Removed.
10887 (Write_Entity_Flags): Remove the output for flag Has_Body_References.
10888 * einfo.ads Update the comment on usage of attribute
10889 Body_References. Remove attribute Has_Body_References and its
10890 usage in nodes.
10891 (Has_Body_References): Removed along with pragma Inline.
10892 (Set_Has_Body_References): Removed along with pragma Inline.
10893 * sem_prag.adb (Analyze_Global_Item): Move the call to
10894 Record_Possible_Body_Reference in the state related checks
10895 section. Add a comment intended function.
10896 (Analyze_Input_Output): Move the call to Record_Possible_Body_Reference
10897 in the state related checks section. Add a comment intended function.
10898 (Analyze_Refinement_Clause): Cleanup the illegal body reference
10899 reporting. Add a comment on timing of error reporting.
10900 (Record_Possible_Body_Reference): Reimplement the routine.
10901
109022014-01-29 Vincent Celier <celier@adacore.com>
10903
10904 * makeutl.adb (Mains.Find_File_Add_Extension): Only look for specs for
10905 unit-based languages.
10906 (Mains.Complete_Mains.Do_Complete): Use the source file project
10907 tree when calling Find_File_Add_Extension. Use the correct
10908 project name when reporting an error.
10909
d7af5ea5
HK
109102014-01-29 Hristian Kirtchev <kirtchev@adacore.com>
10911
10912 * aspects.adb Add an entry for aspect Part_Of in table
10913 Canonical_Aspect.
10914 * aspects.ads Add an entry for aspect Part_Of in tables Aspect_Id,
10915 Aspect_Argument, Aspect_Names and Aspect_Delay.
10916 * atree.h Define Elist9.
10917 * atree.adb (Elist9): New routine.
10918 (Set_Elist9): New routine.
10919 * atree.ads (Elist9): New routine.
10920 (Set_Elist9): New routine.
10921 * einfo.adb Add Part_Of_Constituents and Encapsulating_State to
10922 the list of node usage. Remove Refined_State from the list of
10923 node usage.
10924 (Encapsulating_State): New routine.
10925 (Get_Pragma):
10926 Handle pragma Part_Of; (Part_Of_Constituents): New routine.
10927 (Refined_State): Removed.
10928 (Set_Encapsulating_State): New routine.
10929 (Set_Part_Of_Constituents): New routine.
10930 (Set_Refined_State): Removed.
10931 (Write_Field9_Name): Add an entry
10932 for Part_Of_Constituents (Write_Field10_Name): Add an entry for
10933 Encapsulating_State. Remove the entry for Refined_State.
10934 * einfo.ads Add new attributes Encapsulating_State
10935 and Part_Of_Constituents alond with their usage in
10936 entities. Remove attribute Refined_State along with its
10937 usage in entities.
10938 (Encapsulating_State): New routine and
10939 pragma Inline. (Get_Pragma): Update the comment on usage.
10940 (Part_Of_Constituents): New routine and pragma Inline.
10941 (Refined_State): Removed along with pragma Inline.
10942 (Set_Encapsulating_State): New routine and pragma Inline.
10943 (Set_Part_Of_Constituents): New routine and pragma Inline.
10944 (Set_Refined_State): Removed along with pragma Inline.
10945 * par-prag.adb Pragma Part_Of does not need any special processing
10946 by the parser.
10947 * sem_ch3.adb (Analyze_Declarations): Remove local variables
10948 Body_Id and Prag. Call separate routines to analyze the
10949 contract of a package [body].
10950 (Analyze_Object_Contract):
10951 Update the comment on usage. Remove local variables
10952 Items and Nam. Use Get_Pragma rather than traversing the
10953 classification list. Verify whether the lack of indicator
10954 Part_Of agrees with the placement of the variable in state space.
10955 (Analyze_Object_Declaration): Initialize the encapsulating state
10956 of a variable. (Requires_State_Refinement): Moved to sem_util.
10957 * sem_ch7.adb (Analyze_Package_Body_Contract): New routine.
10958 (Analyze_Package_Contract): New routine.
10959 * sem_ch7.ads (Analyze_Package_Body_Contract): New routine.
10960 (Analyze_Package_Contract): New routine.
10961 * sem_ch10.adb (Decorate_State): Initialize the encapsulating
10962 state and Part_Of constituents.
10963 * sem_ch13.adb (Analyze_Aspect_Specifications):
10964 Add processing for aspect Part_Of. Update all
10965 calls to Decorate_Delayed_Aspect_And_Pragma.
10966 (Check_Aspect_At_Freeze_Point): Aspect Part_Of does
10967 not need any special processing at freeze time.
10968 (Decorate_Delayed_Aspect_And_Pragma): Renamed to
10969 Decorate_Aspect_And_Pragma. Add formal parameter Delayed and
10970 update the associated comment.
10971 * sem_prag.adb Add an entry for pragma Part_Of in table Sig_Flags.
10972 (Analyze_Abstract_State): Add new global variable State_Id. Remove
10973 local constants Errors and Loc. Remove local variables Is_Null
10974 and State_Nam. Create the entity of the abstract state on the
10975 spot, before all remaining checks are performed. Verify that a
10976 missing Part_Of option agrees with the placement of the abstract
10977 state within the state space.
10978 (Analyze_Depends_In_Decl_Part):
10979 Add new global variables Constits_Seen and States_Seen. Check
10980 that a state and a corresponding constituent do not appear
10981 in pragma [Refined_]Depends.
10982 (Analyze_Global_In_Decl_Part):
10983 Add new global variables Constits_Seen and States_Seen. Check
10984 that a state and a corresponding constituent do not appear
10985 in pragma [Refined_]Global.
10986 (Analyze_Global_Item):
10987 Remove the now obsolete code that deals with Part_Of.
10988 Add the entity of the global item to the list of processed
10989 items. (Analyze_Initializes_In_Decl_Part): Add new global
10990 variables Constits_Seen and States_Seen. Check that a state
10991 and a corresponding constituent do not appear in pragma
10992 Initializes.
10993 (Analyze_Initialization_Item): Add the entity
10994 of the initialization item to the list of processed items.
10995 (Analyze_Input_Item): Add the entity of the initialization
10996 item to the list of processed items.
10997 (Analyze_Input_Output):
10998 Remove the now obsolete code that deals with Part_Of. Add the
10999 entity of the input/output to the list of processed items.
11000 (Analyze_Part_Of): New routine.
11001 (Analyze_Part_Of_Option): Remove
11002 local constant Par_State. Add local constant Encaps and local
11003 variables Encaps_Id and Legal. Use Analyze_Part of to analyze
11004 the option. Turn the related state into a Part_Of constituent
11005 if the option is legal.
11006 (Analyze_Pragma): Add processing
11007 for pragma Part_Of.
11008 (Analyze_Refined_State_In_Decl_Part):
11009 Remove global constants Pack_Body and Spec_Id. Remove
11010 global variables Abstr_States and Hidden_States. Add new
11011 global variables Available_States, Body_Id, Body_States and
11012 Spec_Id. Add new local constant Body_Decl. Reimplement the
11013 logic that extracts the states available for refinement from
11014 the related package and the body hidden states of the said
11015 package.
11016 (Analyze_Refinement_Clause): Add local variable Part_Of_Constits.
11017 (Check_Applicable_Policy): Alphabetize body.
11018 (Check_Dependency_Clause): Replace Refined_State
11019 with Encapsulating_State.
11020 (Check_Matching_Constituent):
11021 Reimplement the logic that determines whether an item is a valid
11022 / invalid constituent of the current refined state. Return when
11023 a construct does not denote a valid abstract state. Extract the
11024 list of Part_Of constituents for further analysis. Check that all
11025 Part_Of constituents of a state have been used in its refinement.
11026 (Check_Matching_State): Update the comment on usage. Operate
11027 on the list of available states.
11028 (Check_Missing_Part_Of): New routine.
11029 (Check_Refined_Global_Item): Replace Refined_State
11030 with Encapsulating_State.
11031 (Check_State_And_Constituent_Use): New routine.
11032 (Create_Abstract_State): New routine.
11033 (Is_Matching_Input): Replace Refined_State with Encapsulating_State.
11034 (Is_Part_Of): Removed.
11035 (Collect_Body_States): New routine.
11036 (Collect_Constituent): Replace Refined_State with Encapsulating_State.
11037 (Collect_Hidden_States): Removed.
11038 (Report_Unrefined_States): Change the profile of the procedure along
11039 with the comment on usage.
11040 (Report_Unused_Constituents): New routine.
11041 (Report_Unused_Hidden_States): Removed.
11042 (Report_Unused_States): New routine.
11043 * sem_prag.ads (Check_Missing_Part_Of): New routine.
11044 * sem_util.adb (Add_Contract_Item): Pragma Part_Of can now
11045 appear in the classification pragmas of a package instantiation
11046 or a variable.
11047 (Find_Placement_In_State_Space): New routine.
11048 (Is_Child): Removed.
11049 (Is_Child_Or_Sibling): Remove formal
11050 parameter Private_Child. Remove the private child checks.
11051 (Requires_State_Refinement): Moved from sem_ch3.
11052 * sem_util.ads Add new type State_Space_Kind along with
11053 comment on its usage and values.
11054 (Add_Contract_Item): Update the comment on usage.
11055 (Find_Body_Discriminal): Alphabetize spec.
11056 (Find_Placement_In_State_Space): New routine.
11057 (Is_Child_Or_Sibling): Remove formal parameter Private_Child
11058 and update the comment on usage.
11059 (Requires_State_Refinement): Moved from sem_ch3.
11060 * sinfo.ads: Update the documentation of N_Contract.
11061 * snames.ads-tmpl The predefined name for Part_Of is now used
11062 to denote a pragma. Add Pragma_Id for Part_Of.
11063
0830210c
AC
110642014-01-29 Emmanuel Briot <briot@adacore.com>
11065
11066 * s-regexp.adb (Create_Secondary_Table): Automatically grow the state
11067 machine as needed.
11068 (Dump): New subprogram.
11069
110702014-01-29 Tristan Gingold <gingold@adacore.com>
11071
11072 * exp_ch9.adb (Expand_N_Protected_Type_Declaration): Add
11073 Expand_Entry_Declaration to factorize code.
11074
1ae70618
ES
110752014-01-29 Ed Schonberg <schonberg@adacore.com>
11076
11077 * checks.adb: minor clarification.
11078 * sem_ch7.adb (Declare_Inherited_Private_Subprograms): Limit
11079 search for primitive operations to the entities that immediately
11080 follow the type declaration.
11081
cca7f107
AC
110822014-01-29 Tristan Gingold <gingold@adacore.com>
11083
11084 * exp_ch9.adb (Build_Protected_Entry): Do not call
11085 Complete_Entry_Body anymore.
11086 * rtsfind.ads (RE_Complete_Single_Entry_Body): Remove.
11087 * s-tposen.ads, s-tposen.adb (Complete_Single_Entry_Body): Remove.
11088
110892014-01-29 Pierre-Marie Derodat <derodat@adacore.com>
11090
11091 * s-os_lib.adb, s-os_lib.ads (Normalize_Pathname): Return an empty
11092 string when the Name input bigger than allowed. Adapt the function
11093 specification.
11094
110952014-01-29 Ed Schonberg <schonberg@adacore.com>
11096
11097 * checks.adb (Install_Null_Excluding_Check): Do not emit warning
11098 if expression is within a case_expression of if_expression.
11099
443dd772
RD
111002014-01-29 Robert Dewar <dewar@adacore.com>
11101
11102 * exp_ch9.adb, inline.ads: Minor reformatting.
11103
4043fd0b
AC
111042014-01-29 Tristan Gingold <gingold@adacore.com>
11105
11106 * exp_ch9.adb (Is_Exception_Safe): Return true if no exceptions.
11107
111082014-01-29 Yannick Moy <moy@adacore.com>
11109
11110 * inline.ads (Pending_Body_Info): Add SPARK_Mode and
11111 SPARK_Mode_Pragma components to be able to analyze generic
11112 instance.
11113 * sem_ch12.adb (Analyze_Package_Instantiation,
11114 Inline_Instance_Body, Need_Subprogram_Instance_Body,
11115 Load_Parent_Of_Generic): Pass in SPARK_Mode from instantiation
11116 for future analysis of the instance.
11117 (Instantiate_Package_Body,
11118 Instantiate_Subprogram_Body, Set_Instance_Inv): Set SPARK_Mode
11119 from instantiation to analyze the instance.
11120
cf3e6845
AC
111212014-01-29 Robert Dewar <dewar@adacore.com>
11122
11123 * sem_ch7.adb, sem_prag.adb, sem_ch4.adb, sem_ch6.adb: Minor code
11124 reorganization.
11125
111262014-01-29 Yannick Moy <moy@adacore.com>
11127
11128 * gnat_rm.texi: Update description of SPARK_Mode pragma.
11129
111302014-01-29 Tristan Gingold <gingold@adacore.com>
11131
11132 * exp_ch9.adb (Expand_N_Protected_Body): Remove Num_Entries.
11133
f90d14ac
AC
111342014-01-29 Thomas Quinot <quinot@adacore.com>
11135
11136 * sem_ch4.adb (Find_Component_In_Instance): Update comment.
11137
111382014-01-29 Ed Schonberg <schonberg@adacore.com>
11139
11140 * exp_util.adb (Build_Task_Image_Prefix): Indicate that the
11141 resulting string is an internal entity. and thus requires no
11142 initialization. This is relevant when Initialize_ Scalars is
11143 enabled, because the resultant spurious initialization may lead to
11144 secondary stack anomalies that produce a mangled name for a task.
11145
111462014-01-29 Yannick Moy <moy@adacore.com>
11147
11148 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): SPARK_Mode
11149 not inherited from spec anymore. Check consistency
11150 rules after processing of declarations.
11151 * sem_ch7.adb (Analyze_Package_Body_Helper): SPARK_Mode not inherited
11152 from spec anymore. Check consistency rules after processing of
11153 declarations.
11154 (Analyze_Package_Declaration): Set SPARK_Mode only for non-generic
11155 packages.
11156 * sem_prag.adb (Analyze_Pragma/Pragma_SPARK_Mode): Implement new
11157 consistency rules.
11158
b1d12996
AC
111592014-01-27 Robert Dewar <dewar@adacore.com>
11160
11161 * sem_res.adb (Resolve_Comparison_Op): Add type name/location
11162 to unordered msg.
11163 (Resolve_Range): Add type name/location to unordered msg.
11164
111652014-01-27 Claire Dross <dross@adacore.com>
11166
11167 * a-cofove.adb/s (Copy): Add precondition so that Copy (Source,
11168 Capacity) is only called with Capacity >= Length (Source) and
11169 Capacity in Capacity_Range.
11170 * a-cfdlli.adb/s, a-cfhase.adb/s, a-cfhama.adb/s, a-cforse.adb/s,
11171 a-cforma.adb/s (Copy): Add precondition so that Copy (Source, Capacity)
11172 is only called with Capacity >= Source.Capacity. Raise Capacity_Error
11173 in the code is this is not the case.
11174
111752014-01-27 Thomas Quinot <quinot@adacore.com>
11176
11177 * sem_ch4.adb (Analyze_Selected_Component): Fix handling of
11178 selected component in an instance where the component of the
11179 actual is not visibile at instantiation.
11180
fcadacf7
ES
111812014-01-27 Ed Schonberg <schonberg@adacore.com>
11182
11183 * sem_ch6.adb: sem_ch6.adb (Set_Actual_Subtypes): If the type
11184 has a dynamic predicate, generate freeze node for Actual_Subtype
11185 at once, because the declaration of the corresponding predicate
11186 function will make reference to it.
11187
8b4230c8
AC
111882014-01-27 Tristan Gingold <gingold@adacore.com>
11189
11190 * exp_ch7.adb, exp_ch9.adb: Adjust comments.
11191
111922014-01-27 Robert Dewar <dewar@adacore.com>
11193
11194 * exp_ch4.adb (Expand_N_Op_Expon): Remove unsigned type test
11195 for 2**X optimization.
11196
111972014-01-27 Ed Schonberg <schonberg@adacore.com>
11198
11199 * a-suenst.adb: strings.utf_encoding.strings (Decode): Check
11200 explicitly whether value is in range of Character, because the
11201 library is typically compiled with range checks disabled, and
11202 we cannot rely on the implicit check on the argument of 'Val.
11203
112042014-01-27 Vincent Celier <celier@adacore.com>
11205
11206 * a-ciorma.adb, a-cihama.adb (Assign): Copy the Source to the Target,
11207 not the Target to itself.
11208
112092014-01-27 Robert Dewar <dewar@adacore.com>
11210
11211 * vms_conv.ads, ali.adb, sem_ch6.ads, opt.ads, vms_cmds.ads: Minor
11212 changes to avoid incorrect use of unordered enum types.
11213
112142014-01-27 Thomas Quinot <quinot@adacore.com>
11215
11216 * sem_ch4.adb: Minor reformatting.
11217
29077c18
AC
112182014-01-27 Robert Dewar <dewar@adacore.com>
11219
11220 * scn.adb (Check_End_Of_Line): Removed.
11221 (Error_Long_Line): Removed.
11222 (Determine_License): Use versions of above routines from Scanner.
11223 * scng.adb (Check_End_Of_Line): Moved to spec.
11224 (Error_Long_Line): Removed, no longer used.
11225 * scng.ads (Check_End_Of_Line): Moved here from body.
11226
112272014-01-27 Tristan Gingold <gingold@adacore.com>
11228
11229 * exp_ch7.adb (Build_Cleanup_Statements): Call
11230 Build_Protected_Subprogram_Call_Cleanup to insert the cleanup
11231 for protected body.
11232 * exp_ch9.adb (Build_Protected_Subprogram_Body): Likewise.
11233 Remove Service_Name variable.
11234 (Build_Protected_SUbprogam_Call_Cleanup): New procedure that
11235 factorize code from the above subprograms.
11236 * exp_ch9.ads (Build_Protected_Subprogram_Call_Cleanup): New procedure.
11237
2757c5bf
AC
112382014-01-27 Hristian Kirtchev <kirtchev@adacore.com>
11239
11240 * einfo.adb (Has_Option): Reimplemented.
11241 * sem_prag.adb (Analyze_Refinement_Clause): Add global
11242 variables AR_Constit, AW_Constit, ER_Constit, EW_Constit,
11243 External_Constit_Seen and State. Add local variables Body_Ref,
11244 Body_Ref_Elmt and Extra_State. Reimplement part of the logic to
11245 avoid a cumbersome while pool. Verify the legality of an external
11246 state and relevant properties.
11247 (Check_External_Property): New routine.
11248 (Check_Matching_State): Remove parameter profile
11249 and update comment on usage.
11250 (Collect_Constituent): Store the
11251 relevant external property of a constituent.
11252 * sem_util.adb (Async_Readers_Enabled): Update the call to
11253 Has_Enabled_Property.
11254 (Async_Writers_Enabled): Update the call to Has_Enabled_Property.
11255 (Effective_Reads_Enabled): Update the call to Has_Enabled_Property.
11256 (Effective_Writes_Enabled): Update the call to Has_Enabled_Property.
11257 (Has_Enabled_Property): Rename formal parameter Extern to State_Id.
11258 Update comment on usage. Reimplement the logic to recognize the various
11259 formats of properties.
11260
112612014-01-27 Ed Schonberg <schonberg@adacore.com>
11262
11263 * par-ch5.adb: Minor reformatting.
11264
112652014-01-27 Tristan Gingold <gingold@adacore.com>
11266
11267 * s-tposen.ads: Harmonize style and comments.
11268
112692014-01-27 Vincent Celier <celier@adacore.com>
11270
11271 * projects.texi: Document that shared library projects, by
11272 default, cannot import projects that are not shared library
11273 projects.
11274
112752014-01-27 Robert Dewar <dewar@adacore.com>
11276
11277 * sem_ch8.adb (Find_Selected_Component): Use Replace instead
11278 of Rewrite.
11279
112802014-01-27 Ed Schonberg <schonberg@adacore.com>
11281
11282 * a-suenco.adb, a-suenst.adb (Decode): Raise encoding error if
11283 any other exception is raised.
11284 (Convert): If both Input_Scheme and Output_Scheme are UTF_8 it is
11285 still necessary to perform a conversion in order to remove overlong
11286 encodings.
11287
00ba7be8
AC
112882014-01-27 Robert Dewar <dewar@adacore.com>
11289
11290 * exp_smem.adb: Minor reformatting.
11291
112922014-01-27 Thomas Quinot <quinot@adacore.com>
11293
11294 * a-calfor.ads: Fix incorrect reference to operator "-" in comment.
11295
112962014-01-27 Ed Schonberg <schonberg@adacore.com>
11297
11298 * sem_res.adb (Make_Call_Into_Operator): In ASIS mode, relocate
11299 nodes for operands to the original node for the call, to preserve
11300 Original_Node pointers within the resolved operands, given that
11301 they may have been rewritten as well. Previous approach copied
11302 the operands into a new tree and lost those pointers.
11303
113042014-01-27 Claire Dross <dross@adacore.com>
11305
11306
11307 * a-cofove.adb, a-cofove.ads: Add Strict_Equal function to the API.
11308
113092014-01-27 Ed Schonberg <schonberg@adacore.com>
11310
11311 * sem_util.adb (Check_Internal_Protected_Use): A call through
11312 an anonymous access parameter of the current protected function
11313 is not a potential modification of the current object.
11314
113152014-01-27 Ed Schonberg <schonberg@adacore.com>
11316
11317 * a-cobove.adb (Reserve_Capacity): Procedure raises
11318 Capacity_Error, not Constraint_Error, when request cannot be
11319 satisfied.
11320
113212014-01-27 Vincent Celier <celier@adacore.com>
11322
11323 * a-coorma.adb, a-cohama.adb (Assign): Copy the Source to the Target,
11324 not the Target to itself.
11325
113262014-01-27 Ed Schonberg <schonberg@adacore.com>
11327
11328 * exp_ch4.adb (Expand_Concatenate): If the target of the
11329 concatenation is a library-level entity, always use the off-line
11330 version of concatenation, regardless of optimization level. This
11331 is space-efficient, and prevents linking problems when some
11332 units are compiled with different optimization levels.
11333
113342014-01-27 Ed Schonberg <schonberg@adacore.com>
11335
11336 * sem_ch5.adb: Code clean up.
11337
113382014-01-27 Ed Schonberg <schonberg@adacore.com>
11339
11340 * par-ch5.adb (P_Iterator_Specification): Improve error recovery
11341 when an array or container iterator includes a subtype indication,
11342 which is only legal in an element iterator.
11343
8fdafe44
AC
113442014-01-27 Thomas Quinot <quinot@adacore.com>
11345
11346 * exp_ch7.adb: Minor reformatting.
11347
113482014-01-27 Robert Dewar <dewar@adacore.com>
11349
11350 * opt.adb (SPARK_Mode): Default for library units is None rather
11351 than Off.
11352 * opt.ads: Remove AUTO from SPARK_Mode_Type SPARK_Mode_Type is
11353 no longer ordered.
11354 * sem_prag.adb (Analyze_Pragma, case SPARK_Mode): Remove AUTO
11355 possibility.
11356 * snames.ads-tmpl (Name_Auto): Removed, no longer used.
11357
113582014-01-27 Robert Dewar <dewar@adacore.com>
11359
11360 * par-ch5.adb (P_Sequence_Of_Statements): Make entry in
11361 Suspicious_Labels table if we have identifier; followed by loop
11362 or block.
11363 * par-endh.adb (Evaluate_End_Entry): Search Suspicious_Labels table.
11364 * par.adb (Suspicious_Labels): New table.
11365
113662014-01-27 Robert Dewar <dewar@adacore.com>
11367
11368 * exp_aggr.adb (Check_Bounds): Reason is range check, not
11369 length check.
11370
113712014-01-27 Yannick Moy <moy@adacore.com>
11372
11373 * get_spark_xrefs.adb (Get_SPARK_Xrefs): Accept new type 'c' for
11374 reference.
11375 * lib-xref-spark_specific.adb (Is_Global_Constant): Remove useless
11376 function now.
11377 (Add_SPARK_Xrefs): Include references to constants.
11378 * spark_xrefs.ads Document new character 'c' for references to
11379 constants.
11380
113812014-01-27 Thomas Quinot <quinot@adacore.com>
11382
11383 * exp_smem.adb (Add_Write_After): For a function call, insert write as
11384 an after action in a transient scope.
11385
b3a69993
AC
113862014-01-27 Thomas Quinot <quinot@adacore.com>
11387
11388 * exp_smem.adb (Expand_Shared_Passive_Variable): For a reference
11389 to a shared variable as an OUT formal in a call to an init proc,
11390 the 'Read call must be emitted after, not before, the call.
11391
113922014-01-27 Robert Dewar <dewar@adacore.com>
11393
11394 * gnat_rm.texi: Remove mention of AUTO mode for SPARK_Mode pragma.
11395
f1bd0415
AC
113962014-01-27 Robert Dewar <dewar@adacore.com>
11397
11398 * a-wichha.adb (Character_Set_Version): Change to output proper
11399 value.
11400
114012014-01-27 Hristian Kirtchev <kirtchev@adacore.com>
11402
11403 * einfo.adb (Is_Input_Only_State): Removed.
11404 (Is_Non_Volatile_State): Removed.
11405 (Is_Output_State): Removed.
11406 * einfo.ads (Is_Input_Only_State): Remove attribute and
11407 subprogram. Update related entity.
11408 (Is_Non_Volatile_State):
11409 Remove attribute and subprogram. Update related entity.
11410 (Is_Output_State): Removed attribute and subprogram. Update
11411 related entity.
11412 * exp_ch6.adb (Expand_Subprogram_Contract): Update comment on
11413 generated code.
11414 * sem_ch3.adb (Analyze_Declarations): Analyze the contract of
11415 an object, not just variables.
11416 (Analyze_Object_Contract): New routine.
11417 (Analyze_Variable_Contract): Removed.
11418 (Process_Discriminants): Detect an illegal use of volatile
11419 discriminant in SPARK mode.
11420 * sem_ch5.adb (Analyze_Iterator_Specification):
11421 Detect an illegal use of volatile loop variable.
11422 (Analyze_Loop_Parameter_Specification): Detect an illegal use
11423 of volatile loop variable.
11424 * sem_ch6.adb (Process_Formals): Update the volatile object
11425 detection. Detect an illegal formal of mode IN OUT or OUT in
11426 SPARK mode. Enhance the error messages with references.
11427 * sem_ch12.adb (Instantiate_Object): Update the volatile object
11428 detection. Enhance the error messages with references.
11429 * sem_prag.adb (Analyze_Abstract_State): Enhance the error
11430 messages with references.
11431 (Analyze_Contract_Case): Enhance the error messages with references.
11432 (Analyze_External_Property): Call Check_Duplicate_Property to process
11433 an external property.
11434 (Analyze_External_Property_In_Decl_Part): New routine.
11435 (Analyze_External_State_In_Decl_Part): Removed.
11436 (Analyze_Global_Item): Detect an illegal
11437 use of a volatile constant. Detect an illegal use
11438 of a variable with enabled Effective_Reads. Enhance
11439 the error messages with references. Remove obsolete
11440 checks concerning Input_Only and Output_Only states.
11441 (Analyze_Initialization_Item): Enhance the error messages
11442 with references.
11443 (Analyze_Initializes_In_Decl_Part): Do not
11444 collect the states and variables when the initialization list
11445 is null.
11446 (Analyze_Input_Item): Enhance the error messages with references.
11447 (Analyze_Input_Output): Enhance the error messages with references.
11448 (Analyze_Pragma): Enhance the error messages with references.
11449 (Analyze_Refinement_Clause): Code reformatting.
11450 (Analyze_Refined_Depends_In_Decl_Part):
11451 Rename global variable Global to Reg_Global and update all
11452 occurrences. Add local variables D7 and D8. Update the error
11453 messages with references. Update the call to Collect_Global_Items.
11454 (Analyze_Refined_Global_In_Decl_Part): Add local variables
11455 Has_Proof_In_State, Proof_In_Constits and Proof_In_Items. Update
11456 the call to Collect_Global_Items. Account for a Proof_In state
11457 in null / useless refinement checks. Verify the coverage of
11458 Proof_In states.
11459 (Check_Dependency_Clause): Remove local variable
11460 Out_Constits. Remove the retrieval and removal of constituents
11461 for an Output_Only state. Remove the reporting of unused
11462 Output_Only state constituents.
11463 (Check_Duplicate_Mode): Enhance
11464 the error message with a reference.
11465 (Check_Duplicate_Property): New routine.
11466 (Check_Duplicate_Option): Enhance the error message with a reference.
11467 (Check_External_Properties): Enhance the error message with a reference.
11468 (Check_Function_Return): Enhance the error message with a reference.
11469 (Check_In_Out_States): Update
11470 comment on usage. Add a specialized error message for Proof_In
11471 constituents. Enhance the error message with a reference.
11472 (Check_Input_States): Update comment on usage. Account for
11473 possible Proof_In constituents. Enhance the error message
11474 with a areference.
11475 (Check_Matching_Constituent): Enhance the error message with a
11476 reference.
11477 (Check_Matching_State): Enchance the error message with a reference.
11478 (Check_Mode): Add local variable From_Global. Update the call to
11479 Find_Mode. Emit more precise error messages concerning extra items
11480 (Check_Mode_Restriction_In_Enclosing_Context): Consider
11481 pragma Refined_Global. Enhance the error message with a
11482 reference.
11483 (Check_Mode_Restriction_In_Function): Enhance the error message with
11484 a reference.
11485 (Check_Output_States): Update comment on usage. Add local variable
11486 Posted. Account for possible Proof_In constituents. Produce a detailed
11487 list of missing constituents.
11488 (Check_Proof_In_States): New routine.
11489 (Check_Refined_Global_Item): Handle Proof_In
11490 constituents. Enchance the error message with a reference.
11491 (Collect_Global_Items): Add formal parameters Proof_In_Items
11492 and Has_Proof_In_State. Update the comment on usage. Account
11493 for Proof_In items.
11494 (Create_Or_Modify_Clause): Enchance
11495 the error message with a reference.
11496 (Find_Mode): Add
11497 formal parameter From_Global. Update the comment on usage.
11498 Detect when the mode is governed by pragma [Refined_]Global.
11499 (Output_Constituents): Removed.
11500 (Report_Extra_Constituents):
11501 Report extra Proof_In constituents.
11502 (Report_Unused_Constituents): Removed.
11503 (Usage_Error): Code reformatting. Enhance the error
11504 messages with reference.
11505 * sem_prag.ads (Analyze_External_Property_In_Decl_Part): New routine.
11506 (Analyze_External_State_In_Decl_Part): Removed.
11507 * sem_res.adb (Resolve_Actuals): Update the volatile object
11508 detection. Enhance the error message with a reference.
11509 (Resolve_Entity_Name): Update the volatile object
11510 detection. Enhance the error message with a reference.
11511 * sem_util.adb (Is_Refined_State): Add a guard to avoid a crash.
11512 (Is_SPARK_Volatile_Object): New routine.
11513 (Has_Volatile_Component): New routine.
11514 * sem_util.ads (Is_Delegate): Alphabetized.
11515 (Is_SPARK_Volatile_Object): New routine.
11516 (Has_Volatile_Component): New routine.
11517 * snames.ads-tmpl: Remove names Name_Input_Only and Name_Output_Only.
11518
115192014-01-27 Ed Schonberg <schonberg@adacore.com>
11520
11521 * sem_attr.adb: Resolve fully prefix of 'Update.
11522
48b08b18
AC
115232014-01-27 Ben Brosgol <brosgol@adacore.com>
11524
11525 * gnat_rm.texi: Minor clarifications.
11526
115272014-01-27 Robert Dewar <dewar@adacore.com>
11528
11529 * sem_elab.adb (Check_Internal_Call_Continue): Avoid complaining
11530 about call that is generated as part of an Initial_Condition
11531 check.
11532 * sem_prag.adb: Minor spelling correction.
11533
1b8b4638
RD
115342014-01-27 Robert Dewar <dewar@adacore.com>
11535
11536 * sem_prag.adb (Set_Convention_From_Pragma): Check that
11537 convention Ghost can only apply to functions.
11538 * einfo.ads, einfo.adb (Is_Ghost_Subprogram): Add clarifying comment.
11539
42959b0c
RD
115402014-01-27 Robert Dewar <dewar@adacore.com>
11541
11542 * gnat_ugn.texi: Add Short_Enums to documentation of
11543 -gnatet/-gnateT.
11544
115452014-01-27 Robert Dewar <dewar@adacore.com>
11546
11547 * sem_prag.adb (Analyze_Input_Item): Correct check for input
11548 item in same package.
11549 * sem_util.ads, sem_util.adb (Within_Scope): New function.
11550
87e9c2a2
AC
115512014-01-26 Arnaud Charlet <charlet@adacore.com>
11552
11553 * a-intnam-lynxos.ads, mlib-tgt-specific-lynxos.adb,
11554 s-osinte-lynxos-3.adb, s-osinte-lynxos-3.ads, s-osinte-lynxos.adb,
11555 s-osinte-lynxos.ads, s-taprop-lynxos.adb, s-tpopsp-lynxos.adb,
11556 system-lynxos-ppc.ads, system-lynxos-x86.ads: Removed, no longer
11557 maintained.
11558
54dce195
EB
115592014-01-25 Eric Botcazou <ebotcazou@adacore.com>
11560
11561 * gcc-interface/Makefile.in: Fix oversight.
11562
88293f03
EB
115632014-01-25 Eric Botcazou <ebotcazou@adacore.com>
11564
11565 * gcc-interface/utils.c (convert_to_fat_pointer): Un-obfuscate the
11566 conversion from a thin pointer with a shifted value.
11567 * gcc-interface/utils2.c (gnat_build_constructor): Propagate the
11568 read-only flag from the values onto the result.
11569 (gnat_invariant_expr): Accept read-only CONSTRUCTORs.
11570
ae56e442
TG
115712014-01-25 Tristan Gingold <gingold@adacore.com>
11572
11573 * gcc-interface/decl.c (gnat_to_gnu_entity): Always build a variable
11574 for E_Variable with a pragma Linker_Section.
11575
3a70ba74
RD
115762014-01-25 Robert Dewar <dewar@adacore.com>
11577
11578 * gcc-interface/decl.c (gnat_to_gnu_param): Make sure an Out parameter
11579 with Default_Value aspect is passed in by copy.
11580
c51f5910
AC
115812014-01-24 Eric Botcazou <ebotcazou@adacore.com>
11582
11583 * set_targ.adb: Set Short_Enums.
11584 * gcc-interface/lang.opt (fshort-enums): New option.
11585 * gcc-interface/misc.c (gnat_handle_option): Handle it.
11586 (gnat_post_options): Do not modify the global settings.
11587
115882014-01-24 Robert Dewar <dewar@adacore.com>
11589
11590 * g-rannum.ads, g-rannum.adb (Random_Ordinary_Fixed): New generic
11591 function.
11592 (Random_Decimal_Fixed): New generic function.
11593 * s-rannum.ads: Minor comment clarifications.
11594
f27ad2b2
RD
115952014-01-24 Robert Dewar <dewar@adacore.com>
11596
11597 * back_end.adb: Remove Short_Enums handling (handled in
11598 Ttypes/Get_Targ now) Minor added comments.
11599 * freeze.adb: Change name Short_Enums_On_Target to
11600 Target_Short_Enums.
11601 * get_targ.ads, get_targ.adb (Get_Short_Enums): New function.
11602 * opt.ads: Minor comment updates.
11603 * sem_ch13.adb: Change name Short_Enums_On_Target to
11604 Target_Short_Enums.
11605 * set_targ.adb: Set Short_Enums from gcc back end.
11606 * set_targ.ads (Short_Enums): New variable.
11607 * targparm.ads, targparm.adb: Remove Short_Enums entries (handled in
11608 Ttypes/Get_Targ now).
11609 * ttypes.ads (Target_Short_Enums): New constant boolean switch
11610
dd6ab508
PO
116112014-01-24 Pascal Obry <obry@adacore.com>
11612
11613 * g-sercom-mingw.adb: Fix serial port name for port number > 10.
11614
e6d5d940
GD
116152014-01-24 Gary Dismukes <dismukes@adacore.com>
11616
11617 * exp_disp.adb (Expand_Dispatching_Call): Call Unqualify on Param when
11618 comparing it with Ctrl_Arg, since Ctrl_Arg may have had qualification
11619 stripped off.
11620
ab986406
AC
116212014-01-24 Robert Dewar <dewar@adacore.com>
11622
11623 * sinfo.ads, make.adb, prj-env.adb: Minor reformatting.
11624
116252014-01-24 Vincent Celier <celier@adacore.com>
11626
11627 * prj.adb (Add_Aggregated_Project): Do not add a project in
11628 the list if it is already there.
11629
116302014-01-24 Yannick Moy <moy@adacore.com>
11631
11632 * lib-xref-spark_specific.adb (Enclosing_Subprogram_Or_Package):
11633 Correct the search for a subrogram declaration to which a pragma is
11634 attached.
11635
116362014-01-24 Bob Duff <duff@adacore.com>
11637
11638 * gnat_ugn.texi: Document --decimal-grouping and
11639 --based-grouping switches in gnatpp.
11640
979b94ea
AC
116412014-01-24 Ed Schonberg <schonberg@adacore.com>
11642
11643 * sinfo.ads: Documentation update.
11644
116452014-01-24 Ed Schonberg <schonberg@adacore.com>
11646
11647 * sem_ch3.adb (Constant_Redeclaration): New declaration is
11648 illegal if previous one has an initial expression that is an
11649 aggregate expanded into assignments.
11650
116512014-01-24 Ed Schonberg <schonberg@adacore.com>
11652
11653 * sem_ch5.adb (Analyze_Loop_Parameter_Specification): Small
11654 code reorganization to remove spurious warning on a loop with
11655 an array element iterator that has a null range.
11656
116572014-01-24 Vincent Celier <celier@adacore.com>
11658
11659 * make.adb (Binding_Phase): When setting the Ada paths, use
11660 the library ALI dir, not the object dir in libraries.
11661
116622014-01-24 Yannick Moy <moy@adacore.com>
11663
11664 * sinfo.ads: Add documentation of check flag fields.
11665
116662014-01-24 Ed Schonberg <schonberg@adacore.com>
11667
11668 * sem_res.adb (Resolve_Actuals): If an actual is a view
11669 conversion of a discriminated object, and the formal type is
11670 discriminated and constrained, apply a discriminant check to
11671 the object itself.
11672
8edc33fa
RD
116732014-01-24 Robert Dewar <dewar@adacore.com>
11674
11675 * prj.adb, prj-env.adb, back_end.adb: Add comment, minor code clean ups.
11676
ad4e3362
ES
116772014-01-24 Ed Schonberg <schonberg@adacore.com>
11678
11679 * sem_ch3.adb (Analyze_Declarations): At the end of an
11680 appropriate declarative part, call Freeze_All from the first
11681 declaration in the scope, not from the first unfrozen one. This
11682 is necessary to apply visibility checks to entities with delayed
11683 aspects. Otherwise, in the presence of instantiations and cleanups
11684 that they may generate, the delayed aspects may be analyzed too
11685 late and produce spurious visibility errors.
11686 * sem_attr.adb: Place etype on range.
11687 * sem_ch6.adb: Documentation expression functions.
11688
d0ef7921
AC
116892014-01-24 Robert Dewar <dewar@adacore.com>
11690
11691 * exp_ch7.adb: Minor change of Indices to Indexes (preferred
11692 terminology in compiler).
11693
116942014-01-24 Robert Dewar <dewar@adacore.com>
11695
11696 * scans.ads: Remove Tok_Raise from Sterm, Eterm, After_SM
11697 categories, now that Ada 95 supports raise expressions.
11698
116992014-01-24 Robert Dewar <dewar@adacore.com>
11700
11701 * freeze.adb (Freeze_Enumeration_Type): Use new target parameter
11702 Short_Enums_On_Target.
11703 * sem_ch13.adb (Set_Enum_Esize): Take Short_Enums_On_Target
11704 into account.
11705 * targparm.ads, targparm.adb: Add new target parameter Short_Enums.
11706
117072014-01-24 Ed Schonberg <schonberg@adacore.com>
11708
11709 * sem_ch5.adb (Analyze_Iterator_Specification): If subtype
11710 indication is given explicity, check that it matches the array
11711 component type or the container element type of the domain
11712 of iteration.
11713
117142014-01-24 Tristan Gingold <gingold@adacore.com>
11715
11716 * back_end.adb (Scan_Compiler_Arguments): Set Short_Enums_On_Target.
bff2d234
TG
11717 * gcc-interface/misc.c (flag_short_enums): Declare.
11718 (gnat_post_options): Set it.
d0ef7921
AC
11719
117202014-01-24 Vincent Celier <celier@adacore.com>
11721
11722 * prj-env.adb (Ada_Objects_Path): Use Ada_Objects_Path_No_Libs
11723 to cache the result when Including_Libraries is False.
11724 * prj-env.ads (Ada_Objects_Path): Update documentation
11725 * prj.adb (Free (Project_Id)): Also free Ada_Objects_Path_No_Libs
11726 (Get_Object_Directory): Return the Library_Ali_Dir only when
11727 when Including_Libraries is True.
11728 * prj.ads (Get_Object_Directory): Fix and complete documentation
11729 (Project_Data): New component Ada_Objects_Path_No_Libs
11730
162c21d9
AC
117312014-01-24 Robert Dewar <dewar@adacore.com>
11732
11733 * checks.adb (Expr_Known_Valid): Result of fpt operator never
11734 considered valid.
11735
117362014-01-24 Eric Botcazou <ebotcazou@adacore.com>
11737
11738 * back_end.adb: Minor fix in comment.
11739
117402014-01-24 Javier Miranda <miranda@adacore.com>
11741
11742 * sem_ch3.adb (Check_Abstract_Overriding): Code reestructuration
11743 required to report the error in case of task types.
11744
117452014-01-24 Ed Schonberg <schonberg@adacore.com>
11746
11747 * sem_attr.adb: Additional index checking.
11748
08cd7c2f
AC
117492014-01-24 Ed Schonberg <schonberg@adacore.com>
11750
11751 * sem_attr.adb (Analyze_Attribute, case 'Update): Analyze
11752 expressions in each component association, and for records note
11753 the entity in each association choice, for subsequent resolution.
11754 (Resolve_Attribute, case 'Update): Complete resolution of
11755 expressions in each component association.
11756
117572014-01-24 Robert Dewar <dewar@adacore.com>
11758
11759 * sem.adb (Sem): Avoid premature reference to Current_Sem_Unit
11760 (this was causing Is_Main_Unit_Or_Main_Unit_Spec to be set wrong,
11761 leading to wrong handling of SPARK_Mode for library units).
11762
117632014-01-24 Robert Dewar <dewar@adacore.com>
11764
11765 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Set SPARK_Mode
11766 on generic instances (do not consider them to be internally
11767 generated)
11768
117692014-01-24 Doug Rupp <rupp@adacore.com>
11770
11771 * s-osinte-android.ads (pthread_sigmask): Import sigprocmask
11772 vice pthread_sigmask.
11773
117742014-01-24 Vincent Celier <celier@adacore.com>
11775
11776 * prj.adb (Debug_Output (Str, Str2)): Output if verbosity is
11777 not default.
11778
117792014-01-24 Vincent Celier <celier@adacore.com>
11780
11781 * prj-ext.adb (Add): Do not output anything when Silent is True,
11782 whatever the verbosity. When Source is From_External_Attribute,
11783 set the corresponding environment variable if it is not already set.
11784 * prj-ext.ads (Add): New Boolean parameter Silent, defaulted
11785 to False
11786 * prj-proc.adb (Process_Expression_For_Associative_Array):
11787 For attribute External, call Prj.Ext.Add with Silent set to
11788 True for the child environment, to avoid useless output in non
11789 default verbosity.
11790
117912014-01-24 Ed Schonberg <schonberg@adacore.com>
11792
11793 * sem_res.adb (Set_Slice_Subtype): Handle properly a discrete
11794 range given by a subtype indication, and force evaluation of
11795 the bounds, as for a simple range.
11796 * exp_util.adb (Evaluate_Slice_Bounds): Utility to force evaluation
11797 of bounds of slice for various kinds of discrete ranges.
11798 (Evaluate_Name, Evaluate_Subtype_From_Expr): use
11799 Evaluate_Slice_Bounds.
11800
118012014-01-24 Bob Duff <duff@adacore.com>
11802
11803 * s-taskin.ads (Activator): Make this Atomic, because
11804 Activation_Is_Complete reads it, and that can be called
11805 from any task. Previously, this component was only
11806 modified by the activator before activation, and by
11807 Self after activation.
11808 * a-taside.ads, a-taside.adb (Environment_Task,
11809 Activation_Is_Complete): Implement these missing functions.
11810
7610fee8
AC
118112014-01-24 Doug Rupp <rupp@adacore.com>
11812
11813 * init.c: Add a handler section for Android.
11814
118152014-01-24 Arnaud Charlet <charlet@adacore.com>
11816
11817 * i-cexten.ads (Unsigned_33..64, Unsigned_33..64): New types.
11818
118192014-01-24 Ed Schonberg <schonberg@adacore.com>
11820
11821 * sem_ch4.adb (Operator_Check): If one operand is a
11822 Raise_Expression, set its type to that of the other operand.
11823 * sem_res.adb (Resolve_Raise_Expression): new procedure.
11824 (Resolve_Actuals): For an actual that is a Raise_Expression,
11825 set the type to that of the formal.
11826 * sem_type.adb (Find_Unique_Type): If one of the operands is a
11827 Raise_Expression, return type of the other operand.
11828
118292014-01-24 Ed Schonberg <schonberg@adacore.com>
11830
11831 * sem_aggr.adb (Resolve_Record_Aggregate): If a scalar
11832 component of the record has a type with a default aspect, and
11833 the corresponding aggregate component is initiaized with a box,
11834 use the default value in the rewritten aggregate.
11835
118362014-01-24 Tristan Gingold <gingold@adacore.com>
11837
11838 * s-interr.ads, s-interr.adb, s-interr-hwint.adb, s-interr-vms.adb,
11839 s-interr-sigaction.adb,
11840 s-interr-dummy.adb (Install_Restricted_Handlers): Add Prio parameter.
11841 * exp_ch9.adb (Make_Initialize_Protection): Add Prio parameter
11842 to the call to Install_Restricted_Handlers.
11843
118442014-01-24 Emmanuel Briot <briot@adacore.com>
11845
11846 * prj-nmsc.adb (Check_File): Add protection when the source is
11847 not fully initialized.
11848
4a854847
AC
118492014-01-24 Ed Schonberg <schonberg@adacore.com>
11850
11851 * sem_util.adb (Is_Post_State): In a postcondition, a selected
11852 component that denotes an implicit dereference is a reference
11853 to the post state of the subprogram.
11854
118552014-01-24 Robert Dewar <dewar@adacore.com>
11856
11857 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): SPARK_Mode OFF
11858 for generated subprograms.
11859 (Analyze_Subprogram_Specification): Ditto.
11860
118612014-01-24 Vincent Celier <celier@adacore.com>
11862
11863 * prj-dect.adb (Check_Attribute_Allowed): Detect more forbidden
11864 attributes in package Builder of aggregate and aggregate library
11865 projects.
11866 * prj-nmsc.adb (Process_Naming_Scheme.Check.Check_Aggregate):
11867 Remove procedure (Process_Naming_Scheme.Check.Check_Aggregated):
11868 Remove parameters. Change error message from "... externally
11869 build library ..." to "... externally built project ...".
11870 (Process_Naming_Scheme.Check): Do not do any check in aggregate
11871 project, as attribute Library_Dir and Library_Name have already
11872 been detected as forbidden.
11873
118742014-01-24 Vincent Celier <celier@adacore.com>
11875
11876 * prj-env.adb (Find_Project): If cached project path is not in
11877 project directory, look in current directory first and use cached
11878 project path only if project is not found in project directory.
11879
a6ae518f
RD
118802014-01-24 Robert Dewar <dewar@adacore.com>
11881
11882 * sem_util.adb, lib-xref.adb: Correct false positive warnings.
11883
0bd38d94
AC
118842014-01-24 Vincent Celier <celier@adacore.com>
11885
11886 * projects.texi: Document that aggregate projects are only
11887 supported by gprbuild, but not by gnatmake. Document that the
11888 only attribute Switches in package Binder of aggregate projects
11889 will be ignored if its index is not others. Document that
11890 attribute Global_Config_File is allowed in package Binder of
11891 aggregate projects.
11892
118932014-01-24 Robert Dewar <dewar@adacore.com>
11894
11895 * sem_prag.adb: Minor code reorganization.
11896 * sem_util.adb: Minor fix of potential latent bug in Is_LHS.
11897
0567ae8d
AC
118982014-01-24 Pascal Obry <obry@adacore.com>
11899
11900 * prj-attr.adb, projects.texi, snames.ads-tmpl: Add Excluded_Patterns
11901 attribute definition.
11902
119032014-01-24 Vincent Celier <celier@adacore.com>
11904
11905 * makeutl.adb (Queue.Insert_No_Roots): In gprbuild, do not put
11906 in the Queue the same source (same path, same multi-source index)
11907 from the same project file, to avoid compiling several times
11908 the same source.
11909
119102014-01-24 Eric Botcazou <ebotcazou@adacore.com>
11911
11912 * einfo.ads (First_Rep_Item): Remove obsolete stuff.
11913 (Has_Gigi_Rep_Item): Likewise.
11914 * sem_prag.adb (Analyze_Pragma) <Pragma_Linker_Section>: Do not set
11915 Has_Gigi_Rep_Item for objects.
11916 * gcc-interface/decl.c (prepend_one_attribute_to): Rename into...
11917 (prepend_one_attribute): ...this.
11918 (prepend_one_attribute_pragma): New function extracted from...
11919 (prepend_attributes): ...here. Swap the parameters for consistency.
11920 (gnat_to_gnu_entity): Adjust calls to prepend_one_attribute_to and to
11921 prepend_attributes.
11922 <object>: Deal with a pragma Linker_Section on a constant
11923 or variable. <E_Function>: Deal with a pragma Linker_Section
11924 on a subprogram.
11925 (get_minimal_subprog_decl): Adjust calls to prepend_one_attribute_to.
11926
119272014-01-24 Vincent Celier <celier@adacore.com>
11928
11929 * opt.ads: Minor comment update.
11930
4437ea95
AC
119312014-01-24 Robert Dewar <dewar@adacore.com>
11932
11933 * sem_prag.adb (Analyze_Input_Output): Add missing error check
11934 for junk operand.
11935 * sem_util.adb (Is_Refined_State): Add defense against junk
11936 tree from error.
11937
119382014-01-24 Pascal Obry <obry@adacore.com>
11939
11940 * projects.texi: Removes Build_Slaves attribute documentation.
11941
ea0f1fc8
AC
119422014-01-23 Robert Dewar <dewar@adacore.com>
11943
11944 * opt.adb (Register_Opt_Config_Switches): Save SPARK_Mode_Pragma
11945 setting.
11946
119472014-01-23 Ed Schonberg <schonberg@adacore.com>
11948
11949 * sem_util.adb (Is_Potentially_Unevaluated): Predicate only
11950 applies to expressions that come from source.
11951 * sem_attr.adb (Analyze_Attribute, case 'Old): Improve error
11952 message.
11953 (Analyze_Attribute, case 'Loop_Entry): Apply SPARK 2014 legality
11954 rule regarding potentially unevaluated expressions, to prefix
11955 of attribute.
11956
19992053
AC
119572014-01-23 Ed Schonberg <schonberg@adacore.com>
11958
11959 * exp_util.adb (Make_Invqriant_Call): If type of expression is
11960 a private extension, get invariant from base type.
11961
119622014-01-23 Robert Dewar <dewar@adacore.com>
11963
11964 * sem_util.adb, sem_attr.adb: Minor reformatting.
11965
119662014-01-23 Robert Dewar <dewar@adacore.com>
11967
11968 * opt.adb (Save_Opt_Config_Switches): Save SPARK_Mode_Pragma
11969 (Restore_Opt_Config_Switches): Restore SPARK_Mode_Pragma.
11970 * sem.adb (Semantics): Remove save/restore of
11971 SPARK_Mode[_Pragma]. Not needed since already done in
11972 Save/Restore_Opt_Config_Switches.
11973
119742014-01-23 Robert Dewar <dewar@adacore.com>
11975
11976 * gnat_rm.texi, einfo.adb, einfo.ads, sem_prag.adb, gnat_ugn.texi,
11977 freeze.adb, repinfo.adb, aspects.adb, aspects.ads, sem_ch13.adb:
11978 Linker_Section enhancements.
11979
c733429f
AC
119802014-01-23 Tristan Gingold <gingold@adacore.com>
11981
11982 * gnat_rm.texi: Minor editing.
11983
119842014-01-23 Robert Dewar <dewar@adacore.com>
11985
11986 * opt.adb (Set_Opt_Config_Switches): Reset SPARK mode for
11987 with'ed internal units.
11988 * sem.adb (Semantics): Save and restore SPARK_Mode[_Pragma].
11989
119902014-01-23 Javier Miranda <miranda@adacore.com>
11991
11992 * lib-xref.adb (Generate_Reference): As part of processing the
11993 "end-of-spec" reference generate an extra reference to the first
11994 private entity of the package.
11995 * xr_tabls.adb (Add_Reference): No action needed for the extra
11996 'E' reference associated; similar to the processing of the
11997 'e' reference.
11998
119992014-01-23 Bob Duff <duff@adacore.com>
12000
12001 * gnat_ugn.texi: Change "--&pp off" to "--!pp off".
12002
120032014-01-23 Ed Schonberg <schonberg@adacore.com>
12004
12005 * sem_util.ads, sem_util.adb (Is_Potentially_Unevaluated): new
12006 predicate to implement rule given in 6.1.1 (20/3).
12007 * sem_attr.adb (Analyze_Attribute, case 'Old): Reject prefix of
12008 'Old in a postcondition, if it is potentially unevaluated and
12009 it is not an entity name.
12010
8bdc02c2
BD
120112014-01-23 Bob Duff <duff@adacore.com>
12012
12013 * gnat_ugn.texi: Document the new "--&pp off" feature of gnatpp.
12014
e949ee22
AC
120152014-01-23 Robert Dewar <dewar@adacore.com>
12016
12017 * gnatlink.adb (Gnatlink): Fix problem of generating bad name
12018 msg on VMS.
12019
120202014-01-23 Bob Duff <duff@adacore.com>
12021
12022 * g-dynhta.ads: Minor comment fix.
12023
120242014-01-23 Yannick Moy <moy@adacore.com>
12025
12026 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Inherit SPARK_Mode
12027 from spec on body only when not already inherited on spec. Set
12028 SPARK_Mode from context on body without previous spec. *
12029 * sem_prag.adb (Analyze_Pragma): Check placement of pragma on
12030 library-level entities. Correct retrieval of entity from
12031 declaration, for cases where the declaration is not a unit.
12032 * sem_ch12.adb (Instantiate_Object): Avoid
12033 calling Is_Volatile_Object on an empty node.
12034
545d3e65
RD
120352014-01-23 Robert Dewar <dewar@adacore.com>
12036
12037 * gnatlink.adb (Gnatlink): Check for suspicious executable file
12038 names on windows.
12039
120402014-01-23 Robert Dewar <dewar@adacore.com>
12041
12042 * a-ngelfu.ads: Remove bad uses of AND which should be AND THEN.
12043 * sem_res.adb (Check_No_Direct_Boolean_Operators): Don't give
12044 style errors in instances.
12045 * g-dynhta.ads (Static_HTable): Comment updates.
12046
cc55f9be
VC
120472014-01-23 Vincent Celier <celier@adacore.com>
12048
12049 * prj-conf.adb (Get_Or_Create_Configuration_File): Do not attempt
12050 to find a configuration project file when Config_File_Name is
12051 No_Configuration_File.
12052 * prj-conf.ads (No_Configuration_File): New constant String.
12053 * prj-pars.adb (Parse): Call Get_Or_Create_Configuration_File
12054 with Config_File_Name set to No_Configuration_File, so that
12055 no existing configuration project file will be used, and the
12056 configuration project will be only created in memory when
12057 Add_Default_GNAT_Naming_Scheme is called.
12058 * projects.texi: Minor reformatting.
12059
225a0c5c
VC
120602014-01-23 Vincent Celier <celier@adacore.com>
12061
12062 * prj-conf.adb (Get_Or_Create_Configuration_File): Never parse
12063 a config project file if On_Load_Config is not null.
12064 * prj-pars.adb: Minor comment changes.
12065
89253742
ES
120662014-01-23 Ed Schonberg <schonberg@adacore.com>
12067
12068 * lib-xref.adb (Output_References): Output progenitors of
12069 synchronized tagged types, for source navigation.
12070
53c53f6d
AC
120712014-01-23 Robert Dewar <dewar@adacore.com>
12072
12073 * exp_util.adb, sinfo.adb, sinfo.ads, sem.adb, sem_res.adb,
12074 expander.adb, exp_ch11.adb, exp_ch11.ads, sem_ch11.adb, sem_ch11.ads,
12075 sprint.adb, sprint.ads: Remove unused node N_Subprogram_Info.
12076
120772014-01-23 Emmanuel Briot <briot@adacore.com>
12078
12079 * prj-conf.adb (Get_Or_Create_Configuration_File): call
12080 On_Load_Config later.
12081
120822014-01-23 Hristian Kirtchev <kirtchev@adacore.com>
12083
12084 * sem_ch3.adb (Analyze_Declarations): Do not
12085 generate the spec of the late primitive in ASIS mode. Add two
12086 comments to explain the special cases when the expansion is
12087 not performed.
12088
120892014-01-23 Robert Dewar <dewar@adacore.com>
12090
12091 * sem_util.adb (Note_Possible_Modification): Fix error of
12092 misbehaving for implicit dereference cases in -gnatc mode.
12093
120942014-01-23 Emmanuel Briot <briot@adacore.com>
12095
12096 * prj-pars.adb: Minor reformatting.
12097
3b8056a5
AC
120982014-01-22 Ed Schonberg <schonberg@adacore.com>
12099
12100 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): A subprogram
12101 body generated for an expression function within a protected body
12102 needs a set of renaming declarations if the expression function
12103 comes from source.
12104
121052014-01-22 Ed Schonberg <schonberg@adacore.com>
12106
12107 * lib-xref.adb (Get_Type_Reference): In semantics-only mode,
12108 list interface progenitor of a tagged concurrent type, for better
12109 source navigation.
12110
121112014-01-22 Robert Dewar <dewar@adacore.com>
12112
12113 * lib.adb (In_Extended_Main_Code_Unit): Return False for
12114 Standard_Location.
12115 (In_Extended_Main_Source_Unit): Return False for Standard_Location.
12116 * lib.ads (In_Extended_Main_Code_Unit): Add documentation on
12117 treatment of Slocs No_Location and Standard_Location.
12118 * restrict.adb (Check_Restriction_No_Dependence): Explicitly
12119 check for entity with Standard_Location Sloc, rather than relying
12120 on Lib routines to do that.
12121 * sem_res.adb (Resolve_Call): Implement SPARK_05 restriction
12122 that a call cannot occur before a later occuring body within
12123 the same unit.
12124
fba9ebfc
AC
121252014-01-22 Thomas Quinot <quinot@adacore.com>
12126
12127 * rtsfind.adb: Update comment.
12128
121292014-01-22 Hristian Kirtchev <kirtchev@adacore.com>
12130
12131 * sem_aux.ads, sem_aux.adb (Is_Body): New routine.
12132 * sem_ch3.adb (Analyze_Declarations): Add local variable
12133 Body_Seen. Generate the spec of a late controlled
12134 primitive body that is about to freeze its related type.
12135 (Handle_Late_Controlled_Primitive): New routine.
12136
121372014-01-22 Robert Dewar <dewar@adacore.com>
12138
12139 * a-stream.adb: Minor reformatting.
12140
121412014-01-22 Ed Schonberg <schonberg@adacore.com>
12142
12143 * sem_ch8.adb (From_Actual_Package): Introduce a recursive
12144 sub-procedure Declared_In_Actual to handle properly the visibility
12145 of actuals in actual packages, that are themselves actuals to a
12146 actual package of the current instance. This mimics properly the
12147 visibility of formals of formal packages declared with a box,
12148 within the corresponding generic unit.
12149
121502014-01-22 Robert Dewar <dewar@adacore.com>
12151
12152 * checks.adb: Do not assume that a volatile variable is valid.
12153
121542014-01-22 Thomas Quinot <quinot@adacore.com>
12155
12156 * g-catiio.ads (Image, Value): Clarify that these functions
12157 operate in the local time zone. Minor documentation update.
12158
121592014-01-22 Thomas Quinot <quinot@adacore.com>
12160
12161 * csets.adb, csets.ads, opt.ads: Minor documentation fixes.
12162
b2834fbd
AC
121632014-01-22 Robert Dewar <dewar@adacore.com>
12164
12165 * sem_aux.adb, sem_aux.ads, sem_ch3.adb (Has_Unconstrained_Elements):
12166 Moved to sem_aux.adb.
12167
121682014-01-22 Robert Dewar <dewar@adacore.com>
12169
12170 * vms_data.ads: Minor reformatting.
12171
121722014-01-22 Robert Dewar <dewar@adacore.com>
12173
12174 * debug.adb: Document messages affected by -gnatd.E including
12175 the new ones that relate to late definition of equality.
12176 * sem_ch6.adb (Check_Untagged_Equality): In Ada 2012 mode, if
12177 debug flag -gnatd.E is set, then generate warnings rather than
12178 errors.
12179 (Check_Untagged_Equality): In earlier versions of Ada,
12180 generate warnings if Warn_On_Ada_2012_Incompatibility flag is set.
12181
121822014-01-22 Robert Dewar <dewar@adacore.com>
12183
12184 * sem_prag.adb (Usage_Error): Output additional messages for
12185 unconstrained OUT parameters lacking an input dependency.
12186
121872014-01-22 Robert Dewar <dewar@adacore.com>
12188
12189 * sem_ch4.adb: Minor reformatting.
12190
121912014-01-22 Robert Dewar <dewar@adacore.com>
12192
12193 * restrict.ads: Minor reformatting.
12194 * sem_res.adb (Resolve_Call): Check for SPARK_05 restriction that
12195 forbids a call from within a subprogram to the same subprogram.
12196
121972014-01-22 Thomas Quinot <quinot@adacore.com>
12198
12199 * a-stream.ads (Read_SEA, Write_SEA): New subprograms, optimized
12200 stream attributes for Stream_Element_Array.
12201 * a-stream.adb (Read_SEA, Write_SEA): Bodies for the above.
12202 * rtsfind.adb (Check_CRT): Do not reject a reference to an entity
12203 defined in the current scope.
12204
d4129bfa
AC
122052014-01-22 Robert Dewar <dewar@adacore.com>
12206
12207 * debug.adb, exp_ch4.adb, erroutc.adb: Minor reformatting.
12208
122092014-01-22 Thomas Quinot <quinot@adacore.com>
12210
12211 * sem_ch7.adb, sem_ch8.adb, exp_ch3.adb: Minor reformatting.
12212
122132014-01-22 Thomas Quinot <quinot@adacore.com>
12214
12215 * sem_ch3.adb (Analyze_Object_Declaration): For a constant
12216 declaration initialized with a function call, whose type
12217 has variable size, need to remove side effects so that the
12218 initialization expression becomes a dereference of a temporary
12219 reference to the function result.
12220
b6f36bf8
YM
122212014-01-22 Yannick Moy <moy@adacore.com>
12222
12223 * errout.adb (Initialize): Remove trick to add dummy entry
12224 in Warnings table.
12225 * erroutc.adb (Set_Warnings_Mode_Off,
12226 Set_Warnings_Mode_On): Do nothing if warnings are suppressed by
12227 command line switch.
12228 * opt.ads (Warning_Mode): Document behavior
12229 wrt pragma Warnings, in normal mode and in GNATprove_Mode.
12230
113a62d9
RD
122312014-01-22 Robert Dewar <dewar@adacore.com>
12232
12233 * sem_ch3.adb, errout.adb, erroutc.adb: Minor reformatting.
12234
122352014-01-22 Robert Dewar <dewar@adacore.com>
12236
12237 * sem_ch13.adb (Check_Pool_Size_Clash): New procedure
12238 (Analyze_Attribute_Definition_Clause, case Storage_Pool): call
12239 Check_Pool_Size_Clash (Analyze_Attribute_Definition_Clause,
12240 case Storage_Size): call Check_Pool_Size_Clash.
12241
f5f6d8d7
AC
122422014-01-22 Robert Dewar <dewar@adacore.com>
12243
12244 * sem_ch3.adb, exp_util.adb, sem_dim.adb, sem_elab.adb, sem_ch8.adb,
12245 sem_eval.ads: Minor reformatting.
12246
122472014-01-22 Thomas Quinot <quinot@adacore.com>
12248
12249 * sem_eval.adb (Compile_Time_Known_Bounds): Return False for
12250 Any_Composite to prevent cascaded errors.
12251
122522014-01-22 Yannick Moy <moy@adacore.com>
12253
12254 * errout.adb (Initialize): Do not insert special entry in Warnings
12255 table in GNATprove_Mode.
12256 * erroutc.adb (Set_Warnings_Mode_On): Add info in Warnings table in
12257 GNATprove_Mode.
12258 * gnat1drv.adb (Adjust_Global_Switches): Do not suppress frontend
12259 warnings anymore.
12260
2e70d415
AC
122612014-01-22 Robert Dewar <dewar@adacore.com>
12262
12263 * sem_prag.adb (Analyze_Initializes_In_Decl_Part): Handle null
12264 initializes case.
12265
122662014-01-22 Robert Dewar <dewar@adacore.com>
12267
12268 * snames.ads-tmpl: Update header.
12269
122702014-01-22 Thomas Quinot <quinot@adacore.com>
12271
12272 * exp_util.adb (Insert_Actions): When inserting actions on a
12273 short circuit operator that has already been analyzed, do not park
12274 actions in node; instead introduce an N_Expression_With_Actions
12275 and insert actions immediately.
12276 Add guard for unexpected case of climbing up through statement
12277 in Actions list of an N_Expression_With_Actions.
12278 * sem_elab.adb (Insert_Elab_Check): Remove complex
12279 specialized circuitry for the case where the context is already
12280 analyzed, as it is not needed and introduces irregularities in
12281 finalization. Instead rely on the above change to Insert_Actions
12282 to ensure that late insertion on short circuit operators works
12283 as expected.
12284
122852014-01-22 Ed Schonberg <schonberg@adacore.com>
12286
12287 * sem_ch4.adb (Operator_Check): Improve error message when an
12288 operand of concatenation is an access type.
12289
122902014-01-22 Thomas Quinot <quinot@adacore.com>
12291
12292 * sem_dim.adb (Analyze_Dimension_Identifier): Add guard against
12293 cascaded error.
12294
122952014-01-22 Ed Schonberg <schonberg@adacore.com>
12296
12297 * sem_ch8.adb (Find_Selected_Component): Handle properly the case
12298 of an expanded name in a proper body, whose prefix is a package
12299 in the context of the proper body, when there is a homonym of
12300 the package declared in the parent unit.
12301
1250f802
RD
123022014-01-22 Robert Dewar <dewar@adacore.com>
12303
12304 * sem_warn.adb (Check_Use_Clause): Don't give no entities used
12305 msg if errors found.
12306 (Check_One_Unit): Same change.
12307
123082014-01-22 Robert Dewar <dewar@adacore.com>
12309
12310 * ug_words: Add missing/wrong entries for VMS warning switches.
12311 * sem_prag.adb (Check_Duplicate_Pragma): Avoid flagging parent type.
12312
54533a0b
AC
123132014-01-22 Jerome Guitton <guitton@adacore.com>
12314
12315 * mlib-tgt-specific-vxworks.adb (Get_Target_Suffix): Replace xscale by
12316 arm.
12317
123182014-01-22 Robert Dewar <dewar@adacore.com>
12319
12320 * gnat_rm.texi, gnat_ugn.texi: Document passive task optimization
12321
3044bbe4
EB
123222014-01-22 Eric Botcazou <ebotcazou@adacore.com>
12323
12324 * gcc-interface/Makefile.in: Minor fixes.
12325
71affc54
AC
123262014-01-21 Robert Dewar <dewar@adacore.com>
12327
12328 * par-ch4.adb (P_If_Expression): Rewritten to improve error recovery.
12329 * par-ch5.adb (P_Condition): New version with expression prescanned.
12330 * par.adb (P_Condition): New version with expression prescanned.
12331
123322014-01-21 Robert Dewar <dewar@adacore.com>
12333
12334 * gnat_rm.texi: Document that Allow_Integer_Address is ignored
12335 if Address is not a private type.
12336 * sem_prag.adb (Analyze_Pragma, case Allow_Integer_Address):
12337 Ignore pragma if System.Address is not a private type.
12338
123392014-01-21 Arnaud Charlet <charlet@adacore.com>
12340
12341 * namet.ads (Name_Len): Initialize to 0 to avoid accessing an
12342 uninitialized value.
12343
ef1c0511
AC
123442014-01-21 Thomas Quinot <quinot@adacore.com>
12345
12346 * gnat_rm.texi (Scalar_Storage_Order): Update documentation.
12347
123482014-01-21 Ed Schonberg <schonberg@adacore.com>
12349
12350 * sem_ch12.adb (Set_Instance_Env): In Ada 2012 mode, preserve
12351 the value of Assertions_Enabled flag when compiling an instance of
12352 an internal unit. This facilitates the use of pre/postconditions
12353 in generic internal units, such as the new elementary function
12354 libraries.
12355
123562014-01-21 Robert Dewar <dewar@adacore.com>
12357
12358 * exp_aggr.adb: Minor reformatting.
12359 * sem_attr.adb: Minor reformatting.
12360 * sem_res.adb: Minor comment addition.
12361 * einfo.adb: Minor comment updates.
12362 * freeze.adb: Minor reformatting and code reorganization.
12363
123642014-01-21 Ed Schonberg <schonberg@adacore.com>
12365
12366 * par-ch4.adb (P_If_Expression): Handle more gracefully an
12367 elsif clause that does not have an else part.
12368
637a41a5
AC
123692014-01-21 Robert Dewar <dewar@adacore.com>
12370
12371 * checks.adb, sem_util.ads, sem_ch4.adb: Minor reformatting.
12372 * gcc-interface/Makefile.in: clean up target pairs.
12373
123742014-01-21 Pascal Obry <obry@adacore.com>
12375
12376 * projects.texi: Minor typo fix.
12377
123782014-01-21 Thomas Quinot <quinot@adacore.com>
12379
12380 * freeze.adb (Check_Component_Storage_Order): If a record type
12381 has an explicit Scalar_Storage_Order attribute definition clause,
12382 reject any component that itself is of a composite type and does
12383 not have one.
12384
123852014-01-21 Ed Schonberg <schonberg@adacore.com>
12386
12387 * sem_ch10.adb (Generate_Parent_Reference): Make public so it
12388 can be used to generate proper cross-reference information for
12389 the parent units of proper bodies.
12390
123912014-01-21 Thomas Quinot <quinot@adacore.com>
12392
12393 * exp_pakd.adb (Expand_Packed_Element_Set,
12394 Expand_Packed_Element_Reference): No byte swapping required in
12395 the front-end for the case of a reverse storage order array,
12396 as this is now handled uniformly in the back-end. However we
12397 still need to swap back an extracted element if it is itself a
12398 nested composite with reverse storage order.
12399
497716fe
AC
124002014-01-21 Hristian Kirtchev <kirtchev@adacore.com>
12401
12402 * sem_prag.adb (Analyze_External_Property): Add processing for "others".
12403 (Analyze_Pragma): Update the grammar of pragma Abstract_State to
12404 include "others".
12405
124062014-01-21 Arnaud Charlet <charlet@adacore.com>
12407
12408 * gnat_ugn.texi: Minor updates.
12409
fb1fdf7d
AC
124102014-01-21 Thomas Quinot <quinot@adacore.com>
12411
12412 * exp_pakd.adb: Update comment, minor reformatting.
12413
124142014-01-21 Hristian Kirtchev <kirtchev@adacore.com>
12415
12416 * sem_ch3.adb (Analyze_Variable_Contract): Trigger the volatile
12417 object check when SPARK_Mode is on.
12418 * sem_ch6.adb (Process_Formals): Trigger the volatile object
12419 check when SPARK_Mode is on.
12420 * sem_ch12.adb (Instantiate_Object): Trigger the volatile object
12421 check when SPARK_Mode is on.
12422 * sem_ch13.adb (Analyze_Aspect_Specifications): Insert the
12423 corresponding pragma of aspect SPARK_Mode in the visible
12424 declarations of a package declaration.
12425 * sem_prag.adb (Analyze_Pragma): Trigger the volatile object
12426 check when SPARK_Mode is on.
12427 * sem_res.adb (Resolve_Actuals): Trigger the volatile object
12428 check when SPARK_Mode is on.
12429 (Resolve_Entity_Name): Trigger
12430 the volatile object check when SPARK_Mode is on.
12431
84f80f5b
AC
124322014-01-21 Robert Dewar <dewar@adacore.com>
12433
12434 * sem_ch3.adb, sem_prag.adb, sem_prag.ads, sem_ch12.adb, sem_res.adb,
12435 sem_ch6.adb, a-except-2005.adb: Minor reformatting.
12436
124372014-01-21 Ed Schonberg <schonberg@adacore.com>
12438
12439 * exp_ch3.adb (Expand_N_Object_Declaration): When a class-wide
12440 object is declared, it is rewritten as a renaming of an dynamic
12441 expression that wraps the initial value. The renaming declaration
12442 is first given an internal name, to prevent collisions with the
12443 entity already declared, and then the name is modified to reflect
12444 the original one. the modification of the name must preserve
12445 the source location of the original, to prevent spurious errors
12446 when compiling with style checks if the declaration involves
12447 more than one entity.
12448
6c3c671e
AC
124492014-01-21 Hristian Kirtchev <kirtchev@adacore.com>
12450
12451 * aspects.adb Add entries for Async_Readers, Async_Writers,
12452 Effective_Reads and Effective_Writes in table Canonical_Aspect.
12453 * aspects.ads Add entries for Async_Readers, Async_Writers,
12454 Effective_Reads and Effective_Writes in tables Aspect_Id,
12455 Aspect_Names, Aspect_Delay and Implementation_Defined_Aspect.
12456 * atree.adb (Ekind_In): New version with 8 parameters.
12457 (Node34): New routine.
12458 (Set_Node34): New routine.
12459 * atree.ads (Ekind_In): New version with 8 parameters.
12460 (Node34): New routine.
12461 (Set_Node34): New routine.
12462 * einfo.adb Contract is now Node34.
12463 (Contract): Update the assertion and node usage.
12464 (Get_Pragma): Include pragmas Async_Readers, Async_Writers,
12465 Effective_Reads and Effective_Writes.
12466 (Set_Contract): Update the assertion and node usage.
12467 (Write_Field24_Name): Remove the output for a contract.
12468 (Write_Field34_Name): Add output for a contract.
12469 * einfo.ads Contract is now Node34. Update the comment on
12470 attribute usage and related node structures.
12471 (Get_Pragma): Update the comment on usage.
12472 * par-prag.adb (Prag): Pragmas Async_Readers, Async_Writers,
12473 Effective_Reads and Effective_Writes do not require special
12474 processing by the parser.
12475 * sem_ch3.adb (Analyze_Variable_Contract): New routine.
12476 (Analyze_Declarations): Analyze the contract of a variable at
12477 the end of the declarative region.
12478 (Analyze_Object_Declaration): Create a contract for a variable.
12479 * sem_ch6.adb (Analyze_Subprogram_Contract): Update the retrieval
12480 of classification pragmas.
12481 (Process_Formals): Detect an illegal
12482 use of a volatile object as a formal in a function.
12483 * sem_ch12.adb (Instantiate_Object): Detect an illegal use of
12484 a volatile object as an actual in generic instantiation.
12485 * sem_prag.adb Add entries for Async_Readers, Async_Writers,
12486 Effective_Reads and Effective_Writes in table Sig_Flags.
12487 (Analyze_External_State_In_Decl_Part): New routine.
12488 (Analyze_Global_Item): Detect an illegal use of a volatile object
12489 as a global item of a function.
12490 (Analyze_Pragma): Reimplement
12491 pragma Abstract_State. Add support for pragmas Async_Readers,
12492 Async_Writers, Effective_Reads and Effective_Writes.
12493 (Check_External_Properties): New routine.
12494 * sem_prag.ads (Analyze_External_State_In_Decl_Part): New routine.
12495 (Check_External_Properties): New routine.
12496 * sem_res.adb (Resolve_Actuals): Detect an illegal use of a
12497 volatile object as an actual in a call.
12498 (Resolve_Entity_Name):
12499 Add local variables Par, Prev and Usage_OK. Detect illegal
12500 contexts of volatile objects.
12501 * sem_util.adb (Add_Contract_Item): Add support for
12502 pragmas associated with the contract of a variable.
12503 (Async_Readers_Enabled): New routine.
12504 (Async_Writers_Enabled): New routine.
12505 (Effective_Reads_Enabled): New routine.
12506 (Effective_Writes_Enabled): New routine.
12507 (Has_Enabled_Property):
12508 New routine.
12509 (Is_Unchecked_Conversion_Instance): New routine.
12510 (Is_Volatile_Object): Add support for entities that may denote
12511 a volatile object.
12512 * sem_util.ads (Add_Contract_Item): Update the
12513 comment on usage.
12514 (Async_Readers_Enabled): New routine.
12515 (Async_Writers_Enabled): New routine.
12516 (Effective_Reads_Enabled): New routine.
12517 (Effective_Writes_Enabled): New routine.
12518 (Is_Unchecked_Conversion_Instance): New routine.
12519 * sinfo.ads Update the comment on the structure of N_Contract.
12520 * snames.ads-tmpl Add predefined names for Async_Readers,
12521 Async_Writers, Effective_Reads and Effective_Writes. Add
12522 pragma ids for Async_Readers, Async_Writers, Effective_Reads
12523 and Effective_Writes.
12524
125252014-01-21 Robert Dewar <dewar@adacore.com>
12526
12527 * exp_ch4.adb (Eval_Op_Expon): Use CRT_Safe_Compile_Time_Known_Value
12528 * sem_eval.adb (Compile_Time_Known_Value): Remove special
12529 handling of CRT mode (CRT_Safe_Compile_Time_Known_Value): New
12530 function (Eval_Op_Expon): Add CRT_Safe in call to Test_Foldable
12531 (Test_Foldable): Add CRT_Safe parameter
12532 * sem_eval.ads (Compile_Time_Known_Value): Remove special
12533 handling of CRT mode.
12534 (CRT_Safe_Compile_Time_Known_Value): New function.
12535
084c2203
RD
125362014-01-21 Robert Dewar <dewar@adacore.com>
12537
12538 * sem_prag.adb (Analyze_Pragma, case SPARK_Mode): Fix problem
12539 with pragma or aspect that applies to package spec or subprogram
12540 spec.
12541
579847c2
AC
125422014-01-21 Robert Dewar <dewar@adacore.com>
12543
12544 * exp_aggr.adb: Minor reformatting.
12545
125462014-01-21 Johannes Kanig <kanig@adacore.com>
12547
12548 * gnat1drv.adb (Gnat1drv) remove obsolete reference to -gnatd.H.
12549
125502014-01-21 Bob Duff <duff@adacore.com>
12551
12552 * gnat_ugn.texi: Document the "checks" attribute in gnat2xml.
12553
125542014-01-21 Steve Baird <baird@adacore.com>
12555
12556 * gnat_rm.texi: Improve description of SPARK_Mode pragma.
12557
125582014-01-21 Vincent Celier <celier@adacore.com>
12559
12560 * prj-part.adb (Parse_Single_Project): Accept to extend a project
12561 if it has only be imported by an project being extended. When a
12562 project that has only been imported by a project being extended
12563 is imported by another project that is not being extended,
12564 reset the previous indication, so that it will be an error if
12565 this project is extended later.
12566 * prj-tree.adb (Create_Project): Include component From_Extended
12567 in table Projects_HT
12568 * prj-tree.ads (Project_Name_And_Node): New Boolean component
12569 From_Extended
12570
125712014-01-21 Robert Dewar <dewar@adacore.com>
12572
12573 * atree.ads, atree.adb: Add Node33 and Set_Node33.
12574 * einfo.ads, einfo.adb (SPARK_Pragma): New field (SPARK_Aux_Pragma):
12575 New field (SPARK_Pragma_Inherited): New flag
12576 (SPARK_Aux_Pragma_Inherited): New flag (SPARK_Mode_Pragmas):
12577 Removed.
12578 * lib.ads, lib.adb: Remove SPARK_Mode_Pragma, no longer used.
12579 * opt.ads (SPARK_Mode_Pragma): New global variable.
12580 * sem.ads: Add Save_SPARK_Mode_Pragma field to Scope_Stack_Entry.
12581 * sem_ch3.adb: Use new SPARK_Mode data structures.
12582 * sem_ch6.adb: Set SPARK_Mode fields in subprogram specs and bodies.
12583 * sem_ch7.adb: Set SPARK_Mode fields in package spec and body entities.
12584 * sem_ch8.adb (Push_Scope): Save SPARK_Mode_Pragma.
12585 (Pop_Scope): Restore SPARK_Mode_Pragma.
12586 * sem_prag.adb (Analyze_Pragma, case SPARK_Mode): Rewrite for
12587 new data structures.
12588
125892014-01-21 Arnaud Charlet <charlet@adacore.com>
12590
12591 * back_end.adb: Undo previous change, not needed. Minor reformatting.
12592
376e7d14
AC
125932014-01-21 Thomas Quinot <quinot@adacore.com>
12594
12595 * exp_ch5.adb: Fix comment.
12596 * switch-c.adb: Minor comment update.
12597 * exp_ch3.adb: Minor reformatting.
12598
125992014-01-21 Arnaud Charlet <charlet@adacore.com>
12600
12601 * back_end.adb (Scan_Compiler_Arguments): Do not store object
12602 filename in gnatprove mode.
12603
126042014-01-21 Thomas Quinot <quinot@adacore.com>
12605
12606 * sinfo.ads (No_Ctrl_Actions): Clarify documentation (flag also
12607 suppresses usage of primitive _assign for tagged types).
12608 * exp_aggr.adb (Build_Array_Aggr_Code.Gen_Assign): Set
12609 No_Ctrl_Actions for a tagged type that does not require
12610 finalization, as we want to disable usage of _assign (which
12611 may cause undesirable discriminant checks on an uninitialized,
12612 invalid target).
12613
126142014-01-21 Ed Schonberg <schonberg@adacore.com>
12615
12616 * sem_prag.adb: Reject invariant'class on completion.
12617
8d81fb4e
AC
126182014-01-21 Javier Miranda <miranda@adacore.com>
12619
12620 * exp_ch3.adb (Build_Init_Procedure): For
12621 derivations of interfaces, do not move the the initialization
12622 of the _parent field since such assignment is not generated.
12623
126242014-01-21 Ed Schonberg <schonberg@adacore.com>
12625
12626 * sem_res.adb (Rewrite_Renamed_Operator): Do not replace entity
12627 with the operator it renames if we are within an expression of
12628 a pre/postcondition, because the expression will be reanalyzed
12629 at a later point, and the analysis of the renaming may affect
12630 the visibility of the operator when in an instance.
12631
126322014-01-21 Robert Dewar <dewar@adacore.com>
12633
12634 * sinfo.ads, sinfo.adb: Change Do_Discriminant_Check to use new Flag1.
12635 Add this flag to type conversion nodes and assignment nodes.
12636 * treepr.adb: Deal properly with Flag 1,2,3.
12637 * treeprs.adt: Minor comment update.
12638
126392014-01-21 Robert Dewar <dewar@adacore.com>
12640
12641 * sem_eval.adb (Compile_Time_Known_Value): Add Ignore_CRT
12642 parameter.
12643 * sem_eval.ads (Compile_Time_Known_Value): Add Ignore_CRT
12644 parameter, completely rewrite spec.
12645
126462014-01-21 Ed Schonberg <schonberg@adacore.com>
12647
12648 * sem_ch10.adb (Install_Withed_Unit): If the unit is a subprogram
12649 instance that is inlined, it may have been rewritten as a wrapper
12650 package. In that case the unit that must be made visible is the
12651 related instance of the package.
12652
126532014-01-21 Arnaud Charlet <charlet@adacore.com>
12654
12655 * exp_ch9.adb (Expand_N_Selective_Accept.Add_Accept): Refine
12656 previous change in codepeer mode.
12657
6b6041ec
AC
126582014-01-21 Arnaud Charlet <charlet@adacore.com>
12659
12660 * exp_ch9.adb (Expand_N_Selective_Accept.Add_Accept): Always add
12661 call to Abort_Undefer, as expected by the runtime.
12662 * s-tasren.adb (Local_Complete_Rendezvous): Replace
12663 Defer_Abort_Nestable by Defer_Abort, since we do not expect abort to be
12664 deferred at this point. Update comments.
12665
126662014-01-21 Thomas Quinot <quinot@adacore.com>
12667
12668 * exp_ch4.adb, exp_ch5.adb, checks.adb: Minor reformatting.
12669
126702014-01-21 Arnaud Charlet <charlet@adacore.com>
12671
12672 * switch-c.adb, usage.adb, gnat_ugn.texi: Mark -gnates as internal,
12673 remove from doc.
12674
77a2f3df
RD
126752014-01-21 Robert Dewar <dewar@adacore.com>
12676
12677 * switch-c.adb, usage.adb, atree.adb, atree.ads: Minor reformatting.
12678
5f0c4d67
AC
126792014-01-21 Thomas Quinot <quinot@adacore.com>
12680
12681 * atree.adb, atree.ads (Num_Extension_Nodes): Switch to Node_Id, since
12682 this is value is used in Node_Id arithmetic operations.
12683 (Copy_Node, Exchange_Entities): Use loops indexed by Num_Extension_Nodes
12684 instead of hard-coded unrolled code.
12685
126862014-01-21 Yannick Moy <moy@adacore.com>
12687
12688 * gnat1drv.adb: Minor code cleanup, removing useless code.
12689
126902014-01-21 Arnaud Charlet <charlet@adacore.com>
12691
12692 * opt.ads (SPARK_Switches_File_Name): New.
12693 * switch-c.adb (Scan_Front_End_Switches): Add handling of -gnates=xxx *
12694 * usage.adb (Usage): Document -gnates, in gnatprove mode only.
12695 * gnat_ugn.texi: Document -gnates.
12696
126972014-01-21 Yannick Moy <moy@adacore.com>
12698
12699 * errout.adb (Special_Msg_Delete): Update comment. Remove
12700 special case for GNATprove which should not ignore mismatch
12701 in sizes for representation clauses.
12702 * sem_prag.adb (Analyze_Pragma): Remove special case for GNATprove
12703 which should not ignore pragma Pack.
12704
127052014-01-21 Ed Schonberg <schonberg@adacore.com>
12706
12707 * sem_ch4.adb: Code clean up.
12708
127092014-01-21 Steve Baird <baird@adacore.com>
12710
12711 * gnat_rm.texi: Improve GNAT RM description of SPARK_Mode pragma.
12712
4bcf6815
AC
127132014-01-21 Robert Dewar <dewar@adacore.com>
12714
12715 * gcc-interface/gigi.h: Get Flags array address.
12716 * gcc-interface/trans.c: Acquire Flags array address.
12717 * atree.adb: Add support for Flags array and Flag0,1,2,3.
12718 * atree.ads: Add support for Flags array and Flag0,1,2,3.
12719 * atree.h: Add support for Flags array and Flag0,1,2,3.
12720 * back_end.adb: Pass Flags array address to gigi.
12721
127222014-01-21 Ed Schonberg <schonberg@adacore.com>
12723
12724 * sem_ch8.adb (Attribute_Renaming): Transfer original attribute
12725 reference to generated body so that legality checks on stream
12726 attributes are properly applied. If type is tagged and already
12727 frozen, insert generated body at the point of the renaming
12728 declaration.
12729
127302014-01-21 Ed Schonberg <schonberg@adacore.com>
12731
12732 * sem_ch12.adb: Code clean up.
12733 * sem_ch8.adb: Minor reformatting
12734
43417b90
AC
127352014-01-20 Robert Dewar <dewar@adacore.com>
12736
12737 * checks.adb: Check SPARK_Mode instead of GNATProve_Mode for
12738 converting warnings on inevitable exceptions to errors.
12739 * exp_ch4.adb: Check SPARK_Mode instead of GNATProve_Mode for
12740 converting warnings on inevitable exceptions to errors.
12741 * opt.adb (SPARK_Mode_Config): Handled like other config flags
12742 * opt.ads (SPARK_Mode_Type): Moved here from types (renamed from
12743 SPARK_Mode_Id) (SPARK_Mode_Type): Add pragma Ordered, remove
12744 SPARK_ from names (SPARK_Mode): New flag (SPARK_Mode_Config):
12745 New flag (Config_Switches_Type): Add SPARK_Mode field
12746 * sem.adb: Minor code reorganization (remove unnecessary with)
12747 * sem.ads (Scope_Stack_Entry): Add Save_SPARK_Mode field
12748 * sem_aggr.adb: Check SPARK_Mode instead of GNATProve_Mode for
12749 converting warnings on inevitable exceptions to errors.
12750 * sem_attr.adb: Check SPARK_Mode instead of GNATProve_Mode for
12751 converting warnings on inevitable exceptions to errors.
12752 * sem_ch3.adb: Check SPARK_Mode instead of GNATProve_Mode for
12753 converting warnings on inevitable exceptions to errors.
12754 * sem_ch4.adb: Check SPARK_Mode instead of GNATProve_Mode for
12755 converting warnings on inevitable exceptions to errors.
12756 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Reset SPARK_Mode
12757 from spec if needed
12758 * sem_ch7.adb (Analyze_Package_Body_Helper): Reset SPARK_Mode
12759 from spec if needed
12760 * sem_ch8.adb (Push_Scope): Save SPARK_Mode (Pop_Scope):
12761 Restore SPARK_Mode
12762 * sem_elab.adb: Check SPARK_Mode instead of GNATProve_Mode for
12763 converting warnings on inevitable exceptions to errors.
12764 * sem_prag.adb (Get_SPARK_Mode_From_Pragma): New function
12765 (Get_SPARK_Mode_Id): Removed (Get_SPARK_Mode_Type): New name
12766 of Get_SPARK_Mode_Id
12767 * sem_prag.ads (Get_SPARK_Mode_From_Pragma): New function
12768 * sem_res.adb: Check SPARK_Mode instead of GNATProve_Mode for
12769 converting warnings on inevitable exceptions to errors.
12770 * sem_util.adb: Check SPARK_Mode instead of GNATProve_Mode for
12771 converting warnings on inevitable exceptions to errors.
12772 * types.ads (SPARK_Mode_Id): Moved to opt.ads and renamed
12773 SPARK_Mode_Type
12774
127752014-01-20 Ed Schonberg <schonberg@adacore.com>
12776
12777 * sem_ch13.adb: Add semantic information to rewritten type
12778 reference.
12779
127802014-01-20 Ed Schonberg <schonberg@adacore.com>
12781
12782 * exp_ch5.adb (Expand_N_Assignment_Statement): If both sides
12783 are of a type with unknown discriminants, convert both to the
12784 underlying view of the type, so that the proper constraint check
12785 can be applied to the right-hand side.
12786
127872014-01-20 Robert Dewar <dewar@adacore.com>
12788
12789 * atree.adb (Copy_Node): Fix failure to copy last component
12790 (Exchange_Entities): Fix failure to exchange last entity
12791
127922014-01-20 Ed Schonberg <schonberg@adacore.com>
12793
12794 * sem_ch12.adb: Code clean up.
12795
e4deba8e
RD
127962014-01-20 Robert Dewar <dewar@adacore.com>
12797
12798 * gnat_rm.texi, sem_ch4.adb: Minor reformatting.
12799
a736f6e6
AC
128002014-01-20 Ed Schonberg <schonberg@adacore.com>
12801
12802 * sem_ch4.adb (Analyze_Quantified_Expression): If after
12803 pre-analysis the loop parameter specification has been
12804 rewritten as a iterator specification, propagate the change to
12805 the quantified expression, for ASIS navigtion needs.
12806
128072014-01-20 Vincent Celier <celier@adacore.com>
12808
12809 * par-ch10.adb: Minor error message change: escape [ and ].
12810
4a28b181
AC
128112014-01-20 Robert Dewar <dewar@adacore.com>
12812
12813 * checks.adb: Make warnings on exceptions into errors in GNATprove mode.
12814 * errout.adb: Implement [ and ] insertion characters.
12815 * errout.ads: Document new [ and ] insertion characters.
12816 * sem_ch12.adb, restrict.adb, frontend.adb, exp_ch7.adb: Minor
12817 addition of ??? comment.
12818 * lib-xref.adb, exp_util.adb, gnat1drv.adb: Minor reformatting
12819 * exp_ch4.adb, sem_ch3.adb, sem_ch4.adb, sem_ch6.adb, sem_elab.adb,
12820 sem_eval.adb, sem_res.adb, sem_util.adb, sem_attr.adb, sem_aggr.adb:
12821 Make warnings on exceptions into errors in GNATprove mode.
12822 * sem_dim.adb: Minor reformatting throughout Quote [ and ]
12823 in error messages.
12824
128252014-01-20 Ed Schonberg <schonberg@adacore.com>
12826
12827 * sem_ch13.adb: Code clean up.
12828
b465ef6f
AC
128292014-01-20 Robert Dewar <dewar@adacore.com>
12830
12831 * errout.ads, errout.adb: Implement >? >x? >X? sequences in error
12832 messages.
12833 * sem_ch6.adb (Check_Statement_Sequence): Missing return is an
12834 error in GNATprove mode.
12835
128362014-01-20 Ed Schonberg <schonberg@adacore.com>
12837
12838 * par-ch4.adb (Is_Parameterless_Attribute): The Ada2012 attribute
12839 reference 'Old takes no parameters, and thus can appear as a
12840 prefix of a slice.
12841
128422014-01-20 Eric Botcazou <ebotcazou@adacore.com>
12843
12844 * exp_aggr.adb: Fix minor typos.
12845
a6152428
AC
128462014-01-20 Ed Schonberg <schonberg@adacore.com>
12847
12848 * sem_attr.adb (Analyze_Attribute, case 'Constrained): In an
12849 instance the attribute is legal, and its value is determined
12850 statically if the type has no discriminants. This choice is
12851 more useful than rechecking the legality rule in the instance,
12852 is consistent with older usage, and is also consistent with all
12853 existing tests.
12854
128552014-01-20 Arnaud Charlet <charlet@adacore.com>
12856
12857 * sem_cat.adb (Validate_Static_Object_Name): Change error into
12858 warning in Relaxed_Semantic_Mode.
12859
e19fd0bd
AC
128602014-01-20 Ed Schonberg <schonberg@adacore.com>
12861
12862 * sem_attr.adb: Code and comments cleanup.
12863
128642014-01-20 Yannick Moy <moy@adacore.com>
12865
12866 * debug.adb Free debug flags -gnatd.D, -gnatd.G and -gnatd.V *
12867 * errout.adb (Compilation_Errors): Remove special handling in
12868 GNATprove mode.
12869 * gnat1drv.adb (Adjust_Global_Switches): Remove handling of the
12870 removed debug flags.
12871 * gnat_rm.texi: Initial documentation for Abstract_State, Depends,
12872 Global, Initial_Condition, Initializes and Refined_State pragmas and
12873 aspects.
12874 * opt.ads (Frame_Condition_Mode, Formal_Extensions,
12875 SPARK_Strict_Mode): Remove global flags.
12876 * sem_ch3.adb (Analyze_Object_Declaration): Check of no hidden state
12877 always performed now, on packages declaring a null state.
12878 (Signed_Integer_Type_Declaration): Remove ill-designed attempt
12879 at providing pedantic mode for bounds of integer types.
12880 * sem_ch4.adb (Analyze_Quantified_Expression): Warning on suspicious
12881 "some" quantified expression now issued under control of -gnatw.t,
12882 like the other warning on unused bound variable.
12883 * sem_prag.adb (Check_Precondition_Postcondition): Remove useless test
12884 on removed flag.
12885 (Analyze_Pragma): Remove tests for SPARK 2014
12886 pragmas, not officially allowed by GNAT.
12887
58827738
AC
128882014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
12889
12890 * sem_prag.adb (Analyze_Pragma): Ensure that
12891 the sole argument of pragmas Abstract_State, Contract_Cases,
12892 Depends, Global and Initializes in in aggregate form.
12893 (Analyze_Refined_Pragma): Ensure that the sole argument of
12894 pragmas Refined_Depends, Refined_Global and Refined_State is in
12895 aggregate form.
12896 (Ensure_Aggregate_Form): New routine.
12897
128982014-01-20 Doug Rupp <rupp@adacore.com>
12899
12900 * sem_attr.adb (Analyze_Attribute): case
12901 Attribute_Constrained => treat all prefixes as legal for Declib
12902 compatibility.
12903
9559eccf
AC
129042014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
12905
12906 * sem_prag.adb (Check_Mode): Reimplement the routine.
12907 (Find_Mode): New routine.
12908
129092014-01-20 Robert Dewar <dewar@adacore.com>
12910
12911 * sem_ch4.adb (Operator_Check): Handle additional
12912 Allow_Integer_Address cases.
12913
7dbd3de9
RD
129142014-01-20 Robert Dewar <dewar@adacore.com>
12915
12916 * gnat_rm.texi (Allow_Integer_Address): Remove note about not
12917 allowed if address is non-private, no longer true.
12918 * sem_prag.adb (Analyze_Pragma, case Allow_Integer_Address):
12919 Remove check for address being private, causes difficulty when
12920 pragma used in gnat.adc file and is not needed, since we guard
12921 this in Address_Integer_Convert_OK.
12922 * exp_ch7.adb: Minor reformatting.
12923 * sem_ch4.adb: Handle operator operands in Allow_Integer_Address mode.
12924
129252014-01-20 Robert Dewar <dewar@adacore.com>
12926
12927 * checks.adb (Apply_Range_Check): Remove gnatprove special
12928 casing of exponentiation.
12929 * sem_res.adb (Resolve_Op_Expon): Apply range check to right
12930 operand for integer case to check range against Natural.
12931
061828e3
AC
129322014-01-20 Robert Dewar <dewar@adacore.com>
12933
12934 * s-tataat.adb: Minor reformatting.
12935
129362014-01-20 Robert Dewar <dewar@adacore.com>
12937
12938 * einfo.adb (Is_Descendent_Of_Address): Now applies to all
12939 entities, and also fix documentation to remove mention of visible
12940 integer type, since this is not what the implementation does.
12941 * einfo.ads (Is_Descendent_Of_Address): Now applies to all
12942 entities, and also fix documentation to remove mention of visible
12943 integer type, since this is not what the implementation does.
12944 * gnat_rm.texi: Minor clarification of Allow_Integer_Address
12945 function.
12946 * sem_ch4.adb (Analyze_One_Call): Handle Allow_Integer_Address
12947 case for parameter type check.
12948 * sem_res.adb (Resolve): Use new function
12949 Address_Integer_Convert_OK.
12950 * sem_type.adb: Minor code reorganization (use Ekind_In) Minor
12951 reformatting throughout.
12952 * sem_util.adb (Address_Integer_Convert_OK): New function.
12953 * sem_util.ads: Minor reformatting (put specs in alpha order)
12954 (Address_Integer_Convert_OK): New function.
12955
129562014-01-20 Thomas Quinot <quinot@adacore.com>
12957
12958 * exp_ch7.adb (Wrap_Transient_Expression):
12959 Insertion extra conditional expression only if
12960 Opt.Suppress_Control_Flow_Optimizations is set.
12961
ff4e28eb
AC
129622014-01-20 Arnaud Charlet <charlet@adacore.com>
12963
12964 * s-tataat.adb (Initialize_Attributes): Abort might already be
12965 deferred in Create_Task.
12966
129672014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
12968
12969 * checks.adb (Apply_Scalar_Range_Check): Flag
12970 the exponent as requiring a range check when the expression is
12971 an exponentiation.
12972
a1efcc17
AC
129732014-01-20 Fedor Rybin <frybin@adacore.com>
12974
12975 * gnat_ugn.texi: Documenting --passed-tests option for gnattest.
12976
129772014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
12978
12979 * sem_util.adb (Default_Initialization): New routine.
12980 * sem_util.ads: Add new type Default_Initialization_Kind.
12981 (Default_Initialization): New routine.
12982
129832014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
12984
12985 * sem_prag.adb (Check_Mode): Correct all error
12986 message logic dealing with in/in out parameters that may appear
12987 as inputs or have a self reference.
12988
6fd0a72a
AC
129892014-01-20 Robert Dewar <dewar@adacore.com>
12990
12991 * exp_ch9.adb, checks.adb, exp_intr.adb: Minor reformatting.
12992 * sem_res.adb (Resolve): Fix error causing infinite loop for
12993 integer used as address. Allow addresses as integers.
12994
129952014-01-20 Arnaud Charlet <charlet@adacore.com>
12996
12997 * s-osinte-linux.ads (struct_sigaction): Fix rep clause.
12998
129992014-01-20 Bob Duff <duff@adacore.com>
13000
13001 * par-ch8.adb (P_Use_Type_Clause): Detect syntax
13002 error when "use all" is not followed by "type".
13003
3b4598a7
AC
130042014-01-20 Bob Duff <duff@adacore.com>
13005
13006 * exp_intr.adb (Expand_Unc_Deallocation): Remove warning on abort
13007 followed by free.
13008
130092014-01-20 Ed Schonberg <schonberg@adacore.com>
13010
13011 * checks.adb (Apply_Address_Clause_Check): If there is an
13012 alignment check on the expression in an address clause, and there
13013 is no local exception propagation, add an additional explanatory
13014 message to clarify the cause of previous warning.
13015
4058ddcc
AC
130162014-01-20 Robert Dewar <dewar@adacore.com>
13017
13018 * exp_ch7.adb: Minor reformatting.
13019 * opt.ads: Minor comment updates.
13020 * sem.adb: Minor name change Is_Main_Unit =>
13021 Is_Main_Unit_Or_Main_Unit_Spec.
13022 * sem_ch6.adb: Minor reformatting and code reorganization.
13023
130242014-01-20 Bob Duff <duff@adacore.com>
13025
13026 * gnat_ugn.texi: Update gnatpp switches.
13027
130282014-01-20 Thomas Quinot <quinot@adacore.com>
13029
13030 * exp_ch9.adb: Minor comment edit.
13031
d8a764c4
AC
130322014-01-20 Robert Dewar <dewar@adacore.com>
13033
13034 * gnat_rm.texi: Document that Allow_Integer_Address is permitted
13035 only if System.Address is a private type.
13036 * opt.ads (Allow_Integer_Address): No longer set by -gnates.
13037 * sem_prag.adb (Analyze_Pragma, case Allow_Integer_Address):
13038 Allowed only if type System.Address is private, since otherwise
13039 it makes no sense.
13040 * sem_res.adb: Fix failure to properly Analyze unchecked
13041 conversions that were introduced by Allow_Integer_Address.
13042 * switch-c.adb: Remove -gnates switch.
13043 * usage.adb: Remove -gnates switch.
13044 * gnat_ugn.texi: Remove documentation of -gnates flag.
13045
130462014-01-20 Ed Schonberg <schonberg@adacore.com>
13047
13048 * sem_ch6.adb (Analyze_Expression_Function): Pre-analyze and
13049 resolve expression to perform proper name capture.
13050
130512014-01-20 Ed Schonberg <schonberg@adacore.com>
13052
13053 * sem.adb (Semantics): When saving/restoring configuration
13054 switches, the spec of a pre- defined unit that is the main unit
13055 must be treated as a predefined unit as well.
13056
130572014-01-20 Thomas Quinot <quinot@adacore.com>
13058
13059 * exp_ch7.adb (Wrap_Transient_Expression): For a Boolean
13060 expression, insert an extra conditional expression when saving
13061 the value of the expression, for the benefit of control flow
13062 graph based coverage analysis.
13063 * exp_ch3.adb: Minor reformatting.
13064
818b578d
AC
130652014-01-20 Robert Dewar <dewar@adacore.com>
13066
13067 * gnat1drv.adb: Set Allow_Integer_Address in relaxed semantics mode.
13068 * gnat_rm.texi: Document pragma Allow_Integer_Address.
13069 * gnat_ugn.texi: Document pragma Allow_Integer_Address, -gnates.
13070 * opt.ads: New flag Allow_Integer_Address.
13071 * par-prag.adb: Dummy entry for pragma Allow_Integer_Address.
13072 * sem_ch5.adb: Minor reformatting.
13073 * sem_prag.adb: Implement pragma Allow_Integer_Address.
13074 * sem_res.adb (Resolve): Allow integer address value if
13075 switch set.
13076 * sem_util.adb: Minor reformatting.
13077 * snames.ads-tmpl: Add entry for pragma Allow_Integer_Address.
13078 * switch-c.adb: Recognize flag -gnates.
13079 * usage.adb: Document flag -gnates.
13080
130812014-01-20 Thomas Quinot <quinot@adacore.com>
13082
13083 * s-tadeca.adb: Fix minor typos in comment.
13084
c2e54001
AC
130852014-01-20 Pascal Obry <obry@adacore.com>
13086
13087 * s-win32.ads (FreeLibrary): New import.
13088
130892014-01-20 Robert Dewar <dewar@adacore.com>
13090
13091 * sem_res.adb, sem_cat.adb: Minor reformatting.
13092 * sem_ch11.adb (Analyze_Raise_Statement): Only give warning about
13093 assigning to OUT parameters for the current subprogram scope.
13094 * exp_ch4.adb: Minor reformatting.
13095
130962014-01-20 Ed Schonberg <schonberg@adacore.com>
13097
13098 * exp_ch4.adb (Process_Transient_Object,
13099 Find_Enclosing_Contexts): If the top-level if-expression that
13100 generated the transient object is an actual in a call, the proper
13101 Hook_Context is a construct enclosing the call.
13102 * einfo.ads: Indicate that Related_Expression is used to link a
13103 loop variable to the container expression over which the loop
13104 takes place.
13105 (Analyze_Iterator_Specification): Set the Related_Expression of
13106 the loop variable in a container element iterator.
13107 (Note_Possible_Modification): If the variable is the loop
13108 variable in a container element iterator, indicate that the
13109 enclosing container is also modified.
13110
131112014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
13112
13113 * aspects.adb (Move_Or_Merge_Aspects): Reimplemented.
13114
90b51aaf
AC
131152014-01-20 Robert Dewar <dewar@adacore.com>
13116
13117 * s-taasde.ads, gnat_ugn.texi, s-tadeca.adb, sem_res.adb, s-tadeca.ads:
13118 Minor reformatting and code clean up.
13119
131202014-01-20 Arnaud Charlet <charlet@adacore.com>
13121
13122 * sem_cat.adb (Validate_Object_Declaration): Relax semantics
13123 of objects of private type if Relaxed_RM_Semantics.
13124
2838fa93
AC
131252014-01-20 Claire Dross <dross@adacore.com>
13126
13127 * a-cofove.ads (Vector): Capacity discriminant
13128 should be in range of the index.
13129
131302014-01-20 Thomas Quinot <quinot@adacore.com>
13131
13132 * a-caldel.ads(To_Duration), s-taasde.ads(Time_Enqueue):
13133 Clarify specs s-tadeca.adb(Enqueue_Calendar): Compensate for
13134 possible difference between epoch of Ada.Calendar clock and Ada
13135 real-time/tasking clock.
13136 * s-taprop-posix.adb: Minor comment fix.
13137
131382014-01-20 Doug Rupp <rupp@adacore.com>
13139
13140 * sysdep.c [vxworks]: Remove Vxworks version noise for RTP.
13141
131422014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
13143
13144 * exp_attr.adb (Expand_N_Attribute_Reference): Generate validity
13145 checks on the prefix of attribute 'Old.
13146 * sem_ch3.adb (Process_Range_Expr_In_Decl): Suppress the
13147 generation of validity checks on a range that belongs to the
13148 iteration scheme of a quantified expression.
13149 * sem_ch5.adb (One_Bound): Suppress the generation of validity
13150 checks on a bound that belongs to the iteration scheme of a
13151 quantified expression, generate the check in all other cases.
13152
131532014-01-20 Bob Duff <duff@adacore.com>
13154
13155 * gnat_ugn.texi: Enable --pp-new by default. Minor reorganization.
13156
131572014-01-20 Ed Schonberg <schonberg@adacore.com>
13158
13159 * sem_res.adb (Resolve): When compiling a predefined unit, ignore
13160 interpretations that do not come from other predefined units,
13161 to prevent spurious ambiguities in the presence of user-defined
13162 operators in the context of (an instance of) a predefined unit.
13163
1e569204
AC
131642014-01-20 Robert Dewar <dewar@adacore.com>
13165
13166 * gnat_rm.texi: Document that Loop_Variant is included in
13167 Statement_Assertions.
13168 * sem_prag.adb (Check_Kind): Add Loop_Variant to
13169 Statement_Assertions (Check_Applicable_Policy): Add Loop_Variant
13170 to Statement_Assertions.
13171
131722014-01-20 Doug Rupp <rupp@adacore.com>
13173
13174 * sysdep.c (__gnat_is_file_not_found_error) [vxworks6]: Add case
13175 for errno ENOENT from RTP on NFS mounted file system.
13176
0969e96d
AC
131772014-01-20 Ed Schonberg <schonberg@adacore.com>
13178
13179 * sem_util.adb (Check_Function_Writable_Actuals): 1) Do not
13180 examine code that does not come from source. The check does not
13181 apply to code generated for constraint checks, and such code may
13182 generate spurious error messages when compiled with expansion
13183 disabled (as in a generic unit) because side effects may not
13184 have been removed.
13185 2) Make error messages more explicit: indicate the component
13186 of the construct whose value is indeterminate because of a
13187 call to a function with in-out parameter in another component,
13188 when there is no mandated order of execution between the two
13189 components (actuals, aggregate components, alternatives).
13190
131912014-01-20 Robert Dewar <dewar@adacore.com>
13192
13193 * gnat_rm.texi: Minor cleanup.
13194
36eef04a
AC
131952014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
13196
13197 * sem_attr.adb (Analyze_Attribute): Attributes 'Old and 'Result
13198 can now apply to a refined postcondition.
13199 * sem_ch6.adb (Analyze_Subprogram_Contract): Remove local
13200 variable Result_Seen. Add variables Case_Prag, Post_Prag,
13201 Seen_In_Case and Seen_In_Post. Update the mechanism that detects
13202 whether postconditions and/or constract-cases mention attribute
13203 'Result and introduce a post-state when applied to functions.
13204 (Check_Result_And_Post_State): Removed.
13205 * sem_prag.adb (Analyze_Pragma): Add local variable
13206 Result_Seen. Verify that the expression of pragma Refined_Post
13207 mentions attribute 'Result and introduces a post-state.
13208 * sem_util.ads, sem_util.adb (Check_Result_And_Post_State): New routine.
13209
132102014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
13211
13212 * exp_ch7.adb (Is_Subprogram_Call): New routine.
13213 (Process_Transient_Objects): Make variable Must_Hook global with
13214 respect to all locally declared subprograms. Search the context
13215 for at least one subprogram call.
13216 (Requires_Hooking): Removed.
13217
132182014-01-20 Claire Dross <dross@adacore.com>
13219
13220 * a-cfdlli.ads a-cfhama.ads a-cfhase.ads a-cforma.ads
13221 * a-cforse.ads a-cofove.ads: Add pragma Annotate (GNATprove,
13222 External_Axiomatization);
13223
65441a1e
RD
132242014-01-20 Robert Dewar <dewar@adacore.com>
13225
13226 * sem_attr.adb (Analyze_Attribute, case Loop_Entry): Allow
13227 Loop_Entry in Assert, Assert_And_Cut, and Assume pragmas.
13228 * sem_prag.adb (Analyze_Pragma, case Assert[_And_Cut], Assume):
13229 Allow Loop_Entry to be used in these pragmas if they appear in
13230 an appropriate context.
13231 (Placement_Error): Specialize error
13232 message for pragma Assert[_And_Cut] or pragma Assume containing
13233 Loop_Entry attribute.
13234 * a-exexpr-gcc.adb, sinput.adb: Minor reformatting.
13235 * s-excmac-arm.ads, s-except.ads, s-excmac-gcc.ads: Minor reformatting
13236 and code clean ups.
13237
800da977
AC
132382014-01-20 Robert Dewar <dewar@adacore.com>
13239
13240 * gnat1drv.adb: Minor comment update.
13241
132422014-01-20 Tristan Gingold <gingold@adacore.com>
13243
13244 * raise-gcc.c (PERSONALITY_FUNCTION/arm): Remove unused
13245 variables, comment out unused code.
13246 * a-exexpr-gcc.adb: Move declarations to s-excmac-gcc.ads
13247 * s-excmac-gcc.ads: New file, extracted from a-exexpr-gcc.adb
13248 * s-excmac-arm.ads: New file.
13249
132502014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
13251
13252 * exp_ch4.adb (Expand_N_Slice): Remove constant D and variables
13253 Drange and Index_Typ. Remove the circuitry which creates a
13254 range check to compare the index type of the array against the
13255 discrete_range.
13256 * sem_res.adb (Resolve_Slice): Add local variable Dexpr. Update
13257 the circuitry which creates a range check to handle a
13258 discrete_range denoted by a subtype indication.
13259
132602014-01-20 Pierre-Marie Derodat <derodat@adacore.com>
13261
13262 * sinput.adb, sinput.ads (Sloc_Range): Traverse the tree of original
13263 nodes to get the original sloc range.
13264
132652014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
13266
13267 * sem_prag.adb (Analyze_Pragma): Use Defining_Entity to obtain the
13268 entity of a [library level] package.
13269
51b0e05a
AC
132702014-01-20 Tristan Gingold <gingold@adacore.com>
13271
13272 * raise-gcc.c (exception_class_eq): New function.
13273 (is_handled_by): Use it to compare exception classes.
13274 (PERSONALITY_STORAGE): Define. (continue_unwind): New function to
13275 be called to return URC_CONTINUE_UNWIND.
13276 (personality_body): New function, extracted from PERSONALITY_ROUTINE.
13277 (PERSONALITY_ROUTINE): Add an implementation for the ARM unwinder.
13278
132792014-01-20 Robert Dewar <dewar@adacore.com>
13280
13281 * opt.ads: Minor comment update.
13282
5ff90f08
AC
132832014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
13284
13285 * exp_ch4.adb (Expand_N_Slice): Relocate some variables and
13286 constants to the "Local variables" area. Add new constant D. Add
13287 new variables Drange and Index_Typ. Rename Pfx to Rep and Ptp
13288 to Pref_Typ and update all occurrences. Add circuitry to extract
13289 the discrete_range and the index type and build a range check.
13290
132912014-01-20 Arnaud Charlet <charlet@adacore.com>
13292
13293 * gnat1drv.adb (Adjust_Global_Switches): Enable
13294 Treat_Categorization_Errors_As_Warnings when Relaxed_RM_Semantics
13295 is set.
13296
132972014-01-20 Thomas Quinot <quinot@adacore.com>
13298
13299 * sem_ch5.adb, sem_ch4.adb: Minor reformatting.
13300
133012014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
13302
13303 * sem_ch13.adb (Analyze_Aspect_Specifications):
13304 When aspect SPARK_Mode appears on a package body, insert the
13305 generated pragma at the top of the body declarations.
13306
1f0b1e48
RD
133072014-01-20 Robert Dewar <dewar@adacore.com>
13308
13309 * sem_aggr.adb, exp_prag.adb, sem_aux.adb, sinfo.ads, sem_ch10.adb,
13310 checks.adb, sem_prag.adb, sem_ch12.adb, freeze.adb, g-arrspl.adb,
13311 expander.adb, gnat1drv.adb, exp_ch4.adb, sem_ch6.adb,
13312 sem_ch8.adb, exp_dist.adb: Minor reformatting.
13313
c093d3cc
AC
133142014-01-20 Yannick Moy <moy@adacore.com>
13315
13316 * gnat1drv.adb (Gnat1drv): Call Write_ALI with Object=True in GNATprove
13317 mode.
13318
133192014-01-20 Pascal Obry <obry@adacore.com>
13320
13321 * g-arrspl.ads (Slice_Set): New definition (will use a copy on
13322 write scheme).
13323 * g-arrspl.adb: Adapt all routine to this new implementation.
13324 (Set): Copy the Slice_Set definition before reusing it.
13325
0bd75e44
AC
133262014-01-20 Arnaud Charlet <charlet@adacore.com>
13327
13328 * sem_prag.adb (Process_Import_Or_Interface): In
13329 Relaxed_RM_Semantics, support old Ada 83 style of pragma Import.
13330 (Analyze_Pragma): Ditto for pragma Export.
13331 * exp_prag.adb (Expand_Pragma_Import_Or_Interface): Handle old pragma
13332 Import style.
13333
aca90db9
AC
133342014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
13335
13336 * einfo.ads: E_Abstract_State is now part of the entities that
13337 can be overloaded. Update type Overloadable_Kind to reflect the
13338 inclusion of abstract states.
13339 * sem_ch6.adb (New_Overloaded_Entity): A function can now
13340 overload an abstract state.
13341 * sem_prag.adb (Analyze_Constituent): Handle the overloading
13342 of states by functions. Use Entity_Of to obtain the entity of
13343 a constituent. (Analyze_Global_Item): Handle the overloading of
13344 states by functions.
13345 (Analyze_Initialization_Item): Handle the
13346 overloading of states by functions. Use Entity_Of to obtain the
13347 entity of an item.
13348 (Analyze_Input_Item): Handle the overloading
13349 of states by functions. Use Entity_Of to obtain the entity of an item.
13350 (Analyze_Input_Output): Handle the overloading of states by functions.
13351 (Analyze_Refinement_Clause): Handle the overloading
13352 of states by functions. Use Entity_Of to obtain the entity of an item.
13353 (Appears_In): Use Entity_Of to obtain the entity of an element.
13354 (Check_Usage): Use Entity_Of to obtain the entity of
13355 an item. Add a guard to prevent a crash due to a previous error.
13356 (Resolve_State): New routine.
13357
133582014-01-20 Yannick Moy <moy@adacore.com>
13359
13360 * spark_xrefs.ads, debug.adb, gnat1drv.adb, errout.adb, errout.ads,
13361 opt.ads: Minor comments updates.
13362
dc726757
HK
133632014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
13364
13365 * einfo.adb (Non_Limited_View): Applies to abstract states.
13366 (Set_From_Limited_With): Applies to abstract states.
13367 (Set_Non_Limited_View): Applies to abstract states.
13368 (Write_Field17): Output the non-limited view of an abstract state.
13369 * einfo.ads: Update the comment on usage and occurrences in
13370 nodes for attributes From_Limited_With and Non_Limited_View.
13371 * sem_aux.adb (Available_View): This routine can now handle
13372 abstract states.
13373 * sem_aux.ads (Available_View): This routine can now handle
13374 abstract states. Update the comment on usage.
13375 * sem_ch8.adb (Find_Expanded_Name): Handle abstract views
13376 of states and variables.
13377 (In_Pragmas_Depends_Or_Global): New routine.
13378 * sem_ch10.adb (Build_Limited_Views): Implement
13379 abstract (limited) views of variables and states.
13380 (Build_Shadow_Entity): This routine is now a procedure. Add
13381 formal parameter Shadow. Update the comment on usage. Add
13382 context-specific decoration for states and variables.
13383 (Decorate_State): New routine. (Decorate_Variable): New routine.
13384 (Find_And_Process_States): New routine.
13385 (Process_Declarations): Renamed to Process_Declarations_And_States.
13386 (Process_Declarations_And_States): Add formal parameters
13387 Pack and Create_Abstract_Views. Update the comment on usage.
13388 (Process_States): New routine.
13389 * sem_prag.adb (Check_Dependency_Clause): Handle abstract
13390 views of states and variables. Match the abstract view of a state
13391 against its corresponding non-abstract view.
13392 (Is_Matching_Input):
13393 Handle abstract views of states and variables. Match the abstract
13394 view of a state against its corresponding non-abstract view.
13395 (Process_Global_Item): Handle abstract views of states and
13396 variables.
13397
3a5de596
BD
133982014-01-20 Bob Duff <duff@adacore.com>
13399
13400 * sem_ch10.adb (Expand_With_Clause): Don't
13401 recurse on the prefix if the current with-ed name refers to a
13402 package that renames its own parent, eg "package P.Q renames P;".
13403
4460a9bc
YM
134042014-01-20 Yannick Moy <moy@adacore.com>
13405
13406 * exp_spark.adb (Expand_SPARK_Call): Remove procedure.
13407 * opt.adb, opt.ads (Full_Expander_Active): Remove function.
13408 * checks.adb, exp_ch6.adb, exp_ch9.adb, exp_disp.adb, sem_aggr.adb,
13409 * sem_ch10.adb, sem_ch5.adb, sem_ch6.adb, sem_ch8.adb, sem_ch9.adb,
13410 * sem_disp.adb, sem_res.adb Replace Full_Expander_Active by
13411 Expander_Active.
13412
134132014-01-20 Yannick Moy <moy@adacore.com>
13414
13415 * sinfo.ads Update documentation of GNATprove mode.
13416
f5da7a97
YM
134172014-01-20 Yannick Moy <moy@adacore.com>
13418
13419 * adabkend.adb, ali-util.adb, errout.adb, exp_ch7.adb,
13420 * exp_dbug.adb, freeze.adb, lib-xref.adb, restrict.adb,
13421 * sem_attr.adb, sem_ch4.adb, sem_ch5.adb, sem_ch6.adb, sem_ch8.adb,
13422 * sem_prag.adb, sem_res.adb, sem_util.adb Rename SPARK_Mode into
13423 GNATprove_Mode.
13424 * sem_ch13.adb: Remove blank.
13425 * exp_spark.adb, exp_spark.ads (Expand_SPARK_Call): Only replace
13426 subprograms by alias for renamings, not for inherited primitive
13427 operations.
13428 * exp_util.adb (Expand_Subtype_From_Expr): Apply the expansion
13429 in GNATprove mode.
13430 (Remove_Side_Effects): Apply the removal in
13431 GNATprove mode, for the full analysis of expressions.
13432 * expander.adb (Expand): Call the light SPARK expansion in GNATprove
13433 mode.
13434 (Expander_Mode_Restore, Expander_Mode_Save_And_Set): Ignore
13435 save/restore actions for Expander_Active flag in GNATprove mode,
13436 similar to what is done in ASIS mode.
13437 * frontend.adb (Frontend): Generic bodies are instantiated in
13438 GNATprove mode.
13439 * gnat1drv.adb (Adjust_Global_Switches): Set operating
13440 mode to Check_Semantics in GNATprove mode, although a light
13441 expansion is still performed.
13442 (Gnat1drv): Set Back_End_Mode to
13443 Declarations_Only in GNATprove mode, and later on special case
13444 the GNATprove mode to continue analysis anyway.
13445 * lib-writ.adb (Write_ALI): Always generate ALI files in
13446 GNATprove mode.
13447 * opt.adb, opt.ads (Full_Expander_Active): Make it equivalent to
13448 Expander_Active.
13449 (SPARK_Mode): Renamed as GNATprove_Mode.
13450 * sem_aggr.adb (Aggregate_Constraint_Checks): Add checks in the
13451 tree in GNATprove_Mode.
13452 * sem_ch12.adb (Analyze_Package_Instantiation): Always instantiate
13453 body in GNATprove mode.
13454 (Need_Subprogram_Instance_Body): Always instantiate body in GNATprove
13455 mode.
13456 * sem_ch3.adb (Constrain_Index, Process_Range_Expr_In_Decl):
13457 Make sure side effects are removed in GNATprove mode.
13458
fd6e497e
EB
134592014-01-20 Eric Botcazou <ebotcazou@adacore.com>
13460
13461 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Robustify tests
13462 for aliased objects with an unconstrained nominal subtype.
13463 * gcc-interface/trans.c (Call_to_gnu): Likewise.
13464 (gnat_to_gnu) <case N_Op_Not>: Robustify test for private type.
13465 <case N_Op_Minus>: Remove useless code.
13466 (Exception_Handler_to_gnu_zcx): Minor tweaks.
13467
44e9e3ec
EB
134682014-01-20 Eric Botcazou <ebotcazou@adacore.com>
13469
13470 * gcc-interface/decl.c (gnat_to_gnu_entity) <case E_Record_Subtype>:
13471 Tidy up. For a subtype with discriminants and variant part, if a
13472 variant is statically selected and the fields all have a constant
13473 position, put them in order of increasing position. Likewise if
13474 no variant part but representation clause is present.
13475 * gcc-interface/utils.c (make_packable_type): Robustify.
13476 (maybe_pad_type): Use local variable and tidy up condition. If no
13477 alignment is specified, use the original one.
13478 (create_type_stub_decl): Minor tweak.
13479 (convert) <case VECTOR_CST>: Fix typo.
13480 <case CONSTRUCTOR>: Deal with padding types around the same type.
13481 Do not punt on missing fields.
13482 (unchecked_convert): Call finish_record_type to lay out the special
13483 record types made for conversions from/to problematic integer types.
13484 Bump the alignment of CONSTRUCTORs before converting them to a more
13485 aligned type.
13486
59f5c969
EB
134872014-01-20 Eric Botcazou <ebotcazou@adacore.com>
13488
13489 * gcc-interface/decl.c (gnat_to_gnu_entity) <case E_Component>: Remove
13490 obsolete code for type_annotate_only mode, simplify code and slightly
13491 improve wording of comments.
13492
2323a580
EB
134932014-01-12 Eric Botcazou <ebotcazou@adacore.com>
13494
13495 PR ada/59772
13496 * gcc-interface/cuintp.c (build_cst_from_int): Use 32-bit integer type
13497 as intermediate type.
13498 (UI_To_gnu): Likewise.
13499
517c399e
EB
135002014-01-03 Eric Botcazou <ebotcazou@adacore.com>
13501
13502 * gnatvsn.ads (Current_Year): Bump to 2014.
13503
98db73df 135042014-01-02 Tobias Burnus <burnus@net-b.de>
00f96dc9 13505
98db73df 13506 * gnat_ugn.texi: Bump @copying's copyright year.
ad41bd84 13507\f
98db73df 13508Copyright (C) 2014 Free Software Foundation, Inc.
ad41bd84
JM
13509
13510Copying and distribution of this file, with or without modification,
13511are permitted in any medium without royalty provided the copyright
13512notice and this notice are preserved.