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