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