[multiple changes]
[gcc.git] / gcc / ada / ChangeLog
1 2014-07-17 Robert Dewar <dewar@adacore.com>
2
3 * s-imguns.ads: Minor reformatting.
4
5 2014-07-17 Hristian Kirtchev <kirtchev@adacore.com>
6
7 * exp_ch7.adb (Build_Finalization_Master): Move all local
8 variables to the proper code section. When looking for an existing
9 finalization master, inspect the ultimate ancestor type of the
10 full view.
11 * sem_util.ads, sem_util.adb (Root_Type_Of_Full_View): New routine.
12
13 2014-07-17 Robert Dewar <dewar@adacore.com>
14
15 * aspects.ads, aspects.adb: Add entries for aspect Annotate.
16 * gnat_rm.texi: Document Entity argument for pragma Annotate and
17 Annotate aspect.
18 * sem_ch13.adb (Analyze_Aspect_Specification): Add processing
19 for Annotate aspect.
20 * sem_prag.adb (Analyze_Pragma, case Annotate): Allow optional
21 Entity argument at end.
22 * sinfo.ads (N_Aspect_Specification): Add note on Annotate aspect.
23
24 2014-07-17 Tristan Gingold <gingold@adacore.com>
25
26 * s-imguns.ads: Fix minor typo.
27
28 2014-07-17 Thomas Quinot <quinot@adacore.com>
29
30 * sprint.adb: Minor reformatting.
31
32 2014-07-17 Robert Dewar <dewar@adacore.com>
33
34 * sprint.adb (Write_Itype): Print proper header for string
35 literal subtype.
36
37 2014-07-17 Steve Baird <baird@adacore.com>
38
39 * sinfo.ads, sem_scil.ads: Improve comments, minor reformatting.
40
41 2014-07-17 Vincent Celier <celier@adacore.com>
42
43 * gnatbind.adb: Change in message "try ... for more information".
44
45 2014-07-17 Robert Dewar <dewar@adacore.com>
46
47 * sprint.adb: Code clean up.
48
49 2014-07-17 Hristian Kirtchev <kirtchev@adacore.com>
50
51 * exp_ch7.adb (Find_Last_Init): Relocate local variables to
52 the relevant code section. Add new local constant Obj_Id. When
53 a limited controlled object is initialized by a function call,
54 the build-in-place object access function call acts as the last
55 initialization statement.
56 * exp_util.adb (Is_Object_Access_BIP_Func_Call): New routine.
57 (Is_Secondary_Stack_BIP_Func_Call): Code reformatting.
58 * exp_util.ads (Is_Object_Access_BIP_Func_Call): New routine.
59
60 2014-07-17 Ed Schonberg <schonberg@adacore.com>
61
62 * sem_ch8.adb (Analyze_Generic_Renaming): For generic subprograms,
63 propagate intrinsic flag to renamed entity, to allow e.g. renaming
64 of Unchecked_Conversion.
65 * sem_ch3.adb (Analyze_Declarations): Do not analyze contracts
66 if the declaration has errors.
67
68 2014-07-17 Ed Schonberg <schonberg@adacore.com>
69
70 * a-rbtgbk.adb: a-rbtgbk.adb (Generic_Insert_Post): Check whether
71 container is busy before checking whether capacity allows for
72 a further insertion. Insertion in a busy container that is full
73 raises Program_Error rather than Capacity_Error. Previous to that
74 patch which exception was raised varied among container types.
75
76 2014-07-17 Robert Dewar <dewar@adacore.com>
77
78 * g-comlin.ads, g-comlin.adb: Minor clean up.
79
80 2014-07-17 Bob Duff <duff@adacore.com>
81
82 * gnat_ugn.texi: Update gnatpp doc.
83
84 2014-07-17 Robert Dewar <dewar@adacore.com>
85
86 * gnat_rm.texi: Document new restriction No_Long_Long_Integers.
87 * exp_ch4.adb (Make_Array_Comparison_Op): Add note that we
88 could do this by actually expanding a real generic.
89 * a-tags.ads: Add comments about performance.
90 * sprint.adb (Sprint_Node_Actual, case N_Object_Declaration):
91 Print Etype of defining identifier, rather than the object
92 definition. More information.
93
94 2014-07-17 Thomas Quinot <quinot@adacore.com>
95
96 * exp_dist.adb: Minor documentation clarification.
97
98 2014-07-17 Hristian Kirtchev <kirtchev@adacore.com>
99
100 * exp_util.adb (Is_Aliased): Revert previous change.
101
102 2014-07-17 Vincent Celier <celier@adacore.com>
103
104 * g-comlin.adb (Try_Help): New procedure.
105 (Getopt): Use new procedure Try_Help.
106 * g-comlin.ads (Try_Help): New procedure.
107
108 2014-07-17 Bob Duff <duff@adacore.com>
109
110 * gnat_ugn.texi: Minor update.
111
112 2014-07-17 Robert Dewar <dewar@adacore.com>
113
114 * gnat_rm.texi: Improve documentation of Unrestricted_Access.
115 * sinfo.ads: Document restriction on aggregates (must expand to
116 assignments if one or more assignments needs expansion, e.g. for
117 controlled types).
118 * sem_ch13.adb: All warning messages regarding bit order should
119 be info: messages.
120 * gnat_ugn.texi: Minor correction of missing @ on @code
121
122 2014-07-17 Robert Dewar <dewar@adacore.com>
123
124 * restrict.ads (Implementation_Restriction): Add No_Long_Long_Integer.
125 * s-rident.ads (Partition_Boolean_Restrictions): Add
126 No_Long_Long_Integer.
127 * sem_ch3.adb (Modular_Type_Declaration): Size must be <=
128 Long_Integer'Size if restriction No_Long_Long_Integer is active.
129 (Signed_Integer_Type_Declaration): Do not allow Long_Long_Integer
130 as the implicit base type for a signed integer type declaration
131 if restriction No_Long_Long_Integer is active.
132 * sem_util.ads, sem_util.adb (Set_Entity_With_Checks): Include check for
133 No_Long_Long_Integer.
134
135 2014-07-17 Robert Dewar <dewar@adacore.com>
136
137 * sem_ch3.adb, a-ztexio.ads, exp_imgv.adb, casing.adb, casing.ads,
138 einfo.ads, checks.adb, sem_ch12.adb, a-textio.ads, freeze.adb,
139 repinfo.adb, exp_ch6.adb, sem_ch4.adb, a-witeio.ads, sem_ch8.adb,
140 sem_warn.adb, exp_aggr.adb, exp_dist.adb, par-tchk.adb, s-fatgen.adb,
141 treepr.adb, lib-xref.adb: Remove the word kludge from ada sources.
142
143 2014-07-17 Robert Dewar <dewar@adacore.com>
144
145 * debug.adb: Remove -gnatdQ.
146 * exp_disp.adb: Remove -gnatdQ.
147 * a-ztenio.ads, a-wtinio.ads, a-wtmoio.ads, a-ztcoau.ads, a-tiinio.ads,
148 a-wtfiio.ads, a-timoio.ads, sem_ch12.adb, a-tifiio.ads, a-ztinio.ads,
149 rtsfind.adb, rtsfind.ads, a-ztmoio.ads, a-wtdeio.ads, a-ztfiio.ads,
150 a-tideio.ads, a-wtflio.ads, a-ztdeio.ads, sem_ch8.adb, a-tiflio.ads,
151 sprint.adb, a-ztflio.ads, snames.ads-tmpl, a-wtenio.ads,
152 a-tienio.ads: Rename Text_IO_Kludge to Text_IO_Special_Unit.
153
154 2014-07-17 Robert Dewar <dewar@adacore.com>
155
156 * back_end.adb: Minor reformatting and comment additions.
157 * checks.ads, checks.adb (Duplicated_Tag_Checks_Suppressed): New
158 function.
159 * exp_disp.adb (Make_DT): Use Duplicated_Tag_Checks_Suppressed.
160 (Make_VM_TSD): Use Duplicated_Tag_Checks_Suppressed.
161 * gnat_rm.texi: Document new check Duplicated_Tag_Checks_Suppressed.
162 * gnat_ugn.texi: Additional documentation for Duplicated_Tag_Check.
163 * snames.ads-tmpl (Duplicated_Tag_Checks_Suppressed): New check.
164 * types.ads (Duplicated_Tag_Checks_Suppressed): New check.
165
166 2014-07-17 Robert Dewar <dewar@adacore.com>
167
168 * gnat_rm.texi: Minor comment updates.
169
170 2014-07-17 Ed Schonberg <schonberg@adacore.com>
171
172 * sem_util.adb (Make_Explicit_Dereference): If the expression
173 being dereferenced is a generalized indexing, reset the overloaded
174 flag on the generalized indexing call, consistent with the
175 resetting of the flag on the original indexed component.
176
177 2014-07-17 Robert Dewar <dewar@adacore.com>
178
179 * gnat_ugn.texi: Document advise not to mix -gnatV? and
180 optimization.
181
182 2014-07-17 Robert Dewar <dewar@adacore.com>
183
184 * checks.adb (Insert_Valid_Check): Don't insist on a name
185 for the prefix when we make calls to Force_Evaluation and
186 Duplicate_Subexpr_No_Checks.
187 * exp_util.adb (Is_Volatile_Reference): Handle all cases properly
188 (Remove_Side_Effects): Handle all volatile references right
189 (Side_Effect_Free): Volatile reference is never side effect free
190 * sinfo.ads (N_Attribute_Reference): Add comments explaining
191 that in the tree, the prefix can be a general expression.
192
193 2014-07-17 Hristian Kirtchev <kirtchev@adacore.com>
194
195 * sem_ch6.adb (Analyze_Subprogram_Body_Contract,
196 Analyze_Subprogram_Contract): Add comments on SPARK_Mode save/restore.
197 * sem_ch7.adb (Analyze_Package_Body_Contract,
198 Analyze_Package_Contract): Add comments on SPARK_Mode save/restore.
199
200 2014-07-17 Robert Dewar <dewar@adacore.com>
201
202 * exp_ch7.ads, exp_util.ads: Document Insert_Action_After,
203 Store_After_Actions_In_Scope.
204
205 2014-07-17 Robert Dewar <dewar@adacore.com>
206
207 * sem_aux.ads: Minor comment addition.
208
209 2014-07-17 Ed Schonberg <schonberg@adacore.com>
210
211 * sem_res.adb (Make_Call_Into_Operator): If the call is already
212 a rewriting of an operator node, there are no actuals to be
213 propagated from original node to rewritten node when in ASIS mode.
214
215 2014-07-17 Hristian Kirtchev <kirtchev@adacore.com>
216
217 * sem_ch6.adb (Analyze_Subprogram_Body_Contract,
218 Analyze_Subprogram_Contract): Add new local variable Mode. Save
219 and restore the SPARK mode of the related construct in a
220 stack-like fashion.
221 * sem_ch7.adb (Analyze_Package_Body_Contract,
222 Analyze_Package_Contract): Add new local variable Mode. Save and
223 restore the SPARK mode of the related construct in a stack-like fashion.
224 * sem_util.adb Remove with and use clause for Opt.
225 (Restore_SPARK_Mode): New routine.
226 (Save_SPARK_Mode_And_Set): New routine.
227 * sem_util.ads Add with and use clause for Opt.
228 (Restore_SPARK_Mode): New routine.
229 (Save_SPARK_Mode_And_Set): New routine.
230
231 2014-07-17 Hristian Kirtchev <kirtchev@adacore.com>
232
233 * exp_util.adb (Is_Aliased): Transient objects
234 within an expression with actions cannot be considered aliased.
235
236 2014-07-17 Thomas Quinot <quinot@adacore.com>
237
238 * sem.ads (Scope_Stack_Entry): Reorganize storage of action lists;
239 introduce a new list (cleanup actions) for each (transient) scope.
240 * sinfo.ads, sinfo.adb (Cleanup_Actions): New attribute for
241 N_Block_Statement
242 * exp_ch7.ads (Store_Cleanup_Actions_In_Scope): New subprogram.
243 * exp_ch7.adb (Store_Actions_In_Scope): New subprogram, common
244 processing for Store_xxx_Actions_In_Scope.
245 (Build_Cleanup_Statements): Allow for a list of additional
246 cleanup statements to be passed by the caller.
247 (Expand_Cleanup_Actions): Take custom cleanup actions associated
248 with an N_Block_Statement into account.
249 (Insert_Actions_In_Scope_Around): Account for Scope_Stack_Entry
250 reorganization (refactoring only, no behaviour change).
251 (Make_Transient_Block): Add assertion to ensure that the current
252 scope is indeed a block (namely, the entity for the transient
253 block being constructed syntactically, which has already been
254 established as a scope). If cleanup actions are present in the
255 transient scope, transfer them now to the transient block.
256 * exp_ch6.adb (Expand_Protected_Subprogram_Call): Freeze the
257 called function while it is still present as the name in a call
258 in the tree. This may not be the case later on if the call is
259 rewritten into a transient block.
260 * exp_smem.adb (Add_Shared_Var_Lock_Procs): The post-actions
261 inserted after calling a protected operation on a shared passive
262 protected must be performed in a block finalizer, not just
263 inserted in the tree, so that they are executed even in case of
264 a normal (RETURN) or abnormal (exception) transfer of control
265 outside of the current scope.
266 * exp_smem.ads (Add_Shared_Var_Lock_Procs): Update documentation
267 * sem_ch8.adb, expander.adb, exp_ch11.adb: Adjust for
268 Scope_Stack_Entry reorganization.
269
270 2014-07-17 Thomas Quinot <quinot@adacore.com>
271
272 * exp_disp.adb (Make_DT, Make_VM_TSD): Do not omit Check_TSD
273 call for types that do not have an explicit attribute definition
274 clause for External_Tag, as their default tag may clash with an
275 explicit tag defined for some other type.
276
277 2014-07-17 Hristian Kirtchev <kirtchev@adacore.com>
278
279 * exp_util.adb (Is_Controlled_Function_Call): Recognize a
280 controlled function call with multiple actual parameters that
281 appears in Object.Operation form.
282
283 2014-07-17 Thomas Quinot <quinot@adacore.com>
284
285 * einfo.ads, einfo.adb (Has_External_Tag_Rep_Clause): Remove
286 entity flag.
287 * sem_ch13.adb (Analyze_Attribute_Definition_Clause, case
288 External_Tag): No need to set entity flag.
289 * sem_aux.ads, sem_aux.adb (Has_External_Tag_Rep_Clause):
290 Reimplement correctly in terms of Has_Rep_Item.
291
292 2014-07-17 Thomas Quinot <quinot@adacore.com>
293
294 * exp_ch7.adb (Establish_Transient_Scope.Find_Node_To_Be_Wrapped):
295 Start examining the tree at the node passed to
296 Establish_Transient_Scope (not its parent).
297 * exp_ch6.adb (Make_Build_In_Place_Call_In_Object_Declaration):
298 The access type for the variable storing the reference to
299 the call must be declared and frozen prior to establishing a
300 transient scope.
301 * exp_ch9.adb: Minor reformatting.
302
303 2014-07-17 Pascal Obry <obry@adacore.com>
304
305 * s-os_lib.ads: Minor comment update.
306
307 2014-07-17 Tristan Gingold <gingold@adacore.com>
308
309 * sysdep.c: Add ATTRIBUTE_UNUSED to avoid warnings. Fix some
310 indentation.
311 * socket.c: Remove #warning to avoid warning.
312 * expect.c: Indent some preprocessor directives to clarify
313 nested if. Do not use wait.h on PikeOS. Add ATTRIBUTE_UNUSED
314 to remove warnings.
315 * env.c: Fix indentation. Port to PikeOS.
316 * gsocket.h: Port to PikeOS. Remove #warning.
317 * terminals.c: Port to PikeOS. Fix indentation of the stubs.
318 Add ATTRIBUTE_UNUSED to stubs arguments. Fix return statement
319 of stubbed __gnat_setup_parent_communication.
320 * adaint.c: Port to PikeOS. Reindent some preprocessor
321 directives to clarify nested if. Fix indentation. Add missing
322 ATTRIBUTE_UNUSED.
323
324 2014-07-17 Robert Dewar <dewar@adacore.com>
325
326 * sem_attr.adb: Minor reformatting.
327
328 2014-07-17 Robert Dewar <dewar@adacore.com>
329
330 * exp_ch7.adb, exp_ch7.ads, sinfo.ads: Minor reformatting.
331
332 2014-07-17 Ed Schonberg <schonberg@adacore.com>
333
334 * sem_case.adb (Check_Choice_Set): If the case expression is the
335 expression in a predicate, do not recheck coverage against itself,
336 to prevent spurious errors.
337 * sem_ch13.adb (Check_Aspect_At_End_Of_Declarations): Indicate that
338 expression comes from an aspect specification, to prevent spurious
339 errors when expression is a case expression in a predicate.
340
341 2014-07-17 Pascal Obry <obry@adacore.com>
342
343 * adaint.c, adaint.h (__gnat_set_executable): Add mode parameter.
344 * s-os_lib.ads, s-os_lib.adb (Set_Executable): Add Mode parameter.
345
346 2014-07-17 Vincent Celier <celier@adacore.com>
347
348 * gnatchop.adb, make.adb, gnatbind.adb, clean.adb, gprep.adb,
349 gnatxref.adb, gnatls.adb, gnatfind.adb, gnatname.adb: Do not output
350 the usage for an erroneous invocation of a gnat tool.
351
352 2014-07-16 Vincent Celier <celier@adacore.com>
353
354 * gnatls.adb: Get the target parameters only if -nostdinc was
355 not specified.
356
357 2014-07-16 Ed Schonberg <schonberg@adacore.com>
358
359 * checks.adb (Insert_Valid_Check): If the expression is a packed
360 component of a modular type of the right size the data is always
361 valid. This os particularly useful if the component is part of
362 a volatile variable.
363
364 2014-07-16 Robert Dewar <dewar@adacore.com>
365
366 * gnat_rm.texi, sinfo.ads, freeze.adb, exp_aggr.adb: Minor reformatting
367
368 2014-07-16 Thomas Quinot <quinot@adacore.com>
369
370 * exp_ch7.ads: Minor documentation fix.
371
372 2014-07-16 Ed Schonberg <schonberg@adacore.com>
373
374 * sem_ch3.adb (Find_Type_Name): Diagnose properly
375 a private extension completion that is an interface definition
376 with an interface list.
377
378 2014-07-16 Arnaud Charlet <charlet@adacore.com>
379
380 * gnatls.adb (Gnatls): Code clean ups.
381
382 2014-07-16 Thomas Quinot <quinot@adacore.com>
383
384 * sinfo.ads, sinfo.adb (N_Compound_Statement): New node kind.
385 * sem.adb (Analyze): Handle N_Compound_Statement.
386 * sprint.adb (Sprint_Node_Actual): Ditto.
387 * sem_ch5.ads, sem_ch5.adb (Analyze_Compound_Statement): New
388 procedure to handle N_Compound_Statement.
389 * exp_aggr.adb (Collect_Initialization_Statements):
390 Use a proper compound statement node, instead of a bogus
391 expression-with-actions with a NULL statement as its expression,
392 to wrap collected initialization statements.
393 * freeze.ads, freeze.adb
394 (Explode_Initialization_Compound_Statement): New public procedure,
395 lifted from Freeze_Entity.
396 (Freeze_Entity): When freezing
397 an object with captured initialization statements and without
398 delayed freezing, explode compount statement.
399 * sem_ch4.adb (Analyze_Expression_With_Actions): Remove special
400 case that used to handle bogus EWAs with NULL statement as
401 the expression.
402 * exp_ch13.adb (Expand_N_Freeze_Entity): For an object with
403 delayed freezing and captured initialization statements, explode
404 compound statement.
405
406 2014-07-16 Gary Dismukes <dismukes@adacore.com>
407
408 * g-rewdat.adb, g-rewdat.ads: Minor reformatting.
409
410 2014-07-16 Doug Rupp <rupp@adacore.com>
411
412 * s-interr-hwint.adb: Casing error on parameter.
413
414 2014-07-16 Pascal Obry <obry@adacore.com>
415
416 * Makefile.rtl: Add g-rewdat.o dependencies in
417 GNATRTL_NONTASKING_OBJS.
418
419 2014-07-16 Ed Schonberg <schonberg@adacore.com>
420
421 * sem_case.adb: Code clean up.
422
423 2014-07-16 Vincent Celier <celier@adacore.com>
424
425 * make.adb: Do not read gnat.adc when gnatmake is invoked
426 with -gnatA.
427
428 2014-07-16 Pascal Obry <obry@adacore.com>
429
430 * gnat_rm.texi, impunit.adb, g-rewdat.adb, g-rewdat.ads: Initial
431 implementation of GNAT.Rewrite_Data.
432
433 2014-07-16 Vincent Celier <celier@adacore.com>
434
435 * gnatls.adb (Normalize): New function.
436 (Gnatls): Get the target parameters. On targets other than VMS,
437 normalize the path names in the source search path, the object search
438 path and the project search path.
439
440 2014-07-16 Ed Schonberg <schonberg@adacore.com>
441
442 * sem_case.adb: Avoid self-checking of case expressions in
443 dynamic predicates.
444
445 2014-07-16 Robert Dewar <dewar@adacore.com>
446
447 * gnat_rm.texi: Document effect of Suppress_Initialization on tags and
448 discriminants.
449
450 2014-07-16 Eric Botcazou <ebotcazou@adacore.com>
451
452 * switch-b.adb (Scan_Binder_Switches): Add missing guard.
453
454 2014-07-16 Ben Brosgol <brosgol@adacore.com>
455
456 * gnat_ugn.texi: Fix typo.
457
458 2014-07-16 Ed Schonberg <schonberg@adacore.com>
459
460 * exp_ch4.adb (Expand_N_Case_Expression): Do not expand case
461 expression if it is the specification of a subtype predicate:
462 it will be expanded when the return statement is analyzed, or
463 when a static predicate is transformed into a static expression
464 for evaluation by the front-end.
465 * sem_ch13.adb (Get_RList): If the expression for a static
466 predicate is a case expression, extract the alternatives of the
467 branches with a True value to create the required statically
468 evaluable expression.
469
470 2014-07-16 Thomas Quinot <quinot@adacore.com>
471
472 * exp_prag.adb (Expand_Pragma_Check): Use the location of the
473 expression, not the location of the aspect, for all generated
474 code, so that in particular the call to raise_assert_failure
475 gets the sloc of the associated condition.
476 * exp_ch6.adb
477 (Expand_Subprogram_Contract.Build_Postconditions_Procedure):
478 Set an explicit End_Label on the handled sequence of statements
479 for the _Postconditions procedure so that the implicit return
480 statement does not erroneously get associated with code generated
481 for the last condition in postconditions.
482
483 2014-07-16 Thomas Quinot <quinot@adacore.com>
484
485 * ug_words: Fix name of VMS synonym for -gnatw.z (SIZE_ALIGNMENT,
486 not SIZE_ALIGN) and -gnatw.Z (NOSIZE_ALIGNMENT, not NOSIZE_ALIGN).
487 * vms_data.ads: Add missing spaces in VMS synonyms for -gnatw.z /
488 -gnatw.Z.
489
490 2014-07-16 Robert Dewar <dewar@adacore.com>
491
492 * sem_ch3.adb, sem_prag.adb, sem_util.adb, sem_res.adb, sem_ch13.adb:
493 Minor code reorganization (use Is_Access_Type, not in Access_Kind).
494 * exp_ch3.adb: Minor code reorganization, use Is_Access_Type,
495 not in Access_Kind.
496 * par-ch4.adb (At_Start_Of_Attribute): New function
497 (P_Simple_Expression): Better msg for bad attribute prefix.
498 * scans.ads: Minor reformatting.
499
500 2014-07-16 Ed Schonberg <schonberg@adacore.com>
501
502 * sem_attr.adb (Resolve_Attribute, case 'Update): If choice is a
503 static constant, check that in belongs to the corresponding index
504 subtype, to produce the proer warning when expansion is disabled.
505
506 2014-07-16 Robert Dewar <dewar@adacore.com>
507
508 * freeze.adb (Freeze_Entity): Warn on incompatible size/alignment.
509 * gnat_ugn.texi: Document -gnatw.z and -gnatw.Z.
510 * ug_words: VMS synonyms (WARNINGS=[NO]SIZE_ALIGN) for -gnatw.z/-gnatw.Z
511 * usage.adb: Add lines for -gnatw.z/-gnatw.Z.
512 * vms_data.ads: VMS synonyms (WARNINGS=[NO]SIZE_ALIGN) for
513 -gnatw.z/-gnatw.Z
514 * warnsw.adb: Set Warn_On_Size_Alignment appropriately.
515 * warnsw.ads (Warn_On_Size_Alignment): New flag Minor
516 reformatting.
517
518 2014-07-16 Hristian Kirtchev <kirtchev@adacore.com>
519
520 * exp_ch7.adb (Process_Declarations): Reinstate the check on
521 a hook object to ensure that the related transient declaration
522 is finalizable.
523 * exp_util.adb (Is_Aliased): Do not consider expresison with
524 actions as a special context.
525 (Requires_Cleanup_Actions): Reinstate the check on a hook object to
526 ensure that the related transient declaration is finalizable.
527
528 2014-07-16 Robert Dewar <dewar@adacore.com>
529
530 * checks.ads, checks.adb (Allocation_Checks_Suppressed): New function.
531 * snames.ads-tmpl: Add Allocation_Check to list of check names.
532 * types.ads: Add Allocation_Check to list of check names.
533
534 2014-07-16 Thomas Quinot <quinot@adacore.com>
535
536 * sem_util.adb (Enter_Name): replace bogus test for presence of
537 Corresponding_Remote_Type with correct test on Ekind.
538 * sem_res.adb (Valid_Conversion): ditto; also clarify validity
539 of calls to Corresponding_ Remote_Type (documentation fix).
540
541 2014-07-16 Robert Dewar <dewar@adacore.com>
542
543 * gnat_rm.texi: Document illegal case of Unrestricted_Access.
544 * sem_attr.adb (Analyze_Access_Attribute): Set_Non_Aliased_Prefix
545 where it applies.
546 (Resolve_Attribute, case Access): Flag illegal Unrestricted_Access use.
547 * sinfo.ads, sinfo.adb (Non_Aliased_Prefix): New flag.
548
549 2014-07-16 Robert Dewar <dewar@adacore.com>
550
551 * gnat_ugn.texi: Document binder switch -Ra.
552 * gnatbind.adb (List_Closure_Display): Implement -Ra switch
553 (List_Closure_All).
554 * opt.ads (List_Closure_All): New switch.
555 * switch-b.adb (Scan_Binder_Switches): Recognize -Ra to set
556 List_Closure_All.
557
558 2014-07-16 Ben Brosgol <brosgol@adacore.com>
559
560 * gnat_rm.texi: Minor edits, to make case consistent in names
561 of types and fields.
562
563 2014-07-16 Robert Dewar <dewar@adacore.com>
564
565 * gnat_rm.texi: Document erroneous mixing of thin pointers and
566 unrestricted access
567 * gnat_ugn.texi: Add note on size of access types about thin
568 pointers and the use of attribute Unrestricted_Access.
569
570 2014-07-16 Ed Schonberg <schonberg@adacore.com>
571
572 * a-cbdlli.ads, a-cbdlli.adb, a-cbhama.ads, a-cbhama.adb,
573 * a-cbhase.ads, a-cbhase.adb, a-cborma.ads, a-cborma.adb,
574 * a-cborse.ads, a-cborse.adb, a-cobove.ads a-cobove.adb: Add Control
575 machinery to detect tampering on bounded vectors.
576
577 2014-07-16 Robert Dewar <dewar@adacore.com>
578
579 * gnat_rm.texi: Document that leading/trailing asterisks are
580 now implied for the pattern match string for pragma Warnings
581 and Warning_As_Error.
582 * sem_prag.adb (Acquire_Warning_Match_String): New procedure.
583 (Analyze_Pragma, case Warning_As_Error): Call
584 Acquire_Warning_Match_String.
585 (Analyze_Pragma, case Warnings): Call Acquire_Warning_Match_String.
586
587 2014-07-16 Bob Duff <duff@adacore.com>
588
589 * gnat_ugn.texi: Document need for project file
590 for --incremental switch for gnat2xml.
591
592 2014-07-16 Robert Dewar <dewar@adacore.com>
593
594 * gnat_rm.texi: Fix example of non-packable components in packed
595 records section.
596
597 2014-07-16 Robert Dewar <dewar@adacore.com>
598
599 * s-tpoben.adb, s-tasren.adb, s-interr.adb, s-interr-hwint.adb,
600 s-shasto.adb, s-interr-vms.adb, s-interr-sigaction.adb: Avoid use of
601 upper case in exception messages.
602
603 2014-07-16 Robert Dewar <dewar@adacore.com>
604
605 * snames.ads-tmpl, sem_attr.adb, exp_attr.adb: Same_Storage attribute
606 is renamed Has_Same_Storage.
607 * gnat_rm.texi: Document missing SPARK pragmas and attributes.
608 * sem_prag.adb: Minor comment fix (use LOCAL_NAME in syntax
609 descriptions).
610
611 2014-07-16 Robert Dewar <dewar@adacore.com>
612
613 * exp_util.adb, sem_attr.adb, exp_ch4.adb, a-cohase.ads,
614 a-coinho-shared.adb, a-coinho-shared.ads: Minor reformatting.
615
616 2014-07-16 Robert Dewar <dewar@adacore.com>
617
618 * gnat_ugn.texi: Add note that integrated
619 preprocessing cannot be applied to configuration pragma files.
620
621 2014-07-16 Yannick Moy <moy@adacore.com>
622
623 * sem_attr.adb (Analyze_Attribute/cases Pred
624 and Succ): Always enable range check on fixed-point types if
625 not suppressed for the type.
626
627 2014-07-16 Hristian Kirtchev <kirtchev@adacore.com>
628
629 * sem_util.adb (State_Has_Enabled_Property):
630 Account for an external property denoted by an others choice.
631
632 2014-07-16 Hristian Kirtchev <kirtchev@adacore.com>
633
634 * exp_ch4.ads, exp_ch4.adb (Find_Hook_Context): Relocated to Exp_Util.
635 * exp_ch7.adb (Process_Declarations): There is no need to check
636 that a transient object being hooked is controlled as it would
637 not have been hooked in the first place.
638 * exp_ch9.adb Remove with and use clause for Exp_Ch4.
639 * exp_util.adb (Find_Hook_Context): Relocated from Exp_Ch4.
640 (Is_Aliased): A renaming of a transient controlled object is
641 not considered aliasing when it occurs within an expression
642 with actions.
643 (Requires_Cleanup_Actions): There is no need to
644 check that a transient object being hooked is controlled as it
645 would not have been hooked in the first place.
646 * exp_util.ads (Find_Hook_Context): Relocated from Exp_Ch4.
647
648 2014-07-16 Hristian Kirtchev <kirtchev@adacore.com>
649
650 * sem_ch13.adb (Insert_After_SPARK_Mode): Moved to
651 the outer level of routine Analyze_Aspect_Specifications. Ensure
652 that the corresponding pragmas of aspects Initial_Condition and
653 Initializes are inserted after pragma SPARK_Mode.
654
655 2014-07-16 Ed Schonberg <schonberg@adacore.com>
656
657 * sem_attr.adb (Analyze_Attribute, case 'Update): Handle
658 properly a choice list with more than one choice, where each
659 is an aggregate denoting a sequence of array indices for a
660 multidimentional array. For SPARK use.
661
662 2014-07-16 Vadim Godunko <godunko@adacore.com>
663
664 * a-coinho-shared.adb (Adjust): Create
665 copy of internal shared object and element when source container
666 is locked.
667 (Copy): Likewise.
668 (Query_Element): Likewise.
669 (Update_Element): Likewise.
670 (Constant_Reference): Likewise. Raise Constraint_Error on attempt
671 to get reference for empty holder.
672 (Reference): Likewise.
673
674 2014-07-16 Thomas Quinot <quinot@adacore.com>
675
676 * exp_ch4.adb (Find_Hook_Context): New subprogram, extracted
677 from Process_Transient_Oject.
678 * exp_ch4.ads: Ditto.
679 * exp_ch9.adb (Build_Class_Wide_Master): Insert the _master
680 declaration as an action on the topmost enclosing expression,
681 not on a possibly conditional subexpreession.
682
683 2014-07-16 Vadim Godunko <godunko@adacore.com>
684
685 * a-coinho.adb, a-coinho-shared.adb, a-coinho.ads, a-coinho-shared.ads:
686 Fix parameter mode of Update_Element.
687
688 2014-07-16 Robert Dewar <dewar@adacore.com>
689
690 * a-coinho.adb, a-coinho-shared.adb, a-coinho-shared.ads: Minor
691 reformatting.
692
693 2014-07-16 Ed Schonberg <schonberg@adacore.com>
694
695 * a-cohase.ads: Type Iterator must be controlled, so that the
696 tampering bit is properly set through an iteration.
697 * a-cohase.adb: Add Finalize operation for type Iterator.
698
699 2014-07-16 Ed Schonberg <schonberg@adacore.com>
700
701 * a-coinho-shared.adb, a-coinho-shared.ads: Proper structures for
702 tampering checks.
703
704 2014-07-16 Ed Schonberg <schonberg@adacore.com>
705
706 * a-coinho-shared.adb: Fix spurious accessibility check.
707
708 2014-06-15 Jan Hubicka <hubicka@ucw.cz>
709
710 * gcc-interface/utils.c (process_attributes): Use set_decl_tls_model.
711
712 2014-06-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
713
714 PR ada/61505
715 * gnat_rm.texi: Fix errors with makeinfo 5.1.
716
717 2014-06-14 Arnaud Charlet <charlet@adacore.com>
718
719 PR ada/61505
720 * gnat_rm.texi: Attempt to fix error with makeinfo 5.1.
721
722 2014-06-13 Yannick Moy <moy@adacore.com>
723
724 * exp_attr.adb: Fix typo in comment.
725 * gnat1drv.adb (Adjust_Global_Switches): Force float overflow
726 checking in GNATprove_Mode.
727
728 2014-06-13 Ed Schonberg <schonberg@adacore.com>
729
730 * a-coinho-shared.adb, a-coinho-shared.ads: Update shared version.
731
732 2014-06-13 Robert Dewar <dewar@adacore.com>
733
734 * sem_ch3.adb, sem_ch9.adb, a-coinho.adb, a-coinho.ads: Minor
735 reformatting.
736
737 2014-06-13 Hristian Kirtchev <kirtchev@adacore.com>
738
739 * sem_prag.adb (Analyze_Pragma): Add local
740 variable Missing_Parentheses. Emit an error when a state
741 declaration with options appears without parentheses. Add a
742 guard to prevent a bogus error when a state declaration may be
743 interpreted as an option if a previous declaration with options
744 was not parenthesized.
745
746 2014-06-13 Robert Dewar <dewar@adacore.com>
747
748 * checks.adb: Validate_Alignment_Check_Warnings: New procedure
749 (Apply_Address_Clause_Check): Make Aligment_Warnings table entry.
750 * checks.ads (Alignment_Warnings_Record): New type.
751 (Alignment_Warnings): New table
752 (Validate_Alignment_Check_Warnings): New procedure.
753 * errout.adb (Delete_Warning_And_Continuations): New procedure
754 (Error_Msg_Internal): Set Warning_Msg (Delete_Warning): Handle
755 Warnings_Treated_As_Errors (Finalize): Minor reformatting
756 * errout.ads (Warning_Msg): New variable
757 (Delete_Warning_And_Continuations): New procedure
758 * erroutc.adb (Delete_Msg): Handle Warnings_Treated_As_Errors count.
759 * gnat1drv.adb (Post_Compilation_Validation_Checks): New procedure.
760
761 2014-06-13 Ed Schonberg <schonberg@adacore.com>
762
763 * a-coinho.adb, a-coinho.ads: Add Reference machinery.
764
765 2014-06-13 Hristian Kirtchev <kirtchev@adacore.com>
766
767 * errout.adb (SPARK_Msg_N): New routine.
768 (SPARK_Msg_NE): New routine.
769 * errout.ads Add a section on SPARK-related error routines.
770 (SPARK_Msg_N): New routine.
771 (SPARK_Msg_NE): New routine.
772 * sem_ch13.adb (Analyze_Aspect_Specifications): Ensure that
773 pragma Abstract_State is always inserted after SPARK_Mode.
774 (Insert_After_SPARK_Mode): New routine.
775 * sem_prag.adb (Analyze_Abstract_State,
776 Analyze_Constituent, Analyze_External_Property,
777 Analyze_External_Property_In_Decl_Part, Analyze_Global_Item,
778 Analyze_Global_List, Analyze_Initialization_Item,
779 Analyze_Initialization_Item_With_Inputs, Analyze_Input_Item,
780 Analyze_Input_List, Analyze_Input_Output, Analyze_Part_Of,
781 Analyze_Pragma, Analyze_Refined_Depends_In_Decl_Part,
782 Analyze_Refined_Global_In_Decl_Part,
783 Analyze_Refined_State_In_Decl_Part, Analyze_Refinement_Clause,
784 Check_Aspect_Specification_Order, Check_Constituent_Usage,
785 Check_Declaration_Order, Check_Dependency_Clause,
786 Check_Duplicate_Mode, Check_Duplicate_Option,
787 Check_Duplicate_Property, Check_External_Properties,
788 Check_External_Property, Check_Function_Return,
789 Check_Matching_Constituent, Check_Matching_State,
790 Check_Mode_Restriction_In_Enclosing_Context,
791 Check_Mode_Restriction_In_Function, Check_Refined_Global_Item,
792 Check_State_And_Constituent_Use, Create_Or_Modify_Clause,
793 Has_Extra_Parentheses, Inconsistent_Mode_Error,
794 Match_Error, Propagate_Part_Of, Report_Extra_Clauses,
795 Report_Extra_Constituents_In_List, Report_Extra_Inputs,
796 Report_Unrefined_States, Report_Unused_Constituents,
797 Report_Unused_States, Role_Error, Usage_Error):
798 Convert Error_Msg_XXX calls to SPARK_Msg_XXX calls
799 to report semantic errors only when SPARK_Mode is on.
800 (Analyze_Depends_In_Decl_Part): Do not check the syntax of
801 pragma Depends explicitly, this is now done by the analysis.
802 (Analyze_Global_In_Decl_List): Do not check the syntax of
803 pragma Global explicitly, this is now done by the analysis.
804 (Analyze_Initializes_In_Decl_Part): Do not check the syntax of
805 pragma Initializes explicitly, this is now done by the analysis.
806 (Analyze_Part_Of): Do not check the syntax of the encapsulating
807 state, this is now done by the analysis.
808 (Analyze_Pragma): Do
809 not check the syntax of a state declaration, this is now done
810 by the analysis.
811 (Analyze_Refined_Depends_In_Decl_Part): Do not
812 check the syntax of pragma Refined_Depends explicitly, this is now
813 done by the analysis.
814 (Analyze_Refined_Global_In_Decl_Part): Do
815 not check the syntax of pragma Refined_Global explicitly, this is
816 now done by the analysis.
817 (Analyze_Refined_State_In_Decl_Part):
818 Do not check the syntax of pragma Refined_State explicitly, this
819 is now done by the analysis.
820 (Check_Dependence_List_Syntax): Removed.
821 (Check_Global_List_Syntax): Removed.
822 (Check_Initialization_List_Syntax): Removed.
823 (Check_Item_Syntax): Removed.
824 (Check_Missing_Part_Of): Do not consider items from an instance.
825 (Check_Refinement_List_Syntax): Removed.
826 (Check_State_Declaration_Syntax): Removed.
827 (Collect_Global_List): Do not raise Program_Error when the input is
828 malformed.
829 (Process_Global_List): Do not raise Program_Error when the input
830 is malformed.
831 * sem_ch13.adb: Minor reformatting.
832
833 2014-06-13 Ed Schonberg <schonberg@adacore.com>
834
835 * sem_ch3.adb (Find_Type_Name): Diagnose a private type completion
836 that is an interface definition with an interface list.
837 (Process_Full_View): Move error message on missmatched interfaces
838 between views to the declaration of full view, for clarity.
839 * sem_ch9.adb (Check_Interfaces): Move error message to full view,
840 for clarity.
841
842 2014-06-13 Robert Dewar <dewar@adacore.com>
843
844 * exp_attr.adb (Expand_N_Attribute_Reference, case Pred/Succ): Change
845 reason to Overflow.
846
847 2014-06-13 Robert Dewar <dewar@adacore.com>
848
849 * makeutl.adb: Minor reformatting.
850
851 2014-06-13 Gail Schenker <schenker@adacore.com>
852
853 * debug.adb, sem_eval.adb (Why_Not_Static): Remove temporary code and
854 associated flag (d.z), no longer needed.
855
856 2014-06-13 Ed Schonberg <schonberg@adacore.com>
857
858 * sem_ch13.adb (Analyze_Aspect_Specifications): For Import and
859 Export aspects, do not check whether a corresponding Convention
860 aspect has been specified. Convention is optional in Ada2012,
861 and defaults to Convention_Ada.
862
863 2014-06-13 Eric Botcazou <ebotcazou@adacore.com>
864
865 * checks.adb (Apply_Address_Clause_Check): Only issue the new
866 warning if the propagation warning is issued.
867
868 2014-06-13 Thomas Quinot <quinot@adacore.com>
869
870 * exp_ch4.adb: Minor reformatting.
871
872 2014-06-13 Robert Dewar <dewar@adacore.com>
873
874 * exp_attr.adb (Expand_N_Attribute_Reference, case Pred):
875 Handle float range check case (Expand_N_Attribute_Reference,
876 case Succ): Handle float range check case.
877 * sem_attr.adb (Analyze_Attribute, case Pred/Succ): Handle float
878 range check case.
879
880 2014-06-13 Vincent Celier <celier@adacore.com>
881
882 * makeutl.ads (Compute_Builder_Switches): Change name of
883 parameter Root_Environment to Env.
884 * prj-conf.adb (Check_Switches): Call Locate_Runtime with the
885 Env parameter of procedure Get_Or_Create_Configuration_File.
886 (Locate_Runtime): Call Find_Rts_In_Path with the Project_Path
887 of new parameter Env.
888 * prj-conf.ads (Locate_Runtime): New parameter Env of type
889 Prj.Tree.Environment.
890
891 2014-06-13 Robert Dewar <dewar@adacore.com>
892
893 * gnat_rm.texi: Minor comment clarification for Check_Float_Overflow.
894
895 2014-06-13 Robert Dewar <dewar@adacore.com>
896
897 * exp_attr.adb, exp_ch9.adb, lib-writ.adb, g-comlin.adb: Minor
898 reformatting.
899 * sem_attr.adb: Minor code reformatting and simplification.
900 * checks.adb: Fix minor typo.
901
902 2014-06-13 Emmanuel Briot <briot@adacore.com>
903
904 * g-comlin.adb (Get_Argument): fix expansion
905 of command line arguments (e.g. "*.adb") when using a custom
906 parser. The parser was not passed to the recursive call, and
907 thus we were trying to do the expansion on the default command
908 line parser.
909
910 2014-06-13 Thomas Quinot <quinot@adacore.com>
911
912 * exp_ch9.adb: Minor reformatting.
913
914 2014-06-13 Ed Schonberg <schonberg@adacore.com>
915
916 * exp_attr.adb (Expand_N_Attribute_Reference, case 'Old):
917 To determine whether the attribute should be expanded, examine
918 whether the enclosing postcondition pragma is to be checked,
919 rather than using the internal flag Assertions_Enabled.
920
921 2014-06-13 Ben Brosgol <brosgol@adacore.com>
922
923 * gnat_rm.texi: Minor fixes.
924 * gnat_ugn.texi: Added a missing "@itemize".
925
926 2014-06-13 Robert Dewar <dewar@adacore.com>
927
928 * debug.adb: Remove -gnatd.1 flag documentation.
929 * layout.adb (Layout_Type): Remove special handling of size
930 for anonymous access type.
931 * sem_ch3.adb (Replace_Type): Remove special handling of size
932 for anonymous access type.
933
934 2014-06-13 Robert Dewar <dewar@adacore.com>
935
936 * debug.adb: Document debug flag -gnatd.1.
937 * layout.adb (Layout_Type): Size change for anonymous access
938 types under -gnatd.1.
939 * sem_ch3.adb (Replace_Type): Size change for anonymous access
940 types under -gnatd.1.
941
942 2014-06-13 Robert Dewar <dewar@adacore.com>
943
944 * layout.adb (Layout_Type): Anonymous access types designating
945 unconstrained arrays are always thin pointers.
946 * sem_ch3.adb (Replace_Type): Anonymous access types designating
947 unconstrained arrays are always thin pointers.
948
949 2014-06-13 Ed Schonberg <schonberg@adacore.com>
950
951 * sem_attr.adb (Analyze_Attribute): Use Check_Parameterless_Call
952 to resolve the prefix of an attribute that is an entity name
953 and may be a parameterless call. Minor code reorganization.
954
955 2014-06-13 Robert Dewar <dewar@adacore.com>
956
957 * lib.ads, lib.adb, lib-writ.adb, lib-load.adb (Is_Compiler_Unit):
958 Removed.
959 * opt.ads (Compiler_Unit): New flag.
960 * par-ch5.adb (Test_Statement_Required): Call Check_Compiler_Unit
961 for null statement sequence (not allowed in compiler unit).
962 * par-prag.adb (Prag): Handle Compiler_Unit[_Warning] during
963 parsing.
964 * restrict.ads, restrict.adb (Check_Compiler_Unit): New version and new
965 calling sequence.
966 * sem_ch11.adb, sem_ch3.adb, sem_ch4.adb: New calling sequence for
967 Check_Compiler_Unit.
968 * sem_ch6.adb (Analyze_Extended_Return_Statement): Call
969 Check_Compiler_Unit (this construct is not allowed in compiler
970 units).
971 * sem_prag.adb (Analyze_Pragma, case Compiler_Unit[_Warning]):
972 Set Opt.Compiler_Unit.
973
974 2014-06-13 Geert Bosch <bosch@adacore.com>
975
976 * gnat_rm.texi, s-tasinf-solaris.ads, sem_prag.adb, gnat_ugn.texi,
977 s-tasinf-mingw.ads, s-tasinf.ads, s-tasinf-linux.ads,
978 s-tasinf-vxworks.ads: Make Task_Info pragma and package obsolescent.
979
980 2014-06-13 Robert Dewar <dewar@adacore.com>
981
982 * s-tasini.adb, s-tarest.adb, s-taprob.adb: Minor reformatting.
983
984 2014-06-13 Hristian Kirtchev <kirtchev@adacore.com>
985
986 * freeze.adb (Freeze_Entity): Remove the check concerning volatile
987 types in SPARK as it is poorly placed and poorly formulated. The
988 check was flagging ALL volatile entities as illegal in SPARK.
989 * sem_prag.adb (Process_Atomic_Shared_Volatile): Flag volatile
990 types as illegal in SPARK.
991
992 2014-06-13 Robert Dewar <dewar@adacore.com>
993
994 * sem_cat.adb: Minor reformatting.
995
996 2014-06-13 Yannick Moy <moy@adacore.com>
997
998 * sem_prag.adb (Analyze_Pragma/Post_Class): Fix typo.
999
1000 2014-06-13 Arnaud Charlet <charlet@adacore.com>
1001
1002 * gnat_rm.texi: Add detail on SPARK_05 restriction.
1003
1004 2014-06-13 Bob Duff <duff@adacore.com>
1005
1006 * s-solita.adb (Get_Sec_Stack_Addr, Init_Tasking_Soft_Links):
1007 Add assertions requiring the secondary stack to be initialized.
1008 * s-solita.ads (Init_Tasking_Soft_Links): Comment.
1009 * s-taprob.adb, s-tarest.adb, s-tasini.adb (elab code): Make sure the
1010 secondary stack is initialized before calling Init_Tasking_Soft_Links,
1011 by adding pragmas Elaborate_Body.
1012
1013 2014-06-13 Thomas Quinot <quinot@adacore.com>
1014
1015 * sem_ch13.adb (Analyze_Stream_TSS_Definition): Remove temporary
1016 kludge disabling new legality check.
1017
1018 2014-06-13 Hristian Kirtchev <kirtchev@adacore.com>
1019
1020 * freeze.adb (Freeze_Record_Type): Remove checks related to SPARK
1021 volatile types.
1022 (Freeze_Type): Volatile types are now illegal in SPARK.
1023
1024 2014-06-13 Robert Dewar <dewar@adacore.com>
1025
1026 * aspects.ads, aspects.adb: Add aspect Thread_Local_Storage.
1027 * gnat_rm.texi: Document aspect Thread_Local_Storage.
1028
1029 2014-06-13 Ed Schonberg <schonberg@adacore.com>
1030
1031 * sem_cat.adb (Validate_Static_Object_Name): A constant whose
1032 value is a temporary that renames an aggregate is legal in a
1033 preelaborated unit. Illegalities, if any will be detected in
1034 the aggregate components.
1035
1036 2014-06-13 Ed Schonberg <schonberg@adacore.com>
1037
1038 * einfo.ads: Minor reformatting an comment expansion.
1039
1040 2014-06-13 Robert Dewar <dewar@adacore.com>
1041
1042 * back_end.ads, back_end.adb: Make_Id, Make_SC, Set_RND are moved to
1043 Tbuild.
1044 * tbuild.ads, tbuild.adb: Make_Id, Make_SC, Set_RND are moved here from
1045 Back_End.
1046 * gnat1drv.adb: Make_Id, Make_SC, Set_RND are moved to Tbuild
1047 * sem_warn.adb: Minor reformatting.
1048
1049 2014-06-13 Doug Rupp <rupp@adacore.com>
1050
1051 * adaint.c (__gnat_open_new_temp) [VMS]: Open binary
1052 files with rfm=udf.
1053
1054 2014-06-13 Yannick Moy <moy@adacore.com>
1055
1056 * sem_warn.adb (Check_Unset_References): Take
1057 case of Refined_Post into account in Within_Postcondition check.
1058
1059 2014-06-13 Hristian Kirtchev <kirtchev@adacore.com>
1060
1061 * freeze.adb (Freeze_Record_Type): Volatile types are not allowed in
1062 SPARK.
1063
1064 2014-06-13 Yannick Moy <moy@adacore.com>
1065
1066 * sem_ch13.adb (Analyze_Aspect_Specifications/Aspect_Import,
1067 Aspect_Export): Consider that variables may be set outside the program.
1068
1069 2014-06-13 Robert Dewar <dewar@adacore.com>
1070
1071 * back_end.adb (Make_Id): New function.
1072 (Make_SC): New function.
1073 (Set_RND): New procedure.
1074 * back_end.ads (Make_Id): New function.
1075 (Make_SC): New function.
1076 (Set_RND): New procedure.
1077 * einfo.ads: Minor comment updates.
1078 * frontend.adb: Move Atree.Initialize call to Gnat1drv.
1079 * gnat1drv.adb (Gnat1drv): New calling sequence for
1080 Get_Target_Parameters.
1081 (Gnat1drv): Move Atree.Initialize here from Frontend.
1082 * targparm.adb (Get_Target_Parameters): New calling
1083 sequence (Get_Target_Parameters): Handle pragma Restriction
1084 (No_Dependence,..)
1085 * targparm.ads (Get_Target_Parameters): New calling sequence.
1086
1087 2014-06-13 Gary Dismukes <dismukes@adacore.com>
1088
1089 * sem_prag.adb (Process_Import_Or_Interface): Exit the homonym
1090 loop if the pragma does not come from source, so that an implicit
1091 pragma Import only applies to the first declaration, avoiding
1092 possible conflicts with earlier explicit and implicit declarations
1093 due to multiple Provide_Shift_Operators pragmas.
1094 (Set_Imported): Remove previous fix that bypassed pragma duplication
1095 error.
1096 * gnat_rm.texi: Change 'equivalent' to 'similar' in description
1097 of Provide_Shift_Operators.
1098
1099 2014-06-12 Jan Hubicka <hubicka@ucw.cz>
1100
1101 * gcc-interface/utils.c (process_attributes) <ATTR_LINK_SECTION>: Pass
1102 string pointer directly to set_decl_section_name.
1103
1104 2014-06-11 Robert Dewar <dewar@adacore.com>
1105
1106 * sem_ch13.adb: Minor reformatting.
1107
1108 2014-06-11 Hristian Kirtchev <kirtchev@adacore.com>
1109
1110 * sem_prag.adb (Check_Clause_Syntax): Add new
1111 local variable Outputs. Account for the case where multiple
1112 output items appear as an aggregate.
1113
1114 2014-06-11 Robert Dewar <dewar@adacore.com>
1115
1116 * sem_warn.adb (Output_Obsolescent_Entity_Warnings): Tag warning
1117 with ?j? not ??.
1118
1119 2014-06-11 Ed Schonberg <schonberg@adacore.com>
1120
1121 * einfo.ads: Minor reformatting.
1122
1123 2014-06-11 Hristian Kirtchev <kirtchev@adacore.com>
1124
1125 * a-cbdlli.adb, a-cdlili.adb, a-cidlli.adb, a-crdlli.adb (Insert): Add
1126 new variable First_Node. Update the position after all insertions have
1127 taken place to First_Node.
1128
1129 2014-06-11 Robert Dewar <dewar@adacore.com>
1130
1131 * debug.adb: Remove debug flag -gnatd.1, no longer needed.
1132 * layout.adb (Layout_Type): Remove test of -gnatd.1.
1133
1134 2014-06-11 Robert Dewar <dewar@adacore.com>
1135
1136 * sem_ch13.adb: Minor reformatting.
1137
1138 2014-06-11 Hristian Kirtchev <kirtchev@adacore.com>
1139
1140 * sem_prag.adb (Check_Clause_Syntax): Add new
1141 local variable Outputs. Account for the case where multiple
1142 output items appear as an aggregate.
1143
1144 2014-06-11 Robert Dewar <dewar@adacore.com>
1145
1146 * sem_warn.adb (Output_Obsolescent_Entity_Warnings): Tag warning
1147 with ?j? not ??.
1148
1149 2014-06-11 Ed Schonberg <schonberg@adacore.com>
1150
1151 * einfo.ads: Minor reformatting.
1152
1153 2014-06-11 Hristian Kirtchev <kirtchev@adacore.com>
1154
1155 * a-cbdlli.adb, a-cdlili.adb, a-cidlli.adb, a-crdlli.adb (Insert): Add
1156 new variable First_Node. Update the position after all insertions have
1157 taken place to First_Node.
1158
1159 2014-06-11 Robert Dewar <dewar@adacore.com>
1160
1161 * debug.adb: Remove debug flag -gnatd.1, no longer needed.
1162 * layout.adb (Layout_Type): Remove test of -gnatd.1.
1163
1164 2014-06-11 Thomas Quinot <quinot@adacore.com>
1165
1166 * freeze.ads: Minor reformatting.
1167 * checks.adb (Determine_Range): Do not attempt to determine
1168 the range of a deferred constant whose full view has not been
1169 seen yet.
1170 * sem_res.adb (Resolve): Remove undesirable guard against
1171 resolving expressions from expression functions.
1172
1173 2014-06-11 Robert Dewar <dewar@adacore.com>
1174
1175 * debug.adb (Debug_Flag_Dot_1): Set to enable fix for anonymous
1176 access types.
1177 * layout.adb (Layout_Type): Make anonymous access types for
1178 subprogram formal types and return types always thin. For now
1179 only enabled if -gnatd.1 set.
1180
1181 2014-06-11 Ed Schonberg <schonberg@adacore.com>
1182
1183 * sem_ch13.adb (Analyze_Stream_TSS_Definition): Apply legality
1184 rule for stream attributes of interface types (RM 13.13.2 (38/3)):
1185 subprogram must be a null procedure.
1186
1187 2014-06-11 Hristian Kirtchev <kirtchev@adacore.com>
1188
1189 * sem_prag.adb (Analyze_Input_Item): Allow formal
1190 parameters to appear as input_items in an initialization_list
1191 of pragma Initializes. Encapsulation now applies to states and
1192 variables only (as it should). Add RM references to key errors.
1193 * sem_prag.adb (Set_Imported): Suppress errors
1194 about preceding Imports when the pragma does not come from source,
1195 which can happen through use of pragma Provide_Shift_Operators.
1196
1197 2014-06-11 Thomas Quinot <quinot@adacore.com>
1198
1199 * sem_ch3.adb: Minor reformatting.
1200 * einfo.ads (Full_View): Minor comment update.
1201
1202 2014-06-11 Robert Dewar <dewar@adacore.com>
1203
1204 * einfo.adb (Is_Independent): New flag.
1205 * einfo.ads (Is_Independent): New flag.
1206 (Has_Independent_Components): Clean up and fix comments.
1207 * sem_prag.adb (Fix_Error): Deal with changing argument
1208 [of] to entity [for].
1209 (Analyze_Pragma, case Independent): Set Is_Independent flag
1210 (Analyze_Pragma, case Independent_Components): Set Is_Independent flag
1211 in all components of specified record.
1212
1213 2014-06-11 Thomas Quinot <quinot@adacore.com>
1214
1215 * sem_ch12.adb (Analyze_Formal_Decimal_Fixed_Point_Type):
1216 Set proper Etype on bounds of dummy type created for analysis
1217 of the generic.
1218
1219 2014-06-11 Robert Dewar <dewar@adacore.com>
1220
1221 * debug.adb: Minor comment fix (add missing section of dot
1222 numeric flags).
1223
1224 2014-06-11 Robert Dewar <dewar@adacore.com>
1225
1226 * gnat_rm.texi, switch-c.adb, sem_prag.adb, a-tgdico.ads, par-prag.adb,
1227 opt.ads, a-finali.ads, snames.ads-tmpl: Remove all traces of
1228 pragma/aspects Pure_05 Pure_12 Preelaborate_05.
1229 * errout.adb (Output_Messages): Avoid duplicate output for
1230 library level instance.
1231 * sem_elab.adb (Is_Call_Of_Generic_Formal): Moved to outer level
1232 (Check_Elab_Call): Add call to Is_Call_Of_Generic_Formal
1233 * exp_ch4.adb (Expand_N_Op_Expon): New interface for Exp_Modular.
1234 * s-expmod.ads, s-expmod.adb (Exp_Modular): Change interface to
1235 accomodate largest modulus value.
1236 * gnat_ugn.texi: Minor updates.
1237
1238 2014-06-11 Ed Schonberg <schonberg@adacore.com>
1239
1240 * sem_ch12.adb (Instantiate_Package_Body): Do not attempt to
1241 load body of generic package or its parent, if body is optional
1242 and the unit does not require a body.
1243
1244 2014-06-11 Robert Dewar <dewar@adacore.com>
1245
1246 * gnat_rm.texi: Document System.Unsigned_Types.
1247 * impunit.adb: System.Unsigned_Types (s-unstyp.ads) is user accessible.
1248 * s-unstyp.ads: Update comments (this is now user available unit).
1249
1250 2014-06-11 Robert Dewar <dewar@adacore.com>
1251
1252 * make.adb, sem_res.adb: Minor reformatting.
1253
1254 2014-06-11 Thomas Quinot <quinot@adacore.com>
1255
1256 * a-astaco.ads, a-tags.ads, s-excdeb.ads, a-tgdico.ads, a-stmaco.ads,
1257 a-except-2005.ads, s-except.ads, a-taside.ads, a-dynpri.ads,
1258 a-chahan.ads, a-sytaco.ads, s-stalib.ads, a-strmap.ads: Change pragmas
1259 Preelaborate_05 to just Preelaborate in runtime units, and similarly
1260 change Pure_05 to just Pure.
1261
1262 2014-06-11 Ed Schonberg <schonberg@adacore.com>
1263
1264 * sem_ch6.adb (Analyze_Subprogram_Body_Contract): Do not attempt
1265 analysis if error has been posted on subprogram body.
1266
1267 2014-06-11 Ed Schonberg <schonberg@adacore.com>
1268
1269 * sem_ch13.adb (Analyze_Stream_TSS_Definition): Apply legality
1270 rule given in RM 13.1 (8/1) for operational attributes to stream
1271 attributes: the attribute must apply to a first subtype. Fixes
1272 missing errors in ACATS test bdd2004.
1273
1274 2014-06-11 Robert Dewar <dewar@adacore.com>
1275
1276 * exp_ch3.adb (Build_Record_Init_Proc): Don't build for variant
1277 record type if restriction No_Implicit_Conditionals is active.
1278 (Expand_N_Object_Declaration): Don't allow default initialization
1279 for variant record type if restriction No_Implicit_Condition is active.
1280 (Build_Variant_Record_Equality): Don't build for variant
1281 record type if restriction No_Implicit_Conditionals is active.
1282 * exp_ch4.adb (Expand_N_Op_Eq): Error if variant records with
1283 No_Implicit_Conditionals.
1284 * sem_aux.ads, sem_aux.adb (Has_Variant_Part): New function.
1285
1286 2014-06-11 Ramon Fernandez <fernandez@adacore.com>
1287
1288 * i-cstrin.ads: Update comments.
1289
1290 2014-06-11 Ed Schonberg <schonberg@adacore.com>
1291
1292 * sem_res.adb (Resolve_Selected_Component): Handle properly a
1293 selected component whose prefix is overloaded, when none of the
1294 interpretations matches the expected type.
1295
1296 2014-06-11 Bob Duff <duff@adacore.com>
1297
1298 * make.adb (Wait_For_Available_Slot): Give a more
1299 informative error message; if the ALI file is not found, print
1300 the full path of what it's looking for.
1301
1302 2014-06-11 Sergey Rybin <rybin@adacore.com frybin>
1303
1304 * gnat_ugn.texi, vms_data.ads: add description of gnatstub -W<par>
1305 option to specify the result file encoding.
1306
1307 2014-06-11 Robert Dewar <dewar@adacore.com>
1308
1309 * errout.ads, sem_ch12.adb: Minor reformatting.
1310 * debug.adb, erroutc.adb: Remove -gnatd.q debug switch.
1311 * lib-xref.adb: Minor reformatting.
1312 * restrict.adb: Minor code reorganization (put routines in
1313 alpha order).
1314
1315 2014-06-11 Yannick Moy <moy@adacore.com>
1316
1317 * einfo.ads: Minor typo in comment
1318
1319 2014-06-11 Ed Schonberg <schonberg@adacore.com>
1320
1321 * sinfo.ads, sinfo.adb: New attribute Uninitialized_Variable, for
1322 formal private types and private type extensions, to indicate
1323 variable in a generic unit whose uninitialized use suggest that
1324 actual type should be fully initialized.
1325 Needs_Initialized_Actual: removed, functionaity replaced by
1326 the above.
1327 * lib-xref.adb (Generate_Reference): Generate a reference for
1328 variables of a formal type when the unit is not the main unit,
1329 to enable appropriate warnings in an instance.
1330 * sem_ch12.adb (Check_Ininialized_Type): Improve warning on use
1331 of variable in a generic unit that suggests that actual type
1332 should be full initialized.
1333 * sem_warn.adb; (May_Need_Initialized_Actual): Make into procedure
1334 and do not emot warning, which now only appears in an instance.
1335
1336 2014-06-11 Eric Botcazou <ebotcazou@adacore.com>
1337
1338 * gnat_ugn.texi: Fix minor typo.
1339
1340 2014-06-11 Hristian Kirtchev <kirtchev@adacore.com>
1341
1342 * sem_ch3.adb Add with and use clause for Sem_Ch10.
1343 (Analyze_Declarations): Code reformatting. Analyze the contract
1344 of a subprogram body stub at the end of the declarative region.
1345 * sem_ch6.adb (Analyze_Subprogram_Body_Contract): Spec_Id is
1346 now a variable. Do not process the body if its contract is not
1347 available. Account for subprogram body stubs when extracting
1348 the corresponding spec.
1349 * sem_ch6.ads (Analyze_Subprogram_Contract): Update the comment
1350 on usage.
1351 * sem_ch10.ads, sem_ch10.adb (Analyze_Subprogram_Body_Stub_Contract):
1352 New routine.
1353 * sem_prag.adb (Analyze_Depends_In_Decl_Part):
1354 Account for subprogram body stubs when extracting the
1355 corresponding spec.
1356 (Analyze_Global_In_Decl_List):
1357 Account for subprogram body stubs when extracting the
1358 corresponding spec.
1359 (Analyze_Refined_Depends_In_Decl_Part):
1360 Use Find_Related_Subprogram_Or_Body to retrieve the declaration
1361 of the related body. Spec_Is now a variable. Account for
1362 subprogram body stubs when extracting the corresponding spec.
1363 (Analyze_Refined_Global_In_Decl_Part): Use
1364 Find_Related_Subprogram_Or_Body to retrieve the declaration
1365 of the related body. Spec_Is now a variable. Account for
1366 subprogram body stubs when extracting the corresponding spec.
1367 (Collect_Subprogram_Inputs_Output): Account for subprogram body
1368 stubs when extracting the corresponding spec.
1369
1370 2014-06-11 Vincent Celier <celier@adacore.com>
1371
1372 * gnatcmd.adb (Process_Link): Do not invoke gnatlink with
1373 -lgnarl or -lgnat.
1374
1375 2014-06-11 Robert Dewar <dewar@adacore.com>
1376
1377 * debug.adb: Add debug flag -gnatd.q.
1378 * erroutc.adb (Prescan_Message): Bomb if untagged warning with
1379 -gnatd.q set.
1380 * styleg.adb (Check_Xtra_Parens): Message should be a style
1381 message.
1382 * sem_aggr.adb, sem_ch3.adb, exp_ch9.adb, checks.adb, sem_prag.adb,
1383 par-endh.adb, eval_fat.adb, freeze.adb, sem_util.adb, sem_attr.adb,
1384 sem_elab.adb, sem_ch6.adb, sem_warn.adb, sem_cat.adb,
1385 sem_ch13.adb, lib-xref.adb: Add remaining warning tags.
1386
1387 2014-06-11 Ben Brosgol <brosgol@adacore.com>
1388
1389 * gnat_rm.texi: Revised chapter on Implementation Defined
1390 Characteristics.
1391
1392 2014-06-11 Geert Bosch <bosch@adacore.com>
1393
1394 * s-exctab.adb: avoid race conditions in exception registration.
1395
1396 2014-06-11 Robert Dewar <dewar@adacore.com>
1397
1398 * errout.adb (Warn_Insertion): New function.
1399 (Error_Msg): Use Warn_Insertion and Prescan_Message.
1400 (Error_Msg_Internal): Set Info field of error object.
1401 (Error_Msg_NEL): Use Prescan_Message.
1402 (Set_Msg_Text): Don't store info: at start of message.
1403 (Skip_Msg_Insertion_Warning): New name for Set_Msg_Insertion_Warning.
1404 (Skip_Msg_Insertion_Warning): Now just skips warning insertion.
1405 * errout.ads: Document new ?$? and >$> insertion sequences
1406 Document use of "(style)" and "info: "
1407 * erroutc.adb (dmsg): Print several missing fields
1408 (Get_Warning_Tag): Handle -gnatel case (?$?) (Output_Msg_Text):
1409 Deal with new tagging of info messages
1410 * erroutc.ads: Is_Info_Msg: New global (Error_Msg_Object):
1411 Add field Info (Prescan_Message): New procedure, this procedure
1412 replaces the old Test_Style_Warning_Serious_Unconditional_Msg
1413 * errutil.adb, exp_util.adb, par-ch7.adb, sem_ch13.adb, sem_ch7.adb,
1414 sem_elab.adb: Follow new rules for info message (info belongs
1415 only at the start of a message, and only in the first message,
1416 not in any of the continuations).
1417 * gnat_ugn.texi: Document full set of warning tags.
1418
1419 2014-06-11 Gary Dismukes <dismukes@adacore.com>
1420
1421 * sem_util.adb: Minor typo fix.
1422
1423 2014-06-11 Ed Schonberg <schonberg@adacore.com>
1424
1425 * sem_warn.adb (Check_References): Do not emit spurious warnings
1426 on uninitialzed variable of a formal private type if variable
1427 is not read.
1428
1429 2014-06-09 Jan Hubicka <hubicka@ucw.cz>
1430
1431 * gcc-interface/utils.c (process_attributes) <ATTR_LINK_SECTION>: Use
1432 set_decl_section_name accessor.
1433
1434 2014-05-22 Thomas Schwinge <thomas@codesourcery.com>
1435
1436 * gcc-interface/utils.c (DEF_FUNCTION_TYPE_0, DEF_FUNCTION_TYPE_6)
1437 (DEF_FUNCTION_TYPE_7, DEF_FUNCTION_TYPE_8)
1438 (DEF_FUNCTION_TYPE_VAR_5): Cosmetic fixes.
1439
1440 2014-05-21 Robert Dewar <dewar@adacore.com>
1441
1442 * layout.adb: Minor reformatting.
1443 * sem_prag.adb (Analyze_Pragma, case Inspection_Point): Call
1444 dummy procedure ip.
1445
1446 2014-05-21 Robert Dewar <dewar@adacore.com>
1447
1448 * restrict.ads (Implementation_Restriction): Add entry for
1449 No_Fixed_IO.
1450 * rtsfind.ads: Add entries for Fixed_IO and Decimal_IO in
1451 Ada.[Wide_[Wide_]Text_IO.
1452 * s-rident.ads (Restriction_Id): Add entry for No_Fixed_IO.
1453 * sem_attr.adb (Analyze_Attribute): Disallow fixed point types
1454 for Img, Image, Value, Wide_Image, Wide_Value, Wide_Wide_Image,
1455 Wide_Wide_Value if restriction No_Fixed_IO is set.
1456 * sem_util.adb (Set_Entity_Checks): Check restriction No_Fixed_IO.
1457
1458 2014-05-21 Robert Dewar <dewar@adacore.com>
1459
1460 * gnatcmd.adb: Minor error msg changes (no upper case letter
1461 at start).
1462 * sem_ch12.adb, sem_ch5.adb, sem_res.adb, sem_util.adb: Minor
1463 reformatting.
1464
1465 2014-05-21 Robert Dewar <dewar@adacore.com>
1466
1467 * debug.adb: Debug flag -gnatd.G inhibits static elab tracing
1468 via generic formals.
1469 * sem_elab.adb (Is_Call_Of_Generic_Formal): Return False if
1470 -gnatd.G is set.
1471
1472 2014-05-21 Thomas Quinot <quinot@adacore.com>
1473
1474 * exp_pakd.adb (Revert_Storage_Order): Renamed from Byte_Swap to
1475 more accurately describe that this subprogram needs to come into
1476 play also in cases where no byte swapping is involved, because
1477 it also takes care of some required shifts (left-justification
1478 of values).
1479
1480 2014-05-21 Thomas Quinot <quinot@adacore.com>
1481
1482 * freeze.adb (Check_Component_Storage_Order): Indicate whether
1483 a Scalar_Storage_Order attribute definition is present for the
1484 component's type.
1485 (Freeze_Record_Type): Suppress junk warnings
1486 about purportedly junk Bit_Order / Scalar_Storage_Order attribute
1487 definitions.
1488
1489 2014-05-21 Robert Dewar <dewar@adacore.com>
1490
1491 * sem_ch8.adb (Analyze_Subprogram_Renaming): Put back call
1492 to Kill_Elaboration_Checks.
1493
1494 2014-05-21 Gary Dismukes <dismukes@adacore.com>
1495
1496 * layout.adb (Assoc_Add): Suppress the optimization of the (E
1497 - C1) + C2 case, when the expression type is unsigned and C1 <
1498 C2, to avoid creating a negative literal when folding.
1499
1500 2014-05-21 Hristian Kirtchev <kirtchev@adacore.com>
1501
1502 * freeze.adb (Freeze_Record_Type): Update the use of
1503 Is_SPARK_Volatile.
1504 * sem_ch3.adb (Analyze_Object_Contract): Update the use of
1505 Is_SPARK_Volatile.
1506 (Process_Discriminants): Update the use of Is_SPARK_Volatile.
1507 * sem_ch5.adb (Analyze_Iterator_Specification): Update the use
1508 of Is_SPARK_Volatile.
1509 (Analyze_Loop_Parameter_Specification):
1510 Update the use of Is_SPARK_Volatile.
1511 * sem_ch6.adb (Process_Formals): Catch an illegal use of an IN
1512 formal parameter when its type is volatile.
1513 * sem_prag.adb (Analyze_Global_Item): Update the use of
1514 Is_SPARK_Volatile.
1515 * sem_res.adb (Resolve_Entity_Name): Correct the guard which
1516 determines whether an entity is a volatile source SPARK object.
1517 * sem_util.adb (Has_Enabled_Property): Accout for external
1518 properties being set on objects other than abstract states
1519 and variables. An example would be a formal parameter.
1520 (Is_SPARK_Volatile): New routine.
1521 (Is_SPARK_Volatile_Object):
1522 Remove the entity-specific tests. Call routine Is_SPARK_Volatile
1523 when checking entities and/or types.
1524 * sem_util.ads (Is_SPARK_Volatile): New routine.
1525
1526 2014-05-21 Robert Dewar <dewar@adacore.com>
1527
1528 * sem_warn.adb: Minor fix to warning messages (use ?? instead
1529 of ?).
1530
1531 2014-05-21 Vincent Celier <celier@adacore.com>
1532
1533 * gnatcmd.adb (GNATCmd): For platforms other than VMS, recognize
1534 switch --version and --help.
1535
1536 2014-05-21 Robert Dewar <dewar@adacore.com>
1537
1538 * sem_elab.adb (Is_Call_Of_Generic_Formal): New function.
1539
1540 2014-05-21 Ed Schonberg <schonberg@adacore.com>
1541
1542 * sem_ch5.adb (Analyze_Iterator_Specification): Set type of
1543 iterator variable when the domain of iteration is a formal
1544 container and this is an element iterator.
1545
1546 2014-05-21 Bob Duff <duff@adacore.com>
1547
1548 * sem_ch12.adb: Minor reformatting.
1549
1550 2014-05-21 Robert Dewar <dewar@adacore.com>
1551
1552 * sinfo.ads, sem_ch12.adb, sem_warn.adb: Minor reformatting.
1553
1554 2014-05-21 Robert Dewar <dewar@adacore.com>
1555
1556 * sem_elab.adb: Minor reformatting.
1557 * s-taprop.ads: Minor comment fix.
1558 * sem_ch8.adb (Analyze_Subprogram_Renaming): Remove call to
1559 Kill_Elaboration_Checks.
1560 * errout.adb, erroutc.adb: Minor reformatting.
1561
1562 2014-05-21 Thomas Quinot <quinot@adacore.com>
1563
1564 * exp_pakd.adb (Byte_Swap): Handle the case of a sub-byte
1565 component. No byte swapping occurs, but this procedure also takes
1566 care of appropriately justifying the argument.
1567
1568 2014-05-21 Hristian Kirtchev <kirtchev@adacore.com>
1569
1570 * sem_ch6.adb: sem_ch6.adb (Analyze_Aspects_On_Body_Or_Stub):
1571 New routine.
1572 (Analyze_Subprogram_Body_Helper): Move the
1573 analysis of aspect specifications and the processing of the
1574 subprogram body contract after inlining has taken place.
1575 (Diagnose_Misplaced_Aspect_Specifications): Removed.
1576
1577 2014-05-21 Javier Miranda <miranda@adacore.com>
1578
1579 * sem_ch3.adb (Build_Derived_Record_Type): Revert previous change.
1580
1581 2014-05-21 Robert Dewar <dewar@adacore.com>
1582
1583 * sem_eval.ads, sem_eval.adb (Why_Not_Static): Messages are not
1584 continuations any more.
1585
1586 2014-05-21 Ed Schonberg <schonberg@adacore.com>
1587
1588 * sinfo.ads, sinfo.adb: New flag Needs_Initialized_Actual,
1589 present in formal_Private_Definitions and on private extension
1590 declarations of a formal derived type. Set when the use of the
1591 formal type in a generic suggests that the actual should be a
1592 fully initialized type.
1593 * sem_warn.adb (May_Need_Initialized_Actual): new subprogram
1594 to indicate that an entity of a generic type has default
1595 initialization, and that the corresponing actual type in any
1596 subsequent instantiation should be fully initialized.
1597 * sem_ch12.adb (Check_Initialized_Type): new subprogram,
1598 to emit a warning if the actual for a generic type on which
1599 Needs_Initialized_Actual is set is not a fully initialized type.
1600
1601 2014-05-21 Robert Dewar <dewar@adacore.com>
1602
1603 * sem_elab.adb, prj-dect.adb: Minor reformatting.
1604
1605 2014-05-21 Robert Dewar <dewar@adacore.com>
1606
1607 * erroutc.ads: Minor comment addition.
1608
1609 2014-05-21 Robert Dewar <dewar@adacore.com>
1610
1611 * errout.ads: Add documentation for use of >*> tag.
1612 * restrict.adb: Make sure we use >*> tag for restriction warnings.
1613
1614 2014-05-21 Gary Dismukes <dismukes@adacore.com>
1615
1616 * debug.adb: Add case of illegal overriding_indicator for a
1617 protected subprogram body to description of -gnatd.E switch.
1618 * sem_ch6.adb (Verify_Overriding_Indicator): Issue error message
1619 for cases of giving overriding_indicators on protected subprogram
1620 bodies, but change this to a warning if -gnatd.E is enabled. No
1621 longer give a style warning about missing indicators on protected
1622 subprogram bodies.
1623
1624 2014-05-21 Robert Dewar <dewar@adacore.com>
1625
1626 * prj.ads, sem_ch12.adb, prj.adb, exp_pakd.adb,
1627 sem_elab.ads: Minor reformatting.
1628 * erroutc.adb, erroutc.ads (Warning_Specifically_Suppressed): Make Tag
1629 parameter optional.
1630
1631 2014-05-21 Pascal Obry <obry@adacore.com>
1632
1633 * prj-dect.adb: Allow package Install in aggregate project.
1634
1635 2014-05-21 Robert Dewar <dewar@adacore.com>
1636
1637 * sem_ch13.adb (Analyze_Aspect_Specifications):
1638 Insert_Delayed_Pragma is now used for the case of Attach_Handler.
1639 * sem_prag.adb: Minor comment improvements.
1640
1641 2014-05-21 Ed Schonberg <schonberg@adacore.com>
1642
1643 * sem_ch12.adb (Install_Body): When checking whether freezing of
1644 instantiation must be delayed, verify that the common enclosing
1645 subprogram to generic and instance is in fact an overloadable
1646 entity.
1647
1648 2014-05-21 Vincent Celier <celier@adacore.com>
1649
1650 * makeutl.adb (Mains.Complete_Mains.Do_Complete): Look for all
1651 mains with the same name and fail if there is more than one.
1652 * prj.ads, prj.adb (Find_All_Sources): New function
1653
1654 2014-05-21 Robert Dewar <dewar@adacore.com>
1655
1656 * sem_ch13.adb: Minor reformatting.
1657 * lib-xref-spark_specific.adb, sem_util.adb: Minor reformatting.
1658 * sem_prag.adb: Minor error message improvement.
1659
1660 2014-05-21 Yannick Moy <moy@adacore.com>
1661
1662 * lib-xref-spark_specific.adb, lib-xref.ads, lib-xref.adb
1663 (Enclosing_Subprogram_Or_Package): Only return a library-level
1664 package.
1665
1666 2014-05-21 Javier Miranda <miranda@adacore.com>
1667
1668 * sem_ch3.adb (Build_Derived_Record_Type): Initialize Parent_Base
1669 to the full view of the parent type when processing a derived type
1670 which is the full view of a private type not defined in a generic
1671 unit which is derived from a private type with discriminants
1672 whose full view is a non-tagged record type.
1673
1674 2014-05-21 Javier Miranda <miranda@adacore.com>
1675
1676 * exp_ch4.adb (Expand_Allocator_Expression.Apply_Accessibility_Check):
1677 Complete previous patch.
1678
1679 2014-05-21 Thomas Quinot <quinot@adacore.com>
1680
1681 PR ada/9535
1682 * g-socket.adb (Read and Write for Datagram_Socket_Stream_Type):
1683 Provide a behaviour more consistent with underlying datagram
1684 socket: do not attempt to loop over Send_Socket/Receive_Socket
1685 iterating along the buffer.
1686
1687 2014-05-21 Hristian Kirtchev <kirtchev@adacore.com>
1688
1689 * freeze.adb (Freeze_Record_Type): Ensure that a discriminated
1690 or a tagged type is not labelled as volatile. Ensure that a
1691 non-volatile type has no volatile components.
1692 * sem_ch3.adb (Analyze_Object_Contract): Add local constant
1693 Obj_Typ. Code reformatting. Ensure that a discriminated or
1694 tagged object is not labelled as volatile.
1695 * sem_prag.adb (Process_Atomic_Shared_Volatile): Ensure that
1696 pragma Volatile applies to a full type declaration or an object
1697 declaration when SPARK mode is on.
1698
1699 2014-05-21 Sergey Rybin <rybin@adacore.com frybin>
1700
1701 * gnat_ugn.texi: For ASIS tools, reword the paragraph about
1702 providing options needed for compiling the argument source for
1703 the situation when a project file can be used as a tool parameter.
1704
1705 2014-05-21 Gary Dismukes <dismukes@adacore.com>
1706
1707 * gnat_rm.texi: Minor typo fix.
1708
1709 2014-05-21 Robert Dewar <dewar@adacore.com>
1710
1711 * stand.adb (Tree_Read): Read missing entities.
1712 (Tree_Write): Write missing entities.
1713
1714 2014-05-21 Ben Brosgol <brosgol@adacore.com>
1715
1716 * gnat_ugn.texi: Wordsmithing edits to Coupling Metrics Control
1717 section in gnatmetric chapter.
1718
1719 2014-05-21 Robert Dewar <dewar@adacore.com>
1720
1721 * exp_ch6.adb (Expand_Actuals): Spec moved here, since not used
1722 outside Exp_Ch6 (Expand_Actuals): Deal with proper insertion of
1723 post-call copy write back (see detailed comment in code).
1724 * exp_ch6.ads (Expand_Actuals): Moved to body, not used outside
1725 Exp_Ch6.
1726 * tbuild.ads: Minor reformatting.
1727
1728 2014-05-21 Robert Dewar <dewar@adacore.com>
1729
1730 * stand.ads: Add warning about adding new entities and
1731 Tree_Read/Tree_Write.
1732
1733 2014-05-21 Robert Dewar <dewar@adacore.com>
1734
1735 * sem_util.adb (Set_Entity_With_Checks): Don't complain about
1736 references to restricted entities within the units in which they
1737 are declared.
1738
1739 2014-05-21 Robert Dewar <dewar@adacore.com>
1740
1741 * gnat1drv.adb (Check_Bad_Body): Use Source_File_Is_Body to
1742 simplify the needed test, and also deal with failure to catch
1743 situations with non-standard names.
1744 * sinput-l.ads, sinput-l.adb (Source_File_Is_No_Body): New function
1745 (Source_File_Is_Subunit): Removed, no longer used.
1746
1747 2014-05-21 Javier Miranda <miranda@adacore.com>
1748
1749 * exp_ch4.adb
1750 (Expand_Allocator_Expression.Apply_Accessibility_Check): for a
1751 renaming of an access to interface object there is no need to
1752 generate extra code to reference the tag.
1753
1754 2014-05-21 Robert Dewar <dewar@adacore.com>
1755
1756 * errout.adb, erroutc.adb, erroutc.ads: Allow warning tag in pragma
1757 Warnings (Off, string).
1758
1759 2014-05-21 Robert Dewar <dewar@adacore.com>
1760
1761 * osint.adb: Fix three error messages to say invalid instead
1762 of erroneous.
1763 * par-ch4.adb, exp_aggr.adb, sem_attr.adb, sem_aux.adb, sem_ch3.adb,
1764 sem_ch5.adb, sem_ch6.adb, sem_ch7.adb, sem_dim.adb, sem_res.adb,
1765 sem_util.adb, sem_util.ads: Fix incorrect use of erroneous in comments.
1766
1767 2014-05-21 Ed Schonberg <schonberg@adacore.com>
1768
1769 * freeze.adb, sem_ch13.adb, sem_ch13.ads, sem_ch9.adb,
1770 sem_ch9.ads: Move discriminant manipulation routines for analysis of
1771 aspect specifications from sem_ch9 to sem_ch13, where they belong.
1772
1773 2014-05-21 Robert Dewar <dewar@adacore.com>
1774
1775 * gnat_ugn.texi: Clearly document -gnatw.g (GNAT warnings).
1776 Clearly document -gnatyg (GNAT style switches).
1777 * usage.adb: Add line line for -gnatw.g (GNAT warnings) More
1778 detail for line for -gnatyg (GNAT style switches) -gnatw.d/D is
1779 available for VMS after all.
1780 * warnsw.adb: Reorganize to eliminate duplicated code
1781 (Restore_Warnings): Add a couple of missing entries
1782 (Save_Warnings): Add a couple of missing entries.
1783 * warnsw.ads: Add missing entries to Warning_Record (not clear
1784 what the impact is).
1785
1786 2014-05-21 Robert Dewar <dewar@adacore.com>
1787
1788 * errout.adb (Set_Msg_Insertion_Warning): Handle ?*? (restriction
1789 warning) case.
1790 * errout.ads: Document ?*? (restriction warning) insertion.
1791 * erroutc.adb (Get_Warning_Tag): Deal with ?*? (restriction
1792 warning) case.
1793 * erroutc.ads: Document use of * for restriction warning tag.
1794 * restrict.adb (Restriction_Msg): Tag with ?*? instead of ??.
1795
1796 2014-05-21 Ed Schonberg <schonberg@adacore.com>
1797
1798 * sem_ch9.adb (Push_Scope_And_Install_Discriminants): Do not
1799 make discriminants immediately visible when analyzing an aspect
1800 of a subtype declaration.
1801 (Uninstall_Discriminants): Do not apply to the entity in a
1802 subtype declaration.
1803
1804 2014-05-21 Ed Schonberg <schonberg@adacore.com>
1805
1806 * sem_util.adb: Code clean up.
1807
1808 2014-05-21 Eric Botcazou <ebotcazou@adacore.com>
1809
1810 * gnat_ugn.texi: Document -Werror.
1811
1812 2014-05-21 Bob Duff <duff@adacore.com>
1813
1814 * sem_util.adb (Is_Dependent_Component_Of_Mutable_Object):
1815 This was returning False if the Object is a constant view. Fix
1816 it to return True in that case, because it might be a view of
1817 a variable.
1818 (Has_Discriminant_Dependent_Constraint): Fix latent
1819 bug; this function was crashing when passed a discriminant.
1820
1821 2014-05-21 Robert Dewar <dewar@adacore.com>
1822
1823 * gnat_ugn.texi: Remove misplaced section that is now obsolete.
1824 * s-arit64.adb: Minor code reorganization.
1825 * sem_prag.adb: Minor comment fix (remove erroneous use of the
1826 term erroneous).
1827
1828 2014-05-21 Robert Dewar <dewar@adacore.com>
1829
1830 * g-table.adb, g-dyntab.adb (Reallocate): Fix possible overflow in
1831 computing new table size.
1832
1833 2014-05-21 Robert Dewar <dewar@adacore.com>
1834
1835 * einfo.ads: Minor reformatting.
1836 * ceinfo.adb: Deal with slight format change of einfo.ads.
1837
1838 2014-05-21 Ed Schonberg <schonberg@adacore.com>
1839
1840 * sem_prag.adb (Analyze_Part_Of): Further work on the proper
1841 implementation of the SPARK 2014 rule concerning private child
1842 units (LRM 7.2.6).
1843
1844 2014-05-21 Vincent Celier <celier@adacore.com>
1845
1846 * makeusg.adb: Add switch -d to usage.
1847
1848 2014-05-21 Ed Schonberg <schonberg@adacore.com>
1849
1850 * sem_util.adb (Find_Actual): If an actual that is the prefix
1851 of an enclosing prefixed call has been rewritten, use Nkind
1852 and Sloc to identify the corresponding formal, when handling
1853 deferred references.
1854
1855 2014-05-21 Robert Dewar <dewar@adacore.com>
1856
1857 * debug.adb: Document -gnatd.z switch.
1858 * sem_eval.adb (Why_Non_Static): Test -gnatd.z switch.
1859
1860 2014-05-21 Robert Dewar <dewar@adacore.com>
1861
1862 * einfo.ads (Can_Never_Be_Null): Minor comment update.
1863 * sem_prag.adb (Check_Arg_Is_Task_Dispatching_Policy): Minor
1864 error message change.
1865 * s-arit64.adb ("abs"): New function. Use expression functions
1866 for the simple conversions and arithmetic.
1867
1868 2014-05-18 Eric Botcazou <ebotcazou@adacore.com>
1869
1870 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Rework comment and
1871 set function_start_locus.
1872
1873 2014-05-18 Eric Botcazou <ebotcazou@adacore.com>
1874
1875 * utils.c (gnat_write_global_declarations): Adjust the flags put on
1876 dummy_global.
1877
1878 2014-05-18 Eric Botcazou <ebotcazou@adacore.com>
1879
1880 * gcc-interface/decl.c (change_qualified_type): New static function.
1881 (gnat_to_gnu_entity): Use it throughout to add qualifiers on types.
1882 <E_Array_Type>: Set TYPE_VOLATILE on the array type directly.
1883 <E_Array_Subtype>: Likewise.
1884 Do not set flags on an UNCONSTRAINED_ARRAY_TYPE directly.
1885 (gnat_to_gnu_component_type): Likewise.
1886 (gnat_to_gnu_param): Likewise.
1887
1888 2014-05-18 Eric Botcazou <ebotcazou@adacore.com>
1889
1890 * fe.h (Set_Present_Expr): Move around.
1891 (End_Location): New macro.
1892 * gcc-interface/trans.c (Case_Statement_to_gnu): Use End_Location.
1893
1894 2014-05-18 Eric Botcazou <ebotcazou@adacore.com>
1895
1896 * gcc-interface/decl.c (gnat_to_gnu_entity): Use Underlying_Type in
1897 lieu of more verbose construct.
1898 * gcc-interface/trans.c (Call_to_gnu): Likewise.
1899 (gnat_to_gnu): Likewise. Remove obsolete code.
1900
1901 2014-05-18 Eric Botcazou <ebotcazou@adacore.com>
1902
1903 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Subtype>: Do not
1904 consider that regular packed arrays can never be superflat.
1905
1906 2014-05-17 Trevor Saunders <tsaunders@mozilla.com>
1907
1908 * gcc-interface/ada-tree.h: Remove usage of variable_size gty
1909 annotation.
1910 * gcc-interface/decl.c (annotate_value): Adjust.
1911 * gcc-interface/trans.c (Attribute_to_gnu): Likewise.
1912 (push_range_check_info): Likewise.
1913 (Loop_Statement_to_gnu): Likewise.
1914 (Subprogram_Body_to_gnu): Likewise.
1915 (Compilation_Unit_to_gnu): Likewise.
1916 (start_stmt_group): Likewise.
1917 * gcc-interface/utils.c (init_gnat_utils): Likewise.
1918 (gnat_pushlevel): Likewise.
1919 (maybe_pad_type): Likewise.
1920
1921 2014-05-14 Eric Botcazou <ebotcazou@adacore.com>
1922
1923 * seh_init.c: Fix copyright year.
1924
1925 2014-05-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
1926
1927 * seh_init.c (__gnat_map_SEH): Compile also when __CYGWIN__ and __SEH__
1928 are defined. Move include windows.h before system.h.
1929 * s-oscons-tmplt.c (DTR_CONTROL_ENABLE, RTS_CONTROL_ENABLE): Compile
1930 also when __CYGWIN__ is defined. Include windef.h before winbase.h.
1931
1932 2014-05-14 Richard Sandiford <r.sandiford@uk.ibm.com>
1933
1934 * gcc-interface/decl.c (gnat_to_gnu_entity): Convert integer_one_node
1935 to the appropriate type.
1936 * gcc-interface/trans.c (gnat_to_gnu): Likewise.
1937 (pos_to_constructor): Likewise.
1938
1939 2014-05-13 Eric Botcazou <ebotcazou@adacore.com>
1940
1941 * gcc-interface/decl.c (annotate_value): Fix thinko in latest change.
1942
1943 2014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
1944 Mike Stump <mikestump@comcast.net>
1945 Richard Sandiford <rdsandiford@googlemail.com>
1946
1947 * gcc-interface/cuintp.c (UI_From_gnu): Use wide-int interfaces.
1948 * gcc-interface/decl.c (gnat_to_gnu_entity): Use TYPE_SIGN.
1949 (annotate_value): Use wide-int interfaces.
1950 * gcc-interface/utils.c (get_nonnull_operand): Use tree_fits_uhwi_p.
1951
1952 2014-04-28 Richard Henderson <rth@redhat.com>
1953
1954 * gcc-interface/Makefile.in: Support aarch64-linux.
1955
1956 2014-04-28 Eric Botcazou <ebotcazou@adacore.com>
1957
1958 * exp_dbug.ads (Get_External_Name): Add 'False' default to Has_Suffix,
1959 add 'Suffix' parameter and adjust comment.
1960 (Get_External_Name_With_Suffix): Delete.
1961 * exp_dbug.adb (Get_External_Name_With_Suffix): Merge into...
1962 (Get_External_Name): ...here. Add 'False' default to Has_Suffix, add
1963 'Suffix' parameter.
1964 (Get_Encoded_Name): Remove 2nd argument in call to Get_External_Name.
1965 Call Get_External_Name instead of Get_External_Name_With_Suffix.
1966 (Get_Secondary_DT_External_Name): Likewise.
1967 * exp_cg.adb (Write_Call_Info): Likewise.
1968 * exp_disp.adb (Export_DT): Likewise.
1969 (Import_DT): Likewise.
1970 * comperr.ads (Compiler_Abort): Remove Code parameter and add From_GCC
1971 parameter with False default.
1972 * comperr.adb (Compiler_Abort): Likewise. Adjust accordingly.
1973 * types.h (Fat_Pointer): Rename into...
1974 (String_Pointer): ...this. Add comment on interfacing rules.
1975 * fe.h (Compiler_Abort): Adjust for above renaming.
1976 (Error_Msg_N): Likewise.
1977 (Error_Msg_NE): Likewise.
1978 (Get_External_Name): Likewise. Add third parameter.
1979 (Get_External_Name_With_Suffix): Delete.
1980 * gcc-interface/decl.c (STDCALL_PREFIX): Define.
1981 (create_concat_name): Adjust call to Get_External_Name, remove call to
1982 Get_External_Name_With_Suffix, use STDCALL_PREFIX, adjust for renaming.
1983 * gcc-interface/trans.c (post_error): Likewise.
1984 (post_error_ne): Likewise.
1985 * gcc-interface/misc.c (internal_error_function): Likewise.
1986
1987 2014-04-28 Richard Biener <rguenther@suse.de>
1988
1989 PR middle-end/60092
1990 * gcc-interface/utils.c: Define flag_isoc11.
1991
1992 2014-04-26 Eric Botcazou <ebotcazou@adacore.com>
1993
1994 * gnatvsn.ads (Library_Version): Bump to 4.10.
1995
1996 2014-04-23 Eric Botcazou <ebotcazou@adacore.com>
1997
1998 Revert
1999 2014-04-22 Richard Henderson <rth@redhat.com>
2000
2001 * gcc-interface/Makefile.in: Support aarch64-linux.
2002
2003 2014-04-22 Eric Botcazou <ebotcazou@adacore.com>
2004
2005 * fe.h (Compiler_Abort): Replace Fat_Pointer with String_Pointer.
2006 (Error_Msg_N): Likewise.
2007 (Error_Msg_NE): Likewise.
2008 (Get_External_Name_With_Suffix): Likewise.
2009 * types.h (Fat_Pointer): Delete.
2010 (String_Pointer): New type.
2011 (DECLARE_STRING_POINTER): New macro.
2012 * gcc-interface/decl.c (create_concat_name): Adjust.
2013 * gcc-interface/trans.c (post_error): Likewise.
2014 (post_error_ne): Likewise.
2015 * gcc-interface/misc.c (internal_error_function): Likewise.
2016
2017 2014-04-22 Richard Henderson <rth@redhat.com>
2018
2019 * gcc-interface/Makefile.in: Support aarch64-linux.
2020
2021 * init.c [__linux__] (HAVE_GNAT_ALTERNATE_STACK): New define.
2022 (__gnat_alternate_stack): Enable for all linux except ia64.
2023
2024 2014-04-22 Eric Botcazou <ebotcazou@adacore.com>
2025
2026 * fe.h (Compiler_Abort): Replace Fat_Pointer with String_Pointer.
2027 (Error_Msg_N): Likewise.
2028 (Error_Msg_NE): Likewise.
2029 (Get_External_Name_With_Suffix): Likewise.
2030 * types.h (Fat_Pointer): Delete.
2031 (String_Pointer): New type.
2032 (DECLARE_STRING_POINTER): New macro.
2033 * gcc-interface/decl.c (create_concat_name): Adjust.
2034 * gcc-interface/trans.c (post_error): Likewise.
2035 (post_error_ne): Likewise.
2036 * gcc-interface/misc.c (internal_error_function): Likewise.
2037
2038 2014-04-15 Eric Botcazou <ebotcazou@adacore.com>
2039 Pierre-Marie de Rodat <derodat@adacore.com>
2040
2041 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create a mere
2042 scalar constant instead of a reference for renaming of scalar literal.
2043 Do not create a new object for constant renaming except for a function
2044 call. Make sure a VAR_DECL is created for the renaming pointer.
2045 * gcc-interface/trans.c (constant_decl_with_initializer_p): New.
2046 (fold_constant_decl_in_expr): New function.
2047 (Identifier_to_gnu): Use constant_decl_with_initializer_p.
2048 For a constant renaming, try to fold a constant DECL in the result.
2049 (lvalue_required_p) <N_Object_Renaming_Declaration>: Always return 1.
2050 (Identifier_to_gnu): Reference the renamed object of constant renaming
2051 pointers directly.
2052 * gcc-interface/utils.c (invalidate_global_renaming_pointers): Do not
2053 invalidate constant renaming pointers.
2054
2055 2014-04-15 Eric Botcazou <ebotcazou@adacore.com>
2056
2057 * gcc-interface/utils.c (type_for_vector_element_p): New predicate.
2058 (build_vector_type_for_size): New function.
2059 (build_vector_type_for_array): Likewise.
2060 (unchecked_convert): Build an intermediate vector type to convert
2061 from a generic array type to a vector type.
2062 (handle_vector_size_attribute): Reimplement.
2063 (handle_vector_type_attribute): Likewise.
2064
2065 2014-04-15 Eric Botcazou <ebotcazou@adacore.com>
2066
2067 * gcc-interface/decl.c (prepend_one_attribute_pragma): Call
2068 Is_OK_Static_Expression in lieu of Is_Static_Expression to
2069 detect valid arguments.
2070
2071 2014-04-15 Eric Botcazou <ebotcazou@adacore.com>
2072
2073 * gcc-interface/trans.c (gnat_gimplify_stmt): Propagate loop hints.
2074
2075 2014-04-14 Paolo Carlini <paolo.carlini@oracle.com>
2076
2077 * gcc-interface/decl.c (gnat_to_gnu_entity): Use TYPE_IDENTIFIER.
2078 (components_to_record): Likewise.
2079 * gcc-interface/utils.c (make_aligning_type): Likewise.
2080 (maybe_pad_type): Likewise.
2081 (finish_record_type): Likewise.
2082 (rest_of_record_type_compilation): Likewise.
2083
2084 2014-04-14 Eric Botcazou <ebotcazou@adacore.com>
2085
2086 * snames.ads-tmpl (Name_Ivdep): New pragma-related name.
2087 * sem_prag.adb (Analyze_Pragma) <Pragma_Loop_Optimize>: Add support
2088 for Ivdep hint.
2089 * gnat_rm.texi (Implementation Defined Pragmas): Document new Ivdep
2090 hint for Loop_Optimize.
2091 * gnat_ugn.texi (Vectorization of loops): Mention new Ivdep hint.
2092 * gcc-interface/trans.c (Pragma_to_gnu) <Pragma_Loop_Optimize>: Deal
2093 with new Ivdep hint.
2094 * gcc-interface/ada-tree.h (LOOP_STMT_IVDEP): New macro.
2095 * gcc-interface/trans.c (Pragma_to_gnu) <Pragma_Loop_Optimize>: Deal
2096 with new Ivdep hint.
2097 (gnat_gimplify_stmt) <LOOP_STMT>: Propagate loop hints.
2098
2099 2014-04-14 Eric Botcazou <ebotcazou@adacore.com>
2100 Robert Dewar <dewar@adacore.com>
2101
2102 * opt.ads (Suppress_Back_Annotation): Remove as unused.
2103 * fe.h (Back_Annotate_Rep_Info): Likewise.
2104 (Global_Discard_Names): Likewise.
2105 (List_Representation_Info): Declare.
2106 * types.h (Uint_Minus_1): Likewise.
2107 * repinfo.ads: Document back-annotation change.
2108 * gcc-interface/gigi.h (init_gnat_decl): Declare.
2109 (destroy_gnat_decl): Likewise.
2110 * gcc-interface/decl.c (annotate_value): Do not create the cache of
2111 annotated values here but...
2112 <CALL_EXPR>: Only inline the call if -gnatR3 is specified or we are
2113 in ASIS mode.
2114 (init_gnat_decl): ...here instead. New function.
2115 (destroy_gnat_decl): Likewise.
2116 * gcc-interface/trans.c (gigi): Call {init|destroy}_gnat_decl.
2117 * gcc-interface/utils.c (init_gnat_utils): Minor reformatting.
2118
2119 2014-04-14 Eric Botcazou <ebotcazou@adacore.com>
2120
2121 * gcc-interface/decl.c (create_field_decl_from): Finalize non-constant
2122 offset for the field, if any.
2123
2124 2014-04-09 Eric Botcazou <ebotcazou@adacore.com>
2125 Svante Signell <svante.signell@gmail.com>
2126
2127 PR ada/54040
2128 PR ada/59346
2129 * s-osinte-x32.adb: New file.
2130 * s-linux.ads (Time): New section.
2131 * s-linux-alpha.ads (Time): Likewise.
2132 * s-linux-android.ads (Time: Likewise.
2133 * s-linux-hppa.ads (Time): Likewise.
2134 * s-linux-mipsel.ads (Time): Likewise.
2135 * s-linux-sparc.ads (Time): Likewise.
2136 * s-linux-x32.ads (Time): Likewise.
2137 * s-osprim-x32.ads (timespec): Adjust.
2138 (Clock): Likewise.
2139 (To_Timespec): Likewise.
2140 * s-osinte-linux.ads (Time): Define local subtypes for those defined
2141 in System.Linux.
2142 * s-taprop-linux.adb (Monotonic_Clock): Do not define timeval.
2143 * s-osinte-hpux.ads (timespec): Revert POSIX breakage.
2144 * s-osinte-kfreebsd-gnu.ads (timespec): Likewise.
2145 * s-osinte-solaris-posix.ads (timespec): Likewise.
2146 * s-osinte-posix.adb (To_Timespec): Likewise.
2147 * gcc-interface/Makefile.in (x32/Linux): Use s-osinte-x32.adb.
2148
2149 2014-04-08 Eric Botcazou <ebotcazou@adacore.com>
2150
2151 PR ada/60411
2152 * gcc-interface/Makefile.in (arm% linux-android): Switch to EHABI.
2153 * s-linux-android.ads: New file.
2154 * s-intman-android.adb: Likewise.
2155 * s-osinte-android.ads: Adjust.
2156 * sigtramp-armdroid.c: Likewise.
2157 * sigtramp.h: Add Android support.
2158
2159 2014-04-07 Eric Botcazou <ebotcazou@adacore.com>
2160
2161 * gcc-interface/Makefile.in (alpha-vms): Add missing line.
2162
2163 2014-03-30 Eric Botcazou <ebotcazou@adacore.com>
2164
2165 PR ada/60703
2166 * system-linux-alpha.ads: Adjust for Ada 2005.
2167 * system-linux-mips.ads: Likewise.
2168 * system-linux-mips64el.ads: Likewise.
2169 * system-linux-mipsel.ads: Likewise.
2170 * system-linux-s390.ads: Likewise.
2171 * system-linux-s390x.ads: Likewise.
2172 * system-linux-sparc.ads: Likewise.
2173 * system-linux-sparcv9.ads: Likewise.
2174 * system-rtems.ads: Likewise.
2175 * system-vxworks-arm.ads: Likewise.
2176
2177 2014-03-16 Andreas Schwab <schwab@linux-m68k.org>
2178
2179 PR ada/39172
2180 * gcc-interface/Makefile.in (target_cpu_default): Revert
2181 2013-10-11 change.
2182
2183 2014-03-13 Eric Botcazou <ebotcazou@adacore.com>
2184
2185 PR ada/51483
2186 * cstand.adb (Register_Float_Type): Add 'precision' parameter and use
2187 it to set the RM size. Use directly 'size' for the Esize.
2188 (Create_Back_End_Float_Types): Adjust call to above.
2189 * get_targ.ads (Register_Type_Proc): Add 'precision' parameter.
2190 * set_targ.ads (FPT_Mode_Entry): Add 'precision' component.
2191 (Write_Target_Dependent_Values): Adjust comment.
2192 * set_targ.adb (Register_Float_Type): Add 'precision' parameter and
2193 deal with it.
2194 (Write_Target_Dependent_Values): Write the precision in lieu of size.
2195 (Initialization): Read the precision in lieu of size and compute the
2196 size from the precision and the alignment.
2197 * gcc-interface/gigi.h (enumerate_modes): Add integer parameter.
2198 * gcc-interface/misc.c (enumerate_modes): Likewise. Do not register
2199 types for vector modes, pass the size in addition to the precision.
2200
2201 2014-03-10 Eric Botcazou <ebotcazou@adacore.com>
2202
2203 * gcc-interface/Make-lang.in (ADA_DEPFILES): Fix typo.
2204
2205 2014-03-07 Doug Rupp <rupp@adacore.com>
2206
2207 PR ada/60411
2208 * system-linux-armel.ads (Backend_Overflow_Checks): Set to True.
2209 (Support_64_Bit_Divides): Removed, no longer used.
2210 (ZCX_By_Default): Enabled.
2211
2212 2014-02-25 Doug Rupp <rupp@adacore.com>
2213
2214 * gcc-interface/Makefile.in (arm-linux):
2215 (EH_MECHANISM): Use ARM unwinder (-arm)
2216 (LIBGNAT_TARGET_PAIRS: Override defaults with a-exexpr-gcc.adb and
2217 s-excmac-arm.ads.
2218 (EXTRA_LIBGNAT_OBJS): Add raise-gcc.o
2219 (EXTRA_GNATRTL_NONTASKING_OBJS): Add g-cppexc.o s-excmac.o.
2220 (arm-wrs-vxworks): Add EH_MECHANISM=-gcc for kernel mode.
2221 (EXTRA_LIBGNAT_OBJS): Add sigtramp-armvxw.o
2222 Add dependencies for sigtramp-armvxw.o.
2223
2224 2014-02-25 Eric Botcazou <ebotcazou@adacore.com>
2225
2226 * gcc-interface/trans.c (Pragma_to_gnu): Deal with Warning_As_Error.
2227
2228 2014-02-25 Robert Dewar <dewar@adacore.com>
2229
2230 * rtsfind.adb (Is_RTE): Protect against entity with no scope
2231 field (previously this call blew up on the Standard entity).
2232 * sem_attr.adb (Analyze_Attribute, case Access): Remove
2233 test for No_Abort_Statements, this is now handled in
2234 Set_Entity_With_Checks.
2235 * exp_ch6.adb, sem_ch10.adb, sem_ch4.adb, sem_ch8.adb, sem_res.adb:
2236 Change name Set_Entity_With_Style_Check => Set_Entity_With_Checks.
2237 * sem_util.ads, sem_util.adb: Change name Set_Entity_With_Style_Check =>
2238 Set_Entity_With_Checks.
2239 (Set_Entity_With_Checks): Add checks for No_Dynamic_Attachment,
2240 Add checks for No_Abort_Statements.
2241
2242 2014-02-25 Robert Dewar <dewar@adacore.com>
2243
2244 * exp_ch9.adb (Expand_Entry_Barrier): Add comment that call to
2245 Check_Restriction is OK.
2246
2247 2014-02-25 Ed Schonberg <schonberg@adacore.com>
2248
2249 * sem_ch3.adb (Process_Full_View): Better error message when
2250 the full view of a private type without discriminants is an
2251 unconstrained type.
2252 * sem_ch7.adb (Uninstall_Declarations): Ditto.
2253
2254 2014-02-25 Eric Botcazou <ebotcazou@adacore.com>
2255
2256 * sigtramp-armvxw.c: Also restore r0.
2257
2258 2014-02-25 Robert Dewar <dewar@adacore.com>
2259
2260 * errout.adb (Error_Msg_Internal): Warning_Msg_Char set
2261 unconditionally (Set_Msg_Insertion_Warning): Warning_Msg_Char
2262 set unconditionally.
2263 * erroutc.adb (Get_Warning_Tag): Does not give a leading space
2264 any more (Output_Msg_Text): Rewritten with new convention on
2265 output of warnings that are treated as errors.
2266 * erroutc.ads (Error_Msg_Object): Warn_Chr is always set even
2267 if Warn is False.
2268 * gnat_rm.texi: Updates to documentation on pragma
2269 Warning_As_Error.
2270 * warnsw.adb (Set_Dot_Warning_Switch): -gnatw.e should not
2271 set Warning_Doc_Switch.
2272 * lib-writ.ads: Add documentation note on ALI file generation
2273 for C.
2274 * exp_ch6.adb (Expand_Call): Remove check for No_Abort_Statements
2275 (belongs in Sem).
2276 * sem_attr.adb (Resolve_Attribute, case Access):
2277 Abort_Task'Access violates the No_Abort_Statements restriction.
2278 * sem_res.adb (Resolve_Call): Check restriction
2279 No_Abort_Statements for call to Abort_Task or a renaming of it.
2280
2281 2014-02-25 Robert Dewar <dewar@adacore.com>
2282
2283 * sem_ch3.adb (Array_Type_Declaration): Check for case of using
2284 type name as index.
2285 * lib.ads: Minor reformatting.
2286 * einfo.ads: Minor reformatting.
2287
2288 2014-02-25 Doug Rupp <rupp@adacore.com>
2289
2290 * sem_mech.adb (Set_Mechanisms): For convention Fortran on VMS
2291 use Short_Descriptor(S) as the argument passing mechanism.
2292
2293 2014-02-25 Eric Botcazou <ebotcazou@adacore.com>
2294
2295 * sigtramp-ppcvxw.c (CFI_COMMON_REGS): Also include r0.
2296
2297 2014-02-25 Robert Dewar <dewar@adacore.com>
2298
2299 * atree.ads (Warnings_Treated_As_Errors): New variable.
2300 * errout.adb (Error_Msg_Internal): Set Warn_Err flag in
2301 error object (Initialize): Initialize Warnings_As_Errors_Count
2302 (Write_Error_Summary): Include count of warnings treated as errors.
2303 * erroutc.adb (Warning_Treated_As_Error): New function.
2304 (Matches): Function moved to outer level of package.
2305 * erroutc.ads (Error_Msg_Object): Add Warn_Err flag.
2306 (Warning_Treated_As_Error): New function.
2307 * gnat_rm.texi: Document pragma Treat_Warning_As_Error.
2308 * opt.adb: Add handling of Warnings_As_Errors_Count[_Config].
2309 * opt.ads (Config_Switches_Type): Add entry for
2310 Warnings_As_Errors_Count.
2311 (Warnings_As_Errors_Count): New variable.
2312 (Warnings_As_Errors): New array.
2313 * par-prag.adb: Add dummy entry for Warning_As_Error.
2314 * sem_prag.adb (Analyze_Pragma): Implement new pragma
2315 Warning_As_Error.
2316 * snames.ads-tmpl: Add entries for Warning_As_Error pragma.
2317
2318 2014-02-25 Eric Botcazou <ebotcazou@adacore.com>
2319
2320 * sigtramp.h: Fix minor inaccuracy.
2321
2322 2014-02-25 Ben Brosgol <brosgol@adacore.com>
2323
2324 * gnat_ugn.texi: Added description of kill command.
2325
2326 2014-02-25 Robert Dewar <dewar@adacore.com>
2327
2328 * gnat_rm.texi (Address_Clauses): Add a section discussing the
2329 problem of address clauses causing unexpected initialization,
2330 including the effect of Initialize_Scalars.
2331
2332 2014-02-25 Robert Dewar <dewar@adacore.com>
2333
2334 * errout.adb: Various changes for better msgs for anonmous access
2335 subprogram types.
2336 * erroutc.ads, erroutc.adb (Buffer_Ends_With): Version with character
2337 argument.
2338 (Buffer_Remove): Version with character argument.
2339 * sem_attr.adb (Resolve_Attribute, case Access): Better handling
2340 of mismatching conventions for access-to-subprogram case.
2341 * sem_prag.adb (Set_Convention_From_Pragma): Deal with anonymous
2342 access types in record.
2343 * sem_util.ads, sem_util.adb (Set_Convention): Handle anonymous access
2344 types, including in records.
2345
2346 2014-02-25 Doug Rupp <rupp@adacore.com>
2347
2348 * sigtramp-ppcvxw.c, sigtramp.h, sigtramp-armvxw.c: Comment
2349 enhancements and corrections.
2350
2351 2014-02-25 Robert Dewar <dewar@adacore.com>
2352
2353 * gnat_rm.texi: New section "Conventions and Anonymous Access Types"
2354
2355 2014-02-25 Robert Dewar <dewar@adacore.com>
2356
2357 * gnat_rm.texi: First set of documentation additions for
2358 predefined RM units.
2359 * checks.adb: Minor reformatting.
2360 * sem_elab.adb (Check_Task_Activation): Minor fix to error
2361 message.
2362 * sem_util.adb: Minor reformatting.
2363
2364 2014-02-25 Arnaud Charlet <charlet@adacore.com>
2365
2366 * usage.adb (Usage): Add help on -gnateC.
2367 * switch-c.adb (Scan_Front_End_Switches): Add handling of -gnateC.
2368 * opt.ads (Generate_CodePeer_Messages): New flag.
2369 * gnat_ugn.texi: Document new switch -gnateC.
2370
2371 2014-02-25 Ben Brosgol <brosgol@adacore.com>
2372
2373 * gnat_rm.texi: Corrected minor typos in Implementation Defined
2374 Aspects.
2375 * opt.ads: Minor reformatting.
2376
2377 2014-02-25 Robert Dewar <dewar@adacore.com>
2378
2379 * binde.adb: Change messages to mention -gnatel instead of -gnatwl.
2380 * gnat_ugn.texi: Update documentation of -gnatwl Add documentation
2381 of -gnatel/-gnateL.
2382 * opt.ads (Warn_Info_Messages): New flag.
2383 * sem_elab.adb: Use Elab_Warnings, Elab_Info_Messages to control
2384 messages.
2385 * sem_prag.adb: Use Elab_Warnings, Elab_Info_Messages to control
2386 messages.
2387 * switch-m.ad, switch-c.adb: Recognize new -gnatel/EL switches.
2388 * usage.adb: Add documentation of -gnatel/-gnateL Update
2389 documentation of -gnatwl/-gnatwL.
2390 * warnsw.adb: New handling of Elab_Warnings, Elab_Info_Messages
2391 * warnsw.ads (Elab_Info_Messages): New field in Warning_Record
2392
2393 2014-02-25 Robert Dewar <dewar@adacore.com>
2394
2395 * einfo.ads, einfo.adb (Has_Shift_Operator): New flag.
2396 * gnat_rm.texi: Document pragma Provide_Shift_Operators.
2397 * interfac.ads: Minor code reorganization (add pragma
2398 Compiler_Unit_Warning).
2399 * par-prag.adb: Add dummy entry for Provide_Shift_Operators.
2400 * sem_ch3.adb (Build_Derived_Numeric_Type): Copy
2401 Has_Shift_Operator flag.
2402 * sem_intr.adb (Check_Intrinsic_Subprogram): Make sure
2403 Check_Shift is always called (Check_Shift): Set Has_Shift_Operator.
2404 * sem_prag.adb: Implement pragma Provide_Shift_Operators.
2405 * snames.ads-tmpl: Add entries for pragma Provide_Shift_Operators
2406 Add entry for Name_Amount.
2407 * checks.adb (Selected_Range_Checks): When checking for a null
2408 range, make sure we use the base type, and not the subtype for
2409 deciding a range is null.
2410 * sem_ch5.adb (Analyze_Loop_Parameter_Specification): Check
2411 for suspicious loop bound which is outside the range of the
2412 loop subtype.
2413 * gnat_ugn.texi: Add documentation section "Determining the
2414 Chosen Elaboration Order"
2415 * sem_ch13.adb (UC_Entry): Add field Act_Unit
2416 (Validate_Unchecked_Conversion): Store Act_Unit
2417 (Validate_Unchecked_Conversions): Test Warnings_Off in Act_Unit
2418 * treepr.adb: Minor reformatting.
2419
2420 2014-02-25 Arnaud Charlet <charlet@adacore.com>
2421
2422 * usage.adb: Minor: fix typo.
2423
2424 2014-02-25 Robert Dewar <dewar@adacore.com>
2425
2426 * lib.ads, s-bitops.adb, s-bitops.ads, s-conca5.adb, gnat_rm.texi,
2427 s-conca5.ads, s-conca7.adb, s-conca7.ads, s-crc32.adb, s-crc32.ads,
2428 s-conca9.adb, s-conca9.ads, g-dyntab.adb, s-crtl.ads, g-dyntab.ads,
2429 s-excdeb.adb, s-addope.adb, s-addope.ads, s-carun8.adb, s-carun8.ads,
2430 g-htable.adb, g-htable.ads, g-hesora.adb, g-hesora.ads, s-conca2.adb,
2431 s-conca2.ads, a-comlin.adb, a-chlat1.ads, a-comlin.ads, errout.ads,
2432 a-except.adb, s-conca4.adb, a-except.ads, s-conca4.ads, s-conca6.adb,
2433 s-conca6.ads, g-spchge.adb, g-spchge.ads, g-u3spch.adb, g-u3spch.ads,
2434 a-strhas.ads, restrict.adb, aspects.adb, aspects.ads, s-conca8.adb,
2435 s-conca8.ads, back_end.adb, par-prag.adb, g-byorma.adb, g-byorma.ads,
2436 a-elchha.adb, a-elchha.ads, g-speche.adb, g-speche.ads, s-casuti.adb,
2437 s-assert.adb, s-casuti.ads, s-assert.ads, a-clrefi.adb, a-clrefi.ads,
2438 s-conca3.adb, s-conca3.ads, a-ioexce.ads: Implement pragma
2439 Compiler_Unit_Warning, change Compiler_Unit everywhere to
2440 Compiler_Unit_Warning.
2441
2442 2014-02-25 Sergey Rybin <rybin@adacore.com frybin>
2443
2444 * sem_prag.adb (Analyze_Depends_In_Decl_Part): Do not normalize
2445 in ASIS mode aggregates that are used as aspect definitions.
2446
2447 2014-02-25 Robert Dewar <dewar@adacore.com>
2448
2449 * exp_ch7.adb, sem_util.adb, sem_util.ads, exp_ch6.adb: Minor
2450 reformatting.
2451
2452 2014-02-25 Ed Schonberg <schonberg@adacore.com>
2453
2454 * freeze.adb (Freeze_Entity): If the return type of a function
2455 is a limited view, and the non-limited view has not been seen yet,
2456 defer freezing to some later point.
2457
2458 2014-02-25 Robert Dewar <dewar@adacore.com>
2459
2460 * sem_ch3.adb: Minor reformatting.
2461
2462 2014-02-25 Robert Dewar <dewar@adacore.com>
2463
2464 * s-excdeb.ads, s-except.ads, s-exctab.adb, s-exctab.ads, s-finmas.ads,
2465 s-htable.adb, s-htable.ads, s-imenne.adb, s-imenne.ads, s-imgenu.adb,
2466 s-imgenu.ads, s-mastop.adb, s-mastop.ads, s-memory-vms_64.adb,
2467 s-memory-vms_64.ads, s-memory.adb, s-memory.ads, s-os_lib.adb,
2468 s-os_lib.ads, s-parame.adb, s-parame.ads, s-purexc.ads, s-restri.adb,
2469 s-restri.ads, s-rident.ads, s-secsta.adb, s-secsta.ads, s-soflin.adb,
2470 s-soflin.ads, s-sopco3.adb, s-sopco3.ads, s-sopco4.adb, s-sopco4.ads,
2471 s-sopco5.adb, s-sopco5.ads, s-spsufi.ads, s-stache.adb, s-stache.ads,
2472 s-stalib.adb, s-stalib.ads, s-stoele.adb, s-stoele.ads, s-strcom.adb,
2473 s-strcom.ads, s-strhas.adb, s-string.adb, s-string.ads, s-strops.adb,
2474 s-strops.ads, s-ststop.adb, s-ststop.ads, s-traceb.adb, s-traceb.ads,
2475 s-traent.adb, s-traent.ads, s-unstyp.ads, s-utf_32.adb, s-utf_32.ads,
2476 s-wchcnv.adb, s-wchcnv.ads, s-wchcon.adb, s-wchcon.ads, s-wchjis.adb,
2477 s-wchjis.ads, sem_ch11.adb, sem_ch4.adb, sem_ch5.adb, sem_prag.adb,
2478 snames.ads-tmpl: Change Compiler_Unit everywhere to
2479 Compiler_Unit_Warning.
2480
2481 2014-02-25 Hristian Kirtchev <kirtchev@adacore.com>
2482
2483 * exp_ch6.adb (Add_Or_Save_Precondition): New routine.
2484 (Collect_Body_Postconditions_In_Decls): New routine.
2485 (Collect_Body_Postconditions_Of_Kind): Factor out code. Handle
2486 postcondition aspects or pragmas that appear on a subprogram
2487 body stub.
2488 (Collect_Spec_Preconditions): Factor out code. Handle
2489 precondition aspects or pragmas that appear on a subprogram
2490 body stub.
2491 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): The analysis of
2492 aspects that apply to a subprogram body stub is no longer delayed,
2493 the aspects are analyzed on the spot.
2494 (SPARK_Aspect_Error):
2495 Aspects that apply to a subprogram declaration cannot appear in
2496 a subunit.
2497 * sem_ch10.adb Remove with and use clause for Sem_Ch13.
2498 (Analyze_Proper_Body): Add local variable Comp_Unit. Unum
2499 is now a local variable. Code cleanup. Analysis related to
2500 the aspects of a subprogram body stub is now carried out by
2501 Analyze_Subprogram_Body_Helper. Do not propagate the aspects
2502 and/or pragmas of a subprogram body stub to the proper body
2503 as this is no longer needed. Do not analyze the aspects of a
2504 subprogram stub when the corresponding source unit is missing.
2505 (Analyze_Protected_Body_Stub): Flag the illegal use of aspects
2506 on a stub.
2507 (Analyze_Task_Body_Stub): Flag the illegal use of
2508 aspects on a stub.
2509 (Optional_Subunit): Add local variable Unum.
2510 * sem_ch13.adb (Insert_Delayed_Pragma): Do not analyze a generated
2511 pragma when it applies to a subprogram body stub.
2512 * sem_prag.adb (Analyze_Pragma): Pragmas Contract_Cases,
2513 Depends and Global can now apply to a subprogram body stub as
2514 long as it acts as its own spec.
2515 (Analyze_Refined_Pragma):
2516 Code reformatting. Refinement pragmas cannot apply to a subunit.
2517
2518 2014-02-25 Hristian Kirtchev <kirtchev@adacore.com>
2519
2520 * einfo.ads Update the usage of flag
2521 Uses_Sec_Stack. Uses_Sec_Stack now applies to E_Loop entities.
2522 * exp_ch5.adb (Expand_Iterator_Loop): The temporary for a cursor
2523 now starts with the letter 'C'. This makes reading expanded
2524 code easier.
2525 * exp_ch7.adb (Establish_Transient_Scope): Add local variable
2526 Iter_Loop. Signal that an Ada 2012 iterator loop requires
2527 secondary stack management when creating a transient scope for
2528 an element reference.
2529 * exp_util.adb (Process_Statements_For_Controlled_Objects):
2530 When wrapping the statements of a loop, pass the E_Loop entity
2531 to the wrapping machinery.
2532 (Wrap_Statements_In_Block): Add
2533 formal parameter Scop along with comment on usage. Add local
2534 variables Block_Id, Block_Nod and Iter_Loop. Mark the generated
2535 block as requiring secondary stack management when the block is
2536 created inside an Ada 2012 iterator loop. This ensures that any
2537 reference objects are reclaimed on each iteration of the loop.
2538 * sem_ch5.adb (Analyze_Loop_Statement): Mark the generated block
2539 tasked with the handling of container iterators as requiring
2540 secondary stack management. This ensures that iterators are
2541 reclaimed when the loop terminates or is exited in any fashion.
2542 * sem_util.adb (Add_Block_Identifier): New routine.
2543 (Find_Enclosing_Iterator_Loop): New routine.
2544 * sem_util.ads (Add_Block_Identifier): New routine.
2545 (Find_Enclosing_Iterator_Loop): New routine.
2546
2547 2014-02-25 Robert Dewar <dewar@adacore.com>
2548
2549 * sinfo.ads: Minor reformatting.
2550
2551 2014-02-25 Tristan Gingold <gingold@adacore.com>
2552
2553 * s-expllu.ads, s-expuns.ads, s-expmod.ads: Minor comment fix.
2554
2555 2014-02-25 Pascal Obry <obry@adacore.com>
2556
2557 * sinput-l.adb, osint.adb, osint.ads: Add Prep_Suffix to factorize code.
2558
2559 2014-02-25 Tristan Gingold <gingold@adacore.com>
2560
2561 * sem_ch10.adb: Minor comment fix.
2562
2563 2014-02-25 Bob Duff <duff@adacore.com>
2564
2565 * s-tasdeb.adb: Misc cleanup of this package,
2566 including printing addresses in hexadecimal.
2567 (Write): Fix minor bug when taking 'Address of an empty string.
2568
2569 2014-02-25 Ed Schonberg <schonberg@adacore.com>
2570
2571 * sem_prag.adb (Analyze_Part_Of): Reject state refinement in a
2572 public child unit when it does not refer to the abstract state
2573 of a public ancestor.
2574
2575 2014-02-25 Yannick Moy <moy@adacore.com>
2576
2577 * sem_prag.adb (Analyze_Pragma/Pragma_Validity_Checks): Ignore pragma
2578 Validity_Checks in GNATprove and CodePeer modes.
2579
2580 2014-02-25 Pascal Obry <obry@adacore.com>
2581
2582 * prj-attr.adb, projects.texi, snames.ads-tmpl: Add package Install's
2583 Artifacts attribute.
2584
2585 2014-02-25 Yannick Moy <moy@adacore.com>
2586
2587 * sem_prag.adb: Minor reformatting to get consistent messages.
2588
2589 2014-02-25 Robert Dewar <dewar@adacore.com>
2590
2591 * checks.adb: Minor reformatting.
2592 * sinfo.ads (Do_Range_Check): Document that this flag is never
2593 passed to the back end.
2594
2595 2014-02-25 Yannick Moy <moy@adacore.com>
2596
2597 * sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_prag.adb, sem_attr.adb,
2598 sem_ch6.adb: Remove useless references to SPARK RM in error messages.
2599
2600 2014-02-25 Hristian Kirtchev <kirtchev@adacore.com>
2601
2602 * sem_res.adb (Appears_In_Check): New routine.
2603 (Resolve_Entity_Name): Remove local variables Prev and
2604 Usage_OK. Par is now a constant. Remove the parent chain traversal
2605 as the placement of a volatile object with enabled property
2606 Async_Writers and/or Effective_Reads must appear immediately
2607 within a legal construct.
2608
2609 2014-02-25 Hristian Kirtchev <kirtchev@adacore.com>
2610
2611 * checks.adb (Apply_Selected_Range_Checks):
2612 Alphabetize local constants and variables. Add comments.
2613 Always insert a range check that requires runtime evaluation into
2614 the tree.
2615
2616 2014-02-25 Robert Dewar <dewar@adacore.com>
2617
2618 * sem_attr.adb, sem_ch6.adb, par-ch3.adb: Minor reformatting.
2619
2620 2014-02-25 Bob Duff <duff@adacore.com>
2621
2622 * s-tassta.adb (Finalize_Global_Tasks): Limit the number of loop
2623 iterations while waiting for independent tasks to terminate;
2624 if an independent task does not terminate, we do not want to
2625 hang here. In that case, the thread will be terminated when the
2626 process exits.
2627 * s-taprop-linux.adb (Abort_Task): Fix Assert to allow for ESRCH.
2628
2629 2014-02-25 Ed Schonberg <schonberg@adacore.com>
2630
2631 * sem_prag.adb (Check_SPARK_Aspect_For_ASIS): New subprogram,
2632 used to perform pre-analysis of the expression for SPARK
2633 aspects that have a non-standard syntax, such as GLobal and
2634 Initializes. The procedure applies to the original expression
2635 in an aspect specification, prior to the analysis of the
2636 corresponding pragma, in order to provide semantic information
2637 for ASIS navigation purposes.
2638 (Analyze_Global_In_Decl_List, Analyze_Initializes_In_Decl_Part):
2639 Call new subprogram.
2640
2641 2014-02-25 Yannick Moy <moy@adacore.com>
2642
2643 * sem_prag.adb: Remove obsolete reference to SPARK RM in error message.
2644
2645 2014-02-25 Doug Rupp <rupp@adacore.com>
2646
2647 * init.c (HAVE_GNAT_ADJUST_CONTEXT_FOR_RAISE): Enable for ARM.
2648 (__gnat_adjust_context_for_raise): Bump the PC by 2.
2649
2650 2014-02-25 Ed Schonberg <schonberg@adacore.com>
2651
2652 * par-ch3.adb (P_Basic_Declarative_Items): In the case of a
2653 misplaced IS, add a statement sequence to improper body only if
2654 one has not been parsed already.
2655
2656 2014-02-25 Ed Schonberg <schonberg@adacore.com>
2657
2658 * sem_attr.adb (Analyze_Attribute, case 'Update): Check for
2659 mismatch when multidimensional array is updated with a single
2660 index.
2661
2662 2014-02-25 Yannick Moy <moy@adacore.com>
2663
2664 * sem_ch3.adb, sem_ch5.adb, sem_prag.adb, sem_attr.adb, errout.ads,
2665 sem_ch6.adb: Mark most references to SPARK RM in error messages
2666 for removal.
2667
2668 2014-02-24 Ed Schonberg <schonberg@adacore.com>
2669
2670 * par-ch3.adb (P_Basic_Declarative_Items): If an improper body
2671 appears in a list of basic declarations, complete the tree with
2672 an empty statement list, to prevent cascaded errors and crashes
2673 if semantic analysis is attempted.
2674
2675 2014-02-24 Thomas Quinot <quinot@adacore.com>
2676
2677 * g-sercom-mingw.adb (Open): Fix incorrect test for error return
2678 value.
2679 * erroutc.adb: Minor reformatting.
2680
2681 2014-02-24 Hristian Kirtchev <kirtchev@adacore.com>
2682
2683 * sem_prag.adb (Check_Clause_Syntax): Account
2684 for a solitary input item in a dependency list.
2685
2686 2014-02-24 Yannick Moy <moy@adacore.com>
2687
2688 * gnat1drv.adb (Adjust_Global_Switches): Do not
2689 use validity checks at all in GNATprove_Mode.
2690
2691 2014-02-24 Robert Dewar <dewar@adacore.com>
2692
2693 * g-sercom-mingw.adb, g-sercom-linux.adb, sem_prag.adb, freeze.adb,
2694 atree.adb, atree.ads: Minor reformatting.
2695
2696 2014-02-24 Hristian Kirtchev <kirtchev@adacore.com>
2697
2698 * sem_ch6.adb (Analyze_Subprogram_Body_Contract): Do not enforce
2699 global and dependence refinement when SPARK_Mode is off.
2700 * sem_ch7.adb (Analyze_Package_Body_Contract): Do not enforce
2701 state refinement when SPARK_Mode is off.
2702 * sem_ch13.adb (Analyze_Aspect_Specifications): Add local
2703 variable Decl. Insert the generated pragma for Refined_State
2704 after a potential pragma SPARK_Mode.
2705 * sem_prag.adb (Analyze_Depends_In_Decl_Part): Add local
2706 constant Deps. Remove local variable Expr. Check the syntax
2707 of pragma Depends when SPARK_Mode is off. Factor out the
2708 processing for extra parenthesis around individual clauses.
2709 (Analyze_Global_In_Decl_List): Items is now a constant. Check
2710 the syntax of pragma Global when SPARK_Mode is off.
2711 (Analyze_Initializes_In_Decl_Part): Check the syntax of pragma
2712 Initializes when SPARK_Mode is off.
2713 (Analyze_Part_Of): Check
2714 the syntax of the encapsulating state when SPARK_Mode is off.
2715 (Analyze_Pragma): Check the syntax of pragma Abstract_State when
2716 SPARK_Mode is off. Move the declaration order check with respect
2717 to pragma Initializes to the end of the processing. Do not verify
2718 the declaration order for pragma Initial_Condition when SPARK_Mode
2719 is off. Do not complain about a useless package refinement when
2720 SPARK_Mode is off.
2721 (Analyze_Refined_Depends_In_Decl_Part): Refs
2722 is now a constant. Check the syntax of pragma Refined_Depends
2723 when SPARK_Mode is off.
2724 (Analyze_Refined_Global_In_Decl_Part):
2725 Check the syntax of pragma Refined_Global when SPARK_Mode is off.
2726 (Analyze_Refined_State_In_Decl_Part): Check the syntax of pragma
2727 Refined_State when SPARK_Mode is off.
2728 (Check_Dependence_List_Syntax): New routine.
2729 (Check_Global_List_Syntax): New routine.
2730 (Check_Initialization_List_Syntax): New routine.
2731 (Check_Item_Syntax): New routine.
2732 (Check_State_Declaration_Syntax): New routine.
2733 (Check_Refinement_List_Syntax): New routine.
2734 (Has_Extra_Parentheses): Moved to the top level of Sem_Prag.
2735
2736 2014-02-24 Robert Dewar <dewar@adacore.com>
2737
2738 * a-tags.adb, s-os_lib.adb: Minor reformatting.
2739
2740 2014-02-24 Thomas Quinot <quinot@adacore.com>
2741
2742 * g-sercom-mingw.adb, g-sercom-linux.adb (Raise_Error): Include
2743 strerror message, not just numeric errno value.
2744
2745 2014-02-24 Doug Rupp <rupp@adacore.com>
2746
2747 * raise-gcc.c (exception_class_eq): Make endian neutral.
2748
2749 2014-02-24 Ed Schonberg <schonberg@adacore.com>
2750
2751 * atree.ads, atree,adb (Copy_Separate_Tree): Remove Syntax_Only
2752 flag, and reset Etype and Analyzed attributes unconditionally
2753 when copying a tree that may be partly analyzed.
2754 * freeze.adb: Change calls to Copy_Separate_Tree accordingly.
2755 * sem_ch6.adb (Check_Inline_Pragma): If the Inline pragma appears
2756 within a subprogram body and applies to it, remove it from the
2757 body before making a copy of it, to prevent spurious errors when
2758 analyzing the copied body.
2759
2760 2014-02-24 Thomas Quinot <quinot@adacore.com>
2761
2762 * s-os_lib.adb (Errno_Message): Do not depend on Integer'Image.
2763 * s-oscons-tmplt.c: On VxWorks, include adaint.h only after
2764 vxWorks.h has been included. Also ensure that file attributes
2765 related definitions are output even in cases where socket support
2766 is not enabled.
2767 * a-tags.adb: Code clean up.
2768 * Make-generated.in (OSCONS_CPP, OSCONS_EXTRACT): Use -iquote
2769 instead of -I to add the main ada source directory to the header
2770 search path, in order to avoid conflict between our own "types.h"
2771 and VxWork's <types.h>.
2772
2773 2014-02-24 Robert Dewar <dewar@adacore.com>
2774
2775 * atree.ads, atree.adb (Copy_Separate_Tree): Add Syntax_Only parameter.
2776 * debug.adb: Remove documentation of -gnatd.X, no longer used.
2777 * freeze.adb (Wrap_Imported_Subprogram): Fixed and activated.
2778
2779 2014-02-24 Bob Duff <duff@adacore.com>
2780
2781 * gnat_ugn.texi: Improve documentation of gnatpp.
2782
2783 2014-02-24 Thomas Quinot <quinot@adacore.com>
2784
2785 * g-stheme.adb, g-socthi-vms.adb, g-socthi-vms.ads,
2786 g-socthi-vxworks.adb, g-socthi-vxworks.ads, g-stseme.adb,
2787 g-socthi-mingw.adb, g-socthi-mingw.ads, g-socthi.adb,
2788 g-socthi.ads, g-socket.adb (Host_Error_Message): Return a string, not
2789 a chars_ptr, because on Windows this is a renaming of
2790 Socket_Error_Message.
2791
2792 2014-02-24 Robert Dewar <dewar@adacore.com>
2793
2794 * a-direct.adb, sem_ch5.adb, a-cfdlli.adb, a-cfhase.adb, a-tags.adb,
2795 s-filatt.ads, a-cforma.adb, sem_ch6.adb, g-socthi-mingw.adb,
2796 a-cfhama.adb, a-cforse.adb, a-cofove.adb: Minor reformatting and code
2797 reorganization.
2798
2799 2014-02-24 Thomas Quinot <quinot@adacore.com>
2800
2801 * Make-generated.in (OSCONS_CPP, OSCONS_EXTRACT): Make sure
2802 that the source directory containing s-oscons-tmplt.c is on the
2803 include path, so that all internal header files are available.
2804
2805 2014-02-24 Ed Schonberg <schonberg@adacore.com>
2806
2807 * sem_ch5.adb (Analyze_Loop_Parameter_Specification): If the
2808 domain of iteration is an attribute reference 'Old, this is an
2809 Ada 2012 iterator and the loop must be rewritten as such.
2810
2811 2014-02-24 Thomas Quinot <quinot@adacore.com>
2812
2813 * s-fileio.adb (Errno_Message): Remove, use shared version from
2814 s-os_lib instead.
2815 * s-crtrun.ads, Makefile.rtl: Remove now unused unit.
2816 * g-stseme (Socket_Error_Message): Reimplement in terms of new
2817 s-os_lib function.
2818 * g-socthi.ads, g-socthi.adb: Change profile of
2819 Socket_Error_Message to return String to allow the above.
2820 * g-socket.adb, g-socthi-mingw.adb, g-socthi-mingw.ads,
2821 * g-socthi-vms.adb, g-socthi-vms.ads, g-socthi-vxworks.adb,
2822 * g-socthi-vxworks.ads: Update to account for the above profile
2823 change.
2824 * a-tags.adb: Use strlen builtin binding provided by s-crtl.
2825 * s-crtl.ads (strncpy): New procedure.
2826 * s-os_lib.adb (Copy_Attributes): Import just once (strncpy):
2827 Use import from s-crtl.
2828 * a-envvar.adb, osint.adb: Use imports of C runtime functions
2829 from s-crtl instead of re-importing locally.
2830
2831 2014-02-24 Hristian Kirtchev <kirtchev@adacore.com>
2832
2833 * sem_prag.adb (Analyze_Global_Item): Emit the
2834 variable related checks concerning volatile objects only when
2835 SPARK_Mode is on.
2836
2837 2014-02-24 Robert Dewar <dewar@adacore.com>
2838
2839 * sem_ch5.adb (Analyze_Iterator_Specification): use
2840 Error_Msg_Ada_2012_Feature.
2841
2842 2014-02-24 Jose Ruiz <ruiz@adacore.com>
2843
2844 * s-rident.ads (Profile_Info): For Ravenscar, the restrictions
2845 No_Local_Timing_Events and No_Specific_Termination_Handlers
2846 must be set, according to the Ravenscar profile definition
2847 in D.13(6/3).
2848
2849 2014-02-24 Ed Schonberg <schonberg@adacore.com>
2850
2851 * sem_ch6.adb (Analyze_Expression_Function): If this is a
2852 completion, freeze return type and its designated type if needed.
2853
2854 2014-02-24 Thomas Quinot <quinot@adacore.com>
2855
2856 * sem_ch13.adb (Analyze_Attribute_Definition_Clause, case
2857 'Address): When moving initialization statements to a freeze
2858 entity, keep them under a single node (i.e. do not unwrap
2859 expressions with actions), and set the Initialization_Statements
2860 attribute again so that processing of a later pragma Import can
2861 still remove them.
2862
2863 2014-02-24 Claire Dross <dross@adacore.com>
2864
2865 * a-cfdlli.adb, a-cfdlli.ads, a-cfhama.adb, a-cfhama.ads,
2866 a-cfhase.adb, a-cfhase.ads, a-cforma.adb, a-cforma.ads,
2867 a-cforse.adb, a-cforse.ads, a-cofove.adb, a-cofove.ads: Rename
2868 Left/Right to First_To_Previous/Current_To_Last.
2869
2870 2014-02-24 Thomas Quinot <quinot@adacore.com>
2871
2872 * adaint.h (struct file_attributes): New component "error"
2873 (__gnat_error_attributes): Accessor for the above.
2874 * adaint.c (__gnat_error_attributes): New subprogram
2875 (__gnat_stat): Fix returned value (expect errno value)
2876 (__gnat_stat_to_attr): Add management of error component (set to
2877 stat errno value, except for missing files where it is set to 0,
2878 and exists is set to 0).
2879 * osint.ads (File_Attributes_Size): Update per change above,
2880 also clarify documentation.
2881 * s-filatt.ads: New file, binding to file attributes related
2882 functions.
2883 * Makefile.rtl (s-filatt): New runtime unit.
2884 * s-crtl.ads (strlen): Expose binding to GCC builtin (falls back
2885 to library function if not available on target).
2886 * s-os_lib.ads, s-os_lib.adb (Errno_Message): New subprogram.
2887 * s-oscons-tmplt.c (SIZEOF_struct_file_attributes,
2888 SIZEOF_struct_dirent_alloc): New constants.
2889 * Make-generated.in (s-oscons.ads): Now requires adaint.h.
2890 * a-direct.adb (Fetch_Next_Entry): Fix incorrect buffer sizes.
2891 Perform appropriate error checking if stat fails (do not just
2892 ignore existing files if stat fails)
2893 * gcc-interface/Make-lang.in (GNAT_ADA_OBJS, GNATBIND_OBJS): Update
2894 dependencies.
2895
2896 2014-02-24 Hristian Kirtchev <kirtchev@adacore.com>
2897
2898 * sem_prag.adb (Analyze_Global_Item): Move the check concerning
2899 the use of volatile objects as global items in a function to
2900 the variable related checks section.
2901 * sem_util.adb (Async_Readers_Enabled): Directly call
2902 Has_Enabled_Property.
2903 (Async_Writers_Enabled): Directly call Has_Enabled_Property.
2904 (Effective_Reads_Enabled): Directly call Has_Enabled_Property.
2905 (Effective_Writes_Enabled): Directly call Has_Enabled_Property.
2906 (Has_Enabled_Property): Rename formal parameter State_Id to Item_Id.
2907 Update the comment on usage. State_Has_Enabled_Property how handles
2908 the original logic of the routine. Add processing for variables.
2909 (State_Has_Enabled_Property): New routine.
2910 (Variable_Has_Enabled_Property): New routine.
2911
2912 2014-02-24 Robert Dewar <dewar@adacore.com>
2913
2914 * sinfo.ads, sem_ch12.adb, sem_res.adb, sem_ch4.adb, par-ch12.adb:
2915 Minor reformatting.
2916 * atree.ads, atree.adb (Node35): New function.
2917 (Set_Node35): New procedure.
2918 * debug.adb: Define new debug flag -gnatd.X.
2919 * einfo.ads, einfo.adb (Import_Pragma): New field.
2920 * freeze.adb (Wrap_Imported_Procedure): New procedure (not
2921 really active yet, has to be activated with -gnatd.X.
2922 * sem_prag.adb (Set_Imported): Set new Import_Pragma
2923 field (Set_Imported): Don't set Is_Public (see
2924 Freeze.Wrap_Imported_Subprogram)
2925 * par-ch3.adb (P_Component_List): Handle unexpected null component.
2926
2927 2014-02-24 Yannick Moy <moy@adacore.com>
2928
2929 * sem_ch3.adb: Correct reference to SPARK RM in error messages.
2930 * gnat_rm.texi: Correct documentation of attribute Update.
2931
2932 2014-02-24 Ed Schonberg <schonberg@adacore.com>
2933
2934 * sem_ch5.adb (Analyze_Iterator_Specification): Reject container
2935 iterator in older versions of Ada.
2936
2937 2014-02-24 Gary Dismukes <dismukes@adacore.com>
2938
2939 * sem_ch5.adb, sem_aux.ads, sem_ch12.adb, gnat_ugn.texi, par.adb,
2940 par-ch12.adb: Change spelling 'parametrization' to 'parameterization'.
2941
2942 2014-02-24 Ed Schonberg <schonberg@adacore.com>
2943
2944 * sinfo.ads, sinfo.adb: New attribute Generalized_Indexing, for
2945 indexed_components that are instances of Ada 2012 container
2946 indexing operations. Analysis and resolution of such nodes
2947 is performed on the attribute, and the original source is
2948 preserved for ASIS operations. If expansion is enabled, the
2949 indexed component is replaced by the value of this attribute,
2950 which is in a call to an Indexing aspect, in most case wrapped
2951 in a dereference operation.
2952 * sem_ch4.adb (Analyze_Indexed_Component): Create
2953 Generalized_Indexing attribute when appropriate.
2954 (Analyze_Call): If prefix is not overloadable and has an indexing
2955 aspect, transform into an indexed component so it can be analyzed
2956 as a potential container indexing.
2957 (Analyze_Expression): If node is an indexed component with a
2958 Generalized_ Indexing, do not re-analyze.
2959 * sem_res.adb (Resolve_Generalized_Indexing): Complete resolution
2960 of an indexed_component that has been transformed into a container
2961 indexing operation.
2962 (Resolve_Indexed_Component): Call the above when required.
2963 (Resolve): Do not insert an explicit dereference operation on
2964 an indexed_component whose type has an implicit dereference:
2965 the operation is inserted when resolving the related
2966 Generalized_Indexing.
2967
2968 2014-02-24 Olivier Ramonat <ramonat@adacore.com>
2969
2970 * gnat_rm.texi, gnat_ugn.texi: Replace Ada Compiler by Ada Development
2971 Environment.
2972
2973 2014-02-24 Hristian Kirtchev <kirtchev@adacore.com>
2974
2975 * sem_prag.adb (Check_Constituent_Usage): Remove leading spaces in
2976 error messages.
2977 (Inconsistent_Mode_Error): Remove leading spaces in error messages.
2978 Merge the expected and available mode errors.
2979 (Report_Unused_Constituents): Remove leading spaces in error messages.
2980 (Report_Unused_States): Remove leading spaces in error messages.
2981
2982 2014-02-24 Thomas Quinot <quinot@adacore.com>
2983
2984 * par_sco.adb (Traverse_One): Refine categorization of statement
2985 SCOs.
2986
2987 2014-02-24 Robert Dewar <dewar@adacore.com>
2988
2989 * aspects.ads, aspects.adb: Remove aspects Ada_2005 and Ada_2012,
2990 Pure_05, Pure_12 and Preelaborate_05.
2991 * gnat_rm.texi: Update accordingly.
2992 * sem_prag.adb: Document one argument form of Ada_05/Ada_2005
2993 pragmas Document one argument form of Ada_12/Ada_2012 pragmas
2994 Recognize one argument form of these pragmas only in GNAT mode
2995 (-gnatg).
2996
2997 2014-02-24 Ed Schonberg <schonberg@adacore.com>
2998
2999 * s-dimmks.ads: Replace symbol for temperature, previously the
3000 Greek letter Theta, by the ASCII @ sign.
3001 * s-diflio.ads: ditto.
3002
3003 2014-02-24 Robert Dewar <dewar@adacore.com>
3004
3005 * exp_ch4.adb: Minor code reorganization (use OR for boolean
3006 variables).
3007 * sem_ch3.adb, sem_prag.adb, freeze.adb: Minor reformatting.
3008
3009 2014-02-24 Ben Brosgol <brosgol@adacore.com>
3010
3011 * gnat_ugn.texi, projects.texi: Added the necessary conditionalization
3012 so that references to gnatmem and ASIS tools do not appear in the FSF
3013 edition of the GNAT User's Guide.
3014
3015 2014-02-24 Yannick Moy <moy@adacore.com>
3016
3017 * freeze.adb (Freeze_Entity): Do not issue warning
3018 for pre/post being ignored on imported subprogram in GNATprove
3019 mode.
3020
3021 2014-02-24 Robert Dewar <dewar@adacore.com>
3022
3023 * exp_ch5.adb, sem_ch5.adb, sem_type.adb, sem_res.adb, sem_attr.adb,
3024 stand.ads, sem_eval.adb: Minor reformatting.
3025
3026 2014-02-24 Yannick Moy <moy@adacore.com>
3027
3028 * sem_prag.adb: Minor rewording in error message.
3029
3030 2014-02-24 Johannes Kanig <kanig@adacore.com>
3031
3032 * exp_util.adb (Expand_Subtype_From_Expr): Do not expand subtypes in
3033 GNATprove_mode, gnat2why doesn't need nor use these types.
3034
3035 2014-02-24 Gary Dismukes <dismukes@adacore.com>
3036
3037 * exp_ch4.adb (Expand_N_Op_Expon): On the AAMP
3038 target, in the case of signed integer exponentiation that uses a
3039 run-time routine, always select the Exp_* versions, since overflow
3040 checking is automatically done by AAMP arithmetic instructions.
3041
3042 2014-02-24 Hristian Kirtchev <kirtchev@adacore.com>
3043
3044 * sem_ch13.adb (Analyze_Aspect_Specifications):
3045 When the related context is a package instace, insert pragma
3046 Abstract_State after all internally-generated renamings related
3047 to the instance "header".
3048
3049 2014-02-24 Ed Schonberg <schonberg@adacore.com>
3050
3051 * sem_ch3.adb (Analyze_Declarations): Analyze Contract of abstract
3052 subprograms.
3053 * sem_disp.adb (Check_Dispatching_Context): A non-dispatching
3054 call to an abstract subprogram is legal if it appears in a
3055 pre/postcondition of another abstract operation.
3056
3057 2014-02-24 Sergey Rybin <rybin@adacore.com frybin>
3058
3059 * gnat_ugn.texi: Misc updates.
3060
3061 2014-02-24 Hristian Kirtchev <kirtchev@adacore.com>
3062
3063 * exp_prag.adb (Expand_Old): Set the type of the generated temporary.
3064
3065 2014-02-24 Gary Dismukes <dismukes@adacore.com>
3066
3067 * layout.adb (Layout_Variant_Record): Instantiate
3068 Generic_Check_Choices and call Check_Choices before calling
3069 Build_Discr_Checking_Funcs, since we need Others_Discrete_Choices
3070 set to prevent generating incorrect discriminant-checking
3071 functions for 'others' variants (functions that unconditionally
3072 return True rather than accounting for the values covered by the
3073 'others' choice).
3074 * sem_eval.ads (Subtypes_Statically_Compatible): Add formal
3075 Formal_Derived_Matching.
3076 (Subtypes_Statically_Match): Add formal Formal_Derived_Matching.
3077 * sem_eval.adb (Subtypes_Statically_Compatible): Pass new
3078 Formal_Derived_Matching formal to Subtypes_Statically_Match.
3079 (Subtypes_Statically_Match): Suppress the Object_Size matching
3080 test in the case where Formal_Derived_Matching is True.
3081 * sem_ch12.adb (Validate_Derived_Type_Instance): Pass
3082 True for Formal_Derived_Matching_Formal on the call to
3083 Subtypes_Statically_Compatible.
3084
3085 2014-02-23 Eric Botcazou <ebotcazou@adacore.com>
3086
3087 * gcc-interface/Make-lang.in (ADA_TOOLS_FLAGS_TO_PASS): Robustify.
3088
3089 2014-02-23 Eric Botcazou <ebotcazou@adacore.com>
3090
3091 * gcc-interface/utils2.c (build_simple_component_ref): Fix formatting.
3092 Look through a conversion between original and packable version to get
3093 the base object.
3094 (build_component_ref): Rework comment and fix formatting.
3095
3096 2014-02-20 Sergey Rybin <rybin@adacore.com frybin>
3097
3098 * gnat_ugn.texi, vms_data.ads (gnatelim): Add description of
3099 project-specific options.
3100
3101 2014-02-20 Ed Schonberg <schonberg@adacore.com>
3102
3103 * a-cbdlli.adb (Insert): When capacity exceeded, raise Capacity_Error,
3104 not Constraint_Error.
3105 * a-cbmutr.adb (Append_Child, Insert_Child, Prepend_Child): Ditto.
3106 * sem_ch5.adb: Code clean up.
3107
3108 2014-02-20 Hristian Kirtchev <kirtchev@adacore.com>
3109
3110 * sem_prag.adb (Usage_Error): Remove local
3111 constant Typ. Remove the specialized diagnostics for unconstrained
3112 or tagged items as those are not part of the explicit input set
3113 of the related subprogram and should not be flagged.
3114
3115 2014-02-20 Ed Schonberg <schonberg@adacore.com>
3116
3117 * sem_attr.adb: Add guard to preserve all errors.
3118
3119 2014-02-20 Vincent Celier <celier@adacore.com>
3120
3121 * switch-m.adb (Normalize_Compiler_Switches): Take into account
3122 switches that are recorded in ALI files: -gnateA, -gnateE,
3123 -gnateF, -gnateinn, -gnateu, -gnateV and -gnateY.
3124
3125 2014-02-20 Ed Schonberg <schonberg@adacore.com>
3126
3127 * sem_ch5.adb (Analyze_Iterator_Specification): Check legality
3128 of an element iterator form over a formal container with an
3129 Iterable aspect.
3130 * exp_ch5.adb (Build_Formal_Container_Iteration): Utility
3131 to create declaration and loop statements for both forms of
3132 container iterators.
3133 (Expand_Formal_Container_Element_Iterator): New procedure
3134 to handle loops of the form "for E of C" when C is a formal
3135 container.
3136 (Expand_Formal_Container_Iterator): Code cleanup.
3137
3138 2014-02-20 Hristian Kirtchev <kirtchev@adacore.com>
3139
3140 * sem_prag.adb (Add_Item_To_Name_Buffer): New routine.
3141 (Analyze_Contract_Case): Remove the use of
3142 "may". Replace "aspect Contract_Cases" to avoid categorization
3143 of aspect vs pragma.
3144 (Analyze_External_Property_In_Decl_Part): Remove the use of "formal".
3145 (Analyze_Global_Item): Remove
3146 the use of "formal", specify the subprogram. Split the
3147 error message about a state with visible refinement into
3148 two. Remove the use of "global" from "volatile global item".
3149 (Analyze_Initialization_Item): Ensure that the SPARK RM reference
3150 is on one line.
3151 (Analyze_Input_Output): Update the call to
3152 Check_Mode. Specify the duplicated item. Reword the error
3153 message concerning an input of a null output list. Use "\"
3154 for error message continuation.
3155 (Analyze_Part_Of): Remove
3156 the use of "may". Use "\" for error message continuation.
3157 (Analyze_Refined_Depends_In_Decl_Part): Update the error
3158 message concerning a useless refinement to match the format
3159 of Refined_Global.
3160 (Analyze_Refined_Global_In_Decl_Part): Reword the error message
3161 concerning a useless refinement.
3162 (Analyze_Refinement_Clause): Use "\" for error message continuation.
3163 (Check_Constituent_Usage): Use "\" for error message continuation.
3164 (Check_Dependency_Clause): Use "\" for error message continuation.
3165 (Check_Matching_Constituent): Use "\" for error message continuation.
3166 (Check_Missing_Part_Of): Use "\" for error message continuation.
3167 (Check_Mode): Renamed to
3168 Check_Role. Update the comment on usage. Redo the error reporting
3169 to use Role_Error.
3170 (Check_Mode_Restriction_In_Enclosing_Context): Use "\" for error
3171 message continuation.
3172 (Find_Mode): Renamed to Find_Role. Update the parameter profile along
3173 with comment on usage. Update all occurrences of Is_Input and Is_Output.
3174 (Inconsistent_Mode_Error): Use "\" for error message continuation.
3175 (Input_Match): Use "\" for error message continuation.
3176 (Role_Error): New routine.
3177 (Set_Convention_From_Pragma): Use "\" for error message continuation.
3178 (Usage_Error): Add local variable Error_Msg. Build specialized error
3179 message showcasing the offending item kind. Redo the diagnostics for
3180 unconstrained types.
3181
3182 2014-02-20 Ed Schonberg <schonberg@adacore.com>
3183
3184 * exp_util.adb (Is_Iterated_Container): Use high-level primitives
3185 to determine whether a type is a container type, rather than
3186 examining only its type declaration, so that subtypes and derived
3187 types are handled properly.
3188
3189 2014-02-20 Sergey Rybin <rybin@adacore.com frybin>
3190
3191 * gnat_ugn.texi: gnatmetric: add description of project-specific
3192 options.
3193
3194 2014-02-20 Ed Schonberg <schonberg@adacore.com>
3195
3196 * sem_attr.adb (Analyze_Attribute, case 'Update): Verify that
3197 all choices in an association for a record type have the same
3198 type, as is done for record aggregates.
3199
3200 2014-02-20 Robert Dewar <dewar@adacore.com>
3201
3202 * a-cborma.adb, a-cbhama.adb, a-cbdlli.adb, a-cbmutr.adb: Use pragma
3203 Unmodified rather than Warnings (Off). Make comments
3204 uniform in the four affected units.
3205
3206 2014-02-20 Robert Dewar <dewar@adacore.com>
3207
3208 * sem_ch13.adb (Analyze_Attribute_Definition_Clause, case
3209 Object_Size): For non-scalar types allow any value that is a
3210 multiple of 8.
3211 * gnat_rm.texi: Document Object_Size for composites more clearly.
3212
3213 2014-02-20 Yannick Moy <moy@adacore.com>
3214
3215 * sem_util.ads, sem_util.adb (Default_Initialization): Remove function.
3216
3217 2014-02-20 Ed Schonberg <schonberg@adacore.com>
3218
3219 * stand.ads: Raise_Type: new predefined entity, used as the type
3220 of a Raise_Expression prior to resolution.
3221 * cstand.adb: Build entity for Raise_Type.
3222 * sem_ch11.adb (Analyze_Raise_Expression): use Raise_Type as the
3223 initial type of the node.
3224 * sem_type.adb (Covers): Raise_Type is compatible with all
3225 other types.
3226 * sem_res.adb (Resolve): Remove special handling of Any_Type on
3227 Raise_Expression nodes.
3228 (Resolve_Raise_Expression): Signal ambiguity if the type of the
3229 context is still Raise_Type.
3230
3231 2014-02-20 Robert Dewar <dewar@adacore.com>
3232
3233 * sem_ch12.adb (Validate_Access_Type_Instance): Add message if
3234 mismatching predicates.
3235 * sem_ch6.adb (Check_Conformance): Give better messages on
3236 predicate mismatch.
3237 * sem_eval.adb (Predicates_Match): Move to spec.
3238 * sem_eval.ads (Predicates_Match): Moved here from body.
3239
3240 2014-02-20 Ed Schonberg <schonberg@adacore.com>
3241
3242 * a-cbmutr.adb: Use default value in Insert_Child.
3243
3244 2014-02-20 Vincent Celier <celier@adacore.com>
3245
3246 * gnatcmd.adb, make.adb, prj-makr.adb, clean.adb: Call
3247 Stringt.Initialize in all project aware tools.
3248
3249 2014-02-20 Doug Rupp <rupp@adacore.com>
3250
3251 * gnat_ugn.texi: Document gnatbind -X option.
3252 * vms_data.ads: Minor warnings documentation reformatting.
3253
3254 2014-02-20 Ed Schonberg <schonberg@adacore.com>
3255
3256 * exp_ch3.adb (Expand_Freeze_Array_Type): Only create invariant
3257 procedure for a base type.
3258
3259 2014-02-20 Robert Dewar <dewar@adacore.com>
3260
3261 * sem_ch4.adb (Analyze_Case_Expression): Get type from first
3262 expression with type info.
3263 * sem_ch13.adb: Minor reformatting.
3264 * sem_eval.adb (Subtypes_Statically_Match): Make sure we return
3265 False if predicates do not match on the two types.
3266
3267 2014-02-20 Arnaud Charlet <charlet@adacore.com>
3268
3269 * sem_prag.adb (Analyze_Pragma [pragma Attach_Handler]):
3270 In Relaxed_RM_Semantics mode, allow any static integer value,
3271 for compatibility with other compilers.
3272
3273 2014-02-20 Vincent Celier <celier@adacore.com>
3274
3275 * errutil.adb (Initialize): Properly initialize entry in table
3276 Warnings when warnings are suppressed.
3277
3278 2014-02-20 Robert Dewar <dewar@adacore.com>
3279
3280 * s-os_lib.ads: Add warning about non-portability of Rename_File.
3281 * sem_util.ads, sem_util.adb (Is_Junk_Name): New function.
3282 * sem_warn.adb: Use Is_Junk_Name to suppress some warnings.
3283 * gnat_ugn.texi: Document no warnings on junk variable names.
3284 * layout.adb: Minor code reorganization (use Ekind_In).
3285 * stringt.adb: Move initialization of Null_String_Id to Initialize
3286 routine.
3287
3288 2014-02-20 Ed Schonberg <schonberg@adacore.com>
3289
3290 * sem_ch13.adb: Initialize optional Element_Id.
3291
3292 2014-02-20 Robert Dewar <dewar@adacore.com>
3293
3294 * s-os_lib.ads (Rename_File): Minor commment addition.
3295
3296 2014-02-20 Thomas Quinot <quinot@adacore.com>
3297
3298 * einfo.ads: Minor reformatting.
3299
3300 2014-02-20 Hristian Kirtchev <kirtchev@adacore.com>
3301
3302 * aspects.adb (Exchange_Aspects): New routine.
3303 * aspects.ads (Exchange_Aspects): New routine.
3304 * atree.adb (Rewrite): Do not check whether the save node has
3305 aspects as it never will, instead check the node about to be clobbered.
3306 * einfo.adb (Write_Field25_Name): Abstract_States can appear in
3307 entities of generic packages.
3308 * sem_ch6.adb (Analyze_Expression_Function): Fix the parent
3309 pointer of an aspect specification list after rewriting takes place.
3310 * sem_ch7.adb (Analyze_Package_Body_Helper): Swap the aspect
3311 specifications of the generic template and the copy used for analysis.
3312 * sem_ch12.adb (Analyze_Generic_Package_Declaration): Swap
3313 the aspect specifications of the generic template and the
3314 copy used for analysis.
3315 (Analyze_Package_Instantiation): Propagate the aspect specifications
3316 from the generic template to the instantiation.
3317 (Build_Instance_Compilation_Unit_Nodes): Propagate the aspect
3318 specifications from the generic template to the instantiation.
3319 * sem_ch13.adb (Analyze_Aspect_Specifications): Handle aspects
3320 Abstract_State, Initializes and Initial_Condition when they
3321 apply to a package instantiation.
3322
3323 2014-02-20 Robert Dewar <dewar@adacore.com>
3324
3325 * stringt.adb: Add call to Initialize in package initialization.
3326
3327 2014-02-20 Robert Dewar <dewar@adacore.com>
3328
3329 * a-crbtgk.adb, a-cihama.adb, a-coinve.adb, a-ciorse.adb, a-crbtgo.adb,
3330 a-cidlli.adb, a-cimutr.adb, a-cihase.adb, a-cohama.adb, a-coorse.adb,
3331 a-chtgke.adb, a-chtgop.adb, a-comutr.adb, a-ciorma.adb, a-cobove.adb,
3332 a-convec.adb, a-cohase.adb, a-chtgbk.adb, a-chtgbo.adb: Minor
3333 reformatting.
3334
3335 2014-02-20 Bob Duff <duff@adacore.com>
3336
3337 * s-os_lib.ads: Minor: Remove incorrect comment.
3338
3339 2014-02-20 Robert Dewar <dewar@adacore.com>
3340
3341 * sem_elab.adb (Check_Elab_Assign): Clearer warning message.
3342
3343 2014-02-20 Ed Schonberg <schonberg@adacore.com>
3344
3345 * a-cborma.adb (Assign): When creating a node without a specified
3346 element, insert an uninitialized element in the map, because
3347 the instance may provide an element type with a default
3348 initialization, e.g a scalar with a Default_Value aspect.
3349 * a-cbhama.adb (Assign_Key): Remove useless Allocate procedure.
3350 (Insert): In the version without explicit element, provide an
3351 uninitialized element, as above.
3352 * a-cbdlli.adb (Append): In the version without explicit element,
3353 provide an uninitalized element, as above.
3354 (Allocate): Remove unused version.
3355
3356 2014-02-20 Robert Dewar <dewar@adacore.com>
3357
3358 * sem_elab.adb: Minor code reorganization (use Nkind_In).
3359 * stringt.adb: Remove temporary pragma Warnings (Off).
3360 * stringt.ads: Add pragma Elaborate_Body to ensure initialization
3361 of Null_String_Id.
3362
3363 2014-02-20 Matthew Heaney <heaney@adacore.com>
3364
3365 * a-chtgbk.adb (Replace): Use correct offset when calculating bucket
3366 index.
3367
3368 2014-02-20 Ed Schonberg <schonberg@adacore.com>
3369
3370 * sem_ch5.adb (Analyze_Iterator_Specification): Initialize
3371 properly the cursor type for subsequent volatile testing in SPARK
3372 mode, when domain is a formal container with an Iterabe aspect.
3373
3374 2014-02-20 Robert Dewar <dewar@adacore.com>
3375
3376 * errout.adb (Set_Warnings_Mode_Off): Add Reason argument.
3377 (Set_Specific_Warning_Off): Add Reason argument.
3378 * errout.ads (Set_Warnings_Mode_Off): Add Reason argument.
3379 (Set_Specific_Warning_Off): Add Reason argument.
3380 * erroutc.adb (Warnings_Entry): Add Reason field
3381 (Specific_Warning_Entry): Add Reason field.
3382 (Warnings_Suppressed): return String_Id for Reason.
3383 (Warning_Specifically_Suppressed): return String_Id for Reason.
3384 * erroutc.ads (Warnings_Entry): Add Reason field.
3385 (Specific_Warning_Entry): Add Reason field.
3386 (Set_Specific_Warning_Off): Add Reason argument.
3387 (Set_Warnings_Mode_Off): Add Reason argument.
3388 (Warnings_Suppressed): return String_Id for Reason.
3389 (Warning_Specifically_Suppressed): return String_Id for Reason.
3390 * errutil.adb (Warnings_Suppressed): returns String_Id for Reason
3391 (Warning_Specifically_Suppressed): returns String_Id for Reason
3392 * gnat_rm.texi: Document that Warning parameter is string literal
3393 or a concatenation of string literals.
3394 * par-prag.adb: New handling for Reason argument.
3395 * sem_prag.adb (Analyze_Pragma, case Warning): New handling
3396 for Reason argument.
3397 * sem_util.ads, sem_util.adb (Get_Reason_String): New procedure.
3398 * sem_warn.ads (Warnings_Off_Entry): Add reason field.
3399 * stringt.adb: Set Null_String_Id.
3400 * stringt.ads (Null_String_Id): New constant.
3401
3402 2014-02-20 Robert Dewar <dewar@adacore.com>
3403
3404 * einfo.ads: Minor comment addition: Etype of package is
3405 Standard_Void_Type.
3406 * checks.adb, exp_aggr.adb, exp_atag.adb, exp_attr.adb, exp_ch13.adb,
3407 exp_ch2.adb, exp_ch3.adb, exp_ch4.adb, exp_ch5.adb, exp_ch6.adb,
3408 exp_ch7.adb, exp_ch9.adb, exp_dbug.adb, exp_disp.adb, exp_imgv.adb,
3409 exp_intr.adb, exp_prag.adb, exp_sel.adb, exp_strm.adb, exp_util.adb,
3410 freeze.adb, rtsfind.adb, sem_aggr.adb, sem_attr.adb, sem_ch10.adb,
3411 sem_ch12.adb, sem_ch13.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
3412 sem_ch6.adb, sem_ch8.adb, sem_dim.adb, sem_prag.adb, sem_res.adb,
3413 sem_util.adb, tbuild.adb, tbuild.ads: Remove New_Reference_To.
3414 Replace all calls with calls to New_Occurrence_Of.
3415
3416 2014-02-20 Robert Dewar <dewar@adacore.com>
3417
3418 * par-util.adb (Ignore, case of right paren): Make this a
3419 serious error.
3420
3421 2014-02-19 Robert Dewar <dewar@adacore.com>
3422
3423 * sem_ch5.adb, sem_prag.adb, sem_attr.adb: Minor reformatting.
3424 * debug.adb: Remove -gnatd.X switch, no longer used.
3425 * styleg.adb (Check_Then): Remove check of -gnatd.X, check is
3426 now always made.
3427
3428 2014-02-19 Bob Duff <duff@adacore.com>
3429
3430 * g-socket.ads: Minor: Correct some comments.
3431
3432 2014-02-19 Ed Schonberg <schonberg@adacore.com>
3433
3434 * sem_ch5.adb: Inhibit iterator rewriting in ASIS mode.
3435
3436 2014-02-19 Arnaud Charlet <charlet@adacore.com>
3437
3438 * sem_ch13.adb (Analyze_Aspect_Specifications): Do not generate
3439 an error on out of range priorities if Relaxed_RM_Semantics.
3440 * sem_prag.adb (Analyze_Pragma): Ditto.
3441
3442 2014-02-19 Bob Duff <duff@adacore.com>
3443
3444 * sem_attr.adb (Resolve_Attribute): Detect the case of F'Access
3445 where F denotes the renaming of an enumeration literal, and
3446 issue a specialized error message.
3447
3448 2014-02-19 Matthew Heaney <heaney@adacore.com>
3449
3450 * a-chtgop.ads (Checked_Index): New operation.
3451 (Next): Changed mode of hash table.
3452 * a-chtgop.adb (Adjust, Delete_Node_Sans_Free): Detect tampering
3453 (Generic_Read, Reserve_Capacity): Ditto.
3454 (Generic_Equal): Detect tampering.
3455 (Next): Changed mode of hash table, detect tampering.
3456 * a-chtgke.ads (Checked_Index, Checked_Equivalent_Keys): New
3457 operation.
3458 (Find): Changed mode of hash table.
3459 * a-chtgke.adb (Checked_Equivalent_Keys): New operation
3460 (Delete_Key_Sans_Free, Generic_Conditional_Insert): Detect
3461 tampering.
3462 (Find): Changed mode of hash table, check for tampering.
3463 (Generic_Replace_Element): Check for tampering.
3464 * a-chtgbk.ads (Checked_Index, Checked_Equivalent_Keys): New operation.
3465 * a-chtgbk.adb (Checked_Index, Checked_Equivalent_Keys): New
3466 operation (Delete_Key_Sans_Free, Generic_Conditional_Insert):
3467 Detect tampering.
3468 (Find, Generic_Replace_Element): Check for tampering.
3469 * a-chtgbo.ads (Checked_Index): New operation.
3470 * a-chtgbo.adb (Checked_Index): New operation
3471 (Delete_Node_Sans_Free, Generic_Equal): Detect tampering.
3472 (Generic_Read, Next): Ditto.
3473 * a-cohase.adb, a-cihase.adb (Is_In): Changed mode of hash
3474 table (Difference, Intersection): Use variable view of
3475 source, detect tampering (Find, Is_Subset, Overlap): Use
3476 variable view of container (Symmetric_Difference, Union):
3477 Detect tampering (Vet): Use Checked_Index to detect tampering
3478 (Constant_Reference, Element, Find): Use variable view of
3479 container.
3480 (Update_Element_Preserving_Key): Detect tampering.
3481 * a-cbhase.adb (Difference, Find, Is_In): Use variable view
3482 of container.
3483 (Is_Subset): Ditto.
3484 (Equivalent_Sets, Overlap): Use Node's Next component.
3485 (Vet): Use Checked_Index to detect tampering.
3486 (Constant_Reference, Element, Find): Use variable view of container.
3487 (Update_Element_Preserving_Key): Detect tampering.
3488 * a-cohama.adb, a-cihama.adb, a-cbhama.adb (Constant_Reference,
3489 Element, Find): Use variable view of container.
3490 (Reference): Rename hash table component.
3491 (Vet): Use Checked_Index to detect tampering.
3492
3493 2014-02-19 Arnaud Charlet <charlet@adacore.com>
3494
3495 * adabkend.adb (Scan_Compiler_Arguments): Add missing handling
3496 of -nostdinc.
3497
3498 2014-02-19 Thomas Quinot <quinot@adacore.com>
3499
3500 * tbuild.adb (New_Occurrence_Of, New_Rerefence_To): Guard
3501 against calls without Def_Id.
3502
3503 2014-02-19 Claire Dross <dross@adacore.com>
3504
3505 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads, a-cforse.ads,
3506 a-cofove.ads: Add global annotations to subprograms.
3507
3508 2014-02-19 Hristian Kirtchev <kirtchev@adacore.com>
3509
3510 * sem_prag.adb (Analyze_Initial_Condition_In_Decl_Part): Remove
3511 constants Errors, Pack_Id and Pack_Init. Remove variable Vars.
3512 Initial_Condition no longer requires the presence of pragma
3513 Initialized. Do not try to diagnose whether all variables mentioned in
3514 pragma Initializes also appear in Initial_Condition.
3515 (Collect_Variables): Removed.
3516 (Match_Variable): Removed.
3517 (Match_Variables): Removed.
3518 (Report_Unused_Variables): Removed.
3519
3520 2014-02-19 Thomas Quinot <quinot@adacore.com>
3521
3522 * gnat_rm.texi (pragma Stream_Convert): Minor rewording.
3523
3524 2014-02-19 Robert Dewar <dewar@adacore.com>
3525
3526 * sem_util.adb, sem_util.ads, prj-conf.adb, s-os_lib.adb: Minor
3527 reformatting.
3528
3529 2014-02-19 Vincent Celier <celier@adacore.com>
3530
3531 * prj-part.adb (Parse_Single_Project): Use the fully resolved
3532 project path, with all symbolic links resolved, to check if the
3533 same project is imported with a different unresolved path.
3534 * prj-tree.ads (Project_Name_And_Node): Component Canonical_Path
3535 changed to Resolved_Path to reflect that all symbolic links
3536 are resolved.
3537
3538 2014-02-19 Ed Schonberg <schonberg@adacore.com>
3539
3540 * sem_util.ads, sem_util.adb (Get_Cursor_Type): Moved to sem_util
3541 from sem_ch13, for use elsewhere.
3542 * sem_ch13.adb (Get_Cursor_Type): Moved to sem_util.
3543 * sem_ch5.adb (Analyze_Iterator_Specification): Set properly the
3544 cursor type on the loop variable when the iteration is over o
3545 formal container.
3546
3547 2014-02-19 Vincent Celier <celier@adacore.com>
3548
3549 * prj-conf.adb (Add_Default_GNAT_Naming_Scheme): Add declaration
3550 for an empty Target (Check_Target): Never fail when an empty
3551 target is declared in the configuration project.
3552
3553 2014-02-19 Ed Schonberg <schonberg@adacore.com>
3554
3555 * sem_prag.adb (Check_Arg_Is_Local_Name): Argument is local if
3556 the pragma comes fron a predicate aspect and the context is a
3557 record declaration within the scope that declares the type.
3558
3559 2014-02-19 Robert Dewar <dewar@adacore.com>
3560
3561 * gnat_rm.texi: Minor clarifications.
3562 * expander.adb, sem_aggr.adb: Add comments.
3563
3564 2014-02-19 Ed Schonberg <schonberg@adacore.com>
3565
3566 * sem_prag.adb (Check_Arg_Is_Local_Name): For an aspect that
3567 applies to a subprogram body, the name is the current scope,
3568 rather than being declared in the current scope.
3569 (Analyze_Pragma, case No_Return): Handle properly a No_Return
3570 aspect applied to a subprogram body.
3571
3572 2014-02-19 Ed Schonberg <schonberg@adacore.com>
3573
3574 * sem_ch13.adb (Resolve_Iterable_Operation): Improve resolution
3575 of overloaded subprograms, and fix bug in handling of primitive
3576 operation Element.
3577
3578 2014-02-19 Pascal Obry <obry@adacore.com>
3579
3580 * s-os_lib.adb: Minor reformatting.
3581
3582 2014-02-19 Yannick Moy <moy@adacore.com>
3583
3584 * expander.adb (Expand): Do nothing inside generics.
3585 * sem_aggr.adb (Aggregate_Constraint_Checks): Do nothing inside
3586 generics.
3587
3588 2014-02-19 Yannick Moy <moy@adacore.com>
3589
3590 * exp_ch2.adb: Remove useless 'with' of unit Uintp.
3591
3592 2014-02-19 Robert Dewar <dewar@adacore.com>
3593
3594 * sem_ch3.adb, style.adb, sem_prag.adb, sem_ch13.adb: Minor reformatting
3595 * a-sequio.adb: Remove useless pragma Extensions_Allowed (no
3596 longer needed).
3597
3598 2014-02-19 Claire Dross <dross@adacore.com>
3599
3600 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
3601 a-cforse.ads, a-cofove.ads: Add Iterable aspect to formal containers.
3602
3603 2014-02-19 Hristian Kirtchev <kirtchev@adacore.com>
3604
3605 * sem_ch3.adb (Analyze_Declarations): Analyze
3606 a package contract at the end of the private declarations (if
3607 applicable), otherwise analyze it and the end of the visible
3608 declarations.
3609
3610 2014-02-19 Ed Schonberg <schonberg@adacore.com>
3611
3612 * style.adb (Missing_Overriding): If subprogram is an
3613 instantiation, place warning on the instance node itself,
3614 without mention of the original generic. Do not emit message
3615 if explicit Ada version is older than the introduction of the
3616 overriding indicator.
3617
3618 2014-02-19 Yannick Moy <moy@adacore.com>
3619
3620 * gnat_rm.texi: Doc clarifications.
3621
3622 2014-02-19 Yannick Moy <moy@adacore.com>
3623
3624 * exp_util.adb (Remove_Side_Effects): Do not remove side-effects
3625 inside a generic.
3626
3627 2014-02-19 Ed Schonberg <schonberg@adacore.com>
3628
3629 * sem_ch13.adb (Get_Cursor_Type): Obtain cursor type from
3630 specified First primitive, rather than by name.
3631 (Validate_Iterable_Aspect, Resolve_Iterable_Operation): Use it,
3632 and extend error checking for missing primitives and incorrect
3633 signatures.
3634
3635 2014-02-19 Ed Schonberg <schonberg@adacore.com>
3636
3637 * sem_ch3.adb (Check_Pragma_Implemented): Detect additional
3638 errors when a Synchronization aspect on an overriding protected
3639 operation does not match the given aspect on the overridden
3640 operation of an ancestor interface.
3641
3642 2014-02-19 Hristian Kirtchev <kirtchev@adacore.com>
3643
3644 * sem_prag.adb (Check_Loop_Pragma_Grouping): New routine.
3645 (Check_Loop_Pragma_Placement): Update
3646 comment on usage. Remove local variables Orig_Stmt and
3647 Within_Same_Sequence. Check that the current Loop_Invariant or
3648 Loop_Variant pragma is grouped together with other such pragmas.
3649 (Is_Loop_Pragma): New routine.
3650 (Prev_In_Loop): Removed.
3651
3652 2014-02-19 Robert Dewar <dewar@adacore.com>
3653
3654 * par-ch6.adb (P_Return): For extended return, end column lines
3655 up with RETURN.
3656 * par.adb: Minor documentation clarification.
3657
3658 2014-02-19 Yannick Moy <moy@adacore.com>
3659
3660 * sem_prag.adb (Check_Loop_Pragma_Placement): Add check
3661 that Loop_Invariant and Loop_Variant appear consecutively.
3662 * gnat_rm.texi Update documentation of Loop_Invariant and
3663 Loop_Variant pragmas.
3664
3665 2014-02-19 Robert Dewar <dewar@adacore.com>
3666
3667 * debug.adb: Document -gnatd.X.
3668 * par-ch5.adb (P_If_Statement): Always check THEN, even if not
3669 first token
3670 (Check_Then_Column): Ditto.
3671 * styleg.adb (Check_Then): Allow THEN on line after IF.
3672 (Check_Then): Check THEN placement under control of -gnatd.X
3673 * styleg.ads (Check_Then): Now called even if THEN is not first
3674 token on line.
3675 * stylesw.ads (Style_Check_If_Then_Layout): Document new
3676 relaxed rules.
3677 * gnat_ugn.texi: For -gnatyi, THEN can now be on line after IF.
3678
3679 2014-02-19 Robert Dewar <dewar@adacore.com>
3680
3681 * a-cfhama.adb, a-cfhase.adb, a-cforse.adb, a-cofove.adb, a-ngcefu.adb,
3682 a-teioed.adb, a-wtedit.adb, a-ztedit.adb, exp_ch5.adb, inline.adb,
3683 prj-pp.adb, prj-tree.adb, sem_ch12.adb, sem_ch8.adb,
3684 vms_conv.adb: Fix bad layout of IF statements
3685
3686 2014-02-19 Robert Dewar <dewar@adacore.com>
3687
3688 * exp_util.adb (Side_Effect_Free): Scalar if expressions can be SEF.
3689
3690 2014-02-19 Robert Dewar <dewar@adacore.com>
3691
3692 * exp_util.adb: Update comments.
3693
3694 2014-02-19 Doug Rupp <rupp@adacore.com>
3695
3696 * bindgen.adb (Gen_Adainit) [VMS] New global Float_Format.
3697 * init.c (__gl_float_format): [VMS] New global.
3698 (__gnat_set_features): Call FP_CONTROL to set FPSR for the float
3699 representation in effect.
3700
3701 2014-02-19 Hristian Kirtchev <kirtchev@adacore.com>
3702
3703 * exp_ch6.adb Add with and use clause for Exp_Prag.
3704 (Expand_Contract_Cases): Relocated to Exp_Prag.
3705 * exp_ch6.ads (Expand_Contract_Cases): Relocated to Exp_Prag.
3706 * exp_prag.adb Add with and use clauses for Checks and Validsw.
3707 (Expand_Contract_Cases): Relocated from Exp_Ch6. Update the
3708 structure of the expanded code to showcase the evaluation of
3709 attribute 'Old prefixes. Add local variable Old_Evals. Expand
3710 any attribute 'Old references found within a consequence. Add
3711 circuitry to evaluate the prefixes of attribute 'Old that
3712 belong to a selected consequence.
3713 (Expand_Old_In_Consequence): New routine.
3714 * exp_prag.ads (Expand_Contract_Cases): Relocated from Exp_Ch6.
3715 * sem_attr.adb (Check_Use_In_Contract_Cases): Warn that a
3716 potentially unevaluated prefix is always evaluated.
3717
3718 2014-02-19 Robert Dewar <dewar@adacore.com>
3719
3720 * exp_attr.adb (Expand_Min_Max_Attribute): Use Insert_Declaration
3721 (Expand_Min_Max_Attribute): Use Matching_Standard_Type.
3722 * exp_ch4.adb (Expand_N_Expression_With_Actions): Remove special
3723 handling for the case of Modify_Tree_For_C, this approach did
3724 not work.
3725 * exp_util.adb (Matching_Standard_Type): New function
3726 (Side_Effect_Free): New top level functions (from
3727 Remove_Side_Effects).
3728 * exp_util.ads (Side_Effect_Free): New top level functions
3729 (moved from body).
3730 * sinfo.ads: Minor comment updates.
3731
3732 2014-02-19 Ed Schonberg <schonberg@adacore.com>
3733
3734 * exp_ch6.adb (Expand_Simple_Function_Return): If return
3735 type is unconstrained and uses the secondary stack, mark the
3736 enclosing function accordingly, to ensure that the value is not
3737 prematurely removed.
3738
3739 2014-02-19 Hristian Kirtchev <kirtchev@adacore.com>
3740
3741 * par.adb Alphabetize the routines in Par.Sync.
3742 (Resync_Past_Malformed_Aspect): New routine.
3743 * par-ch13.adb (Get_Aspect_Specifications): Alphabetize local
3744 variables. Code and comment reformatting. Detect missing
3745 parentheses on aspects [Refined_]Global and [Refined_]Depends
3746 with a non-null definition.
3747 * par-sync.adb: Alphabetize all routines in this separate unit.
3748 (Resync_Past_Malformed_Aspect): New routine.
3749
3750 2014-02-19 Robert Dewar <dewar@adacore.com>
3751
3752 * sem_eval.ads, sem_eval.adb (Subtypes_Statically_Match): Return False
3753 if Esize values do not match.
3754
3755 2014-02-19 Yannick Moy <moy@adacore.com>
3756
3757 * sinfo.ads: Minor comment update.
3758
3759 2014-02-19 Hristian Kirtchev <kirtchev@adacore.com>
3760
3761 * atree.ads: Minor reformatting (change Entity_Info to Einfo).
3762
3763 2014-02-19 Thomas Quinot <quinot@adacore.com>
3764
3765 * exp_ch7.adb (Find_Node_To_Be_Wrapped): An assignment statement
3766 that has the No_Ctrl_Actions flag is a suitable node to be
3767 wrapped if the assigned expression has no finalization actions.
3768 * sem_eval.adb (Eval_Entity_Name): For a compile time known
3769 boolean value, mark the corresponding condition SCO as constant.
3770
3771 2014-02-19 Robert Dewar <dewar@adacore.com>
3772
3773 * exp_util.adb: Minor reformatting.
3774 * exp_util.ads (Matching_Standard_Type): New function.
3775 * exp_ch7.adb: Minor reformatting.
3776
3777 2014-02-19 Ed Schonberg <schonberg@adacore.com>
3778
3779 * sem_ch13.adb (Get_Cursor_Type): Use scope of iterable type
3780 to find declaration for Cursor, to handle properly the case of
3781 a discriminated iterable type.
3782
3783 2014-02-19 Vincent Celier <celier@adacore.com>
3784
3785 * gnatcmd.adb (GNATCmd): Always replace the object dirs of
3786 imported library projects with the library ALI dirs, when setting
3787 the object paths.
3788 * prj-env.ads (Ada_Objects_Path): Correct comments about
3789 argument Including_Libraries.
3790
3791 2014-02-19 Gary Dismukes <dismukes@adacore.com>
3792
3793 * gnat_rm.texi: Minor spelling fixes.
3794
3795 2014-02-19 Doug Rupp <rupp@adacore.com>
3796
3797 * init.c: Remove unneeded code.
3798 * fe.h (Float_Format): New macro
3799 * gcc-interface/trans.c (gigi): On VMS, set vms_float_format.
3800
3801 2014-02-19 Hristian Kirtchev <kirtchev@adacore.com>
3802
3803 * sem_prag.adb (Check_Refined_Global_Item):
3804 A state or variable acts as a constituent only it is part of an
3805 encapsulating state and the state has visible refinement.
3806
3807 2014-02-19 Ed Schonberg <schonberg@adacore.com>
3808
3809 * sem_ch6.adb (Analyze_Subprogram_Contract): Do not warn on a
3810 postcondition for a function when the expression does not mention
3811 'Result but the function has in-out parameters.
3812
3813 2014-02-19 Robert Dewar <dewar@adacore.com>
3814
3815 * gnat_rm.texi: Add documentation on Value_Size forcing biased
3816 representation.
3817
3818 2014-02-19 Hristian Kirtchev <kirtchev@adacore.com>
3819
3820 * lib-xref.ads Remove the small table of letter and symbol usage as we
3821 already have one.
3822
3823 2014-02-19 Hristian Kirtchev <kirtchev@adacore.com>
3824
3825 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Emit specific error
3826 messages depending on the offending misplaced aspect specifications.
3827 (Diagnose_Misplaced_Aspect_Specifications): New routine.
3828
3829 2014-02-19 Ed Schonberg <schonberg@adacore.com>
3830
3831 * sem_ch13.adb (Get_Cursor): Utility to retrieve cursor type
3832 for iterable aspect primitives.
3833 (Resolve_Iterable_Operation): Use expected signature of iterable
3834 aspect to resolve primitive when overloading is present.
3835 (Validate_Iterable_Aspect, Analyze_Aspects_At_Freeze_Point): use it.
3836 (Check_Signature): Removed.
3837
3838 2014-02-19 Yannick Moy <moy@adacore.com>
3839
3840 * sem_ch10.adb (Analyze_Proper_Body): Issue error on missing
3841 subunit in GNATprove_Mode.
3842 * sinfo.ads (GNATprove_Mode): Document error issued in GNATprove_Mode.
3843
3844 2014-02-19 Hristian Kirtchev <kirtchev@adacore.com>
3845
3846 * lib-xref.ads Alphabetize the contents of table
3847 Xref_Entity_Letters. Add an entry in table Xref_Entity_Letters
3848 for E_Abstract_State. List all letters and symbols in use.
3849 * sem_prag.adb (Analyze_Abstract_State): Update all calls
3850 to Create_Abstract_State to reflect the new signature.
3851 (Create_Abstract_State): Change subprogram profile and update
3852 the comment on usage. Use the proper location of the state
3853 declaration when creating a new abstract state entity. Do not
3854 generate an external name, but simply reuse the name coming from
3855 the state declaration.
3856
3857 2014-02-19 Robert Dewar <dewar@adacore.com>
3858
3859 * exp_ch4.adb (Expand_N_Expression_With_Actions): Make sure
3860 declarations get properly inserted in Modify_Tree_For_C mode.
3861 * sinfo.ads: Minor comment addition.
3862
3863 2014-02-19 Robert Dewar <dewar@adacore.com>
3864
3865 * par-ch9.adb, exp_ch5.adb, sem_ch5.adb, exp_attr.adb, sem_util.adb,
3866 sem_util.ads, sem_ch13.adb, sem_ch13.ads: Minor reformatting.
3867
3868 2014-02-19 Ed Schonberg <schonberg@adacore.com>
3869
3870 * style.adb (Missing_Overriding): Warning does not apply in
3871 language versions prior to Ada 2005.
3872 * snames.ads-tmpl: Add Name_Iterable and Attribute_Iterable.
3873 * sem_attr.adb: Add Attribute_Iterable where needed.
3874 * exp_attr.adb: ditto.
3875 * exp_ch5.adb (Expand_Formal_Container_Loop): New procedure to
3876 handle loops and quantified expressions over types that have an
3877 iterable aspect. Called from Expand_Iterator_Loop.
3878 * sem_ch5.adb (Analyze_Iterator_Specification): Recognize types
3879 with Iterable aspect.
3880 * sem_ch13.adb (Validate_Iterable_Aspect): Verify that the
3881 subprograms specified in the Iterable aspect have the proper
3882 signature involving container and cursor.
3883 (Check_Aspect_At_Freeze_Point): Analyze value of iterable aspect.
3884 * sem_ch13.ads (Validate_Iterable_Aspect): New subprogram.
3885 * sem_util.ads, sem_util.adb (Get_Iterable_Type_Primitive):
3886 New procedure to retrieve one of the primitives First, Last,
3887 or Has_Element, from the value of the iterable aspect of a
3888 formal container.
3889 (Is_Container_Element): Predicate to recognize expressions
3890 that denote an element of one of the predefined containers,
3891 for possible optimization. This subprogram is not currently
3892 used, pending ARG discussions on the legality of the proposed
3893 optimization. Worth preserving for eventual use.
3894 (Is_Iterator): Recognize formal container types.
3895 * aspects.ads, aspects.adb: Add Aspect_Iterable where needed.
3896
3897 2014-02-19 Robert Dewar <dewar@adacore.com>
3898
3899 * exp_attr.adb (Expand_Min_Max_Attribute): New procedure
3900 (Expand_N_Attribute_Reference): Use this procedure for Min and Max.
3901 * exp_ch4.adb (Expand_N_Expression_With_Actions): Remove object
3902 declarations from list of actions.
3903 * output.ads, output.adb (Delete_Last_Char): New procedure.
3904 * sinfo.ads: Document handling of Mod and expression with actions
3905 in Modify_Tree_For_C mode.
3906
3907 2014-02-19 Ed Schonberg <schonberg@adacore.com>
3908
3909 * par-ch9.adb (P_Task): Add a null statement to produce a
3910 well-formed task body when due to a previous syntax error the
3911 statement list is empty.
3912
3913 2014-02-19 Hristian Kirtchev <kirtchev@adacore.com>
3914
3915 * sem_prag.adb (Check_Dependency_Clause): Account
3916 for the case where a state with a non-null refinement matches a
3917 null output list. Comment reformatting.
3918 (Inputs_Match): Copy a solitary input to avoid an assertion failure
3919 when trying to match the same input in multiple clauses.
3920
3921 2014-02-19 Gary Dismukes <dismukes@adacore.com>
3922
3923 * sem_attr.adb: Minor typo fix.
3924
3925 2014-02-18 Robert Dewar <dewar@adacore.com>
3926
3927 * cstand.adb (Build_Signed_Integer_Type): Minor change of formal
3928 from Int to Nat (Build_Unsigned_Integer_Type): New procedure
3929 (Create_Standard): Create new unsigned types.
3930 * exp_ch4.adb (Expand_N_Op_Mod): Expand mod in Modify_Tree_For_C
3931 mode (Expand_N_Reference): Removed, problematic and not needed
3932 for now.
3933 * exp_ch4.ads (Expand_N_Reference): Removed, problematic and
3934 not needed for now.
3935 * exp_util.ads, exp_util.adb (Power_Of_Two): New function.
3936 * expander.adb: Remove call to Expand_N_Reference (problematic,
3937 and not needed now).
3938 * sem_aux.ads, sem_aux.adb (Corresponding_Unsigned_Type): New function.
3939 * stand.adb: Read and write unsigned type entities.
3940 * stand.ads: Add new unsigned types.
3941
3942 2014-02-18 Hristian Kirtchev <kirtchev@adacore.com>
3943
3944 * sem_ch4.adb (Analyze_Call): Do not mark a function call
3945 as being inside an assertion expression as the flag is now removed.
3946 (Check_Ghost_Subprogram_Call): Do not query the
3947 In_Assertion_Expression flag as it is now removed, instead use
3948 a predicate function.
3949 * sem_elab.adb (Check_Internal_Call_Continue): Do not query the
3950 In_Assertion_Expression flag as it is now removed, instead use
3951 a predicate function.
3952 * sem_prag.ads: Add new table Assertion_Expression_Pragma.
3953 * sem_util.adb Add with and use clause for Sem_Prag.
3954 (In_Assertion_Expression_Pragma): New routine.
3955 * sem_util.ads (In_Assertion_Expression_Pragma): New routine.
3956 * sinfo.adb (In_Assertion_Expression): Removed.
3957 (Set_In_Assertion_Expression): Removed.
3958 * sinfo.ads Remove flag In_Assertion_Expression along with its
3959 use in nodes.
3960 (In_Assertion_Expression): Removed along with
3961 pragma Inline. (Set_In_Assertion_Expression): Removed along
3962 with pragma Inline.
3963
3964 2014-02-18 Sergey Rybin <rybin@adacore.com frybin>
3965
3966 * gnat_ugn.texi: gnatpp section: add note that '-j' cannot be
3967 used together with '-r', '-rf' or '-rnb' options.
3968
3969 2014-02-18 Hristian Kirtchev <kirtchev@adacore.com>
3970
3971 * sem_attr.adb (Analyze_Attribute): Comment
3972 and code reformatting. Use separate routines to check the
3973 legality of attribute 'Old in certain pragmas. Verify
3974 the use of 'Old, 'Result and locally declared entities
3975 within the prefix of 'Old.
3976 (Check_References_In_Prefix): New routine.
3977 (Check_Use_In_Contract_Cases): New routine.
3978 (Check_Use_In_Test_Case): New routine.
3979
3980 2014-02-18 Vincent Celier <celier@adacore.com>
3981
3982 * sem_aux.adb (Is_By_Reference_Type): For each components of
3983 a record type, check also if the component is volatile as it
3984 may have an aspect that makes it volatile. If it is, then the
3985 record type is a by reference type.
3986
3987 2014-02-18 Robert Dewar <dewar@adacore.com>
3988
3989 * exp_attr.adb: Minor reformatting.
3990 * exp_ch4.ads, exp_ch4.adb (Expand_N_Reference): New procedure.
3991 * exp_util.adb (Remove_Side_Effects): Add conditional expressions
3992 as another case where we don't generate N_Reference nodes for
3993 primitive types.
3994 * expander.adb (Expand): Add call to Expand_N_Reference.
3995
3996 2014-02-06 Hristian Kirtchev <kirtchev@adacore.com>
3997
3998 * sem_prag.adb (Analyze_Refined_Pragma): Remove
3999 local variable Pack_Spec. Refinement pragmas may now apply to
4000 bodies of both visible and private subprograms.
4001
4002 2014-02-06 Robert Dewar <dewar@adacore.com>
4003
4004 * exp_attr.adb (Expand_Loop_Entry_Attribute):
4005 Minor change (Attr => N) (Expand_Pred_Succ): New name
4006 Expand_Pred_Succ_Attribute (Expand_N_Attribute_Reference, case
4007 Max): Expand into if expression if Modify_Tree_For_C mode.
4008 (Expand_N_Attribute_Reference, case Min): ditto
4009 * sinfo.ads: Modify_Tree_For_C takes care of expanding Min and
4010 Max attributes.
4011
4012 2014-02-06 Ed Schonberg <schonberg@adacore.com>
4013
4014 * sem_ch3.adb (Analyze_Object_Declaration): Do not generate
4015 predicate check if this is an internal declaration with
4016 No_Initialization set, as for an expanded aggregate component.
4017
4018 2014-02-06 Doug Rupp <rupp@adacore.com>
4019
4020 * init.c (__gnat_default_resignal_p) [VMS]: Test for and resignal
4021 conditions with severity of "SUCCESS" or "INFORMATIONAL".
4022
4023 2014-02-06 Yannick Moy <moy@adacore.com>
4024
4025 * sem_prag.adb (Analyze_Pragma): Analyze pragma
4026 Debug rewritten node before rewriting it as a null statement in
4027 GNATprove mode.
4028
4029 2014-02-06 Robert Dewar <dewar@adacore.com>
4030
4031 * sem_attr.adb (Min_Max): New procedure.
4032 (Max_Alignment_For_Allocation_Max_Size_In_Storage_Elements): New
4033 procedure.
4034
4035 2014-02-06 Sergey Rybin <rybin@adacore.com frybin>
4036
4037 * gnat_ugn.texi, vms_data.ads: Add documentation of '-t' option for
4038 gnatmetric/gnatpp.
4039
4040 2014-02-06 Hristian Kirtchev <kirtchev@adacore.com>
4041
4042 * sem_prag.adb (Analyze_Abstract_State): Update
4043 all calls to Create_Abstract_State to pass the proper state
4044 "declaration".
4045 (Create_Abstract_State): Add new formal parameter
4046 State_Decl along with comment on usage. Establish a link between
4047 the abstract state entity and the state declaration.
4048
4049 2014-02-06 Robert Dewar <dewar@adacore.com>
4050
4051 * sem_attr.adb (Analyze_Attribute, case Max): Check for improper
4052 comparison of unordered enumeration type.
4053 (Analyze_Attribute, case Max): Check for improper comparison of
4054 unordered enumeration type.
4055 * sem_res.adb (Bad_Unordered_Enumeration_Reference): Moved to
4056 sem_util.adb.
4057 * sem_util.ads, sem_util.adb (Bad_Unordered_Enumeration_Reference):
4058 Moved here from Sem_Res.
4059
4060 2014-02-06 Robert Dewar <dewar@adacore.com>
4061
4062 * sem_ch3.adb, sem_prag.adb, sem_res.adb, lib-xref.adb: Minor
4063 reformatting.
4064
4065 2014-02-06 Hristian Kirtchev <kirtchev@adacore.com>
4066
4067 * sem_ch6.adb (Process_Formals): Error message reformatting.
4068
4069 2014-02-06 Hristian Kirtchev <kirtchev@adacore.com>
4070
4071 * sem_ch3.adb (Handle_Late_Controlled_Primitive): Add local
4072 variable Spec. Do not inherit the null indicator from the
4073 subprogram body when generating the spec.
4074
4075 2014-02-06 Robert Dewar <dewar@adacore.com>
4076
4077 * casing.adb (Determine_Casing): Consider SPARK_Mode to be
4078 mixed case.
4079
4080 2014-02-06 Ed Schonberg <schonberg@adacore.com>
4081
4082 * exp_ch6.adb (Is_Build_In_Place_Function): Predicate is false
4083 when the function has a foreign convention, but not if only the
4084 limited return type has such a convention.
4085
4086 2014-02-06 Hristian Kirtchev <kirtchev@adacore.com>
4087
4088 * sem_ch3.adb (Handle_Late_Controlled_Primitive): Remove local
4089 variable Spec. Comment reformatting. Use Copy_Separate_Tree
4090 rather than New_Copy_Tree when building the corresponding
4091 subprogram declaration.
4092
4093 2014-02-06 Hristian Kirtchev <kirtchev@adacore.com>
4094
4095 * sem_prag.adb (Analyze_Global_Item): Remove
4096 the mode-related checks on abstract states with enabled external
4097 properties.
4098 (Property_Error): Removed.
4099
4100 2014-02-06 Javier Miranda <miranda@adacore.com>
4101
4102 * lib-xref.adb (Generate_Reference): When
4103 generating the reference to the first private entity take care
4104 of handling swapped entities.
4105
4106 2014-02-06 Sergey Rybin <rybin@adacore.com frybin>
4107
4108 * gnat_ugn.texi, vms_data.ads: Add documentation of -j option for
4109 gnatmetric.
4110
4111 2014-02-06 Robert Dewar <dewar@adacore.com>
4112
4113 * exp_ch4.adb (Expand_N_Shift_Left): Handle shift counts greater
4114 than the word size when operating in Modify_Tree_For_C mode.
4115 * sinfo.ads: Add documentation section on Modify_Tree_For_C mode.
4116
4117 2014-02-06 Robert Dewar <dewar@adacore.com>
4118
4119 * erroutc.adb (Warning_Specifically_Suppressed.Matches):
4120 compare is case insensitive.
4121 * gnat_rm.texi: Document that string compare for Warnings Off
4122 is now case insensitive.
4123
4124 2014-02-06 Eric Botcazou <ebotcazou@adacore.com>
4125
4126 * gnat_rm.texi: Small wording tweak.
4127
4128 2014-02-06 Pascal Obry <obry@adacore.com>
4129
4130 * prj-attr.adb, projects.texi, snames.ads-tmpl: Add Included_Patterns
4131 and Included_Artifact_Patterns attribute definitions.
4132
4133 2014-02-06 Yannick Moy <moy@adacore.com>
4134
4135 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Set
4136 SPARK_Mode pragma component for all subprograms, including stubs.
4137
4138 2014-02-06 Hristian Kirtchev <kirtchev@adacore.com>
4139
4140 * sem_ch10.adb (Analyze_Package_Body_Stub): Maintain
4141 the configuration options of the enclosing context in a
4142 stack-like fasion.
4143 (Analyze_Subprogram_Body_Stub): Maintain the
4144 configuration options of the enclosing context in a stack-like
4145 fashion.
4146
4147 2014-02-06 Robert Dewar <dewar@adacore.com>
4148
4149 * debug.adb: -gnatd.u sets Modify_Tree_For C
4150 * exp_ch4.adb (Expand_N_Op_Rotate_Left): Expand out
4151 if Modify_Tree_For_C (Expand_N_Op_Rotate_Right): ditto.
4152 (Expand_N_Op_Arithmetic_Right_Shift): ditto.
4153 * exp_intr.adb (Expand_Shift): Call expander so we do
4154 Modify_Tree_For_C expansions.
4155 * gnat1drv.adb (Adjust_Global_Switches): Set Modify_Tree_For_C
4156 if -gnatd.u set.
4157
4158 2014-02-06 Fedor Rybin <frybin@adacore.com>
4159
4160 * prj-proc.ads (Tree_Loaded_Callback): new type Callback used
4161 after the phase 1 of the processing of each aggregated project
4162 to get access to project trees of aggregated projects.
4163 (Process_Project_Tree_Phase_1): new parameter On_New_Tree_Loaded
4164 If specified, On_New_Tree_Loaded is called after each aggregated
4165 project has been processed succesfully.
4166 (Process): new parameter On_New_Tree_Loaded.
4167 * prj-proc.adb (Process_Aggregated_Projects): On_New_Tree_Loaded
4168 callback added after processing of each aggregated project.
4169 (Recursive_Process): new parameter On_New_Tree_Loaded.
4170 (Process): new parameter On_New_Tree_Loaded.
4171 (Process_Project_Tree_Phase_1): new parameter On_New_Tree_Loaded.
4172 * prj-conf.ads (Parse_Project_And_Apply_Config): new parameter
4173 On_New_Tree_Loaded.
4174 * prj-conf.adb (Parse_Project_And_Apply_Config): new parameter
4175 On_New_Tree_Loaded.
4176
4177 2014-02-06 Bob Duff <duff@adacore.com>
4178
4179 * gnat_ugn.texi: Implement --insert-blank-lines and
4180 --preserve-blank-lines switches.
4181
4182 2014-02-06 Sergey Rybin <rybin@adacore.com frybin>
4183
4184 * gnat_ugn.texi, vms_data.ads: Add documentation of -j option for
4185 gnatelim.
4186
4187 2014-02-06 Eric Botcazou <ebotcazou@adacore.com>
4188
4189 * gnat_rm.texi (Pragma Optimize_Alignment): Document the effect
4190 of the pragma on individual objects.
4191
4192 2014-02-06 Hristian Kirtchev <kirtchev@adacore.com>
4193
4194 * einfo.adb Node29 is now used as BIP_Initialization_Call.
4195 (BIP_Initialization_Call): New routine.
4196 (Set_BIP_Initialization_Call): New routine.
4197 (Write_Field29_Name): Add an entry for constants and variables.
4198 * einfo.ads Add new attribute BIP_Initialization_Call and update
4199 its usage in nodes.
4200 (BIP_Initialization_Call): New routine along with pragma Inline.
4201 (Set_BIP_Initialization_Call): New routine along with pragma Inline.
4202 * exp_ch6.adb (Make_Build_In_Place_Call_In_Object_Declaration):
4203 Add local declaration Res_Decl. Capture the build-in-place
4204 initialization call when the related object declaration has
4205 created a transient block.
4206 * exp_ch7.adb (Process_Transient_Objects): Add local variable
4207 Fin_Insrt. Recognize a scenario where an object declaration acts
4208 as a transient context and is initialized by a build-in-place
4209 function call.
4210
4211 2014-02-06 Pascal Obry <obry@adacore.com>
4212
4213 * prj-util.adb (For_Interface_Sources): Fix handling of required
4214 bodies for aggregate libs.
4215
4216 2014-02-06 Robert Dewar <dewar@adacore.com>
4217
4218 * nlists.ads: Minor comment clarifications.
4219
4220 2014-02-06 Robert Dewar <dewar@adacore.com>
4221
4222 * gnat1drv.adb (Adjust_Global_Switches): Set Modify_Tree_For_C
4223 if gnatd.V set.
4224 * opt.ads (Modify_Tree_For_C): New flag.
4225 * output.ads, output.adb (Last_Char): New function.
4226
4227 2014-02-06 Pascal Obry <obry@adacore.com>
4228
4229 * projects.texi, prj-env.adb (Initialize_Default_Project_Path): Add
4230 share/gpr for cross-builds.
4231
4232 2014-02-06 Robert Dewar <dewar@adacore.com>
4233
4234 * exp_util.ads, checks.adb, sem_prag.adb, prj-util.adb, sem_ch13.adb:
4235 Minor reformatting and code clean ups.
4236
4237 2014-02-06 Pascal Obry <obry@adacore.com>
4238
4239 * prj-util.adb (For_Interface_Sources): Skip non compilable languages.
4240 * prj.ads: Minor typo fix in comment.
4241
4242 2014-02-06 Hristian Kirtchev <kirtchev@adacore.com>
4243
4244 * sem_prag.adb (Analyze_Depends_In_Decl_Part): Add
4245 local variable Expr. Flag clauses with extra parenthesis as this
4246 is not allowed by the syntax of the pragma. Code reformatting.
4247
4248 2014-02-06 Hristian Kirtchev <kirtchev@adacore.com>
4249
4250 * exp_attr.adb (Expand_N_Attribute_Reference): Alphabetize
4251 variables. Rename variabme Tnn to Temp. Do not create a temporary
4252 if assertions are disabled. Find enclosing routine _Postconditions
4253 and insert the temporary that captures the value of the prefix
4254 before the routine.
4255 * exp_ch6.adb (Build_Postconditions_Procedure):
4256 Insert the generated _Postconditions routine
4257 before the first source declaration of the related
4258 subprogram.
4259 (Insert_After_Last_Declaration): Removed.
4260 (Insert_Before_First_Source_Declaration): New routine.
4261
4262 2014-02-06 Ed Schonberg <schonberg@adacore.com>
4263
4264 * exp_util.adb, exp_util.ads (Within_Internal_Subprogram):
4265 Utility to determine whether current expansion is for the body
4266 of a predefined primitive operation.
4267 (Make_Predicate_Check): Use Within_Internal_Subpgram
4268 * checks.adb (Apply_Predicate_Check): Use
4269 Within_Internal_Subprogram
4270 * sem_ch13.adb (Freeze_Entity_Checks): Ditto.
4271
4272 2014-02-06 Pascal Obry <obry@adacore.com>
4273
4274 * prj.ads, prj-util.adb: Minor reformatting.
4275
4276 2014-02-06 Ed Schonberg <schonberg@adacore.com>
4277
4278 * exp_ch6.adb (Expand_Subprogram_Contract, Append_Enabled_Item):
4279 Take into account the Split_PPC flag to ensure that conjuncts
4280 in a composite postcondition aspect are tested in source order.
4281
4282 2014-02-06 Hristian Kirtchev <kirtchev@adacore.com>
4283
4284 * sem_ch6.adb (Analyze_Generic_Subprogram_Body): Flag illegal
4285 use of SPARK_Mode.
4286 * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration): Flag
4287 illegal use of SPARK_Mode.
4288 (Instantiate_Subprogram_Body): Flag illegal use of SPARK_Mode.
4289 * sem_prag.adb (Analyze_Pragma): Code reformatting.
4290 * sem_util.adb Add with and use clause for Aspects.
4291 (Check_SPARK_Mode_In_Generic): New routine.
4292 * sem_util.ads (Check_SPARK_Mode_In_Generic): New routine.
4293
4294 2014-02-06 Thomas Quinot <quinot@adacore.com>
4295
4296 * a-calend.adb (Formatting_Operations.Split): Ensure that
4297 Time_Error is raised for invalid time values.
4298
4299 2014-02-06 Arnaud Charlet <charlet@adacore.com>
4300
4301 * sem_prag.adb (Analyze_Pragma): Rewrite as a null statement
4302 in GNATprove_Mode.
4303
4304 2014-02-06 Robert Dewar <dewar@adacore.com>
4305
4306 * einfo.ads, einfo.adb (Is_Discriminant_Check_Function): New flag.
4307 * exp_ch3.adb (Build_Dcheck_Function): Set
4308 Is_Discriminant_Check_Function.
4309
4310 2014-02-06 Hristian Kirtchev <kirtchev@adacore.com>
4311
4312 * exp_ch7.adb (Is_Subprogram_Call): Inspect
4313 the original tree in certain cases where a construct has been
4314 factored out and replaced by a reference to a temporary.
4315
4316 2014-02-06 Ed Schonberg <schonberg@adacore.com>
4317
4318 * sem_ch3.adb (Process_Full_View): Fix typo in the order of
4319 parameters when propagating predicate function to full view.
4320 (Find_Type_Of_Object): Freeze base type of object type to catch
4321 premature use of discriminated private type without a full view.
4322
4323 2014-02-06 Robert Dewar <dewar@adacore.com>
4324
4325 * sprint.adb: Minor reformatting.
4326
4327 2014-02-06 Hristian Kirtchev <kirtchev@adacore.com>
4328
4329 * exp_ch4.adb (Process_Transient_Object): Add local variable
4330 Temp_Ins. When the transient object is initialized by an
4331 aggregate, the hook must capture the object after the last
4332 component assignment takes place.
4333 * exp_ch7.adb (Detect_Subprogram_Call): Expose the subprogram to
4334 routine Is_Subprogram_Call.
4335 (Is_Subprogram_Call): Inspect an
4336 aggregate that has been heavily expanded for subprogram calls.
4337 (Process_Transient_Objects): Add local variables Expr, Ptr_Id
4338 and Temp_Ins. Remove the nested declare block and adjust the
4339 indentation. When the transient object is initialized by an
4340 aggregate, the hook must capture the object after the last
4341 component assignment takes place.
4342
4343 2014-02-06 Hristian Kirtchev <kirtchev@adacore.com>
4344
4345 * sem_prag.adb (Analyze_Global_Item): Detect illegal uses of
4346 external states with enabled properties that do not match the
4347 global mode.
4348 (Property_Error): New routine.
4349 * sem_res.adb (Property_Error): New routine.
4350 (Resolve_Actuals): Detect illegal uses of external variables with
4351 enabled properties in procedure calls that do not match the mode of
4352 the corresponding formal parameter.
4353
4354 2014-02-06 Hristian Kirtchev <kirtchev@adacore.com>
4355
4356 * sem_util.adb (Has_Enabled_Property): Rename
4357 formal parameter Prop_Nam to Property. Update the comment on usage
4358 and all occurrences in the body. Add local variable Prop_Nam. When
4359 inspecting a property with an expression, the property name
4360 appears as the first choice of the component association.
4361
4362 2014-02-04 Robert Dewar <dewar@adacore.com>
4363
4364 * exp_ch5.adb, einfo.ads, freeze.adb, sem_ch8.adb: Minor reformatting.
4365
4366 2014-02-04 Gary Dismukes <dismukes@adacore.com>
4367
4368 * sem_aggr.adb: Change "runtime" to "run time" in warning message,
4369 for consistency with other messages.
4370
4371 2014-02-04 Ed Schonberg <schonberg@adacore.com>
4372
4373 * exp_ch5.adb (Expand_Iterator_Loop): For a container element
4374 iterator, indicate that the element is a constant if the container
4375 type does not have a variable indexing aspect.
4376 * sem_ch8.adb (Analyze_Object_Renaming): If the entity is already
4377 marked as constant, do not reset its Ekind, to ensure that
4378 container elements in an element loop are not modified if the
4379 container (e.g. a hashed set) only has a constant indexing aspect.
4380
4381 2014-02-04 Arnaud Charlet <charlet@adacore.com>
4382
4383 * g-souinf.ads: Subprograms in this unit are actually not pure.
4384 * freeze.adb (Freeze_Subprogram): Do not reset Is_Pure for Intrinsics.
4385 * einfo.ads (Is_Pure): Update doc to match implementation.
4386
4387 2014-02-04 Gary Dismukes <dismukes@adacore.com>
4388
4389 * exp_ch13.adb: Minor spelling fix.
4390
4391 2014-02-04 Robert Dewar <dewar@adacore.com>
4392
4393 * opt.ads: Minor comment update.
4394
4395 2014-02-04 Robert Dewar <dewar@adacore.com>
4396
4397 * exp_ch4.adb (Expand_N_Expression_With_Actions): Use Rewrite
4398 instead of Replace.
4399
4400 2014-02-04 Ed Schonberg <schonberg@adacore.com>
4401
4402 * sem_aggr.adb (Resolve_Array_Aggregate): Suppress warnings
4403 on null expressions if component type is non-null, when the
4404 corresponding association covers an empty range of index values.
4405
4406 2014-02-04 Robert Dewar <dewar@adacore.com>
4407
4408 * sinfo.ads: Further comments on N_Expression_With_Actions node.
4409
4410 2014-02-04 Hristian Kirtchev <kirtchev@adacore.com>
4411
4412 * sem_prag.adb (Analyze_Refined_Depends_In_Decl_Part): Remove global
4413 variables Out_Items and Ref_Global. Remove local constant
4414 Body_Id along with dummy variables D1, D2, D3, D4, D5, D6, D7
4415 and D8. Remove the useless collection of global items as this
4416 was a leftover from an earlier version of the routine. Move
4417 several routines out to avoid deep nesting and indentation.
4418 (Inputs_Match): Add formal parameter Dep_Clause. Rename formal
4419 parameter Do_Checks to Post_Errors. Update the comment on usage.
4420 (Is_Matching_Input): Renamed to Input_Match. Add formal parameters
4421 Ref_Inputs and Do_Checks. Rename formal parameter Do_Checks
4422 to Post_Errors. Update the comment on usage. Account for the
4423 case where a self referential state may have a null input_list.
4424 (Is_Self_Referential): New routine.
4425
4426 2014-02-04 Ed Schonberg <schonberg@adacore.com>
4427
4428 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): If the
4429 entity renames an expression, as in the case of an object of
4430 an unconstrained type initialized by a function call, defer the
4431 rewriting of the expression to the expander.
4432 * exp_ch13.adb (Expand_N_Attribute_Definition_Clause, case
4433 'Alignment): If the entity renames an expression, introduce
4434 temporary to capture value, and rewrite original declaration to
4435 use temporary.
4436
4437 2014-02-04 Gary Dismukes <dismukes@adacore.com>
4438
4439 * g-comlin.adb: Minor typo fix.
4440
4441 2014-02-04 Ed Schonberg <schonberg@adacore.com>
4442
4443 * freeze.adb (Freeze_All): Types derived from a formal
4444 access_to_classwide type do not have a finalization master.
4445
4446 2014-02-04 Robert Dewar <dewar@adacore.com>
4447
4448 * sprint.adb: Minor reformatting.
4449
4450 2014-02-04 Robert Dewar <dewar@adacore.com>
4451
4452 * exp_ch4.adb (Expand_N_Expression_With_Actions): Eliminate
4453 cases where Actions is a null list.
4454 * sinfo.ads (N_Expression_With_Actions): Actions can be
4455 temporarily empty during semantic analysis, but must be non-empty
4456 in the final expanded tree.
4457
4458 2014-01-31 Robert Dewar <dewar@adacore.com>
4459
4460 * exp_ch9.adb: Minor reformatting.
4461
4462 2014-01-31 Emmanuel Briot <briot@adacore.com>
4463
4464 * g-comlin.adb (Set_Command_Line): Take the switches
4465 configuration from the Command_Line_Config.
4466
4467 2014-01-31 Hristian Kirtchev <kirtchev@adacore.com>
4468
4469 * sem_prag.adb (Analyze_Refinement_Clause): Guard against a malformed
4470 refinement clause.
4471
4472 2014-01-31 Vincent Celier <celier@adacore.com>
4473
4474 * projects.texi: Add more documentation about others used as an
4475 index in indexed attributes.
4476
4477 2014-01-31 Robert Dewar <dewar@adacore.com>
4478
4479 * gnat_ugn.texi: Minor update.
4480 * gnat_rm.texi: Add example to Restriction_Warnings documentation.
4481 * exp_util.adb: Minor reformatting.
4482
4483 2014-01-31 Ed Schonberg <schonberg@adacore.com>
4484
4485 * exp_ch9.adb (Expand_Entry_Barrier): Warn if the barrier
4486 depends on data that is not private to the protected object,
4487 and potentially modifiable in unsynchronized fashion.
4488
4489 2014-01-31 Yannick Moy <moy@adacore.com>
4490
4491 * erroutc.adb (Validate_Specific_Warnings): Remove special case for
4492 GNATprove_Mode.
4493
4494 2014-01-31 Robert Dewar <dewar@adacore.com>
4495
4496 * prj-attr.ads (First_Attribute_Of): Returns Empty_Attribute
4497 for Unknown_Package.
4498 * sem_ch6.adb, sem_attr.adb: Minor comment addition.
4499
4500 2014-01-31 Hristian Kirtchev <kirtchev@adacore.com>
4501
4502 * exp_util.adb (Build_Allocate_Deallocate_Proc): Rewrite
4503 the logic that generates a runtime check to determine the
4504 controlled status of the object about to be allocated or
4505 deallocated. Class-wide types now always use a runtime check
4506 even if they appear as generic actuals.
4507 (Find_Object): Detect
4508 a special case that involves interface class-wide types because
4509 the object appears as a complex expression.
4510
4511 2014-01-31 Ed Schonberg <schonberg@adacore.com>
4512
4513 * sem_ch6.adb (Process_Formals): In Ada2012 mode, place
4514 subprogram with an incomplete untagged formals on the list of
4515 private dependents, to verify that the type is properly completed
4516 in the private part.
4517 * sem_attr.adb: Code clean up.
4518
4519 2014-01-31 Robert Dewar <dewar@adacore.com>
4520
4521 * exp_ch6.adb: Minor reformatting.
4522
4523 2014-01-31 Vincent Celier <celier@adacore.com>
4524
4525 * prj-attr.adb (First_Attribute_Of): Return Unknown_Attribute
4526 when Pkg is unknown.
4527
4528 2014-01-31 Hristian Kirtchev <kirtchev@adacore.com>
4529
4530 * sem_res.adb (Resolve_Entity_Name): Comment
4531 reformatting. Allow volatile objects in various generated checks.
4532
4533 2014-01-31 Ed Schonberg <schonberg@adacore.com>
4534
4535 * sem_attr.adb (Analyze_Attribute, case 'Update): For a record
4536 component association, set the etype of the identifier, for
4537 SPARK use.
4538
4539 2014-01-31 Ed Schonberg <schonberg@adacore.com>
4540
4541 * exp_ch6.adb (Has_Visibility_Of_Subprogram): If type is not
4542 declared in a package, not checks can apply to the subprogram.
4543
4544 2014-01-31 Robert Dewar <dewar@adacore.com>
4545
4546 * erroutc.adb (Validate_Specific_Warnings): Warnings are
4547 controlled -gnatw.W.
4548 * gnat_ugn.texi: Document new warnings controlled by -gnatw.w.
4549 * opt.ads (Warn_On_Warnings_Off): Now controls more cases.
4550
4551 2014-01-31 Arnaud Charlet <charlet@adacore.com>
4552
4553 * exp_disp.adb: Update comments.
4554
4555 2014-01-31 Yannick Moy <moy@adacore.com>
4556
4557 * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration,
4558 Save_Global_References): Guard access to expression in aspect.
4559
4560 2014-01-31 Yannick Moy <moy@adacore.com>
4561
4562 * sem_prag.adb (Analyze_Pragma/Pragma_SPARK_Mode):
4563 Issue an error when the pragma is applied to a generic unit,
4564 a generic declaration, or inside a generic.
4565
4566 2014-01-31 Yannick Moy <moy@adacore.com>
4567
4568 * sem_ch8.adb (Analyze_Subprogram_Renaming): Set SPARK_Mode on renaming
4569 entity.
4570
4571 2014-01-31 Robert Dewar <dewar@adacore.com>
4572
4573 * exp_ch9.adb, s-tassta.adb, s-tposen.adb, s-tposen.ads: Minor
4574 reformatting.
4575
4576 2014-01-31 Tristan Gingold <gingold@adacore.com>
4577
4578 * exp_disp.adb: Add a historic note.
4579
4580 2014-01-31 Robert Dewar <dewar@adacore.com>
4581
4582 * sem_warn.adb (Warn_On_Useless_Assignments): Add call to
4583 Process_Deferred_References.
4584
4585 2014-01-31 Yannick Moy <moy@adacore.com>
4586
4587 * erroutc.adb (Validate_Specific_Warnings): Do not issue a message for
4588 ineffective pragma Warnings(Off) in GNATprove_Mode.
4589
4590 2014-01-31 Bob Duff <duff@adacore.com>
4591
4592 * s-taskin.ads: Minor comment fix.
4593 * s-tassta.adb (Abort_Dependents): Don't abort all dependents;
4594 just direct dependents. If this is actually an abort, each task
4595 will take care of aborting its dependents, so all dependents will
4596 get aborted, as before. However, when this is called the second
4597 time from Vulnerable_Complete_Master "for convenience" (i.e. to
4598 kill off tasks waiting at terminate alternatives), aborting
4599 indirect dependents is wrong, because it causes some unrelated
4600 tasks to get aborted.
4601
4602 2014-01-31 Robert Dewar <dewar@adacore.com>
4603
4604 * sem_ch4.adb: Minor reformatting.
4605
4606 2014-01-31 Robert Dewar <dewar@adacore.com>
4607
4608 * exp_ch2.adb: New calling sequence for Is_LHS.
4609 * frontend.adb: Add call to Process_Deferred_References.
4610 * lib-xref.ads, lib-xref.adb (Process_Deferred_References): New.
4611 (Deferred_References): New table.
4612 * sem_ch8.adb (Find_Direct_Name): Make deferred reference table
4613 entries.
4614 (Find_Expanded_Name): Ditto.
4615 * sem_res.adb: New calling sequence for Is_LHS.
4616 * sem_util.ads, sem_util.adb (Is_LHS): New calling sequence.
4617 * sem_warn.adb: Call Process_Deferred_References before issuing
4618 warnings.
4619
4620 2014-01-31 Tristan Gingold <gingold@adacore.com>
4621
4622 * exp_util.adb (Corresponding_Runtime_Package): Restrict the
4623 use of System_Tasking_Protected_Objects_Single_Entry.
4624 * exp_ch9.adb (Build_Simple_Entry_Call): Remove Mode parameter
4625 of Protected_Single_Entry_Call.
4626 (Expand_N_Timed_Entry_Call): Remove single_entry case.
4627 * exp_disp.adb (Make_Disp_Asynchronous_Select_Body): Remove
4628 single_entry case.
4629 (Make_Disp_Timed_Select_Body): Likewise.
4630 * rtsfind.ads (RE_Timed_Protected_Single_Entry_Call): Remove.
4631 * s-tposen.adb (Send_Program_Error, PO_Do_Or_Queue): Remove
4632 Self_Id parameter.
4633 (Wakeup_Entry_Caller): Remove Self_ID and New_State parameters.
4634 (Wait_For_Completion_With_Timeout): Remove.
4635 (Protected_Single_Entry_Call): Remove Mode parameter
4636 (always Simple_Call).
4637 (Service_Entry): Remove Self_Id constant (not used anymore).
4638 (Timed_Protected_Single_Entry_Call): Remove.
4639 * s-tposen.ads (Timed_Protected_Single_Entry_Call): Remove.
4640 (Protected_Single_Entry_Call): Remove Mode parameter.
4641
4642 2014-01-29 Hristian Kirtchev <kirtchev@adacore.com>
4643
4644 * einfo.adb (Get_Pragma): Handle the retrieval of pragma Refined_Post.
4645 * einfo.ads (Get_Pragma): Update the comment on special pragmas
4646 handled by this routine.
4647 * sem_prag.adb (Analyze_Pragma): Add a legal pragma Refined_Post
4648 to the contract of the related subprogram body.
4649 * sem_util.adb (Add_Contract_Item): Handle the insertion of
4650 pragma Refined_Post into the contract of a subprogram body.
4651 * sinfo.ads Update the documentation of node N_Contract.
4652 * sem_res.adb (Resolve_Entity_Name): Add a guard
4653 to detect abstract states and variables only when checking the
4654 SPARK 2014 rules concerning volatile object placement.
4655
4656 2014-01-29 Ed Schonberg <schonberg@adacore.com>
4657
4658 * sem_ch4.adb (Find_Equality_Types, Try_One_Interp): within an instance,
4659 null is compatible with any access type.
4660
4661 2014-01-29 Hristian Kirtchev <kirtchev@adacore.com>
4662
4663 * sem_util.adb (Find_Placement_In_State_Space): Assume that the default
4664 placement is not in a package.
4665
4666 2014-01-29 Hristian Kirtchev <kirtchev@adacore.com>
4667
4668 * sem_util.adb (Has_Enabled_Property): Compare the character field of
4669 the sole property.
4670
4671 2014-01-29 Robert Dewar <dewar@adacore.com>
4672
4673 * sem_intr.adb, a-ztexio.ads, sinfo.ads, sem_res.adb, gnatlink.adb,
4674 vms_conv.adb, a-except.ads, a-except-2005.ads, a-teioed.adb,
4675 sem_warn.ads, treepr.ads, erroutc.ads, a-excach.adb: Minor reformatting.
4676
4677 2014-01-29 Robert Dewar <dewar@adacore.com>
4678
4679 * sem_util.ads, sem_util.adb (In_Pragma_Expression): New function.
4680 * sem_warn.adb (Check_References): Suppress warnings if inside
4681 Initial_Condition pragma.
4682
4683 2014-01-29 Hristian Kirtchev <kirtchev@adacore.com>
4684
4685 * sem_prag.adb (Check_Missing_Part_Of): List all values of
4686 State_Space_Kind for readability reasons. Do not emit an error on
4687 a private item when the enclosing package lacks aspect/pragma
4688 Abstract_State. Do not emit an error on a private package
4689 instantiation when the corresponding generic template lacks
4690 visible state.
4691 (Has_Visible_State): New routine.
4692 * sem_util.adb (Find_Placement_In_State_Space): The visible
4693 declarations of any kind of child units in general act as proper
4694 placement location.
4695
4696 2014-01-29 Robert Dewar <dewar@adacore.com>
4697
4698 * a-except-2005.adb, a-except.adb, a-excpol-abort.adb, a-exstat.adb,
4699 ali.adb, a-numaux.ads, a-numaux-darwin.ads, a-numaux-libc-x86.ads,
4700 a-numaux-vms.ads, a-numaux-vxworks.ads, a-numaux-x86.ads, aspects.ads,
4701 a-taside.adb, a-teioed.adb, a-textio.adb, a-textio.ads, atree.adb,
4702 atree.ads, a-witeio.adb, a-witeio.ads, a-wtedit.adb, a-ztedit.adb,
4703 a-ztexio.adb, bcheck.adb, binde.adb, checks.adb, comperr.adb,
4704 cstand.adb, debug_a.adb, einfo.ads, errout.adb, erroutc.adb,
4705 eval_fat.adb, exp_aggr.adb, exp_attr.adb, exp_ch11.adb, exp_ch3.adb,
4706 exp_ch4.adb, exp_ch5.adb, exp_ch6.adb, exp_ch9.adb, exp_dbug.adb,
4707 exp_disp.adb, exp_fixd.adb, exp_imgv.adb, exp_intr.adb, exp_util.adb,
4708 freeze.adb, frontend.adb, g-comlin.ads, g-mbdira.adb, gnat1drv.adb,
4709 gprep.adb, g-spipat.adb, i-cpp.ads, i-vxwork.ads, i-vxwork-x86.ads,
4710 krunch.ads, layout.adb, lib-load.adb, lib-writ.adb, lib-writ.ads,
4711 live.adb, namet.ads, osint.adb, osint-c.adb, output.ads, par.adb,
4712 par-ch10.adb, par-ch13.adb, par-ch3.adb, par-ch4.adb, par-ch5.adb,
4713 par-ch6.adb, par-ch9.adb, par-endh.adb, par-labl.adb, par-prag.adb,
4714 par-sync.adb, par-tchk.adb, par-util.adb, prj.adb, repinfo.adb,
4715 rtsfind.adb, s-arit64.adb, s-asthan-vms-alpha.adb,
4716 s-asthan-vms-ia64.adb, s-bignum.adb, scans.adb, scng.adb, s-dimmks.ads,
4717 sem_aggr.adb, sem_attr.adb, sem_aux.adb, sem_cat.adb, sem_ch10.adb,
4718 sem_ch12.adb, sem_ch13.adb, sem_ch13.ads, sem_ch3.adb, sem_ch4.adb,
4719 sem_ch5.adb, sem_ch6.adb, sem_ch8.adb, sem_disp.adb, sem_elab.adb,
4720 sem_elim.adb, sem_eval.adb, sem_intr.adb, sem_prag.adb, sem_res.adb,
4721 sem_type.adb, sem_util.adb, sem_warn.adb, set_targ.adb, s-fatgen.adb,
4722 s-fatgen.ads, s-fileio.adb, s-imgcha.adb, s-imgrea.adb, sinfo.ads,
4723 sinput-c.adb, snames.ads-tmpl, s-os_lib.adb, sprint.adb,
4724 s-regpat.adb, s-secsta.adb, s-stalib.ads,
4725 s-stchop.adb, s-stoele.ads, stand.ads, s-taprop-solaris.adb,
4726 s-tasdeb-vms.adb, s-tasini.adb, s-tassta.adb, s-valdec.adb,
4727 s-valuti.adb, s-wchjis.adb, s-wchwts.adb, system.ads, system-vms_64.ads,
4728 system-vms-ia64.ads, treepr.adb, types.ads, uintp.adb, uname.adb,
4729 urealp.adb, usage.adb, vxaddr2line.adb: Minor reformatting.
4730
4731 2014-01-29 Robert Dewar <dewar@adacore.com>
4732
4733 * expander.adb: Minor reformatting.
4734
4735 2014-01-29 Javier Miranda <miranda@adacore.com>
4736
4737 * exp_ch3.adb (Predefined_Primitive_Bodies): Adding documentation to
4738 previous patch.
4739
4740 2014-01-29 Javier Miranda <miranda@adacore.com>
4741
4742 * exp_ch3.adb (Predefined_Primitive_Bodies): Complete the code
4743 that checks if an interface types defines the predefined "="
4744 function because the compiler was erroneously not generating the
4745 predefined "=" primitive as soon as the name of some interface
4746 primitive is "=" (formals were not checked).
4747
4748 2014-01-29 Ed Schonberg <schonberg@adacore.com>
4749
4750 * expander.adb (Expander): In GNATprove mode, do not process
4751 transient scopes: they are in general not created in this mode,
4752 and an attempt to examine them will lead to constraint errors when
4753 processing configuration pragmas that have analyzable expressions.
4754
4755 2014-01-29 Vincent Celier <celier@adacore.com>
4756
4757 * clean.adb (Gnatclean): Fail if main project is an aggregate
4758 project or if there is an aggregate library project in the
4759 project tree.
4760 * gnatcmd.adb: Fail if the main project is an aggregate project
4761 or if there is an aggegate library project in the project tree.
4762 * make.adb (Initialize): : Fail if main project is an aggregate
4763 project or if there is an aggregate library project in the
4764 project tree.
4765 * makeutl.ads (Aggregate_Libraries_In): New Boolean function.
4766 * prj-makr.adb (Initialize): Fail if the main project is an
4767 aggregate project or an aggregate library project.
4768
4769 2014-01-29 Vincent Celier <celier@adacore.com>
4770
4771 * prj-part.adb (Check_Import_Aggregate): New procedure
4772 to check if an imported project is an aggregate project.
4773 (Parse_Single_Project): Call Check_Import_Aggregate
4774 * projects.texi: Document that aggregate projects cannot be
4775 extended or imported.
4776
4777 2014-01-29 Robert Dewar <dewar@adacore.com>
4778
4779 * exp_ch9.adb, sem_ch7.ads, s-regexp.adb, sem_ch13.adb: Minor
4780 reformatting and code clean up.
4781 * gnat_ugn.texi: Add documentation section on Atomic Variables
4782 and Optimization.
4783
4784 2014-01-29 Hristian Kirtchev <kirtchev@adacore.com>
4785
4786 * einfo.adb Flag264 is now unused.
4787 (Has_Body_References): Removed.
4788 (Set_Has_Body_References): Removed.
4789 (Write_Entity_Flags): Remove the output for flag Has_Body_References.
4790 * einfo.ads Update the comment on usage of attribute
4791 Body_References. Remove attribute Has_Body_References and its
4792 usage in nodes.
4793 (Has_Body_References): Removed along with pragma Inline.
4794 (Set_Has_Body_References): Removed along with pragma Inline.
4795 * sem_prag.adb (Analyze_Global_Item): Move the call to
4796 Record_Possible_Body_Reference in the state related checks
4797 section. Add a comment intended function.
4798 (Analyze_Input_Output): Move the call to Record_Possible_Body_Reference
4799 in the state related checks section. Add a comment intended function.
4800 (Analyze_Refinement_Clause): Cleanup the illegal body reference
4801 reporting. Add a comment on timing of error reporting.
4802 (Record_Possible_Body_Reference): Reimplement the routine.
4803
4804 2014-01-29 Vincent Celier <celier@adacore.com>
4805
4806 * makeutl.adb (Mains.Find_File_Add_Extension): Only look for specs for
4807 unit-based languages.
4808 (Mains.Complete_Mains.Do_Complete): Use the source file project
4809 tree when calling Find_File_Add_Extension. Use the correct
4810 project name when reporting an error.
4811
4812 2014-01-29 Hristian Kirtchev <kirtchev@adacore.com>
4813
4814 * aspects.adb Add an entry for aspect Part_Of in table
4815 Canonical_Aspect.
4816 * aspects.ads Add an entry for aspect Part_Of in tables Aspect_Id,
4817 Aspect_Argument, Aspect_Names and Aspect_Delay.
4818 * atree.h Define Elist9.
4819 * atree.adb (Elist9): New routine.
4820 (Set_Elist9): New routine.
4821 * atree.ads (Elist9): New routine.
4822 (Set_Elist9): New routine.
4823 * einfo.adb Add Part_Of_Constituents and Encapsulating_State to
4824 the list of node usage. Remove Refined_State from the list of
4825 node usage.
4826 (Encapsulating_State): New routine.
4827 (Get_Pragma):
4828 Handle pragma Part_Of; (Part_Of_Constituents): New routine.
4829 (Refined_State): Removed.
4830 (Set_Encapsulating_State): New routine.
4831 (Set_Part_Of_Constituents): New routine.
4832 (Set_Refined_State): Removed.
4833 (Write_Field9_Name): Add an entry
4834 for Part_Of_Constituents (Write_Field10_Name): Add an entry for
4835 Encapsulating_State. Remove the entry for Refined_State.
4836 * einfo.ads Add new attributes Encapsulating_State
4837 and Part_Of_Constituents alond with their usage in
4838 entities. Remove attribute Refined_State along with its
4839 usage in entities.
4840 (Encapsulating_State): New routine and
4841 pragma Inline. (Get_Pragma): Update the comment on usage.
4842 (Part_Of_Constituents): New routine and pragma Inline.
4843 (Refined_State): Removed along with pragma Inline.
4844 (Set_Encapsulating_State): New routine and pragma Inline.
4845 (Set_Part_Of_Constituents): New routine and pragma Inline.
4846 (Set_Refined_State): Removed along with pragma Inline.
4847 * par-prag.adb Pragma Part_Of does not need any special processing
4848 by the parser.
4849 * sem_ch3.adb (Analyze_Declarations): Remove local variables
4850 Body_Id and Prag. Call separate routines to analyze the
4851 contract of a package [body].
4852 (Analyze_Object_Contract):
4853 Update the comment on usage. Remove local variables
4854 Items and Nam. Use Get_Pragma rather than traversing the
4855 classification list. Verify whether the lack of indicator
4856 Part_Of agrees with the placement of the variable in state space.
4857 (Analyze_Object_Declaration): Initialize the encapsulating state
4858 of a variable. (Requires_State_Refinement): Moved to sem_util.
4859 * sem_ch7.adb (Analyze_Package_Body_Contract): New routine.
4860 (Analyze_Package_Contract): New routine.
4861 * sem_ch7.ads (Analyze_Package_Body_Contract): New routine.
4862 (Analyze_Package_Contract): New routine.
4863 * sem_ch10.adb (Decorate_State): Initialize the encapsulating
4864 state and Part_Of constituents.
4865 * sem_ch13.adb (Analyze_Aspect_Specifications):
4866 Add processing for aspect Part_Of. Update all
4867 calls to Decorate_Delayed_Aspect_And_Pragma.
4868 (Check_Aspect_At_Freeze_Point): Aspect Part_Of does
4869 not need any special processing at freeze time.
4870 (Decorate_Delayed_Aspect_And_Pragma): Renamed to
4871 Decorate_Aspect_And_Pragma. Add formal parameter Delayed and
4872 update the associated comment.
4873 * sem_prag.adb Add an entry for pragma Part_Of in table Sig_Flags.
4874 (Analyze_Abstract_State): Add new global variable State_Id. Remove
4875 local constants Errors and Loc. Remove local variables Is_Null
4876 and State_Nam. Create the entity of the abstract state on the
4877 spot, before all remaining checks are performed. Verify that a
4878 missing Part_Of option agrees with the placement of the abstract
4879 state within the state space.
4880 (Analyze_Depends_In_Decl_Part):
4881 Add new global variables Constits_Seen and States_Seen. Check
4882 that a state and a corresponding constituent do not appear
4883 in pragma [Refined_]Depends.
4884 (Analyze_Global_In_Decl_Part):
4885 Add new global variables Constits_Seen and States_Seen. Check
4886 that a state and a corresponding constituent do not appear
4887 in pragma [Refined_]Global.
4888 (Analyze_Global_Item):
4889 Remove the now obsolete code that deals with Part_Of.
4890 Add the entity of the global item to the list of processed
4891 items. (Analyze_Initializes_In_Decl_Part): Add new global
4892 variables Constits_Seen and States_Seen. Check that a state
4893 and a corresponding constituent do not appear in pragma
4894 Initializes.
4895 (Analyze_Initialization_Item): Add the entity
4896 of the initialization item to the list of processed items.
4897 (Analyze_Input_Item): Add the entity of the initialization
4898 item to the list of processed items.
4899 (Analyze_Input_Output):
4900 Remove the now obsolete code that deals with Part_Of. Add the
4901 entity of the input/output to the list of processed items.
4902 (Analyze_Part_Of): New routine.
4903 (Analyze_Part_Of_Option): Remove
4904 local constant Par_State. Add local constant Encaps and local
4905 variables Encaps_Id and Legal. Use Analyze_Part of to analyze
4906 the option. Turn the related state into a Part_Of constituent
4907 if the option is legal.
4908 (Analyze_Pragma): Add processing
4909 for pragma Part_Of.
4910 (Analyze_Refined_State_In_Decl_Part):
4911 Remove global constants Pack_Body and Spec_Id. Remove
4912 global variables Abstr_States and Hidden_States. Add new
4913 global variables Available_States, Body_Id, Body_States and
4914 Spec_Id. Add new local constant Body_Decl. Reimplement the
4915 logic that extracts the states available for refinement from
4916 the related package and the body hidden states of the said
4917 package.
4918 (Analyze_Refinement_Clause): Add local variable Part_Of_Constits.
4919 (Check_Applicable_Policy): Alphabetize body.
4920 (Check_Dependency_Clause): Replace Refined_State
4921 with Encapsulating_State.
4922 (Check_Matching_Constituent):
4923 Reimplement the logic that determines whether an item is a valid
4924 / invalid constituent of the current refined state. Return when
4925 a construct does not denote a valid abstract state. Extract the
4926 list of Part_Of constituents for further analysis. Check that all
4927 Part_Of constituents of a state have been used in its refinement.
4928 (Check_Matching_State): Update the comment on usage. Operate
4929 on the list of available states.
4930 (Check_Missing_Part_Of): New routine.
4931 (Check_Refined_Global_Item): Replace Refined_State
4932 with Encapsulating_State.
4933 (Check_State_And_Constituent_Use): New routine.
4934 (Create_Abstract_State): New routine.
4935 (Is_Matching_Input): Replace Refined_State with Encapsulating_State.
4936 (Is_Part_Of): Removed.
4937 (Collect_Body_States): New routine.
4938 (Collect_Constituent): Replace Refined_State with Encapsulating_State.
4939 (Collect_Hidden_States): Removed.
4940 (Report_Unrefined_States): Change the profile of the procedure along
4941 with the comment on usage.
4942 (Report_Unused_Constituents): New routine.
4943 (Report_Unused_Hidden_States): Removed.
4944 (Report_Unused_States): New routine.
4945 * sem_prag.ads (Check_Missing_Part_Of): New routine.
4946 * sem_util.adb (Add_Contract_Item): Pragma Part_Of can now
4947 appear in the classification pragmas of a package instantiation
4948 or a variable.
4949 (Find_Placement_In_State_Space): New routine.
4950 (Is_Child): Removed.
4951 (Is_Child_Or_Sibling): Remove formal
4952 parameter Private_Child. Remove the private child checks.
4953 (Requires_State_Refinement): Moved from sem_ch3.
4954 * sem_util.ads Add new type State_Space_Kind along with
4955 comment on its usage and values.
4956 (Add_Contract_Item): Update the comment on usage.
4957 (Find_Body_Discriminal): Alphabetize spec.
4958 (Find_Placement_In_State_Space): New routine.
4959 (Is_Child_Or_Sibling): Remove formal parameter Private_Child
4960 and update the comment on usage.
4961 (Requires_State_Refinement): Moved from sem_ch3.
4962 * sinfo.ads: Update the documentation of N_Contract.
4963 * snames.ads-tmpl The predefined name for Part_Of is now used
4964 to denote a pragma. Add Pragma_Id for Part_Of.
4965
4966 2014-01-29 Emmanuel Briot <briot@adacore.com>
4967
4968 * s-regexp.adb (Create_Secondary_Table): Automatically grow the state
4969 machine as needed.
4970 (Dump): New subprogram.
4971
4972 2014-01-29 Tristan Gingold <gingold@adacore.com>
4973
4974 * exp_ch9.adb (Expand_N_Protected_Type_Declaration): Add
4975 Expand_Entry_Declaration to factorize code.
4976
4977 2014-01-29 Ed Schonberg <schonberg@adacore.com>
4978
4979 * checks.adb: minor clarification.
4980 * sem_ch7.adb (Declare_Inherited_Private_Subprograms): Limit
4981 search for primitive operations to the entities that immediately
4982 follow the type declaration.
4983
4984 2014-01-29 Tristan Gingold <gingold@adacore.com>
4985
4986 * exp_ch9.adb (Build_Protected_Entry): Do not call
4987 Complete_Entry_Body anymore.
4988 * rtsfind.ads (RE_Complete_Single_Entry_Body): Remove.
4989 * s-tposen.ads, s-tposen.adb (Complete_Single_Entry_Body): Remove.
4990
4991 2014-01-29 Pierre-Marie Derodat <derodat@adacore.com>
4992
4993 * s-os_lib.adb, s-os_lib.ads (Normalize_Pathname): Return an empty
4994 string when the Name input bigger than allowed. Adapt the function
4995 specification.
4996
4997 2014-01-29 Ed Schonberg <schonberg@adacore.com>
4998
4999 * checks.adb (Install_Null_Excluding_Check): Do not emit warning
5000 if expression is within a case_expression of if_expression.
5001
5002 2014-01-29 Robert Dewar <dewar@adacore.com>
5003
5004 * exp_ch9.adb, inline.ads: Minor reformatting.
5005
5006 2014-01-29 Tristan Gingold <gingold@adacore.com>
5007
5008 * exp_ch9.adb (Is_Exception_Safe): Return true if no exceptions.
5009
5010 2014-01-29 Yannick Moy <moy@adacore.com>
5011
5012 * inline.ads (Pending_Body_Info): Add SPARK_Mode and
5013 SPARK_Mode_Pragma components to be able to analyze generic
5014 instance.
5015 * sem_ch12.adb (Analyze_Package_Instantiation,
5016 Inline_Instance_Body, Need_Subprogram_Instance_Body,
5017 Load_Parent_Of_Generic): Pass in SPARK_Mode from instantiation
5018 for future analysis of the instance.
5019 (Instantiate_Package_Body,
5020 Instantiate_Subprogram_Body, Set_Instance_Inv): Set SPARK_Mode
5021 from instantiation to analyze the instance.
5022
5023 2014-01-29 Robert Dewar <dewar@adacore.com>
5024
5025 * sem_ch7.adb, sem_prag.adb, sem_ch4.adb, sem_ch6.adb: Minor code
5026 reorganization.
5027
5028 2014-01-29 Yannick Moy <moy@adacore.com>
5029
5030 * gnat_rm.texi: Update description of SPARK_Mode pragma.
5031
5032 2014-01-29 Tristan Gingold <gingold@adacore.com>
5033
5034 * exp_ch9.adb (Expand_N_Protected_Body): Remove Num_Entries.
5035
5036 2014-01-29 Thomas Quinot <quinot@adacore.com>
5037
5038 * sem_ch4.adb (Find_Component_In_Instance): Update comment.
5039
5040 2014-01-29 Ed Schonberg <schonberg@adacore.com>
5041
5042 * exp_util.adb (Build_Task_Image_Prefix): Indicate that the
5043 resulting string is an internal entity. and thus requires no
5044 initialization. This is relevant when Initialize_ Scalars is
5045 enabled, because the resultant spurious initialization may lead to
5046 secondary stack anomalies that produce a mangled name for a task.
5047
5048 2014-01-29 Yannick Moy <moy@adacore.com>
5049
5050 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): SPARK_Mode
5051 not inherited from spec anymore. Check consistency
5052 rules after processing of declarations.
5053 * sem_ch7.adb (Analyze_Package_Body_Helper): SPARK_Mode not inherited
5054 from spec anymore. Check consistency rules after processing of
5055 declarations.
5056 (Analyze_Package_Declaration): Set SPARK_Mode only for non-generic
5057 packages.
5058 * sem_prag.adb (Analyze_Pragma/Pragma_SPARK_Mode): Implement new
5059 consistency rules.
5060
5061 2014-01-27 Robert Dewar <dewar@adacore.com>
5062
5063 * sem_res.adb (Resolve_Comparison_Op): Add type name/location
5064 to unordered msg.
5065 (Resolve_Range): Add type name/location to unordered msg.
5066
5067 2014-01-27 Claire Dross <dross@adacore.com>
5068
5069 * a-cofove.adb/s (Copy): Add precondition so that Copy (Source,
5070 Capacity) is only called with Capacity >= Length (Source) and
5071 Capacity in Capacity_Range.
5072 * a-cfdlli.adb/s, a-cfhase.adb/s, a-cfhama.adb/s, a-cforse.adb/s,
5073 a-cforma.adb/s (Copy): Add precondition so that Copy (Source, Capacity)
5074 is only called with Capacity >= Source.Capacity. Raise Capacity_Error
5075 in the code is this is not the case.
5076
5077 2014-01-27 Thomas Quinot <quinot@adacore.com>
5078
5079 * sem_ch4.adb (Analyze_Selected_Component): Fix handling of
5080 selected component in an instance where the component of the
5081 actual is not visibile at instantiation.
5082
5083 2014-01-27 Ed Schonberg <schonberg@adacore.com>
5084
5085 * sem_ch6.adb: sem_ch6.adb (Set_Actual_Subtypes): If the type
5086 has a dynamic predicate, generate freeze node for Actual_Subtype
5087 at once, because the declaration of the corresponding predicate
5088 function will make reference to it.
5089
5090 2014-01-27 Tristan Gingold <gingold@adacore.com>
5091
5092 * exp_ch7.adb, exp_ch9.adb: Adjust comments.
5093
5094 2014-01-27 Robert Dewar <dewar@adacore.com>
5095
5096 * exp_ch4.adb (Expand_N_Op_Expon): Remove unsigned type test
5097 for 2**X optimization.
5098
5099 2014-01-27 Ed Schonberg <schonberg@adacore.com>
5100
5101 * a-suenst.adb: strings.utf_encoding.strings (Decode): Check
5102 explicitly whether value is in range of Character, because the
5103 library is typically compiled with range checks disabled, and
5104 we cannot rely on the implicit check on the argument of 'Val.
5105
5106 2014-01-27 Vincent Celier <celier@adacore.com>
5107
5108 * a-ciorma.adb, a-cihama.adb (Assign): Copy the Source to the Target,
5109 not the Target to itself.
5110
5111 2014-01-27 Robert Dewar <dewar@adacore.com>
5112
5113 * vms_conv.ads, ali.adb, sem_ch6.ads, opt.ads, vms_cmds.ads: Minor
5114 changes to avoid incorrect use of unordered enum types.
5115
5116 2014-01-27 Thomas Quinot <quinot@adacore.com>
5117
5118 * sem_ch4.adb: Minor reformatting.
5119
5120 2014-01-27 Robert Dewar <dewar@adacore.com>
5121
5122 * scn.adb (Check_End_Of_Line): Removed.
5123 (Error_Long_Line): Removed.
5124 (Determine_License): Use versions of above routines from Scanner.
5125 * scng.adb (Check_End_Of_Line): Moved to spec.
5126 (Error_Long_Line): Removed, no longer used.
5127 * scng.ads (Check_End_Of_Line): Moved here from body.
5128
5129 2014-01-27 Tristan Gingold <gingold@adacore.com>
5130
5131 * exp_ch7.adb (Build_Cleanup_Statements): Call
5132 Build_Protected_Subprogram_Call_Cleanup to insert the cleanup
5133 for protected body.
5134 * exp_ch9.adb (Build_Protected_Subprogram_Body): Likewise.
5135 Remove Service_Name variable.
5136 (Build_Protected_SUbprogam_Call_Cleanup): New procedure that
5137 factorize code from the above subprograms.
5138 * exp_ch9.ads (Build_Protected_Subprogram_Call_Cleanup): New procedure.
5139
5140 2014-01-27 Hristian Kirtchev <kirtchev@adacore.com>
5141
5142 * einfo.adb (Has_Option): Reimplemented.
5143 * sem_prag.adb (Analyze_Refinement_Clause): Add global
5144 variables AR_Constit, AW_Constit, ER_Constit, EW_Constit,
5145 External_Constit_Seen and State. Add local variables Body_Ref,
5146 Body_Ref_Elmt and Extra_State. Reimplement part of the logic to
5147 avoid a cumbersome while pool. Verify the legality of an external
5148 state and relevant properties.
5149 (Check_External_Property): New routine.
5150 (Check_Matching_State): Remove parameter profile
5151 and update comment on usage.
5152 (Collect_Constituent): Store the
5153 relevant external property of a constituent.
5154 * sem_util.adb (Async_Readers_Enabled): Update the call to
5155 Has_Enabled_Property.
5156 (Async_Writers_Enabled): Update the call to Has_Enabled_Property.
5157 (Effective_Reads_Enabled): Update the call to Has_Enabled_Property.
5158 (Effective_Writes_Enabled): Update the call to Has_Enabled_Property.
5159 (Has_Enabled_Property): Rename formal parameter Extern to State_Id.
5160 Update comment on usage. Reimplement the logic to recognize the various
5161 formats of properties.
5162
5163 2014-01-27 Ed Schonberg <schonberg@adacore.com>
5164
5165 * par-ch5.adb: Minor reformatting.
5166
5167 2014-01-27 Tristan Gingold <gingold@adacore.com>
5168
5169 * s-tposen.ads: Harmonize style and comments.
5170
5171 2014-01-27 Vincent Celier <celier@adacore.com>
5172
5173 * projects.texi: Document that shared library projects, by
5174 default, cannot import projects that are not shared library
5175 projects.
5176
5177 2014-01-27 Robert Dewar <dewar@adacore.com>
5178
5179 * sem_ch8.adb (Find_Selected_Component): Use Replace instead
5180 of Rewrite.
5181
5182 2014-01-27 Ed Schonberg <schonberg@adacore.com>
5183
5184 * a-suenco.adb, a-suenst.adb (Decode): Raise encoding error if
5185 any other exception is raised.
5186 (Convert): If both Input_Scheme and Output_Scheme are UTF_8 it is
5187 still necessary to perform a conversion in order to remove overlong
5188 encodings.
5189
5190 2014-01-27 Robert Dewar <dewar@adacore.com>
5191
5192 * exp_smem.adb: Minor reformatting.
5193
5194 2014-01-27 Thomas Quinot <quinot@adacore.com>
5195
5196 * a-calfor.ads: Fix incorrect reference to operator "-" in comment.
5197
5198 2014-01-27 Ed Schonberg <schonberg@adacore.com>
5199
5200 * sem_res.adb (Make_Call_Into_Operator): In ASIS mode, relocate
5201 nodes for operands to the original node for the call, to preserve
5202 Original_Node pointers within the resolved operands, given that
5203 they may have been rewritten as well. Previous approach copied
5204 the operands into a new tree and lost those pointers.
5205
5206 2014-01-27 Claire Dross <dross@adacore.com>
5207
5208
5209 * a-cofove.adb, a-cofove.ads: Add Strict_Equal function to the API.
5210
5211 2014-01-27 Ed Schonberg <schonberg@adacore.com>
5212
5213 * sem_util.adb (Check_Internal_Protected_Use): A call through
5214 an anonymous access parameter of the current protected function
5215 is not a potential modification of the current object.
5216
5217 2014-01-27 Ed Schonberg <schonberg@adacore.com>
5218
5219 * a-cobove.adb (Reserve_Capacity): Procedure raises
5220 Capacity_Error, not Constraint_Error, when request cannot be
5221 satisfied.
5222
5223 2014-01-27 Vincent Celier <celier@adacore.com>
5224
5225 * a-coorma.adb, a-cohama.adb (Assign): Copy the Source to the Target,
5226 not the Target to itself.
5227
5228 2014-01-27 Ed Schonberg <schonberg@adacore.com>
5229
5230 * exp_ch4.adb (Expand_Concatenate): If the target of the
5231 concatenation is a library-level entity, always use the off-line
5232 version of concatenation, regardless of optimization level. This
5233 is space-efficient, and prevents linking problems when some
5234 units are compiled with different optimization levels.
5235
5236 2014-01-27 Ed Schonberg <schonberg@adacore.com>
5237
5238 * sem_ch5.adb: Code clean up.
5239
5240 2014-01-27 Ed Schonberg <schonberg@adacore.com>
5241
5242 * par-ch5.adb (P_Iterator_Specification): Improve error recovery
5243 when an array or container iterator includes a subtype indication,
5244 which is only legal in an element iterator.
5245
5246 2014-01-27 Thomas Quinot <quinot@adacore.com>
5247
5248 * exp_ch7.adb: Minor reformatting.
5249
5250 2014-01-27 Robert Dewar <dewar@adacore.com>
5251
5252 * opt.adb (SPARK_Mode): Default for library units is None rather
5253 than Off.
5254 * opt.ads: Remove AUTO from SPARK_Mode_Type SPARK_Mode_Type is
5255 no longer ordered.
5256 * sem_prag.adb (Analyze_Pragma, case SPARK_Mode): Remove AUTO
5257 possibility.
5258 * snames.ads-tmpl (Name_Auto): Removed, no longer used.
5259
5260 2014-01-27 Robert Dewar <dewar@adacore.com>
5261
5262 * par-ch5.adb (P_Sequence_Of_Statements): Make entry in
5263 Suspicious_Labels table if we have identifier; followed by loop
5264 or block.
5265 * par-endh.adb (Evaluate_End_Entry): Search Suspicious_Labels table.
5266 * par.adb (Suspicious_Labels): New table.
5267
5268 2014-01-27 Robert Dewar <dewar@adacore.com>
5269
5270 * exp_aggr.adb (Check_Bounds): Reason is range check, not
5271 length check.
5272
5273 2014-01-27 Yannick Moy <moy@adacore.com>
5274
5275 * get_spark_xrefs.adb (Get_SPARK_Xrefs): Accept new type 'c' for
5276 reference.
5277 * lib-xref-spark_specific.adb (Is_Global_Constant): Remove useless
5278 function now.
5279 (Add_SPARK_Xrefs): Include references to constants.
5280 * spark_xrefs.ads Document new character 'c' for references to
5281 constants.
5282
5283 2014-01-27 Thomas Quinot <quinot@adacore.com>
5284
5285 * exp_smem.adb (Add_Write_After): For a function call, insert write as
5286 an after action in a transient scope.
5287
5288 2014-01-27 Thomas Quinot <quinot@adacore.com>
5289
5290 * exp_smem.adb (Expand_Shared_Passive_Variable): For a reference
5291 to a shared variable as an OUT formal in a call to an init proc,
5292 the 'Read call must be emitted after, not before, the call.
5293
5294 2014-01-27 Robert Dewar <dewar@adacore.com>
5295
5296 * gnat_rm.texi: Remove mention of AUTO mode for SPARK_Mode pragma.
5297
5298 2014-01-27 Robert Dewar <dewar@adacore.com>
5299
5300 * a-wichha.adb (Character_Set_Version): Change to output proper
5301 value.
5302
5303 2014-01-27 Hristian Kirtchev <kirtchev@adacore.com>
5304
5305 * einfo.adb (Is_Input_Only_State): Removed.
5306 (Is_Non_Volatile_State): Removed.
5307 (Is_Output_State): Removed.
5308 * einfo.ads (Is_Input_Only_State): Remove attribute and
5309 subprogram. Update related entity.
5310 (Is_Non_Volatile_State):
5311 Remove attribute and subprogram. Update related entity.
5312 (Is_Output_State): Removed attribute and subprogram. Update
5313 related entity.
5314 * exp_ch6.adb (Expand_Subprogram_Contract): Update comment on
5315 generated code.
5316 * sem_ch3.adb (Analyze_Declarations): Analyze the contract of
5317 an object, not just variables.
5318 (Analyze_Object_Contract): New routine.
5319 (Analyze_Variable_Contract): Removed.
5320 (Process_Discriminants): Detect an illegal use of volatile
5321 discriminant in SPARK mode.
5322 * sem_ch5.adb (Analyze_Iterator_Specification):
5323 Detect an illegal use of volatile loop variable.
5324 (Analyze_Loop_Parameter_Specification): Detect an illegal use
5325 of volatile loop variable.
5326 * sem_ch6.adb (Process_Formals): Update the volatile object
5327 detection. Detect an illegal formal of mode IN OUT or OUT in
5328 SPARK mode. Enhance the error messages with references.
5329 * sem_ch12.adb (Instantiate_Object): Update the volatile object
5330 detection. Enhance the error messages with references.
5331 * sem_prag.adb (Analyze_Abstract_State): Enhance the error
5332 messages with references.
5333 (Analyze_Contract_Case): Enhance the error messages with references.
5334 (Analyze_External_Property): Call Check_Duplicate_Property to process
5335 an external property.
5336 (Analyze_External_Property_In_Decl_Part): New routine.
5337 (Analyze_External_State_In_Decl_Part): Removed.
5338 (Analyze_Global_Item): Detect an illegal
5339 use of a volatile constant. Detect an illegal use
5340 of a variable with enabled Effective_Reads. Enhance
5341 the error messages with references. Remove obsolete
5342 checks concerning Input_Only and Output_Only states.
5343 (Analyze_Initialization_Item): Enhance the error messages
5344 with references.
5345 (Analyze_Initializes_In_Decl_Part): Do not
5346 collect the states and variables when the initialization list
5347 is null.
5348 (Analyze_Input_Item): Enhance the error messages with references.
5349 (Analyze_Input_Output): Enhance the error messages with references.
5350 (Analyze_Pragma): Enhance the error messages with references.
5351 (Analyze_Refinement_Clause): Code reformatting.
5352 (Analyze_Refined_Depends_In_Decl_Part):
5353 Rename global variable Global to Reg_Global and update all
5354 occurrences. Add local variables D7 and D8. Update the error
5355 messages with references. Update the call to Collect_Global_Items.
5356 (Analyze_Refined_Global_In_Decl_Part): Add local variables
5357 Has_Proof_In_State, Proof_In_Constits and Proof_In_Items. Update
5358 the call to Collect_Global_Items. Account for a Proof_In state
5359 in null / useless refinement checks. Verify the coverage of
5360 Proof_In states.
5361 (Check_Dependency_Clause): Remove local variable
5362 Out_Constits. Remove the retrieval and removal of constituents
5363 for an Output_Only state. Remove the reporting of unused
5364 Output_Only state constituents.
5365 (Check_Duplicate_Mode): Enhance
5366 the error message with a reference.
5367 (Check_Duplicate_Property): New routine.
5368 (Check_Duplicate_Option): Enhance the error message with a reference.
5369 (Check_External_Properties): Enhance the error message with a reference.
5370 (Check_Function_Return): Enhance the error message with a reference.
5371 (Check_In_Out_States): Update
5372 comment on usage. Add a specialized error message for Proof_In
5373 constituents. Enhance the error message with a reference.
5374 (Check_Input_States): Update comment on usage. Account for
5375 possible Proof_In constituents. Enhance the error message
5376 with a areference.
5377 (Check_Matching_Constituent): Enhance the error message with a
5378 reference.
5379 (Check_Matching_State): Enchance the error message with a reference.
5380 (Check_Mode): Add local variable From_Global. Update the call to
5381 Find_Mode. Emit more precise error messages concerning extra items
5382 (Check_Mode_Restriction_In_Enclosing_Context): Consider
5383 pragma Refined_Global. Enhance the error message with a
5384 reference.
5385 (Check_Mode_Restriction_In_Function): Enhance the error message with
5386 a reference.
5387 (Check_Output_States): Update comment on usage. Add local variable
5388 Posted. Account for possible Proof_In constituents. Produce a detailed
5389 list of missing constituents.
5390 (Check_Proof_In_States): New routine.
5391 (Check_Refined_Global_Item): Handle Proof_In
5392 constituents. Enchance the error message with a reference.
5393 (Collect_Global_Items): Add formal parameters Proof_In_Items
5394 and Has_Proof_In_State. Update the comment on usage. Account
5395 for Proof_In items.
5396 (Create_Or_Modify_Clause): Enchance
5397 the error message with a reference.
5398 (Find_Mode): Add
5399 formal parameter From_Global. Update the comment on usage.
5400 Detect when the mode is governed by pragma [Refined_]Global.
5401 (Output_Constituents): Removed.
5402 (Report_Extra_Constituents):
5403 Report extra Proof_In constituents.
5404 (Report_Unused_Constituents): Removed.
5405 (Usage_Error): Code reformatting. Enhance the error
5406 messages with reference.
5407 * sem_prag.ads (Analyze_External_Property_In_Decl_Part): New routine.
5408 (Analyze_External_State_In_Decl_Part): Removed.
5409 * sem_res.adb (Resolve_Actuals): Update the volatile object
5410 detection. Enhance the error message with a reference.
5411 (Resolve_Entity_Name): Update the volatile object
5412 detection. Enhance the error message with a reference.
5413 * sem_util.adb (Is_Refined_State): Add a guard to avoid a crash.
5414 (Is_SPARK_Volatile_Object): New routine.
5415 (Has_Volatile_Component): New routine.
5416 * sem_util.ads (Is_Delegate): Alphabetized.
5417 (Is_SPARK_Volatile_Object): New routine.
5418 (Has_Volatile_Component): New routine.
5419 * snames.ads-tmpl: Remove names Name_Input_Only and Name_Output_Only.
5420
5421 2014-01-27 Ed Schonberg <schonberg@adacore.com>
5422
5423 * sem_attr.adb: Resolve fully prefix of 'Update.
5424
5425 2014-01-27 Ben Brosgol <brosgol@adacore.com>
5426
5427 * gnat_rm.texi: Minor clarifications.
5428
5429 2014-01-27 Robert Dewar <dewar@adacore.com>
5430
5431 * sem_elab.adb (Check_Internal_Call_Continue): Avoid complaining
5432 about call that is generated as part of an Initial_Condition
5433 check.
5434 * sem_prag.adb: Minor spelling correction.
5435
5436 2014-01-27 Robert Dewar <dewar@adacore.com>
5437
5438 * sem_prag.adb (Set_Convention_From_Pragma): Check that
5439 convention Ghost can only apply to functions.
5440 * einfo.ads, einfo.adb (Is_Ghost_Subprogram): Add clarifying comment.
5441
5442 2014-01-27 Robert Dewar <dewar@adacore.com>
5443
5444 * gnat_ugn.texi: Add Short_Enums to documentation of
5445 -gnatet/-gnateT.
5446
5447 2014-01-27 Robert Dewar <dewar@adacore.com>
5448
5449 * sem_prag.adb (Analyze_Input_Item): Correct check for input
5450 item in same package.
5451 * sem_util.ads, sem_util.adb (Within_Scope): New function.
5452
5453 2014-01-26 Arnaud Charlet <charlet@adacore.com>
5454
5455 * a-intnam-lynxos.ads, mlib-tgt-specific-lynxos.adb,
5456 s-osinte-lynxos-3.adb, s-osinte-lynxos-3.ads, s-osinte-lynxos.adb,
5457 s-osinte-lynxos.ads, s-taprop-lynxos.adb, s-tpopsp-lynxos.adb,
5458 system-lynxos-ppc.ads, system-lynxos-x86.ads: Removed, no longer
5459 maintained.
5460
5461 2014-01-25 Eric Botcazou <ebotcazou@adacore.com>
5462
5463 * gcc-interface/Makefile.in: Fix oversight.
5464
5465 2014-01-25 Eric Botcazou <ebotcazou@adacore.com>
5466
5467 * gcc-interface/utils.c (convert_to_fat_pointer): Un-obfuscate the
5468 conversion from a thin pointer with a shifted value.
5469 * gcc-interface/utils2.c (gnat_build_constructor): Propagate the
5470 read-only flag from the values onto the result.
5471 (gnat_invariant_expr): Accept read-only CONSTRUCTORs.
5472
5473 2014-01-25 Tristan Gingold <gingold@adacore.com>
5474
5475 * gcc-interface/decl.c (gnat_to_gnu_entity): Always build a variable
5476 for E_Variable with a pragma Linker_Section.
5477
5478 2014-01-25 Robert Dewar <dewar@adacore.com>
5479
5480 * gcc-interface/decl.c (gnat_to_gnu_param): Make sure an Out parameter
5481 with Default_Value aspect is passed in by copy.
5482
5483 2014-01-24 Eric Botcazou <ebotcazou@adacore.com>
5484
5485 * set_targ.adb: Set Short_Enums.
5486 * gcc-interface/lang.opt (fshort-enums): New option.
5487 * gcc-interface/misc.c (gnat_handle_option): Handle it.
5488 (gnat_post_options): Do not modify the global settings.
5489
5490 2014-01-24 Robert Dewar <dewar@adacore.com>
5491
5492 * g-rannum.ads, g-rannum.adb (Random_Ordinary_Fixed): New generic
5493 function.
5494 (Random_Decimal_Fixed): New generic function.
5495 * s-rannum.ads: Minor comment clarifications.
5496
5497 2014-01-24 Robert Dewar <dewar@adacore.com>
5498
5499 * back_end.adb: Remove Short_Enums handling (handled in
5500 Ttypes/Get_Targ now) Minor added comments.
5501 * freeze.adb: Change name Short_Enums_On_Target to
5502 Target_Short_Enums.
5503 * get_targ.ads, get_targ.adb (Get_Short_Enums): New function.
5504 * opt.ads: Minor comment updates.
5505 * sem_ch13.adb: Change name Short_Enums_On_Target to
5506 Target_Short_Enums.
5507 * set_targ.adb: Set Short_Enums from gcc back end.
5508 * set_targ.ads (Short_Enums): New variable.
5509 * targparm.ads, targparm.adb: Remove Short_Enums entries (handled in
5510 Ttypes/Get_Targ now).
5511 * ttypes.ads (Target_Short_Enums): New constant boolean switch
5512
5513 2014-01-24 Pascal Obry <obry@adacore.com>
5514
5515 * g-sercom-mingw.adb: Fix serial port name for port number > 10.
5516
5517 2014-01-24 Gary Dismukes <dismukes@adacore.com>
5518
5519 * exp_disp.adb (Expand_Dispatching_Call): Call Unqualify on Param when
5520 comparing it with Ctrl_Arg, since Ctrl_Arg may have had qualification
5521 stripped off.
5522
5523 2014-01-24 Robert Dewar <dewar@adacore.com>
5524
5525 * sinfo.ads, make.adb, prj-env.adb: Minor reformatting.
5526
5527 2014-01-24 Vincent Celier <celier@adacore.com>
5528
5529 * prj.adb (Add_Aggregated_Project): Do not add a project in
5530 the list if it is already there.
5531
5532 2014-01-24 Yannick Moy <moy@adacore.com>
5533
5534 * lib-xref-spark_specific.adb (Enclosing_Subprogram_Or_Package):
5535 Correct the search for a subrogram declaration to which a pragma is
5536 attached.
5537
5538 2014-01-24 Bob Duff <duff@adacore.com>
5539
5540 * gnat_ugn.texi: Document --decimal-grouping and
5541 --based-grouping switches in gnatpp.
5542
5543 2014-01-24 Ed Schonberg <schonberg@adacore.com>
5544
5545 * sinfo.ads: Documentation update.
5546
5547 2014-01-24 Ed Schonberg <schonberg@adacore.com>
5548
5549 * sem_ch3.adb (Constant_Redeclaration): New declaration is
5550 illegal if previous one has an initial expression that is an
5551 aggregate expanded into assignments.
5552
5553 2014-01-24 Ed Schonberg <schonberg@adacore.com>
5554
5555 * sem_ch5.adb (Analyze_Loop_Parameter_Specification): Small
5556 code reorganization to remove spurious warning on a loop with
5557 an array element iterator that has a null range.
5558
5559 2014-01-24 Vincent Celier <celier@adacore.com>
5560
5561 * make.adb (Binding_Phase): When setting the Ada paths, use
5562 the library ALI dir, not the object dir in libraries.
5563
5564 2014-01-24 Yannick Moy <moy@adacore.com>
5565
5566 * sinfo.ads: Add documentation of check flag fields.
5567
5568 2014-01-24 Ed Schonberg <schonberg@adacore.com>
5569
5570 * sem_res.adb (Resolve_Actuals): If an actual is a view
5571 conversion of a discriminated object, and the formal type is
5572 discriminated and constrained, apply a discriminant check to
5573 the object itself.
5574
5575 2014-01-24 Robert Dewar <dewar@adacore.com>
5576
5577 * prj.adb, prj-env.adb, back_end.adb: Add comment, minor code clean ups.
5578
5579 2014-01-24 Ed Schonberg <schonberg@adacore.com>
5580
5581 * sem_ch3.adb (Analyze_Declarations): At the end of an
5582 appropriate declarative part, call Freeze_All from the first
5583 declaration in the scope, not from the first unfrozen one. This
5584 is necessary to apply visibility checks to entities with delayed
5585 aspects. Otherwise, in the presence of instantiations and cleanups
5586 that they may generate, the delayed aspects may be analyzed too
5587 late and produce spurious visibility errors.
5588 * sem_attr.adb: Place etype on range.
5589 * sem_ch6.adb: Documentation expression functions.
5590
5591 2014-01-24 Robert Dewar <dewar@adacore.com>
5592
5593 * exp_ch7.adb: Minor change of Indices to Indexes (preferred
5594 terminology in compiler).
5595
5596 2014-01-24 Robert Dewar <dewar@adacore.com>
5597
5598 * scans.ads: Remove Tok_Raise from Sterm, Eterm, After_SM
5599 categories, now that Ada 95 supports raise expressions.
5600
5601 2014-01-24 Robert Dewar <dewar@adacore.com>
5602
5603 * freeze.adb (Freeze_Enumeration_Type): Use new target parameter
5604 Short_Enums_On_Target.
5605 * sem_ch13.adb (Set_Enum_Esize): Take Short_Enums_On_Target
5606 into account.
5607 * targparm.ads, targparm.adb: Add new target parameter Short_Enums.
5608
5609 2014-01-24 Ed Schonberg <schonberg@adacore.com>
5610
5611 * sem_ch5.adb (Analyze_Iterator_Specification): If subtype
5612 indication is given explicity, check that it matches the array
5613 component type or the container element type of the domain
5614 of iteration.
5615
5616 2014-01-24 Tristan Gingold <gingold@adacore.com>
5617
5618 * back_end.adb (Scan_Compiler_Arguments): Set Short_Enums_On_Target.
5619 * gcc-interface/misc.c (flag_short_enums): Declare.
5620 (gnat_post_options): Set it.
5621
5622 2014-01-24 Vincent Celier <celier@adacore.com>
5623
5624 * prj-env.adb (Ada_Objects_Path): Use Ada_Objects_Path_No_Libs
5625 to cache the result when Including_Libraries is False.
5626 * prj-env.ads (Ada_Objects_Path): Update documentation
5627 * prj.adb (Free (Project_Id)): Also free Ada_Objects_Path_No_Libs
5628 (Get_Object_Directory): Return the Library_Ali_Dir only when
5629 when Including_Libraries is True.
5630 * prj.ads (Get_Object_Directory): Fix and complete documentation
5631 (Project_Data): New component Ada_Objects_Path_No_Libs
5632
5633 2014-01-24 Robert Dewar <dewar@adacore.com>
5634
5635 * checks.adb (Expr_Known_Valid): Result of fpt operator never
5636 considered valid.
5637
5638 2014-01-24 Eric Botcazou <ebotcazou@adacore.com>
5639
5640 * back_end.adb: Minor fix in comment.
5641
5642 2014-01-24 Javier Miranda <miranda@adacore.com>
5643
5644 * sem_ch3.adb (Check_Abstract_Overriding): Code reestructuration
5645 required to report the error in case of task types.
5646
5647 2014-01-24 Ed Schonberg <schonberg@adacore.com>
5648
5649 * sem_attr.adb: Additional index checking.
5650
5651 2014-01-24 Ed Schonberg <schonberg@adacore.com>
5652
5653 * sem_attr.adb (Analyze_Attribute, case 'Update): Analyze
5654 expressions in each component association, and for records note
5655 the entity in each association choice, for subsequent resolution.
5656 (Resolve_Attribute, case 'Update): Complete resolution of
5657 expressions in each component association.
5658
5659 2014-01-24 Robert Dewar <dewar@adacore.com>
5660
5661 * sem.adb (Sem): Avoid premature reference to Current_Sem_Unit
5662 (this was causing Is_Main_Unit_Or_Main_Unit_Spec to be set wrong,
5663 leading to wrong handling of SPARK_Mode for library units).
5664
5665 2014-01-24 Robert Dewar <dewar@adacore.com>
5666
5667 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Set SPARK_Mode
5668 on generic instances (do not consider them to be internally
5669 generated)
5670
5671 2014-01-24 Doug Rupp <rupp@adacore.com>
5672
5673 * s-osinte-android.ads (pthread_sigmask): Import sigprocmask
5674 vice pthread_sigmask.
5675
5676 2014-01-24 Vincent Celier <celier@adacore.com>
5677
5678 * prj.adb (Debug_Output (Str, Str2)): Output if verbosity is
5679 not default.
5680
5681 2014-01-24 Vincent Celier <celier@adacore.com>
5682
5683 * prj-ext.adb (Add): Do not output anything when Silent is True,
5684 whatever the verbosity. When Source is From_External_Attribute,
5685 set the corresponding environment variable if it is not already set.
5686 * prj-ext.ads (Add): New Boolean parameter Silent, defaulted
5687 to False
5688 * prj-proc.adb (Process_Expression_For_Associative_Array):
5689 For attribute External, call Prj.Ext.Add with Silent set to
5690 True for the child environment, to avoid useless output in non
5691 default verbosity.
5692
5693 2014-01-24 Ed Schonberg <schonberg@adacore.com>
5694
5695 * sem_res.adb (Set_Slice_Subtype): Handle properly a discrete
5696 range given by a subtype indication, and force evaluation of
5697 the bounds, as for a simple range.
5698 * exp_util.adb (Evaluate_Slice_Bounds): Utility to force evaluation
5699 of bounds of slice for various kinds of discrete ranges.
5700 (Evaluate_Name, Evaluate_Subtype_From_Expr): use
5701 Evaluate_Slice_Bounds.
5702
5703 2014-01-24 Bob Duff <duff@adacore.com>
5704
5705 * s-taskin.ads (Activator): Make this Atomic, because
5706 Activation_Is_Complete reads it, and that can be called
5707 from any task. Previously, this component was only
5708 modified by the activator before activation, and by
5709 Self after activation.
5710 * a-taside.ads, a-taside.adb (Environment_Task,
5711 Activation_Is_Complete): Implement these missing functions.
5712
5713 2014-01-24 Doug Rupp <rupp@adacore.com>
5714
5715 * init.c: Add a handler section for Android.
5716
5717 2014-01-24 Arnaud Charlet <charlet@adacore.com>
5718
5719 * i-cexten.ads (Unsigned_33..64, Unsigned_33..64): New types.
5720
5721 2014-01-24 Ed Schonberg <schonberg@adacore.com>
5722
5723 * sem_ch4.adb (Operator_Check): If one operand is a
5724 Raise_Expression, set its type to that of the other operand.
5725 * sem_res.adb (Resolve_Raise_Expression): new procedure.
5726 (Resolve_Actuals): For an actual that is a Raise_Expression,
5727 set the type to that of the formal.
5728 * sem_type.adb (Find_Unique_Type): If one of the operands is a
5729 Raise_Expression, return type of the other operand.
5730
5731 2014-01-24 Ed Schonberg <schonberg@adacore.com>
5732
5733 * sem_aggr.adb (Resolve_Record_Aggregate): If a scalar
5734 component of the record has a type with a default aspect, and
5735 the corresponding aggregate component is initiaized with a box,
5736 use the default value in the rewritten aggregate.
5737
5738 2014-01-24 Tristan Gingold <gingold@adacore.com>
5739
5740 * s-interr.ads, s-interr.adb, s-interr-hwint.adb, s-interr-vms.adb,
5741 s-interr-sigaction.adb,
5742 s-interr-dummy.adb (Install_Restricted_Handlers): Add Prio parameter.
5743 * exp_ch9.adb (Make_Initialize_Protection): Add Prio parameter
5744 to the call to Install_Restricted_Handlers.
5745
5746 2014-01-24 Emmanuel Briot <briot@adacore.com>
5747
5748 * prj-nmsc.adb (Check_File): Add protection when the source is
5749 not fully initialized.
5750
5751 2014-01-24 Ed Schonberg <schonberg@adacore.com>
5752
5753 * sem_util.adb (Is_Post_State): In a postcondition, a selected
5754 component that denotes an implicit dereference is a reference
5755 to the post state of the subprogram.
5756
5757 2014-01-24 Robert Dewar <dewar@adacore.com>
5758
5759 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): SPARK_Mode OFF
5760 for generated subprograms.
5761 (Analyze_Subprogram_Specification): Ditto.
5762
5763 2014-01-24 Vincent Celier <celier@adacore.com>
5764
5765 * prj-dect.adb (Check_Attribute_Allowed): Detect more forbidden
5766 attributes in package Builder of aggregate and aggregate library
5767 projects.
5768 * prj-nmsc.adb (Process_Naming_Scheme.Check.Check_Aggregate):
5769 Remove procedure (Process_Naming_Scheme.Check.Check_Aggregated):
5770 Remove parameters. Change error message from "... externally
5771 build library ..." to "... externally built project ...".
5772 (Process_Naming_Scheme.Check): Do not do any check in aggregate
5773 project, as attribute Library_Dir and Library_Name have already
5774 been detected as forbidden.
5775
5776 2014-01-24 Vincent Celier <celier@adacore.com>
5777
5778 * prj-env.adb (Find_Project): If cached project path is not in
5779 project directory, look in current directory first and use cached
5780 project path only if project is not found in project directory.
5781
5782 2014-01-24 Robert Dewar <dewar@adacore.com>
5783
5784 * sem_util.adb, lib-xref.adb: Correct false positive warnings.
5785
5786 2014-01-24 Vincent Celier <celier@adacore.com>
5787
5788 * projects.texi: Document that aggregate projects are only
5789 supported by gprbuild, but not by gnatmake. Document that the
5790 only attribute Switches in package Binder of aggregate projects
5791 will be ignored if its index is not others. Document that
5792 attribute Global_Config_File is allowed in package Binder of
5793 aggregate projects.
5794
5795 2014-01-24 Robert Dewar <dewar@adacore.com>
5796
5797 * sem_prag.adb: Minor code reorganization.
5798 * sem_util.adb: Minor fix of potential latent bug in Is_LHS.
5799
5800 2014-01-24 Pascal Obry <obry@adacore.com>
5801
5802 * prj-attr.adb, projects.texi, snames.ads-tmpl: Add Excluded_Patterns
5803 attribute definition.
5804
5805 2014-01-24 Vincent Celier <celier@adacore.com>
5806
5807 * makeutl.adb (Queue.Insert_No_Roots): In gprbuild, do not put
5808 in the Queue the same source (same path, same multi-source index)
5809 from the same project file, to avoid compiling several times
5810 the same source.
5811
5812 2014-01-24 Eric Botcazou <ebotcazou@adacore.com>
5813
5814 * einfo.ads (First_Rep_Item): Remove obsolete stuff.
5815 (Has_Gigi_Rep_Item): Likewise.
5816 * sem_prag.adb (Analyze_Pragma) <Pragma_Linker_Section>: Do not set
5817 Has_Gigi_Rep_Item for objects.
5818 * gcc-interface/decl.c (prepend_one_attribute_to): Rename into...
5819 (prepend_one_attribute): ...this.
5820 (prepend_one_attribute_pragma): New function extracted from...
5821 (prepend_attributes): ...here. Swap the parameters for consistency.
5822 (gnat_to_gnu_entity): Adjust calls to prepend_one_attribute_to and to
5823 prepend_attributes.
5824 <object>: Deal with a pragma Linker_Section on a constant
5825 or variable. <E_Function>: Deal with a pragma Linker_Section
5826 on a subprogram.
5827 (get_minimal_subprog_decl): Adjust calls to prepend_one_attribute_to.
5828
5829 2014-01-24 Vincent Celier <celier@adacore.com>
5830
5831 * opt.ads: Minor comment update.
5832
5833 2014-01-24 Robert Dewar <dewar@adacore.com>
5834
5835 * sem_prag.adb (Analyze_Input_Output): Add missing error check
5836 for junk operand.
5837 * sem_util.adb (Is_Refined_State): Add defense against junk
5838 tree from error.
5839
5840 2014-01-24 Pascal Obry <obry@adacore.com>
5841
5842 * projects.texi: Removes Build_Slaves attribute documentation.
5843
5844 2014-01-23 Robert Dewar <dewar@adacore.com>
5845
5846 * opt.adb (Register_Opt_Config_Switches): Save SPARK_Mode_Pragma
5847 setting.
5848
5849 2014-01-23 Ed Schonberg <schonberg@adacore.com>
5850
5851 * sem_util.adb (Is_Potentially_Unevaluated): Predicate only
5852 applies to expressions that come from source.
5853 * sem_attr.adb (Analyze_Attribute, case 'Old): Improve error
5854 message.
5855 (Analyze_Attribute, case 'Loop_Entry): Apply SPARK 2014 legality
5856 rule regarding potentially unevaluated expressions, to prefix
5857 of attribute.
5858
5859 2014-01-23 Ed Schonberg <schonberg@adacore.com>
5860
5861 * exp_util.adb (Make_Invqriant_Call): If type of expression is
5862 a private extension, get invariant from base type.
5863
5864 2014-01-23 Robert Dewar <dewar@adacore.com>
5865
5866 * sem_util.adb, sem_attr.adb: Minor reformatting.
5867
5868 2014-01-23 Robert Dewar <dewar@adacore.com>
5869
5870 * opt.adb (Save_Opt_Config_Switches): Save SPARK_Mode_Pragma
5871 (Restore_Opt_Config_Switches): Restore SPARK_Mode_Pragma.
5872 * sem.adb (Semantics): Remove save/restore of
5873 SPARK_Mode[_Pragma]. Not needed since already done in
5874 Save/Restore_Opt_Config_Switches.
5875
5876 2014-01-23 Robert Dewar <dewar@adacore.com>
5877
5878 * gnat_rm.texi, einfo.adb, einfo.ads, sem_prag.adb, gnat_ugn.texi,
5879 freeze.adb, repinfo.adb, aspects.adb, aspects.ads, sem_ch13.adb:
5880 Linker_Section enhancements.
5881
5882 2014-01-23 Tristan Gingold <gingold@adacore.com>
5883
5884 * gnat_rm.texi: Minor editing.
5885
5886 2014-01-23 Robert Dewar <dewar@adacore.com>
5887
5888 * opt.adb (Set_Opt_Config_Switches): Reset SPARK mode for
5889 with'ed internal units.
5890 * sem.adb (Semantics): Save and restore SPARK_Mode[_Pragma].
5891
5892 2014-01-23 Javier Miranda <miranda@adacore.com>
5893
5894 * lib-xref.adb (Generate_Reference): As part of processing the
5895 "end-of-spec" reference generate an extra reference to the first
5896 private entity of the package.
5897 * xr_tabls.adb (Add_Reference): No action needed for the extra
5898 'E' reference associated; similar to the processing of the
5899 'e' reference.
5900
5901 2014-01-23 Bob Duff <duff@adacore.com>
5902
5903 * gnat_ugn.texi: Change "--&pp off" to "--!pp off".
5904
5905 2014-01-23 Ed Schonberg <schonberg@adacore.com>
5906
5907 * sem_util.ads, sem_util.adb (Is_Potentially_Unevaluated): new
5908 predicate to implement rule given in 6.1.1 (20/3).
5909 * sem_attr.adb (Analyze_Attribute, case 'Old): Reject prefix of
5910 'Old in a postcondition, if it is potentially unevaluated and
5911 it is not an entity name.
5912
5913 2014-01-23 Bob Duff <duff@adacore.com>
5914
5915 * gnat_ugn.texi: Document the new "--&pp off" feature of gnatpp.
5916
5917 2014-01-23 Robert Dewar <dewar@adacore.com>
5918
5919 * gnatlink.adb (Gnatlink): Fix problem of generating bad name
5920 msg on VMS.
5921
5922 2014-01-23 Bob Duff <duff@adacore.com>
5923
5924 * g-dynhta.ads: Minor comment fix.
5925
5926 2014-01-23 Yannick Moy <moy@adacore.com>
5927
5928 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Inherit SPARK_Mode
5929 from spec on body only when not already inherited on spec. Set
5930 SPARK_Mode from context on body without previous spec. *
5931 * sem_prag.adb (Analyze_Pragma): Check placement of pragma on
5932 library-level entities. Correct retrieval of entity from
5933 declaration, for cases where the declaration is not a unit.
5934 * sem_ch12.adb (Instantiate_Object): Avoid
5935 calling Is_Volatile_Object on an empty node.
5936
5937 2014-01-23 Robert Dewar <dewar@adacore.com>
5938
5939 * gnatlink.adb (Gnatlink): Check for suspicious executable file
5940 names on windows.
5941
5942 2014-01-23 Robert Dewar <dewar@adacore.com>
5943
5944 * a-ngelfu.ads: Remove bad uses of AND which should be AND THEN.
5945 * sem_res.adb (Check_No_Direct_Boolean_Operators): Don't give
5946 style errors in instances.
5947 * g-dynhta.ads (Static_HTable): Comment updates.
5948
5949 2014-01-23 Vincent Celier <celier@adacore.com>
5950
5951 * prj-conf.adb (Get_Or_Create_Configuration_File): Do not attempt
5952 to find a configuration project file when Config_File_Name is
5953 No_Configuration_File.
5954 * prj-conf.ads (No_Configuration_File): New constant String.
5955 * prj-pars.adb (Parse): Call Get_Or_Create_Configuration_File
5956 with Config_File_Name set to No_Configuration_File, so that
5957 no existing configuration project file will be used, and the
5958 configuration project will be only created in memory when
5959 Add_Default_GNAT_Naming_Scheme is called.
5960 * projects.texi: Minor reformatting.
5961
5962 2014-01-23 Vincent Celier <celier@adacore.com>
5963
5964 * prj-conf.adb (Get_Or_Create_Configuration_File): Never parse
5965 a config project file if On_Load_Config is not null.
5966 * prj-pars.adb: Minor comment changes.
5967
5968 2014-01-23 Ed Schonberg <schonberg@adacore.com>
5969
5970 * lib-xref.adb (Output_References): Output progenitors of
5971 synchronized tagged types, for source navigation.
5972
5973 2014-01-23 Robert Dewar <dewar@adacore.com>
5974
5975 * exp_util.adb, sinfo.adb, sinfo.ads, sem.adb, sem_res.adb,
5976 expander.adb, exp_ch11.adb, exp_ch11.ads, sem_ch11.adb, sem_ch11.ads,
5977 sprint.adb, sprint.ads: Remove unused node N_Subprogram_Info.
5978
5979 2014-01-23 Emmanuel Briot <briot@adacore.com>
5980
5981 * prj-conf.adb (Get_Or_Create_Configuration_File): call
5982 On_Load_Config later.
5983
5984 2014-01-23 Hristian Kirtchev <kirtchev@adacore.com>
5985
5986 * sem_ch3.adb (Analyze_Declarations): Do not
5987 generate the spec of the late primitive in ASIS mode. Add two
5988 comments to explain the special cases when the expansion is
5989 not performed.
5990
5991 2014-01-23 Robert Dewar <dewar@adacore.com>
5992
5993 * sem_util.adb (Note_Possible_Modification): Fix error of
5994 misbehaving for implicit dereference cases in -gnatc mode.
5995
5996 2014-01-23 Emmanuel Briot <briot@adacore.com>
5997
5998 * prj-pars.adb: Minor reformatting.
5999
6000 2014-01-22 Ed Schonberg <schonberg@adacore.com>
6001
6002 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): A subprogram
6003 body generated for an expression function within a protected body
6004 needs a set of renaming declarations if the expression function
6005 comes from source.
6006
6007 2014-01-22 Ed Schonberg <schonberg@adacore.com>
6008
6009 * lib-xref.adb (Get_Type_Reference): In semantics-only mode,
6010 list interface progenitor of a tagged concurrent type, for better
6011 source navigation.
6012
6013 2014-01-22 Robert Dewar <dewar@adacore.com>
6014
6015 * lib.adb (In_Extended_Main_Code_Unit): Return False for
6016 Standard_Location.
6017 (In_Extended_Main_Source_Unit): Return False for Standard_Location.
6018 * lib.ads (In_Extended_Main_Code_Unit): Add documentation on
6019 treatment of Slocs No_Location and Standard_Location.
6020 * restrict.adb (Check_Restriction_No_Dependence): Explicitly
6021 check for entity with Standard_Location Sloc, rather than relying
6022 on Lib routines to do that.
6023 * sem_res.adb (Resolve_Call): Implement SPARK_05 restriction
6024 that a call cannot occur before a later occuring body within
6025 the same unit.
6026
6027 2014-01-22 Thomas Quinot <quinot@adacore.com>
6028
6029 * rtsfind.adb: Update comment.
6030
6031 2014-01-22 Hristian Kirtchev <kirtchev@adacore.com>
6032
6033 * sem_aux.ads, sem_aux.adb (Is_Body): New routine.
6034 * sem_ch3.adb (Analyze_Declarations): Add local variable
6035 Body_Seen. Generate the spec of a late controlled
6036 primitive body that is about to freeze its related type.
6037 (Handle_Late_Controlled_Primitive): New routine.
6038
6039 2014-01-22 Robert Dewar <dewar@adacore.com>
6040
6041 * a-stream.adb: Minor reformatting.
6042
6043 2014-01-22 Ed Schonberg <schonberg@adacore.com>
6044
6045 * sem_ch8.adb (From_Actual_Package): Introduce a recursive
6046 sub-procedure Declared_In_Actual to handle properly the visibility
6047 of actuals in actual packages, that are themselves actuals to a
6048 actual package of the current instance. This mimics properly the
6049 visibility of formals of formal packages declared with a box,
6050 within the corresponding generic unit.
6051
6052 2014-01-22 Robert Dewar <dewar@adacore.com>
6053
6054 * checks.adb: Do not assume that a volatile variable is valid.
6055
6056 2014-01-22 Thomas Quinot <quinot@adacore.com>
6057
6058 * g-catiio.ads (Image, Value): Clarify that these functions
6059 operate in the local time zone. Minor documentation update.
6060
6061 2014-01-22 Thomas Quinot <quinot@adacore.com>
6062
6063 * csets.adb, csets.ads, opt.ads: Minor documentation fixes.
6064
6065 2014-01-22 Robert Dewar <dewar@adacore.com>
6066
6067 * sem_aux.adb, sem_aux.ads, sem_ch3.adb (Has_Unconstrained_Elements):
6068 Moved to sem_aux.adb.
6069
6070 2014-01-22 Robert Dewar <dewar@adacore.com>
6071
6072 * vms_data.ads: Minor reformatting.
6073
6074 2014-01-22 Robert Dewar <dewar@adacore.com>
6075
6076 * debug.adb: Document messages affected by -gnatd.E including
6077 the new ones that relate to late definition of equality.
6078 * sem_ch6.adb (Check_Untagged_Equality): In Ada 2012 mode, if
6079 debug flag -gnatd.E is set, then generate warnings rather than
6080 errors.
6081 (Check_Untagged_Equality): In earlier versions of Ada,
6082 generate warnings if Warn_On_Ada_2012_Incompatibility flag is set.
6083
6084 2014-01-22 Robert Dewar <dewar@adacore.com>
6085
6086 * sem_prag.adb (Usage_Error): Output additional messages for
6087 unconstrained OUT parameters lacking an input dependency.
6088
6089 2014-01-22 Robert Dewar <dewar@adacore.com>
6090
6091 * sem_ch4.adb: Minor reformatting.
6092
6093 2014-01-22 Robert Dewar <dewar@adacore.com>
6094
6095 * restrict.ads: Minor reformatting.
6096 * sem_res.adb (Resolve_Call): Check for SPARK_05 restriction that
6097 forbids a call from within a subprogram to the same subprogram.
6098
6099 2014-01-22 Thomas Quinot <quinot@adacore.com>
6100
6101 * a-stream.ads (Read_SEA, Write_SEA): New subprograms, optimized
6102 stream attributes for Stream_Element_Array.
6103 * a-stream.adb (Read_SEA, Write_SEA): Bodies for the above.
6104 * rtsfind.adb (Check_CRT): Do not reject a reference to an entity
6105 defined in the current scope.
6106
6107 2014-01-22 Robert Dewar <dewar@adacore.com>
6108
6109 * debug.adb, exp_ch4.adb, erroutc.adb: Minor reformatting.
6110
6111 2014-01-22 Thomas Quinot <quinot@adacore.com>
6112
6113 * sem_ch7.adb, sem_ch8.adb, exp_ch3.adb: Minor reformatting.
6114
6115 2014-01-22 Thomas Quinot <quinot@adacore.com>
6116
6117 * sem_ch3.adb (Analyze_Object_Declaration): For a constant
6118 declaration initialized with a function call, whose type
6119 has variable size, need to remove side effects so that the
6120 initialization expression becomes a dereference of a temporary
6121 reference to the function result.
6122
6123 2014-01-22 Yannick Moy <moy@adacore.com>
6124
6125 * errout.adb (Initialize): Remove trick to add dummy entry
6126 in Warnings table.
6127 * erroutc.adb (Set_Warnings_Mode_Off,
6128 Set_Warnings_Mode_On): Do nothing if warnings are suppressed by
6129 command line switch.
6130 * opt.ads (Warning_Mode): Document behavior
6131 wrt pragma Warnings, in normal mode and in GNATprove_Mode.
6132
6133 2014-01-22 Robert Dewar <dewar@adacore.com>
6134
6135 * sem_ch3.adb, errout.adb, erroutc.adb: Minor reformatting.
6136
6137 2014-01-22 Robert Dewar <dewar@adacore.com>
6138
6139 * sem_ch13.adb (Check_Pool_Size_Clash): New procedure
6140 (Analyze_Attribute_Definition_Clause, case Storage_Pool): call
6141 Check_Pool_Size_Clash (Analyze_Attribute_Definition_Clause,
6142 case Storage_Size): call Check_Pool_Size_Clash.
6143
6144 2014-01-22 Robert Dewar <dewar@adacore.com>
6145
6146 * sem_ch3.adb, exp_util.adb, sem_dim.adb, sem_elab.adb, sem_ch8.adb,
6147 sem_eval.ads: Minor reformatting.
6148
6149 2014-01-22 Thomas Quinot <quinot@adacore.com>
6150
6151 * sem_eval.adb (Compile_Time_Known_Bounds): Return False for
6152 Any_Composite to prevent cascaded errors.
6153
6154 2014-01-22 Yannick Moy <moy@adacore.com>
6155
6156 * errout.adb (Initialize): Do not insert special entry in Warnings
6157 table in GNATprove_Mode.
6158 * erroutc.adb (Set_Warnings_Mode_On): Add info in Warnings table in
6159 GNATprove_Mode.
6160 * gnat1drv.adb (Adjust_Global_Switches): Do not suppress frontend
6161 warnings anymore.
6162
6163 2014-01-22 Robert Dewar <dewar@adacore.com>
6164
6165 * sem_prag.adb (Analyze_Initializes_In_Decl_Part): Handle null
6166 initializes case.
6167
6168 2014-01-22 Robert Dewar <dewar@adacore.com>
6169
6170 * snames.ads-tmpl: Update header.
6171
6172 2014-01-22 Thomas Quinot <quinot@adacore.com>
6173
6174 * exp_util.adb (Insert_Actions): When inserting actions on a
6175 short circuit operator that has already been analyzed, do not park
6176 actions in node; instead introduce an N_Expression_With_Actions
6177 and insert actions immediately.
6178 Add guard for unexpected case of climbing up through statement
6179 in Actions list of an N_Expression_With_Actions.
6180 * sem_elab.adb (Insert_Elab_Check): Remove complex
6181 specialized circuitry for the case where the context is already
6182 analyzed, as it is not needed and introduces irregularities in
6183 finalization. Instead rely on the above change to Insert_Actions
6184 to ensure that late insertion on short circuit operators works
6185 as expected.
6186
6187 2014-01-22 Ed Schonberg <schonberg@adacore.com>
6188
6189 * sem_ch4.adb (Operator_Check): Improve error message when an
6190 operand of concatenation is an access type.
6191
6192 2014-01-22 Thomas Quinot <quinot@adacore.com>
6193
6194 * sem_dim.adb (Analyze_Dimension_Identifier): Add guard against
6195 cascaded error.
6196
6197 2014-01-22 Ed Schonberg <schonberg@adacore.com>
6198
6199 * sem_ch8.adb (Find_Selected_Component): Handle properly the case
6200 of an expanded name in a proper body, whose prefix is a package
6201 in the context of the proper body, when there is a homonym of
6202 the package declared in the parent unit.
6203
6204 2014-01-22 Robert Dewar <dewar@adacore.com>
6205
6206 * sem_warn.adb (Check_Use_Clause): Don't give no entities used
6207 msg if errors found.
6208 (Check_One_Unit): Same change.
6209
6210 2014-01-22 Robert Dewar <dewar@adacore.com>
6211
6212 * ug_words: Add missing/wrong entries for VMS warning switches.
6213 * sem_prag.adb (Check_Duplicate_Pragma): Avoid flagging parent type.
6214
6215 2014-01-22 Jerome Guitton <guitton@adacore.com>
6216
6217 * mlib-tgt-specific-vxworks.adb (Get_Target_Suffix): Replace xscale by
6218 arm.
6219
6220 2014-01-22 Robert Dewar <dewar@adacore.com>
6221
6222 * gnat_rm.texi, gnat_ugn.texi: Document passive task optimization
6223
6224 2014-01-22 Eric Botcazou <ebotcazou@adacore.com>
6225
6226 * gcc-interface/Makefile.in: Minor fixes.
6227
6228 2014-01-21 Robert Dewar <dewar@adacore.com>
6229
6230 * par-ch4.adb (P_If_Expression): Rewritten to improve error recovery.
6231 * par-ch5.adb (P_Condition): New version with expression prescanned.
6232 * par.adb (P_Condition): New version with expression prescanned.
6233
6234 2014-01-21 Robert Dewar <dewar@adacore.com>
6235
6236 * gnat_rm.texi: Document that Allow_Integer_Address is ignored
6237 if Address is not a private type.
6238 * sem_prag.adb (Analyze_Pragma, case Allow_Integer_Address):
6239 Ignore pragma if System.Address is not a private type.
6240
6241 2014-01-21 Arnaud Charlet <charlet@adacore.com>
6242
6243 * namet.ads (Name_Len): Initialize to 0 to avoid accessing an
6244 uninitialized value.
6245
6246 2014-01-21 Thomas Quinot <quinot@adacore.com>
6247
6248 * gnat_rm.texi (Scalar_Storage_Order): Update documentation.
6249
6250 2014-01-21 Ed Schonberg <schonberg@adacore.com>
6251
6252 * sem_ch12.adb (Set_Instance_Env): In Ada 2012 mode, preserve
6253 the value of Assertions_Enabled flag when compiling an instance of
6254 an internal unit. This facilitates the use of pre/postconditions
6255 in generic internal units, such as the new elementary function
6256 libraries.
6257
6258 2014-01-21 Robert Dewar <dewar@adacore.com>
6259
6260 * exp_aggr.adb: Minor reformatting.
6261 * sem_attr.adb: Minor reformatting.
6262 * sem_res.adb: Minor comment addition.
6263 * einfo.adb: Minor comment updates.
6264 * freeze.adb: Minor reformatting and code reorganization.
6265
6266 2014-01-21 Ed Schonberg <schonberg@adacore.com>
6267
6268 * par-ch4.adb (P_If_Expression): Handle more gracefully an
6269 elsif clause that does not have an else part.
6270
6271 2014-01-21 Robert Dewar <dewar@adacore.com>
6272
6273 * checks.adb, sem_util.ads, sem_ch4.adb: Minor reformatting.
6274 * gcc-interface/Makefile.in: clean up target pairs.
6275
6276 2014-01-21 Pascal Obry <obry@adacore.com>
6277
6278 * projects.texi: Minor typo fix.
6279
6280 2014-01-21 Thomas Quinot <quinot@adacore.com>
6281
6282 * freeze.adb (Check_Component_Storage_Order): If a record type
6283 has an explicit Scalar_Storage_Order attribute definition clause,
6284 reject any component that itself is of a composite type and does
6285 not have one.
6286
6287 2014-01-21 Ed Schonberg <schonberg@adacore.com>
6288
6289 * sem_ch10.adb (Generate_Parent_Reference): Make public so it
6290 can be used to generate proper cross-reference information for
6291 the parent units of proper bodies.
6292
6293 2014-01-21 Thomas Quinot <quinot@adacore.com>
6294
6295 * exp_pakd.adb (Expand_Packed_Element_Set,
6296 Expand_Packed_Element_Reference): No byte swapping required in
6297 the front-end for the case of a reverse storage order array,
6298 as this is now handled uniformly in the back-end. However we
6299 still need to swap back an extracted element if it is itself a
6300 nested composite with reverse storage order.
6301
6302 2014-01-21 Hristian Kirtchev <kirtchev@adacore.com>
6303
6304 * sem_prag.adb (Analyze_External_Property): Add processing for "others".
6305 (Analyze_Pragma): Update the grammar of pragma Abstract_State to
6306 include "others".
6307
6308 2014-01-21 Arnaud Charlet <charlet@adacore.com>
6309
6310 * gnat_ugn.texi: Minor updates.
6311
6312 2014-01-21 Thomas Quinot <quinot@adacore.com>
6313
6314 * exp_pakd.adb: Update comment, minor reformatting.
6315
6316 2014-01-21 Hristian Kirtchev <kirtchev@adacore.com>
6317
6318 * sem_ch3.adb (Analyze_Variable_Contract): Trigger the volatile
6319 object check when SPARK_Mode is on.
6320 * sem_ch6.adb (Process_Formals): Trigger the volatile object
6321 check when SPARK_Mode is on.
6322 * sem_ch12.adb (Instantiate_Object): Trigger the volatile object
6323 check when SPARK_Mode is on.
6324 * sem_ch13.adb (Analyze_Aspect_Specifications): Insert the
6325 corresponding pragma of aspect SPARK_Mode in the visible
6326 declarations of a package declaration.
6327 * sem_prag.adb (Analyze_Pragma): Trigger the volatile object
6328 check when SPARK_Mode is on.
6329 * sem_res.adb (Resolve_Actuals): Trigger the volatile object
6330 check when SPARK_Mode is on.
6331 (Resolve_Entity_Name): Trigger
6332 the volatile object check when SPARK_Mode is on.
6333
6334 2014-01-21 Robert Dewar <dewar@adacore.com>
6335
6336 * sem_ch3.adb, sem_prag.adb, sem_prag.ads, sem_ch12.adb, sem_res.adb,
6337 sem_ch6.adb, a-except-2005.adb: Minor reformatting.
6338
6339 2014-01-21 Ed Schonberg <schonberg@adacore.com>
6340
6341 * exp_ch3.adb (Expand_N_Object_Declaration): When a class-wide
6342 object is declared, it is rewritten as a renaming of an dynamic
6343 expression that wraps the initial value. The renaming declaration
6344 is first given an internal name, to prevent collisions with the
6345 entity already declared, and then the name is modified to reflect
6346 the original one. the modification of the name must preserve
6347 the source location of the original, to prevent spurious errors
6348 when compiling with style checks if the declaration involves
6349 more than one entity.
6350
6351 2014-01-21 Hristian Kirtchev <kirtchev@adacore.com>
6352
6353 * aspects.adb Add entries for Async_Readers, Async_Writers,
6354 Effective_Reads and Effective_Writes in table Canonical_Aspect.
6355 * aspects.ads Add entries for Async_Readers, Async_Writers,
6356 Effective_Reads and Effective_Writes in tables Aspect_Id,
6357 Aspect_Names, Aspect_Delay and Implementation_Defined_Aspect.
6358 * atree.adb (Ekind_In): New version with 8 parameters.
6359 (Node34): New routine.
6360 (Set_Node34): New routine.
6361 * atree.ads (Ekind_In): New version with 8 parameters.
6362 (Node34): New routine.
6363 (Set_Node34): New routine.
6364 * einfo.adb Contract is now Node34.
6365 (Contract): Update the assertion and node usage.
6366 (Get_Pragma): Include pragmas Async_Readers, Async_Writers,
6367 Effective_Reads and Effective_Writes.
6368 (Set_Contract): Update the assertion and node usage.
6369 (Write_Field24_Name): Remove the output for a contract.
6370 (Write_Field34_Name): Add output for a contract.
6371 * einfo.ads Contract is now Node34. Update the comment on
6372 attribute usage and related node structures.
6373 (Get_Pragma): Update the comment on usage.
6374 * par-prag.adb (Prag): Pragmas Async_Readers, Async_Writers,
6375 Effective_Reads and Effective_Writes do not require special
6376 processing by the parser.
6377 * sem_ch3.adb (Analyze_Variable_Contract): New routine.
6378 (Analyze_Declarations): Analyze the contract of a variable at
6379 the end of the declarative region.
6380 (Analyze_Object_Declaration): Create a contract for a variable.
6381 * sem_ch6.adb (Analyze_Subprogram_Contract): Update the retrieval
6382 of classification pragmas.
6383 (Process_Formals): Detect an illegal
6384 use of a volatile object as a formal in a function.
6385 * sem_ch12.adb (Instantiate_Object): Detect an illegal use of
6386 a volatile object as an actual in generic instantiation.
6387 * sem_prag.adb Add entries for Async_Readers, Async_Writers,
6388 Effective_Reads and Effective_Writes in table Sig_Flags.
6389 (Analyze_External_State_In_Decl_Part): New routine.
6390 (Analyze_Global_Item): Detect an illegal use of a volatile object
6391 as a global item of a function.
6392 (Analyze_Pragma): Reimplement
6393 pragma Abstract_State. Add support for pragmas Async_Readers,
6394 Async_Writers, Effective_Reads and Effective_Writes.
6395 (Check_External_Properties): New routine.
6396 * sem_prag.ads (Analyze_External_State_In_Decl_Part): New routine.
6397 (Check_External_Properties): New routine.
6398 * sem_res.adb (Resolve_Actuals): Detect an illegal use of a
6399 volatile object as an actual in a call.
6400 (Resolve_Entity_Name):
6401 Add local variables Par, Prev and Usage_OK. Detect illegal
6402 contexts of volatile objects.
6403 * sem_util.adb (Add_Contract_Item): Add support for
6404 pragmas associated with the contract of a variable.
6405 (Async_Readers_Enabled): New routine.
6406 (Async_Writers_Enabled): New routine.
6407 (Effective_Reads_Enabled): New routine.
6408 (Effective_Writes_Enabled): New routine.
6409 (Has_Enabled_Property):
6410 New routine.
6411 (Is_Unchecked_Conversion_Instance): New routine.
6412 (Is_Volatile_Object): Add support for entities that may denote
6413 a volatile object.
6414 * sem_util.ads (Add_Contract_Item): Update the
6415 comment on usage.
6416 (Async_Readers_Enabled): New routine.
6417 (Async_Writers_Enabled): New routine.
6418 (Effective_Reads_Enabled): New routine.
6419 (Effective_Writes_Enabled): New routine.
6420 (Is_Unchecked_Conversion_Instance): New routine.
6421 * sinfo.ads Update the comment on the structure of N_Contract.
6422 * snames.ads-tmpl Add predefined names for Async_Readers,
6423 Async_Writers, Effective_Reads and Effective_Writes. Add
6424 pragma ids for Async_Readers, Async_Writers, Effective_Reads
6425 and Effective_Writes.
6426
6427 2014-01-21 Robert Dewar <dewar@adacore.com>
6428
6429 * exp_ch4.adb (Eval_Op_Expon): Use CRT_Safe_Compile_Time_Known_Value
6430 * sem_eval.adb (Compile_Time_Known_Value): Remove special
6431 handling of CRT mode (CRT_Safe_Compile_Time_Known_Value): New
6432 function (Eval_Op_Expon): Add CRT_Safe in call to Test_Foldable
6433 (Test_Foldable): Add CRT_Safe parameter
6434 * sem_eval.ads (Compile_Time_Known_Value): Remove special
6435 handling of CRT mode.
6436 (CRT_Safe_Compile_Time_Known_Value): New function.
6437
6438 2014-01-21 Robert Dewar <dewar@adacore.com>
6439
6440 * sem_prag.adb (Analyze_Pragma, case SPARK_Mode): Fix problem
6441 with pragma or aspect that applies to package spec or subprogram
6442 spec.
6443
6444 2014-01-21 Robert Dewar <dewar@adacore.com>
6445
6446 * exp_aggr.adb: Minor reformatting.
6447
6448 2014-01-21 Johannes Kanig <kanig@adacore.com>
6449
6450 * gnat1drv.adb (Gnat1drv) remove obsolete reference to -gnatd.H.
6451
6452 2014-01-21 Bob Duff <duff@adacore.com>
6453
6454 * gnat_ugn.texi: Document the "checks" attribute in gnat2xml.
6455
6456 2014-01-21 Steve Baird <baird@adacore.com>
6457
6458 * gnat_rm.texi: Improve description of SPARK_Mode pragma.
6459
6460 2014-01-21 Vincent Celier <celier@adacore.com>
6461
6462 * prj-part.adb (Parse_Single_Project): Accept to extend a project
6463 if it has only be imported by an project being extended. When a
6464 project that has only been imported by a project being extended
6465 is imported by another project that is not being extended,
6466 reset the previous indication, so that it will be an error if
6467 this project is extended later.
6468 * prj-tree.adb (Create_Project): Include component From_Extended
6469 in table Projects_HT
6470 * prj-tree.ads (Project_Name_And_Node): New Boolean component
6471 From_Extended
6472
6473 2014-01-21 Robert Dewar <dewar@adacore.com>
6474
6475 * atree.ads, atree.adb: Add Node33 and Set_Node33.
6476 * einfo.ads, einfo.adb (SPARK_Pragma): New field (SPARK_Aux_Pragma):
6477 New field (SPARK_Pragma_Inherited): New flag
6478 (SPARK_Aux_Pragma_Inherited): New flag (SPARK_Mode_Pragmas):
6479 Removed.
6480 * lib.ads, lib.adb: Remove SPARK_Mode_Pragma, no longer used.
6481 * opt.ads (SPARK_Mode_Pragma): New global variable.
6482 * sem.ads: Add Save_SPARK_Mode_Pragma field to Scope_Stack_Entry.
6483 * sem_ch3.adb: Use new SPARK_Mode data structures.
6484 * sem_ch6.adb: Set SPARK_Mode fields in subprogram specs and bodies.
6485 * sem_ch7.adb: Set SPARK_Mode fields in package spec and body entities.
6486 * sem_ch8.adb (Push_Scope): Save SPARK_Mode_Pragma.
6487 (Pop_Scope): Restore SPARK_Mode_Pragma.
6488 * sem_prag.adb (Analyze_Pragma, case SPARK_Mode): Rewrite for
6489 new data structures.
6490
6491 2014-01-21 Arnaud Charlet <charlet@adacore.com>
6492
6493 * back_end.adb: Undo previous change, not needed. Minor reformatting.
6494
6495 2014-01-21 Thomas Quinot <quinot@adacore.com>
6496
6497 * exp_ch5.adb: Fix comment.
6498 * switch-c.adb: Minor comment update.
6499 * exp_ch3.adb: Minor reformatting.
6500
6501 2014-01-21 Arnaud Charlet <charlet@adacore.com>
6502
6503 * back_end.adb (Scan_Compiler_Arguments): Do not store object
6504 filename in gnatprove mode.
6505
6506 2014-01-21 Thomas Quinot <quinot@adacore.com>
6507
6508 * sinfo.ads (No_Ctrl_Actions): Clarify documentation (flag also
6509 suppresses usage of primitive _assign for tagged types).
6510 * exp_aggr.adb (Build_Array_Aggr_Code.Gen_Assign): Set
6511 No_Ctrl_Actions for a tagged type that does not require
6512 finalization, as we want to disable usage of _assign (which
6513 may cause undesirable discriminant checks on an uninitialized,
6514 invalid target).
6515
6516 2014-01-21 Ed Schonberg <schonberg@adacore.com>
6517
6518 * sem_prag.adb: Reject invariant'class on completion.
6519
6520 2014-01-21 Javier Miranda <miranda@adacore.com>
6521
6522 * exp_ch3.adb (Build_Init_Procedure): For
6523 derivations of interfaces, do not move the the initialization
6524 of the _parent field since such assignment is not generated.
6525
6526 2014-01-21 Ed Schonberg <schonberg@adacore.com>
6527
6528 * sem_res.adb (Rewrite_Renamed_Operator): Do not replace entity
6529 with the operator it renames if we are within an expression of
6530 a pre/postcondition, because the expression will be reanalyzed
6531 at a later point, and the analysis of the renaming may affect
6532 the visibility of the operator when in an instance.
6533
6534 2014-01-21 Robert Dewar <dewar@adacore.com>
6535
6536 * sinfo.ads, sinfo.adb: Change Do_Discriminant_Check to use new Flag1.
6537 Add this flag to type conversion nodes and assignment nodes.
6538 * treepr.adb: Deal properly with Flag 1,2,3.
6539 * treeprs.adt: Minor comment update.
6540
6541 2014-01-21 Robert Dewar <dewar@adacore.com>
6542
6543 * sem_eval.adb (Compile_Time_Known_Value): Add Ignore_CRT
6544 parameter.
6545 * sem_eval.ads (Compile_Time_Known_Value): Add Ignore_CRT
6546 parameter, completely rewrite spec.
6547
6548 2014-01-21 Ed Schonberg <schonberg@adacore.com>
6549
6550 * sem_ch10.adb (Install_Withed_Unit): If the unit is a subprogram
6551 instance that is inlined, it may have been rewritten as a wrapper
6552 package. In that case the unit that must be made visible is the
6553 related instance of the package.
6554
6555 2014-01-21 Arnaud Charlet <charlet@adacore.com>
6556
6557 * exp_ch9.adb (Expand_N_Selective_Accept.Add_Accept): Refine
6558 previous change in codepeer mode.
6559
6560 2014-01-21 Arnaud Charlet <charlet@adacore.com>
6561
6562 * exp_ch9.adb (Expand_N_Selective_Accept.Add_Accept): Always add
6563 call to Abort_Undefer, as expected by the runtime.
6564 * s-tasren.adb (Local_Complete_Rendezvous): Replace
6565 Defer_Abort_Nestable by Defer_Abort, since we do not expect abort to be
6566 deferred at this point. Update comments.
6567
6568 2014-01-21 Thomas Quinot <quinot@adacore.com>
6569
6570 * exp_ch4.adb, exp_ch5.adb, checks.adb: Minor reformatting.
6571
6572 2014-01-21 Arnaud Charlet <charlet@adacore.com>
6573
6574 * switch-c.adb, usage.adb, gnat_ugn.texi: Mark -gnates as internal,
6575 remove from doc.
6576
6577 2014-01-21 Robert Dewar <dewar@adacore.com>
6578
6579 * switch-c.adb, usage.adb, atree.adb, atree.ads: Minor reformatting.
6580
6581 2014-01-21 Thomas Quinot <quinot@adacore.com>
6582
6583 * atree.adb, atree.ads (Num_Extension_Nodes): Switch to Node_Id, since
6584 this is value is used in Node_Id arithmetic operations.
6585 (Copy_Node, Exchange_Entities): Use loops indexed by Num_Extension_Nodes
6586 instead of hard-coded unrolled code.
6587
6588 2014-01-21 Yannick Moy <moy@adacore.com>
6589
6590 * gnat1drv.adb: Minor code cleanup, removing useless code.
6591
6592 2014-01-21 Arnaud Charlet <charlet@adacore.com>
6593
6594 * opt.ads (SPARK_Switches_File_Name): New.
6595 * switch-c.adb (Scan_Front_End_Switches): Add handling of -gnates=xxx *
6596 * usage.adb (Usage): Document -gnates, in gnatprove mode only.
6597 * gnat_ugn.texi: Document -gnates.
6598
6599 2014-01-21 Yannick Moy <moy@adacore.com>
6600
6601 * errout.adb (Special_Msg_Delete): Update comment. Remove
6602 special case for GNATprove which should not ignore mismatch
6603 in sizes for representation clauses.
6604 * sem_prag.adb (Analyze_Pragma): Remove special case for GNATprove
6605 which should not ignore pragma Pack.
6606
6607 2014-01-21 Ed Schonberg <schonberg@adacore.com>
6608
6609 * sem_ch4.adb: Code clean up.
6610
6611 2014-01-21 Steve Baird <baird@adacore.com>
6612
6613 * gnat_rm.texi: Improve GNAT RM description of SPARK_Mode pragma.
6614
6615 2014-01-21 Robert Dewar <dewar@adacore.com>
6616
6617 * gcc-interface/gigi.h: Get Flags array address.
6618 * gcc-interface/trans.c: Acquire Flags array address.
6619 * atree.adb: Add support for Flags array and Flag0,1,2,3.
6620 * atree.ads: Add support for Flags array and Flag0,1,2,3.
6621 * atree.h: Add support for Flags array and Flag0,1,2,3.
6622 * back_end.adb: Pass Flags array address to gigi.
6623
6624 2014-01-21 Ed Schonberg <schonberg@adacore.com>
6625
6626 * sem_ch8.adb (Attribute_Renaming): Transfer original attribute
6627 reference to generated body so that legality checks on stream
6628 attributes are properly applied. If type is tagged and already
6629 frozen, insert generated body at the point of the renaming
6630 declaration.
6631
6632 2014-01-21 Ed Schonberg <schonberg@adacore.com>
6633
6634 * sem_ch12.adb: Code clean up.
6635 * sem_ch8.adb: Minor reformatting
6636
6637 2014-01-20 Robert Dewar <dewar@adacore.com>
6638
6639 * checks.adb: Check SPARK_Mode instead of GNATProve_Mode for
6640 converting warnings on inevitable exceptions to errors.
6641 * exp_ch4.adb: Check SPARK_Mode instead of GNATProve_Mode for
6642 converting warnings on inevitable exceptions to errors.
6643 * opt.adb (SPARK_Mode_Config): Handled like other config flags
6644 * opt.ads (SPARK_Mode_Type): Moved here from types (renamed from
6645 SPARK_Mode_Id) (SPARK_Mode_Type): Add pragma Ordered, remove
6646 SPARK_ from names (SPARK_Mode): New flag (SPARK_Mode_Config):
6647 New flag (Config_Switches_Type): Add SPARK_Mode field
6648 * sem.adb: Minor code reorganization (remove unnecessary with)
6649 * sem.ads (Scope_Stack_Entry): Add Save_SPARK_Mode field
6650 * sem_aggr.adb: Check SPARK_Mode instead of GNATProve_Mode for
6651 converting warnings on inevitable exceptions to errors.
6652 * sem_attr.adb: Check SPARK_Mode instead of GNATProve_Mode for
6653 converting warnings on inevitable exceptions to errors.
6654 * sem_ch3.adb: Check SPARK_Mode instead of GNATProve_Mode for
6655 converting warnings on inevitable exceptions to errors.
6656 * sem_ch4.adb: Check SPARK_Mode instead of GNATProve_Mode for
6657 converting warnings on inevitable exceptions to errors.
6658 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Reset SPARK_Mode
6659 from spec if needed
6660 * sem_ch7.adb (Analyze_Package_Body_Helper): Reset SPARK_Mode
6661 from spec if needed
6662 * sem_ch8.adb (Push_Scope): Save SPARK_Mode (Pop_Scope):
6663 Restore SPARK_Mode
6664 * sem_elab.adb: Check SPARK_Mode instead of GNATProve_Mode for
6665 converting warnings on inevitable exceptions to errors.
6666 * sem_prag.adb (Get_SPARK_Mode_From_Pragma): New function
6667 (Get_SPARK_Mode_Id): Removed (Get_SPARK_Mode_Type): New name
6668 of Get_SPARK_Mode_Id
6669 * sem_prag.ads (Get_SPARK_Mode_From_Pragma): New function
6670 * sem_res.adb: Check SPARK_Mode instead of GNATProve_Mode for
6671 converting warnings on inevitable exceptions to errors.
6672 * sem_util.adb: Check SPARK_Mode instead of GNATProve_Mode for
6673 converting warnings on inevitable exceptions to errors.
6674 * types.ads (SPARK_Mode_Id): Moved to opt.ads and renamed
6675 SPARK_Mode_Type
6676
6677 2014-01-20 Ed Schonberg <schonberg@adacore.com>
6678
6679 * sem_ch13.adb: Add semantic information to rewritten type
6680 reference.
6681
6682 2014-01-20 Ed Schonberg <schonberg@adacore.com>
6683
6684 * exp_ch5.adb (Expand_N_Assignment_Statement): If both sides
6685 are of a type with unknown discriminants, convert both to the
6686 underlying view of the type, so that the proper constraint check
6687 can be applied to the right-hand side.
6688
6689 2014-01-20 Robert Dewar <dewar@adacore.com>
6690
6691 * atree.adb (Copy_Node): Fix failure to copy last component
6692 (Exchange_Entities): Fix failure to exchange last entity
6693
6694 2014-01-20 Ed Schonberg <schonberg@adacore.com>
6695
6696 * sem_ch12.adb: Code clean up.
6697
6698 2014-01-20 Robert Dewar <dewar@adacore.com>
6699
6700 * gnat_rm.texi, sem_ch4.adb: Minor reformatting.
6701
6702 2014-01-20 Ed Schonberg <schonberg@adacore.com>
6703
6704 * sem_ch4.adb (Analyze_Quantified_Expression): If after
6705 pre-analysis the loop parameter specification has been
6706 rewritten as a iterator specification, propagate the change to
6707 the quantified expression, for ASIS navigtion needs.
6708
6709 2014-01-20 Vincent Celier <celier@adacore.com>
6710
6711 * par-ch10.adb: Minor error message change: escape [ and ].
6712
6713 2014-01-20 Robert Dewar <dewar@adacore.com>
6714
6715 * checks.adb: Make warnings on exceptions into errors in GNATprove mode.
6716 * errout.adb: Implement [ and ] insertion characters.
6717 * errout.ads: Document new [ and ] insertion characters.
6718 * sem_ch12.adb, restrict.adb, frontend.adb, exp_ch7.adb: Minor
6719 addition of ??? comment.
6720 * lib-xref.adb, exp_util.adb, gnat1drv.adb: Minor reformatting
6721 * exp_ch4.adb, sem_ch3.adb, sem_ch4.adb, sem_ch6.adb, sem_elab.adb,
6722 sem_eval.adb, sem_res.adb, sem_util.adb, sem_attr.adb, sem_aggr.adb:
6723 Make warnings on exceptions into errors in GNATprove mode.
6724 * sem_dim.adb: Minor reformatting throughout Quote [ and ]
6725 in error messages.
6726
6727 2014-01-20 Ed Schonberg <schonberg@adacore.com>
6728
6729 * sem_ch13.adb: Code clean up.
6730
6731 2014-01-20 Robert Dewar <dewar@adacore.com>
6732
6733 * errout.ads, errout.adb: Implement >? >x? >X? sequences in error
6734 messages.
6735 * sem_ch6.adb (Check_Statement_Sequence): Missing return is an
6736 error in GNATprove mode.
6737
6738 2014-01-20 Ed Schonberg <schonberg@adacore.com>
6739
6740 * par-ch4.adb (Is_Parameterless_Attribute): The Ada2012 attribute
6741 reference 'Old takes no parameters, and thus can appear as a
6742 prefix of a slice.
6743
6744 2014-01-20 Eric Botcazou <ebotcazou@adacore.com>
6745
6746 * exp_aggr.adb: Fix minor typos.
6747
6748 2014-01-20 Ed Schonberg <schonberg@adacore.com>
6749
6750 * sem_attr.adb (Analyze_Attribute, case 'Constrained): In an
6751 instance the attribute is legal, and its value is determined
6752 statically if the type has no discriminants. This choice is
6753 more useful than rechecking the legality rule in the instance,
6754 is consistent with older usage, and is also consistent with all
6755 existing tests.
6756
6757 2014-01-20 Arnaud Charlet <charlet@adacore.com>
6758
6759 * sem_cat.adb (Validate_Static_Object_Name): Change error into
6760 warning in Relaxed_Semantic_Mode.
6761
6762 2014-01-20 Ed Schonberg <schonberg@adacore.com>
6763
6764 * sem_attr.adb: Code and comments cleanup.
6765
6766 2014-01-20 Yannick Moy <moy@adacore.com>
6767
6768 * debug.adb Free debug flags -gnatd.D, -gnatd.G and -gnatd.V *
6769 * errout.adb (Compilation_Errors): Remove special handling in
6770 GNATprove mode.
6771 * gnat1drv.adb (Adjust_Global_Switches): Remove handling of the
6772 removed debug flags.
6773 * gnat_rm.texi: Initial documentation for Abstract_State, Depends,
6774 Global, Initial_Condition, Initializes and Refined_State pragmas and
6775 aspects.
6776 * opt.ads (Frame_Condition_Mode, Formal_Extensions,
6777 SPARK_Strict_Mode): Remove global flags.
6778 * sem_ch3.adb (Analyze_Object_Declaration): Check of no hidden state
6779 always performed now, on packages declaring a null state.
6780 (Signed_Integer_Type_Declaration): Remove ill-designed attempt
6781 at providing pedantic mode for bounds of integer types.
6782 * sem_ch4.adb (Analyze_Quantified_Expression): Warning on suspicious
6783 "some" quantified expression now issued under control of -gnatw.t,
6784 like the other warning on unused bound variable.
6785 * sem_prag.adb (Check_Precondition_Postcondition): Remove useless test
6786 on removed flag.
6787 (Analyze_Pragma): Remove tests for SPARK 2014
6788 pragmas, not officially allowed by GNAT.
6789
6790 2014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
6791
6792 * sem_prag.adb (Analyze_Pragma): Ensure that
6793 the sole argument of pragmas Abstract_State, Contract_Cases,
6794 Depends, Global and Initializes in in aggregate form.
6795 (Analyze_Refined_Pragma): Ensure that the sole argument of
6796 pragmas Refined_Depends, Refined_Global and Refined_State is in
6797 aggregate form.
6798 (Ensure_Aggregate_Form): New routine.
6799
6800 2014-01-20 Doug Rupp <rupp@adacore.com>
6801
6802 * sem_attr.adb (Analyze_Attribute): case
6803 Attribute_Constrained => treat all prefixes as legal for Declib
6804 compatibility.
6805
6806 2014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
6807
6808 * sem_prag.adb (Check_Mode): Reimplement the routine.
6809 (Find_Mode): New routine.
6810
6811 2014-01-20 Robert Dewar <dewar@adacore.com>
6812
6813 * sem_ch4.adb (Operator_Check): Handle additional
6814 Allow_Integer_Address cases.
6815
6816 2014-01-20 Robert Dewar <dewar@adacore.com>
6817
6818 * gnat_rm.texi (Allow_Integer_Address): Remove note about not
6819 allowed if address is non-private, no longer true.
6820 * sem_prag.adb (Analyze_Pragma, case Allow_Integer_Address):
6821 Remove check for address being private, causes difficulty when
6822 pragma used in gnat.adc file and is not needed, since we guard
6823 this in Address_Integer_Convert_OK.
6824 * exp_ch7.adb: Minor reformatting.
6825 * sem_ch4.adb: Handle operator operands in Allow_Integer_Address mode.
6826
6827 2014-01-20 Robert Dewar <dewar@adacore.com>
6828
6829 * checks.adb (Apply_Range_Check): Remove gnatprove special
6830 casing of exponentiation.
6831 * sem_res.adb (Resolve_Op_Expon): Apply range check to right
6832 operand for integer case to check range against Natural.
6833
6834 2014-01-20 Robert Dewar <dewar@adacore.com>
6835
6836 * s-tataat.adb: Minor reformatting.
6837
6838 2014-01-20 Robert Dewar <dewar@adacore.com>
6839
6840 * einfo.adb (Is_Descendent_Of_Address): Now applies to all
6841 entities, and also fix documentation to remove mention of visible
6842 integer type, since this is not what the implementation does.
6843 * einfo.ads (Is_Descendent_Of_Address): Now applies to all
6844 entities, and also fix documentation to remove mention of visible
6845 integer type, since this is not what the implementation does.
6846 * gnat_rm.texi: Minor clarification of Allow_Integer_Address
6847 function.
6848 * sem_ch4.adb (Analyze_One_Call): Handle Allow_Integer_Address
6849 case for parameter type check.
6850 * sem_res.adb (Resolve): Use new function
6851 Address_Integer_Convert_OK.
6852 * sem_type.adb: Minor code reorganization (use Ekind_In) Minor
6853 reformatting throughout.
6854 * sem_util.adb (Address_Integer_Convert_OK): New function.
6855 * sem_util.ads: Minor reformatting (put specs in alpha order)
6856 (Address_Integer_Convert_OK): New function.
6857
6858 2014-01-20 Thomas Quinot <quinot@adacore.com>
6859
6860 * exp_ch7.adb (Wrap_Transient_Expression):
6861 Insertion extra conditional expression only if
6862 Opt.Suppress_Control_Flow_Optimizations is set.
6863
6864 2014-01-20 Arnaud Charlet <charlet@adacore.com>
6865
6866 * s-tataat.adb (Initialize_Attributes): Abort might already be
6867 deferred in Create_Task.
6868
6869 2014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
6870
6871 * checks.adb (Apply_Scalar_Range_Check): Flag
6872 the exponent as requiring a range check when the expression is
6873 an exponentiation.
6874
6875 2014-01-20 Fedor Rybin <frybin@adacore.com>
6876
6877 * gnat_ugn.texi: Documenting --passed-tests option for gnattest.
6878
6879 2014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
6880
6881 * sem_util.adb (Default_Initialization): New routine.
6882 * sem_util.ads: Add new type Default_Initialization_Kind.
6883 (Default_Initialization): New routine.
6884
6885 2014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
6886
6887 * sem_prag.adb (Check_Mode): Correct all error
6888 message logic dealing with in/in out parameters that may appear
6889 as inputs or have a self reference.
6890
6891 2014-01-20 Robert Dewar <dewar@adacore.com>
6892
6893 * exp_ch9.adb, checks.adb, exp_intr.adb: Minor reformatting.
6894 * sem_res.adb (Resolve): Fix error causing infinite loop for
6895 integer used as address. Allow addresses as integers.
6896
6897 2014-01-20 Arnaud Charlet <charlet@adacore.com>
6898
6899 * s-osinte-linux.ads (struct_sigaction): Fix rep clause.
6900
6901 2014-01-20 Bob Duff <duff@adacore.com>
6902
6903 * par-ch8.adb (P_Use_Type_Clause): Detect syntax
6904 error when "use all" is not followed by "type".
6905
6906 2014-01-20 Bob Duff <duff@adacore.com>
6907
6908 * exp_intr.adb (Expand_Unc_Deallocation): Remove warning on abort
6909 followed by free.
6910
6911 2014-01-20 Ed Schonberg <schonberg@adacore.com>
6912
6913 * checks.adb (Apply_Address_Clause_Check): If there is an
6914 alignment check on the expression in an address clause, and there
6915 is no local exception propagation, add an additional explanatory
6916 message to clarify the cause of previous warning.
6917
6918 2014-01-20 Robert Dewar <dewar@adacore.com>
6919
6920 * exp_ch7.adb: Minor reformatting.
6921 * opt.ads: Minor comment updates.
6922 * sem.adb: Minor name change Is_Main_Unit =>
6923 Is_Main_Unit_Or_Main_Unit_Spec.
6924 * sem_ch6.adb: Minor reformatting and code reorganization.
6925
6926 2014-01-20 Bob Duff <duff@adacore.com>
6927
6928 * gnat_ugn.texi: Update gnatpp switches.
6929
6930 2014-01-20 Thomas Quinot <quinot@adacore.com>
6931
6932 * exp_ch9.adb: Minor comment edit.
6933
6934 2014-01-20 Robert Dewar <dewar@adacore.com>
6935
6936 * gnat_rm.texi: Document that Allow_Integer_Address is permitted
6937 only if System.Address is a private type.
6938 * opt.ads (Allow_Integer_Address): No longer set by -gnates.
6939 * sem_prag.adb (Analyze_Pragma, case Allow_Integer_Address):
6940 Allowed only if type System.Address is private, since otherwise
6941 it makes no sense.
6942 * sem_res.adb: Fix failure to properly Analyze unchecked
6943 conversions that were introduced by Allow_Integer_Address.
6944 * switch-c.adb: Remove -gnates switch.
6945 * usage.adb: Remove -gnates switch.
6946 * gnat_ugn.texi: Remove documentation of -gnates flag.
6947
6948 2014-01-20 Ed Schonberg <schonberg@adacore.com>
6949
6950 * sem_ch6.adb (Analyze_Expression_Function): Pre-analyze and
6951 resolve expression to perform proper name capture.
6952
6953 2014-01-20 Ed Schonberg <schonberg@adacore.com>
6954
6955 * sem.adb (Semantics): When saving/restoring configuration
6956 switches, the spec of a pre- defined unit that is the main unit
6957 must be treated as a predefined unit as well.
6958
6959 2014-01-20 Thomas Quinot <quinot@adacore.com>
6960
6961 * exp_ch7.adb (Wrap_Transient_Expression): For a Boolean
6962 expression, insert an extra conditional expression when saving
6963 the value of the expression, for the benefit of control flow
6964 graph based coverage analysis.
6965 * exp_ch3.adb: Minor reformatting.
6966
6967 2014-01-20 Robert Dewar <dewar@adacore.com>
6968
6969 * gnat1drv.adb: Set Allow_Integer_Address in relaxed semantics mode.
6970 * gnat_rm.texi: Document pragma Allow_Integer_Address.
6971 * gnat_ugn.texi: Document pragma Allow_Integer_Address, -gnates.
6972 * opt.ads: New flag Allow_Integer_Address.
6973 * par-prag.adb: Dummy entry for pragma Allow_Integer_Address.
6974 * sem_ch5.adb: Minor reformatting.
6975 * sem_prag.adb: Implement pragma Allow_Integer_Address.
6976 * sem_res.adb (Resolve): Allow integer address value if
6977 switch set.
6978 * sem_util.adb: Minor reformatting.
6979 * snames.ads-tmpl: Add entry for pragma Allow_Integer_Address.
6980 * switch-c.adb: Recognize flag -gnates.
6981 * usage.adb: Document flag -gnates.
6982
6983 2014-01-20 Thomas Quinot <quinot@adacore.com>
6984
6985 * s-tadeca.adb: Fix minor typos in comment.
6986
6987 2014-01-20 Pascal Obry <obry@adacore.com>
6988
6989 * s-win32.ads (FreeLibrary): New import.
6990
6991 2014-01-20 Robert Dewar <dewar@adacore.com>
6992
6993 * sem_res.adb, sem_cat.adb: Minor reformatting.
6994 * sem_ch11.adb (Analyze_Raise_Statement): Only give warning about
6995 assigning to OUT parameters for the current subprogram scope.
6996 * exp_ch4.adb: Minor reformatting.
6997
6998 2014-01-20 Ed Schonberg <schonberg@adacore.com>
6999
7000 * exp_ch4.adb (Process_Transient_Object,
7001 Find_Enclosing_Contexts): If the top-level if-expression that
7002 generated the transient object is an actual in a call, the proper
7003 Hook_Context is a construct enclosing the call.
7004 * einfo.ads: Indicate that Related_Expression is used to link a
7005 loop variable to the container expression over which the loop
7006 takes place.
7007 (Analyze_Iterator_Specification): Set the Related_Expression of
7008 the loop variable in a container element iterator.
7009 (Note_Possible_Modification): If the variable is the loop
7010 variable in a container element iterator, indicate that the
7011 enclosing container is also modified.
7012
7013 2014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
7014
7015 * aspects.adb (Move_Or_Merge_Aspects): Reimplemented.
7016
7017 2014-01-20 Robert Dewar <dewar@adacore.com>
7018
7019 * s-taasde.ads, gnat_ugn.texi, s-tadeca.adb, sem_res.adb, s-tadeca.ads:
7020 Minor reformatting and code clean up.
7021
7022 2014-01-20 Arnaud Charlet <charlet@adacore.com>
7023
7024 * sem_cat.adb (Validate_Object_Declaration): Relax semantics
7025 of objects of private type if Relaxed_RM_Semantics.
7026
7027 2014-01-20 Claire Dross <dross@adacore.com>
7028
7029 * a-cofove.ads (Vector): Capacity discriminant
7030 should be in range of the index.
7031
7032 2014-01-20 Thomas Quinot <quinot@adacore.com>
7033
7034 * a-caldel.ads(To_Duration), s-taasde.ads(Time_Enqueue):
7035 Clarify specs s-tadeca.adb(Enqueue_Calendar): Compensate for
7036 possible difference between epoch of Ada.Calendar clock and Ada
7037 real-time/tasking clock.
7038 * s-taprop-posix.adb: Minor comment fix.
7039
7040 2014-01-20 Doug Rupp <rupp@adacore.com>
7041
7042 * sysdep.c [vxworks]: Remove Vxworks version noise for RTP.
7043
7044 2014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
7045
7046 * exp_attr.adb (Expand_N_Attribute_Reference): Generate validity
7047 checks on the prefix of attribute 'Old.
7048 * sem_ch3.adb (Process_Range_Expr_In_Decl): Suppress the
7049 generation of validity checks on a range that belongs to the
7050 iteration scheme of a quantified expression.
7051 * sem_ch5.adb (One_Bound): Suppress the generation of validity
7052 checks on a bound that belongs to the iteration scheme of a
7053 quantified expression, generate the check in all other cases.
7054
7055 2014-01-20 Bob Duff <duff@adacore.com>
7056
7057 * gnat_ugn.texi: Enable --pp-new by default. Minor reorganization.
7058
7059 2014-01-20 Ed Schonberg <schonberg@adacore.com>
7060
7061 * sem_res.adb (Resolve): When compiling a predefined unit, ignore
7062 interpretations that do not come from other predefined units,
7063 to prevent spurious ambiguities in the presence of user-defined
7064 operators in the context of (an instance of) a predefined unit.
7065
7066 2014-01-20 Robert Dewar <dewar@adacore.com>
7067
7068 * gnat_rm.texi: Document that Loop_Variant is included in
7069 Statement_Assertions.
7070 * sem_prag.adb (Check_Kind): Add Loop_Variant to
7071 Statement_Assertions (Check_Applicable_Policy): Add Loop_Variant
7072 to Statement_Assertions.
7073
7074 2014-01-20 Doug Rupp <rupp@adacore.com>
7075
7076 * sysdep.c (__gnat_is_file_not_found_error) [vxworks6]: Add case
7077 for errno ENOENT from RTP on NFS mounted file system.
7078
7079 2014-01-20 Ed Schonberg <schonberg@adacore.com>
7080
7081 * sem_util.adb (Check_Function_Writable_Actuals): 1) Do not
7082 examine code that does not come from source. The check does not
7083 apply to code generated for constraint checks, and such code may
7084 generate spurious error messages when compiled with expansion
7085 disabled (as in a generic unit) because side effects may not
7086 have been removed.
7087 2) Make error messages more explicit: indicate the component
7088 of the construct whose value is indeterminate because of a
7089 call to a function with in-out parameter in another component,
7090 when there is no mandated order of execution between the two
7091 components (actuals, aggregate components, alternatives).
7092
7093 2014-01-20 Robert Dewar <dewar@adacore.com>
7094
7095 * gnat_rm.texi: Minor cleanup.
7096
7097 2014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
7098
7099 * sem_attr.adb (Analyze_Attribute): Attributes 'Old and 'Result
7100 can now apply to a refined postcondition.
7101 * sem_ch6.adb (Analyze_Subprogram_Contract): Remove local
7102 variable Result_Seen. Add variables Case_Prag, Post_Prag,
7103 Seen_In_Case and Seen_In_Post. Update the mechanism that detects
7104 whether postconditions and/or constract-cases mention attribute
7105 'Result and introduce a post-state when applied to functions.
7106 (Check_Result_And_Post_State): Removed.
7107 * sem_prag.adb (Analyze_Pragma): Add local variable
7108 Result_Seen. Verify that the expression of pragma Refined_Post
7109 mentions attribute 'Result and introduces a post-state.
7110 * sem_util.ads, sem_util.adb (Check_Result_And_Post_State): New routine.
7111
7112 2014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
7113
7114 * exp_ch7.adb (Is_Subprogram_Call): New routine.
7115 (Process_Transient_Objects): Make variable Must_Hook global with
7116 respect to all locally declared subprograms. Search the context
7117 for at least one subprogram call.
7118 (Requires_Hooking): Removed.
7119
7120 2014-01-20 Claire Dross <dross@adacore.com>
7121
7122 * a-cfdlli.ads a-cfhama.ads a-cfhase.ads a-cforma.ads
7123 * a-cforse.ads a-cofove.ads: Add pragma Annotate (GNATprove,
7124 External_Axiomatization);
7125
7126 2014-01-20 Robert Dewar <dewar@adacore.com>
7127
7128 * sem_attr.adb (Analyze_Attribute, case Loop_Entry): Allow
7129 Loop_Entry in Assert, Assert_And_Cut, and Assume pragmas.
7130 * sem_prag.adb (Analyze_Pragma, case Assert[_And_Cut], Assume):
7131 Allow Loop_Entry to be used in these pragmas if they appear in
7132 an appropriate context.
7133 (Placement_Error): Specialize error
7134 message for pragma Assert[_And_Cut] or pragma Assume containing
7135 Loop_Entry attribute.
7136 * a-exexpr-gcc.adb, sinput.adb: Minor reformatting.
7137 * s-excmac-arm.ads, s-except.ads, s-excmac-gcc.ads: Minor reformatting
7138 and code clean ups.
7139
7140 2014-01-20 Robert Dewar <dewar@adacore.com>
7141
7142 * gnat1drv.adb: Minor comment update.
7143
7144 2014-01-20 Tristan Gingold <gingold@adacore.com>
7145
7146 * raise-gcc.c (PERSONALITY_FUNCTION/arm): Remove unused
7147 variables, comment out unused code.
7148 * a-exexpr-gcc.adb: Move declarations to s-excmac-gcc.ads
7149 * s-excmac-gcc.ads: New file, extracted from a-exexpr-gcc.adb
7150 * s-excmac-arm.ads: New file.
7151
7152 2014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
7153
7154 * exp_ch4.adb (Expand_N_Slice): Remove constant D and variables
7155 Drange and Index_Typ. Remove the circuitry which creates a
7156 range check to compare the index type of the array against the
7157 discrete_range.
7158 * sem_res.adb (Resolve_Slice): Add local variable Dexpr. Update
7159 the circuitry which creates a range check to handle a
7160 discrete_range denoted by a subtype indication.
7161
7162 2014-01-20 Pierre-Marie Derodat <derodat@adacore.com>
7163
7164 * sinput.adb, sinput.ads (Sloc_Range): Traverse the tree of original
7165 nodes to get the original sloc range.
7166
7167 2014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
7168
7169 * sem_prag.adb (Analyze_Pragma): Use Defining_Entity to obtain the
7170 entity of a [library level] package.
7171
7172 2014-01-20 Tristan Gingold <gingold@adacore.com>
7173
7174 * raise-gcc.c (exception_class_eq): New function.
7175 (is_handled_by): Use it to compare exception classes.
7176 (PERSONALITY_STORAGE): Define. (continue_unwind): New function to
7177 be called to return URC_CONTINUE_UNWIND.
7178 (personality_body): New function, extracted from PERSONALITY_ROUTINE.
7179 (PERSONALITY_ROUTINE): Add an implementation for the ARM unwinder.
7180
7181 2014-01-20 Robert Dewar <dewar@adacore.com>
7182
7183 * opt.ads: Minor comment update.
7184
7185 2014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
7186
7187 * exp_ch4.adb (Expand_N_Slice): Relocate some variables and
7188 constants to the "Local variables" area. Add new constant D. Add
7189 new variables Drange and Index_Typ. Rename Pfx to Rep and Ptp
7190 to Pref_Typ and update all occurrences. Add circuitry to extract
7191 the discrete_range and the index type and build a range check.
7192
7193 2014-01-20 Arnaud Charlet <charlet@adacore.com>
7194
7195 * gnat1drv.adb (Adjust_Global_Switches): Enable
7196 Treat_Categorization_Errors_As_Warnings when Relaxed_RM_Semantics
7197 is set.
7198
7199 2014-01-20 Thomas Quinot <quinot@adacore.com>
7200
7201 * sem_ch5.adb, sem_ch4.adb: Minor reformatting.
7202
7203 2014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
7204
7205 * sem_ch13.adb (Analyze_Aspect_Specifications):
7206 When aspect SPARK_Mode appears on a package body, insert the
7207 generated pragma at the top of the body declarations.
7208
7209 2014-01-20 Robert Dewar <dewar@adacore.com>
7210
7211 * sem_aggr.adb, exp_prag.adb, sem_aux.adb, sinfo.ads, sem_ch10.adb,
7212 checks.adb, sem_prag.adb, sem_ch12.adb, freeze.adb, g-arrspl.adb,
7213 expander.adb, gnat1drv.adb, exp_ch4.adb, sem_ch6.adb,
7214 sem_ch8.adb, exp_dist.adb: Minor reformatting.
7215
7216 2014-01-20 Yannick Moy <moy@adacore.com>
7217
7218 * gnat1drv.adb (Gnat1drv): Call Write_ALI with Object=True in GNATprove
7219 mode.
7220
7221 2014-01-20 Pascal Obry <obry@adacore.com>
7222
7223 * g-arrspl.ads (Slice_Set): New definition (will use a copy on
7224 write scheme).
7225 * g-arrspl.adb: Adapt all routine to this new implementation.
7226 (Set): Copy the Slice_Set definition before reusing it.
7227
7228 2014-01-20 Arnaud Charlet <charlet@adacore.com>
7229
7230 * sem_prag.adb (Process_Import_Or_Interface): In
7231 Relaxed_RM_Semantics, support old Ada 83 style of pragma Import.
7232 (Analyze_Pragma): Ditto for pragma Export.
7233 * exp_prag.adb (Expand_Pragma_Import_Or_Interface): Handle old pragma
7234 Import style.
7235
7236 2014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
7237
7238 * einfo.ads: E_Abstract_State is now part of the entities that
7239 can be overloaded. Update type Overloadable_Kind to reflect the
7240 inclusion of abstract states.
7241 * sem_ch6.adb (New_Overloaded_Entity): A function can now
7242 overload an abstract state.
7243 * sem_prag.adb (Analyze_Constituent): Handle the overloading
7244 of states by functions. Use Entity_Of to obtain the entity of
7245 a constituent. (Analyze_Global_Item): Handle the overloading of
7246 states by functions.
7247 (Analyze_Initialization_Item): Handle the
7248 overloading of states by functions. Use Entity_Of to obtain the
7249 entity of an item.
7250 (Analyze_Input_Item): Handle the overloading
7251 of states by functions. Use Entity_Of to obtain the entity of an item.
7252 (Analyze_Input_Output): Handle the overloading of states by functions.
7253 (Analyze_Refinement_Clause): Handle the overloading
7254 of states by functions. Use Entity_Of to obtain the entity of an item.
7255 (Appears_In): Use Entity_Of to obtain the entity of an element.
7256 (Check_Usage): Use Entity_Of to obtain the entity of
7257 an item. Add a guard to prevent a crash due to a previous error.
7258 (Resolve_State): New routine.
7259
7260 2014-01-20 Yannick Moy <moy@adacore.com>
7261
7262 * spark_xrefs.ads, debug.adb, gnat1drv.adb, errout.adb, errout.ads,
7263 opt.ads: Minor comments updates.
7264
7265 2014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
7266
7267 * einfo.adb (Non_Limited_View): Applies to abstract states.
7268 (Set_From_Limited_With): Applies to abstract states.
7269 (Set_Non_Limited_View): Applies to abstract states.
7270 (Write_Field17): Output the non-limited view of an abstract state.
7271 * einfo.ads: Update the comment on usage and occurrences in
7272 nodes for attributes From_Limited_With and Non_Limited_View.
7273 * sem_aux.adb (Available_View): This routine can now handle
7274 abstract states.
7275 * sem_aux.ads (Available_View): This routine can now handle
7276 abstract states. Update the comment on usage.
7277 * sem_ch8.adb (Find_Expanded_Name): Handle abstract views
7278 of states and variables.
7279 (In_Pragmas_Depends_Or_Global): New routine.
7280 * sem_ch10.adb (Build_Limited_Views): Implement
7281 abstract (limited) views of variables and states.
7282 (Build_Shadow_Entity): This routine is now a procedure. Add
7283 formal parameter Shadow. Update the comment on usage. Add
7284 context-specific decoration for states and variables.
7285 (Decorate_State): New routine. (Decorate_Variable): New routine.
7286 (Find_And_Process_States): New routine.
7287 (Process_Declarations): Renamed to Process_Declarations_And_States.
7288 (Process_Declarations_And_States): Add formal parameters
7289 Pack and Create_Abstract_Views. Update the comment on usage.
7290 (Process_States): New routine.
7291 * sem_prag.adb (Check_Dependency_Clause): Handle abstract
7292 views of states and variables. Match the abstract view of a state
7293 against its corresponding non-abstract view.
7294 (Is_Matching_Input):
7295 Handle abstract views of states and variables. Match the abstract
7296 view of a state against its corresponding non-abstract view.
7297 (Process_Global_Item): Handle abstract views of states and
7298 variables.
7299
7300 2014-01-20 Bob Duff <duff@adacore.com>
7301
7302 * sem_ch10.adb (Expand_With_Clause): Don't
7303 recurse on the prefix if the current with-ed name refers to a
7304 package that renames its own parent, eg "package P.Q renames P;".
7305
7306 2014-01-20 Yannick Moy <moy@adacore.com>
7307
7308 * exp_spark.adb (Expand_SPARK_Call): Remove procedure.
7309 * opt.adb, opt.ads (Full_Expander_Active): Remove function.
7310 * checks.adb, exp_ch6.adb, exp_ch9.adb, exp_disp.adb, sem_aggr.adb,
7311 * sem_ch10.adb, sem_ch5.adb, sem_ch6.adb, sem_ch8.adb, sem_ch9.adb,
7312 * sem_disp.adb, sem_res.adb Replace Full_Expander_Active by
7313 Expander_Active.
7314
7315 2014-01-20 Yannick Moy <moy@adacore.com>
7316
7317 * sinfo.ads Update documentation of GNATprove mode.
7318
7319 2014-01-20 Yannick Moy <moy@adacore.com>
7320
7321 * adabkend.adb, ali-util.adb, errout.adb, exp_ch7.adb,
7322 * exp_dbug.adb, freeze.adb, lib-xref.adb, restrict.adb,
7323 * sem_attr.adb, sem_ch4.adb, sem_ch5.adb, sem_ch6.adb, sem_ch8.adb,
7324 * sem_prag.adb, sem_res.adb, sem_util.adb Rename SPARK_Mode into
7325 GNATprove_Mode.
7326 * sem_ch13.adb: Remove blank.
7327 * exp_spark.adb, exp_spark.ads (Expand_SPARK_Call): Only replace
7328 subprograms by alias for renamings, not for inherited primitive
7329 operations.
7330 * exp_util.adb (Expand_Subtype_From_Expr): Apply the expansion
7331 in GNATprove mode.
7332 (Remove_Side_Effects): Apply the removal in
7333 GNATprove mode, for the full analysis of expressions.
7334 * expander.adb (Expand): Call the light SPARK expansion in GNATprove
7335 mode.
7336 (Expander_Mode_Restore, Expander_Mode_Save_And_Set): Ignore
7337 save/restore actions for Expander_Active flag in GNATprove mode,
7338 similar to what is done in ASIS mode.
7339 * frontend.adb (Frontend): Generic bodies are instantiated in
7340 GNATprove mode.
7341 * gnat1drv.adb (Adjust_Global_Switches): Set operating
7342 mode to Check_Semantics in GNATprove mode, although a light
7343 expansion is still performed.
7344 (Gnat1drv): Set Back_End_Mode to
7345 Declarations_Only in GNATprove mode, and later on special case
7346 the GNATprove mode to continue analysis anyway.
7347 * lib-writ.adb (Write_ALI): Always generate ALI files in
7348 GNATprove mode.
7349 * opt.adb, opt.ads (Full_Expander_Active): Make it equivalent to
7350 Expander_Active.
7351 (SPARK_Mode): Renamed as GNATprove_Mode.
7352 * sem_aggr.adb (Aggregate_Constraint_Checks): Add checks in the
7353 tree in GNATprove_Mode.
7354 * sem_ch12.adb (Analyze_Package_Instantiation): Always instantiate
7355 body in GNATprove mode.
7356 (Need_Subprogram_Instance_Body): Always instantiate body in GNATprove
7357 mode.
7358 * sem_ch3.adb (Constrain_Index, Process_Range_Expr_In_Decl):
7359 Make sure side effects are removed in GNATprove mode.
7360
7361 2014-01-20 Eric Botcazou <ebotcazou@adacore.com>
7362
7363 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Robustify tests
7364 for aliased objects with an unconstrained nominal subtype.
7365 * gcc-interface/trans.c (Call_to_gnu): Likewise.
7366 (gnat_to_gnu) <case N_Op_Not>: Robustify test for private type.
7367 <case N_Op_Minus>: Remove useless code.
7368 (Exception_Handler_to_gnu_zcx): Minor tweaks.
7369
7370 2014-01-20 Eric Botcazou <ebotcazou@adacore.com>
7371
7372 * gcc-interface/decl.c (gnat_to_gnu_entity) <case E_Record_Subtype>:
7373 Tidy up. For a subtype with discriminants and variant part, if a
7374 variant is statically selected and the fields all have a constant
7375 position, put them in order of increasing position. Likewise if
7376 no variant part but representation clause is present.
7377 * gcc-interface/utils.c (make_packable_type): Robustify.
7378 (maybe_pad_type): Use local variable and tidy up condition. If no
7379 alignment is specified, use the original one.
7380 (create_type_stub_decl): Minor tweak.
7381 (convert) <case VECTOR_CST>: Fix typo.
7382 <case CONSTRUCTOR>: Deal with padding types around the same type.
7383 Do not punt on missing fields.
7384 (unchecked_convert): Call finish_record_type to lay out the special
7385 record types made for conversions from/to problematic integer types.
7386 Bump the alignment of CONSTRUCTORs before converting them to a more
7387 aligned type.
7388
7389 2014-01-20 Eric Botcazou <ebotcazou@adacore.com>
7390
7391 * gcc-interface/decl.c (gnat_to_gnu_entity) <case E_Component>: Remove
7392 obsolete code for type_annotate_only mode, simplify code and slightly
7393 improve wording of comments.
7394
7395 2014-01-12 Eric Botcazou <ebotcazou@adacore.com>
7396
7397 PR ada/59772
7398 * gcc-interface/cuintp.c (build_cst_from_int): Use 32-bit integer type
7399 as intermediate type.
7400 (UI_To_gnu): Likewise.
7401
7402 2014-01-03 Eric Botcazou <ebotcazou@adacore.com>
7403
7404 * gnatvsn.ads (Current_Year): Bump to 2014.
7405
7406 2014-01-02 Tobias Burnus <burnus@net-b.de>
7407
7408 * gnat_ugn.texi: Bump @copying's copyright year.
7409 \f
7410 Copyright (C) 2014 Free Software Foundation, Inc.
7411
7412 Copying and distribution of this file, with or without modification,
7413 are permitted in any medium without royalty provided the copyright
7414 notice and this notice are preserved.