]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/ada/ChangeLog
[multiple changes]
[thirdparty/gcc.git] / gcc / ada / ChangeLog
CommitLineData
7c0c194b
AC
12014-07-31 Ed Schonberg <schonberg@adacore.com>
2
3 * exp_ch3.adb (Expand_Freeze_Record_Type): Do not build an
4 invariant procedure for an internally generated subtype that is
5 created for an object of a class-wide type.
6
72014-07-31 Vincent Celier <celier@adacore.com>
8
9 * prj-nmsc.adb, errutil.adb: Make code similar to Errout.
10
112014-07-31 Gary Dismukes <dismukes@adacore.com>
12
13 * gnat_rm.texi, sem_aux.ads, einfo.ads, sem_util.ads, sem_ch6.adb,
14 exp_disp.adb: Minor reformatting.
15
1fb63e89
RD
162014-07-31 Robert Dewar <dewar@adacore.com>
17
18 * exp_ch5.adb, sem_ch3.adb, exp_ch7.adb, exp_util.adb, exp_ch9.adb,
19 sem_ch7.adb, checks.adb, s-exctra.adb, exp_ch6.adb, exp_disp.adb,
20 exp_dist.adb, sem_ch13.adb, exp_strm.adb, exp_ch3.adb: Minor
21 reformatting.
22
2fe258bf
AC
232014-07-31 Robert Dewar <dewar@adacore.com>
24
25 * sem_ch13.adb: Minor reformatting.
26
272014-07-31 Ed Schonberg <schonberg@adacore.com>
28
29 * exp_ch3.adb (Build_Invariant_Checks): If the enclosing record
30 is an unchecked_union, warn that invariants will not be checked
31 on components that have them.
32
332014-07-31 Robert Dewar <dewar@adacore.com>
34
35 * freeze.adb (Freeze_Entity): Check for error of
36 Type_Invariant'Class applied to a untagged type.
37 * sem_ch6.adb (Analyze_Null_Procedure): Unconditionally rewrite
38 as null body, so that we perform error checks even if expansion
39 is off.
40
3e50df4d
ES
412014-07-31 Ed Schonberg <schonberg@adacore.com>
42
43 * sem_ch13.adb (Build_Invariant_Procedure): If body of procedure
44 is already present, nothing to do.
45 * exp_ch3.adb (Build_Component_Invariant_Call): For an access
46 component, check whether the access type has an invariant before
47 checking the designated type.
48 (Build_Record_Invariant_Proc): Change suffix of generated
49 name to prevent ambiguity when record type has invariants
50 in addition to those of components, and two subprograms are
51 constructed. Consistent with handling of array types.
52 (Insert_Component_Invariant_Checks): Build invariant procedure
53 body when one has not been created yet, in the case of composite
54 types that are completions and whose full declarations carry
55 invariants.
56
0be7dcbb
AC
572014-07-30 Thomas Quinot <quinot@adacore.com>
58
59 * gnat_rm.texi: Minor doc fixes.
60
612014-07-30 Robert Dewar <dewar@adacore.com>
62
63 * a-rbtgbo.adb, sem_ch13.adb: Minor reformatting.
64
652014-07-30 Vincent Celier <celier@adacore.com>
66
67 * errutil.adb (Set_Msg_Text): Process tilde ('~'): no processing
68 of error message.
69 * prj-nmsc.adb (Locate_Directory): Use a tilde ('~') in the
70 message to report that a directory cannot be created, to avoid
71 processing of the directory path that may contains special
72 insertion characters.
73
a18e3d62
AC
742014-07-30 Ed Schonberg <schonberg@adacore.com>
75
76 * a-crdlli.ads: Place declaration of Empty_List after full type
77 declaration for Curosr, to prevent freezing error.
78
792014-07-30 Robert Dewar <dewar@adacore.com>
80
81 * get_targ.adb: Minor code reorganization.
82 * prj-proc.adb, prj-proc.ads, get_targ.ads, sem_ch6.adb: Minor
83 reformatting.
84
852014-07-30 Ed Schonberg <schonberg@adacore.com>
86
87 * a-cbhase.adb: a-cbhase.adb (Insert): Raise Constraint_Error,
88 not Program_Error, when attempting to remove an element not in
89 the set. This is the given semantics for all set containers.
90
912014-07-30 Ed Schonberg <schonberg@adacore.com>
92
0be7dcbb 93 * a-rbtgbo.adb (Delete_Node_Sans_Free): If
a18e3d62
AC
94 element is not present in tree return rather than violating
95 an assertion. Constraint_Error will be raised in the caller if
96 element is not in the container.
97
1ebc2612
AC
982014-07-30 Arnaud Charlet <charlet@adacore.com>
99
100 * set_targ.adb (Read_Target_Dependent_Values): New subprogram.
101 (elab body): Add provision for default target config file.
102 * get_targ.ads, get_targ.adb (Get_Back_End_Config_File): New subprogram.
103
1042014-07-30 Ed Schonberg <schonberg@adacore.com>
105
106 * a-cbhase.adb (Delete): Raise Constraint_Error, not Program_Error,
107 when attempting to remove an element not in the set. This is
108 the given semantics for all set containers.
109 * a-cborse.adb (Delete): Attempt removal first, to check for
110 tampering, before checking whether this is an attempt to
111 delete a non-existing element, and in fthe latter case raise
112 Constraint_Error.
113
1142014-07-30 Vincent Celier <celier@adacore.com>
115
116 * prj-proc.adb (Recursive_Process): Do not create a new
117 Project_Id if the project is already in the list of projects of
118 the tree.
119
1202014-07-30 Ed Schonberg <schonberg@adacore.com>
121
122 * sem_ch6.adb (Analyze_Function_Return): Reject a return expression
123 whose type is an incomplete formal type.
124 (Analyze_Return_Type): Reject a return type that is an untagged
125 imcomplete formal type.
126 (Process_Formals): Reject a formal parameter whose type is an
127 untagged formal incomplete type.
128 * sem_res.adb (Resolve_Actuals): Reject an actual whose type is
129 an untagged formal incomplete type.
130
45ec05e1
RD
1312014-07-30 Robert Dewar <dewar@adacore.com>
132
133 * gnat_ugn.texi: Minor spelling correction.
134 * makeutl.adb: Minor code reorganization.
135 * exp_ch4.adb, exp_aggr.adb, exp_ch3.adb: Minor reformatting.
136
1372014-07-30 Robert Dewar <dewar@adacore.com>
138
139 * einfo.ads (Has_Unchecked_Union): Document that this is used
140 to check for illegal Valid_Scalars attribute references.
141 * exp_attr.adb (Build_Record_VS_Func): New function
142 (Expand_N_Attribute_Reference, case Valid_Scalars): Call this
143 function.
144 * gnat_rm.texi: Document 'Valid_Scalars cannot be applied to
145 Unchecked_Union Add note on 'Valid_Scalars generating a lot
146 of code.
147 * sem_attr.adb (Analyze_Attribute, case Valid_Scalars): Give
148 error on attempt to apply Valid_Scalars to Unchecked_Union type.
149
ad9560ea
AC
1502014-07-30 Steve Baird <baird@adacore.com>
151
152 * exp_ch4.adb (Expand_N_Indexed_Component): Disable optimized handling
153 of A(I..J)(K) in CodePeer_Mode.
154
1552014-07-30 Ben Brosgol <brosgol@adacore.com>
156
157 * gnat_ugn.texi: Fix typo.
158
b3f5eef0
AC
1592014-07-30 Thomas Quinot <quinot@adacore.com>
160
161 * lib-writ.ads: document format change.
162
1632014-07-30 Pascal Obry <obry@adacore.com>
164
165 * prj-util.adb (For_Interface_Sources): Do not
166 include sources from withed externally built projects.
167
1682014-07-30 Robert Dewar <dewar@adacore.com>
169
170 * lib.adb: Minor reformatting.
171 * prj-util.adb: Minor reformatting.
172
1732014-07-30 Ed Schonberg <schonberg@adacore.com>
174
175 * exp_aggr.adb (Build_Record_Aggr_Code): For an array component
176 that depends on discriminants, and which is given by an others
177 clause, create an explicit subtype with the discriminant values
178 of the enclosing aggregate, because the backend cannot otherwise
179 retrieve the actual bounds of the array.
180
1812014-07-30 Fedor Rybin <frybin@adacore.com>
182
183 * gnat_ugn.texi: Improve gnattest documentation.
184
1852014-07-30 Pascal Obry <obry@adacore.com>
186
187 * makeutl.adb (Insert_Project_Sources): Properly handle sources
188 that are aggregated. We want to include sources not only part
189 of libraries but also if part of an aggregated project from an
190 aggregate library.
191 * prj.adb (For_Project_And_Aggregated_Context): Properly check
192 state of root project.
193
9e5a6ee7
TQ
1942014-07-30 Thomas Quinot <quinot@adacore.com>
195
196 * lib-load.ads: Minor reformatting.
197 * sinfo.ads (Library_Unit): Update comment.
198 * lib.ads (Notes): Simplify. The Unit component in Notes_Entry
199 is redundant. Instead used the pragma Node_Id directly as the
200 element type.
201
2022014-07-30 Thomas Quinot <quinot@adacore.com>
203
204 * lib.adb (Store_Note): Store only notes that do not come from
205 an instance, and that are in the extended main source unit.
206 * lib-writ (Write_Unit_Information): Annotations from subunits
207 must be emitted along with those for the main unit, and they
208 must carry a specific file name.
209 * ali.ads (Notes_Record): Use a File_Name_Type instead of a
210 Unit_Id for the source file containing the pragma, as in the
211 case of annotations from subunits we might not have a readily
212 available unit id.
213 * ali.adb (Scan_ALI): Account for above change in data structure.
214
3ea8f61e
AC
2152014-07-30 Vincent Celier <celier@adacore.com>
216
217 * makeutl.adb (Insert_Project_Sources): When the library project
218 is an aggregate Stand-Alone Library, insert in the queue the
219 Ada interface units, with Closure set to True;
220
2212014-07-30 Eric Botcazou <ebotcazou@adacore.com>
222
223 * sem_util.adb: Fix minor typo.
224 * makeutl.adb: Minor reformatting.
225
41c79d60
AC
2262014-07-30 Robert Dewar <dewar@adacore.com>
227
228 * exp_ch7.adb, checks.adb, makeutl.adb, makeutl.ads: Minor reformatting.
229
2302014-07-30 Yannick Moy <moy@adacore.com>
231
232 * checks.ads: Fix typo in comment.
233
2342014-07-30 Pierre-Marie Derodat <derodat@adacore.com>
235
236 * sem_util.adb (Set_Debug_Info_Needed): For scalar types, recurse on
237 entities that materialize range bounds, if any.
238
2392014-07-30 Vincent Celier <celier@adacore.com>
240
241 * projects.texi: Minor spelling fix.
242
8e888920
AC
2432014-07-30 Hristian Kirtchev <kirtchev@adacore.com>
244
245 * checks.adb (Make_Bignum_Block): Use the new secondary stack
246 build routines to manage the mark.
247 * exp_ch7.adb (Create_Finalizer, Expand_Cleanup_Actions):
248 Use the new secodary stack build routines to manage the mark.
249 (Insert_Actions_In_Scope_Around): Add new formal parameter
250 Manage_SS along with comment on its usage. Code and comment
251 reformatting. Mark and release the secondary stack when the
252 context warrants it.
253 (Make_Transient_Block): Update the call
254 to Insert_Actions_In_Scope_Around to account for parameter Manage_SS.
255 (Wrap_Transient_Declaration): Remove local variable
256 Uses_SS. Ensure that the secondary stack is marked and released
257 when the related object declaration appears in a library level
258 package or package body. Code and comment reformatting.
259 * exp_util.ads, exp_util.adb (Build_SS_Mark_Call): New routine.
260 (Build_SS_Release_Call): New routine.
261
2622014-07-30 Steve Baird <baird@adacore.com>
263
264 * exp_attr.adb: Revert previous change, not needed after all.
265
2662014-07-30 Vincent Celier <celier@adacore.com>
267
268 * makeutl.adb (Queue.Insert_Project_Sources): Insert with
269 Closure => True for interfaces of Stand-Alone Libraries.
270 * makeutl.ads (Source_Info (Format => Gprbuild)): Add new
271 Boolean component Closure, defaulted to False.
272
2732014-07-30 Yannick Moy <moy@adacore.com>
274
275 * sem_res.adb: Fix typo in error message.
276
63a4aa43
AC
2772014-07-30 Robert Dewar <dewar@adacore.com>
278
279 * sem_ch3.adb (Process_Range_Expr_In_Decl): Use _FIRST/_LAST
280 as name suffixes rather than L/H for subtype bounds.
281 * tbuild.ads: Minor comment improvements and fixes
282 (Make_External_Name): Document that suffix can start with an
283 underscore.
284
2852014-07-30 Bob Duff <duff@adacore.com>
286
287 * gnat_ugn.texi: Document --rep-clauses switch.
288
33c9f9af
AC
2892014-07-30 Ed Schonberg <schonberg@adacore.com>
290
291 * sem_ch13.adb (Analyze_Aspect_Specifications): Default_Value and
292 Default_Component_Value can only be specified for scalar type or
293 arrays of scalar types respectively. This legality check must
294 be performed at the point the aspect is analyzed, in order to
295 reject aspect specifications that apply to a partial view.
296
2972014-07-30 Thomas Quinot <quinot@adacore.com>
298
299 * freeze.adb: Minor reformatting.
300
3012014-07-30 Robert Dewar <dewar@adacore.com>
302
303 * exp_attr.adb (Expand_Attribute, case First/Last): Don't expand in
304 codepeer mode.
305
18c56840
ES
3062014-07-30 Ed Schonberg <schonberg@adacore.com>
307
308 * freeze.adb (Check_Expression_Function): At the freeze point
309 of an expression function, verify that the expression in the
310 function does not contain references to any deferred constants
311 that have no completion yet.
312 (Freeze_Expression, Freeze_Before): call
313 Check_Expression_Function.
314 * a-ciorse.ads: Add Reference_Control_Type to detect tampering.
315 * a-ciorse.adb: Add Adjust and Finalize routines for
316 Reference_Control_Type. Use it in the construction of Reference
317 and Constant_Reference values.
318
41a58113
RD
3192014-07-30 Robert Dewar <dewar@adacore.com>
320
321 * exp_aggr.adb: Update comments.
322 * a-chtgbo.adb, a-chtgbo.ads, a-cbhase.adb, a-cbhase.ads: Minor
323 reformatting.
324
3252014-07-30 Robert Dewar <dewar@adacore.com>
326
327 * cstand.adb (New_Standard_Entity): New version takes name
328 string to call Make_Name.
329 (Create_Standard): Use this routine to set name before setting other
330 fields.
331
3322014-07-30 Robert Dewar <dewar@adacore.com>
333
334 * exp_attr.adb (Expand_Attribute, case First): Rewrite simple
335 entity reference.
336 (Expand_Attribute, case Last): Ditto.
337 * exp_ch3.adb (Constrain_Index): New calling sequence for
338 Process_Range_Expr_In_Decl.
339 (Expand_N_Object_Declaration): Avoid setting Is_Known_Valid in one
340 problematical case.
341 * sem_ch3.adb (Constrain_Index): New calling sequence for
342 Process_Range_Expr_In_Decl.
343 (Set_Scalar_Range_For_Subtype): ditto.
344 (Process_Range_Expr_In_Decl): Create constants to hold bounds for
345 subtype.
346 * sem_ch3.ads (Process_Range_Expr_In_Decl): Add Subtyp parameter.
347 * sem_eval.adb (Compile_Time_Compare): Make sure we use base
348 types if we are not assuming no invalid values.
349
2b4c962d
AC
3502014-07-30 Robert Dewar <dewar@adacore.com>
351
352 * clean.adb: Minor reformatting.
353 * opt.ads: Minor fix to incorrect comment.
354
3552014-07-30 Ed Schonberg <schonberg@adacore.com>
356
357 * a-chtgbo.ads, a-chtgbo.adb (Delete_Node_At_Index): New
358 subprogram, used by bounded hashed sets, to delete a node at
359 a given index, whose element may have been improperly updated
360 through a Reference_Preserving key.
361 * a-cbhase.ads: Add Reference_Control_Type to package Generic_Keys.
362 * a-cbhase.adb: Add Adjust and Finalize routines for
363 Reference_Control_Type.
364 (Delete, Insert): Raise Program_Error, not Constraint_Error,
365 when operation is illegal.
366 (Reference_Preserving_Key): Build aggregate for Reference_Control_Type
367 * a-cmbutr.ads: Add Reference_Control_Type to detect tampering. Add
368 private with_clause for Ada.Finalization.
369 * a-cbmutr.adb: Add Adjust and Finalize routines for
370 Reference_Control_Type. Use it in the construction of Reference
371 and Constant_Reference values.
372
c98b8253
AC
3732014-07-30 Robert Dewar <dewar@adacore.com>
374
375 * sem_ch3.adb, sem_ch3.ads: Minor code reorganization.
376
3772014-07-30 Pascal Obry <obry@adacore.com>
378
379 * clean.adb (Clean_Project): Properly check for directory
380 existence before trying to enter it.
381
2e471ec7
RD
3822014-07-30 Robert Dewar <dewar@adacore.com>
383
384 * sem_ch3.ads, prj.ads, prj-nmsc.adb: Minor reformatting.
385
43174f15
AC
3862014-07-30 Robert Dewar <dewar@adacore.com>
387
388 * par-ch5.adb (P_Sequence_Of_Statements): Properly handle
389 missing semicolon after name.
390
3912014-07-30 Pascal Obry <obry@adacore.com>
392
393 * prj.ads (Gprinstall_Flags): New constant.
394 * prj-nmsc.adb (Check_Library_Attributes): Do not fails for
395 missing library dir if Directories_Must_Exist_In_Projects
396 is false.
397
734e72dd
BD
3982014-07-30 Bob Duff <duff@adacore.com>
399
400 * a-except-2005.adb, a-except.adb: Remove obsolete comments.
401 * s-traceb.ads: Updagte comments.
402
d6e8719d
RD
4032014-07-30 Robert Dewar <dewar@adacore.com>
404
405 * checks.adb, a-cihase.adb, a-cihase.ads, a-chtgop.adb, a-chtgop.ads,
406 a-except.adb, a-except-2005.adb, a-cborse.adb, a-cborse.ads,
407 a-exexda.adb, a-elchha.adb, exp_aggr.adb, a-cohase.adb: Minor
408 reformatting.
409
6b6bce61
AC
4102014-07-30 Ed Schonberg <schonberg@adacore.com>
411
412 * a-chtgop.ads, a-chtgop.adb (Delete_Node_At_Index): New
413 subprogram, used by all versions of hashed sets, to delete a node
414 whose element has been improperly updated through a Reference_
415 Preserving key.
416 * a-cohase.adb: Remove Delete_Node, use new common procedure
417 Delete_Node_At_Index.
418 * a-cihase.ads: Add Reference_Control_Type to package Generic_Keys.
419 * a-cihase.adb: Add Adjust and Finalize routines for
420 Reference_Control_Type.
421 (Reference_Preserving_Key): Build aggregate for
422 Reference_Control_Type
423
4242014-07-30 Yannick Moy <moy@adacore.com>
425
426 * checks.adb, checks.ads (Determine_Range_R): New procedure to
427 determine the possible range of a floating-point expression.
428
4292014-07-30 Ed Schonberg <schonberg@adacore.com>
430
431 * a-cborse.ads: Add Reference_Control_Type to package Generic_Keys.
432 * a-cborse.adb: Add Adjust and Finalize routines for
433 Reference_Control_Type.
434 (Reference_Preserving_Key): Build aggregate for
435 Reference_Control_Type.
436 (Delete): Check for tampering, and raise Program_Error (not
437 Constraint_Error) when attempting to delete an element not in
438 the set.
439 (Insert): Ditto.
440
4412014-07-30 Bob Duff <duff@adacore.com>
442
443 * a-elchha.adb, a-except-2005.adb, a-except.adb, a-exexda.adb,
444 * a-exextr.adb, a-exstat.adb, exp_intr.ads, s-tassta.adb:
445 Exception_Information is used to produce useful debugging
446 information for the programmer. However, it was also used to
447 implement the stream attributes for type Exception_Occurrence. The
448 latter requires a stable and portable interface, which meant
449 that we couldn't include a symbolic traceback. A separate set of
450 routines was used to provide symbolic tracebacks under program
451 control (i.e. not automatically). The goal of this ticket is
452 to provide such automatic tracebacks, so the change here is to
453 split the two functionalities: Exception_Information gives the
454 maximally useful information for debugging (i.e. it now includes
455 a symbolic traceback when a decorator is set, and it can be
456 improved freely in the future without disturbing streaming).
457 Untailored_Exception_Information always uses hexadecimal addresses
458 in the traceback, has a stable and portable output, and is now
459 used for streaming.
460
4612014-07-30 Eric Botcazou <ebotcazou@adacore.com>
462
463 * exp_aggr.adb (Expand_Array_Aggregate): Add missing test
464 on the target of the assignment to find out whether it
465 can be directly done by the back-end.
466 * exp_util.adb (Is_Possibly_Unaligned_Slice): Remove obscure test.
467
facfa165
RD
4682014-07-30 Robert Dewar <dewar@adacore.com>
469
470 * inline.adb, a-coorse.adb, a-coorse.ads, a-cohase.adb, a-cohase.ads,
471 a-tasatt.adb: Minor reformatting.
472
4732014-07-30 Robert Dewar <dewar@adacore.com>
474
475 * exp_ch4.adb: Minor reformatting.
476
29ad9ea5
AC
4772014-07-30 Ed Schonberg <schonberg@adacore.com>
478
479 * a-coorse.adb, a-coorse.ads (Generic_Keys): Add a
480 Reference_Control_Type to generic package, to keep additional
481 information for Reference_Types that manipulate keys. Add Adjust and
482 Finalize procedures for this type.
483 (Finalize): When finalizing a reference_preserving_key, verify
484 that the key of the new value is equivalent to the key of the
485 original element, raise Program_Error otherwise.
486 (Insert): Detect tampering.
487 (Reference_Preserving_Key): Build proper Reference_Control_Type,
488 and update Busy and Lock bits to detect tampering.
489 * a-cohase.ads: Keep with-clause private.
490
4912014-07-30 Hristian Kirtchev <kirtchev@adacore.com>
492
493 * exp_ch4.adb (Expand_N_Op_Eq): Emit a warning when the operands
494 of an equality are of an Unchecked_Union type and lack inferable
495 discriminants.
496
995683a6
AC
4972014-07-30 Bob Duff <duff@adacore.com>
498
499 * g-exctra.adb, g-exctra.ads, s-exctra.adb, s-exctra.ads, Makefile.rtl,
500 g-trasym.adb, g-trasym.ads, s-trasym.adb, s-trasym.ads: Move
501 GNAT.Traceback.Symbolic and GNAT.Exception_Traces into the System
502 hierarchy (System.Traceback.Symbolic and System.Exception_Traces), so
503 we can call them from the runtimes. Leave renamings in place under GNAT.
504
5052014-07-30 Yannick Moy <moy@adacore.com>
506
507 * inline.adb (Check_And_Build_Body_To_Inline): Include code for
508 inlining in GNATprove mode.
509
5102014-07-30 Ed Schonberg <schonberg@adacore.com>
511
512 * a-cohase.adb, a-cohase.ads (Generic_Keys): Add a
513 Reference_Control_Type to generic package, to keep additional
514 information for Reference_Types that manipulate keys. Add Adjust and
515 Finalize procedures for this type.
516 (Delete_Node): New procedure called when finalizing a
517 Reference_Control_Type, to remove a node whose element has been
518 improperly updated through a Reference.
519 (Insert): Detect tampering.
520 (Reference_Preserving_Key): Build proper Reference_Control_Type,
521 and update Busy and Lock bits to detect tampering.
522
5232014-07-30 Bob Duff <duff@adacore.com>
524
525 * exp_intr.ads: Minor comment fix.
526
793c5f05
AC
5272014-07-30 Gary Dismukes <dismukes@adacore.com>
528
529 * exp_prag.adb, a-tags.ads: Minor typo fixes.
530
5312014-07-30 Bob Duff <duff@adacore.com>
532
533 * a-excach.adb, a-excach-cert.adb, a-except-2005.ads,
534 a-except.ads, g-traceb.adb, memtrack.adb,
535 s-traceb.adb, s-traceb.ads, s-traceb-hpux.adb, s-traceb-mastop.adb:
536 Cleanup: Make the three versions of System.Traceback.Call_Chain
537 have the same interface. Use an array for the Traceback parameter
538 instead of an Address. This will enable reduction in code
539 duplication.
540
5412014-07-30 Pat Rogers <rogers@adacore.com>
542
543 * gnat_ugn.texi: Corrected minor textual error in description
544 of switch -gnatwl.
545
5462014-07-30 Bob Duff <duff@adacore.com>
547
548 * Makefile.rtl: Sort file names.
549
5502014-07-30 Arnaud Charlet <charlet@adacore.com>
551
552 * a-tasatt.adb: Complete previous change: kill spurious warning
553 on e.g. sparc, and make sure we only use the fast path when the
554 alignment is compatible.
555
5562014-07-30 Yannick Moy <moy@adacore.com>
557
558 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Mark new Spec_Id as
559 coming from source.
560
1eb31e60
YM
5612014-07-30 Yannick Moy <moy@adacore.com>
562
563 * inline.adb (Build_Body_To_Inline): Issue more precise messages
564 for declarations that prevent inlining.
565 (Cannot_Inline): Change usual start of message to refer to contextual
566 analysis in GNATprove mode.
567 * sem_res.adb (Resolve_Call): Change usual start of message to
568 refer to contextual analysis in GNATprove mode, when inlining
569 not possible.
570
eb1ee757
AC
5712014-07-30 Robert Dewar <dewar@adacore.com>
572
573 * sem_res.adb, sem_ch6.adb: Minor code reorganization.
574 * inline.adb: Minor reformatting.
575
5762014-07-30 Javier Miranda <miranda@adacore.com>
577
578 * a-tags.ads: Add comments.
579
2178830b
AC
5802014-07-30 Pat Rogers <rogers@adacore.com>
581
582 * gnat_rm.texi: Minor word error.
583
5842014-07-30 Ed Schonberg <schonberg@adacore.com>
585
586 * exp_prag.adb (Expand_Old): Insert declarationss of temporaries
587 created to capture the value of the prefix of 'Old at the
588 beginning of the current declarative part, to prevent data flow
589 anomalies in the postcondition procedure that will follow.
590
5912014-07-30 Yannick Moy <moy@adacore.com>
592
593 * debug.adb: Retire debug flag -gnatdQ.
594 * inline.adb (Can_Be_Inlined_In_GNATprove_Mode): Check SPARK_Mode
595 on decl, not on body. Ignore predicate functions.
596 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Remove use of
597 debug flag -gnatdQ. Correctly analyze SPARK_Mode on decl and
598 body when generating a decl for a body on which SPARK_Mode aspect
599 is given.
600 * sem_prag.adb (Analyze_Pragma|SPARK_Mode): Reorder tests for
601 attaching pragma to entity, to account for declaration not coming
602 from source.
603 * sem_res.adb (Resolve_Call): Issue warning and flag subprogram
604 as not always inlined in GNATprove mode, when called in an
605 assertion context.
606
d3e16619
AC
6072014-07-30 Vincent Celier <celier@adacore.com>
608
609 * debug.adb: Minor comment update.
610
6112014-07-30 Robert Dewar <dewar@adacore.com>
612
613 * s-tasuti.adb, s-tassta.adb: Minor reformatting.
614 * sprint.adb (Sprint_Node): Handle N_Contract case.
615 * exp_prag.adb: Minor reformatting.
616 * freeze.adb (Freeze_Entity): Check useless postcondition for
617 No_Return subprogram.
618 * sem_prag.adb: Minor reformatting.
619
6202014-07-30 Javier Miranda <miranda@adacore.com>
621
622 * a-tags.ads: Complete comments about performance.
623
6242014-07-30 Fedor Rybin <frybin@adacore.com>
625
626 * gnat_ugn.texi: Adding description for --exit-status option to
627 gnattest section. Fixing index entry of --passed-tests option
628 in gnattest section.
629
6302014-07-30 Javier Miranda <miranda@adacore.com>
631
632 * Makefile.rtl, gnat_rm.texi, i-cpp.adb, i-cpp.ads, impunit.adb,
633 rtsfind.ads: Remove references to package Interfaces.CPP since this
634 package is no longer needed.
635
fccaf220
BD
6362014-07-30 Bob Duff <duff@adacore.com>
637
638 * s-taasde.adb (Timer_Queue): Don't use a
639 build-in-place function call to initialize the Timer_Queue.
640 * s-traent.adb, s-traent.ads, s-traent-vms.adb, s-traent-vms.ads:
641 Turn off polling in these units, because otherwise we get
642 elaboration circularities with Ada.Exceptions when the -gnatP
643 switch is used.
644 * s-tassta.adb (Create_Task): Make sure independent tasks
645 are created with Parent = Environment_Task. This was not true,
646 for example, in s-interr.adb, when Interrupt_Manager does "new
647 Server_Task"; the Server_Task had Parent = Interrupt_Manager,
648 which is wrong because the master is determined by the access
649 type, which is at library level.
650 * s-tasuti.adb (Make_Independent): Avoid setting Parent; it is
651 now set correctly by Create_Task.
652 (Make_Passive): Remove the workaround for the race condition in
653 Make_Independent.
654 * frontend.adb (Frontend): Revert to previous method of detecting
655 temporary configuration pragma files, recognizing such files by
656 ".tmp" in the name. This is more general than detecting pragmas
657 Source_File_Name_Project, because it allows any tool to use
658 this naming convention, no matter the content of the file.
659 * gnat_ugn.texi: Document this naming convention.
660
3aac5551
RD
6612014-07-30 Robert Dewar <dewar@adacore.com>
662
663 * exp_ch7.adb, s-tataat.adb, s-tataat.ads, s-parame-vms-alpha.ads,
664 inline.adb, s-parame-hpux.ads, exp_smem.adb, s-tasini.adb,
665 s-tasini.ads, s-parame-vms-ia64.ads, s-parame.ads, s-taskin.ads,
666 s-parame-vxworks.ads, a-tasatt.adb, a-tasatt.ads: Minor reformatting.
667 * a-suenco.adb (Convert): Handle overlong encodings in UTF8-UTF8
668 conversion.
669
274d2584
ES
6702014-07-30 Ed Schonberg <schonberg@adacore.com>
671
672 * sem_ch5.adb: Improve error recovery.
673 * inline.adb (Build_Body_To_Inline): Set Full_Analysis to false
674 before analyzing the body, so that in GNATprove mode there is
675 no light expansion. Whatever expansion is required by SPARK will
676 be performed when analysing the inlined code.
677
2afa8fdd
AC
6782014-07-30 Bob Duff <duff@adacore.com>
679
680 * s-tataat.adb, s-tataat.ads, a-tasatt.adb: Minor comment fixes.
681
6822014-07-30 Ed Schonberg <schonberg@adacore.com>
683
684 * sem_ch5.adb (Analyze_Loop_Statement): If loop has a label,
685 verify that it is not hidden by an inner implicit declaration.
686
8071b771
AC
6872014-07-30 Thomas Quinot <quinot@adacore.com>
688
689 * sem.ads (Scope_Table_Entry): New component Locked_Shared_Objects.
690 * sem_ch8.adb (Push_Scope): Initialize Locked_Shared_Objects.
691 * exp_smem.adb (Add_Shared_Var_Lock_Procs): Handle the case where
692 the call returns an unconstrained type: in this case there is
693 already a transient scope, and we should not establish a new one.
694 * exp_ch7.adb (Insert_Actions_In_Scope_Around): New formal Clean. If
695 True, also insert cleanup actions in the tree.
696 (Wrap_Transient_Declaration): Call Insert_Actions_In_Scope_Around
697 with Clean set True.
698
6992014-07-30 Arnaud Charlet <charlet@adacore.com>
700
701 * s-taskin.ads (Direct_Index, Direct_Index_Range,
702 Direct_Attribute_Element, Direct_Attribute_Array,
703 Direct_Index_Vector, Direct_Attributes, Is_Defined,
704 Indirect_Attributes): Removed. (Atomic_Address,
705 Attribute_Array, Attributes): New.
706 * s-tasini.ads, s-tasini.adb (Proc_T, Initialize_Attributes,
707 Finalize_Attributes_Link, Initialize_Attributes_Link): Removed.
708 (Finalize_Attributes): Reimplement.
709 * s-tassta.adb (Create_Task): Remove call to
710 Initialize_Attributes_Link (Free_Task, Vulnerable_Free_Task):
711 Replace Finalize_Attributes_Link by Finalize_Attributes.
712 * a-tasatt.ads, a-tasatt.adb, s-tataat.ads, s-tataat.adb:
713 Reimplement from scratch, using a simpler and more efficient
714 implementation.
715 * s-tporft.adb (Register_Foreign_Thread): Remove now obsolete comment.
716 * s-parame.ads, s-parame-hpux.ads,
717 * s-parame-vms-alpha.ads, s-parame-vms-ia64.ads,
718 * s-parame-vxworks.ads (Max_Attribute_Count): New, replace
719 Default_Attribute_Count.
720
4bd4bb7f
AC
7212014-07-30 Olivier Hainque <hainque@adacore.com>
722
723 * vxworks-ppc-link.spec: New file. Extra link
724 instructions for ppc-vxworks.
725 * vxworks-crtbe-link.spec: Likewise, for ZCX related support.
726 * system-vxworks-ppc.ads: Adjust linker options to use spec files.
727 * system-vxworks-arm.ads: Likewise.
728 * gcc-interface/Makefile.in: Enable .spec files.
729
7302014-07-30 Ed Schonberg <schonberg@adacore.com>
731
732 * sem_aggr.adb: Minor comment reformatting.
733
7342014-07-30 Robert Dewar <dewar@adacore.com>
735
736 * sem_util.ads, sem_util.adb (Is_Junk_Name): Removed.
737 * sem_warn.adb (Has_Junk_Name): New function
738 (Check_References): Use Has_Junk_Name to delete junk warnings
739 (Check_Unset_Reference): ditto.
740 (Warn_On_Unreferenced_Entity): ditto.
741 (Warn_On_Useless_Assignment): ditto.
742
7432014-07-30 Ed Schonberg <schonberg@adacore.com>
744
745 * checks.adb (Insert_Valid_Check): Do not check for the packed
746 array type of a prefix that is an access type.
747
7482014-07-30 Ed Schonberg <schonberg@adacore.com>
749
750 * sem_attr.adb (Eval_Attribute): Evaluate the GNAT attribute
751 Unconstrained_Array even if prefix is not frozen yet, as can
752 occur with a private subtype used as a generic actual.
753
7542014-07-30 Gary Dismukes <dismukes@adacore.com>
755
756 * sem_attr.adb: Minor reformatting.
757
7582014-07-30 Pat Rogers <rogers@adacore.com>
759
760 * gnat_rm.texi: Corrected minor wording error in description
761 of No_Exception_Registration.
762
7632014-07-30 Yannick Moy <moy@adacore.com>
764
765 * einfo.ads, einfo.adb: New flag Is_Inlined_Always for use in GNATprove
766 mode. Realphabetize two subprograms.
767 * inline.adb (Cannot_Inline): Use Is_Inlined_Always in GNATprove mode.
768 (Can_Be_Inlined_In_GNATprove_Mode): Adapt to possible Empty Body_Id.
769 (Check_And_Build_Body_To_Inline): Use Is_Inlined_Always in GNATprove
770 mode.
771 (Expand_Inline_Call): Use Is_Inlined_Always in GNATprove mode.
772 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Do not use
773 Is_Inline in GNATprove mode.
774 (Analyze_Subprogram_Specification):
775 Set Is_Inlined_Always at subprogram entity creation.
776 * sem_res.adb (Resolve_Call): Do not deal with inlining during
777 pre-analysis. Issue warning on call to possibly inlined
778 subprogram when body not seen.
779
7802014-07-30 Yannick Moy <moy@adacore.com>
781
782 * lib-xref.adb (Generate_Reference): Add special
783 case for compiler-generated formals in GNATprove mode.
784
480156b2
AC
7852014-07-30 Yannick Moy <moy@adacore.com>
786
787 * sem_ch6.adb: Add comments.
788
7892014-07-30 Thomas Quinot <quinot@adacore.com>
790
791 * s-os_lib.ads (GM_Time_Of): Clarify documentation.
792
7932014-07-30 Robert Dewar <dewar@adacore.com>
794
795 * sem_aggr.adb, sem_res.adb: Minor reformatting.
796
7972014-07-30 Thomas Quinot <quinot@adacore.com>
798
799 * sem_ch13.adb (Analyze_Attribute_Definition_Clause, case
800 Bit_Order): Set Reverse_Bit_Order on the base type of the
801 specified first subtype.
802
36428cc4
AC
8032014-07-30 Ed Schonberg <schonberg@adacore.com>
804
805 * inline.adb (Expand_Inlined_Call): Use a renaming declaration
806 to capture the value of actuals of a limited type rather than
807 an object declaration, to prevent spurious errors when analyzing
808 the inlined body.
809
8102014-07-30 Ed Schonberg <schonberg@adacore.com>
811
812 * sem_ch4.adb (Analyze_Type_Conversion): Treat an inlined body
813 as an instance, and inhibit semantic checks on already analyzed
814 code to prevent spurious errors.
815
8162014-07-30 Arnaud Charlet <charlet@adacore.com>
817
818 * a-exctra.ads ("="): New function, to restore compatibility.
819
8202014-07-30 Pascal Obry <obry@adacore.com>
821
822 * adaint.c (__gnat_to_os_time): Set isdst to -1 for the mktime
823 routine to use the OS dst setting.
824
8252014-07-30 Pat Rogers <rogers@adacore.com>
826
827 * gnat_ugn.texi: Minor correction to description of -gnatw.K.
828
8292014-07-30 Ed Schonberg <schonberg@adacore.com>
830
831 * sem_util.adb (Wrong_Type): Disable some checks equally within
832 instances and within inlined bodies, to suppress spurious type
833 errors on already analyzed code.
834 * sem_aggr.adb (Check_Expr_OK_In_Limited_Aggregate): Expression
835 is legal in an inlined body, juts as it is in an instance body.
836
8372014-07-30 Ed Schonberg <schonberg@adacore.com>
838
839 * sem_res.adb (Resolve_Unchecked_Conversion): Within an inlined
840 body the operand of an unchecked conversion may be a literal, in
841 which case its type is the target type of the conversion. This
842 is in contrast to conversions in other contexts, where the
843 operand cannot be a literal and must be resolvable independent
844 of the context.
845
e8fa3dcd
PMR
8462014-07-30 Pierre-Marie Derodat <derodat@adacore.com>
847
848 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create a
849 mere scalar constant instead of a reference for a renaming of
850 scalar literal.
851 * gcc-interface/utils.c (renaming_from_generic_instantiation_p): New.
852 * gcc-interface/gigi.h (renaming_from_generic_instantiation_p): New.
853
7b2888e6
AC
8542014-07-30 Robert Dewar <dewar@adacore.com>
855
856 * s-tasuti.adb, s-tasuti.ads, einfo.ads, sem_prag.adb, s-taasde.adb,
857 g-socthi-vms.adb, s-taprop-mingw.adb, s-interr.adb, s-interr-hwint.adb,
858 g-decstr.adb, s-tasdeb-vms.adb, g-expect-vms.adb, makeutl.adb,
859 s-interr-vms.adb, g-socthi.adb, exp_aggr.adb, s-tasdeb.adb,
860 g-awk.adb, gnatls.adb, s-taspri-posix.ads, g-catiio.adb,
861 s-interr-sigaction.adb, s-os_lib.adb, s-fileio.adb: Minor reformatting
862 & code reorganization.
863
8642014-07-30 Bob Duff <duff@adacore.com>
865
866 * s-tassta.adb, sem_util.ads: Minor reformatting.
867
8682014-07-30 Yannick Moy <moy@adacore.com>
869
870 * inline.adb (Build_Body_To_Inline): Detect when
871 subprogram has multiple returns, or not a single last return
872 statement, in GNATprove mode.
873 (Cannot_Inline): Simplify logic to handle case of GNATprove
874 inlining first.
875
8762014-07-30 Ed Schonberg <schonberg@adacore.com>
877
878 * sem_ch6.adb: Stubs are not subject to inlining.
879
b0c5fdda
AC
8802014-07-30 Bob Duff <duff@adacore.com>
881
882 * s-tasuti.ads, s-tasuti.adb (Make_Independent): Change this
883 from a procedure to a function, so that it can more easily be
884 called before the "begin" of a task.
885 * s-taasde.ads (Delay_Block): Make this type immutably limited,
886 so we can use a build-in-place function call to initialize
887 Timer_Queue in the body.
888 * a-rttiev.adb, s-asthan-vms-alpha.adb, s-asthan-vms-ia64.adb,
889 * s-interr.adb, s-interr-hwint.adb, s-interr-sigaction.adb,
890 * s-interr-vms.adb, s-taasde.adb: Each independent task now calls
891 Make_Independent before reaching its "begin", to avoid race
892 conditions. This causes the activating task to wait until after
893 Make_Independent is complete before proceeding. In addition,
894 we initialize data structures used by independent tasks before
895 activating those tasks, to avoid possible use of uninitialized data.
896 * s-interr.ads, s-intman.ads, s-taspri-posix.ads, s-tasdeb.ads:
897 Minor comment fixes.
898
8992014-07-30 Bob Duff <duff@adacore.com>
900
901 * a-exctra.ads, s-traent-vms.ads, s-traent.ads (Tracebacks_Array): Move
902 the declaration of Tracebacks_Array from Ada.Exceptions.Traceback to
903 System.Traceback_Entries (s-traent.ads and s-traent-vms.ads). Add
904 subtypes renaming Tracebacks_Array in Ada.Exceptions.Traceback.
905 * g-debpoo.adb: Refer to Tracebacks_Array in its new home.
906
9072014-07-30 Arnaud Charlet <charlet@adacore.com>
908
909 * a-tasatt.adb: Remove old comments.
910
52c1498c
YM
9112014-07-30 Yannick Moy <moy@adacore.com>
912
913 * einfo.ads (Is_Inlined): Document new use in GNATprove mode.
914 * inline.adb (Can_Be_Inlined_In_GNATprove_Mode): Add comments
915 to explain rationale for inlining or not in GNATprove mode.
916 (Expand_Inlined_Call): In GNATprove mode, set Is_Inlined flag
917 to False when inlining is not possible.
918 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Set Is_Inlined
919 flag to indicate that subprogram is fully inlined. To be reversed
920 if inlining problem is found.
921 * sem_res.adb (Resolve_Call): Set Is_Inlined flag to False when
922 call in potentially unevaluated context.
923
e5c4e2bc
AC
9242014-07-30 Jose Ruiz <ruiz@adacore.com>
925
926 * s-tarest.adb, s-tarest.ads: Fix comments.
927
9282014-07-30 Robert Dewar <dewar@adacore.com>
929
930 * exp_attr.adb, checks.adb, sem_util.adb, sem_util.ads, sem_attr.adb:
931 Change No_Scalar_Parts predicate to Scalar_Part_Present and
932 invert sense of test. This avoids the "not No_xxx" situation
933 which is always ugly.
934
9352014-07-30 Ed Schonberg <schonberg@adacore.com>
936
937 * inline.adb (Expand_Inlined_Call): When generating code for
938 an internal subprogram the expansion uses the location of the
939 call, so that gdb can skip over it. In GNATprove mode we want to
940 preserve slocs of original subprogram when expanding an inlined
941 call, to obtain better warnings, even though subprogram appears
942 not to come from source if it is the inlining of a subprogram
943 body without a previous spec.
944
9452014-07-30 Eric Botcazou <ebotcazou@adacore.com>
946
947 * exp_aggr.adb (Aggr_Assignment_OK_For_Backend): Reject array
948 types with atomic components.
949
9502014-07-30 Thomas Quinot <quinot@adacore.com>
951
952 * Make-generated.in: Remove now unnecessary targets after s-oscons
953 reorg.
954
9552014-07-30 Yannick Moy <moy@adacore.com>
956
957 * sem_res.adb (Resolve_Call): Use ultimate alias
958 of callee when available.
959
9602014-07-30 Ed Schonberg <schonberg@adacore.com>
961
962 * sem_ch6.adb (Analyze_Expression_Function): To check whether
963 an expression function is a completion, use the specification of
964 the previous declaration, not its entity, which may be internally
965 generated in an inlined context.
966
93a87598
AC
9672014-07-30 Doug Rupp <rupp@adacore.com>
968
969 * adaint.c (__gnat_tmp_name) [__ANDROID__]: Default to putting
970 temp files in /cache directory unless overridden by TMPDIR.
971
9722014-07-30 Jose Ruiz <ruiz@adacore.com>
973
974 * s-tassta.adb, s-tarest.adb (Initialize, Create_Task,
975 Create_Restricted_Task): Remove redundant check. Number_Of_CPUs returns
976 type CPU, so it can never be greater than CPU_Range'Last.
977
9782014-07-30 Bob Duff <duff@adacore.com>
979
980 * s-taskin.ads: Minor comment fix.
981
9822014-07-30 Thomas Quinot <quinot@adacore.com>
983
984 * g-socket.adb: Remove now useless WITH, USE, and USE TYPE
985 clauses.
986
9872014-07-30 Yannick Moy <moy@adacore.com>
988
989 * debug.adb: Free debug flag dQ used for frontend inlining in
990 GNATprove mode..
991 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Remove test of
992 debug flag..
993
9942014-07-30 Thomas Quinot <quinot@adacore.com>
995
996 * Make-generated.in: Remove generation of s-oscons.ads, only
997 generate the xoscons utility, in runtime-agnostic rules.
998 * gcc-interface/Makefile.in: Clean up rules. Remove VMS parts,
999 no longer supported.
1000
1399d355
AC
10012014-07-30 Bob Duff <duff@adacore.com>
1002
1003 * exp_ch6.adb (Add_Task_Actuals_To_Build_In_Place_Call): New
1004 parameter Chain to be used in the allocator case.
1005 (Make_Build_In_Place_Call_In_Allocator): If the allocated object
1006 has tasks, wrap the code in a block that will activate them,
1007 including the usual finalization code to kill them off in case
1008 of exception or abort.
1009
10102014-07-30 Robert Dewar <dewar@adacore.com>
1011
1012 * treepr.adb, treepr.ads; Reorganize documentation for new pp routines
1013 Remove renamings (don't work for gdb).
1014 (par): New synonym for p (avoid gdb ambiguities).
1015 * inline.adb, sem_ch6.adb, sem_ch13.adb: Minor reformatting.
1016
6be44a9a
BD
10172014-07-30 Bob Duff <duff@adacore.com>
1018
1019 * exp_ch9.ads, sem_prag.adb, exp_ch4.adb, sem_ch13.adb: Minor comment
1020 fixes.
1021 * treepr.ads, treepr.adb (ppp): Make this debugging routine
1022 accept any type covered by Union_Id.
1023
ac072cb2
AC
10242014-07-30 Robert Dewar <dewar@adacore.com>
1025
1026 * sem_ch4.adb (Analyze_If_Expression): Resolve condition before
1027 analyzing branches.
1028 * sem_eval.adb (Out_Of_Range): Check for statically unevaluated
1029 expression case.
1030
10312014-07-30 Robert Dewar <dewar@adacore.com>
1032
1033 * sem_ch13.adb (Analyze_Aspect, predicate cases): Diagnose use
1034 of predicate aspect on entity other than a type.
1035
10362014-07-30 Ed Schonberg <schonberg@adacore.com>
1037
1038 * sem_ch6.adb (Body_Has_Contract): New predicate to determine
1039 when a subprogram body without a previous spec cannot be inlined
1040 in GNATprove mode, because it includes aspects or pragmas that
1041 generate a SPARK contract clause.
1042 * inline.adb (Can_Be_Inlined_In_GNATprove_Mode): A subprogram
1043 instance cannot be inlined.
1044
cc6f5d75
AC
10452014-07-30 Robert Dewar <dewar@adacore.com>
1046
1047 * debug.adb: Document that d7 suppresses compilation time output.
1048 * errout.adb (Write_Header): Include compilation time in
1049 header output.
1050 * exp_intr.adb (Expand_Intrinsic_Call): Add
1051 Compilation_Date/Compilation_Time (Expand_Source_Info): Expand
1052 Compilation_Date/Compilation_Time.
1053 * g-souinf.ads (Compilation_Date): New function
1054 (Compilation_Time): New function.
1055 * gnat1drv.adb (Gnat1drv): Set Opt.Compilation_Time.
1056 * gnat_rm.texi (Compilation_Date): New function
1057 (Compilation_Time): New function.
1058 * opt.ads (Compilation_Time): New variable.
1059 * s-os_lib.ads, s-os_lib.adb (Current_Time_String): New function.
1060 * sem_intr.adb (Compilation_Date): New function.
1061 (Compilation_Time): New function.
1062 * snames.ads-tmpl (Name_Compilation_Date): New entry.
1063 (Name_Compilation_Time): New entry.
1064
10652014-07-30 Yannick Moy <moy@adacore.com>
1066
1067 * inline.adb: Add comment.
1068
10692014-07-30 Ed Schonberg <schonberg@adacore.com>
1070
1071 * par-ch4.adb (Is_Parameterless_Attribute): 'Result is a
1072 parameterless attribute, and a postondition can mention an
1073 indexed component or a slice whose prefix is an attribute
1074 reference F'Result.
1075
10762014-07-30 Robert Dewar <dewar@adacore.com>
1077
1078 * sprint.adb (Sprint_Node_Actual, case Object_Declaration):
1079 Avoid bomb when printing package Standard.
1080
10812014-07-30 Ed Schonberg <schonberg@adacore.com>
1082
1083 * sem_elab.adb (Check_Internal_Call_Continue): If an elaboration
1084 entity is created at this point, ensure that the name of the
1085 flag is unique, because the subprogram may be overloaded and
1086 other homonyms may also have elaboration flags created on the fly.
1087
10882014-07-30 Hristian Kirtchev <kirtchev@adacore.com>
1089
1090 * sem_attr.adb (Analyze_Array_Component_Update): New routine.
1091 (Analyze_Attribute): Major cleanup of attribute
1092 'Update. The logic is now split into two distinct routines
1093 depending on the type of the prefix. The use of <> is now illegal
1094 in attribute 'Update.
1095 (Analyze_Record_Component_Update): New routine.
1096 (Check_Component_Reference): Removed.
1097 (Resolve_Attribute): Remove the return statement and ??? comment
1098 following the processing for attribute 'Update. As a result,
1099 the attribute now freezes its prefix.
1100
11012014-07-30 Javier Miranda <miranda@adacore.com>
1102
1103 * exp_ch4.adb (Apply_Accessibility_Check): Do
1104 not call Base_Address() in VM targets.
1105
43478196
YM
11062014-07-30 Yannick Moy <moy@adacore.com>
1107
1108 * gnat1drv.adb (Adjust_Global_Switches): Set
1109 Ineffective_Inline_Warnings to True in GNATprove mode.
1110 * inline.adb (Cannot_Inline): Prepare new semantics for GNATprove
1111 mode of inlining.
1112 * opt.ads (Ineffective_Inline_Warnings): Add comment that
1113 describes use in GNATprove mode.
1114 * sem_prag.adb (Analyze_Pragma|SPARK_Mode): Ignore
1115 pragma when applied to the special body created for inlining.
1116
662c2ad4
RD
11172014-07-30 Robert Dewar <dewar@adacore.com>
1118
1119 * inline.adb, exp_ch4.adb, sinput.adb, sem_ch6.adb, sem_ch13.adb:
1120 Minor reformatting.
1121
4e6768ab
AC
11222014-07-30 Hristian Kirtchev <kirtchev@adacore.com>
1123
1124 * aspects.ads Add a comment explaining why SPARK 2014 aspects are
1125 not delayed. Update the delay status of most SPARK 2014 aspects.
1126 * sem_ch13.adb (Analyze_Aspect_Specifications): Update all calls
1127 to Decorate_Aspect_And_Pragma and Insert_Delayed_Pragma to refert
1128 to Decorate and Insert_Pragma. Add various comments concerning
1129 the delay status of several SPARK 2014 aspects. The insertion
1130 of Refined_State now uses routine Insert_After_SPARK_Mode.
1131 (Decorate): New routine.
1132 (Decorate_Aspect_And_Pragma): Removed.
1133 (Insert_Delayed_Pragma): Removed.
1134 (Insert_Pragma): New routine.
1135
11362014-07-30 Ed Schonberg <schonberg@adacore.com>
1137
1138 * inline.adb (Expand_Inlined_Call): In GNATprove mode, emit
1139 only a warning, not an error on an attempt to inline a recursive
1140 subprogram.
1141
b6c8e5be
AC
11422014-07-30 Robert Dewar <dewar@adacore.com>
1143
1144 * g-forstr.adb: Minor code reorganization (use J rather than I
1145 as a variable name).
1146 * gnat_rm.texi, sem_prag.adb, sem_util.adb, sem_ch13.adb,
1147 g-forstr.ads: Minor reformatting.
1148
11492014-07-30 Eric Botcazou <ebotcazou@adacore.com>
1150
1151 * sprint.adb (Set_Debug_Sloc): Also reset the end location if
1152 we are debugging the generated code.
1153
11542014-07-30 Yannick Moy <moy@adacore.com>
1155
1156 * sinput.ads, sinput.adb (Comes_From_Inlined_Body): New function that
1157 returns True for source pointer for an inlined body.
1158
11592014-07-30 Javier Miranda <miranda@adacore.com>
1160
1161 * exp_ch4.adb (Apply_Accessibility_Check): Add
1162 missing calls to Base_Address().
1163
11642014-07-30 Ed Schonberg <schonberg@adacore.com>
1165
1166 * sem_ch6.adb (Hanalyze_Subprogram_Body_Helper): In GNATprove
1167 mode, subprogram bodies without a previous declaration are also
1168 candidates for front-end inlining.
1169
2f6f8285
AC
11702014-07-30 Hristian Kirtchev <kirtchev@adacore.com>
1171
1172 * aspects.ads Aspects Async_Readers, Async_Writers,
1173 Effective_Reads and Effective_Writes do not need to be delayed.
1174 * sem_ch13.adb (Analyze_Aspect_Specifications): Propagate the
1175 optional Boolean expression when generating the corresponding
1176 pragma for an external property aspect.
1177 * sem_prag.adb (Analyze_External_Property_In_Decl_Part): Remove
1178 local constant Obj. Add local constant Obj_Id. Reimplement the
1179 check which ensures that the related variable is in fact volatile.
1180 (Analyze_Pragma): Reimplement the analysis of external property pragmas.
1181 * sem_util.adb (Is_Enabled): New routine.
1182 (Variable_Has_Enabled_Property): Reimplement the detection of
1183 an enabled external property.
1184
11852014-07-30 Sergey Rybin <rybin@adacore.com frybin>
1186
1187 * gnat_ugn.texi, vms_data.ads: gnatstub: describe generating subunits
1188 for body stubs.
1189
11902014-07-30 Pascal Obry <obry@adacore.com>
1191
1192 * g-forstr.adb, g-forstr.ads: New.
1193 * gnat_rm.texi, impunit.adb Makefile.rtl: Add new unit
1194 GNAT.Formatted_String.
1195
ac43e11e
AC
11962014-07-30 Eric Botcazou <ebotcazou@adacore.com>
1197
1198 * exp_aggr.adb (Aggr_Assignment_OK_For_Backend): New predicate.
1199 (Expand_Array_Aggregate): Also enable in-place expansion for
1200 code generated by the compiler. For an object declaration,
1201 set the kind of the object in addition to its type. If an
1202 in-place assignment is to be generated and it can be directly
1203 done by the back-end, do not expand the aggregate.
1204 * fe.h (Is_Others_Aggregate): Declare.
1205 * gcc-interface/trans.c
1206 (gnat_to_gnu) <N_Assignment_Statement>: Add support for an
1207 aggregate with a single Others choice on the RHS by means of
1208 __builtin_memset. Tidy up.
1209
12102014-07-30 Ed Schonberg <schonberg@adacore.com>
1211
1212 * gnat_rm.texi: minor reformatting.
1213
12142014-07-30 Yannick Moy <moy@adacore.com>
1215
1216 * sem_ch6.adb (Analyze_Subprogram_Helper_Body): Remove body to inline
1217 in SPARK_Mode Off.
1218
eb16ddf8
AC
12192014-07-30 Robert Dewar <dewar@adacore.com>
1220
1221 * gnat_rm.texi: Document additional implementation-defined use
1222 of Constrained.
1223
66288b9c
RD
12242014-07-30 Robert Dewar <dewar@adacore.com>
1225
1226 * prj-proc.adb, prj-strt.adb: Update comments.
1227
12e4e81e
AC
12282014-07-30 Gary Dismukes <dismukes@adacore.com>
1229
1230 * sinfo.ads, einfo.ads, checks.ads: Minor typo fix and reformatting.
1231
12322014-07-30 Vincent Celier <celier@adacore.com>
1233
1234 * prj-proc.adb (Imported_Or_Extended_Project_From): New Boolean
1235 parameter No_Extending, defaulted to False. When No_Extending
1236 is True, do not look for an extending project.
1237 (Expression): For a variable reference that is not for the current
1238 project, get its Id calling Imported_Or_Extended_Project_From
1239 with No_Extending set to True.
1240 * prj-strt.adb (Parse_Variable_Reference): If a referenced
1241 variable is not found in the current project, check if it is
1242 defined in one of the projects it extends.
1243
79185f5f
AC
12442014-07-30 Robert Dewar <dewar@adacore.com>
1245
1246 * sem_util.adb (Predicate_Tests_On_Arguments): Omit tests for
1247 some additional cases of internally generated routines.
1248
12492014-07-30 Ed Schonberg <schonberg@adacore.com>
1250
1251 * sem_ch10.adb (Analyze_Proper_Body): When compiling for ASIS,
1252 if the compilation unit is a subunit, extend optional processing
1253 to all subunits of the current one. This allows gnatstub to
1254 supress generation of spurious bodies.
1255
ec622246
HK
12562014-07-30 Hristian Kirtchev <kirtchev@adacore.com>
1257
1258 * a-cbmutr.adb (Insert_Child): Use local variable First to keep
1259 track of the initial element's index within the tree.
1260
36a66365
AC
12612014-07-29 Hristian Kirtchev <kirtchev@adacore.com>
1262
1263 * a-cbmutr.adb (Allocate_Node): Remove the two parameter version.
1264 (Insert_Child): Add local variable First. Capture the index of the
1265 first node being created to ensure correct cursor construction
1266 later on. Use the three parameter version of Allocate_Node
1267 when creating multiple children as this method allows aspect
1268 Default_Value to take effect (if applicable).
1269
12702014-07-29 Eric Botcazou <ebotcazou@adacore.com>
1271
1272 * exp_aggr.adb (Safe_Slice_Assignment): Remove.
1273 (Expand_Array_Aggregate): For a safe slice assignment, just set
1274 the target and use the common code path.
1275
b8e6830b
AC
12762014-07-29 Robert Dewar <dewar@adacore.com>
1277
1278 * sem_util.adb, sem_util.ads, sem_res.adb, exp_ch6.adb: Invert
1279 predicate No_Predicate_Test_On_Arguments, new name is
1280 Predicate_Tests_On_Arguments (with the opposite sense).
1281
12822014-07-29 Hristian Kirtchev <kirtchev@adacore.com>
1283
1284 * sem_attr.adb (Resolve_Attribute): Clean up the code for
1285 attribute 'Access. Do not generate an elaboration flag for a
1286 stand alone expression function. The expression of an expression
1287 function is now frozen when the expression function appears as
1288 the prefix of attribute 'Access.
1289 * sem_ch6.adb (Analyze_Expression_Function): Remove local
1290 variable New_Decl and update all references to it after the
1291 rewriting has taken place. Establish the linkages between the
1292 generated spec and body.
1293
094cf333
AC
12942014-07-29 Robert Dewar <dewar@adacore.com>
1295
1296 * sem_prag.adb (ip, rv): Prevent from being optimized away.
1297 * gnatls.adb (gnatls): Set E_Fatal exit status if ali file not found.
1298 * s-imgllb.adb, s-imgllw.adb, s-imgwiu.adb, s-imgbiu.adb: Minor
1299 reformatting.
1300
13012014-07-29 Vincent Celier <celier@adacore.com>
1302
1303 * prj-pp.adb: Minor comment update.
1304 * frontend.adb: If a target dependency info file has been read
1305 through switch -gnateT= add it to the dependencies of the source
1306 being compiled.
1307
38564f81
AC
13082014-07-29 Robert Dewar <dewar@adacore.com>
1309
1310 * sem_ch3.adb, prj.adb: Minor reformatting.
1311
13122014-07-29 Vincent Celier <celier@adacore.com>
1313
1314 * prj-pp.adb (Pretty_Print.Output_Project_File): New
1315 procedure to output project file names between quotes without
1316 concatenation, even if the line is too long.
1317 (Pretty_Print): Use Output_Project_File for project being extended and
1318 project imported.
1319
5f6fb720
AC
13202014-07-29 Vincent Celier <celier@adacore.com>
1321
1322 * gnat_ugn.texi: Document that configuration pragmas files are
1323 added to the dependencies, unless they contain only pragmas
1324 Source_File_Name_Project.
1325
13262014-07-29 Robert Dewar <dewar@adacore.com>
1327
1328 * frontend.adb: Minor reformatting.
1329
13302014-07-29 Robert Dewar <dewar@adacore.com>
1331
1332 * exp_ch6.adb (Add_Call_By_Copy_Code): Minor reformatting
1333 (Expand_Actuals): Make sure predicate checks are properly applied
1334 for the case of OUT or IN OUT parameters.
1335 * sem_res.adb: Minor reformatting (Resolve_Actuals): Skip
1336 predicate tests on arguments for Finalize
1337 * sem_util.adb (No_Predicate_Test_On_Arguments): Returns True
1338 if predicate tests on subprogram arguments should be skipped.
1339 * sem_util.ads (No_Predicate_Test_On_Arguments): New function
1340
13412014-07-29 Ed Schonberg <schonberg@adacore.com>
1342
1343 * sem_ch3.adb (Analyze_Object_Declaration): If there is an address
1344 clause for the object and the expression is an aggregate, defer
1345 resolution and expansion of the aggregate until the freeze point
1346 of the entity.
1347 * sem_aggr.adb (Resolve_Aggregate): An others_clause is legal if
1348 the parent node is an N_Reference generated during expansion.
1349
13502014-07-29 Vincent Celier <celier@adacore.com>
1351
1352 * prj.adb (Add_To_Buffer): Effectively double the size of the buffer.
1353
fc27e20e
RD
13542014-07-29 Robert Dewar <dewar@adacore.com>
1355
1356 * frontend.adb, inline.adb, sem_util.adb, sem_res.adb,
1357 prepcomp.ads: Minor reformatting and code clean up.
1358 * exp_ch6.adb (Expand_Actuals): Generate predicate test
1359 unconditionally for case of OUT or IN OUT actual (before this
1360 was generated only for certain subcases, which is wrong, the
1361 test is always needed).
1362
f3691f46
ES
13632014-07-29 Ed Schonberg <schonberg@adacore.com>
1364
1365 * sem_ch3.adb: Move Has_Defaulted_Discriminants to sem_util.
1366 * sem_ch4.adb (Analyze_Allocator): Defer resolution of expression
1367 until context type is available.
1368 * sem_res.adb (Resolve_Allocator): In the case of a qualified
1369 expression, complete resolution of expression.
1370 (Check_Aliased_Parameter): New procedure within Resolve_Actuals,
1371 to apply Ada2012 checks on aliased formals, as well as
1372 accesibility checks when the context of the call is an allocator
1373 or a qualified expression.
1374 * sem_util.ads, sem_util.adb (Has_Defaulted_Discriminants):
1375 Moved here from sem_ch3.
1376 (Object_Access_Level): Handle properly aliased formals and
1377 aggregates.
1378 * exp_ch6.adb (Expand_Call): Remove check on aliased parameters,
1379 now properly performed in sem_res (Resolve_Actuals,
1380 Check_Aliased_Parameter).
1381
2d180af1
YM
13822014-07-29 Yannick Moy <moy@adacore.com>
1383
1384 * debug.adb Enable GNATprove inlining under debug flag -gnatdQ for now.
1385 * inline.ads, inline.adb (Can_Be_Inlined_In_GNATprove_Mode): New
1386 function to decide when a subprogram can be inlined in GNATprove mode.
1387 (Check_And_Build_Body_To_Inline): Include GNATprove_Mode as a
1388 condition for possible inlining.
1389 * sem_ch10.adb (Analyze_Compilation_Unit): Remove special case
1390 for Inline_Always in GNATprove mode.
1391 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Build inlined
1392 body for subprograms in GNATprove mode, under debug flag -gnatdQ.
1393 * sem_prag.adb Minor change in comments.
1394 * sem_res.adb (Resolve_Call): Only perform GNATprove inlining
1395 inside subprograms marked as SPARK_Mode On.
1396 * sinfo.ads: Minor typo fix.
1397
5ae24312
AC
13982014-07-29 Vincent Celier <celier@adacore.com>
1399
1400 * frontend.adb: Add dependency on gnat.adc when taken into account
1401 and on non-temporary configuration pragmas files specified in
1402 switches -gnatec.
1403 * prepcomp.ads, prepcomp.adb (Add_Dependency): New procedure to add
1404 dependencies on configuration pragmas files.
1405
14062014-07-29 Pat Rogers <rogers@adacore.com>
1407
1408 * gnat_ugn.texi: Minor clarification to the explanation for the
1409 GNATtest -v switch.
1410
3c04da40
RD
14112014-07-29 Robert Dewar <dewar@adacore.com>
1412
1413 * types.ads (Mechanism_Type): Change range back to -18 .. Int'Last with
1414 documentation that explains the need for this extended range
1415 (use by C_Pass_By_Copy).
1416
09176aea
AC
14172014-07-29 Robert Dewar <dewar@adacore.com>
1418
1419 * gnat_rm.texi, sem_prag.adb: Minor reformatting.
1420
14212014-07-29 Sergey Rybin <rybin@adacore.com frybin>
1422
1423 * gnat_ugn.texi: gnatmetric: clarify documentation for cyclomatic
1424 complexity metrics.
1425
14262014-07-29 Thomas Quinot <quinot@adacore.com>
1427
1428 PR ada/60652
1429 * s-oscons-tmplt.c: For Linux, define _BSD_SOURCE in order for
1430 CRTSCTS to be visible.
1431
14322014-07-29 Bob Duff <duff@adacore.com>
1433
1434 * g-trasym.adb, g-trasym.ads: Code cleanup.
1435
1b4ada8f
DR
14362014-07-29 Doug Rupp <rupp@adacore.com>
1437
1438 * sigtramp-vxworks.c: Minor reformatting.
1439
155562cb
AC
14402014-07-29 Ed Schonberg <schonberg@adacore.com>
1441
1442 * gnat_rm.texi: No doc needed for Ada2012 aspect
1443 Implicit_dereference.
1444
14452014-07-29 Robert Dewar <dewar@adacore.com>
1446
1447 * sem_attr.adb (Attribute_12): New array
1448 (Analyze_Attribute): Check impl-defined Ada 2012 attributes.
1449 (Check_Ada_2012_Attribute): Removed.
1450
14512014-07-29 Doug Rupp <rupp@adacore.com>
1452
1453 * init.c (vxworks6): Call sigtramp for RTP (as well as DKM) for ARM,
1454 PPC, and e500.
1455 * sigtramp-vxworks.c: New file.
1456 * sigtramp-armvxw.c, sigtramp-ppcvxw.c: removed files.
1457
ad8bd3f4
ES
14582014-07-29 Ed Schonberg <schonberg@adacore.com>
1459
1460 * lib-xref.adb (Output_Refs, Check_Type_Reference): For a
1461 derived array type, add information about component type, which
1462 was previously missing in ali file.
1463 * gnat_rm.texi: Add documentation for Atomic_Always_Lock_Free.
1464
422e02cf
AC
14652014-07-29 Thomas Quinot <quinot@adacore.com>
1466
1467 * sem_ch3.adb (Constrain_Corresponding_Record): For the case
1468 of the subtype created for a record component, do not mark
1469 the subtype as frozen. For one thing, this is anomalous (in
1470 particular, the base type might not itself be frozen yet);
1471 furthermore, proper freezing of the subtype must happen in any
1472 case. So, we just mark the subtype as requiring delayed freezing
1473 (and we'll actually freeze it when generating the init_proc of
1474 the enclosing record).
1475 Also change the name of the constrained record subtype (append a
1476 'C' so that it is clearly different from the unconstrained record
1477 type, "related_idV") to make debugging easier.
1478 (Process_Full_View): When creating a full subtype for a pending
1479 private subtype, re-establish the scope of the private subtype
1480 so that we get proper visibility on outer discriminants.
1481 * exp_ch3.adb (Build_Init_Statements): Freeze any component
1482 subtype that is not frozen yet.
1483
14842014-07-29 Vincent Celier <celier@adacore.com>
1485
1486 * prj-proc.adb (Recursive_Process): Always initialize the
1487 environment when the project is an aggregate project, even when
1488 it is not the root tree.
0677a1c7
RD
14892014-07-29 Robert Dewar <dewar@adacore.com>
1490
1491 * exp_ch5.adb, exp_ch9.adb: Minor comment additions.
1492 * gnat_rm.texi: Complete list of implementation aspects.
1493 * aspects.ads: Minor comment clarification.
1494
a2cc9797
AC
14952014-07-29 Ed Schonberg <schonberg@adacore.com>
1496
1497 * exp_ch5.adb (Expand_N_Assignment_Statement): If the target type
1498 is a null-excluding access type, do not generate a constraint
1499 check if Suppress_Assignment_Checks is set on assignment node.
1500 * exp_ch9.adb (Build_Simple_Entry_Call): If actual is an out
1501 parameter of a null-excluding access type, there is access check
1502 on entry, so set Suppress_Assignment_Checks on generated statement
1503 that assigns actual to parameter block.
1504 * sinfo.ads: Document additional use of Suppress_Assignment_Checks.
1505
effdbb7d
AC
15062014-07-29 Robert Dewar <dewar@adacore.com>
1507
1508 * gnat_rm.texi: Change theta to @ in documentation of aspect
1509 Dimension_System.
1510
15112014-07-29 Robert Dewar <dewar@adacore.com>
1512
1513 * sem_attr.adb (Uneval_Old_Msg): Flags Uneval_Old_Accept/Warn
1514 are now on pragma.
1515 * sem_ch13.adb (Analyze_Aspect_Specifications): Remove setting
1516 of Uneval_Old_*
1517 * sem_prag.adb (Analyze_Pragma): Set Uneval_Old_* flags
1518 * sinfo.ads, sinfo.adb: Move Uneval_Old_Accept/Warn to N_Pragma node.
1519
15202014-07-29 Javier Miranda <miranda@adacore.com>
1521
1522 * types.ads Update documentation on how to add new reason codes
1523 for exceptions.
1524 (RT_Exception_Code): Keep values ordered by their
1525 reason code. Required by the .NET backend.
1526 (RT_CE_Exceptions): Subtype declaration removed.
1527 (RT_PE_Exceptions): Subtype declaration removed.
1528 (RT_SE_Exceptions): Subtype declaration removed.
1529 (Kind): New mapping table of RT_Exception_Codes.
1530 * exp_ch11.adb (Get_RT_Exception_Entity): Updated to use the
1531 new mapping table.
1532 * tbuild.adb (Make_Raise_Storage_Error): Updated to use the new
1533 mapping table. (Make_Raise_Program_Error): Updated to use the
1534 new mapping table.
1535 (Make_Raise_Storage_Error): Updated to use the new mapping table.
1536 * a-except.adb Keep Rcheck_CE_xxx entities ordered according to
1537 their reason code.
1538
09d67391
AC
15392014-07-29 Thomas Quinot <quinot@adacore.com>
1540
1541 * gnat_rm.texi: Document internal attributes used for PolyORB/DSA
1542 distributed stubs generation.
1543 * exp_ch3.adb: Minor reformatting.
1544
15452014-07-29 Yannick Moy <moy@adacore.com>
1546
1547 * sinfo.ads: Document constraint between frontend and GNATprove.
1548
c93af807
RD
15492014-07-29 Robert Dewar <dewar@adacore.com>
1550
1551 * a-except.adb: Minor comment clarification.
1552
15532014-07-29 Robert Dewar <dewar@adacore.com>
1554
1555 * gnat_rm.texi: Complete list of implementation attributes.
1556 * snames.ads-tmpl: Clean up list of impl-defined attributes.
1557
f9e333ab
AC
15582014-07-29 Hristian Kirtchev <kirtchev@adacore.com>
1559
1560 * freeze.adb (Freeze_Record_Type): Perform various
1561 volatility-related checks.
1562
15632014-07-29 Robert Dewar <dewar@adacore.com>
1564
1565 * sem_ch3.adb, sem_eval.adb: Minor reformatting.
1566
15672014-07-29 Ed Schonberg <schonberg@adacore.com>
1568
1569 * sem_attr.adb: sem_attr.adb (Access_Attribute): Handle properly
1570 the case where the attribute reference appears in a nested scope
1571 from that of the subprogram prefix.
1572 * sem_attr.adb: Minor reformatting.
1573
15742014-07-29 Robert Dewar <dewar@adacore.com>
1575
1576 * gnat_ugn.texi: Clarify documentation of Initialize_Scalar
1577 initialization options.
1578
87e69720
AC
15792014-07-29 Robert Dewar <dewar@adacore.com>
1580
1581 * sinfo.ads: Minor comment addition.
1582
15832014-07-29 Bob Duff <duff@adacore.com>
1584
1585 * sem_eval.adb, sem_ch13.adb: Minor reformatting.
1586
113a9fb6
AC
15872014-07-29 Doug Rupp <rupp@adacore.com>
1588
1589 * init.c: Complete previous change.
1590
15912014-07-29 Robert Dewar <dewar@adacore.com>
1592
1593 * exp_ch4.adb (Expand_N_If_Expression): Deal with unconstrained
1594 array case.
1595
15962014-07-29 Ed Schonberg <schonberg@adacore.com>
1597
1598 * sem_attr.adb (Access_Attribute): If the prefix is a subprogram
1599 and the completion will appear in the same declarative part,
1600 create elaboration flag.
1601 * exp_util.adb (Set_Elaboration_Flag): If the subprogram body
1602 is a completion of a declaration in the same declarative part,
1603 and the subprogram has had its address taken, add elaboration
1604 check inside the subprogram body, to detect elaboration errors
1605 that may occur through indirect calls.
1606
3808a9c7
AC
16072014-07-29 Doug Rupp <rupp@adacore.com>
1608
1609 * sigtramp-armvxw.c: Enhance to handle RTP trampolining.
1610 * init.c: Remove guard on sigtramp for ARM VxWorks RTP.
1611
16122014-07-29 Vincent Celier <celier@adacore.com>
1613
1614 * switch-c.adb (Scan_Front_End_Switches): Do not fail when two
1615 runtime directorie specified with two switches --RTS= designate
1616 the same directory, even when there are no literarily the same.
1617
16182014-07-29 Robert Dewar <dewar@adacore.com>
1619
1620 * gnat_ugn.texi: Minor documentation clarification.
1621 * switch-c.adb: Minor reformatting.
1622
24d14b91
AC
16232014-07-29 Robert Dewar <dewar@adacore.com>
1624
1625 * sem_prag.adb (Analyze_Pragma, case Allow_Integer_Address):
1626 Fix incorrect RTE call which caused bomb if pragma was in
1627 configuration pragma file.
1628
16292014-07-29 Jerome Lambourg <lambourg@adacore.com>
1630
1631 * expect.c (__gnat_expect_poll): Fix typo in previous change.
1632 * g-expect.adb: Update comments.
1633
16342014-07-29 Arnaud Charlet <charlet@adacore.com>
1635
1636 * s-parame-hpux.ads, s-parame-vms-ia64.ads, s-parame.ads
1637 (Default_Attribute_Count): Bump to 16 on native platforms.
1638
16392014-07-29 Ed Schonberg <schonberg@adacore.com>
1640
1641 * sem_res.adb: Add guard to front-end inlining for SPARK.
1642
b94b6c56
RD
16432014-07-29 Robert Dewar <dewar@adacore.com>
1644
1645 * sem_ch10.adb, debug.adb, sem_prag.adb, sem_res.adb, sem_ch6.adb:
1646 Minor reformatting.
1647
ecad37f3
ES
16482014-07-29 Ed Schonberg <schonberg@adacore.com>
1649
1650 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Build body to
1651 inline in GNATprove mode when subprogran is marked Inline_Always.
1652 * sem_res.adb (Resolve_Call): Expand call in place in GNATProve
1653 mode if body to inline is available.
1654 * sem_prag.adb (Analyze_Pragma, case Inline_Always): Make pragma
1655 effective in GNATprove mode.
1656 * sem_ch10.adb (Analyze_Compilation_Unit): Call
1657 Check_Package_Body_For_Inlining in GNATprove mode, so that body
1658 containing subprograms with Inline_Always can be available before
1659 calls to them.
1660
1773d80b
AC
16612014-07-29 Ed Schonberg <schonberg@adacore.com>
1662
1663 * inline.ads, inline.adb, sem_ch10.adb: Rename Check_Body_For_Inlining
1664 to Check_Package_Body_For_Inlining, to prevent confusion with other
1665 inlining subprograms.
1666
16672014-07-29 Robert Dewar <dewar@adacore.com>
1668
1669 * opt.ads: Minor comment update.
1670 * sem_attr.adb (Uneval_Old_Msg): Deal with case of aspect, where
1671 we want setting of Uneval_Old at time of encountering the aspect.
1672 * sem_ch13.adb (Analyze_Aspect_Specifications): Capture setting
1673 of Opt.Uneval_Old.
1674 * sinfo.adb (Uneval_Old_Accept): New function (Uneval_Old_Warn):
1675 New function (Set_Uneval_Old_Accept): New procedure.
1676 (Set_Uneval_Old_Warn): New procedure.
1677 * sinfo.ads: Uneval_Old_Accept: New flag Uneval_Old_Warn: New flag.
1678
3f80a182
AC
16792014-07-29 Robert Dewar <dewar@adacore.com>
1680
1681 * sinfo.ads, inline.adb, inline.ads, sem_ch6.adb: Minor reformatting.
1682 * snames.ads-tmpl: Minor reformatting.
1683 * xsnamest.adb (XSnamesT): Remove special casing of Name_Error
1684 to give <Error>. Not clear why this was there, but the compiler
1685 sources do not reference Name_Error, and this interfered with
1686 the circuits for pragma Unevaluated_Use_Of_Old.
1687
16882014-07-29 Hristian Kirtchev <kirtchev@adacore.com>
1689
1690 * sem_prag.adb (Process_Atomic_Shared_Volatile): Allow volatile
1691 types in SPARK 2014 (again).
1692 * sem_res.adb (Is_OK_Volatile_Context): New routine.
1693 (Resolve_Entity_Name): Ensure that a volatile object with
1694 enabled properties Async_Writers or Effectire_Reads appears in
1695 a non-interfering context.
1696
540d8610
ES
16972014-07-29 Ed Schonberg <schonberg@adacore.com>
1698
1699 * sem_ch6.adb: Move Build_Body_To_Inline,
1700 Check_And_Buid_Body_To_Inline, and Cannot_Inline to package Inline.
1701 * exp_ch6.adb: Mode Expand_Inlined_Body to package Inline.
1702 * inline.ads, inline.adb: Package now contains subprograms that
1703 implement front-end inlining. No functional changes, no test
1704 needed.
1705
b973629e
AC
17062014-07-29 Robert Dewar <dewar@adacore.com>
1707
1708 * exp_dbug.adb, g-expect.adb, sem_elab.adb: Minor typo fix.
1709
17102014-07-29 Ed Schonberg <schonberg@adacore.com>
1711
1712 * sem_ch6.adb (Analyze_Return_Type): Reject a return type that
1713 is a limited view when the context is a package body, because
1714 there is no subsequent place at which the non-limited view may
1715 become visible.
1716 (Process_Formals): Ditto.
1717 * sinfo.ads, par-ch3.adb: Minor reformatting.
1718
a7737c19
AC
17192014-07-29 Jerome Lambourg <lambourg@adacore.com>
1720
1721 * expect.c (__gnat_expect_poll): New parameter dead_process
1722 used to return the dead process among the array of file
1723 descriptors. The Windows, VMS and HPUX implementations now
1724 properly report the dead process via this parameter. Other unixes
1725 don't need it.
1726 * g-expect.adb (Poll): Adapt to the C profile.
1727 (Expect_Internal): Use the new parameter to properly close the
1728 File Descriptor. This then can be properly reported by the
1729 function First_Dead_Process as is expected.
1730
17312014-07-29 Robert Dewar <dewar@adacore.com>
1732
1733 * gnat_ugn.texi: Minor clarification of -gnatQ switch.
1734
ab01e614
AC
17352014-07-29 Robert Dewar <dewar@adacore.com>
1736
1737 * einfo.adb (Derived_Type_Link): New function
1738 (Set_Derived_Type_Link): New procedure.
1739 (Write_Field31_Name): Output Derived_Type_Link.
1740 * einfo.ads: New field Derived_Type_Link.
1741 * exp_ch6.adb (Expand_Call): Warn if change of representation
1742 needed on call.
1743 * sem_ch13.adb: Minor addition of ??? comment.
1744 (Rep_Item_Too_Late): Warn on case that is legal but could cause an
1745 expensive implicit conversion.
1746 * sem_ch3.adb (Build_Derived_Type): Set Derived_Type_Link if needed.
1747
17482014-07-29 Hristian Kirtchev <kirtchev@adacore.com>
1749
1750 * exp_ch3.adb (Build_Init_Procedure): Renamed Local_DF_Id
1751 to DF_Id. Add new local variable DF_Call. Do not perform any
1752 elaboration-related checks on the call to the partial finalization
1753 routine within an init proc to avoid generating bogus elaboration
1754 warnings on expansion-related code.
1755 * sem_elab.adb (Check_A_Call): Move constant Access_Case to
1756 the top level of the routine. Ensure that Output_Calls takes
1757 into account flags -gnatel and -gnatwl when emitting warnings
1758 or info messages.
1759 (Check_Internal_Call_Continue): Update the call to Output_Calls.
1760 (Elab_Warning): Moved to the top level of routine Check_A_Call.
1761 (Emit): New routines.
1762 (Output_Calls): Add new formal parameter Check_Elab_Flag along with a
1763 comment on usage. Output all warnings or info messages only when the
1764 caller context demands it and the proper elaboration flag is set.
1765
17662014-07-29 Yannick Moy <moy@adacore.com>
1767
1768 * sem_attr.adb (Analyze_Attribute/Attribute_Old):
1769 Check rule about Old appearing in potentially unevaluated
1770 expression everywhere, not only in Post.
1771
17722014-07-29 Arnaud Charlet <charlet@adacore.com>
1773
1774 * sem_prag.adb: Update comment.
1775 * a-except.adb, a-except-2005.adb: Minor editing.
1776
17772014-07-29 Pierre-Marie Derodat <derodat@adacore.com>
1778
1779 * exp_dbug.adb (Debug_Renaming_Declaration):
1780 Do not create renaming entities for renamings of non-packed
1781 objects and for exceptions.
1782
a8b346d2
RD
17832014-07-29 Robert Dewar <dewar@adacore.com>
1784
1785 * sem_ch3.adb, sinfo.ads, types.ads, sem_prag.adb, a-except-2005.adb,
1786 sem_ch6.adb, par-ch3.adb: Minor reformatting.
1787
84c0a895
AC
17882014-07-29 Ed Schonberg <schonberg@adacore.com>
1789
1790 * sem_ch6.adb (Check_Return_Subtype_Indication): Reject a return
1791 subtype indication in an extended return statement when the
1792 return value is an ancestor of the return type of the function,
1793 and that return type is a null record extension.
1794
17952014-07-29 Thomas Quinot <quinot@adacore.com>
1796
1797 * sem_ch13.adb (Rep_Item_Too_Late): Specialize/clarify error
1798 message produced for the case of a type-related representation
1799 item that is made illegal by 13.10(1).
1800 * gnat_rm.texi (Scalar_Storage_Order): Minor change in
1801 documentation.
1802
7a2c2277
AC
18032014-07-29 Robert Dewar <dewar@adacore.com>
1804
1805 * gnat_ugn.texi: Add section on Wide_Wide_Character encodings.
1806 * erroutc.adb (Output_Error_Msgs): Take wide characters into
1807 account in computing position of error flags.
1808 * sinput.adb (Get_Column_Number): Take wide characters into
1809 account.
1810
18112014-07-29 Ed Schonberg <schonberg@adacore.com>
1812
1813 * par-ch3.adb (P_Access_Type_Definition): The subtype indication
1814 in an access type definition can carry a null_exclusion indicator.
1815 * sem_ch3.adb (Access_Type_Declaration): If the subtype indication
1816 carries a null_exclusion indicator, verify that the subtype
1817 indication denotes an access type, and create a null-excluding
1818 subtype for it.
1819 * sinfo.ads, sinfo.adb: New attribute Null_Excluding_Subtype,
1820 defined on N_Access_To_Object_Definition to indicate that the
1821 subtype indication carries a null_exclusion indicator.
1822
18232014-07-29 Hristian Kirtchev <kirtchev@adacore.com>
1824
1825 * exp_ch6.adb (Add_Extra_Actual): Do not construct
1826 the extra actual by name, generate a reference instead.
1827
18282014-07-29 Arnaud Charlet <charlet@adacore.com>
1829
1830 * sem_prag.adb (Analyze_Pragma): Do not crash analyzing
1831 Allow_Integer_Address if already set.
1832 * a-except-2005.adb (Rcheck_PE_Stream_Operation_Not_Allowed):
1833 Fix order, for consistency with Rmsg_xx declarations.
1834
28e18b4f
AC
18352014-07-29 Ed Schonberg <schonberg@adacore.com>
1836
1837 * sem_ch4.adb (Complete_Object_Operation): If the type of the
1838 candidate subprogram is a limited view, use non-limited view
1839 when available.
1840
18412014-07-29 Robert Dewar <dewar@adacore.com>
1842
1843 * sem_ch13.adb: Minor change in RM reference.
1844 * sem_mech.ads: Minor reformatting.
1845 * einfo.ads: Minor comment fix.
1846 * types.ads: Minor correction to range given for Mechanism_Type.
1847 * exp_ch6.adb (Add_Invariant_And_Predicate_Checks): Do not
1848 check predicate on way out for OUT or IN OUT parameters.
1849 * par-ch3.adb (P_Constraint_Opt): Handle missing RANGE keyword
1850 better (P_Range_Constraint): Corresponding fix.
1851 * checks.ads: Minor comment clarification.
1852
18532014-07-29 Gary Dismukes <dismukes@adacore.com>
1854
1855 * sem_ch8.adb (Analyze_Object_Renaming): Set the Is_Volatile
1856 and Treat_As_Volatile flags based on whether the renamed object
1857 is a volatile object.
1858
f8c79ade
AC
18592014-07-29 Olivier Hainque <hainque@adacore.com>
1860
1861 * g-debpoo.adb
1862 (Default_Alignment): Rename as Storage_Alignment. This is not
1863 a "default" that can be overriden. Augment comment to clarify
1864 intent and document why we need to manage alignment padding.
1865 (Header_Offset): Set to Header'Object_Size instead of 'Size
1866 rounded up to Storage_Alignment. Storage_Alignment on the
1867 allocation header is not required by our internals so was
1868 overkill. 'Object_Size is enough to ensure proper alignment
1869 of the header address when substracted from a storage address
1870 aligned on Storage_Alignment.
1871 (Minimum_Allocation): Rename as Extra_Allocation, conveying that
1872 this is always added on top of the incoming allocation requests.
1873 (Align): New function, to perform alignment rounding operations.
1874 (Allocate): Add comments on the Storage_Address computation
1875 scheme and adjust so that the alignment padding applies to that
1876 (Storage_Address) only.
1877
18782014-07-29 Robert Dewar <dewar@adacore.com>
1879
1880 * exp_ch3.adb (Default_Initialize_Object): Remove incorrect
1881 pragma Unreferenced.
1882 * cstand.adb (Create_Standard): Use E_Array_Type for standard
1883 string types. Make sure index of Any_String/Any_Array is in a list.
1884 * errout.adb: Minor reformatting.
1885
b329a739
AC
18862014-07-29 Robert Dewar <dewar@adacore.com>
1887
1888 * gnat_ugn.texi: Clean up and correct documentation of warnings.
1889 * usage.adb: Minor corrections to make sure warnings are properly
1890 documented.
1891 * warnsw.adb (Set_Warning_Switch): Remove redundant return statement.
1892 (WA_Warnings): Add Warn_On_Suspicious_Modulus_Value.
1893
18942014-07-29 Ed Schonberg <schonberg@adacore.com>
1895
1896 * exp_ch3.adb (Expand_N_Object_Declaration): The dummy block
1897 created to match internal sequence numbers between compilations
1898 with/without abort must have its type properly set.
1899
220d1fd9
AC
19002014-07-29 Robert Dewar <dewar@adacore.com>
1901
1902 * ali.adb (Initialize_ALI): Initialize SSO_Default_Specified
1903 (Scan_ALI): Set SSO_Default in ALIs_Record (Scan_ALI): Set
1904 SSO_Default_Specified.
1905 * ali.ads (ALIs_Record): Add field SSO_Default
1906 (SSO_Default_Specified): New global switch.
1907 * bcheck.adb (Check_Consistent_SSO_Default): New procedure
1908 (Check_Configuration_Consistency): Call this procedure
1909 * einfo.adb (SSO_Set_High_By_Default): New
1910 function (SSO_Set_Low_By_Default): New function
1911 (Set_SSO_Set_High_By_Default): New procedure
1912 (Set_SSO_Set_Low_By_Default): New procedure (Write_Entity_Flags):
1913 List new flags
1914 * einfo.ads (SSO_Set_Low_By_Default): New flag
1915 (SSO_Set_High_By_Default): New flag
1916 * freeze.adb (Set_SSO_From_Default): New procedure
1917 (Freeze_Array_Type): Call Set_SSO_From_Default
1918 (Freeze_Record_Type): Call Set_SSO_From_Default
1919 * gnat_rm.texi: Document pragma Default_Scalar_Storage_Order
1920 * lib-writ.adb (Write_ALI): Set OL/OH in P line as needed
1921 * lib-writ.ads: Add OL/OH parameters to P line
1922 * opt.adb: Set Default_SSO, Default_SSO_Config as appropriate
1923 * opt.ads (Default_SSO): New global switch (Default_SSO_Config):
1924 New global switch
1925 * repinfo.adb (List_Scalar_Storage_Order): List SSO when it is
1926 set by default using pragma Default_Scalar_Storage_Order.
1927 * sem.ads (Scope_Stack_Entry): Add component Save_Default_SSO
1928 * sem_ch13.adb (Inherit_Delayed_Rep_Aspects):
1929 Clear SSO defaults when explicit SSO is inherited.
1930 (Analyze_Attribute_Definition_Clause): Clear SSO defaults when
1931 explicit SSO is specified.
1932 (Inherit_Aspects_At_Freeze_Point):
1933 Clear SSO default when inheriting SSO.
1934 * sem_ch3.adb (Set_Default_SSO): New procedure
1935 (Analyze_Private_Extension_Declaration): Set defualt SSO
1936 (Array_Type_Declaration): ditto (Build_Derived_Array_Type): ditto
1937 (Build_Derived_Private_Type): ditto (Build_Derived_Record_Type):
1938 ditto (Build_Derived_Type): ditto (Make_Class_Wide_Type): ditto
1939 (Record_Type_Declaration): ditto
1940 * sem_ch8.adb (Pop_Scope): Restore Default_SSO (Push_Scope):
1941 Save Default_SSO
1942 * sem_prag.adb (Analyze_Pragma, case
1943 Default_Scalar_Storage_Order): Set Default_SSO
1944
19452014-07-29 Ed Schonberg <schonberg@adacore.com>
1946
1947 * sem_ch6.adb (Valid_Operator_Definition): Verify that
1948 all parameter have mode IN. This check must be done here for
1949 subprogram instantiations that have operator names, because their
1950 analysis does not follow the same path as that for subprogram
1951 declarations.
1952
a08bf2de
RD
19532014-07-29 Robert Dewar <dewar@adacore.com>
1954
1955 * freeze.adb (Freeze_Entity, Concurrent_Type case): Add a guard
1956 to make sure that the Etype of a component of the corresponding
1957 record type is present before trying to freeze it.
1958 * sem_ch5.adb: Minor reformatting.
1959
b8b2d982
AC
19602014-07-29 Robert Dewar <dewar@adacore.com>
1961
1962 * exp_attr.adb, types.ads, types.h, exp_ch11.adb, a-except.adb,
1963 a-except-2005.adb: Add new reason code PE_Stream_Operation_Not_Allowed,
1964 and then use it when a stream operation is used from a library generic
1965 when the restriction (No_Streams) is active.
1966
19672014-07-29 Thomas Quinot <quinot@adacore.com>
1968
1969 * projects.texi: Fix minor typo.
1970
19712014-07-29 Yannick Moy <moy@adacore.com>
1972
1973 * sem_attr.adb (Analyze_Attribute): Fix generation of warning.
1974
19752014-07-29 Arnaud Charlet <charlet@adacore.com>
1976
1977 * sem_ch5.adb (Check_Unreachable_Code): Do not remove code in
1978 CodePeer mode.
1979
19802014-07-29 Hristian Kirtchev <kirtchev@adacore.com>
1981
1982 * exp_ch7.adb (Find_Last_Init): Add local variable
1983 Deep_Init_Found. Check the statement immediately following the
1984 declaration if [Deep_]Initialization was not found.
1985
19862014-07-29 Hristian Kirtchev <kirtchev@adacore.com>
1987
1988 * exp_util.adb (Is_Aliased): It appears that
1989 'reference-d and renamed objects still play some role in Boolean
1990 expression with actions and cannot be finalized immediately.
1991
19922014-07-29 Ed Schonberg <schonberg@adacore.com>
1993
1994 * exp_dbug.adb (Qualify_Needed): For debugging purposes,
1995 Loop names are not part of the full qualification of entity names.
1996
02bb0765
AC
19972014-07-29 Robert Dewar <dewar@adacore.com>
1998
1999 * einfo.adb (Has_Protected): Test base type.
2000 * sem_ch4.adb (Analyze_Allocator): Reorganize code to make sure
2001 that we always properly check No_Protected_Type_Allocators.
2002
20032014-07-29 Ed Schonberg <schonberg@adacore.com>
2004
2005 * sem_util.ads, sem_util.adb (Defining_Entity): Now applies to
2006 loop declarations as well.
2007 * exp_ch5.adb (Expand_Loop_Statement): Apply Qualify_Entity_Names
2008 to an iterator loop, because it may contain local renaming
2009 declarations that require debugging information.
2010
20112014-07-29 Robert Dewar <dewar@adacore.com>
2012
2013 * sem_util.ads, exp_util.adb, sem_attr.adb: Minor reformatting.
2014
fc3a3f3b
RD
20152014-07-29 Robert Dewar <dewar@adacore.com>
2016
2017 * einfo.ads, einfo.adb (Static_Real_Or_String_Predicate): New function
2018 (Set_Static_Real_Or_String_Predicate): New procedure
2019 * sem_ch13.adb (Build_Predicate_Functions): Accomodate static
2020 string predicates (Is_Predicate_Static): Handle static string
2021 predicates.
2022 * sem_eval.adb (Real_Or_String_Static_Predicate_Matches):
2023 New procedure (Check_Expression_Against_Static_Predicate):
2024 Deal with static string predicates, now fully implemented
2025 (Eval_Relational_Op): Allow string equality/inequality as static
2026 if not comes from source.
2027
60f908dd
RD
20282014-07-29 Robert Dewar <dewar@adacore.com>
2029
2030 * sem_aggr.adb, exp_ch5.adb, sem_ch5.adb, exp_util.adb, einfo.adb,
2031 einfo.ads, sem_util.adb, sem_attr.adb, sem_case.adb, sem_eval.adb,
2032 sem_eval.ads, sem_ch13.adb: General cleanup of static predicate
2033 handling. Change name of Discrete_Predicate to
2034 Discrete_Static_Predicate, and replace testing of the presence of this
2035 field by testing the flag Has_Static_Expression.
2036
96e90ac1
RD
20372014-07-29 Robert Dewar <dewar@adacore.com>
2038
2039 * gnat_rm.texi: Document pragma Unevaluated_Use_Of_Old.
2040 * opt.adb: Handle Uneval_Old.
2041 * opt.ads (Uneval_Old, Uneval_Old_Config): New variables.
2042 * par-prag.adb: Add dummy entry for pragma Unevaluated_Use_Of_Old.
2043 * sem.ads (Save_Uneval_Old): New field in Scope_Stack_Entry.
2044 * sem_attr.adb (Uneval_Old_Msg): New procedure.
2045 * sem_ch8.adb (Push_Scope): Save Uneval_Old.
2046 (Pop_Scope): Restore Uneval_Old.
2047 * sem_prag.adb (Analyze_Pragma, case Unevaluated_Use_Of_Old):
2048 Implemented.
2049 * snames.ads-tmpl: Add entries for pragma Unevaluated_Use_Of_Old
2050 Add entries for Name_Warn, Name_Allow.
2051
edab6088
RD
20522014-07-29 Robert Dewar <dewar@adacore.com>
2053
2054 * sem_aggr.adb (Resolve_Array_Aggregate): Change Is_Static_Range
2055 to Is_OK_Static_Range.
2056 * sem_attr.adb (Eval_Attribute): Make sure we properly flag
2057 static attributes (Eval_Attribute, case Size): Handle size of
2058 zero properly (Eval_Attribute, case Value_Size): Handle size of
2059 zero properly.
2060 * sem_ch13.adb: Minor reformatting.
2061 * sem_ch3.adb (Process_Range_Expr_In_Decl): Change
2062 Is_Static_Range to Is_OK_Static_Range.
2063 * sem_eval.adb (Eval_Case_Expression): Total rewrite, was
2064 wrong in several ways (Is_Static_Range): Moved here from spec
2065 (Is_Static_Subtype): Moved here from spec Change some incorrect
2066 Is_Static_Subtype calls to Is_OK_Static_Subtype.
2067 * sem_eval.ads: Add comments to section on
2068 Is_Static_Expression/Raises_Constraint_Error (Is_OK_Static_Range):
2069 Add clarifying comments (Is_Static_Range): Moved to body
2070 (Is_Statically_Unevaluated): New function.
2071 * sem_util.ads, sem_util.adb (Is_Preelaborable_Expression): Change
2072 Is_Static_Range to Is_OK_Static_Range.
2073 * sinfo.ads: Additional commments for Is_Static_Expression noting
2074 that clients should almost always use Is_OK_Static_Expression
2075 instead. Many other changes throughout front end units to obey
2076 this rule.
2077 * tbuild.ads, tbuild.adb (New_Occurrence_Of): Set Is_Static_Expression
2078 for enumeration literal.
2079 * exp_ch5.adb, sem_intr.adb, sem_ch5.adb, exp_attr.adb, exp_ch9.adb,
2080 lib-writ.adb, sem_ch9.adb, einfo.ads, checks.adb, checks.ads,
2081 sem_prag.adb, sem_ch12.adb, freeze.adb, sem_res.adb, exp_ch4.adb,
2082 exp_ch6.adb, sem_ch4.adb, sem_ch6.adb, exp_aggr.adb, sem_cat.adb:
2083 Replace all occurrences of Is_Static_Expression by
2084 Is_OK_Static_Expression.
2085
c5c780e6
HK
20862014-07-29 Hristian Kirtchev <kirtchev@adacore.com>
2087
2088 * exp_ch4.adb (Process_Transient_Object): Remove constant
2089 In_Cond_Expr, use its initialization expression in place.
2090 * exp_ch7.adb (Process_Declarations): There is no need to check
2091 that a transient object being hooked is controlled as it would
2092 not have been hooked in the first place.
2093 * exp_util.adb (Is_Aliased): 'Reference-d or renamed transient
2094 objects are not considered aliased when the related context is
2095 a Boolean expression_with_actions.
2096 (Requires_Cleanup_Actions): There is no need to check that a transient
2097 object being hooked is controlled as it would not have been hooked in
2098 the first place.
2099
e2bc5465
AC
21002014-07-29 Robert Dewar <dewar@adacore.com>
2101
2102 * errout.adb: Minor reformatting.
2103
21042014-07-29 Hristian Kirtchev <kirtchev@adacore.com>
2105
2106 * exp_ch3.adb (Default_Initialize_Object): Add new variables
2107 Abrt_Blk and Dummy. Generate a dummy temporary when aborts are
2108 not allowed to ensure the symmetrical generation of symbols.
2109 * exp_ch7.adb (Build_Object_Declarations): Remove variables A_Expr
2110 and E_Decl. Add new variables Decl and Dummy. Generate a dummy
2111 temporary when aborts are not allowed to ensure symmertrical
2112 generation of symbols.
2113 * exp_intr.adb (Expand_Unc_Deallocation): Add new variable
2114 Dummy. Generate a dummy temporary when aborts are not allowed
2115 to ensure symmertrical generation of symbols.
2116
21172014-07-29 Ed Schonberg <schonberg@adacore.com>
2118
2119 * exp_dbug.adb (Debug_Renaming_Declaration): For an object
2120 renaming, indicate that the renamed entity itself needs debug
2121 information. This is necessary if that entity is a temporary,
2122 e.g. part of the expansion of an explicit dereference in an
2123 iterator.
2124
414c6563
AC
21252014-07-29 Thomas Quinot <quinot@adacore.com>
2126
2127 * errout.adb (Set_Error_Posted): When propagating flag to
2128 an enclosing named association, also propagate to the parent
2129 of that node, so that named and positional associations are
2130 treated consistently.
2131
21322014-07-29 Ed Schonberg <schonberg@adacore.com>
2133
2134 * sem_attr.adb (Resolve_Attribute, case 'Update): Set
2135 Do_Range_Check properly on array component expressions that
2136 have a scalar type. In GNATprove mode, only checks on scalar
2137 components must be marked by the front-end.
2138
21392014-07-29 Ed Schonberg <schonberg@adacore.com>
2140
2141 * sem_res.adb (Resolve_Type_Conversion): If the type of the
2142 expression is a limited view, use the non-limited view when
2143 available.
2144
21452014-07-29 Hristian Kirtchev <kirtchev@adacore.com>
2146
2147 * exp_ch4.adb (Expand_N_Case_Expression): Mark the generated
2148 case statement as coming from a conditional expression.
2149 (Expand_N_If_Expression): Mark the generated if statement as
2150 coming from a conditional expression.
2151 * exp_ch5.adb (Expand_N_Case_Statement): Do not process controlled
2152 objects found in case statement alternatives when the case
2153 statement is actually a case expression.
2154 (Expand_N_If_Statement):
2155 Do not process controlled objects found in an if statement when
2156 the if statement is actually an if expression.
2157 * sinfo.adb (From_Conditional_Expression): New routine.
2158 (Set_From_Conditional_Expression): New routine.
2159 * sinfo.ads Add new semantic flag From_Conditional_Expression and
2160 update related nodes.
2161 (From_Conditional_Expression): New routine along with pragma Inline.
2162 (Set_From_Conditional_Expression): New routine along with pragma Inline.
2163
0382062b
AC
21642014-07-29 Hristian Kirtchev <kirtchev@adacore.com>
2165
2166 * exp_ch7.adb (Build_BIP_Cleanup_Stmts): Remove
2167 formal parameter Obj_Id and update the comment on usage. Renamed
2168 Obj_Typ to Func_Typ and update all occurrences.
2169 (Find_Last_Init): Remove formal parameter Decl and update the comment
2170 on usage.
2171 Remove local constants Obj_Id and Obj_Typ. Remove local variables
2172 Init_Typ and Is_Conc. Remove the extraction of the initialization type.
2173 (Find_Last_Init_In_Block): Remove formal parameter
2174 Init_Typ and update the comment on usage.
2175 (Is_Init_Call): Remove formal parameter Init_Typ and update the comment
2176 on usage. Check whether the procedure call is an initialization
2177 procedure of either the object type or the initialization type.
2178 (Is_Init_Proc_Of): New routine.
2179 (Process_Object_Declaration): Obj_Id and Obj_Typ are now global to this
2180 routine. Add new variable Init_Typ. Add circuitry to extract the object
2181 type as well as the initialization type.
2182
21832014-07-29 Robert Dewar <dewar@adacore.com>
2184
2185 * sem_case.adb: Minor reformatting.
2186 * sem_aux.ads: Minor reformatting.
2187
21882014-07-29 Ed Schonberg <schonberg@adacore.com>
2189
2190 * sinfo.adb (Set_Else_Actions, Set_Then_Actions): Set parent
2191 pointer on these fields, even though they are semantic, because
2192 subsequent analysis and expansion of action nades may require
2193 exploring the tree, for example to locate a node to be wrapped
2194 when a function with controlled result is called.
2195
21962014-07-29 Claire Dross <dross@adacore.com>
2197
2198 * sem_aux.adb (Get_Binary_Nkind): Use case on
2199 Name_Id instead of an intermediate string.
2200 (Get_Unary_Nkind): Use case on Name_Id instead of an intermediate
2201 string.
2202
22032014-07-29 Sergey Rybin <rybin@adacore.com frybin>
2204
2205 * gnat_ugn.texi (gnatelim, gnatstub, gnatmetric): Add note
2206 about processing sources with preprocessor directives.
2207
037e5573
ML
22082014-07-24 Martin Liska <mliska@suse.cz>
2209
04db0548 2210 * gcc-interface/trans.c (finalize_nrv): Adjust function call.
037e5573
ML
2211 * gcc-interface/utils.c (rest_of_subprog_body_compilation): Likewise.
2212 (gnat_write_global_declarations): Likewise.
2213
a9bc2242
DW
22142014-07-19 David Wohlferd <dw@LimeGreenSocks.com>
2215
2216 * gnat_rm.texi: Clean up for makeinfo 5.2.
2217
c6d27333
DW
22182014-07-19 David Wohlferd <dw@LimeGreenSocks.com>
2219
2220 * gnat_rm.texi (Machine Code Insertions): Clean up.
2221
4b03d946
AC
22222014-07-18 Robert Dewar <dewar@adacore.com>
2223
2224 * exp_ch7.adb: Minor reformatting.
2225
22262014-07-18 Claire Dross <dross@adacore.com>
2227
2228 * sem_aux.ads (Get_Binary_Nkind): New function that returns
2229 the Node_Kind value of an entity defining a binary operator.
2230 (Get_Unary_Nkind): New function that returns the Node_Kind value
2231 of an entity defining a unary operator.
2232
22332014-07-18 Pascal Obry <obry@adacore.com>
2234
2235 * sysdep.c: comment update.
2236 * adaint.c (__gnat_fputwc): Use wchar_t on a limited set of
2237 platforms where it is known to be supported.
2238
22392014-07-18 Thomas Quinot <quinot@adacore.com>
2240
2241 * sem_dist.adb (Process_Remote_AST_Declaration): Need
2242 to set Fat_Type's Ekind in order to be able to use its
2243 Corresponding_Remote_Type attribute.
2244
4ac2bbbd
AC
22452014-07-18 Hristian Kirtchev <kirtchev@adacore.com>
2246
2247 * einfo.adb Last_Aggregate_Assignment is now Node 30.
2248 (Last_Aggregate_Assignment): Include
2249 constants in the assertion. Update the underlying node.
2250 (Set_Last_Aggregate_Assignment): Include constants in the
2251 assertion. Update the underlying node. (Write_Field11_Name):
2252 Remove the entry for Last_Aggregate_Assignment.
2253 (Write_Field30_Name): Add an entry for Last_Aggregate_Assignment.
2254 * einfo.ads Update the node designation and usage of attribute
2255 Last_Aggregate_Assignment.
2256 * exp_aggr.adb (Expand_Array_Aggregate): Store the last
2257 assignment statement used to initialize a controlled object.
2258 (Late_Expansion): Store the last assignment statement used to
2259 initialize a controlled record or an array of controlled objects.
2260 * exp_ch3.adb (Expand_N_Object_Declaration): Default
2261 initialization of objects is now performed in a separate routine.
2262 (Default_Initialize_Object): New routine.
2263 * exp_ch7.adb (Build_BIP_Cleanup_Stmts): Add formal parameter
2264 Obj_Id. Update the comment on usage.
2265 (Find_Last_Init): Remove formal parameter Typ. Update comment on usage.
2266 Reimplement the logic. (Find_Last_Init_In_Block): New routine.
2267 (Is_Init_Call): Add formal parameter Init_Typ. Update the
2268 comment on usage. Account for the type init proc when trying
2269 to determine whether a statement is an initialization call.
2270 (Make_Adjust_Call): Rename formal parameter For_Parent to
2271 Skip_Self. Update all occurrences of For_Parent. Account for
2272 non-tagged types. Update the call to Make_Call.
2273 (Make_Call): Rename formal parameter For_Parent to Skip_Self. Update
2274 comment on usage. Update all occurrences of For_Parent.
2275 (Make_Final_Call): Rename formal parameter For_Parent to
2276 Skip_Self. Update all occurrences of For_Parent. Account
2277 for non-tagged types. Update the call to Make_Call.
2278 (Process_Object_Declaration): Most variables and constants are
2279 now local to the routine.
2280 * exp_ch7.ads (Make_Adjust_Call): Rename formal parameter
2281 For_Parent to Skip_Self. Update the comment on usage.
2282 (Make_Final_Call): Rename formal parameter For_Parent to
2283 Skip_Self. Update the comment on usage.
2284
22852014-07-18 Ed Schonberg <schonberg@adacore.com>
2286
2287 * sem_ch9.adb (Analyze_Requeue): The entry being referenced
2288 can be a procedure that is implemented by entry, and have a
2289 formal that is a synchronized interface. It does not have to
2290 be declared as a protected operation.
2291
676fa397
AC
22922014-07-18 Robert Dewar <dewar@adacore.com>
2293
2941bf7d
AC
2294 * gnat_rm.texi: Remove mention of obsolete attributes
2295 Max[_Interrupt]_Priority, which have never been implemented
2296 (or at the very least were removed long ago if they ever were
2297 implemented. Add documentation of Max[_Interrupt]_Priority
2298 constants in package System.
2299 * ttypes.ads: Document actual handling of package System,
2300 rather than a historical fantasy version. Remove mention of
2301 non-existent attributes Max[_Interrupt]_Priority.
2302
23032014-07-18 Pascal Obry <obry@adacore.com>
2304
2305 * a-witeio.adb (Put): No 16-bit character output when text
2306 translation is disabled.
2307 * i-cstrea.ads: Code clean up.
04db0548 2308
2941bf7d
AC
23092014-07-18 Robert Dewar <dewar@adacore.com>
2310
676fa397
AC
2311 * gnat_rm.texi: Document that Wchar_T_Size and Word_Size are
2312 static attributes.
2313
23142014-07-18 Arnaud Charlet <charlet@adacore.com>
2315
2316 * a-witeio.adb, initialize.c: Update comments. Minor clean ups.
2317
23182014-07-18 Pascal Obry <obry@adacore.com>
2319
2320 * adaint.c: Do not include wchar.h on VxWorks.
2321 * mingw32.h: Remove obsolete definition.
2322
cd077efd
PO
23232014-07-18 Pascal Obry <obry@adacore.com>
2324
2325 * a-textio.adb, a-witeio.adb, a-ztexio.adb: Use C_Streams Default_Text.
2326 * i-cstrea.ads (Content_Encoding): Moved here, add convention C.
2327 * s-ficobl.ads (Content_Encoding): Moved to C_Streams.
2328 * s-fileio.adb (Open): Adjust to use Content_Encoding from C_Streams.
2329
18f2c460
PO
23302014-07-18 Pascal Obry <obry@adacore.com>
2331
2332 * a-textio.adb: Rename Is_Text_File to Text_Encoding.
2333 * a-ztexio.adb: Likewise.
2334 * a-witeio.adb: Likewise.
2335 (Open): Pass file's translation mode to set_text_mode.
2336 * s-ficobl.ads (Content_Encoding): New type.
2337 (Text_Content_Encoding): New subtype.
2338 (AFCB): Rename Is_Text_File to Text_Encoding.
2339 * s-fileio.adb (Open): Handles new text_translation
2340 values. Remove Is_Text_File which is equivalent to Text_Encoding
2341 in Text_Content_Encoding.
2342 * adaint.h (__gnat_set_mode): New routine.
2343 * sysdep.c (__gnat_set_wide_text_mode): Removed.
2344 (__gnat_set_mode): New routine.
2345
1a4cb227
AC
23462014-07-18 Arnaud Charlet <charlet@adacore.com>
2347
2348 * gcc-interface/decl.c, gcc-interface/trans.c,
2349 gcc-interface/utils.c (Is_Packed_Array_Type): Renamed
2350 Is_Packed_Array_Impl_Type.
2351
c74afd84
AC
23522014-07-18 Gary Dismukes <dismukes@adacore.com>
2353
2354 * sem_util.adb: Minor typo correction.
2355
23562014-07-18 Ben Brosgol <brosgol@adacore.com>
2357
2358 * gnat_rm.texi: Complete previous change.
2359
23602014-07-18 Pascal Obry <obry@adacore.com>
2361
2362 * s-fileio.adb: Minor style fix.
2363
23642014-07-18 Ed Schonberg <schonberg@adacore.com>
2365
2366 * sem_ch13.adb (Analyze_Aspect_Specifications): Detect improper
2367 specification of stream attributes for subtypes that are not
2368 first subtypes, to prevent malformed rep_item chains in the case
2369 of such illegal specifications for discriminated private subtypes.
2370 (Check_Overloaded_Name): Verify that the name is an entity name
2371 before other checks.
2372
23732014-07-18 Pascal Obry <obry@adacore.com>
2374
2375 * adaint.c (__gnat_fputwc) Do not disable on cross-build.
2376
50ea6357
AC
23772014-07-18 Robert Dewar <dewar@adacore.com>
2378
2379 * sem_prag.adb, sem_attr.adb,
2380 sem_aggr.adb, sinfo.ads, sem_eval.ads: Minor reformatting.
2381
23822014-07-18 Pascal Obry <obry@adacore.com>
2383
2384 * sysdep.c (__gnat_wide_text_translation_required): Removed from here.
2385 * initialize.c (__gnat_wide_text_translation_required): Defined here.
2386
23872014-07-18 Pascal Obry <obry@adacore.com>
2388
2389 * adaint.c (__gnat_fputwc): New routine.
2390 * s-crtl.ads (fputwc): Now imported as __gnat_fputwc.
2391
23922014-07-18 Hristian Kirtchev <kirtchev@adacore.com>
2393
2394 * einfo.adb: Flag 270 is now used as Stores_Attribute_Old_Prefix.
2395 (Set_Stores_Attribute_Old_Prefix): New routine.
2396 (Stores_Attribute_Old_Prefix): New routine.
2397 (Write_Entity_Flags):
2398 Output flag Stores_Attribute_Old_Prefix.
2399 * einfo.ads Add new flag Stores_Attribute_Old_Prefix along with
2400 comment on usage.
2401 (Set_Stores_Attribute_Old_Prefix): New routine
2402 along with pragma Inline.
2403 (Stores_Attribute_Old_Prefix): New
2404 routine along with pragma Inline.
2405 * exp_attr.adb (Expand_N_Attribute_Reference): Mark the generated
2406 constant which captures the result of attribute 'Old's prefix.
2407 * sem_util.adb (In_Assertion_Expression_Pragma): Recognize a
2408 relocated expression which acted as a prefix of attribute 'Old.
2409
24102014-07-18 Bob Duff <duff@adacore.com>
2411
2412 * s-spsufi.adb (Finalize_And_Deallocate): Set Subpool.Owner to
2413 null before dispatching to Deallocate_Subpool.
2414 * s-stposu.ads (Default_Subpool_For_Pool): Change mode of
2415 parameter of Default_Subpool_For_Pool to 'in out'.
2416 * s-stposu.adb (Set_Pool_Of_Subpool): Use raise expression. Add
2417 a message to the raise.
2418 * sem_util.adb: Minor reformatting.
2419
c624298a
AC
24202014-07-18 Robert Dewar <dewar@adacore.com>
2421
2422 * sem_util.adb (Check_Expression_Against_Static_Predicate):
2423 Mark expression as non-static if it fails static predicate check,
2424 and issue additional warning.
2425
24262014-07-18 Pascal Obry <obry@adacore.com>
2427
2428 * a-witeio.adb (Put): Control translation based on
2429 wide_text_translation_required.
2430 * adaint.c (CurrentCCSEncoding): New variable.
2431 * initialize.c (__gnat_initialize): On Windows initialize
2432 CurrentCCSEncoding based on values in GNAT_CCS_ENCODING
2433 environment variable.
2434 * mingw32.h (CurrentCCSEncoding): New external.
2435 (__gnat_wide_text_translation_required): Likewise.
2436 * sysdep.c (wide_text_translation_required): New variable.
2437 (__gnat_set_wide_text_mode): Set mode based on CurrentCCSEncoding.
2438
24392014-07-18 Hristian Kirtchev <kirtchev@adacore.com>
2440
2441 * sem_prag.adb (Analyze_Refined_Depends_In_Decl_Part): Remove global
2442 variable Refined_States. Add global variable Matched_Items.
2443 (Check_Dependency_Clause): Account for dependency
2444 clauses utilizing states with visible null refinements.
2445 (Is_Null_Refined_State): New routine.
2446 (Match_Items): Record each successfully matched item of pragma Depends.
2447 (Record_Item): New routine.
2448
24492014-07-18 Ed Schonberg <schonberg@adacore.com>
2450
2451 * sem_attr.adb (Analyze_Attribute, case 'Update): Set
2452 Do_Range_Check flag on a dynamic index expression used in a
2453 component association in the argument of Update.
2454
24552014-07-18 Gary Dismukes <dismukes@adacore.com>
2456
2457 * einfo.ads, sem_eval.ads, sem_ch13.adb: Minor reformatting.
2458
24592014-07-18 Hristian Kirtchev <kirtchev@adacore.com>
2460
2461 * exp_ch6.adb (Expand_Simple_Function_Return): Redo the marking
2462 of enclosing blocks, loops and the enclosing function using a
2463 parent-based traversal.
2464 * exp_util.adb (Wrap_Statements_In_Block): Suppress the secondary
2465 stack reclamation if the iterator loop contains a return statement
2466 that uses the stack.
2467 * sem_ch5.adb (Analyze_Loop_Statement): There is no need to
2468 patch up the scope stack as the secondary stack management now
2469 takes into account the enclosing function of the iterator loop.
2470
ee4eee0a
AC
24712014-07-18 Robert Dewar <dewar@adacore.com>
2472
2473 * sem_ch3.adb, g-memdum.ads, i-cstrea.ads: Minor reformatting.
2474
24752014-07-18 Robert Dewar <dewar@adacore.com>
2476
2477 * einfo.adb (Has_Static_Predicate): New function.
2478 (Set_Has_Static_Predicate): New procedure.
2479 * einfo.ads (Has_Static_Predicate): New flag.
2480 * sem_ch13.adb (Is_Predicate_Static): New function
2481 (Build_Predicate_Functions): Use Is_Predicate_Static to reorganize
2482 (Add_Call): Minor change in Sloc of generated expression
2483 (Add_Predicates): Remove setting of Static_Pred, no longer used.
2484 * sem_ch4.adb (Has_Static_Predicate): Removed this function,
2485 replace by use of the entity flag Has_Static_Predicate_Aspect.
2486 * sem_eval.adb (Eval_Static_Predicate_Check): Check real case
2487 and issue warning that predicate is not checked for now.
2488 * sem_eval.ads (Eval_Static_Predicate_Check): Fix comments in
2489 spec.
2490 * sem_util.adb (Check_Expression_Against_Static_Predicate):
2491 Carry out check for any case where there is a static predicate,
2492 and output appropriate message.
2493 * sinfo.ads: Minor comment corrections.
2494
24952014-07-18 Ed Schonberg <schonberg@adacore.com>
2496
2497 * exp_ch3.adb (Expand_Freeze_Record_Type): If the type is derived
2498 from an untagged private type whose full view is tagged, the type
2499 is marked tagged for layout reasons, but it has no dispatch table,
2500 so Set_All_DT_Position must not be called.
2501 * exp_ch13.adb: If the freeze node is for a type internal to a
2502 record declaration, as is the case for a class-wide subtype
2503 of a parent component, the relevant scope is the scope of the
2504 enclosing record.
2505
3b8481cb
AC
25062014-07-18 Thomas Quinot <quinot@adacore.com>
2507
2508 * g-memdum.adb, g-memdum.ads: Code clean ups.
2509
25102014-07-18 Hristian Kirtchev <kirtchev@adacore.com>
2511
2512 * sem_prag.adb (Check_Dependency_Clause):
2513 Update the comment on usage. Reimplement the mechanism which
2514 attempts to match a single clause of Depends against one or
2515 more clauses of Refined_Depends.
2516 (Input_Match): Removed.
2517 (Inputs_Match): Removed.
2518 (Is_Self_Referential): Removed.
2519 (Normalize_Clause): Update the call to Split_Multiple_Outputs.
2520 (Normalize_Outputs): Rename variable Split to New_Claue and update
2521 all its occurrences.
2522 (Report_Extra_Clauses): Update the comment on usage.
2523 (Split_Multiple_Outputs): Renamed to Normalize_Outputs.
2524
25252014-07-18 Gary Dismukes <dismukes@adacore.com>
2526
2527 * i-cstrea.ads: Minor reformatting.
2528
25292014-07-18 Hristian Kirtchev <kirtchev@adacore.com>
2530
2531 * exp_util.adb (Wrap_Statements_In_Block): Propagate both
2532 secondary stack-related flags to the generated block.
2533 * sem_ch5.adb (Analyze_Loop_Statement): Update the scope chain
2534 once the loop is relocated in a block.
2535
daff5ab7
AC
25362014-07-18 Robert Dewar <dewar@adacore.com>
2537
2538 * repinfo.ads: Add documentation on handling of back annotation
2539 for dynamic case.
2540
25412014-07-18 Ed Schonberg <schonberg@adacore.com>
2542
2543 * sinfo.ads, sinfo.adb (Incomplete_View): New semantic attribute
2544 of full type declaration, denotes previous declaration for
2545 incomplete view of the type.
2546 * sem_ch3.adb (Analyze_Full_Type_Declaration): Set Incomplete_View
2547 of declaration if one is present.
2548 (Replace_Type): When constructing the signature of an inherited
2549 operation, handle properly the case where the operation has a
2550 formal whose type is an incomplete view.
2551 * sem_util.adb (Collect_Primitive_Operations): Handle properly
2552 the case of an operation declared after an incomplete declaration
2553 for a type T and before the full declaration of T.
2554
25552014-07-18 Pascal Obry <obry@adacore.com>
2556
2557 * i-cstrea.ads: Add documentation for set_wide_text_mode.
2558
c45e5332
AC
25592014-07-18 Robert Dewar <dewar@adacore.com>
2560
2561 * a-witeio.adb: Minor code reorganization.
2562 * i-cstrea.ads: Add comment.
2563
25642014-07-18 Thomas Quinot <quinot@adacore.com>
2565
2566 * s-oscons-tmplt.c (NAME_MAX): Minor cleaup and comment
2567 clarifications.
2568
adc1de25
AC
25692014-07-18 Robert Dewar <dewar@adacore.com>
2570
2571 * g-memdum.adb, g-memdum.ads, exp_strm.adb: Minor reformatting.
2572
25732014-07-18 Pascal Obry <obry@adacore.com>
2574
2575 * s-crtl.ads, i-cstrea.ads (fputwc): New routine.
2576 * a-witeio.adb (Put): On platforms where there is translation
2577 done by the OS output the raw text.
2578 (New_Line): Use Put above to properly handle the LM wide characters.
2579
6128aad4
AC
25802014-07-18 Thomas Quinot <quinot@adacore.com>
2581
2582 * g-memdum.adb, g-memdum.ads (Dump): New parameter Prefix, defaulted
2583 to Absolute_Address.
2584
25852014-07-18 Eric Botcazou <ebotcazou@adacore.com>
2586
2587 * opt.ads (Suppress_Back_Annotation): Remove as unused.
2588 * fe.h (Back_Annotate_Rep_Info): Likewise.
2589 (Global_Discard_Names): Likewise.
2590
623267dc
AC
25912014-07-18 Robert Dewar <dewar@adacore.com>
2592
2593 * sem_ch13.adb (Is_Type_Ref): Check that type name is not
2594 parenthesized.
2595
25962014-07-18 Vincent Celier <celier@adacore.com>
2597
2598 * s-osinte-vms.ads: Fix style errors.
2599
26002014-07-18 Thomas Quinot <quinot@adacore.com>
2601
2602 * s-oscons-tmplt.c (_POSIX_SOURCE): Define in order to get
2603 NAME_MAX and PATH_MAX.
2604
26052014-07-18 Bob Duff <duff@adacore.com>
2606
2607 * exp_strm.adb (Build_Record_Or_Elementary_Input_Function,
2608 Build_Record_Or_Elementary_Output_Procedure): For Input and
2609 Output attributes, do not read/write the discriminants if they
2610 have default values; that will be done by Read/Write.
2611
8ca597af
RD
26122014-07-18 Robert Dewar <dewar@adacore.com>
2613
2614 * sem_aggr.adb, exp_ch5.adb, sem_ch3.adb, layout.adb, sem_type.adb,
2615 exp_util.adb, exp_attr.adb, einfo.adb, einfo.ads, exp_pakd.adb,
2616 checks.adb, exp_pakd.ads, freeze.adb, sem_util.adb, exp_dbug.adb,
2617 exp_dbug.ads, exp_ch4.adb, sem_ch8.adb, exp_aggr.adb, sem_eval.adb,
2618 sem_ch13.adb: Change name Packed_Array_Type to Packed_Array_Impl_Type.
2619
5aa0548d
AC
26202014-07-18 Robert Dewar <dewar@adacore.com>
2621
2622 * lib-writ.adb, makeutl.adb, ali.ads: Minor reformatting.
2623
26242014-07-18 Vincent Celier <celier@adacore.com>
2625
2626 * lib-writ.ads: Update documentation about the D lines.
2627
8b034336
AC
26282014-07-18 Ed Schonberg <schonberg@adacore.com>
2629
2630 * sem_ch13.adb (Replace_Type_References_Generic): Use type entity
2631 as a parameter, rather than its Chars field, in order to locate
2632 freeze node of type. If the predicate or invariant has references
2633 to types other than the one to which the contract applies, these
2634 types must be frozen, and the corresponding predicate functions
2635 created, before that freeze node.
2636
26372014-07-18 Robert Dewar <dewar@adacore.com>
2638
2639 * freeze.adb, einfo.ads, einfo.adb: Minor code reorganization.
2640 * par_sco.adb: Minor reformatting.
2641
26422014-07-18 Gary Dismukes <dismukes@adacore.com>
2643
2644 * exp_ch4.adb (Real_Range_Check): Turn off
2645 the Do_Range_Check flag on the conversion's current Expression
2646 argument rather than on the originally captured Operand node,
2647 as Expression may reflect a rewriting (as in conversions to a
2648 fixed-point type).
2649
26502014-07-18 Vincent Celier <celier@adacore.com>
2651
2652 * ali.adb (Scan_ALI): Set Sdep_Record.Unit_Name, when the unit
2653 is not a subunit.
2654 * ali.ads (Sdep_Record): New component Unit_Name.
2655 * lib-writ.adb (Write_ALI): Write the unit name in D lines.
2656 * makeutl.adb (Check_Source_Info_In_ALI): Return False if a
2657 dependent unit is in a project and the source file name is not
2658 one of its sources.
2659
47a98b97
BD
26602014-07-18 Bob Duff <duff@adacore.com>
2661
2662 * s-addima.ads: Minor: add comment.
2663
e191e5ae
TQ
26642014-07-18 Thomas Quinot <quinot@adacore.com>
2665
2666 * freeze.adb (Check_Component_Storage_Order): Fix enforcement
2667 of nesting rules for composites with different SSOs.
2668
26692014-07-18 Thomas Quinot <quinot@adacore.com>
2670
2671 * par_sco.adb (Is_Logical_Operator): An If_Expression is not
2672 a proper logical operator.
2673 (Has_Decision): An If_Expression indicates the presence of a decision
2674 although it is not a logical operator.
2675
783d035b
AC
26762014-07-18 Robert Dewar <dewar@adacore.com>
2677
2678 * gnat_ugn.texi: Remove note that -gnatR not allowed with -gnatc.
2679 * switch-c.adb: Remove prohibition of -gnatR and -gnatc together.
2680
26812014-07-18 Eric Botcazou <ebotcazou@adacore.com>
2682
2683 * sem_ch13.adb (Kill_Rep_Clause): Clear Comes_From_Source flag
2684 on the null statement.
2685
26862014-07-18 Thomas Quinot <quinot@adacore.com>
2687
2688 * adaint.c: Minor comment rewording.
2689 * socket.c: Define macros _REENTRANT and _THREAD_SAFE so that
2690 use of errno in this file is thread safe.
2691
39678b1c
AC
26922014-07-18 Arnaud Charlet <charlet@adacore.com>
2693
2694 * gnat_ugn.texi: Doc clarification.
2695 * sem_ch13.adb (Kill_Rep_Clause): Use Replace not Rewrite.
2696 * sem_ch13.ads: Minor comment update.
2697
26982014-07-18 Robert Dewar <dewar@adacore.com>
2699
2700 * repinfo.ads: Minor comment fix.
2701
27022014-07-18 Robert Dewar <dewar@adacore.com>
2703
2704 * par-prag.adb: Add dummy entry for Default_Scalar_Storage_Order.
2705 * sem_prag.adb: Add dummy implementation of
2706 Default_Scalar_Storage_Order.
2707 * snames.ads-tmpl: Add dummy entry for
2708 Default_Scalar_Storage_Order pragma.
2709
27102014-07-18 Robert Dewar <dewar@adacore.com>
2711
2712 * opt.adb (Tree_Read): Read Address_Is_Private,
2713 Ignore_Rep_Clauses, Ignore_Style_Check_Pragmas, Multiple_Unit_Index.
2714 (Tree_Write): Corresponding writes
2715 * opt.ads: Minor comment reformatting and fixes.
2716 * tree_io.ads: Increment ASIS_Version_Number.
2717
cf28c974
RD
27182014-07-18 Robert Dewar <dewar@adacore.com>
2719
2720 * sem_attr.adb, s-os_lib.ads, prj-tree.adb: Minor reformatting.
2721 * types.h: Fix typo.
2722
27232014-07-18 Robert Dewar <dewar@adacore.com>
2724
2725 * freeze.adb (Check_Address_Clause): Use Kill_Rep_Clause (no
2726 functional change).
2727 * gnat_ugn.texi: Document that -gnatI removes rep clauses from
2728 ASIS trees.
2729 * sem_ch13.adb (Kill_Rep_Clause): New procedure
2730 (Analyze_Attribute_Definition_Clause): Use
2731 Kill_Rep_Clause. This is just a cleanup, no functional effect.
2732 (Analyze_Enumeration_Representation_Clause):
2733 Use Kill_Rep_Clause. This means that enum rep
2734 clauses are now properly removed from -gnatct trees.
2735 (Analyze_Record_Representation_Clause): Same change.
2736 * sem_ch13.ads (Kill_Rep_Clause): New procedure.
2737
c3d01e19
PO
27382014-07-18 Pascal Obry <obry@adacore.com>
2739
2740 * s-os_lib.ads, s-os_lib.adb (GM_Time_Of): New routine to create an
2741 OS_Time from time parts.
2742 * adaint.h, adaint.c (__gnat_to_os_time): New routine.
2743
6907542d
AC
27442014-07-18 Ed Schonberg <schonberg@adacore.com>
2745
2746 * sem_ch4.adb (Try_Container_Indexing): Refine previous patch for
2747 indexing over containers that are derived types: check whether
2748 signature of found operation has the correct first parameter
2749 before retrieving directly a primitive operation.
2750
27512014-07-18 Ed Schonberg <schonberg@adacore.com>
2752
2753 * sem_attr.adb (Analyze_Attribute, case 'Update): Set
2754 Do_Range_Check flag on dynamic bounds of a range used in a
2755 component association in the argument of Update.
2756
27572014-07-18 Thomas Quinot <quinot@adacore.com>
2758
2759 * adaint.c: #define _REENTRANT and _THREAD_SAFE in order for
2760 accesses to errno(3) to be thread safe.
2761
27622014-07-18 Vincent Celier <celier@adacore.com>
2763
2764 * prj-tree.adb (Imported_Or_Extended_Project_Of): For each non
2765 limited imported project that is an extending project, return
2766 a project being extended if it has the expected name.
2767
27682014-07-18 Pascal Obry <obry@adacore.com>
2769
2770 * s-os_lib.ads, s-os_lib.adb (Set_File_Last_Modify_Time_Stamp): New
2771 routine to set the last modification time stamp for the given file.
2772 * gnatchop.adb (File_Time_Stamp): Removed.
2773 (Write_Unit): Use
2774 Set_File_Last_Modify_Time_Stamp instead of ad-hoc implementation.
2775
3f433bc0
ES
27762014-07-18 Ed Schonberg <schonberg@adacore.com>
2777
2778 * sem_aggr.adb (Aggregate_Constraint_Checks): Moved to sem_util.
2779 * sem_util.ads, sem_util.adb (Aggregate_Constraint_Checks):
2780 Moved here, so it can be shared with the resolution of 'Update,
2781 whose argument shares some features with aggregates.
2782 * sem_attr.adb (Resolve_Attribute, case 'Update): Apply
2783 Aggregate_Constraint_Checks with the expression of each
2784 association, so that the Do_Range_Check flag is set when needed.
2785
27862014-07-18 Ed Schonberg <schonberg@adacore.com>
2787
2788 * sem_ch4.adb (Try_Container_Indexing): If the container
2789 type is a derived type, the value of the inherited aspect is
2790 the Reference operation declared for the parent type. However,
2791 Reference is also a primitive operation of the new type, and
2792 the inherited operation has a different signature. We retrieve
2793 the right one from the list of primitive operations of the
2794 derived type.
2795
0439c912
AC
27962014-07-18 Vincent Celier <celier@adacore.com>
2797
2798 * debug.adb: Update comment.
2799
28002014-07-18 Hristian Kirtchev <kirtchev@adacore.com>
2801
2802 * exp_util.adb (Needs_Finalization): There is no reason why a
2803 C type should not benefit from finalization actions.
2804
28052014-07-18 Thomas Quinot <quinot@adacore.com>
2806
2807 * s-oscons-tmplt.c (NAME_MAX): Fix definition for Solaris
2808 (FILENAME_MAX): Remove unneeded definition.
2809
5b89faaf
RD
28102014-07-18 Robert Dewar <dewar@adacore.com>
2811
2812 * exp_attr.adb, debug.adb: Update comments.
2813
c7a7f405
AC
28142014-07-18 Vincent Celier <celier@adacore.com>
2815
2816 * par-ch4.adb (Simple_Expression): Add missing style check
2817 for binary adding operators.
2818 (Term): Add missing style check for multiplying operators.
2819
28202014-07-18 Robert Dewar <dewar@adacore.com>
2821
2822 * impunit.adb: Minor comment correction.
2823 * widechar.adb, s-wchcon.ads: Minor comment corrections.
2824
baa571ab
AC
28252014-07-18 Robert Dewar <dewar@adacore.com>
2826
2827 * sem_ch13.adb (Build_Discrete_Static_Predicate): New name
2828 for Build_Static_Predicate (Build_Predicate_Functions):
2829 Don't try to build discrete predicate for real type.
2830 (Build_Predicate_Functions): Report attempt to use
2831 Static_Predicate function on real type as unimplemented.
2832 * sem_util.adb (Check_Expression_Against_Static_Predicate):
2833 Add guard to prevent blow up on predicate for real type.
2834
28352014-07-18 Ed Schonberg <schonberg@adacore.com>
2836
2837 * einfo.adb (Set_Static_Predicate): Simplify assertion to handle
2838 properly static predicate on enumeration types and modular types
2839 (not subtypes).
2840
28412014-07-18 Pierre-Marie Derodat <derodat@adacore.com>
2842
2843 * scos.ads (SCO_Unit_Table_Entry): Add a field to keep track of
2844 the corresponding source file index.
2845 * get_scos.ads (Get_SCOs): Add a default value for it.
2846 * par_sco.adb (SCO_Record): Fill the corresponding value.
2847 * scos.h: New.
2848
28492014-07-18 Vincent Celier <celier@adacore.com>
2850
2851 * a-strunb-shared.adb, s-auxdec.ads, s-rannum.adb, atree.ads,
2852 urealp.adb, vms_data.ads, lib.ads, s-auxdec-vms_64.ads: Minor
2853 reformatting.
2854 * gnat_ugn.texi: Add documentation for new gnatmem switch -t.
2855
28562014-07-18 Thomas Quinot <quinot@adacore.com>
2857
2858 * g-sercom.ads (Set): document possible data loss.
2859
28602014-07-18 Ed Schonberg <schonberg@adacore.com>
2861
2862 * exp_attr.adb (Expand_N_Attribute_Reference, cases Input,
2863 Output, Read, Write): If the restriction No_Streams is active,
2864 replace each occurrence of a stream attribute by an explicit
2865 Raise statement.
2866
fc999c5d
RD
28672014-07-18 Robert Dewar <dewar@adacore.com>
2868
2869 * par_sco.adb, a-reatim.ads, exp_attr.adb, sem_util.adb: Minor
2870 reformatting.
2871
28722014-07-18 Robert Dewar <dewar@adacore.com>
2873
2874 * einfo.ads, einfo.adb (Has_Out_Or_In_Out_Parameter): New flag and
2875 function.
2876 (Set_Has_Out_Or_In_Out_Parameter): New procedure.
2877 * sem_ch6.adb (Set_Formal_Mode): Set Has_Out_Or_In_Out_Parameter flag.
2878 * sem_res.adb (Resolve_Call): Error if call of Ada 2012 function
2879 with OUT or IN OUT from earlier Ada mode (e.g. Ada 2005)
2880
b3b26ace
AC
28812014-07-18 Robert Dewar <dewar@adacore.com>
2882
2883 * bcheck.adb (Check_Consistent_Restrictions):
2884 Remove obsolete code checking for violation of
2885 No_Standard_Allocators_After_Elaboration (main program)
2886 * bindgen.adb (Gen_Adainit): Handle
2887 No_Standard_Allocators_After_Elaboration
2888 (Gen_Output_File_Ada): ditto.
2889 * exp_ch4.adb (Expand_N_Allocator): Handle
2890 No_Standard_Allocators_After_Elaboration.
2891 * Makefile.rtl: Add entry for s-elaall
2892 * rtsfind.ads: Add entry for Check_Standard_Allocator.
2893 * s-elaall.ads, s-elaall.adb: New files.
2894 * sem_ch4.adb (Analyze_Allocator): Handle
2895 No_Standard_Allocators_After_Elaboration.
2896
28972014-07-18 Robert Dewar <dewar@adacore.com>
2898
2899 * lib.adb, lib.ads, lib-writ.adb, lib-writ.ads, ali.adb,
2900 ali.ads, lib-load.adb: Remove Lib.Has_Allocator and all uses.
2901 Remove AB parameter from ali files and all uses.
2902 Remove Allocator_In_Body and all uses.
2903
29042014-07-18 Robert Dewar <dewar@adacore.com>
2905
2906 * g-expect-vms.adb: Add comment.
2907
29082014-07-18 Thomas Quinot <quinot@adacore.com>
2909
2910 * par_sco.adb (Is_Logical_Operation): return True for
2911 N_If_Expression.
2912
29132014-07-18 Ed Schonberg <schonberg@adacore.com>
2914
2915 * sem_attr.adb (Resolve_Attribute, case 'Update): Do full
2916 analysis and resolution of each choice in the associations within
2917 the argument of Update, because they may be variable names.
2918
29192014-07-18 Hristian Kirtchev <kirtchev@adacore.com>
2920
2921 * exp_attr.adb (Expand_Loop_Entry_Attribute): Insert any condition
2922 actions before the generated if statement.
2923
29242014-07-18 Hristian Kirtchev <kirtchev@adacore.com>
2925
2926 * gnat_ugn.texi Enhance the documentation of
2927 switches -gnateA and -gnateV.
2928
29292014-07-18 Ed Schonberg <schonberg@adacore.com>
2930
2931 * sem_util.adb (Build_Default_Subtype): Add missing condition
2932 so that code matches description: use the full view of the base
2933 only if the base is private and the subtype is not.
2934
6782b1ef
AC
29352014-07-17 Gary Dismukes <dismukes@adacore.com>
2936
2937 * exp_disp.adb: Minor reformatting.
2938 * exp_disp.adb: Minor code reorganization.
2939
29402014-07-17 Thomas Quinot <quinot@adacore.com>
2941
2942 * gnat_rm.texi, freeze.adb (Check_Component_Storage_Order): Do not
2943 require an explicit SSO attribute definition clause on a composite type
2944 just because one of its components has one.
2945
29462014-07-17 Robert Dewar <dewar@adacore.com>
2947
2948 * sem_attr.adb (Analyze_Attribute, case Loop_Entry): Rewrite
2949 attribute out of existence if the enclosing pragma is ignored.
2950 * sem_util.adb: Minor reformatting.
2951
29522014-07-17 Ed Schonberg <schonberg@adacore.com>
2953
2954 * exp_aggr.adb (Expand_Array_Aggregate): Handle properly an
2955 array aggregate expanded into assignments when it appears as a
2956 local declaration in an inlined body.
2957
29582014-07-17 Doug Rupp <rupp@adacore.com>
2959
2960 * init.c [__ANDROID__]: Modify for ZCX.
2961 * exp_aggr.adb: Minor reformatting
2962 * sigtramp-armvxw.c, sigtramp-ppcvxw.c: Update comments.
2963
29642014-07-17 Robert Dewar <dewar@adacore.com>
2965
2966 * a-strunb-shared.ads, a-stwiun-shared.ads, a-stzunb-shared.ads,
2967 exp_ch7.adb, g-pehage.ads, g-socket.ads, gnat_ugn.texi, gnat_ugx.texi,
2968 scng.adb: Remove incorrect usage "allow to" and "allows to".
2969
29702014-07-17 Robert Dewar <dewar@adacore.com>
2971
2972 * exp_dist.adb: Minor reformatting.
2973
6ccdd977
AC
29742014-07-17 Bob Duff <duff@adacore.com>
2975
2976 * gnat_ugn.texi: Improve documentation of Unrestricted_Access.
2977
29782014-07-17 Robert Dewar <dewar@adacore.com>
2979
2980 * sem_ch13.adb (Build_Invariant_Procedure): Add variable Nam
2981 (Add_Invariants): Set Nam to Name_Type_Invariant if from aspect.
2982
29832014-07-17 Thomas Quinot <quinot@adacore.com>
2984
2985 * exp_pakd.adb (Create_Packed_Array_Type.Install_PAT): For a
2986 non-bit-packed array, propagate Reverse_Storage_Order to the
2987 packed array type.
2988
29892014-07-17 Javier Miranda <miranda@adacore.com>
2990
2991 * exp_disp.adb: Fix comment.
2992 * exp_pakd.adb: Minor reformatting.
2993
d8941160
RD
29942014-07-17 Robert Dewar <dewar@adacore.com>
2995
2996 * bindgen.adb (Gen_Elab_Calls): Skip reference to elab
2997 entity if none exists (Gen_Elab_Calls): Complain if clash with
2998 No_Multiple_Elaboration.
2999 * s-rident.ads, restrict.ads: Add restriction No_Multiple_Elaboration.
3000 * sem_util.adb (Build_Elaboration_Entity): Skip building entity
3001 if not needed.
3002 * gnat_rm.texi: Document restriction No_Multiple_Elaboration.
3003 * sem_ch4.adb: Minor comment updates.
3004
bf561f2b
AC
30052014-07-17 Ed Schonberg <schonberg@adacore.com>
3006
3007 * exp_ch9.adb (Buid_Protected_Subprogram_Call): Preserve type
3008 of function call for later use when shared passive objects
3009 are involved.
3010
30112014-07-17 Hristian Kirtchev <kirtchev@adacore.com>
3012
3013 * par-ch13.adb (Get_Aspect_Specifications):
3014 Catch a case where the argument of SPARK aspect Refined_State
3015 is not properly parenthesized.
3016
30172014-07-17 Hristian Kirtchev <kirtchev@adacore.com>
3018
3019 * exp_ch6.adb (Expand_Ctrl_Function_Call): Do not extend
3020 the lifetime of a reference to an Ada 2012 container element.
3021 (Is_Element_Reference): New routine.
3022
30232014-07-17 Robert Dewar <dewar@adacore.com>
3024
3025 * ali.ads: Minor comment fix.
3026 * lib-writ.adb: Minor reformatting.
3027
30282014-07-17 Ed Schonberg <schonberg@adacore.com>
3029
3030 * sem_ch10.adb (Analyze_Proper_Body): When analyzing a subunit
3031 in ASIS mode, load another subunit only if it a subunit of the
3032 current one, not a sibling that has been reached through the
3033 analysis of an ancestor. This allows the construction of the
3034 ASIS tree for the subunit even when sibling subunits have errors.
3035
30362014-07-17 Hristian Kirtchev <kirtchev@adacore.com>
3037
3038 * sem_ch3.adb (Analyze_Declarations): Remove the guard which
3039 prevents the analysis of various contracts when the associated
3040 construct is erroneous.
3041 * sem_util.adb (Save_SPARK_Mode_And_Set): Do not query the
3042 SPARK_Pragma of an illegal or a partially decorated construct.
3043
8a5e4b2a
AC
30442014-07-17 Robert Dewar <dewar@adacore.com>
3045
3046 * s-imguns.ads: Minor reformatting.
3047
30482014-07-17 Hristian Kirtchev <kirtchev@adacore.com>
3049
3050 * exp_ch7.adb (Build_Finalization_Master): Move all local
3051 variables to the proper code section. When looking for an existing
3052 finalization master, inspect the ultimate ancestor type of the
3053 full view.
3054 * sem_util.ads, sem_util.adb (Root_Type_Of_Full_View): New routine.
3055
52d9ba4d
AC
30562014-07-17 Robert Dewar <dewar@adacore.com>
3057
3058 * aspects.ads, aspects.adb: Add entries for aspect Annotate.
3059 * gnat_rm.texi: Document Entity argument for pragma Annotate and
3060 Annotate aspect.
3061 * sem_ch13.adb (Analyze_Aspect_Specification): Add processing
3062 for Annotate aspect.
3063 * sem_prag.adb (Analyze_Pragma, case Annotate): Allow optional
3064 Entity argument at end.
3065 * sinfo.ads (N_Aspect_Specification): Add note on Annotate aspect.
3066
30672014-07-17 Tristan Gingold <gingold@adacore.com>
3068
3069 * s-imguns.ads: Fix minor typo.
3070
30712014-07-17 Thomas Quinot <quinot@adacore.com>
3072
3073 * sprint.adb: Minor reformatting.
3074
b16ffa33
AC
30752014-07-17 Robert Dewar <dewar@adacore.com>
3076
3077 * sprint.adb (Write_Itype): Print proper header for string
3078 literal subtype.
3079
30802014-07-17 Steve Baird <baird@adacore.com>
3081
3082 * sinfo.ads, sem_scil.ads: Improve comments, minor reformatting.
3083
7b966a95
AC
30842014-07-17 Vincent Celier <celier@adacore.com>
3085
3086 * gnatbind.adb: Change in message "try ... for more information".
3087
30882014-07-17 Robert Dewar <dewar@adacore.com>
3089
3090 * sprint.adb: Code clean up.
3091
30922014-07-17 Hristian Kirtchev <kirtchev@adacore.com>
3093
3094 * exp_ch7.adb (Find_Last_Init): Relocate local variables to
3095 the relevant code section. Add new local constant Obj_Id. When
3096 a limited controlled object is initialized by a function call,
3097 the build-in-place object access function call acts as the last
3098 initialization statement.
3099 * exp_util.adb (Is_Object_Access_BIP_Func_Call): New routine.
3100 (Is_Secondary_Stack_BIP_Func_Call): Code reformatting.
3101 * exp_util.ads (Is_Object_Access_BIP_Func_Call): New routine.
3102
31032014-07-17 Ed Schonberg <schonberg@adacore.com>
3104
3105 * sem_ch8.adb (Analyze_Generic_Renaming): For generic subprograms,
3106 propagate intrinsic flag to renamed entity, to allow e.g. renaming
3107 of Unchecked_Conversion.
3108 * sem_ch3.adb (Analyze_Declarations): Do not analyze contracts
3109 if the declaration has errors.
3110
31112014-07-17 Ed Schonberg <schonberg@adacore.com>
3112
3113 * a-rbtgbk.adb: a-rbtgbk.adb (Generic_Insert_Post): Check whether
3114 container is busy before checking whether capacity allows for
3115 a further insertion. Insertion in a busy container that is full
3116 raises Program_Error rather than Capacity_Error. Previous to that
3117 patch which exception was raised varied among container types.
3118
44ccf4b4
AC
31192014-07-17 Robert Dewar <dewar@adacore.com>
3120
3121 * g-comlin.ads, g-comlin.adb: Minor clean up.
3122
31232014-07-17 Bob Duff <duff@adacore.com>
3124
3125 * gnat_ugn.texi: Update gnatpp doc.
3126
bb012790
AC
31272014-07-17 Robert Dewar <dewar@adacore.com>
3128
3129 * gnat_rm.texi: Document new restriction No_Long_Long_Integers.
3130 * exp_ch4.adb (Make_Array_Comparison_Op): Add note that we
3131 could do this by actually expanding a real generic.
3132 * a-tags.ads: Add comments about performance.
3133 * sprint.adb (Sprint_Node_Actual, case N_Object_Declaration):
3134 Print Etype of defining identifier, rather than the object
3135 definition. More information.
3136
31372014-07-17 Thomas Quinot <quinot@adacore.com>
3138
3139 * exp_dist.adb: Minor documentation clarification.
3140
31412014-07-17 Hristian Kirtchev <kirtchev@adacore.com>
3142
3143 * exp_util.adb (Is_Aliased): Revert previous change.
3144
31452014-07-17 Vincent Celier <celier@adacore.com>
3146
3147 * g-comlin.adb (Try_Help): New procedure.
3148 (Getopt): Use new procedure Try_Help.
3149 * g-comlin.ads (Try_Help): New procedure.
3150
31512014-07-17 Bob Duff <duff@adacore.com>
3152
3153 * gnat_ugn.texi: Minor update.
3154
ee10c0ec
RD
31552014-07-17 Robert Dewar <dewar@adacore.com>
3156
3157 * gnat_rm.texi: Improve documentation of Unrestricted_Access.
3158 * sinfo.ads: Document restriction on aggregates (must expand to
3159 assignments if one or more assignments needs expansion, e.g. for
3160 controlled types).
3161 * sem_ch13.adb: All warning messages regarding bit order should
3162 be info: messages.
3163 * gnat_ugn.texi: Minor correction of missing @ on @code
3164
31652014-07-17 Robert Dewar <dewar@adacore.com>
3166
3167 * restrict.ads (Implementation_Restriction): Add No_Long_Long_Integer.
3168 * s-rident.ads (Partition_Boolean_Restrictions): Add
3169 No_Long_Long_Integer.
3170 * sem_ch3.adb (Modular_Type_Declaration): Size must be <=
3171 Long_Integer'Size if restriction No_Long_Long_Integer is active.
3172 (Signed_Integer_Type_Declaration): Do not allow Long_Long_Integer
3173 as the implicit base type for a signed integer type declaration
3174 if restriction No_Long_Long_Integer is active.
3175 * sem_util.ads, sem_util.adb (Set_Entity_With_Checks): Include check for
3176 No_Long_Long_Integer.
3177
e80f0cb0
RD
31782014-07-17 Robert Dewar <dewar@adacore.com>
3179
3180 * sem_ch3.adb, a-ztexio.ads, exp_imgv.adb, casing.adb, casing.ads,
3181 einfo.ads, checks.adb, sem_ch12.adb, a-textio.ads, freeze.adb,
3182 repinfo.adb, exp_ch6.adb, sem_ch4.adb, a-witeio.ads, sem_ch8.adb,
3183 sem_warn.adb, exp_aggr.adb, exp_dist.adb, par-tchk.adb, s-fatgen.adb,
3184 treepr.adb, lib-xref.adb: Remove the word kludge from ada sources.
3185
2bd67690
RD
31862014-07-17 Robert Dewar <dewar@adacore.com>
3187
3188 * debug.adb: Remove -gnatdQ.
3189 * exp_disp.adb: Remove -gnatdQ.
3190 * a-ztenio.ads, a-wtinio.ads, a-wtmoio.ads, a-ztcoau.ads, a-tiinio.ads,
3191 a-wtfiio.ads, a-timoio.ads, sem_ch12.adb, a-tifiio.ads, a-ztinio.ads,
3192 rtsfind.adb, rtsfind.ads, a-ztmoio.ads, a-wtdeio.ads, a-ztfiio.ads,
3193 a-tideio.ads, a-wtflio.ads, a-ztdeio.ads, sem_ch8.adb, a-tiflio.ads,
3194 sprint.adb, a-ztflio.ads, snames.ads-tmpl, a-wtenio.ads,
3195 a-tienio.ads: Rename Text_IO_Kludge to Text_IO_Special_Unit.
3196
59f4d038
RD
31972014-07-17 Robert Dewar <dewar@adacore.com>
3198
3199 * back_end.adb: Minor reformatting and comment additions.
3200 * checks.ads, checks.adb (Duplicated_Tag_Checks_Suppressed): New
3201 function.
3202 * exp_disp.adb (Make_DT): Use Duplicated_Tag_Checks_Suppressed.
3203 (Make_VM_TSD): Use Duplicated_Tag_Checks_Suppressed.
3204 * gnat_rm.texi: Document new check Duplicated_Tag_Checks_Suppressed.
3205 * gnat_ugn.texi: Additional documentation for Duplicated_Tag_Check.
3206 * snames.ads-tmpl (Duplicated_Tag_Checks_Suppressed): New check.
3207 * types.ads (Duplicated_Tag_Checks_Suppressed): New check.
3208
26d5fb62
AC
32092014-07-17 Robert Dewar <dewar@adacore.com>
3210
3211 * gnat_rm.texi: Minor comment updates.
3212
32132014-07-17 Ed Schonberg <schonberg@adacore.com>
3214
3215 * sem_util.adb (Make_Explicit_Dereference): If the expression
3216 being dereferenced is a generalized indexing, reset the overloaded
3217 flag on the generalized indexing call, consistent with the
3218 resetting of the flag on the original indexed component.
3219
32202014-07-17 Robert Dewar <dewar@adacore.com>
3221
3222 * gnat_ugn.texi: Document advise not to mix -gnatV? and
3223 optimization.
3224
32252014-07-17 Robert Dewar <dewar@adacore.com>
3226
3227 * checks.adb (Insert_Valid_Check): Don't insist on a name
3228 for the prefix when we make calls to Force_Evaluation and
3229 Duplicate_Subexpr_No_Checks.
3230 * exp_util.adb (Is_Volatile_Reference): Handle all cases properly
3231 (Remove_Side_Effects): Handle all volatile references right
3232 (Side_Effect_Free): Volatile reference is never side effect free
3233 * sinfo.ads (N_Attribute_Reference): Add comments explaining
3234 that in the tree, the prefix can be a general expression.
3235
32362014-07-17 Hristian Kirtchev <kirtchev@adacore.com>
3237
3238 * sem_ch6.adb (Analyze_Subprogram_Body_Contract,
3239 Analyze_Subprogram_Contract): Add comments on SPARK_Mode save/restore.
3240 * sem_ch7.adb (Analyze_Package_Body_Contract,
3241 Analyze_Package_Contract): Add comments on SPARK_Mode save/restore.
3242
32432014-07-17 Robert Dewar <dewar@adacore.com>
3244
3245 * exp_ch7.ads, exp_util.ads: Document Insert_Action_After,
3246 Store_After_Actions_In_Scope.
3247
c61ef416
AC
32482014-07-17 Robert Dewar <dewar@adacore.com>
3249
3250 * sem_aux.ads: Minor comment addition.
3251
32522014-07-17 Ed Schonberg <schonberg@adacore.com>
3253
3254 * sem_res.adb (Make_Call_Into_Operator): If the call is already
3255 a rewriting of an operator node, there are no actuals to be
3256 propagated from original node to rewritten node when in ASIS mode.
3257
32582014-07-17 Hristian Kirtchev <kirtchev@adacore.com>
3259
3260 * sem_ch6.adb (Analyze_Subprogram_Body_Contract,
3261 Analyze_Subprogram_Contract): Add new local variable Mode. Save
3262 and restore the SPARK mode of the related construct in a
3263 stack-like fashion.
3264 * sem_ch7.adb (Analyze_Package_Body_Contract,
3265 Analyze_Package_Contract): Add new local variable Mode. Save and
3266 restore the SPARK mode of the related construct in a stack-like fashion.
3267 * sem_util.adb Remove with and use clause for Opt.
3268 (Restore_SPARK_Mode): New routine.
3269 (Save_SPARK_Mode_And_Set): New routine.
3270 * sem_util.ads Add with and use clause for Opt.
3271 (Restore_SPARK_Mode): New routine.
3272 (Save_SPARK_Mode_And_Set): New routine.
3273
32742014-07-17 Hristian Kirtchev <kirtchev@adacore.com>
3275
3276 * exp_util.adb (Is_Aliased): Transient objects
3277 within an expression with actions cannot be considered aliased.
3278
36295779
AC
32792014-07-17 Thomas Quinot <quinot@adacore.com>
3280
3281 * sem.ads (Scope_Stack_Entry): Reorganize storage of action lists;
3282 introduce a new list (cleanup actions) for each (transient) scope.
3283 * sinfo.ads, sinfo.adb (Cleanup_Actions): New attribute for
3284 N_Block_Statement
3285 * exp_ch7.ads (Store_Cleanup_Actions_In_Scope): New subprogram.
3286 * exp_ch7.adb (Store_Actions_In_Scope): New subprogram, common
3287 processing for Store_xxx_Actions_In_Scope.
3288 (Build_Cleanup_Statements): Allow for a list of additional
3289 cleanup statements to be passed by the caller.
3290 (Expand_Cleanup_Actions): Take custom cleanup actions associated
3291 with an N_Block_Statement into account.
3292 (Insert_Actions_In_Scope_Around): Account for Scope_Stack_Entry
3293 reorganization (refactoring only, no behaviour change).
3294 (Make_Transient_Block): Add assertion to ensure that the current
3295 scope is indeed a block (namely, the entity for the transient
3296 block being constructed syntactically, which has already been
3297 established as a scope). If cleanup actions are present in the
3298 transient scope, transfer them now to the transient block.
3299 * exp_ch6.adb (Expand_Protected_Subprogram_Call): Freeze the
3300 called function while it is still present as the name in a call
3301 in the tree. This may not be the case later on if the call is
3302 rewritten into a transient block.
3303 * exp_smem.adb (Add_Shared_Var_Lock_Procs): The post-actions
3304 inserted after calling a protected operation on a shared passive
3305 protected must be performed in a block finalizer, not just
3306 inserted in the tree, so that they are executed even in case of
3307 a normal (RETURN) or abnormal (exception) transfer of control
3308 outside of the current scope.
3309 * exp_smem.ads (Add_Shared_Var_Lock_Procs): Update documentation
3310 * sem_ch8.adb, expander.adb, exp_ch11.adb: Adjust for
3311 Scope_Stack_Entry reorganization.
3312
33132014-07-17 Thomas Quinot <quinot@adacore.com>
3314
3315 * exp_disp.adb (Make_DT, Make_VM_TSD): Do not omit Check_TSD
3316 call for types that do not have an explicit attribute definition
3317 clause for External_Tag, as their default tag may clash with an
3318 explicit tag defined for some other type.
3319
33202014-07-17 Hristian Kirtchev <kirtchev@adacore.com>
3321
3322 * exp_util.adb (Is_Controlled_Function_Call): Recognize a
3323 controlled function call with multiple actual parameters that
3324 appears in Object.Operation form.
3325
33262014-07-17 Thomas Quinot <quinot@adacore.com>
3327
3328 * einfo.ads, einfo.adb (Has_External_Tag_Rep_Clause): Remove
3329 entity flag.
3330 * sem_ch13.adb (Analyze_Attribute_Definition_Clause, case
3331 External_Tag): No need to set entity flag.
3332 * sem_aux.ads, sem_aux.adb (Has_External_Tag_Rep_Clause):
3333 Reimplement correctly in terms of Has_Rep_Item.
3334
f65c67d3
TQ
33352014-07-17 Thomas Quinot <quinot@adacore.com>
3336
3337 * exp_ch7.adb (Establish_Transient_Scope.Find_Node_To_Be_Wrapped):
3338 Start examining the tree at the node passed to
3339 Establish_Transient_Scope (not its parent).
3340 * exp_ch6.adb (Make_Build_In_Place_Call_In_Object_Declaration):
3341 The access type for the variable storing the reference to
3342 the call must be declared and frozen prior to establishing a
3343 transient scope.
3344 * exp_ch9.adb: Minor reformatting.
3345
a1d3851b
AC
33462014-07-17 Pascal Obry <obry@adacore.com>
3347
3348 * s-os_lib.ads: Minor comment update.
3349
33502014-07-17 Tristan Gingold <gingold@adacore.com>
3351
3352 * sysdep.c: Add ATTRIBUTE_UNUSED to avoid warnings. Fix some
3353 indentation.
3354 * socket.c: Remove #warning to avoid warning.
3355 * expect.c: Indent some preprocessor directives to clarify
3356 nested if. Do not use wait.h on PikeOS. Add ATTRIBUTE_UNUSED
3357 to remove warnings.
3358 * env.c: Fix indentation. Port to PikeOS.
3359 * gsocket.h: Port to PikeOS. Remove #warning.
3360 * terminals.c: Port to PikeOS. Fix indentation of the stubs.
3361 Add ATTRIBUTE_UNUSED to stubs arguments. Fix return statement
3362 of stubbed __gnat_setup_parent_communication.
3363 * adaint.c: Port to PikeOS. Reindent some preprocessor
3364 directives to clarify nested if. Fix indentation. Add missing
3365 ATTRIBUTE_UNUSED.
3366
33672014-07-17 Robert Dewar <dewar@adacore.com>
3368
3369 * sem_attr.adb: Minor reformatting.
3370
d2d8b2a7
AC
33712014-07-17 Robert Dewar <dewar@adacore.com>
3372
3373 * exp_ch7.adb, exp_ch7.ads, sinfo.ads: Minor reformatting.
3374
33752014-07-17 Ed Schonberg <schonberg@adacore.com>
3376
3377 * sem_case.adb (Check_Choice_Set): If the case expression is the
3378 expression in a predicate, do not recheck coverage against itself,
3379 to prevent spurious errors.
3380 * sem_ch13.adb (Check_Aspect_At_End_Of_Declarations): Indicate that
3381 expression comes from an aspect specification, to prevent spurious
3382 errors when expression is a case expression in a predicate.
3383
33842014-07-17 Pascal Obry <obry@adacore.com>
3385
3386 * adaint.c, adaint.h (__gnat_set_executable): Add mode parameter.
3387 * s-os_lib.ads, s-os_lib.adb (Set_Executable): Add Mode parameter.
3388
33892014-07-17 Vincent Celier <celier@adacore.com>
3390
3391 * gnatchop.adb, make.adb, gnatbind.adb, clean.adb, gprep.adb,
3392 gnatxref.adb, gnatls.adb, gnatfind.adb, gnatname.adb: Do not output
3393 the usage for an erroneous invocation of a gnat tool.
3394
9dc30a5f
AC
33952014-07-16 Vincent Celier <celier@adacore.com>
3396
3397 * gnatls.adb: Get the target parameters only if -nostdinc was
3398 not specified.
3399
34002014-07-16 Ed Schonberg <schonberg@adacore.com>
3401
3402 * checks.adb (Insert_Valid_Check): If the expression is a packed
3403 component of a modular type of the right size the data is always
3404 valid. This os particularly useful if the component is part of
3405 a volatile variable.
3406
34072014-07-16 Robert Dewar <dewar@adacore.com>
3408
3409 * gnat_rm.texi, sinfo.ads, freeze.adb, exp_aggr.adb: Minor reformatting
3410
34112014-07-16 Thomas Quinot <quinot@adacore.com>
3412
3413 * exp_ch7.ads: Minor documentation fix.
3414
2ffcbaa5
AC
34152014-07-16 Ed Schonberg <schonberg@adacore.com>
3416
3417 * sem_ch3.adb (Find_Type_Name): Diagnose properly
3418 a private extension completion that is an interface definition
3419 with an interface list.
3420
34212014-07-16 Arnaud Charlet <charlet@adacore.com>
3422
3423 * gnatls.adb (Gnatls): Code clean ups.
3424
34252014-07-16 Thomas Quinot <quinot@adacore.com>
3426
3427 * sinfo.ads, sinfo.adb (N_Compound_Statement): New node kind.
3428 * sem.adb (Analyze): Handle N_Compound_Statement.
3429 * sprint.adb (Sprint_Node_Actual): Ditto.
3430 * sem_ch5.ads, sem_ch5.adb (Analyze_Compound_Statement): New
3431 procedure to handle N_Compound_Statement.
3432 * exp_aggr.adb (Collect_Initialization_Statements):
3433 Use a proper compound statement node, instead of a bogus
3434 expression-with-actions with a NULL statement as its expression,
3435 to wrap collected initialization statements.
3436 * freeze.ads, freeze.adb
3437 (Explode_Initialization_Compound_Statement): New public procedure,
3438 lifted from Freeze_Entity.
3439 (Freeze_Entity): When freezing
3440 an object with captured initialization statements and without
3441 delayed freezing, explode compount statement.
3442 * sem_ch4.adb (Analyze_Expression_With_Actions): Remove special
3443 case that used to handle bogus EWAs with NULL statement as
3444 the expression.
3445 * exp_ch13.adb (Expand_N_Freeze_Entity): For an object with
3446 delayed freezing and captured initialization statements, explode
3447 compound statement.
3448
76241f8f
AC
34492014-07-16 Gary Dismukes <dismukes@adacore.com>
3450
3451 * g-rewdat.adb, g-rewdat.ads: Minor reformatting.
3452
34532014-07-16 Doug Rupp <rupp@adacore.com>
3454
3455 * s-interr-hwint.adb: Casing error on parameter.
3456
34572014-07-16 Pascal Obry <obry@adacore.com>
3458
3459 * Makefile.rtl: Add g-rewdat.o dependencies in
3460 GNATRTL_NONTASKING_OBJS.
3461
34622014-07-16 Ed Schonberg <schonberg@adacore.com>
3463
3464 * sem_case.adb: Code clean up.
3465
36f6df66
AC
34662014-07-16 Vincent Celier <celier@adacore.com>
3467
3468 * make.adb: Do not read gnat.adc when gnatmake is invoked
3469 with -gnatA.
3470
34712014-07-16 Pascal Obry <obry@adacore.com>
3472
3473 * gnat_rm.texi, impunit.adb, g-rewdat.adb, g-rewdat.ads: Initial
3474 implementation of GNAT.Rewrite_Data.
3475
c624a26b
AC
34762014-07-16 Vincent Celier <celier@adacore.com>
3477
3478 * gnatls.adb (Normalize): New function.
3479 (Gnatls): Get the target parameters. On targets other than VMS,
3480 normalize the path names in the source search path, the object search
3481 path and the project search path.
3482
34832014-07-16 Ed Schonberg <schonberg@adacore.com>
3484
3485 * sem_case.adb: Avoid self-checking of case expressions in
3486 dynamic predicates.
3487
34882014-07-16 Robert Dewar <dewar@adacore.com>
3489
3490 * gnat_rm.texi: Document effect of Suppress_Initialization on tags and
3491 discriminants.
3492
ff1f1705
AC
34932014-07-16 Eric Botcazou <ebotcazou@adacore.com>
3494
3495 * switch-b.adb (Scan_Binder_Switches): Add missing guard.
3496
34972014-07-16 Ben Brosgol <brosgol@adacore.com>
3498
3499 * gnat_ugn.texi: Fix typo.
3500
35012014-07-16 Ed Schonberg <schonberg@adacore.com>
3502
3503 * exp_ch4.adb (Expand_N_Case_Expression): Do not expand case
3504 expression if it is the specification of a subtype predicate:
3505 it will be expanded when the return statement is analyzed, or
3506 when a static predicate is transformed into a static expression
3507 for evaluation by the front-end.
3508 * sem_ch13.adb (Get_RList): If the expression for a static
3509 predicate is a case expression, extract the alternatives of the
3510 branches with a True value to create the required statically
3511 evaluable expression.
3512
35132014-07-16 Thomas Quinot <quinot@adacore.com>
3514
3515 * exp_prag.adb (Expand_Pragma_Check): Use the location of the
3516 expression, not the location of the aspect, for all generated
3517 code, so that in particular the call to raise_assert_failure
3518 gets the sloc of the associated condition.
3519 * exp_ch6.adb
3520 (Expand_Subprogram_Contract.Build_Postconditions_Procedure):
3521 Set an explicit End_Label on the handled sequence of statements
3522 for the _Postconditions procedure so that the implicit return
3523 statement does not erroneously get associated with code generated
3524 for the last condition in postconditions.
3525
35262014-07-16 Thomas Quinot <quinot@adacore.com>
3527
3528 * ug_words: Fix name of VMS synonym for -gnatw.z (SIZE_ALIGNMENT,
3529 not SIZE_ALIGN) and -gnatw.Z (NOSIZE_ALIGNMENT, not NOSIZE_ALIGN).
3530 * vms_data.ads: Add missing spaces in VMS synonyms for -gnatw.z /
3531 -gnatw.Z.
3532
3f1bc2cf
AC
35332014-07-16 Robert Dewar <dewar@adacore.com>
3534
3535 * sem_ch3.adb, sem_prag.adb, sem_util.adb, sem_res.adb, sem_ch13.adb:
3536 Minor code reorganization (use Is_Access_Type, not in Access_Kind).
3537 * exp_ch3.adb: Minor code reorganization, use Is_Access_Type,
3538 not in Access_Kind.
3539 * par-ch4.adb (At_Start_Of_Attribute): New function
3540 (P_Simple_Expression): Better msg for bad attribute prefix.
3541 * scans.ads: Minor reformatting.
3542
35432014-07-16 Ed Schonberg <schonberg@adacore.com>
3544
3545 * sem_attr.adb (Resolve_Attribute, case 'Update): If choice is a
3546 static constant, check that in belongs to the corresponding index
3547 subtype, to produce the proer warning when expansion is disabled.
3548
35492014-07-16 Robert Dewar <dewar@adacore.com>
3550
3551 * freeze.adb (Freeze_Entity): Warn on incompatible size/alignment.
3552 * gnat_ugn.texi: Document -gnatw.z and -gnatw.Z.
3553 * ug_words: VMS synonyms (WARNINGS=[NO]SIZE_ALIGN) for -gnatw.z/-gnatw.Z
3554 * usage.adb: Add lines for -gnatw.z/-gnatw.Z.
3555 * vms_data.ads: VMS synonyms (WARNINGS=[NO]SIZE_ALIGN) for
3556 -gnatw.z/-gnatw.Z
3557 * warnsw.adb: Set Warn_On_Size_Alignment appropriately.
3558 * warnsw.ads (Warn_On_Size_Alignment): New flag Minor
3559 reformatting.
3560
b07b7ace
AC
35612014-07-16 Hristian Kirtchev <kirtchev@adacore.com>
3562
3563 * exp_ch7.adb (Process_Declarations): Reinstate the check on
3564 a hook object to ensure that the related transient declaration
3565 is finalizable.
3566 * exp_util.adb (Is_Aliased): Do not consider expresison with
3567 actions as a special context.
3568 (Requires_Cleanup_Actions): Reinstate the check on a hook object to
3569 ensure that the related transient declaration is finalizable.
3570
35712014-07-16 Robert Dewar <dewar@adacore.com>
3572
3573 * checks.ads, checks.adb (Allocation_Checks_Suppressed): New function.
3574 * snames.ads-tmpl: Add Allocation_Check to list of check names.
3575 * types.ads: Add Allocation_Check to list of check names.
3576
35772014-07-16 Thomas Quinot <quinot@adacore.com>
3578
3579 * sem_util.adb (Enter_Name): replace bogus test for presence of
3580 Corresponding_Remote_Type with correct test on Ekind.
3581 * sem_res.adb (Valid_Conversion): ditto; also clarify validity
3582 of calls to Corresponding_ Remote_Type (documentation fix).
3583
35842014-07-16 Robert Dewar <dewar@adacore.com>
3585
3586 * gnat_rm.texi: Document illegal case of Unrestricted_Access.
3587 * sem_attr.adb (Analyze_Access_Attribute): Set_Non_Aliased_Prefix
3588 where it applies.
3589 (Resolve_Attribute, case Access): Flag illegal Unrestricted_Access use.
3590 * sinfo.ads, sinfo.adb (Non_Aliased_Prefix): New flag.
3591
904aac81
AC
35922014-07-16 Robert Dewar <dewar@adacore.com>
3593
3594 * gnat_ugn.texi: Document binder switch -Ra.
3595 * gnatbind.adb (List_Closure_Display): Implement -Ra switch
3596 (List_Closure_All).
3597 * opt.ads (List_Closure_All): New switch.
3598 * switch-b.adb (Scan_Binder_Switches): Recognize -Ra to set
3599 List_Closure_All.
3600
36012014-07-16 Ben Brosgol <brosgol@adacore.com>
3602
3603 * gnat_rm.texi: Minor edits, to make case consistent in names
3604 of types and fields.
3605
3bd783ec
AC
36062014-07-16 Robert Dewar <dewar@adacore.com>
3607
3608 * gnat_rm.texi: Document erroneous mixing of thin pointers and
3609 unrestricted access
3610 * gnat_ugn.texi: Add note on size of access types about thin
3611 pointers and the use of attribute Unrestricted_Access.
3612
36132014-07-16 Ed Schonberg <schonberg@adacore.com>
3614
3615 * a-cbdlli.ads, a-cbdlli.adb, a-cbhama.ads, a-cbhama.adb,
3616 * a-cbhase.ads, a-cbhase.adb, a-cborma.ads, a-cborma.adb,
3617 * a-cborse.ads, a-cborse.adb, a-cobove.ads a-cobove.adb: Add Control
3618 machinery to detect tampering on bounded vectors.
3619
800b8653
RD
36202014-07-16 Robert Dewar <dewar@adacore.com>
3621
3622 * gnat_rm.texi: Document that leading/trailing asterisks are
3623 now implied for the pattern match string for pragma Warnings
3624 and Warning_As_Error.
3625 * sem_prag.adb (Acquire_Warning_Match_String): New procedure.
3626 (Analyze_Pragma, case Warning_As_Error): Call
3627 Acquire_Warning_Match_String.
3628 (Analyze_Pragma, case Warnings): Call Acquire_Warning_Match_String.
3629
350f5d3b
AC
36302014-07-16 Bob Duff <duff@adacore.com>
3631
3632 * gnat_ugn.texi: Document need for project file
3633 for --incremental switch for gnat2xml.
3634
36352014-07-16 Robert Dewar <dewar@adacore.com>
3636
3637 * gnat_rm.texi: Fix example of non-packable components in packed
3638 records section.
3639
36402014-07-16 Robert Dewar <dewar@adacore.com>
3641
3642 * s-tpoben.adb, s-tasren.adb, s-interr.adb, s-interr-hwint.adb,
3643 s-shasto.adb, s-interr-vms.adb, s-interr-sigaction.adb: Avoid use of
3644 upper case in exception messages.
3645
ea70f3d0
RD
36462014-07-16 Robert Dewar <dewar@adacore.com>
3647
3648 * snames.ads-tmpl, sem_attr.adb, exp_attr.adb: Same_Storage attribute
3649 is renamed Has_Same_Storage.
3650 * gnat_rm.texi: Document missing SPARK pragmas and attributes.
3651 * sem_prag.adb: Minor comment fix (use LOCAL_NAME in syntax
3652 descriptions).
3653
9ab5d86b
RD
36542014-07-16 Robert Dewar <dewar@adacore.com>
3655
3656 * exp_util.adb, sem_attr.adb, exp_ch4.adb, a-cohase.ads,
3657 a-coinho-shared.adb, a-coinho-shared.ads: Minor reformatting.
3658
36592014-07-16 Robert Dewar <dewar@adacore.com>
3660
3661 * gnat_ugn.texi: Add note that integrated
3662 preprocessing cannot be applied to configuration pragma files.
3663
6cade1b0
AC
36642014-07-16 Yannick Moy <moy@adacore.com>
3665
3666 * sem_attr.adb (Analyze_Attribute/cases Pred
3667 and Succ): Always enable range check on fixed-point types if
3668 not suppressed for the type.
3669
36702014-07-16 Hristian Kirtchev <kirtchev@adacore.com>
3671
3672 * sem_util.adb (State_Has_Enabled_Property):
3673 Account for an external property denoted by an others choice.
3674
e59243fa
AC
36752014-07-16 Hristian Kirtchev <kirtchev@adacore.com>
3676
3677 * exp_ch4.ads, exp_ch4.adb (Find_Hook_Context): Relocated to Exp_Util.
3678 * exp_ch7.adb (Process_Declarations): There is no need to check
3679 that a transient object being hooked is controlled as it would
3680 not have been hooked in the first place.
3681 * exp_ch9.adb Remove with and use clause for Exp_Ch4.
3682 * exp_util.adb (Find_Hook_Context): Relocated from Exp_Ch4.
3683 (Is_Aliased): A renaming of a transient controlled object is
3684 not considered aliasing when it occurs within an expression
3685 with actions.
3686 (Requires_Cleanup_Actions): There is no need to
3687 check that a transient object being hooked is controlled as it
3688 would not have been hooked in the first place.
3689 * exp_util.ads (Find_Hook_Context): Relocated from Exp_Ch4.
3690
36912014-07-16 Hristian Kirtchev <kirtchev@adacore.com>
3692
3693 * sem_ch13.adb (Insert_After_SPARK_Mode): Moved to
3694 the outer level of routine Analyze_Aspect_Specifications. Ensure
3695 that the corresponding pragmas of aspects Initial_Condition and
3696 Initializes are inserted after pragma SPARK_Mode.
3697
36982014-07-16 Ed Schonberg <schonberg@adacore.com>
3699
3700 * sem_attr.adb (Analyze_Attribute, case 'Update): Handle
3701 properly a choice list with more than one choice, where each
3702 is an aggregate denoting a sequence of array indices for a
3703 multidimentional array. For SPARK use.
3704
8942b30c
AC
37052014-07-16 Vadim Godunko <godunko@adacore.com>
3706
3707 * a-coinho-shared.adb (Adjust): Create
3708 copy of internal shared object and element when source container
3709 is locked.
3710 (Copy): Likewise.
3711 (Query_Element): Likewise.
3712 (Update_Element): Likewise.
3713 (Constant_Reference): Likewise. Raise Constraint_Error on attempt
3714 to get reference for empty holder.
3715 (Reference): Likewise.
3716
37172014-07-16 Thomas Quinot <quinot@adacore.com>
3718
3719 * exp_ch4.adb (Find_Hook_Context): New subprogram, extracted
3720 from Process_Transient_Oject.
3721 * exp_ch4.ads: Ditto.
3722 * exp_ch9.adb (Build_Class_Wide_Master): Insert the _master
3723 declaration as an action on the topmost enclosing expression,
3724 not on a possibly conditional subexpreession.
3725
d6f824bf
VG
37262014-07-16 Vadim Godunko <godunko@adacore.com>
3727
3728 * a-coinho.adb, a-coinho-shared.adb, a-coinho.ads, a-coinho-shared.ads:
3729 Fix parameter mode of Update_Element.
3730
ab476638
AC
37312014-07-16 Robert Dewar <dewar@adacore.com>
3732
3733 * a-coinho.adb, a-coinho-shared.adb, a-coinho-shared.ads: Minor
3734 reformatting.
3735
37362014-07-16 Ed Schonberg <schonberg@adacore.com>
3737
3738 * a-cohase.ads: Type Iterator must be controlled, so that the
3739 tampering bit is properly set through an iteration.
3740 * a-cohase.adb: Add Finalize operation for type Iterator.
3741
3a859cff
ES
37422014-07-16 Ed Schonberg <schonberg@adacore.com>
3743
3744 * a-coinho-shared.adb, a-coinho-shared.ads: Proper structures for
3745 tampering checks.
3746
88c90b68
ES
37472014-07-16 Ed Schonberg <schonberg@adacore.com>
3748
3749 * a-coinho-shared.adb: Fix spurious accessibility check.
3750
56363ffd
JH
37512014-06-15 Jan Hubicka <hubicka@ucw.cz>
3752
9495e947 3753 * gcc-interface/utils.c (process_attributes): Use set_decl_tls_model.
56363ffd 3754
ab938b41
BE
37552014-06-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
3756
3757 PR ada/61505
3758 * gnat_rm.texi: Fix errors with makeinfo 5.1.
3759
56444a32
AC
37602014-06-14 Arnaud Charlet <charlet@adacore.com>
3761
3762 PR ada/61505
9495e947 3763 * gnat_rm.texi: Attempt to fix error with makeinfo 5.1.
56444a32 3764
783da331
AC
37652014-06-13 Yannick Moy <moy@adacore.com>
3766
9495e947 3767 * exp_attr.adb: Fix typo in comment.
783da331
AC
3768 * gnat1drv.adb (Adjust_Global_Switches): Force float overflow
3769 checking in GNATprove_Mode.
3770
37712014-06-13 Ed Schonberg <schonberg@adacore.com>
3772
3773 * a-coinho-shared.adb, a-coinho-shared.ads: Update shared version.
3774
129bbe43
RD
37752014-06-13 Robert Dewar <dewar@adacore.com>
3776
3777 * sem_ch3.adb, sem_ch9.adb, a-coinho.adb, a-coinho.ads: Minor
3778 reformatting.
3779
aca670a0
AC
37802014-06-13 Hristian Kirtchev <kirtchev@adacore.com>
3781
3782 * sem_prag.adb (Analyze_Pragma): Add local
3783 variable Missing_Parentheses. Emit an error when a state
3784 declaration with options appears without parentheses. Add a
3785 guard to prevent a bogus error when a state declaration may be
3786 interpreted as an option if a previous declaration with options
3787 was not parenthesized.
3788
37892014-06-13 Robert Dewar <dewar@adacore.com>
3790
3791 * checks.adb: Validate_Alignment_Check_Warnings: New procedure
3792 (Apply_Address_Clause_Check): Make Aligment_Warnings table entry.
3793 * checks.ads (Alignment_Warnings_Record): New type.
3794 (Alignment_Warnings): New table
3795 (Validate_Alignment_Check_Warnings): New procedure.
3796 * errout.adb (Delete_Warning_And_Continuations): New procedure
3797 (Error_Msg_Internal): Set Warning_Msg (Delete_Warning): Handle
3798 Warnings_Treated_As_Errors (Finalize): Minor reformatting
3799 * errout.ads (Warning_Msg): New variable
3800 (Delete_Warning_And_Continuations): New procedure
3801 * erroutc.adb (Delete_Msg): Handle Warnings_Treated_As_Errors count.
3802 * gnat1drv.adb (Post_Compilation_Validation_Checks): New procedure.
3803
38042014-06-13 Ed Schonberg <schonberg@adacore.com>
3805
3806 * a-coinho.adb, a-coinho.ads: Add Reference machinery.
3807
d2adb45e
AC
38082014-06-13 Hristian Kirtchev <kirtchev@adacore.com>
3809
3810 * errout.adb (SPARK_Msg_N): New routine.
3811 (SPARK_Msg_NE): New routine.
3812 * errout.ads Add a section on SPARK-related error routines.
3813 (SPARK_Msg_N): New routine.
3814 (SPARK_Msg_NE): New routine.
3815 * sem_ch13.adb (Analyze_Aspect_Specifications): Ensure that
3816 pragma Abstract_State is always inserted after SPARK_Mode.
3817 (Insert_After_SPARK_Mode): New routine.
3818 * sem_prag.adb (Analyze_Abstract_State,
3819 Analyze_Constituent, Analyze_External_Property,
3820 Analyze_External_Property_In_Decl_Part, Analyze_Global_Item,
3821 Analyze_Global_List, Analyze_Initialization_Item,
3822 Analyze_Initialization_Item_With_Inputs, Analyze_Input_Item,
3823 Analyze_Input_List, Analyze_Input_Output, Analyze_Part_Of,
3824 Analyze_Pragma, Analyze_Refined_Depends_In_Decl_Part,
3825 Analyze_Refined_Global_In_Decl_Part,
3826 Analyze_Refined_State_In_Decl_Part, Analyze_Refinement_Clause,
3827 Check_Aspect_Specification_Order, Check_Constituent_Usage,
3828 Check_Declaration_Order, Check_Dependency_Clause,
3829 Check_Duplicate_Mode, Check_Duplicate_Option,
3830 Check_Duplicate_Property, Check_External_Properties,
3831 Check_External_Property, Check_Function_Return,
3832 Check_Matching_Constituent, Check_Matching_State,
3833 Check_Mode_Restriction_In_Enclosing_Context,
3834 Check_Mode_Restriction_In_Function, Check_Refined_Global_Item,
3835 Check_State_And_Constituent_Use, Create_Or_Modify_Clause,
3836 Has_Extra_Parentheses, Inconsistent_Mode_Error,
3837 Match_Error, Propagate_Part_Of, Report_Extra_Clauses,
3838 Report_Extra_Constituents_In_List, Report_Extra_Inputs,
3839 Report_Unrefined_States, Report_Unused_Constituents,
3840 Report_Unused_States, Role_Error, Usage_Error):
3841 Convert Error_Msg_XXX calls to SPARK_Msg_XXX calls
3842 to report semantic errors only when SPARK_Mode is on.
3843 (Analyze_Depends_In_Decl_Part): Do not check the syntax of
3844 pragma Depends explicitly, this is now done by the analysis.
3845 (Analyze_Global_In_Decl_List): Do not check the syntax of
3846 pragma Global explicitly, this is now done by the analysis.
3847 (Analyze_Initializes_In_Decl_Part): Do not check the syntax of
3848 pragma Initializes explicitly, this is now done by the analysis.
3849 (Analyze_Part_Of): Do not check the syntax of the encapsulating
3850 state, this is now done by the analysis.
3851 (Analyze_Pragma): Do
3852 not check the syntax of a state declaration, this is now done
3853 by the analysis.
3854 (Analyze_Refined_Depends_In_Decl_Part): Do not
3855 check the syntax of pragma Refined_Depends explicitly, this is now
3856 done by the analysis.
3857 (Analyze_Refined_Global_In_Decl_Part): Do
3858 not check the syntax of pragma Refined_Global explicitly, this is
3859 now done by the analysis.
3860 (Analyze_Refined_State_In_Decl_Part):
3861 Do not check the syntax of pragma Refined_State explicitly, this
3862 is now done by the analysis.
3863 (Check_Dependence_List_Syntax): Removed.
3864 (Check_Global_List_Syntax): Removed.
3865 (Check_Initialization_List_Syntax): Removed.
3866 (Check_Item_Syntax): Removed.
3867 (Check_Missing_Part_Of): Do not consider items from an instance.
3868 (Check_Refinement_List_Syntax): Removed.
3869 (Check_State_Declaration_Syntax): Removed.
3870 (Collect_Global_List): Do not raise Program_Error when the input is
3871 malformed.
3872 (Process_Global_List): Do not raise Program_Error when the input
3873 is malformed.
3874 * sem_ch13.adb: Minor reformatting.
9495e947 3875
d2adb45e
AC
38762014-06-13 Ed Schonberg <schonberg@adacore.com>
3877
3878 * sem_ch3.adb (Find_Type_Name): Diagnose a private type completion
3879 that is an interface definition with an interface list.
3880 (Process_Full_View): Move error message on missmatched interfaces
3881 between views to the declaration of full view, for clarity.
3882 * sem_ch9.adb (Check_Interfaces): Move error message to full view,
3883 for clarity.
3884
80298c3b
AC
38852014-06-13 Robert Dewar <dewar@adacore.com>
3886
3887 * exp_attr.adb (Expand_N_Attribute_Reference, case Pred/Succ): Change
3888 reason to Overflow.
3889
38902014-06-13 Robert Dewar <dewar@adacore.com>
3891
3892 * makeutl.adb: Minor reformatting.
3893
38942014-06-13 Gail Schenker <schenker@adacore.com>
3895
3896 * debug.adb, sem_eval.adb (Why_Not_Static): Remove temporary code and
3897 associated flag (d.z), no longer needed.
3898
38992014-06-13 Ed Schonberg <schonberg@adacore.com>
3900
3901 * sem_ch13.adb (Analyze_Aspect_Specifications): For Import and
3902 Export aspects, do not check whether a corresponding Convention
3903 aspect has been specified. Convention is optional in Ada2012,
3904 and defaults to Convention_Ada.
3905
0083dd66
AC
39062014-06-13 Eric Botcazou <ebotcazou@adacore.com>
3907
3908 * checks.adb (Apply_Address_Clause_Check): Only issue the new
3909 warning if the propagation warning is issued.
3910
39112014-06-13 Thomas Quinot <quinot@adacore.com>
3912
3913 * exp_ch4.adb: Minor reformatting.
3914
39152014-06-13 Robert Dewar <dewar@adacore.com>
3916
3917 * exp_attr.adb (Expand_N_Attribute_Reference, case Pred):
3918 Handle float range check case (Expand_N_Attribute_Reference,
3919 case Succ): Handle float range check case.
3920 * sem_attr.adb (Analyze_Attribute, case Pred/Succ): Handle float
3921 range check case.
3922
39232014-06-13 Vincent Celier <celier@adacore.com>
3924
3925 * makeutl.ads (Compute_Builder_Switches): Change name of
3926 parameter Root_Environment to Env.
3927 * prj-conf.adb (Check_Switches): Call Locate_Runtime with the
3928 Env parameter of procedure Get_Or_Create_Configuration_File.
3929 (Locate_Runtime): Call Find_Rts_In_Path with the Project_Path
3930 of new parameter Env.
3931 * prj-conf.ads (Locate_Runtime): New parameter Env of type
3932 Prj.Tree.Environment.
3933
39342014-06-13 Robert Dewar <dewar@adacore.com>
3935
3936 * gnat_rm.texi: Minor comment clarification for Check_Float_Overflow.
3937
890f1954
RD
39382014-06-13 Robert Dewar <dewar@adacore.com>
3939
3940 * exp_attr.adb, exp_ch9.adb, lib-writ.adb, g-comlin.adb: Minor
3941 reformatting.
3942 * sem_attr.adb: Minor code reformatting and simplification.
3943 * checks.adb: Fix minor typo.
3944
4de10025
AC
39452014-06-13 Emmanuel Briot <briot@adacore.com>
3946
3947 * g-comlin.adb (Get_Argument): fix expansion
3948 of command line arguments (e.g. "*.adb") when using a custom
3949 parser. The parser was not passed to the recursive call, and
3950 thus we were trying to do the expansion on the default command
3951 line parser.
3952
39532014-06-13 Thomas Quinot <quinot@adacore.com>
3954
3955 * exp_ch9.adb: Minor reformatting.
3956
39572014-06-13 Ed Schonberg <schonberg@adacore.com>
3958
3959 * exp_attr.adb (Expand_N_Attribute_Reference, case 'Old):
3960 To determine whether the attribute should be expanded, examine
3961 whether the enclosing postcondition pragma is to be checked,
3962 rather than using the internal flag Assertions_Enabled.
3963
17a35641
AC
39642014-06-13 Ben Brosgol <brosgol@adacore.com>
3965
3966 * gnat_rm.texi: Minor fixes.
3967 * gnat_ugn.texi: Added a missing "@itemize".
3968
39692014-06-13 Robert Dewar <dewar@adacore.com>
3970
3971 * debug.adb: Remove -gnatd.1 flag documentation.
3972 * layout.adb (Layout_Type): Remove special handling of size
3973 for anonymous access type.
3974 * sem_ch3.adb (Replace_Type): Remove special handling of size
3975 for anonymous access type.
3976
19634e40
RD
39772014-06-13 Robert Dewar <dewar@adacore.com>
3978
3979 * debug.adb: Document debug flag -gnatd.1.
3980 * layout.adb (Layout_Type): Size change for anonymous access
3981 types under -gnatd.1.
3982 * sem_ch3.adb (Replace_Type): Size change for anonymous access
3983 types under -gnatd.1.
3984
446ebdbb
AC
39852014-06-13 Robert Dewar <dewar@adacore.com>
3986
3987 * layout.adb (Layout_Type): Anonymous access types designating
3988 unconstrained arrays are always thin pointers.
3989 * sem_ch3.adb (Replace_Type): Anonymous access types designating
3990 unconstrained arrays are always thin pointers.
3991
39922014-06-13 Ed Schonberg <schonberg@adacore.com>
3993
3994 * sem_attr.adb (Analyze_Attribute): Use Check_Parameterless_Call
3995 to resolve the prefix of an attribute that is an entity name
3996 and may be a parameterless call. Minor code reorganization.
3997
c86cf714
RD
39982014-06-13 Robert Dewar <dewar@adacore.com>
3999
4000 * lib.ads, lib.adb, lib-writ.adb, lib-load.adb (Is_Compiler_Unit):
4001 Removed.
4002 * opt.ads (Compiler_Unit): New flag.
4003 * par-ch5.adb (Test_Statement_Required): Call Check_Compiler_Unit
4004 for null statement sequence (not allowed in compiler unit).
4005 * par-prag.adb (Prag): Handle Compiler_Unit[_Warning] during
4006 parsing.
4007 * restrict.ads, restrict.adb (Check_Compiler_Unit): New version and new
4008 calling sequence.
4009 * sem_ch11.adb, sem_ch3.adb, sem_ch4.adb: New calling sequence for
4010 Check_Compiler_Unit.
4011 * sem_ch6.adb (Analyze_Extended_Return_Statement): Call
4012 Check_Compiler_Unit (this construct is not allowed in compiler
4013 units).
4014 * sem_prag.adb (Analyze_Pragma, case Compiler_Unit[_Warning]):
4015 Set Opt.Compiler_Unit.
4016
65ede005
AC
40172014-06-13 Geert Bosch <bosch@adacore.com>
4018
4019 * gnat_rm.texi, s-tasinf-solaris.ads, sem_prag.adb, gnat_ugn.texi,
4020 s-tasinf-mingw.ads, s-tasinf.ads, s-tasinf-linux.ads,
4021 s-tasinf-vxworks.ads: Make Task_Info pragma and package obsolescent.
4022
40232014-06-13 Robert Dewar <dewar@adacore.com>
4024
4025 * s-tasini.adb, s-tarest.adb, s-taprob.adb: Minor reformatting.
4026
c00b86e2
HK
40272014-06-13 Hristian Kirtchev <kirtchev@adacore.com>
4028
4029 * freeze.adb (Freeze_Entity): Remove the check concerning volatile
4030 types in SPARK as it is poorly placed and poorly formulated. The
4031 check was flagging ALL volatile entities as illegal in SPARK.
4032 * sem_prag.adb (Process_Atomic_Shared_Volatile): Flag volatile
4033 types as illegal in SPARK.
4034
e3a325f2
AC
40352014-06-13 Robert Dewar <dewar@adacore.com>
4036
4037 * sem_cat.adb: Minor reformatting.
4038
40392014-06-13 Yannick Moy <moy@adacore.com>
4040
4041 * sem_prag.adb (Analyze_Pragma/Post_Class): Fix typo.
4042
40432014-06-13 Arnaud Charlet <charlet@adacore.com>
4044
4045 * gnat_rm.texi: Add detail on SPARK_05 restriction.
4046
40472014-06-13 Bob Duff <duff@adacore.com>
4048
4049 * s-solita.adb (Get_Sec_Stack_Addr, Init_Tasking_Soft_Links):
4050 Add assertions requiring the secondary stack to be initialized.
4051 * s-solita.ads (Init_Tasking_Soft_Links): Comment.
4052 * s-taprob.adb, s-tarest.adb, s-tasini.adb (elab code): Make sure the
4053 secondary stack is initialized before calling Init_Tasking_Soft_Links,
4054 by adding pragmas Elaborate_Body.
4055
40562014-06-13 Thomas Quinot <quinot@adacore.com>
4057
4058 * sem_ch13.adb (Analyze_Stream_TSS_Definition): Remove temporary
4059 kludge disabling new legality check.
4060
aa611332
AC
40612014-06-13 Hristian Kirtchev <kirtchev@adacore.com>
4062
4063 * freeze.adb (Freeze_Record_Type): Remove checks related to SPARK
4064 volatile types.
4065 (Freeze_Type): Volatile types are now illegal in SPARK.
4066
40672014-06-13 Robert Dewar <dewar@adacore.com>
4068
4069 * aspects.ads, aspects.adb: Add aspect Thread_Local_Storage.
4070 * gnat_rm.texi: Document aspect Thread_Local_Storage.
4071
40722014-06-13 Ed Schonberg <schonberg@adacore.com>
4073
4074 * sem_cat.adb (Validate_Static_Object_Name): A constant whose
4075 value is a temporary that renames an aggregate is legal in a
4076 preelaborated unit. Illegalities, if any will be detected in
4077 the aggregate components.
4078
40792014-06-13 Ed Schonberg <schonberg@adacore.com>
4080
4081 * einfo.ads: Minor reformatting an comment expansion.
4082
5af638c8
AC
40832014-06-13 Robert Dewar <dewar@adacore.com>
4084
4085 * back_end.ads, back_end.adb: Make_Id, Make_SC, Set_RND are moved to
4086 Tbuild.
4087 * tbuild.ads, tbuild.adb: Make_Id, Make_SC, Set_RND are moved here from
4088 Back_End.
4089 * gnat1drv.adb: Make_Id, Make_SC, Set_RND are moved to Tbuild
4090 * sem_warn.adb: Minor reformatting.
4091
40922014-06-13 Doug Rupp <rupp@adacore.com>
4093
4094 * adaint.c (__gnat_open_new_temp) [VMS]: Open binary
4095 files with rfm=udf.
4096
7f2c8954
AC
40972014-06-13 Yannick Moy <moy@adacore.com>
4098
4099 * sem_warn.adb (Check_Unset_References): Take
4100 case of Refined_Post into account in Within_Postcondition check.
4101
41022014-06-13 Hristian Kirtchev <kirtchev@adacore.com>
4103
4104 * freeze.adb (Freeze_Record_Type): Volatile types are not allowed in
4105 SPARK.
4106
41072014-06-13 Yannick Moy <moy@adacore.com>
4108
4109 * sem_ch13.adb (Analyze_Aspect_Specifications/Aspect_Import,
4110 Aspect_Export): Consider that variables may be set outside the program.
4111
28bc3323
AC
41122014-06-13 Robert Dewar <dewar@adacore.com>
4113
4114 * back_end.adb (Make_Id): New function.
4115 (Make_SC): New function.
4116 (Set_RND): New procedure.
4117 * back_end.ads (Make_Id): New function.
4118 (Make_SC): New function.
4119 (Set_RND): New procedure.
4120 * einfo.ads: Minor comment updates.
4121 * frontend.adb: Move Atree.Initialize call to Gnat1drv.
4122 * gnat1drv.adb (Gnat1drv): New calling sequence for
4123 Get_Target_Parameters.
4124 (Gnat1drv): Move Atree.Initialize here from Frontend.
4125 * targparm.adb (Get_Target_Parameters): New calling
4126 sequence (Get_Target_Parameters): Handle pragma Restriction
4127 (No_Dependence,..)
4128 * targparm.ads (Get_Target_Parameters): New calling sequence.
4129
41302014-06-13 Gary Dismukes <dismukes@adacore.com>
4131
4132 * sem_prag.adb (Process_Import_Or_Interface): Exit the homonym
4133 loop if the pragma does not come from source, so that an implicit
4134 pragma Import only applies to the first declaration, avoiding
4135 possible conflicts with earlier explicit and implicit declarations
4136 due to multiple Provide_Shift_Operators pragmas.
4137 (Set_Imported): Remove previous fix that bypassed pragma duplication
4138 error.
4139 * gnat_rm.texi: Change 'equivalent' to 'similar' in description
4140 of Provide_Shift_Operators.
4141
0ab75824 41422014-06-12 Jan Hubicka <hubicka@ucw.cz>
f961457f 4143
0ab75824
JH
4144 * gcc-interface/utils.c (process_attributes) <ATTR_LINK_SECTION>: Pass
4145 string pointer directly to set_decl_section_name.
f961457f 4146
f8c59c05
AC
41472014-06-11 Robert Dewar <dewar@adacore.com>
4148
4149 * sem_ch13.adb: Minor reformatting.
4150
41512014-06-11 Hristian Kirtchev <kirtchev@adacore.com>
4152
4153 * sem_prag.adb (Check_Clause_Syntax): Add new
4154 local variable Outputs. Account for the case where multiple
4155 output items appear as an aggregate.
4156
41572014-06-11 Robert Dewar <dewar@adacore.com>
4158
4159 * sem_warn.adb (Output_Obsolescent_Entity_Warnings): Tag warning
4160 with ?j? not ??.
4161
41622014-06-11 Ed Schonberg <schonberg@adacore.com>
4163
4164 * einfo.ads: Minor reformatting.
4165
41662014-06-11 Hristian Kirtchev <kirtchev@adacore.com>
4167
4168 * a-cbdlli.adb, a-cdlili.adb, a-cidlli.adb, a-crdlli.adb (Insert): Add
4169 new variable First_Node. Update the position after all insertions have
4170 taken place to First_Node.
4171
41722014-06-11 Robert Dewar <dewar@adacore.com>
4173
4174 * debug.adb: Remove debug flag -gnatd.1, no longer needed.
4175 * layout.adb (Layout_Type): Remove test of -gnatd.1.
4176
41772014-06-11 Robert Dewar <dewar@adacore.com>
4178
4179 * sem_ch13.adb: Minor reformatting.
4180
41812014-06-11 Hristian Kirtchev <kirtchev@adacore.com>
4182
4183 * sem_prag.adb (Check_Clause_Syntax): Add new
4184 local variable Outputs. Account for the case where multiple
4185 output items appear as an aggregate.
4186
41872014-06-11 Robert Dewar <dewar@adacore.com>
4188
4189 * sem_warn.adb (Output_Obsolescent_Entity_Warnings): Tag warning
4190 with ?j? not ??.
4191
41922014-06-11 Ed Schonberg <schonberg@adacore.com>
4193
4194 * einfo.ads: Minor reformatting.
4195
41962014-06-11 Hristian Kirtchev <kirtchev@adacore.com>
4197
4198 * a-cbdlli.adb, a-cdlili.adb, a-cidlli.adb, a-crdlli.adb (Insert): Add
4199 new variable First_Node. Update the position after all insertions have
4200 taken place to First_Node.
4201
42022014-06-11 Robert Dewar <dewar@adacore.com>
4203
4204 * debug.adb: Remove debug flag -gnatd.1, no longer needed.
4205 * layout.adb (Layout_Type): Remove test of -gnatd.1.
4206
3e65bfab
AC
42072014-06-11 Thomas Quinot <quinot@adacore.com>
4208
4209 * freeze.ads: Minor reformatting.
4210 * checks.adb (Determine_Range): Do not attempt to determine
4211 the range of a deferred constant whose full view has not been
4212 seen yet.
4213 * sem_res.adb (Resolve): Remove undesirable guard against
4214 resolving expressions from expression functions.
4215
42162014-06-11 Robert Dewar <dewar@adacore.com>
4217
4218 * debug.adb (Debug_Flag_Dot_1): Set to enable fix for anonymous
4219 access types.
4220 * layout.adb (Layout_Type): Make anonymous access types for
4221 subprogram formal types and return types always thin. For now
4222 only enabled if -gnatd.1 set.
4223
42242014-06-11 Ed Schonberg <schonberg@adacore.com>
4225
4226 * sem_ch13.adb (Analyze_Stream_TSS_Definition): Apply legality
4227 rule for stream attributes of interface types (RM 13.13.2 (38/3)):
4228 subprogram must be a null procedure.
4229
40f4dbbe
AC
42302014-06-11 Hristian Kirtchev <kirtchev@adacore.com>
4231
4232 * sem_prag.adb (Analyze_Input_Item): Allow formal
4233 parameters to appear as input_items in an initialization_list
4234 of pragma Initializes. Encapsulation now applies to states and
4235 variables only (as it should). Add RM references to key errors.
4236 * sem_prag.adb (Set_Imported): Suppress errors
4237 about preceding Imports when the pragma does not come from source,
4238 which can happen through use of pragma Provide_Shift_Operators.
4239
42402014-06-11 Thomas Quinot <quinot@adacore.com>
4241
4242 * sem_ch3.adb: Minor reformatting.
4243 * einfo.ads (Full_View): Minor comment update.
4244
42452014-06-11 Robert Dewar <dewar@adacore.com>
4246
4247 * einfo.adb (Is_Independent): New flag.
4248 * einfo.ads (Is_Independent): New flag.
4249 (Has_Independent_Components): Clean up and fix comments.
4250 * sem_prag.adb (Fix_Error): Deal with changing argument
4251 [of] to entity [for].
4252 (Analyze_Pragma, case Independent): Set Is_Independent flag
4253 (Analyze_Pragma, case Independent_Components): Set Is_Independent flag
4254 in all components of specified record.
4255
42562014-06-11 Thomas Quinot <quinot@adacore.com>
4257
4258 * sem_ch12.adb (Analyze_Formal_Decimal_Fixed_Point_Type):
4259 Set proper Etype on bounds of dummy type created for analysis
4260 of the generic.
4261
42622014-06-11 Robert Dewar <dewar@adacore.com>
4263
4264 * debug.adb: Minor comment fix (add missing section of dot
4265 numeric flags).
4266
e9daba51
AC
42672014-06-11 Robert Dewar <dewar@adacore.com>
4268
4269 * gnat_rm.texi, switch-c.adb, sem_prag.adb, a-tgdico.ads, par-prag.adb,
4270 opt.ads, a-finali.ads, snames.ads-tmpl: Remove all traces of
4271 pragma/aspects Pure_05 Pure_12 Preelaborate_05.
4272 * errout.adb (Output_Messages): Avoid duplicate output for
4273 library level instance.
4274 * sem_elab.adb (Is_Call_Of_Generic_Formal): Moved to outer level
4275 (Check_Elab_Call): Add call to Is_Call_Of_Generic_Formal
4276 * exp_ch4.adb (Expand_N_Op_Expon): New interface for Exp_Modular.
4277 * s-expmod.ads, s-expmod.adb (Exp_Modular): Change interface to
4278 accomodate largest modulus value.
4279 * gnat_ugn.texi: Minor updates.
4280
42812014-06-11 Ed Schonberg <schonberg@adacore.com>
4282
4283 * sem_ch12.adb (Instantiate_Package_Body): Do not attempt to
4284 load body of generic package or its parent, if body is optional
4285 and the unit does not require a body.
4286
f852ffee
RD
42872014-06-11 Robert Dewar <dewar@adacore.com>
4288
4289 * gnat_rm.texi: Document System.Unsigned_Types.
4290 * impunit.adb: System.Unsigned_Types (s-unstyp.ads) is user accessible.
4291 * s-unstyp.ads: Update comments (this is now user available unit).
4292
9926efec
AC
42932014-06-11 Robert Dewar <dewar@adacore.com>
4294
4295 * make.adb, sem_res.adb: Minor reformatting.
4296
42972014-06-11 Thomas Quinot <quinot@adacore.com>
4298
4299 * a-astaco.ads, a-tags.ads, s-excdeb.ads, a-tgdico.ads, a-stmaco.ads,
4300 a-except-2005.ads, s-except.ads, a-taside.ads, a-dynpri.ads,
4301 a-chahan.ads, a-sytaco.ads, s-stalib.ads, a-strmap.ads: Change pragmas
4302 Preelaborate_05 to just Preelaborate in runtime units, and similarly
4303 change Pure_05 to just Pure.
4304
dda38714
AC
43052014-06-11 Ed Schonberg <schonberg@adacore.com>
4306
4307 * sem_ch6.adb (Analyze_Subprogram_Body_Contract): Do not attempt
4308 analysis if error has been posted on subprogram body.
4309
43102014-06-11 Ed Schonberg <schonberg@adacore.com>
4311
4312 * sem_ch13.adb (Analyze_Stream_TSS_Definition): Apply legality
4313 rule given in RM 13.1 (8/1) for operational attributes to stream
4314 attributes: the attribute must apply to a first subtype. Fixes
4315 missing errors in ACATS test bdd2004.
4316
43172014-06-11 Robert Dewar <dewar@adacore.com>
4318
4319 * exp_ch3.adb (Build_Record_Init_Proc): Don't build for variant
4320 record type if restriction No_Implicit_Conditionals is active.
4321 (Expand_N_Object_Declaration): Don't allow default initialization
4322 for variant record type if restriction No_Implicit_Condition is active.
4323 (Build_Variant_Record_Equality): Don't build for variant
4324 record type if restriction No_Implicit_Conditionals is active.
4325 * exp_ch4.adb (Expand_N_Op_Eq): Error if variant records with
4326 No_Implicit_Conditionals.
4327 * sem_aux.ads, sem_aux.adb (Has_Variant_Part): New function.
4328
43292014-06-11 Ramon Fernandez <fernandez@adacore.com>
4330
4331 * i-cstrin.ads: Update comments.
4332
43332014-06-11 Ed Schonberg <schonberg@adacore.com>
4334
4335 * sem_res.adb (Resolve_Selected_Component): Handle properly a
4336 selected component whose prefix is overloaded, when none of the
4337 interpretations matches the expected type.
4338
43392014-06-11 Bob Duff <duff@adacore.com>
4340
4341 * make.adb (Wait_For_Available_Slot): Give a more
4342 informative error message; if the ALI file is not found, print
4343 the full path of what it's looking for.
4344
810241a5
AC
43452014-06-11 Sergey Rybin <rybin@adacore.com frybin>
4346
4347 * gnat_ugn.texi, vms_data.ads: add description of gnatstub -W<par>
4348 option to specify the result file encoding.
4349
43502014-06-11 Robert Dewar <dewar@adacore.com>
4351
4352 * errout.ads, sem_ch12.adb: Minor reformatting.
4353 * debug.adb, erroutc.adb: Remove -gnatd.q debug switch.
4354 * lib-xref.adb: Minor reformatting.
4355 * restrict.adb: Minor code reorganization (put routines in
4356 alpha order).
4357
2c8d828a
AC
43582014-06-11 Yannick Moy <moy@adacore.com>
4359
4360 * einfo.ads: Minor typo in comment
4361
43622014-06-11 Ed Schonberg <schonberg@adacore.com>
4363
4364 * sinfo.ads, sinfo.adb: New attribute Uninitialized_Variable, for
4365 formal private types and private type extensions, to indicate
4366 variable in a generic unit whose uninitialized use suggest that
4367 actual type should be fully initialized.
4368 Needs_Initialized_Actual: removed, functionaity replaced by
4369 the above.
4370 * lib-xref.adb (Generate_Reference): Generate a reference for
4371 variables of a formal type when the unit is not the main unit,
4372 to enable appropriate warnings in an instance.
4373 * sem_ch12.adb (Check_Ininialized_Type): Improve warning on use
4374 of variable in a generic unit that suggests that actual type
4375 should be full initialized.
4376 * sem_warn.adb; (May_Need_Initialized_Actual): Make into procedure
4377 and do not emot warning, which now only appears in an instance.
4378
43792014-06-11 Eric Botcazou <ebotcazou@adacore.com>
4380
4381 * gnat_ugn.texi: Fix minor typo.
4382
43832014-06-11 Hristian Kirtchev <kirtchev@adacore.com>
4384
4385 * sem_ch3.adb Add with and use clause for Sem_Ch10.
4386 (Analyze_Declarations): Code reformatting. Analyze the contract
4387 of a subprogram body stub at the end of the declarative region.
4388 * sem_ch6.adb (Analyze_Subprogram_Body_Contract): Spec_Id is
4389 now a variable. Do not process the body if its contract is not
4390 available. Account for subprogram body stubs when extracting
4391 the corresponding spec.
4392 * sem_ch6.ads (Analyze_Subprogram_Contract): Update the comment
4393 on usage.
4394 * sem_ch10.ads, sem_ch10.adb (Analyze_Subprogram_Body_Stub_Contract):
4395 New routine.
4396 * sem_prag.adb (Analyze_Depends_In_Decl_Part):
4397 Account for subprogram body stubs when extracting the
4398 corresponding spec.
4399 (Analyze_Global_In_Decl_List):
4400 Account for subprogram body stubs when extracting the
4401 corresponding spec.
4402 (Analyze_Refined_Depends_In_Decl_Part):
4403 Use Find_Related_Subprogram_Or_Body to retrieve the declaration
4404 of the related body. Spec_Is now a variable. Account for
4405 subprogram body stubs when extracting the corresponding spec.
4406 (Analyze_Refined_Global_In_Decl_Part): Use
4407 Find_Related_Subprogram_Or_Body to retrieve the declaration
4408 of the related body. Spec_Is now a variable. Account for
4409 subprogram body stubs when extracting the corresponding spec.
4410 (Collect_Subprogram_Inputs_Output): Account for subprogram body
4411 stubs when extracting the corresponding spec.
4412
44132014-06-11 Vincent Celier <celier@adacore.com>
4414
4415 * gnatcmd.adb (Process_Link): Do not invoke gnatlink with
4416 -lgnarl or -lgnat.
4417
b785e0b8
AC
44182014-06-11 Robert Dewar <dewar@adacore.com>
4419
4420 * debug.adb: Add debug flag -gnatd.q.
4421 * erroutc.adb (Prescan_Message): Bomb if untagged warning with
4422 -gnatd.q set.
4423 * styleg.adb (Check_Xtra_Parens): Message should be a style
4424 message.
4425 * sem_aggr.adb, sem_ch3.adb, exp_ch9.adb, checks.adb, sem_prag.adb,
4426 par-endh.adb, eval_fat.adb, freeze.adb, sem_util.adb, sem_attr.adb,
4427 sem_elab.adb, sem_ch6.adb, sem_warn.adb, sem_cat.adb,
4428 sem_ch13.adb, lib-xref.adb: Add remaining warning tags.
4429
44302014-06-11 Ben Brosgol <brosgol@adacore.com>
4431
4432 * gnat_rm.texi: Revised chapter on Implementation Defined
4433 Characteristics.
4434
2e57f88b
AC
44352014-06-11 Geert Bosch <bosch@adacore.com>
4436
4437 * s-exctab.adb: avoid race conditions in exception registration.
4438
44392014-06-11 Robert Dewar <dewar@adacore.com>
4440
4441 * errout.adb (Warn_Insertion): New function.
4442 (Error_Msg): Use Warn_Insertion and Prescan_Message.
4443 (Error_Msg_Internal): Set Info field of error object.
4444 (Error_Msg_NEL): Use Prescan_Message.
4445 (Set_Msg_Text): Don't store info: at start of message.
4446 (Skip_Msg_Insertion_Warning): New name for Set_Msg_Insertion_Warning.
4447 (Skip_Msg_Insertion_Warning): Now just skips warning insertion.
4448 * errout.ads: Document new ?$? and >$> insertion sequences
4449 Document use of "(style)" and "info: "
4450 * erroutc.adb (dmsg): Print several missing fields
4451 (Get_Warning_Tag): Handle -gnatel case (?$?) (Output_Msg_Text):
4452 Deal with new tagging of info messages
4453 * erroutc.ads: Is_Info_Msg: New global (Error_Msg_Object):
4454 Add field Info (Prescan_Message): New procedure, this procedure
4455 replaces the old Test_Style_Warning_Serious_Unconditional_Msg
4456 * errutil.adb, exp_util.adb, par-ch7.adb, sem_ch13.adb, sem_ch7.adb,
4457 sem_elab.adb: Follow new rules for info message (info belongs
4458 only at the start of a message, and only in the first message,
4459 not in any of the continuations).
4460 * gnat_ugn.texi: Document full set of warning tags.
4461
c230ed0b
AC
44622014-06-11 Gary Dismukes <dismukes@adacore.com>
4463
4464 * sem_util.adb: Minor typo fix.
4465
44662014-06-11 Ed Schonberg <schonberg@adacore.com>
4467
4468 * sem_warn.adb (Check_References): Do not emit spurious warnings
4469 on uninitialzed variable of a formal private type if variable
4470 is not read.
4471
af0e1429 44722014-06-09 Jan Hubicka <hubicka@ucw.cz>
24d047a3 4473
af0e1429
JH
4474 * gcc-interface/utils.c (process_attributes) <ATTR_LINK_SECTION>: Use
4475 set_decl_section_name accessor.
24d047a3 4476
f6a7cffc
TS
44772014-05-22 Thomas Schwinge <thomas@codesourcery.com>
4478
4479 * gcc-interface/utils.c (DEF_FUNCTION_TYPE_0, DEF_FUNCTION_TYPE_6)
4480 (DEF_FUNCTION_TYPE_7, DEF_FUNCTION_TYPE_8)
4481 (DEF_FUNCTION_TYPE_VAR_5): Cosmetic fixes.
4482
0688dac8
RD
44832014-05-21 Robert Dewar <dewar@adacore.com>
4484
4485 * layout.adb: Minor reformatting.
4486 * sem_prag.adb (Analyze_Pragma, case Inspection_Point): Call
4487 dummy procedure ip.
4488
44892014-05-21 Robert Dewar <dewar@adacore.com>
4490
4491 * restrict.ads (Implementation_Restriction): Add entry for
4492 No_Fixed_IO.
4493 * rtsfind.ads: Add entries for Fixed_IO and Decimal_IO in
4494 Ada.[Wide_[Wide_]Text_IO.
4495 * s-rident.ads (Restriction_Id): Add entry for No_Fixed_IO.
4496 * sem_attr.adb (Analyze_Attribute): Disallow fixed point types
4497 for Img, Image, Value, Wide_Image, Wide_Value, Wide_Wide_Image,
4498 Wide_Wide_Value if restriction No_Fixed_IO is set.
4499 * sem_util.adb (Set_Entity_Checks): Check restriction No_Fixed_IO.
4500
ee6208f2
AC
45012014-05-21 Robert Dewar <dewar@adacore.com>
4502
4503 * gnatcmd.adb: Minor error msg changes (no upper case letter
4504 at start).
4505 * sem_ch12.adb, sem_ch5.adb, sem_res.adb, sem_util.adb: Minor
4506 reformatting.
4507
45082014-05-21 Robert Dewar <dewar@adacore.com>
4509
4510 * debug.adb: Debug flag -gnatd.G inhibits static elab tracing
4511 via generic formals.
4512 * sem_elab.adb (Is_Call_Of_Generic_Formal): Return False if
4513 -gnatd.G is set.
4514
45152014-05-21 Thomas Quinot <quinot@adacore.com>
4516
4517 * exp_pakd.adb (Revert_Storage_Order): Renamed from Byte_Swap to
4518 more accurately describe that this subprogram needs to come into
4519 play also in cases where no byte swapping is involved, because
4520 it also takes care of some required shifts (left-justification
4521 of values).
4522
45232014-05-21 Thomas Quinot <quinot@adacore.com>
4524
4525 * freeze.adb (Check_Component_Storage_Order): Indicate whether
4526 a Scalar_Storage_Order attribute definition is present for the
4527 component's type.
4528 (Freeze_Record_Type): Suppress junk warnings
4529 about purportedly junk Bit_Order / Scalar_Storage_Order attribute
4530 definitions.
4531
45322014-05-21 Robert Dewar <dewar@adacore.com>
4533
4534 * sem_ch8.adb (Analyze_Subprogram_Renaming): Put back call
4535 to Kill_Elaboration_Checks.
4536
45372014-05-21 Gary Dismukes <dismukes@adacore.com>
4538
4539 * layout.adb (Assoc_Add): Suppress the optimization of the (E
4540 - C1) + C2 case, when the expression type is unsigned and C1 <
4541 C2, to avoid creating a negative literal when folding.
4542
ea26c8e4
HK
45432014-05-21 Hristian Kirtchev <kirtchev@adacore.com>
4544
4545 * freeze.adb (Freeze_Record_Type): Update the use of
4546 Is_SPARK_Volatile.
4547 * sem_ch3.adb (Analyze_Object_Contract): Update the use of
4548 Is_SPARK_Volatile.
4549 (Process_Discriminants): Update the use of Is_SPARK_Volatile.
4550 * sem_ch5.adb (Analyze_Iterator_Specification): Update the use
4551 of Is_SPARK_Volatile.
4552 (Analyze_Loop_Parameter_Specification):
4553 Update the use of Is_SPARK_Volatile.
4554 * sem_ch6.adb (Process_Formals): Catch an illegal use of an IN
4555 formal parameter when its type is volatile.
4556 * sem_prag.adb (Analyze_Global_Item): Update the use of
4557 Is_SPARK_Volatile.
4558 * sem_res.adb (Resolve_Entity_Name): Correct the guard which
4559 determines whether an entity is a volatile source SPARK object.
4560 * sem_util.adb (Has_Enabled_Property): Accout for external
4561 properties being set on objects other than abstract states
4562 and variables. An example would be a formal parameter.
4563 (Is_SPARK_Volatile): New routine.
4564 (Is_SPARK_Volatile_Object):
4565 Remove the entity-specific tests. Call routine Is_SPARK_Volatile
4566 when checking entities and/or types.
4567 * sem_util.ads (Is_SPARK_Volatile): New routine.
4568
65529f74
AC
45692014-05-21 Robert Dewar <dewar@adacore.com>
4570
4571 * sem_warn.adb: Minor fix to warning messages (use ?? instead
4572 of ?).
4573
45742014-05-21 Vincent Celier <celier@adacore.com>
4575
4576 * gnatcmd.adb (GNATCmd): For platforms other than VMS, recognize
4577 switch --version and --help.
4578
45792014-05-21 Robert Dewar <dewar@adacore.com>
4580
4581 * sem_elab.adb (Is_Call_Of_Generic_Formal): New function.
4582
45832014-05-21 Ed Schonberg <schonberg@adacore.com>
4584
4585 * sem_ch5.adb (Analyze_Iterator_Specification): Set type of
4586 iterator variable when the domain of iteration is a formal
4587 container and this is an element iterator.
4588
45892014-05-21 Bob Duff <duff@adacore.com>
4590
4591 * sem_ch12.adb: Minor reformatting.
4592
d3289ba2
RD
45932014-05-21 Robert Dewar <dewar@adacore.com>
4594
4595 * sinfo.ads, sem_ch12.adb, sem_warn.adb: Minor reformatting.
4596
c8a3028c
AC
45972014-05-21 Robert Dewar <dewar@adacore.com>
4598
4599 * sem_elab.adb: Minor reformatting.
4600 * s-taprop.ads: Minor comment fix.
4601 * sem_ch8.adb (Analyze_Subprogram_Renaming): Remove call to
4602 Kill_Elaboration_Checks.
4603 * errout.adb, erroutc.adb: Minor reformatting.
4604
46052014-05-21 Thomas Quinot <quinot@adacore.com>
4606
4607 * exp_pakd.adb (Byte_Swap): Handle the case of a sub-byte
4608 component. No byte swapping occurs, but this procedure also takes
4609 care of appropriately justifying the argument.
4610
46112014-05-21 Hristian Kirtchev <kirtchev@adacore.com>
4612
4613 * sem_ch6.adb: sem_ch6.adb (Analyze_Aspects_On_Body_Or_Stub):
4614 New routine.
4615 (Analyze_Subprogram_Body_Helper): Move the
4616 analysis of aspect specifications and the processing of the
4617 subprogram body contract after inlining has taken place.
4618 (Diagnose_Misplaced_Aspect_Specifications): Removed.
4619
46202014-05-21 Javier Miranda <miranda@adacore.com>
4621
4622 * sem_ch3.adb (Build_Derived_Record_Type): Revert previous change.
4623
46242014-05-21 Robert Dewar <dewar@adacore.com>
4625
4626 * sem_eval.ads, sem_eval.adb (Why_Not_Static): Messages are not
4627 continuations any more.
4628
46292014-05-21 Ed Schonberg <schonberg@adacore.com>
4630
4631 * sinfo.ads, sinfo.adb: New flag Needs_Initialized_Actual,
4632 present in formal_Private_Definitions and on private extension
4633 declarations of a formal derived type. Set when the use of the
4634 formal type in a generic suggests that the actual should be a
4635 fully initialized type.
4636 * sem_warn.adb (May_Need_Initialized_Actual): new subprogram
4637 to indicate that an entity of a generic type has default
4638 initialization, and that the corresponing actual type in any
4639 subsequent instantiation should be fully initialized.
4640 * sem_ch12.adb (Check_Initialized_Type): new subprogram,
4641 to emit a warning if the actual for a generic type on which
4642 Needs_Initialized_Actual is set is not a fully initialized type.
4643
23e28b42
AC
46442014-05-21 Robert Dewar <dewar@adacore.com>
4645
4646 * sem_elab.adb, prj-dect.adb: Minor reformatting.
4647
46482014-05-21 Robert Dewar <dewar@adacore.com>
4649
4650 * erroutc.ads: Minor comment addition.
4651
46522014-05-21 Robert Dewar <dewar@adacore.com>
4653
4654 * errout.ads: Add documentation for use of >*> tag.
4655 * restrict.adb: Make sure we use >*> tag for restriction warnings.
4656
46572014-05-21 Gary Dismukes <dismukes@adacore.com>
4658
4659 * debug.adb: Add case of illegal overriding_indicator for a
4660 protected subprogram body to description of -gnatd.E switch.
4661 * sem_ch6.adb (Verify_Overriding_Indicator): Issue error message
4662 for cases of giving overriding_indicators on protected subprogram
4663 bodies, but change this to a warning if -gnatd.E is enabled. No
4664 longer give a style warning about missing indicators on protected
4665 subprogram bodies.
4666
b7b92f15
AC
46672014-05-21 Robert Dewar <dewar@adacore.com>
4668
4669 * prj.ads, sem_ch12.adb, prj.adb, exp_pakd.adb,
4670 sem_elab.ads: Minor reformatting.
4671 * erroutc.adb, erroutc.ads (Warning_Specifically_Suppressed): Make Tag
4672 parameter optional.
4673
46742014-05-21 Pascal Obry <obry@adacore.com>
4675
4676 * prj-dect.adb: Allow package Install in aggregate project.
4677
0df5ae93
AC
46782014-05-21 Robert Dewar <dewar@adacore.com>
4679
4680 * sem_ch13.adb (Analyze_Aspect_Specifications):
4681 Insert_Delayed_Pragma is now used for the case of Attach_Handler.
4682 * sem_prag.adb: Minor comment improvements.
4683
46842014-05-21 Ed Schonberg <schonberg@adacore.com>
4685
4686 * sem_ch12.adb (Install_Body): When checking whether freezing of
4687 instantiation must be delayed, verify that the common enclosing
4688 subprogram to generic and instance is in fact an overloadable
4689 entity.
4690
46912014-05-21 Vincent Celier <celier@adacore.com>
4692
4693 * makeutl.adb (Mains.Complete_Mains.Do_Complete): Look for all
4694 mains with the same name and fail if there is more than one.
4695 * prj.ads, prj.adb (Find_All_Sources): New function
4696
9db78a42
RD
46972014-05-21 Robert Dewar <dewar@adacore.com>
4698
4699 * sem_ch13.adb: Minor reformatting.
4700 * lib-xref-spark_specific.adb, sem_util.adb: Minor reformatting.
4701 * sem_prag.adb: Minor error message improvement.
4702
63b5225b
YM
47032014-05-21 Yannick Moy <moy@adacore.com>
4704
4705 * lib-xref-spark_specific.adb, lib-xref.ads, lib-xref.adb
4706 (Enclosing_Subprogram_Or_Package): Only return a library-level
4707 package.
4708
a8a89b74
JM
47092014-05-21 Javier Miranda <miranda@adacore.com>
4710
4711 * sem_ch3.adb (Build_Derived_Record_Type): Initialize Parent_Base
4712 to the full view of the parent type when processing a derived type
4713 which is the full view of a private type not defined in a generic
4714 unit which is derived from a private type with discriminants
4715 whose full view is a non-tagged record type.
4716
601bb6b3
AC
47172014-05-21 Javier Miranda <miranda@adacore.com>
4718
4719 * exp_ch4.adb (Expand_Allocator_Expression.Apply_Accessibility_Check):
4720 Complete previous patch.
4721
47222014-05-21 Thomas Quinot <quinot@adacore.com>
4723
95bc61b2 4724 PR ada/9535
601bb6b3
AC
4725 * g-socket.adb (Read and Write for Datagram_Socket_Stream_Type):
4726 Provide a behaviour more consistent with underlying datagram
4727 socket: do not attempt to loop over Send_Socket/Receive_Socket
4728 iterating along the buffer.
4729
47302014-05-21 Hristian Kirtchev <kirtchev@adacore.com>
4731
4732 * freeze.adb (Freeze_Record_Type): Ensure that a discriminated
4733 or a tagged type is not labelled as volatile. Ensure that a
4734 non-volatile type has no volatile components.
4735 * sem_ch3.adb (Analyze_Object_Contract): Add local constant
4736 Obj_Typ. Code reformatting. Ensure that a discriminated or
4737 tagged object is not labelled as volatile.
4738 * sem_prag.adb (Process_Atomic_Shared_Volatile): Ensure that
4739 pragma Volatile applies to a full type declaration or an object
4740 declaration when SPARK mode is on.
4741
47422014-05-21 Sergey Rybin <rybin@adacore.com frybin>
4743
4744 * gnat_ugn.texi: For ASIS tools, reword the paragraph about
4745 providing options needed for compiling the argument source for
4746 the situation when a project file can be used as a tool parameter.
4747
47482014-05-21 Gary Dismukes <dismukes@adacore.com>
4749
4750 * gnat_rm.texi: Minor typo fix.
4751
da574a86
AC
47522014-05-21 Robert Dewar <dewar@adacore.com>
4753
4754 * stand.adb (Tree_Read): Read missing entities.
4755 (Tree_Write): Write missing entities.
4756
47572014-05-21 Ben Brosgol <brosgol@adacore.com>
4758
4759 * gnat_ugn.texi: Wordsmithing edits to Coupling Metrics Control
4760 section in gnatmetric chapter.
4761
47622014-05-21 Robert Dewar <dewar@adacore.com>
4763
4764 * exp_ch6.adb (Expand_Actuals): Spec moved here, since not used
4765 outside Exp_Ch6 (Expand_Actuals): Deal with proper insertion of
4766 post-call copy write back (see detailed comment in code).
4767 * exp_ch6.ads (Expand_Actuals): Moved to body, not used outside
4768 Exp_Ch6.
4769 * tbuild.ads: Minor reformatting.
4770
47712014-05-21 Robert Dewar <dewar@adacore.com>
4772
4773 * stand.ads: Add warning about adding new entities and
4774 Tree_Read/Tree_Write.
4775
47762014-05-21 Robert Dewar <dewar@adacore.com>
4777
4778 * sem_util.adb (Set_Entity_With_Checks): Don't complain about
4779 references to restricted entities within the units in which they
4780 are declared.
4781
47822014-05-21 Robert Dewar <dewar@adacore.com>
4783
4784 * gnat1drv.adb (Check_Bad_Body): Use Source_File_Is_Body to
4785 simplify the needed test, and also deal with failure to catch
4786 situations with non-standard names.
4787 * sinput-l.ads, sinput-l.adb (Source_File_Is_No_Body): New function
4788 (Source_File_Is_Subunit): Removed, no longer used.
4789
47902014-05-21 Javier Miranda <miranda@adacore.com>
4791
4792 * exp_ch4.adb
4793 (Expand_Allocator_Expression.Apply_Accessibility_Check): for a
4794 renaming of an access to interface object there is no need to
4795 generate extra code to reference the tag.
4796
77a40ec1
AC
47972014-05-21 Robert Dewar <dewar@adacore.com>
4798
4799 * errout.adb, erroutc.adb, erroutc.ads: Allow warning tag in pragma
4800 Warnings (Off, string).
4801
48022014-05-21 Robert Dewar <dewar@adacore.com>
4803
4804 * osint.adb: Fix three error messages to say invalid instead
4805 of erroneous.
4806 * par-ch4.adb, exp_aggr.adb, sem_attr.adb, sem_aux.adb, sem_ch3.adb,
4807 sem_ch5.adb, sem_ch6.adb, sem_ch7.adb, sem_dim.adb, sem_res.adb,
4808 sem_util.adb, sem_util.ads: Fix incorrect use of erroneous in comments.
4809
48102014-05-21 Ed Schonberg <schonberg@adacore.com>
4811
4812 * freeze.adb, sem_ch13.adb, sem_ch13.ads, sem_ch9.adb,
4813 sem_ch9.ads: Move discriminant manipulation routines for analysis of
4814 aspect specifications from sem_ch9 to sem_ch13, where they belong.
4815
17cf9038
AC
48162014-05-21 Robert Dewar <dewar@adacore.com>
4817
4818 * gnat_ugn.texi: Clearly document -gnatw.g (GNAT warnings).
4819 Clearly document -gnatyg (GNAT style switches).
4820 * usage.adb: Add line line for -gnatw.g (GNAT warnings) More
4821 detail for line for -gnatyg (GNAT style switches) -gnatw.d/D is
4822 available for VMS after all.
4823 * warnsw.adb: Reorganize to eliminate duplicated code
4824 (Restore_Warnings): Add a couple of missing entries
4825 (Save_Warnings): Add a couple of missing entries.
4826 * warnsw.ads: Add missing entries to Warning_Record (not clear
4827 what the impact is).
4828
48292014-05-21 Robert Dewar <dewar@adacore.com>
4830
4831 * errout.adb (Set_Msg_Insertion_Warning): Handle ?*? (restriction
4832 warning) case.
4833 * errout.ads: Document ?*? (restriction warning) insertion.
4834 * erroutc.adb (Get_Warning_Tag): Deal with ?*? (restriction
4835 warning) case.
4836 * erroutc.ads: Document use of * for restriction warning tag.
4837 * restrict.adb (Restriction_Msg): Tag with ?*? instead of ??.
4838
48392014-05-21 Ed Schonberg <schonberg@adacore.com>
4840
4841 * sem_ch9.adb (Push_Scope_And_Install_Discriminants): Do not
4842 make discriminants immediately visible when analyzing an aspect
4843 of a subtype declaration.
4844 (Uninstall_Discriminants): Do not apply to the entity in a
4845 subtype declaration.
4846
31382249
AC
48472014-05-21 Ed Schonberg <schonberg@adacore.com>
4848
4849 * sem_util.adb: Code clean up.
4850
48512014-05-21 Eric Botcazou <ebotcazou@adacore.com>
4852
4853 * gnat_ugn.texi: Document -Werror.
4854
6413dd81
AC
48552014-05-21 Bob Duff <duff@adacore.com>
4856
4857 * sem_util.adb (Is_Dependent_Component_Of_Mutable_Object):
4858 This was returning False if the Object is a constant view. Fix
4859 it to return True in that case, because it might be a view of
4860 a variable.
4861 (Has_Discriminant_Dependent_Constraint): Fix latent
4862 bug; this function was crashing when passed a discriminant.
4863
48642014-05-21 Robert Dewar <dewar@adacore.com>
4865
4866 * gnat_ugn.texi: Remove misplaced section that is now obsolete.
4867 * s-arit64.adb: Minor code reorganization.
4868 * sem_prag.adb: Minor comment fix (remove erroneous use of the
4869 term erroneous).
4870
48712014-05-21 Robert Dewar <dewar@adacore.com>
4872
4873 * g-table.adb, g-dyntab.adb (Reallocate): Fix possible overflow in
4874 computing new table size.
4875
2735b82d
AC
48762014-05-21 Robert Dewar <dewar@adacore.com>
4877
4878 * einfo.ads: Minor reformatting.
4879 * ceinfo.adb: Deal with slight format change of einfo.ads.
4880
48812014-05-21 Ed Schonberg <schonberg@adacore.com>
4882
4883 * sem_prag.adb (Analyze_Part_Of): Further work on the proper
4884 implementation of the SPARK 2014 rule concerning private child
4885 units (LRM 7.2.6).
4886
48872014-05-21 Vincent Celier <celier@adacore.com>
4888
4889 * makeusg.adb: Add switch -d to usage.
4890
48912014-05-21 Ed Schonberg <schonberg@adacore.com>
4892
4893 * sem_util.adb (Find_Actual): If an actual that is the prefix
4894 of an enclosing prefixed call has been rewritten, use Nkind
4895 and Sloc to identify the corresponding formal, when handling
4896 deferred references.
4897
48982014-05-21 Robert Dewar <dewar@adacore.com>
4899
4900 * debug.adb: Document -gnatd.z switch.
4901 * sem_eval.adb (Why_Non_Static): Test -gnatd.z switch.
4902
149604e4
RD
49032014-05-21 Robert Dewar <dewar@adacore.com>
4904
4905 * einfo.ads (Can_Never_Be_Null): Minor comment update.
4906 * sem_prag.adb (Check_Arg_Is_Task_Dispatching_Policy): Minor
4907 error message change.
4908 * s-arit64.adb ("abs"): New function. Use expression functions
4909 for the simple conversions and arithmetic.
4910
40e63ada
EB
49112014-05-18 Eric Botcazou <ebotcazou@adacore.com>
4912
4913 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Rework comment and
4914 set function_start_locus.
4915
dd25fe0a
EB
49162014-05-18 Eric Botcazou <ebotcazou@adacore.com>
4917
4918 * utils.c (gnat_write_global_declarations): Adjust the flags put on
4919 dummy_global.
4920
4aecc2f8
EB
49212014-05-18 Eric Botcazou <ebotcazou@adacore.com>
4922
4923 * gcc-interface/decl.c (change_qualified_type): New static function.
4924 (gnat_to_gnu_entity): Use it throughout to add qualifiers on types.
4925 <E_Array_Type>: Set TYPE_VOLATILE on the array type directly.
4926 <E_Array_Subtype>: Likewise.
4927 Do not set flags on an UNCONSTRAINED_ARRAY_TYPE directly.
4928 (gnat_to_gnu_component_type): Likewise.
4929 (gnat_to_gnu_param): Likewise.
4930
08b8b90c
EB
49312014-05-18 Eric Botcazou <ebotcazou@adacore.com>
4932
4933 * fe.h (Set_Present_Expr): Move around.
4934 (End_Location): New macro.
4935 * gcc-interface/trans.c (Case_Statement_to_gnu): Use End_Location.
4936
43a4dd82
EB
49372014-05-18 Eric Botcazou <ebotcazou@adacore.com>
4938
4939 * gcc-interface/decl.c (gnat_to_gnu_entity): Use Underlying_Type in
4940 lieu of more verbose construct.
4941 * gcc-interface/trans.c (Call_to_gnu): Likewise.
4942 (gnat_to_gnu): Likewise. Remove obsolete code.
4943
f9d7d7c1
EB
49442014-05-18 Eric Botcazou <ebotcazou@adacore.com>
4945
4946 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Subtype>: Do not
4947 consider that regular packed arrays can never be superflat.
4948
766090c2
TS
49492014-05-17 Trevor Saunders <tsaunders@mozilla.com>
4950
4951 * gcc-interface/ada-tree.h: Remove usage of variable_size gty
4952 annotation.
4953 * gcc-interface/decl.c (annotate_value): Adjust.
4954 * gcc-interface/trans.c (Attribute_to_gnu): Likewise.
4955 (push_range_check_info): Likewise.
4956 (Loop_Statement_to_gnu): Likewise.
4957 (Subprogram_Body_to_gnu): Likewise.
4958 (Compilation_Unit_to_gnu): Likewise.
4959 (start_stmt_group): Likewise.
4960 * gcc-interface/utils.c (init_gnat_utils): Likewise.
4961 (gnat_pushlevel): Likewise.
4962 (maybe_pad_type): Likewise.
4963
0263d678
EB
49642014-05-14 Eric Botcazou <ebotcazou@adacore.com>
4965
4966 * seh_init.c: Fix copyright year.
4967
d40aeed8
BE
49682014-05-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
4969
d40aeed8
BE
4970 * seh_init.c (__gnat_map_SEH): Compile also when __CYGWIN__ and __SEH__
4971 are defined. Move include windows.h before system.h.
4972 * s-oscons-tmplt.c (DTR_CONTROL_ENABLE, RTS_CONTROL_ENABLE): Compile
4973 also when __CYGWIN__ is defined. Include windef.h before winbase.h.
4974
8b9aec86
RS
49752014-05-14 Richard Sandiford <r.sandiford@uk.ibm.com>
4976
0263d678
EB
4977 * gcc-interface/decl.c (gnat_to_gnu_entity): Convert integer_one_node
4978 to the appropriate type.
8b9aec86
RS
4979 * gcc-interface/trans.c (gnat_to_gnu): Likewise.
4980 (pos_to_constructor): Likewise.
4981
f0035dca
EB
49822014-05-13 Eric Botcazou <ebotcazou@adacore.com>
4983
4984 * gcc-interface/decl.c (annotate_value): Fix thinko in latest change.
4985
1d60af08
KZ
49862014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
4987 Mike Stump <mikestump@comcast.net>
4988 Richard Sandiford <rdsandiford@googlemail.com>
4989
4990 * gcc-interface/cuintp.c (UI_From_gnu): Use wide-int interfaces.
4991 * gcc-interface/decl.c (gnat_to_gnu_entity): Use TYPE_SIGN.
4992 (annotate_value): Use wide-int interfaces.
4993 * gcc-interface/utils.c (get_nonnull_operand): Use tree_fits_uhwi_p.
4994
bc76a4d5
RH
49952014-04-28 Richard Henderson <rth@redhat.com>
4996
4997 * gcc-interface/Makefile.in: Support aarch64-linux.
4998
93582885
EB
49992014-04-28 Eric Botcazou <ebotcazou@adacore.com>
5000
5001 * exp_dbug.ads (Get_External_Name): Add 'False' default to Has_Suffix,
5002 add 'Suffix' parameter and adjust comment.
5003 (Get_External_Name_With_Suffix): Delete.
5004 * exp_dbug.adb (Get_External_Name_With_Suffix): Merge into...
5005 (Get_External_Name): ...here. Add 'False' default to Has_Suffix, add
5006 'Suffix' parameter.
5007 (Get_Encoded_Name): Remove 2nd argument in call to Get_External_Name.
5008 Call Get_External_Name instead of Get_External_Name_With_Suffix.
5009 (Get_Secondary_DT_External_Name): Likewise.
5010 * exp_cg.adb (Write_Call_Info): Likewise.
5011 * exp_disp.adb (Export_DT): Likewise.
5012 (Import_DT): Likewise.
5013 * comperr.ads (Compiler_Abort): Remove Code parameter and add From_GCC
5014 parameter with False default.
5015 * comperr.adb (Compiler_Abort): Likewise. Adjust accordingly.
5016 * types.h (Fat_Pointer): Rename into...
5017 (String_Pointer): ...this. Add comment on interfacing rules.
5018 * fe.h (Compiler_Abort): Adjust for above renaming.
5019 (Error_Msg_N): Likewise.
5020 (Error_Msg_NE): Likewise.
5021 (Get_External_Name): Likewise. Add third parameter.
5022 (Get_External_Name_With_Suffix): Delete.
5023 * gcc-interface/decl.c (STDCALL_PREFIX): Define.
5024 (create_concat_name): Adjust call to Get_External_Name, remove call to
5025 Get_External_Name_With_Suffix, use STDCALL_PREFIX, adjust for renaming.
5026 * gcc-interface/trans.c (post_error): Likewise.
5027 (post_error_ne): Likewise.
5028 * gcc-interface/misc.c (internal_error_function): Likewise.
5029
22869a37
RB
50302014-04-28 Richard Biener <rguenther@suse.de>
5031
5032 PR middle-end/60092
5033 * gcc-interface/utils.c: Define flag_isoc11.
5034
9e3f7c4b
EB
50352014-04-26 Eric Botcazou <ebotcazou@adacore.com>
5036
5037 * gnatvsn.ads (Library_Version): Bump to 4.10.
5038
8f78ecdb
EB
50392014-04-23 Eric Botcazou <ebotcazou@adacore.com>
5040
5041 Revert
5042 2014-04-22 Richard Henderson <rth@redhat.com>
5043
5044 * gcc-interface/Makefile.in: Support aarch64-linux.
5045
5046 2014-04-22 Eric Botcazou <ebotcazou@adacore.com>
5047
5048 * fe.h (Compiler_Abort): Replace Fat_Pointer with String_Pointer.
5049 (Error_Msg_N): Likewise.
5050 (Error_Msg_NE): Likewise.
5051 (Get_External_Name_With_Suffix): Likewise.
5052 * types.h (Fat_Pointer): Delete.
5053 (String_Pointer): New type.
5054 (DECLARE_STRING_POINTER): New macro.
5055 * gcc-interface/decl.c (create_concat_name): Adjust.
5056 * gcc-interface/trans.c (post_error): Likewise.
5057 (post_error_ne): Likewise.
5058 * gcc-interface/misc.c (internal_error_function): Likewise.
5059
19a0be3d
RH
50602014-04-22 Richard Henderson <rth@redhat.com>
5061
4a980bdc
RH
5062 * gcc-interface/Makefile.in: Support aarch64-linux.
5063
19a0be3d
RH
5064 * init.c [__linux__] (HAVE_GNAT_ALTERNATE_STACK): New define.
5065 (__gnat_alternate_stack): Enable for all linux except ia64.
5066
b6918051
EB
50672014-04-22 Eric Botcazou <ebotcazou@adacore.com>
5068
5069 * fe.h (Compiler_Abort): Replace Fat_Pointer with String_Pointer.
5070 (Error_Msg_N): Likewise.
5071 (Error_Msg_NE): Likewise.
5072 (Get_External_Name_With_Suffix): Likewise.
5073 * types.h (Fat_Pointer): Delete.
5074 (String_Pointer): New type.
5075 (DECLARE_STRING_POINTER): New macro.
5076 * gcc-interface/decl.c (create_concat_name): Adjust.
5077 * gcc-interface/trans.c (post_error): Likewise.
5078 (post_error_ne): Likewise.
5079 * gcc-interface/misc.c (internal_error_function): Likewise.
5080
e297e2ea
EB
50812014-04-15 Eric Botcazou <ebotcazou@adacore.com>
5082 Pierre-Marie de Rodat <derodat@adacore.com>
5083
5084 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create a mere
5085 scalar constant instead of a reference for renaming of scalar literal.
5086 Do not create a new object for constant renaming except for a function
5087 call. Make sure a VAR_DECL is created for the renaming pointer.
5088 * gcc-interface/trans.c (constant_decl_with_initializer_p): New.
5089 (fold_constant_decl_in_expr): New function.
5090 (Identifier_to_gnu): Use constant_decl_with_initializer_p.
5091 For a constant renaming, try to fold a constant DECL in the result.
5092 (lvalue_required_p) <N_Object_Renaming_Declaration>: Always return 1.
5093 (Identifier_to_gnu): Reference the renamed object of constant renaming
5094 pointers directly.
e297e2ea
EB
5095 * gcc-interface/utils.c (invalidate_global_renaming_pointers): Do not
5096 invalidate constant renaming pointers.
5097
e63b36bd
EB
50982014-04-15 Eric Botcazou <ebotcazou@adacore.com>
5099
5100 * gcc-interface/utils.c (type_for_vector_element_p): New predicate.
5101 (build_vector_type_for_size): New function.
5102 (build_vector_type_for_array): Likewise.
5103 (unchecked_convert): Build an intermediate vector type to convert
5104 from a generic array type to a vector type.
5105 (handle_vector_size_attribute): Reimplement.
5106 (handle_vector_type_attribute): Likewise.
5107
bd6a077a
EB
51082014-04-15 Eric Botcazou <ebotcazou@adacore.com>
5109
5110 * gcc-interface/decl.c (prepend_one_attribute_pragma): Call
5111 Is_OK_Static_Expression in lieu of Is_Static_Expression to
5112 detect valid arguments.
5113
718c4601
EB
51142014-04-15 Eric Botcazou <ebotcazou@adacore.com>
5115
5116 * gcc-interface/trans.c (gnat_gimplify_stmt): Propagate loop hints.
5117
9dba4b55
PC
51182014-04-14 Paolo Carlini <paolo.carlini@oracle.com>
5119
d6d215ac
EB
5120 * gcc-interface/decl.c (gnat_to_gnu_entity): Use TYPE_IDENTIFIER.
5121 (components_to_record): Likewise.
5122 * gcc-interface/utils.c (make_aligning_type): Likewise.
5123 (maybe_pad_type): Likewise.
5124 (finish_record_type): Likewise.
5125 (rest_of_record_type_compilation): Likewise.
9dba4b55 5126
3418f5e9
EB
51272014-04-14 Eric Botcazou <ebotcazou@adacore.com>
5128
5129 * snames.ads-tmpl (Name_Ivdep): New pragma-related name.
5130 * sem_prag.adb (Analyze_Pragma) <Pragma_Loop_Optimize>: Add support
5131 for Ivdep hint.
5132 * gnat_rm.texi (Implementation Defined Pragmas): Document new Ivdep
5133 hint for Loop_Optimize.
5134 * gnat_ugn.texi (Vectorization of loops): Mention new Ivdep hint.
5135 * gcc-interface/trans.c (Pragma_to_gnu) <Pragma_Loop_Optimize>: Deal
5136 with new Ivdep hint.
5137 * gcc-interface/ada-tree.h (LOOP_STMT_IVDEP): New macro.
5138 * gcc-interface/trans.c (Pragma_to_gnu) <Pragma_Loop_Optimize>: Deal
5139 with new Ivdep hint.
d6d215ac 5140 (gnat_gimplify_stmt) <LOOP_STMT>: Propagate loop hints.
3418f5e9 5141
4116e7d0
EB
51422014-04-14 Eric Botcazou <ebotcazou@adacore.com>
5143 Robert Dewar <dewar@adacore.com>
5144
5145 * opt.ads (Suppress_Back_Annotation): Remove as unused.
5146 * fe.h (Back_Annotate_Rep_Info): Likewise.
5147 (Global_Discard_Names): Likewise.
5148 (List_Representation_Info): Declare.
5149 * types.h (Uint_Minus_1): Likewise.
5150 * repinfo.ads: Document back-annotation change.
5151 * gcc-interface/gigi.h (init_gnat_decl): Declare.
5152 (destroy_gnat_decl): Likewise.
5153 * gcc-interface/decl.c (annotate_value): Do not create the cache of
5154 annotated values here but...
5155 <CALL_EXPR>: Only inline the call if -gnatR3 is specified or we are
5156 in ASIS mode.
5157 (init_gnat_decl): ...here instead. New function.
5158 (destroy_gnat_decl): Likewise.
5159 * gcc-interface/trans.c (gigi): Call {init|destroy}_gnat_decl.
5160 * gcc-interface/utils.c (init_gnat_utils): Minor reformatting.
5161
cb27986c
EB
51622014-04-14 Eric Botcazou <ebotcazou@adacore.com>
5163
5164 * gcc-interface/decl.c (create_field_decl_from): Finalize non-constant
5165 offset for the field, if any.
5166
ebe0249e 51672014-04-09 Eric Botcazou <ebotcazou@adacore.com>
d6d215ac 5168 Svante Signell <svante.signell@gmail.com>
ebe0249e
EB
5169
5170 PR ada/54040
5171 PR ada/59346
5172 * s-osinte-x32.adb: New file.
5173 * s-linux.ads (Time): New section.
5174 * s-linux-alpha.ads (Time): Likewise.
5175 * s-linux-android.ads (Time: Likewise.
5176 * s-linux-hppa.ads (Time): Likewise.
5177 * s-linux-mipsel.ads (Time): Likewise.
5178 * s-linux-sparc.ads (Time): Likewise.
5179 * s-linux-x32.ads (Time): Likewise.
5180 * s-osprim-x32.ads (timespec): Adjust.
7056f58f
EB
5181 (Clock): Likewise.
5182 (To_Timespec): Likewise.
ebe0249e
EB
5183 * s-osinte-linux.ads (Time): Define local subtypes for those defined
5184 in System.Linux.
5185 * s-taprop-linux.adb (Monotonic_Clock): Do not define timeval.
5186 * s-osinte-hpux.ads (timespec): Revert POSIX breakage.
5187 * s-osinte-kfreebsd-gnu.ads (timespec): Likewise.
5188 * s-osinte-solaris-posix.ads (timespec): Likewise.
5189 * s-osinte-posix.adb (To_Timespec): Likewise.
5190 * gcc-interface/Makefile.in (x32/Linux): Use s-osinte-x32.adb.
5191
f3d6c7cb
EB
51922014-04-08 Eric Botcazou <ebotcazou@adacore.com>
5193
5194 PR ada/60411
5195 * gcc-interface/Makefile.in (arm% linux-android): Switch to EHABI.
5196 * s-linux-android.ads: New file.
5197 * s-intman-android.adb: Likewise.
303a0cea 5198 * s-osinte-android.ads: Adjust.
55f31857 5199 * sigtramp-armdroid.c: Likewise.
edb2b1b1 5200 * sigtramp.h: Add Android support.
f3d6c7cb 5201
aabc3aff
EB
52022014-04-07 Eric Botcazou <ebotcazou@adacore.com>
5203
5204 * gcc-interface/Makefile.in (alpha-vms): Add missing line.
5205
368348ab
EB
52062014-03-30 Eric Botcazou <ebotcazou@adacore.com>
5207
5208 PR ada/60703
5209 * system-linux-alpha.ads: Adjust for Ada 2005.
5210 * system-linux-mips.ads: Likewise.
5211 * system-linux-mips64el.ads: Likewise.
5212 * system-linux-mipsel.ads: Likewise.
5213 * system-linux-s390.ads: Likewise.
5214 * system-linux-s390x.ads: Likewise.
5215 * system-linux-sparc.ads: Likewise.
5216 * system-linux-sparcv9.ads: Likewise.
5217 * system-rtems.ads: Likewise.
5218 * system-vxworks-arm.ads: Likewise.
5219
ab684dae
AS
52202014-03-16 Andreas Schwab <schwab@linux-m68k.org>
5221
5222 PR ada/39172
5223 * gcc-interface/Makefile.in (target_cpu_default): Revert
5224 2013-10-11 change.
5225
00c5acd3
EB
52262014-03-13 Eric Botcazou <ebotcazou@adacore.com>
5227
5228 PR ada/51483
5229 * cstand.adb (Register_Float_Type): Add 'precision' parameter and use
5230 it to set the RM size. Use directly 'size' for the Esize.
5231 (Create_Back_End_Float_Types): Adjust call to above.
5232 * get_targ.ads (Register_Type_Proc): Add 'precision' parameter.
5233 * set_targ.ads (FPT_Mode_Entry): Add 'precision' component.
5234 (Write_Target_Dependent_Values): Adjust comment.
5235 * set_targ.adb (Register_Float_Type): Add 'precision' parameter and
5236 deal with it.
5237 (Write_Target_Dependent_Values): Write the precision in lieu of size.
5238 (Initialization): Read the precision in lieu of size and compute the
5239 size from the precision and the alignment.
5240 * gcc-interface/gigi.h (enumerate_modes): Add integer parameter.
5241 * gcc-interface/misc.c (enumerate_modes): Likewise. Do not register
5242 types for vector modes, pass the size in addition to the precision.
5243
8f241ff5
EB
52442014-03-10 Eric Botcazou <ebotcazou@adacore.com>
5245
5246 * gcc-interface/Make-lang.in (ADA_DEPFILES): Fix typo.
5247
a92a6b88
DR
52482014-03-07 Doug Rupp <rupp@adacore.com>
5249
5250 PR ada/60411
5251 * system-linux-armel.ads (Backend_Overflow_Checks): Set to True.
5252 (Support_64_Bit_Divides): Removed, no longer used.
5253 (ZCX_By_Default): Enabled.
5254
3af78158
DR
52552014-02-25 Doug Rupp <rupp@adacore.com>
5256
5257 * gcc-interface/Makefile.in (arm-linux):
5258 (EH_MECHANISM): Use ARM unwinder (-arm)
5259 (LIBGNAT_TARGET_PAIRS: Override defaults with a-exexpr-gcc.adb and
5260 s-excmac-arm.ads.
5261 (EXTRA_LIBGNAT_OBJS): Add raise-gcc.o
5262 (EXTRA_GNATRTL_NONTASKING_OBJS): Add g-cppexc.o s-excmac.o.
5263 (arm-wrs-vxworks): Add EH_MECHANISM=-gcc for kernel mode.
5264 (EXTRA_LIBGNAT_OBJS): Add sigtramp-armvxw.o
5265 Add dependencies for sigtramp-armvxw.o.
5266
2749b01b
EB
52672014-02-25 Eric Botcazou <ebotcazou@adacore.com>
5268
5269 * gcc-interface/trans.c (Pragma_to_gnu): Deal with Warning_As_Error.
5270
e7ba564f
RD
52712014-02-25 Robert Dewar <dewar@adacore.com>
5272
5273 * rtsfind.adb (Is_RTE): Protect against entity with no scope
5274 field (previously this call blew up on the Standard entity).
5275 * sem_attr.adb (Analyze_Attribute, case Access): Remove
5276 test for No_Abort_Statements, this is now handled in
5277 Set_Entity_With_Checks.
5278 * exp_ch6.adb, sem_ch10.adb, sem_ch4.adb, sem_ch8.adb, sem_res.adb:
5279 Change name Set_Entity_With_Style_Check => Set_Entity_With_Checks.
5280 * sem_util.ads, sem_util.adb: Change name Set_Entity_With_Style_Check =>
5281 Set_Entity_With_Checks.
5282 (Set_Entity_With_Checks): Add checks for No_Dynamic_Attachment,
5283 Add checks for No_Abort_Statements.
5284
52852014-02-25 Robert Dewar <dewar@adacore.com>
5286
5287 * exp_ch9.adb (Expand_Entry_Barrier): Add comment that call to
5288 Check_Restriction is OK.
5289
2886a495
ES
52902014-02-25 Ed Schonberg <schonberg@adacore.com>
5291
5292 * sem_ch3.adb (Process_Full_View): Better error message when
5293 the full view of a private type without discriminants is an
5294 unconstrained type.
5295 * sem_ch7.adb (Uninstall_Declarations): Ditto.
5296
fb12497d
AC
52972014-02-25 Eric Botcazou <ebotcazou@adacore.com>
5298
5299 * sigtramp-armvxw.c: Also restore r0.
5300
53012014-02-25 Robert Dewar <dewar@adacore.com>
5302
5303 * errout.adb (Error_Msg_Internal): Warning_Msg_Char set
5304 unconditionally (Set_Msg_Insertion_Warning): Warning_Msg_Char
5305 set unconditionally.
5306 * erroutc.adb (Get_Warning_Tag): Does not give a leading space
5307 any more (Output_Msg_Text): Rewritten with new convention on
5308 output of warnings that are treated as errors.
5309 * erroutc.ads (Error_Msg_Object): Warn_Chr is always set even
5310 if Warn is False.
5311 * gnat_rm.texi: Updates to documentation on pragma
5312 Warning_As_Error.
5313 * warnsw.adb (Set_Dot_Warning_Switch): -gnatw.e should not
5314 set Warning_Doc_Switch.
5315 * lib-writ.ads: Add documentation note on ALI file generation
5316 for C.
5317 * exp_ch6.adb (Expand_Call): Remove check for No_Abort_Statements
5318 (belongs in Sem).
5319 * sem_attr.adb (Resolve_Attribute, case Access):
5320 Abort_Task'Access violates the No_Abort_Statements restriction.
5321 * sem_res.adb (Resolve_Call): Check restriction
5322 No_Abort_Statements for call to Abort_Task or a renaming of it.
5323
0c3985a9
AC
53242014-02-25 Robert Dewar <dewar@adacore.com>
5325
5326 * sem_ch3.adb (Array_Type_Declaration): Check for case of using
5327 type name as index.
5328 * lib.ads: Minor reformatting.
5329 * einfo.ads: Minor reformatting.
5330
53312014-02-25 Doug Rupp <rupp@adacore.com>
5332
5333 * sem_mech.adb (Set_Mechanisms): For convention Fortran on VMS
5334 use Short_Descriptor(S) as the argument passing mechanism.
5335
53362014-02-25 Eric Botcazou <ebotcazou@adacore.com>
5337
5338 * sigtramp-ppcvxw.c (CFI_COMMON_REGS): Also include r0.
5339
53402014-02-25 Robert Dewar <dewar@adacore.com>
5341
5342 * atree.ads (Warnings_Treated_As_Errors): New variable.
5343 * errout.adb (Error_Msg_Internal): Set Warn_Err flag in
5344 error object (Initialize): Initialize Warnings_As_Errors_Count
5345 (Write_Error_Summary): Include count of warnings treated as errors.
5346 * erroutc.adb (Warning_Treated_As_Error): New function.
5347 (Matches): Function moved to outer level of package.
5348 * erroutc.ads (Error_Msg_Object): Add Warn_Err flag.
5349 (Warning_Treated_As_Error): New function.
5350 * gnat_rm.texi: Document pragma Treat_Warning_As_Error.
5351 * opt.adb: Add handling of Warnings_As_Errors_Count[_Config].
5352 * opt.ads (Config_Switches_Type): Add entry for
5353 Warnings_As_Errors_Count.
5354 (Warnings_As_Errors_Count): New variable.
5355 (Warnings_As_Errors): New array.
5356 * par-prag.adb: Add dummy entry for Warning_As_Error.
5357 * sem_prag.adb (Analyze_Pragma): Implement new pragma
5358 Warning_As_Error.
5359 * snames.ads-tmpl: Add entries for Warning_As_Error pragma.
5360
5acb4d29
AC
53612014-02-25 Eric Botcazou <ebotcazou@adacore.com>
5362
5363 * sigtramp.h: Fix minor inaccuracy.
5364
53652014-02-25 Ben Brosgol <brosgol@adacore.com>
5366
5367 * gnat_ugn.texi: Added description of kill command.
5368
53692014-02-25 Robert Dewar <dewar@adacore.com>
5370
5371 * gnat_rm.texi (Address_Clauses): Add a section discussing the
5372 problem of address clauses causing unexpected initialization,
5373 including the effect of Initialize_Scalars.
5374
80c2c202
AC
53752014-02-25 Robert Dewar <dewar@adacore.com>
5376
5377 * errout.adb: Various changes for better msgs for anonmous access
5378 subprogram types.
5379 * erroutc.ads, erroutc.adb (Buffer_Ends_With): Version with character
5380 argument.
5381 (Buffer_Remove): Version with character argument.
5382 * sem_attr.adb (Resolve_Attribute, case Access): Better handling
5383 of mismatching conventions for access-to-subprogram case.
5384 * sem_prag.adb (Set_Convention_From_Pragma): Deal with anonymous
5385 access types in record.
5386 * sem_util.ads, sem_util.adb (Set_Convention): Handle anonymous access
5387 types, including in records.
5388
53892014-02-25 Doug Rupp <rupp@adacore.com>
5390
5391 * sigtramp-ppcvxw.c, sigtramp.h, sigtramp-armvxw.c: Comment
5392 enhancements and corrections.
5393
53942014-02-25 Robert Dewar <dewar@adacore.com>
5395
5396 * gnat_rm.texi: New section "Conventions and Anonymous Access Types"
5397
9972d439
RD
53982014-02-25 Robert Dewar <dewar@adacore.com>
5399
5400 * gnat_rm.texi: First set of documentation additions for
5401 predefined RM units.
5402 * checks.adb: Minor reformatting.
5403 * sem_elab.adb (Check_Task_Activation): Minor fix to error
5404 message.
5405 * sem_util.adb: Minor reformatting.
5406
592574f5
AC
54072014-02-25 Arnaud Charlet <charlet@adacore.com>
5408
5409 * usage.adb (Usage): Add help on -gnateC.
5410 * switch-c.adb (Scan_Front_End_Switches): Add handling of -gnateC.
5411 * opt.ads (Generate_CodePeer_Messages): New flag.
5412 * gnat_ugn.texi: Document new switch -gnateC.
5413
54142014-02-25 Ben Brosgol <brosgol@adacore.com>
5415
5416 * gnat_rm.texi: Corrected minor typos in Implementation Defined
5417 Aspects.
5418 * opt.ads: Minor reformatting.
5419
fe2194df
RD
54202014-02-25 Robert Dewar <dewar@adacore.com>
5421
5422 * binde.adb: Change messages to mention -gnatel instead of -gnatwl.
5423 * gnat_ugn.texi: Update documentation of -gnatwl Add documentation
5424 of -gnatel/-gnateL.
5425 * opt.ads (Warn_Info_Messages): New flag.
5426 * sem_elab.adb: Use Elab_Warnings, Elab_Info_Messages to control
5427 messages.
5428 * sem_prag.adb: Use Elab_Warnings, Elab_Info_Messages to control
5429 messages.
5430 * switch-m.ad, switch-c.adb: Recognize new -gnatel/EL switches.
5431 * usage.adb: Add documentation of -gnatel/-gnateL Update
5432 documentation of -gnatwl/-gnatwL.
5433 * warnsw.adb: New handling of Elab_Warnings, Elab_Info_Messages
5434 * warnsw.ads (Elab_Info_Messages): New field in Warning_Record
5435
4c51ff88
AC
54362014-02-25 Robert Dewar <dewar@adacore.com>
5437
5438 * einfo.ads, einfo.adb (Has_Shift_Operator): New flag.
5439 * gnat_rm.texi: Document pragma Provide_Shift_Operators.
5440 * interfac.ads: Minor code reorganization (add pragma
5441 Compiler_Unit_Warning).
5442 * par-prag.adb: Add dummy entry for Provide_Shift_Operators.
5443 * sem_ch3.adb (Build_Derived_Numeric_Type): Copy
5444 Has_Shift_Operator flag.
5445 * sem_intr.adb (Check_Intrinsic_Subprogram): Make sure
5446 Check_Shift is always called (Check_Shift): Set Has_Shift_Operator.
5447 * sem_prag.adb: Implement pragma Provide_Shift_Operators.
5448 * snames.ads-tmpl: Add entries for pragma Provide_Shift_Operators
5449 Add entry for Name_Amount.
5450 * checks.adb (Selected_Range_Checks): When checking for a null
5451 range, make sure we use the base type, and not the subtype for
5452 deciding a range is null.
5453 * sem_ch5.adb (Analyze_Loop_Parameter_Specification): Check
5454 for suspicious loop bound which is outside the range of the
5455 loop subtype.
5456 * gnat_ugn.texi: Add documentation section "Determining the
5457 Chosen Elaboration Order"
5458 * sem_ch13.adb (UC_Entry): Add field Act_Unit
5459 (Validate_Unchecked_Conversion): Store Act_Unit
5460 (Validate_Unchecked_Conversions): Test Warnings_Off in Act_Unit
5461 * treepr.adb: Minor reformatting.
5462
54632014-02-25 Arnaud Charlet <charlet@adacore.com>
5464
5465 * usage.adb: Minor: fix typo.
5466
0355e3eb
AC
54672014-02-25 Robert Dewar <dewar@adacore.com>
5468
5469 * lib.ads, s-bitops.adb, s-bitops.ads, s-conca5.adb, gnat_rm.texi,
5470 s-conca5.ads, s-conca7.adb, s-conca7.ads, s-crc32.adb, s-crc32.ads,
5471 s-conca9.adb, s-conca9.ads, g-dyntab.adb, s-crtl.ads, g-dyntab.ads,
5472 s-excdeb.adb, s-addope.adb, s-addope.ads, s-carun8.adb, s-carun8.ads,
5473 g-htable.adb, g-htable.ads, g-hesora.adb, g-hesora.ads, s-conca2.adb,
5474 s-conca2.ads, a-comlin.adb, a-chlat1.ads, a-comlin.ads, errout.ads,
5475 a-except.adb, s-conca4.adb, a-except.ads, s-conca4.ads, s-conca6.adb,
5476 s-conca6.ads, g-spchge.adb, g-spchge.ads, g-u3spch.adb, g-u3spch.ads,
5477 a-strhas.ads, restrict.adb, aspects.adb, aspects.ads, s-conca8.adb,
5478 s-conca8.ads, back_end.adb, par-prag.adb, g-byorma.adb, g-byorma.ads,
5479 a-elchha.adb, a-elchha.ads, g-speche.adb, g-speche.ads, s-casuti.adb,
5480 s-assert.adb, s-casuti.ads, s-assert.ads, a-clrefi.adb, a-clrefi.ads,
5481 s-conca3.adb, s-conca3.ads, a-ioexce.ads: Implement pragma
5482 Compiler_Unit_Warning, change Compiler_Unit everywhere to
5483 Compiler_Unit_Warning.
5484
54852014-02-25 Sergey Rybin <rybin@adacore.com frybin>
5486
5487 * sem_prag.adb (Analyze_Depends_In_Decl_Part): Do not normalize
5488 in ASIS mode aggregates that are used as aspect definitions.
5489
e917e3b8
AC
54902014-02-25 Robert Dewar <dewar@adacore.com>
5491
5492 * exp_ch7.adb, sem_util.adb, sem_util.ads, exp_ch6.adb: Minor
5493 reformatting.
5494
54952014-02-25 Ed Schonberg <schonberg@adacore.com>
5496
5497 * freeze.adb (Freeze_Entity): If the return type of a function
5498 is a limited view, and the non-limited view has not been seen yet,
5499 defer freezing to some later point.
5500
55012014-02-25 Robert Dewar <dewar@adacore.com>
5502
5503 * sem_ch3.adb: Minor reformatting.
5504
55052014-02-25 Robert Dewar <dewar@adacore.com>
5506
5507 * s-excdeb.ads, s-except.ads, s-exctab.adb, s-exctab.ads, s-finmas.ads,
5508 s-htable.adb, s-htable.ads, s-imenne.adb, s-imenne.ads, s-imgenu.adb,
5509 s-imgenu.ads, s-mastop.adb, s-mastop.ads, s-memory-vms_64.adb,
5510 s-memory-vms_64.ads, s-memory.adb, s-memory.ads, s-os_lib.adb,
5511 s-os_lib.ads, s-parame.adb, s-parame.ads, s-purexc.ads, s-restri.adb,
5512 s-restri.ads, s-rident.ads, s-secsta.adb, s-secsta.ads, s-soflin.adb,
5513 s-soflin.ads, s-sopco3.adb, s-sopco3.ads, s-sopco4.adb, s-sopco4.ads,
5514 s-sopco5.adb, s-sopco5.ads, s-spsufi.ads, s-stache.adb, s-stache.ads,
5515 s-stalib.adb, s-stalib.ads, s-stoele.adb, s-stoele.ads, s-strcom.adb,
5516 s-strcom.ads, s-strhas.adb, s-string.adb, s-string.ads, s-strops.adb,
5517 s-strops.ads, s-ststop.adb, s-ststop.ads, s-traceb.adb, s-traceb.ads,
5518 s-traent.adb, s-traent.ads, s-unstyp.ads, s-utf_32.adb, s-utf_32.ads,
5519 s-wchcnv.adb, s-wchcnv.ads, s-wchcon.adb, s-wchcon.ads, s-wchjis.adb,
5520 s-wchjis.ads, sem_ch11.adb, sem_ch4.adb, sem_ch5.adb, sem_prag.adb,
5521 snames.ads-tmpl: Change Compiler_Unit everywhere to
5522 Compiler_Unit_Warning.
5523
5f24a82a
HK
55242014-02-25 Hristian Kirtchev <kirtchev@adacore.com>
5525
5526 * exp_ch6.adb (Add_Or_Save_Precondition): New routine.
5527 (Collect_Body_Postconditions_In_Decls): New routine.
5528 (Collect_Body_Postconditions_Of_Kind): Factor out code. Handle
5529 postcondition aspects or pragmas that appear on a subprogram
5530 body stub.
5531 (Collect_Spec_Preconditions): Factor out code. Handle
5532 precondition aspects or pragmas that appear on a subprogram
5533 body stub.
5534 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): The analysis of
5535 aspects that apply to a subprogram body stub is no longer delayed,
5536 the aspects are analyzed on the spot.
5537 (SPARK_Aspect_Error):
5538 Aspects that apply to a subprogram declaration cannot appear in
5539 a subunit.
5540 * sem_ch10.adb Remove with and use clause for Sem_Ch13.
5541 (Analyze_Proper_Body): Add local variable Comp_Unit. Unum
5542 is now a local variable. Code cleanup. Analysis related to
5543 the aspects of a subprogram body stub is now carried out by
5544 Analyze_Subprogram_Body_Helper. Do not propagate the aspects
5545 and/or pragmas of a subprogram body stub to the proper body
5546 as this is no longer needed. Do not analyze the aspects of a
5547 subprogram stub when the corresponding source unit is missing.
5548 (Analyze_Protected_Body_Stub): Flag the illegal use of aspects
5549 on a stub.
5550 (Analyze_Task_Body_Stub): Flag the illegal use of
5551 aspects on a stub.
5552 (Optional_Subunit): Add local variable Unum.
5553 * sem_ch13.adb (Insert_Delayed_Pragma): Do not analyze a generated
5554 pragma when it applies to a subprogram body stub.
5555 * sem_prag.adb (Analyze_Pragma): Pragmas Contract_Cases,
5556 Depends and Global can now apply to a subprogram body stub as
5557 long as it acts as its own spec.
5558 (Analyze_Refined_Pragma):
5559 Code reformatting. Refinement pragmas cannot apply to a subunit.
5560
7edfb4c6
HK
55612014-02-25 Hristian Kirtchev <kirtchev@adacore.com>
5562
5563 * einfo.ads Update the usage of flag
5564 Uses_Sec_Stack. Uses_Sec_Stack now applies to E_Loop entities.
5565 * exp_ch5.adb (Expand_Iterator_Loop): The temporary for a cursor
5566 now starts with the letter 'C'. This makes reading expanded
5567 code easier.
5568 * exp_ch7.adb (Establish_Transient_Scope): Add local variable
5569 Iter_Loop. Signal that an Ada 2012 iterator loop requires
5570 secondary stack management when creating a transient scope for
5571 an element reference.
5572 * exp_util.adb (Process_Statements_For_Controlled_Objects):
5573 When wrapping the statements of a loop, pass the E_Loop entity
5574 to the wrapping machinery.
5575 (Wrap_Statements_In_Block): Add
5576 formal parameter Scop along with comment on usage. Add local
5577 variables Block_Id, Block_Nod and Iter_Loop. Mark the generated
5578 block as requiring secondary stack management when the block is
5579 created inside an Ada 2012 iterator loop. This ensures that any
5580 reference objects are reclaimed on each iteration of the loop.
5581 * sem_ch5.adb (Analyze_Loop_Statement): Mark the generated block
5582 tasked with the handling of container iterators as requiring
5583 secondary stack management. This ensures that iterators are
5584 reclaimed when the loop terminates or is exited in any fashion.
5585 * sem_util.adb (Add_Block_Identifier): New routine.
5586 (Find_Enclosing_Iterator_Loop): New routine.
5587 * sem_util.ads (Add_Block_Identifier): New routine.
5588 (Find_Enclosing_Iterator_Loop): New routine.
5589
bbe9779c
AC
55902014-02-25 Robert Dewar <dewar@adacore.com>
5591
5592 * sinfo.ads: Minor reformatting.
5593
55942014-02-25 Tristan Gingold <gingold@adacore.com>
5595
5596 * s-expllu.ads, s-expuns.ads, s-expmod.ads: Minor comment fix.
5597
55982014-02-25 Pascal Obry <obry@adacore.com>
5599
5600 * sinput-l.adb, osint.adb, osint.ads: Add Prep_Suffix to factorize code.
5601
1ae8beef
AC
56022014-02-25 Tristan Gingold <gingold@adacore.com>
5603
5604 * sem_ch10.adb: Minor comment fix.
5605
56062014-02-25 Bob Duff <duff@adacore.com>
5607
5608 * s-tasdeb.adb: Misc cleanup of this package,
5609 including printing addresses in hexadecimal.
5610 (Write): Fix minor bug when taking 'Address of an empty string.
5611
56122014-02-25 Ed Schonberg <schonberg@adacore.com>
5613
5614 * sem_prag.adb (Analyze_Part_Of): Reject state refinement in a
5615 public child unit when it does not refer to the abstract state
5616 of a public ancestor.
5617
ca11219d
AC
56182014-02-25 Yannick Moy <moy@adacore.com>
5619
5620 * sem_prag.adb (Analyze_Pragma/Pragma_Validity_Checks): Ignore pragma
5621 Validity_Checks in GNATprove and CodePeer modes.
5622
56232014-02-25 Pascal Obry <obry@adacore.com>
5624
5625 * prj-attr.adb, projects.texi, snames.ads-tmpl: Add package Install's
5626 Artifacts attribute.
5627
6e32b1ab
AC
56282014-02-25 Yannick Moy <moy@adacore.com>
5629
5630 * sem_prag.adb: Minor reformatting to get consistent messages.
5631
56322014-02-25 Robert Dewar <dewar@adacore.com>
5633
5634 * checks.adb: Minor reformatting.
5635 * sinfo.ads (Do_Range_Check): Document that this flag is never
5636 passed to the back end.
5637
f9966234
AC
56382014-02-25 Yannick Moy <moy@adacore.com>
5639
5640 * sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_prag.adb, sem_attr.adb,
5641 sem_ch6.adb: Remove useless references to SPARK RM in error messages.
5642
56432014-02-25 Hristian Kirtchev <kirtchev@adacore.com>
5644
5645 * sem_res.adb (Appears_In_Check): New routine.
5646 (Resolve_Entity_Name): Remove local variables Prev and
5647 Usage_OK. Par is now a constant. Remove the parent chain traversal
5648 as the placement of a volatile object with enabled property
5649 Async_Writers and/or Effective_Reads must appear immediately
5650 within a legal construct.
5651
56522014-02-25 Hristian Kirtchev <kirtchev@adacore.com>
5653
5654 * checks.adb (Apply_Selected_Range_Checks):
5655 Alphabetize local constants and variables. Add comments.
5656 Always insert a range check that requires runtime evaluation into
5657 the tree.
5658
a6abfd78
AC
56592014-02-25 Robert Dewar <dewar@adacore.com>
5660
5661 * sem_attr.adb, sem_ch6.adb, par-ch3.adb: Minor reformatting.
5662
56632014-02-25 Bob Duff <duff@adacore.com>
5664
5665 * s-tassta.adb (Finalize_Global_Tasks): Limit the number of loop
5666 iterations while waiting for independent tasks to terminate;
5667 if an independent task does not terminate, we do not want to
5668 hang here. In that case, the thread will be terminated when the
5669 process exits.
5670 * s-taprop-linux.adb (Abort_Task): Fix Assert to allow for ESRCH.
5671
56722014-02-25 Ed Schonberg <schonberg@adacore.com>
5673
5674 * sem_prag.adb (Check_SPARK_Aspect_For_ASIS): New subprogram,
5675 used to perform pre-analysis of the expression for SPARK
5676 aspects that have a non-standard syntax, such as GLobal and
5677 Initializes. The procedure applies to the original expression
5678 in an aspect specification, prior to the analysis of the
5679 corresponding pragma, in order to provide semantic information
5680 for ASIS navigation purposes.
5681 (Analyze_Global_In_Decl_List, Analyze_Initializes_In_Decl_Part):
5682 Call new subprogram.
5683
64e86d00
AC
56842014-02-25 Yannick Moy <moy@adacore.com>
5685
5686 * sem_prag.adb: Remove obsolete reference to SPARK RM in error message.
5687
56882014-02-25 Doug Rupp <rupp@adacore.com>
5689
5690 * init.c (HAVE_GNAT_ADJUST_CONTEXT_FOR_RAISE): Enable for ARM.
5691 (__gnat_adjust_context_for_raise): Bump the PC by 2.
5692
56932014-02-25 Ed Schonberg <schonberg@adacore.com>
5694
5695 * par-ch3.adb (P_Basic_Declarative_Items): In the case of a
5696 misplaced IS, add a statement sequence to improper body only if
5697 one has not been parsed already.
5698
56992014-02-25 Ed Schonberg <schonberg@adacore.com>
5700
5701 * sem_attr.adb (Analyze_Attribute, case 'Update): Check for
5702 mismatch when multidimensional array is updated with a single
5703 index.
5704
3684d1fc
YM
57052014-02-25 Yannick Moy <moy@adacore.com>
5706
5707 * sem_ch3.adb, sem_ch5.adb, sem_prag.adb, sem_attr.adb, errout.ads,
5708 sem_ch6.adb: Mark most references to SPARK RM in error messages
5709 for removal.
5710
b2afe274
AC
57112014-02-24 Ed Schonberg <schonberg@adacore.com>
5712
5713 * par-ch3.adb (P_Basic_Declarative_Items): If an improper body
5714 appears in a list of basic declarations, complete the tree with
5715 an empty statement list, to prevent cascaded errors and crashes
5716 if semantic analysis is attempted.
5717
b5eccd0c
AC
57182014-02-24 Thomas Quinot <quinot@adacore.com>
5719
5720 * g-sercom-mingw.adb (Open): Fix incorrect test for error return
5721 value.
5722 * erroutc.adb: Minor reformatting.
5723
57242014-02-24 Hristian Kirtchev <kirtchev@adacore.com>
5725
5726 * sem_prag.adb (Check_Clause_Syntax): Account
5727 for a solitary input item in a dependency list.
5728
57292014-02-24 Yannick Moy <moy@adacore.com>
5730
5731 * gnat1drv.adb (Adjust_Global_Switches): Do not
5732 use validity checks at all in GNATprove_Mode.
5733
f34b5d88
RD
57342014-02-24 Robert Dewar <dewar@adacore.com>
5735
5736 * g-sercom-mingw.adb, g-sercom-linux.adb, sem_prag.adb, freeze.adb,
5737 atree.adb, atree.ads: Minor reformatting.
5738
2dade097
HK
57392014-02-24 Hristian Kirtchev <kirtchev@adacore.com>
5740
5741 * sem_ch6.adb (Analyze_Subprogram_Body_Contract): Do not enforce
5742 global and dependence refinement when SPARK_Mode is off.
5743 * sem_ch7.adb (Analyze_Package_Body_Contract): Do not enforce
5744 state refinement when SPARK_Mode is off.
5745 * sem_ch13.adb (Analyze_Aspect_Specifications): Add local
5746 variable Decl. Insert the generated pragma for Refined_State
5747 after a potential pragma SPARK_Mode.
5748 * sem_prag.adb (Analyze_Depends_In_Decl_Part): Add local
5749 constant Deps. Remove local variable Expr. Check the syntax
5750 of pragma Depends when SPARK_Mode is off. Factor out the
5751 processing for extra parenthesis around individual clauses.
5752 (Analyze_Global_In_Decl_List): Items is now a constant. Check
5753 the syntax of pragma Global when SPARK_Mode is off.
5754 (Analyze_Initializes_In_Decl_Part): Check the syntax of pragma
5755 Initializes when SPARK_Mode is off.
5756 (Analyze_Part_Of): Check
5757 the syntax of the encapsulating state when SPARK_Mode is off.
5758 (Analyze_Pragma): Check the syntax of pragma Abstract_State when
5759 SPARK_Mode is off. Move the declaration order check with respect
5760 to pragma Initializes to the end of the processing. Do not verify
5761 the declaration order for pragma Initial_Condition when SPARK_Mode
5762 is off. Do not complain about a useless package refinement when
5763 SPARK_Mode is off.
5764 (Analyze_Refined_Depends_In_Decl_Part): Refs
5765 is now a constant. Check the syntax of pragma Refined_Depends
5766 when SPARK_Mode is off.
5767 (Analyze_Refined_Global_In_Decl_Part):
5768 Check the syntax of pragma Refined_Global when SPARK_Mode is off.
5769 (Analyze_Refined_State_In_Decl_Part): Check the syntax of pragma
5770 Refined_State when SPARK_Mode is off.
5771 (Check_Dependence_List_Syntax): New routine.
5772 (Check_Global_List_Syntax): New routine.
5773 (Check_Initialization_List_Syntax): New routine.
5774 (Check_Item_Syntax): New routine.
5775 (Check_State_Declaration_Syntax): New routine.
5776 (Check_Refinement_List_Syntax): New routine.
5777 (Has_Extra_Parentheses): Moved to the top level of Sem_Prag.
5778
158d55fa
AC
57792014-02-24 Robert Dewar <dewar@adacore.com>
5780
5781 * a-tags.adb, s-os_lib.adb: Minor reformatting.
5782
57832014-02-24 Thomas Quinot <quinot@adacore.com>
5784
5785 * g-sercom-mingw.adb, g-sercom-linux.adb (Raise_Error): Include
5786 strerror message, not just numeric errno value.
5787
57882014-02-24 Doug Rupp <rupp@adacore.com>
5789
5790 * raise-gcc.c (exception_class_eq): Make endian neutral.
5791
57922014-02-24 Ed Schonberg <schonberg@adacore.com>
5793
5794 * atree.ads, atree,adb (Copy_Separate_Tree): Remove Syntax_Only
5795 flag, and reset Etype and Analyzed attributes unconditionally
5796 when copying a tree that may be partly analyzed.
5797 * freeze.adb: Change calls to Copy_Separate_Tree accordingly.
5798 * sem_ch6.adb (Check_Inline_Pragma): If the Inline pragma appears
5799 within a subprogram body and applies to it, remove it from the
5800 body before making a copy of it, to prevent spurious errors when
5801 analyzing the copied body.
5802
f1a3590e
AC
58032014-02-24 Thomas Quinot <quinot@adacore.com>
5804
5805 * s-os_lib.adb (Errno_Message): Do not depend on Integer'Image.
5806 * s-oscons-tmplt.c: On VxWorks, include adaint.h only after
5807 vxWorks.h has been included. Also ensure that file attributes
5808 related definitions are output even in cases where socket support
5809 is not enabled.
5810 * a-tags.adb: Code clean up.
5811 * Make-generated.in (OSCONS_CPP, OSCONS_EXTRACT): Use -iquote
5812 instead of -I to add the main ada source directory to the header
5813 search path, in order to avoid conflict between our own "types.h"
5814 and VxWork's <types.h>.
5815
58162014-02-24 Robert Dewar <dewar@adacore.com>
5817
5818 * atree.ads, atree.adb (Copy_Separate_Tree): Add Syntax_Only parameter.
5819 * debug.adb: Remove documentation of -gnatd.X, no longer used.
5820 * freeze.adb (Wrap_Imported_Subprogram): Fixed and activated.
5821
58222014-02-24 Bob Duff <duff@adacore.com>
5823
5824 * gnat_ugn.texi: Improve documentation of gnatpp.
5825
47752af2
TQ
58262014-02-24 Thomas Quinot <quinot@adacore.com>
5827
5828 * g-stheme.adb, g-socthi-vms.adb, g-socthi-vms.ads,
5829 g-socthi-vxworks.adb, g-socthi-vxworks.ads, g-stseme.adb,
5830 g-socthi-mingw.adb, g-socthi-mingw.ads, g-socthi.adb,
5831 g-socthi.ads, g-socket.adb (Host_Error_Message): Return a string, not
5832 a chars_ptr, because on Windows this is a renaming of
5833 Socket_Error_Message.
5834
1b31321b
AC
58352014-02-24 Robert Dewar <dewar@adacore.com>
5836
5837 * a-direct.adb, sem_ch5.adb, a-cfdlli.adb, a-cfhase.adb, a-tags.adb,
5838 s-filatt.ads, a-cforma.adb, sem_ch6.adb, g-socthi-mingw.adb,
5839 a-cfhama.adb, a-cforse.adb, a-cofove.adb: Minor reformatting and code
5840 reorganization.
5841
58422014-02-24 Thomas Quinot <quinot@adacore.com>
5843
5844 * Make-generated.in (OSCONS_CPP, OSCONS_EXTRACT): Make sure
5845 that the source directory containing s-oscons-tmplt.c is on the
5846 include path, so that all internal header files are available.
5847
28108618
ES
58482014-02-24 Ed Schonberg <schonberg@adacore.com>
5849
5850 * sem_ch5.adb (Analyze_Loop_Parameter_Specification): If the
5851 domain of iteration is an attribute reference 'Old, this is an
5852 Ada 2012 iterator and the loop must be rewritten as such.
5853
3e5b1f32
TQ
58542014-02-24 Thomas Quinot <quinot@adacore.com>
5855
5856 * s-fileio.adb (Errno_Message): Remove, use shared version from
5857 s-os_lib instead.
5858 * s-crtrun.ads, Makefile.rtl: Remove now unused unit.
5859 * g-stseme (Socket_Error_Message): Reimplement in terms of new
5860 s-os_lib function.
5861 * g-socthi.ads, g-socthi.adb: Change profile of
5862 Socket_Error_Message to return String to allow the above.
5863 * g-socket.adb, g-socthi-mingw.adb, g-socthi-mingw.ads,
5864 * g-socthi-vms.adb, g-socthi-vms.ads, g-socthi-vxworks.adb,
5865 * g-socthi-vxworks.ads: Update to account for the above profile
5866 change.
5867 * a-tags.adb: Use strlen builtin binding provided by s-crtl.
5868 * s-crtl.ads (strncpy): New procedure.
5869 * s-os_lib.adb (Copy_Attributes): Import just once (strncpy):
5870 Use import from s-crtl.
5871 * a-envvar.adb, osint.adb: Use imports of C runtime functions
5872 from s-crtl instead of re-importing locally.
5873
c6d2191a
AC
58742014-02-24 Hristian Kirtchev <kirtchev@adacore.com>
5875
5876 * sem_prag.adb (Analyze_Global_Item): Emit the
5877 variable related checks concerning volatile objects only when
5878 SPARK_Mode is on.
5879
58802014-02-24 Robert Dewar <dewar@adacore.com>
5881
5882 * sem_ch5.adb (Analyze_Iterator_Specification): use
5883 Error_Msg_Ada_2012_Feature.
5884
58852014-02-24 Jose Ruiz <ruiz@adacore.com>
5886
5887 * s-rident.ads (Profile_Info): For Ravenscar, the restrictions
5888 No_Local_Timing_Events and No_Specific_Termination_Handlers
5889 must be set, according to the Ravenscar profile definition
5890 in D.13(6/3).
5891
58922014-02-24 Ed Schonberg <schonberg@adacore.com>
5893
5894 * sem_ch6.adb (Analyze_Expression_Function): If this is a
5895 completion, freeze return type and its designated type if needed.
5896
58972014-02-24 Thomas Quinot <quinot@adacore.com>
5898
5899 * sem_ch13.adb (Analyze_Attribute_Definition_Clause, case
5900 'Address): When moving initialization statements to a freeze
5901 entity, keep them under a single node (i.e. do not unwrap
5902 expressions with actions), and set the Initialization_Statements
5903 attribute again so that processing of a later pragma Import can
5904 still remove them.
5905
59062014-02-24 Claire Dross <dross@adacore.com>
5907
5908 * a-cfdlli.adb, a-cfdlli.ads, a-cfhama.adb, a-cfhama.ads,
5909 a-cfhase.adb, a-cfhase.ads, a-cforma.adb, a-cforma.ads,
5910 a-cforse.adb, a-cforse.ads, a-cofove.adb, a-cofove.ads: Rename
5911 Left/Right to First_To_Previous/Current_To_Last.
5912
59132014-02-24 Thomas Quinot <quinot@adacore.com>
5914
5915 * adaint.h (struct file_attributes): New component "error"
5916 (__gnat_error_attributes): Accessor for the above.
5917 * adaint.c (__gnat_error_attributes): New subprogram
5918 (__gnat_stat): Fix returned value (expect errno value)
5919 (__gnat_stat_to_attr): Add management of error component (set to
5920 stat errno value, except for missing files where it is set to 0,
5921 and exists is set to 0).
5922 * osint.ads (File_Attributes_Size): Update per change above,
5923 also clarify documentation.
5924 * s-filatt.ads: New file, binding to file attributes related
5925 functions.
5926 * Makefile.rtl (s-filatt): New runtime unit.
5927 * s-crtl.ads (strlen): Expose binding to GCC builtin (falls back
5928 to library function if not available on target).
5929 * s-os_lib.ads, s-os_lib.adb (Errno_Message): New subprogram.
5930 * s-oscons-tmplt.c (SIZEOF_struct_file_attributes,
5931 SIZEOF_struct_dirent_alloc): New constants.
5932 * Make-generated.in (s-oscons.ads): Now requires adaint.h.
5933 * a-direct.adb (Fetch_Next_Entry): Fix incorrect buffer sizes.
5934 Perform appropriate error checking if stat fails (do not just
5935 ignore existing files if stat fails)
5936 * gcc-interface/Make-lang.in (GNAT_ADA_OBJS, GNATBIND_OBJS): Update
5937 dependencies.
5938
ec77b144
HK
59392014-02-24 Hristian Kirtchev <kirtchev@adacore.com>
5940
5941 * sem_prag.adb (Analyze_Global_Item): Move the check concerning
5942 the use of volatile objects as global items in a function to
5943 the variable related checks section.
5944 * sem_util.adb (Async_Readers_Enabled): Directly call
5945 Has_Enabled_Property.
5946 (Async_Writers_Enabled): Directly call Has_Enabled_Property.
5947 (Effective_Reads_Enabled): Directly call Has_Enabled_Property.
5948 (Effective_Writes_Enabled): Directly call Has_Enabled_Property.
5949 (Has_Enabled_Property): Rename formal parameter State_Id to Item_Id.
5950 Update the comment on usage. State_Has_Enabled_Property how handles
5951 the original logic of the routine. Add processing for variables.
5952 (State_Has_Enabled_Property): New routine.
5953 (Variable_Has_Enabled_Property): New routine.
5954
32bba3c9
AC
59552014-02-24 Robert Dewar <dewar@adacore.com>
5956
5957 * sinfo.ads, sem_ch12.adb, sem_res.adb, sem_ch4.adb, par-ch12.adb:
5958 Minor reformatting.
5959 * atree.ads, atree.adb (Node35): New function.
5960 (Set_Node35): New procedure.
5961 * debug.adb: Define new debug flag -gnatd.X.
5962 * einfo.ads, einfo.adb (Import_Pragma): New field.
5963 * freeze.adb (Wrap_Imported_Procedure): New procedure (not
5964 really active yet, has to be activated with -gnatd.X.
5965 * sem_prag.adb (Set_Imported): Set new Import_Pragma
5966 field (Set_Imported): Don't set Is_Public (see
5967 Freeze.Wrap_Imported_Subprogram)
5968 * par-ch3.adb (P_Component_List): Handle unexpected null component.
5969
59702014-02-24 Yannick Moy <moy@adacore.com>
5971
5972 * sem_ch3.adb: Correct reference to SPARK RM in error messages.
5973 * gnat_rm.texi: Correct documentation of attribute Update.
5974
59752014-02-24 Ed Schonberg <schonberg@adacore.com>
5976
5977 * sem_ch5.adb (Analyze_Iterator_Specification): Reject container
5978 iterator in older versions of Ada.
5979
97027f64
GD
59802014-02-24 Gary Dismukes <dismukes@adacore.com>
5981
5982 * sem_ch5.adb, sem_aux.ads, sem_ch12.adb, gnat_ugn.texi, par.adb,
5983 par-ch12.adb: Change spelling 'parametrization' to 'parameterization'.
5984
5f50020a
ES
59852014-02-24 Ed Schonberg <schonberg@adacore.com>
5986
5987 * sinfo.ads, sinfo.adb: New attribute Generalized_Indexing, for
5988 indexed_components that are instances of Ada 2012 container
5989 indexing operations. Analysis and resolution of such nodes
5990 is performed on the attribute, and the original source is
5991 preserved for ASIS operations. If expansion is enabled, the
5992 indexed component is replaced by the value of this attribute,
5993 which is in a call to an Indexing aspect, in most case wrapped
5994 in a dereference operation.
5995 * sem_ch4.adb (Analyze_Indexed_Component): Create
5996 Generalized_Indexing attribute when appropriate.
5997 (Analyze_Call): If prefix is not overloadable and has an indexing
5998 aspect, transform into an indexed component so it can be analyzed
5999 as a potential container indexing.
6000 (Analyze_Expression): If node is an indexed component with a
6001 Generalized_ Indexing, do not re-analyze.
6002 * sem_res.adb (Resolve_Generalized_Indexing): Complete resolution
6003 of an indexed_component that has been transformed into a container
6004 indexing operation.
6005 (Resolve_Indexed_Component): Call the above when required.
6006 (Resolve): Do not insert an explicit dereference operation on
6007 an indexed_component whose type has an implicit dereference:
6008 the operation is inserted when resolving the related
6009 Generalized_Indexing.
6010
ec4e8e9a
AC
60112014-02-24 Olivier Ramonat <ramonat@adacore.com>
6012
6013 * gnat_rm.texi, gnat_ugn.texi: Replace Ada Compiler by Ada Development
6014 Environment.
6015
60162014-02-24 Hristian Kirtchev <kirtchev@adacore.com>
6017
6018 * sem_prag.adb (Check_Constituent_Usage): Remove leading spaces in
6019 error messages.
6020 (Inconsistent_Mode_Error): Remove leading spaces in error messages.
6021 Merge the expected and available mode errors.
6022 (Report_Unused_Constituents): Remove leading spaces in error messages.
6023 (Report_Unused_States): Remove leading spaces in error messages.
6024
e19137bc
AC
60252014-02-24 Thomas Quinot <quinot@adacore.com>
6026
6027 * par_sco.adb (Traverse_One): Refine categorization of statement
6028 SCOs.
6029
60302014-02-24 Robert Dewar <dewar@adacore.com>
6031
6032 * aspects.ads, aspects.adb: Remove aspects Ada_2005 and Ada_2012,
6033 Pure_05, Pure_12 and Preelaborate_05.
6034 * gnat_rm.texi: Update accordingly.
6035 * sem_prag.adb: Document one argument form of Ada_05/Ada_2005
6036 pragmas Document one argument form of Ada_12/Ada_2012 pragmas
6037 Recognize one argument form of these pragmas only in GNAT mode
6038 (-gnatg).
6039
1037b0f4
AC
60402014-02-24 Ed Schonberg <schonberg@adacore.com>
6041
6042 * s-dimmks.ads: Replace symbol for temperature, previously the
6043 Greek letter Theta, by the ASCII @ sign.
6044 * s-diflio.ads: ditto.
6045
60462014-02-24 Robert Dewar <dewar@adacore.com>
6047
6048 * exp_ch4.adb: Minor code reorganization (use OR for boolean
6049 variables).
6050 * sem_ch3.adb, sem_prag.adb, freeze.adb: Minor reformatting.
6051
60522014-02-24 Ben Brosgol <brosgol@adacore.com>
6053
6054 * gnat_ugn.texi, projects.texi: Added the necessary conditionalization
6055 so that references to gnatmem and ASIS tools do not appear in the FSF
6056 edition of the GNAT User's Guide.
6057
ebb6b0bd
AC
60582014-02-24 Yannick Moy <moy@adacore.com>
6059
6060 * freeze.adb (Freeze_Entity): Do not issue warning
6061 for pre/post being ignored on imported subprogram in GNATprove
6062 mode.
6063
60642014-02-24 Robert Dewar <dewar@adacore.com>
6065
6066 * exp_ch5.adb, sem_ch5.adb, sem_type.adb, sem_res.adb, sem_attr.adb,
6067 stand.ads, sem_eval.adb: Minor reformatting.
6068
60692014-02-24 Yannick Moy <moy@adacore.com>
6070
6071 * sem_prag.adb: Minor rewording in error message.
6072
60732014-02-24 Johannes Kanig <kanig@adacore.com>
6074
6075 * exp_util.adb (Expand_Subtype_From_Expr): Do not expand subtypes in
6076 GNATprove_mode, gnat2why doesn't need nor use these types.
6077
60782014-02-24 Gary Dismukes <dismukes@adacore.com>
6079
6080 * exp_ch4.adb (Expand_N_Op_Expon): On the AAMP
6081 target, in the case of signed integer exponentiation that uses a
6082 run-time routine, always select the Exp_* versions, since overflow
6083 checking is automatically done by AAMP arithmetic instructions.
6084
60852014-02-24 Hristian Kirtchev <kirtchev@adacore.com>
6086
6087 * sem_ch13.adb (Analyze_Aspect_Specifications):
6088 When the related context is a package instace, insert pragma
6089 Abstract_State after all internally-generated renamings related
6090 to the instance "header".
6091
60922014-02-24 Ed Schonberg <schonberg@adacore.com>
6093
6094 * sem_ch3.adb (Analyze_Declarations): Analyze Contract of abstract
6095 subprograms.
6096 * sem_disp.adb (Check_Dispatching_Context): A non-dispatching
6097 call to an abstract subprogram is legal if it appears in a
6098 pre/postcondition of another abstract operation.
6099
c97d7285
AC
61002014-02-24 Sergey Rybin <rybin@adacore.com frybin>
6101
6102 * gnat_ugn.texi: Misc updates.
6103
61042014-02-24 Hristian Kirtchev <kirtchev@adacore.com>
6105
6106 * exp_prag.adb (Expand_Old): Set the type of the generated temporary.
6107
61082014-02-24 Gary Dismukes <dismukes@adacore.com>
6109
6110 * layout.adb (Layout_Variant_Record): Instantiate
6111 Generic_Check_Choices and call Check_Choices before calling
6112 Build_Discr_Checking_Funcs, since we need Others_Discrete_Choices
6113 set to prevent generating incorrect discriminant-checking
6114 functions for 'others' variants (functions that unconditionally
6115 return True rather than accounting for the values covered by the
6116 'others' choice).
6117 * sem_eval.ads (Subtypes_Statically_Compatible): Add formal
6118 Formal_Derived_Matching.
6119 (Subtypes_Statically_Match): Add formal Formal_Derived_Matching.
6120 * sem_eval.adb (Subtypes_Statically_Compatible): Pass new
6121 Formal_Derived_Matching formal to Subtypes_Statically_Match.
6122 (Subtypes_Statically_Match): Suppress the Object_Size matching
6123 test in the case where Formal_Derived_Matching is True.
6124 * sem_ch12.adb (Validate_Derived_Type_Instance): Pass
6125 True for Formal_Derived_Matching_Formal on the call to
6126 Subtypes_Statically_Compatible.
6127
9fbb94f2
EB
61282014-02-23 Eric Botcazou <ebotcazou@adacore.com>
6129
6130 * gcc-interface/Make-lang.in (ADA_TOOLS_FLAGS_TO_PASS): Robustify.
6131
086de490
EB
61322014-02-23 Eric Botcazou <ebotcazou@adacore.com>
6133
6134 * gcc-interface/utils2.c (build_simple_component_ref): Fix formatting.
6135 Look through a conversion between original and packable version to get
6136 the base object.
6137 (build_component_ref): Rework comment and fix formatting.
6138
350b83cc
AC
61392014-02-20 Sergey Rybin <rybin@adacore.com frybin>
6140
6141 * gnat_ugn.texi, vms_data.ads (gnatelim): Add description of
6142 project-specific options.
6143
61442014-02-20 Ed Schonberg <schonberg@adacore.com>
6145
6146 * a-cbdlli.adb (Insert): When capacity exceeded, raise Capacity_Error,
6147 not Constraint_Error.
6148 * a-cbmutr.adb (Append_Child, Insert_Child, Prepend_Child): Ditto.
6149 * sem_ch5.adb: Code clean up.
6150
8880426d
AC
61512014-02-20 Hristian Kirtchev <kirtchev@adacore.com>
6152
6153 * sem_prag.adb (Usage_Error): Remove local
6154 constant Typ. Remove the specialized diagnostics for unconstrained
6155 or tagged items as those are not part of the explicit input set
6156 of the related subprogram and should not be flagged.
6157
61582014-02-20 Ed Schonberg <schonberg@adacore.com>
6159
6160 * sem_attr.adb: Add guard to preserve all errors.
6161
61622014-02-20 Vincent Celier <celier@adacore.com>
6163
6164 * switch-m.adb (Normalize_Compiler_Switches): Take into account
6165 switches that are recorded in ALI files: -gnateA, -gnateE,
6166 -gnateF, -gnateinn, -gnateu, -gnateV and -gnateY.
6167
61682014-02-20 Ed Schonberg <schonberg@adacore.com>
6169
6170 * sem_ch5.adb (Analyze_Iterator_Specification): Check legality
6171 of an element iterator form over a formal container with an
6172 Iterable aspect.
6173 * exp_ch5.adb (Build_Formal_Container_Iteration): Utility
6174 to create declaration and loop statements for both forms of
6175 container iterators.
6176 (Expand_Formal_Container_Element_Iterator): New procedure
6177 to handle loops of the form "for E of C" when C is a formal
6178 container.
6179 (Expand_Formal_Container_Iterator): Code cleanup.
6180
46de64ca
AC
61812014-02-20 Hristian Kirtchev <kirtchev@adacore.com>
6182
6183 * sem_prag.adb (Add_Item_To_Name_Buffer): New routine.
6184 (Analyze_Contract_Case): Remove the use of
6185 "may". Replace "aspect Contract_Cases" to avoid categorization
6186 of aspect vs pragma.
6187 (Analyze_External_Property_In_Decl_Part): Remove the use of "formal".
6188 (Analyze_Global_Item): Remove
6189 the use of "formal", specify the subprogram. Split the
6190 error message about a state with visible refinement into
6191 two. Remove the use of "global" from "volatile global item".
6192 (Analyze_Initialization_Item): Ensure that the SPARK RM reference
6193 is on one line.
6194 (Analyze_Input_Output): Update the call to
6195 Check_Mode. Specify the duplicated item. Reword the error
6196 message concerning an input of a null output list. Use "\"
6197 for error message continuation.
6198 (Analyze_Part_Of): Remove
6199 the use of "may". Use "\" for error message continuation.
6200 (Analyze_Refined_Depends_In_Decl_Part): Update the error
6201 message concerning a useless refinement to match the format
6202 of Refined_Global.
6203 (Analyze_Refined_Global_In_Decl_Part): Reword the error message
6204 concerning a useless refinement.
6205 (Analyze_Refinement_Clause): Use "\" for error message continuation.
6206 (Check_Constituent_Usage): Use "\" for error message continuation.
6207 (Check_Dependency_Clause): Use "\" for error message continuation.
6208 (Check_Matching_Constituent): Use "\" for error message continuation.
6209 (Check_Missing_Part_Of): Use "\" for error message continuation.
6210 (Check_Mode): Renamed to
6211 Check_Role. Update the comment on usage. Redo the error reporting
6212 to use Role_Error.
6213 (Check_Mode_Restriction_In_Enclosing_Context): Use "\" for error
6214 message continuation.
6215 (Find_Mode): Renamed to Find_Role. Update the parameter profile along
6216 with comment on usage. Update all occurrences of Is_Input and Is_Output.
6217 (Inconsistent_Mode_Error): Use "\" for error message continuation.
6218 (Input_Match): Use "\" for error message continuation.
6219 (Role_Error): New routine.
6220 (Set_Convention_From_Pragma): Use "\" for error message continuation.
6221 (Usage_Error): Add local variable Error_Msg. Build specialized error
6222 message showcasing the offending item kind. Redo the diagnostics for
6223 unconstrained types.
6224
62252014-02-20 Ed Schonberg <schonberg@adacore.com>
6226
6227 * exp_util.adb (Is_Iterated_Container): Use high-level primitives
6228 to determine whether a type is a container type, rather than
6229 examining only its type declaration, so that subtypes and derived
6230 types are handled properly.
6231
62322014-02-20 Sergey Rybin <rybin@adacore.com frybin>
6233
6234 * gnat_ugn.texi: gnatmetric: add description of project-specific
6235 options.
6236
62372014-02-20 Ed Schonberg <schonberg@adacore.com>
6238
6239 * sem_attr.adb (Analyze_Attribute, case 'Update): Verify that
6240 all choices in an association for a record type have the same
6241 type, as is done for record aggregates.
6242
3e586e10
AC
62432014-02-20 Robert Dewar <dewar@adacore.com>
6244
6245 * a-cborma.adb, a-cbhama.adb, a-cbdlli.adb, a-cbmutr.adb: Use pragma
6246 Unmodified rather than Warnings (Off). Make comments
6247 uniform in the four affected units.
6248
62492014-02-20 Robert Dewar <dewar@adacore.com>
6250
6251 * sem_ch13.adb (Analyze_Attribute_Definition_Clause, case
6252 Object_Size): For non-scalar types allow any value that is a
6253 multiple of 8.
6254 * gnat_rm.texi: Document Object_Size for composites more clearly.
6255
62562014-02-20 Yannick Moy <moy@adacore.com>
6257
6258 * sem_util.ads, sem_util.adb (Default_Initialization): Remove function.
6259
62602014-02-20 Ed Schonberg <schonberg@adacore.com>
6261
6262 * stand.ads: Raise_Type: new predefined entity, used as the type
6263 of a Raise_Expression prior to resolution.
6264 * cstand.adb: Build entity for Raise_Type.
6265 * sem_ch11.adb (Analyze_Raise_Expression): use Raise_Type as the
6266 initial type of the node.
6267 * sem_type.adb (Covers): Raise_Type is compatible with all
6268 other types.
6269 * sem_res.adb (Resolve): Remove special handling of Any_Type on
6270 Raise_Expression nodes.
6271 (Resolve_Raise_Expression): Signal ambiguity if the type of the
6272 context is still Raise_Type.
6273
7f568bfa
AC
62742014-02-20 Robert Dewar <dewar@adacore.com>
6275
6276 * sem_ch12.adb (Validate_Access_Type_Instance): Add message if
6277 mismatching predicates.
6278 * sem_ch6.adb (Check_Conformance): Give better messages on
6279 predicate mismatch.
6280 * sem_eval.adb (Predicates_Match): Move to spec.
6281 * sem_eval.ads (Predicates_Match): Moved here from body.
6282
62832014-02-20 Ed Schonberg <schonberg@adacore.com>
6284
6285 * a-cbmutr.adb: Use default value in Insert_Child.
6286
308aab0b
AC
62872014-02-20 Vincent Celier <celier@adacore.com>
6288
6289 * gnatcmd.adb, make.adb, prj-makr.adb, clean.adb: Call
6290 Stringt.Initialize in all project aware tools.
6291
62922014-02-20 Doug Rupp <rupp@adacore.com>
6293
6294 * gnat_ugn.texi: Document gnatbind -X option.
6295 * vms_data.ads: Minor warnings documentation reformatting.
6296
62972014-02-20 Ed Schonberg <schonberg@adacore.com>
6298
6299 * exp_ch3.adb (Expand_Freeze_Array_Type): Only create invariant
6300 procedure for a base type.
6301
63022014-02-20 Robert Dewar <dewar@adacore.com>
6303
6304 * sem_ch4.adb (Analyze_Case_Expression): Get type from first
6305 expression with type info.
6306 * sem_ch13.adb: Minor reformatting.
6307 * sem_eval.adb (Subtypes_Statically_Match): Make sure we return
6308 False if predicates do not match on the two types.
6309
63102014-02-20 Arnaud Charlet <charlet@adacore.com>
6311
6312 * sem_prag.adb (Analyze_Pragma [pragma Attach_Handler]):
6313 In Relaxed_RM_Semantics mode, allow any static integer value,
6314 for compatibility with other compilers.
6315
0f361206
AC
63162014-02-20 Vincent Celier <celier@adacore.com>
6317
6318 * errutil.adb (Initialize): Properly initialize entry in table
6319 Warnings when warnings are suppressed.
6320
63212014-02-20 Robert Dewar <dewar@adacore.com>
6322
6323 * s-os_lib.ads: Add warning about non-portability of Rename_File.
6324 * sem_util.ads, sem_util.adb (Is_Junk_Name): New function.
6325 * sem_warn.adb: Use Is_Junk_Name to suppress some warnings.
6326 * gnat_ugn.texi: Document no warnings on junk variable names.
6327 * layout.adb: Minor code reorganization (use Ekind_In).
6328 * stringt.adb: Move initialization of Null_String_Id to Initialize
6329 routine.
6330
63312014-02-20 Ed Schonberg <schonberg@adacore.com>
6332
6333 * sem_ch13.adb: Initialize optional Element_Id.
6334
c0cdbd39
AC
63352014-02-20 Robert Dewar <dewar@adacore.com>
6336
6337 * s-os_lib.ads (Rename_File): Minor commment addition.
6338
63392014-02-20 Thomas Quinot <quinot@adacore.com>
6340
6341 * einfo.ads: Minor reformatting.
6342
63432014-02-20 Hristian Kirtchev <kirtchev@adacore.com>
6344
6345 * aspects.adb (Exchange_Aspects): New routine.
6346 * aspects.ads (Exchange_Aspects): New routine.
6347 * atree.adb (Rewrite): Do not check whether the save node has
6348 aspects as it never will, instead check the node about to be clobbered.
6349 * einfo.adb (Write_Field25_Name): Abstract_States can appear in
6350 entities of generic packages.
6351 * sem_ch6.adb (Analyze_Expression_Function): Fix the parent
6352 pointer of an aspect specification list after rewriting takes place.
6353 * sem_ch7.adb (Analyze_Package_Body_Helper): Swap the aspect
6354 specifications of the generic template and the copy used for analysis.
6355 * sem_ch12.adb (Analyze_Generic_Package_Declaration): Swap
6356 the aspect specifications of the generic template and the
6357 copy used for analysis.
6358 (Analyze_Package_Instantiation): Propagate the aspect specifications
6359 from the generic template to the instantiation.
6360 (Build_Instance_Compilation_Unit_Nodes): Propagate the aspect
6361 specifications from the generic template to the instantiation.
6362 * sem_ch13.adb (Analyze_Aspect_Specifications): Handle aspects
6363 Abstract_State, Initializes and Initial_Condition when they
6364 apply to a package instantiation.
6365
63662014-02-20 Robert Dewar <dewar@adacore.com>
6367
6368 * stringt.adb: Add call to Initialize in package initialization.
6369
fe4552f4
AC
63702014-02-20 Robert Dewar <dewar@adacore.com>
6371
6372 * a-crbtgk.adb, a-cihama.adb, a-coinve.adb, a-ciorse.adb, a-crbtgo.adb,
6373 a-cidlli.adb, a-cimutr.adb, a-cihase.adb, a-cohama.adb, a-coorse.adb,
6374 a-chtgke.adb, a-chtgop.adb, a-comutr.adb, a-ciorma.adb, a-cobove.adb,
6375 a-convec.adb, a-cohase.adb, a-chtgbk.adb, a-chtgbo.adb: Minor
6376 reformatting.
6377
63782014-02-20 Bob Duff <duff@adacore.com>
6379
6380 * s-os_lib.ads: Minor: Remove incorrect comment.
6381
63822014-02-20 Robert Dewar <dewar@adacore.com>
6383
6384 * sem_elab.adb (Check_Elab_Assign): Clearer warning message.
6385
63862014-02-20 Ed Schonberg <schonberg@adacore.com>
6387
6388 * a-cborma.adb (Assign): When creating a node without a specified
6389 element, insert an uninitialized element in the map, because
6390 the instance may provide an element type with a default
6391 initialization, e.g a scalar with a Default_Value aspect.
6392 * a-cbhama.adb (Assign_Key): Remove useless Allocate procedure.
6393 (Insert): In the version without explicit element, provide an
6394 uninitialized element, as above.
6395 * a-cbdlli.adb (Append): In the version without explicit element,
6396 provide an uninitalized element, as above.
6397 (Allocate): Remove unused version.
6398
3730c4a0
AC
63992014-02-20 Robert Dewar <dewar@adacore.com>
6400
6401 * sem_elab.adb: Minor code reorganization (use Nkind_In).
6402 * stringt.adb: Remove temporary pragma Warnings (Off).
6403 * stringt.ads: Add pragma Elaborate_Body to ensure initialization
6404 of Null_String_Id.
6405
64062014-02-20 Matthew Heaney <heaney@adacore.com>
6407
6408 * a-chtgbk.adb (Replace): Use correct offset when calculating bucket
6409 index.
6410
0c7e0c32
AC
64112014-02-20 Ed Schonberg <schonberg@adacore.com>
6412
6413 * sem_ch5.adb (Analyze_Iterator_Specification): Initialize
6414 properly the cursor type for subsequent volatile testing in SPARK
6415 mode, when domain is a formal container with an Iterabe aspect.
6416
64172014-02-20 Robert Dewar <dewar@adacore.com>
6418
6419 * errout.adb (Set_Warnings_Mode_Off): Add Reason argument.
6420 (Set_Specific_Warning_Off): Add Reason argument.
6421 * errout.ads (Set_Warnings_Mode_Off): Add Reason argument.
6422 (Set_Specific_Warning_Off): Add Reason argument.
6423 * erroutc.adb (Warnings_Entry): Add Reason field
6424 (Specific_Warning_Entry): Add Reason field.
6425 (Warnings_Suppressed): return String_Id for Reason.
6426 (Warning_Specifically_Suppressed): return String_Id for Reason.
6427 * erroutc.ads (Warnings_Entry): Add Reason field.
6428 (Specific_Warning_Entry): Add Reason field.
6429 (Set_Specific_Warning_Off): Add Reason argument.
6430 (Set_Warnings_Mode_Off): Add Reason argument.
6431 (Warnings_Suppressed): return String_Id for Reason.
6432 (Warning_Specifically_Suppressed): return String_Id for Reason.
6433 * errutil.adb (Warnings_Suppressed): returns String_Id for Reason
6434 (Warning_Specifically_Suppressed): returns String_Id for Reason
6435 * gnat_rm.texi: Document that Warning parameter is string literal
6436 or a concatenation of string literals.
6437 * par-prag.adb: New handling for Reason argument.
6438 * sem_prag.adb (Analyze_Pragma, case Warning): New handling
6439 for Reason argument.
6440 * sem_util.ads, sem_util.adb (Get_Reason_String): New procedure.
6441 * sem_warn.ads (Warnings_Off_Entry): Add reason field.
6442 * stringt.adb: Set Null_String_Id.
6443 * stringt.ads (Null_String_Id): New constant.
6444
e4494292
RD
64452014-02-20 Robert Dewar <dewar@adacore.com>
6446
6447 * einfo.ads: Minor comment addition: Etype of package is
6448 Standard_Void_Type.
6449 * checks.adb, exp_aggr.adb, exp_atag.adb, exp_attr.adb, exp_ch13.adb,
6450 exp_ch2.adb, exp_ch3.adb, exp_ch4.adb, exp_ch5.adb, exp_ch6.adb,
6451 exp_ch7.adb, exp_ch9.adb, exp_dbug.adb, exp_disp.adb, exp_imgv.adb,
6452 exp_intr.adb, exp_prag.adb, exp_sel.adb, exp_strm.adb, exp_util.adb,
6453 freeze.adb, rtsfind.adb, sem_aggr.adb, sem_attr.adb, sem_ch10.adb,
6454 sem_ch12.adb, sem_ch13.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
6455 sem_ch6.adb, sem_ch8.adb, sem_dim.adb, sem_prag.adb, sem_res.adb,
6456 sem_util.adb, tbuild.adb, tbuild.ads: Remove New_Reference_To.
6457 Replace all calls with calls to New_Occurrence_Of.
6458
64592014-02-20 Robert Dewar <dewar@adacore.com>
6460
6461 * par-util.adb (Ignore, case of right paren): Make this a
6462 serious error.
6463
d7cb47b4
AC
64642014-02-19 Robert Dewar <dewar@adacore.com>
6465
6466 * sem_ch5.adb, sem_prag.adb, sem_attr.adb: Minor reformatting.
6467 * debug.adb: Remove -gnatd.X switch, no longer used.
6468 * styleg.adb (Check_Then): Remove check of -gnatd.X, check is
6469 now always made.
6470
64712014-02-19 Bob Duff <duff@adacore.com>
6472
6473 * g-socket.ads: Minor: Correct some comments.
6474
53f697ee
AC
64752014-02-19 Ed Schonberg <schonberg@adacore.com>
6476
6477 * sem_ch5.adb: Inhibit iterator rewriting in ASIS mode.
6478
64792014-02-19 Arnaud Charlet <charlet@adacore.com>
6480
6481 * sem_ch13.adb (Analyze_Aspect_Specifications): Do not generate
6482 an error on out of range priorities if Relaxed_RM_Semantics.
6483 * sem_prag.adb (Analyze_Pragma): Ditto.
6484
64852014-02-19 Bob Duff <duff@adacore.com>
6486
6487 * sem_attr.adb (Resolve_Attribute): Detect the case of F'Access
6488 where F denotes the renaming of an enumeration literal, and
6489 issue a specialized error message.
6490
47fb6ca8
AC
64912014-02-19 Matthew Heaney <heaney@adacore.com>
6492
6493 * a-chtgop.ads (Checked_Index): New operation.
6494 (Next): Changed mode of hash table.
6495 * a-chtgop.adb (Adjust, Delete_Node_Sans_Free): Detect tampering
6496 (Generic_Read, Reserve_Capacity): Ditto.
6497 (Generic_Equal): Detect tampering.
6498 (Next): Changed mode of hash table, detect tampering.
6499 * a-chtgke.ads (Checked_Index, Checked_Equivalent_Keys): New
6500 operation.
6501 (Find): Changed mode of hash table.
6502 * a-chtgke.adb (Checked_Equivalent_Keys): New operation
6503 (Delete_Key_Sans_Free, Generic_Conditional_Insert): Detect
6504 tampering.
6505 (Find): Changed mode of hash table, check for tampering.
6506 (Generic_Replace_Element): Check for tampering.
6507 * a-chtgbk.ads (Checked_Index, Checked_Equivalent_Keys): New operation.
6508 * a-chtgbk.adb (Checked_Index, Checked_Equivalent_Keys): New
6509 operation (Delete_Key_Sans_Free, Generic_Conditional_Insert):
6510 Detect tampering.
6511 (Find, Generic_Replace_Element): Check for tampering.
6512 * a-chtgbo.ads (Checked_Index): New operation.
6513 * a-chtgbo.adb (Checked_Index): New operation
6514 (Delete_Node_Sans_Free, Generic_Equal): Detect tampering.
6515 (Generic_Read, Next): Ditto.
6516 * a-cohase.adb, a-cihase.adb (Is_In): Changed mode of hash
6517 table (Difference, Intersection): Use variable view of
6518 source, detect tampering (Find, Is_Subset, Overlap): Use
6519 variable view of container (Symmetric_Difference, Union):
6520 Detect tampering (Vet): Use Checked_Index to detect tampering
6521 (Constant_Reference, Element, Find): Use variable view of
6522 container.
6523 (Update_Element_Preserving_Key): Detect tampering.
6524 * a-cbhase.adb (Difference, Find, Is_In): Use variable view
6525 of container.
6526 (Is_Subset): Ditto.
6527 (Equivalent_Sets, Overlap): Use Node's Next component.
6528 (Vet): Use Checked_Index to detect tampering.
6529 (Constant_Reference, Element, Find): Use variable view of container.
6530 (Update_Element_Preserving_Key): Detect tampering.
6531 * a-cohama.adb, a-cihama.adb, a-cbhama.adb (Constant_Reference,
6532 Element, Find): Use variable view of container.
6533 (Reference): Rename hash table component.
6534 (Vet): Use Checked_Index to detect tampering.
6535
65362014-02-19 Arnaud Charlet <charlet@adacore.com>
6537
6538 * adabkend.adb (Scan_Compiler_Arguments): Add missing handling
6539 of -nostdinc.
6540
65412014-02-19 Thomas Quinot <quinot@adacore.com>
6542
6543 * tbuild.adb (New_Occurrence_Of, New_Rerefence_To): Guard
6544 against calls without Def_Id.
6545
65462014-02-19 Claire Dross <dross@adacore.com>
6547
6548 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads, a-cforse.ads,
6549 a-cofove.ads: Add global annotations to subprograms.
6550
65512014-02-19 Hristian Kirtchev <kirtchev@adacore.com>
6552
6553 * sem_prag.adb (Analyze_Initial_Condition_In_Decl_Part): Remove
6554 constants Errors, Pack_Id and Pack_Init. Remove variable Vars.
6555 Initial_Condition no longer requires the presence of pragma
6556 Initialized. Do not try to diagnose whether all variables mentioned in
6557 pragma Initializes also appear in Initial_Condition.
6558 (Collect_Variables): Removed.
6559 (Match_Variable): Removed.
6560 (Match_Variables): Removed.
6561 (Report_Unused_Variables): Removed.
6562
65632014-02-19 Thomas Quinot <quinot@adacore.com>
6564
6565 * gnat_rm.texi (pragma Stream_Convert): Minor rewording.
6566
13f39091
AC
65672014-02-19 Robert Dewar <dewar@adacore.com>
6568
6569 * sem_util.adb, sem_util.ads, prj-conf.adb, s-os_lib.adb: Minor
6570 reformatting.
6571
65722014-02-19 Vincent Celier <celier@adacore.com>
6573
6574 * prj-part.adb (Parse_Single_Project): Use the fully resolved
6575 project path, with all symbolic links resolved, to check if the
6576 same project is imported with a different unresolved path.
6577 * prj-tree.ads (Project_Name_And_Node): Component Canonical_Path
6578 changed to Resolved_Path to reflect that all symbolic links
6579 are resolved.
6580
110e2969
AC
65812014-02-19 Ed Schonberg <schonberg@adacore.com>
6582
6583 * sem_util.ads, sem_util.adb (Get_Cursor_Type): Moved to sem_util
6584 from sem_ch13, for use elsewhere.
6585 * sem_ch13.adb (Get_Cursor_Type): Moved to sem_util.
6586 * sem_ch5.adb (Analyze_Iterator_Specification): Set properly the
6587 cursor type on the loop variable when the iteration is over o
6588 formal container.
6589
65902014-02-19 Vincent Celier <celier@adacore.com>
6591
6592 * prj-conf.adb (Add_Default_GNAT_Naming_Scheme): Add declaration
6593 for an empty Target (Check_Target): Never fail when an empty
6594 target is declared in the configuration project.
6595
65962014-02-19 Ed Schonberg <schonberg@adacore.com>
6597
6598 * sem_prag.adb (Check_Arg_Is_Local_Name): Argument is local if
6599 the pragma comes fron a predicate aspect and the context is a
6600 record declaration within the scope that declares the type.
6601
66022014-02-19 Robert Dewar <dewar@adacore.com>
6603
6604 * gnat_rm.texi: Minor clarifications.
6605 * expander.adb, sem_aggr.adb: Add comments.
6606
ffdeb702
AC
66072014-02-19 Ed Schonberg <schonberg@adacore.com>
6608
6609 * sem_prag.adb (Check_Arg_Is_Local_Name): For an aspect that
6610 applies to a subprogram body, the name is the current scope,
6611 rather than being declared in the current scope.
6612 (Analyze_Pragma, case No_Return): Handle properly a No_Return
6613 aspect applied to a subprogram body.
6614
66152014-02-19 Ed Schonberg <schonberg@adacore.com>
6616
6617 * sem_ch13.adb (Resolve_Iterable_Operation): Improve resolution
6618 of overloaded subprograms, and fix bug in handling of primitive
6619 operation Element.
6620
66212014-02-19 Pascal Obry <obry@adacore.com>
6622
6623 * s-os_lib.adb: Minor reformatting.
6624
66252014-02-19 Yannick Moy <moy@adacore.com>
6626
6627 * expander.adb (Expand): Do nothing inside generics.
6628 * sem_aggr.adb (Aggregate_Constraint_Checks): Do nothing inside
6629 generics.
6630
66312014-02-19 Yannick Moy <moy@adacore.com>
6632
6633 * exp_ch2.adb: Remove useless 'with' of unit Uintp.
6634
edbd98c4
AC
66352014-02-19 Robert Dewar <dewar@adacore.com>
6636
6637 * sem_ch3.adb, style.adb, sem_prag.adb, sem_ch13.adb: Minor reformatting
6638 * a-sequio.adb: Remove useless pragma Extensions_Allowed (no
6639 longer needed).
6640
66412014-02-19 Claire Dross <dross@adacore.com>
6642
6643 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
6644 a-cforse.ads, a-cofove.ads: Add Iterable aspect to formal containers.
6645
476b301a
AC
66462014-02-19 Hristian Kirtchev <kirtchev@adacore.com>
6647
6648 * sem_ch3.adb (Analyze_Declarations): Analyze
6649 a package contract at the end of the private declarations (if
6650 applicable), otherwise analyze it and the end of the visible
6651 declarations.
6652
66532014-02-19 Ed Schonberg <schonberg@adacore.com>
6654
6655 * style.adb (Missing_Overriding): If subprogram is an
6656 instantiation, place warning on the instance node itself,
6657 without mention of the original generic. Do not emit message
6658 if explicit Ada version is older than the introduction of the
6659 overriding indicator.
6660
a6ce7e76
AC
66612014-02-19 Yannick Moy <moy@adacore.com>
6662
6663 * gnat_rm.texi: Doc clarifications.
6664
66652014-02-19 Yannick Moy <moy@adacore.com>
6666
6667 * exp_util.adb (Remove_Side_Effects): Do not remove side-effects
6668 inside a generic.
6669
66702014-02-19 Ed Schonberg <schonberg@adacore.com>
6671
6672 * sem_ch13.adb (Get_Cursor_Type): Obtain cursor type from
6673 specified First primitive, rather than by name.
6674 (Validate_Iterable_Aspect, Resolve_Iterable_Operation): Use it,
6675 and extend error checking for missing primitives and incorrect
6676 signatures.
6677
66782014-02-19 Ed Schonberg <schonberg@adacore.com>
6679
6680 * sem_ch3.adb (Check_Pragma_Implemented): Detect additional
6681 errors when a Synchronization aspect on an overriding protected
6682 operation does not match the given aspect on the overridden
6683 operation of an ancestor interface.
6684
66852014-02-19 Hristian Kirtchev <kirtchev@adacore.com>
6686
6687 * sem_prag.adb (Check_Loop_Pragma_Grouping): New routine.
6688 (Check_Loop_Pragma_Placement): Update
6689 comment on usage. Remove local variables Orig_Stmt and
6690 Within_Same_Sequence. Check that the current Loop_Invariant or
6691 Loop_Variant pragma is grouped together with other such pragmas.
6692 (Is_Loop_Pragma): New routine.
6693 (Prev_In_Loop): Removed.
6694
0b7f0f0e
AC
66952014-02-19 Robert Dewar <dewar@adacore.com>
6696
6697 * par-ch6.adb (P_Return): For extended return, end column lines
6698 up with RETURN.
6699 * par.adb: Minor documentation clarification.
6700
67012014-02-19 Yannick Moy <moy@adacore.com>
6702
6703 * sem_prag.adb (Check_Loop_Pragma_Placement): Add check
6704 that Loop_Invariant and Loop_Variant appear consecutively.
6705 * gnat_rm.texi Update documentation of Loop_Invariant and
6706 Loop_Variant pragmas.
6707
67082014-02-19 Robert Dewar <dewar@adacore.com>
6709
6710 * debug.adb: Document -gnatd.X.
6711 * par-ch5.adb (P_If_Statement): Always check THEN, even if not
6712 first token
6713 (Check_Then_Column): Ditto.
6714 * styleg.adb (Check_Then): Allow THEN on line after IF.
6715 (Check_Then): Check THEN placement under control of -gnatd.X
6716 * styleg.ads (Check_Then): Now called even if THEN is not first
6717 token on line.
6718 * stylesw.ads (Style_Check_If_Then_Layout): Document new
6719 relaxed rules.
6720 * gnat_ugn.texi: For -gnatyi, THEN can now be on line after IF.
6721
67222014-02-19 Robert Dewar <dewar@adacore.com>
6723
6724 * a-cfhama.adb, a-cfhase.adb, a-cforse.adb, a-cofove.adb, a-ngcefu.adb,
6725 a-teioed.adb, a-wtedit.adb, a-ztedit.adb, exp_ch5.adb, inline.adb,
6726 prj-pp.adb, prj-tree.adb, sem_ch12.adb, sem_ch8.adb,
6727 vms_conv.adb: Fix bad layout of IF statements
6728
e7cff5af
RD
67292014-02-19 Robert Dewar <dewar@adacore.com>
6730
6731 * exp_util.adb (Side_Effect_Free): Scalar if expressions can be SEF.
6732
a767d69b
AC
67332014-02-19 Robert Dewar <dewar@adacore.com>
6734
6735 * exp_util.adb: Update comments.
6736
67372014-02-19 Doug Rupp <rupp@adacore.com>
6738
6739 * bindgen.adb (Gen_Adainit) [VMS] New global Float_Format.
6740 * init.c (__gl_float_format): [VMS] New global.
6741 (__gnat_set_features): Call FP_CONTROL to set FPSR for the float
6742 representation in effect.
6743
67442014-02-19 Hristian Kirtchev <kirtchev@adacore.com>
6745
6746 * exp_ch6.adb Add with and use clause for Exp_Prag.
6747 (Expand_Contract_Cases): Relocated to Exp_Prag.
6748 * exp_ch6.ads (Expand_Contract_Cases): Relocated to Exp_Prag.
6749 * exp_prag.adb Add with and use clauses for Checks and Validsw.
6750 (Expand_Contract_Cases): Relocated from Exp_Ch6. Update the
6751 structure of the expanded code to showcase the evaluation of
6752 attribute 'Old prefixes. Add local variable Old_Evals. Expand
6753 any attribute 'Old references found within a consequence. Add
6754 circuitry to evaluate the prefixes of attribute 'Old that
6755 belong to a selected consequence.
6756 (Expand_Old_In_Consequence): New routine.
6757 * exp_prag.ads (Expand_Contract_Cases): Relocated from Exp_Ch6.
6758 * sem_attr.adb (Check_Use_In_Contract_Cases): Warn that a
6759 potentially unevaluated prefix is always evaluated.
6760
adb252d8
AC
67612014-02-19 Robert Dewar <dewar@adacore.com>
6762
6763 * exp_attr.adb (Expand_Min_Max_Attribute): Use Insert_Declaration
6764 (Expand_Min_Max_Attribute): Use Matching_Standard_Type.
6765 * exp_ch4.adb (Expand_N_Expression_With_Actions): Remove special
6766 handling for the case of Modify_Tree_For_C, this approach did
6767 not work.
6768 * exp_util.adb (Matching_Standard_Type): New function
6769 (Side_Effect_Free): New top level functions (from
6770 Remove_Side_Effects).
6771 * exp_util.ads (Side_Effect_Free): New top level functions
6772 (moved from body).
6773 * sinfo.ads: Minor comment updates.
6774
67752014-02-19 Ed Schonberg <schonberg@adacore.com>
6776
6777 * exp_ch6.adb (Expand_Simple_Function_Return): If return
6778 type is unconstrained and uses the secondary stack, mark the
6779 enclosing function accordingly, to ensure that the value is not
6780 prematurely removed.
6781
67822014-02-19 Hristian Kirtchev <kirtchev@adacore.com>
6783
6784 * par.adb Alphabetize the routines in Par.Sync.
6785 (Resync_Past_Malformed_Aspect): New routine.
6786 * par-ch13.adb (Get_Aspect_Specifications): Alphabetize local
6787 variables. Code and comment reformatting. Detect missing
6788 parentheses on aspects [Refined_]Global and [Refined_]Depends
6789 with a non-null definition.
6790 * par-sync.adb: Alphabetize all routines in this separate unit.
6791 (Resync_Past_Malformed_Aspect): New routine.
6792
a0367005
RD
67932014-02-19 Robert Dewar <dewar@adacore.com>
6794
6795 * sem_eval.ads, sem_eval.adb (Subtypes_Statically_Match): Return False
6796 if Esize values do not match.
6797
e03f7ccf
AC
67982014-02-19 Yannick Moy <moy@adacore.com>
6799
6800 * sinfo.ads: Minor comment update.
6801
68022014-02-19 Hristian Kirtchev <kirtchev@adacore.com>
6803
6804 * atree.ads: Minor reformatting (change Entity_Info to Einfo).
6805
68062014-02-19 Thomas Quinot <quinot@adacore.com>
6807
6808 * exp_ch7.adb (Find_Node_To_Be_Wrapped): An assignment statement
6809 that has the No_Ctrl_Actions flag is a suitable node to be
6810 wrapped if the assigned expression has no finalization actions.
6811 * sem_eval.adb (Eval_Entity_Name): For a compile time known
6812 boolean value, mark the corresponding condition SCO as constant.
6813
68142014-02-19 Robert Dewar <dewar@adacore.com>
6815
6816 * exp_util.adb: Minor reformatting.
6817 * exp_util.ads (Matching_Standard_Type): New function.
6818 * exp_ch7.adb: Minor reformatting.
6819
68202014-02-19 Ed Schonberg <schonberg@adacore.com>
6821
6822 * sem_ch13.adb (Get_Cursor_Type): Use scope of iterable type
6823 to find declaration for Cursor, to handle properly the case of
6824 a discriminated iterable type.
6825
68262014-02-19 Vincent Celier <celier@adacore.com>
6827
6828 * gnatcmd.adb (GNATCmd): Always replace the object dirs of
6829 imported library projects with the library ALI dirs, when setting
6830 the object paths.
6831 * prj-env.ads (Ada_Objects_Path): Correct comments about
6832 argument Including_Libraries.
6833
4877d85f
AC
68342014-02-19 Gary Dismukes <dismukes@adacore.com>
6835
6836 * gnat_rm.texi: Minor spelling fixes.
6837
68382014-02-19 Doug Rupp <rupp@adacore.com>
6839
6840 * init.c: Remove unneeded code.
6841 * fe.h (Float_Format): New macro
6842 * gcc-interface/trans.c (gigi): On VMS, set vms_float_format.
6843
f660fba6
AC
68442014-02-19 Hristian Kirtchev <kirtchev@adacore.com>
6845
6846 * sem_prag.adb (Check_Refined_Global_Item):
6847 A state or variable acts as a constituent only it is part of an
6848 encapsulating state and the state has visible refinement.
6849
68502014-02-19 Ed Schonberg <schonberg@adacore.com>
6851
6852 * sem_ch6.adb (Analyze_Subprogram_Contract): Do not warn on a
6853 postcondition for a function when the expression does not mention
6854 'Result but the function has in-out parameters.
6855
68562014-02-19 Robert Dewar <dewar@adacore.com>
6857
6858 * gnat_rm.texi: Add documentation on Value_Size forcing biased
6859 representation.
6860
b4f149c2
AC
68612014-02-19 Hristian Kirtchev <kirtchev@adacore.com>
6862
6863 * lib-xref.ads Remove the small table of letter and symbol usage as we
6864 already have one.
6865
68662014-02-19 Hristian Kirtchev <kirtchev@adacore.com>
6867
6868 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Emit specific error
6869 messages depending on the offending misplaced aspect specifications.
6870 (Diagnose_Misplaced_Aspect_Specifications): New routine.
6871
68722014-02-19 Ed Schonberg <schonberg@adacore.com>
6873
6874 * sem_ch13.adb (Get_Cursor): Utility to retrieve cursor type
6875 for iterable aspect primitives.
6876 (Resolve_Iterable_Operation): Use expected signature of iterable
6877 aspect to resolve primitive when overloading is present.
6878 (Validate_Iterable_Aspect, Analyze_Aspects_At_Freeze_Point): use it.
6879 (Check_Signature): Removed.
6880
ddd2bec5
AC
68812014-02-19 Yannick Moy <moy@adacore.com>
6882
6883 * sem_ch10.adb (Analyze_Proper_Body): Issue error on missing
6884 subunit in GNATprove_Mode.
6885 * sinfo.ads (GNATprove_Mode): Document error issued in GNATprove_Mode.
6886
68872014-02-19 Hristian Kirtchev <kirtchev@adacore.com>
6888
6889 * lib-xref.ads Alphabetize the contents of table
6890 Xref_Entity_Letters. Add an entry in table Xref_Entity_Letters
6891 for E_Abstract_State. List all letters and symbols in use.
6892 * sem_prag.adb (Analyze_Abstract_State): Update all calls
6893 to Create_Abstract_State to reflect the new signature.
6894 (Create_Abstract_State): Change subprogram profile and update
6895 the comment on usage. Use the proper location of the state
6896 declaration when creating a new abstract state entity. Do not
6897 generate an external name, but simply reuse the name coming from
6898 the state declaration.
6899
3a845e07
RD
69002014-02-19 Robert Dewar <dewar@adacore.com>
6901
6902 * exp_ch4.adb (Expand_N_Expression_With_Actions): Make sure
6903 declarations get properly inserted in Modify_Tree_For_C mode.
6904 * sinfo.ads: Minor comment addition.
6905
82d4f390
RD
69062014-02-19 Robert Dewar <dewar@adacore.com>
6907
6908 * par-ch9.adb, exp_ch5.adb, sem_ch5.adb, exp_attr.adb, sem_util.adb,
6909 sem_util.ads, sem_ch13.adb, sem_ch13.ads: Minor reformatting.
6910
dd2bf554
ES
69112014-02-19 Ed Schonberg <schonberg@adacore.com>
6912
6913 * style.adb (Missing_Overriding): Warning does not apply in
6914 language versions prior to Ada 2005.
6915 * snames.ads-tmpl: Add Name_Iterable and Attribute_Iterable.
6916 * sem_attr.adb: Add Attribute_Iterable where needed.
6917 * exp_attr.adb: ditto.
6918 * exp_ch5.adb (Expand_Formal_Container_Loop): New procedure to
6919 handle loops and quantified expressions over types that have an
6920 iterable aspect. Called from Expand_Iterator_Loop.
6921 * sem_ch5.adb (Analyze_Iterator_Specification): Recognize types
6922 with Iterable aspect.
6923 * sem_ch13.adb (Validate_Iterable_Aspect): Verify that the
6924 subprograms specified in the Iterable aspect have the proper
6925 signature involving container and cursor.
6926 (Check_Aspect_At_Freeze_Point): Analyze value of iterable aspect.
6927 * sem_ch13.ads (Validate_Iterable_Aspect): New subprogram.
6928 * sem_util.ads, sem_util.adb (Get_Iterable_Type_Primitive):
6929 New procedure to retrieve one of the primitives First, Last,
6930 or Has_Element, from the value of the iterable aspect of a
6931 formal container.
6932 (Is_Container_Element): Predicate to recognize expressions
6933 that denote an element of one of the predefined containers,
6934 for possible optimization. This subprogram is not currently
6935 used, pending ARG discussions on the legality of the proposed
6936 optimization. Worth preserving for eventual use.
6937 (Is_Iterator): Recognize formal container types.
6938 * aspects.ads, aspects.adb: Add Aspect_Iterable where needed.
6939
e0f63680
AC
69402014-02-19 Robert Dewar <dewar@adacore.com>
6941
6942 * exp_attr.adb (Expand_Min_Max_Attribute): New procedure
6943 (Expand_N_Attribute_Reference): Use this procedure for Min and Max.
6944 * exp_ch4.adb (Expand_N_Expression_With_Actions): Remove object
6945 declarations from list of actions.
6946 * output.ads, output.adb (Delete_Last_Char): New procedure.
6947 * sinfo.ads: Document handling of Mod and expression with actions
6948 in Modify_Tree_For_C mode.
6949
69502014-02-19 Ed Schonberg <schonberg@adacore.com>
6951
6952 * par-ch9.adb (P_Task): Add a null statement to produce a
6953 well-formed task body when due to a previous syntax error the
6954 statement list is empty.
6955
69562014-02-19 Hristian Kirtchev <kirtchev@adacore.com>
6957
6958 * sem_prag.adb (Check_Dependency_Clause): Account
6959 for the case where a state with a non-null refinement matches a
6960 null output list. Comment reformatting.
6961 (Inputs_Match): Copy a solitary input to avoid an assertion failure
6962 when trying to match the same input in multiple clauses.
6963
69642014-02-19 Gary Dismukes <dismukes@adacore.com>
6965
6966 * sem_attr.adb: Minor typo fix.
6967
2c9f8c0a
AC
69682014-02-18 Robert Dewar <dewar@adacore.com>
6969
6970 * cstand.adb (Build_Signed_Integer_Type): Minor change of formal
6971 from Int to Nat (Build_Unsigned_Integer_Type): New procedure
6972 (Create_Standard): Create new unsigned types.
6973 * exp_ch4.adb (Expand_N_Op_Mod): Expand mod in Modify_Tree_For_C
6974 mode (Expand_N_Reference): Removed, problematic and not needed
6975 for now.
6976 * exp_ch4.ads (Expand_N_Reference): Removed, problematic and
6977 not needed for now.
6978 * exp_util.ads, exp_util.adb (Power_Of_Two): New function.
6979 * expander.adb: Remove call to Expand_N_Reference (problematic,
6980 and not needed now).
6981 * sem_aux.ads, sem_aux.adb (Corresponding_Unsigned_Type): New function.
6982 * stand.adb: Read and write unsigned type entities.
6983 * stand.ads: Add new unsigned types.
6984
69852014-02-18 Hristian Kirtchev <kirtchev@adacore.com>
6986
6987 * sem_ch4.adb (Analyze_Call): Do not mark a function call
6988 as being inside an assertion expression as the flag is now removed.
6989 (Check_Ghost_Subprogram_Call): Do not query the
6990 In_Assertion_Expression flag as it is now removed, instead use
6991 a predicate function.
6992 * sem_elab.adb (Check_Internal_Call_Continue): Do not query the
6993 In_Assertion_Expression flag as it is now removed, instead use
6994 a predicate function.
6995 * sem_prag.ads: Add new table Assertion_Expression_Pragma.
6996 * sem_util.adb Add with and use clause for Sem_Prag.
6997 (In_Assertion_Expression_Pragma): New routine.
6998 * sem_util.ads (In_Assertion_Expression_Pragma): New routine.
6999 * sinfo.adb (In_Assertion_Expression): Removed.
7000 (Set_In_Assertion_Expression): Removed.
7001 * sinfo.ads Remove flag In_Assertion_Expression along with its
7002 use in nodes.
7003 (In_Assertion_Expression): Removed along with
7004 pragma Inline. (Set_In_Assertion_Expression): Removed along
7005 with pragma Inline.
7006
70072014-02-18 Sergey Rybin <rybin@adacore.com frybin>
7008
7009 * gnat_ugn.texi: gnatpp section: add note that '-j' cannot be
7010 used together with '-r', '-rf' or '-rnb' options.
7011
70122014-02-18 Hristian Kirtchev <kirtchev@adacore.com>
7013
7014 * sem_attr.adb (Analyze_Attribute): Comment
7015 and code reformatting. Use separate routines to check the
7016 legality of attribute 'Old in certain pragmas. Verify
7017 the use of 'Old, 'Result and locally declared entities
7018 within the prefix of 'Old.
7019 (Check_References_In_Prefix): New routine.
7020 (Check_Use_In_Contract_Cases): New routine.
7021 (Check_Use_In_Test_Case): New routine.
7022
3b821fe9
VC
70232014-02-18 Vincent Celier <celier@adacore.com>
7024
7025 * sem_aux.adb (Is_By_Reference_Type): For each components of
7026 a record type, check also if the component is volatile as it
7027 may have an aspect that makes it volatile. If it is, then the
7028 record type is a by reference type.
7029
365c8496
RD
70302014-02-18 Robert Dewar <dewar@adacore.com>
7031
7032 * exp_attr.adb: Minor reformatting.
7033 * exp_ch4.ads, exp_ch4.adb (Expand_N_Reference): New procedure.
7034 * exp_util.adb (Remove_Side_Effects): Add conditional expressions
7035 as another case where we don't generate N_Reference nodes for
7036 primitive types.
7037 * expander.adb (Expand): Add call to Expand_N_Reference.
7038
aa9b151a
AC
70392014-02-06 Hristian Kirtchev <kirtchev@adacore.com>
7040
7041 * sem_prag.adb (Analyze_Refined_Pragma): Remove
7042 local variable Pack_Spec. Refinement pragmas may now apply to
7043 bodies of both visible and private subprograms.
7044
70452014-02-06 Robert Dewar <dewar@adacore.com>
7046
7047 * exp_attr.adb (Expand_Loop_Entry_Attribute):
7048 Minor change (Attr => N) (Expand_Pred_Succ): New name
7049 Expand_Pred_Succ_Attribute (Expand_N_Attribute_Reference, case
7050 Max): Expand into if expression if Modify_Tree_For_C mode.
7051 (Expand_N_Attribute_Reference, case Min): ditto
7052 * sinfo.ads: Modify_Tree_For_C takes care of expanding Min and
7053 Max attributes.
7054
70552014-02-06 Ed Schonberg <schonberg@adacore.com>
7056
7057 * sem_ch3.adb (Analyze_Object_Declaration): Do not generate
7058 predicate check if this is an internal declaration with
7059 No_Initialization set, as for an expanded aggregate component.
7060
70612014-02-06 Doug Rupp <rupp@adacore.com>
7062
7063 * init.c (__gnat_default_resignal_p) [VMS]: Test for and resignal
7064 conditions with severity of "SUCCESS" or "INFORMATIONAL".
7065
85d6bf87
AC
70662014-02-06 Yannick Moy <moy@adacore.com>
7067
7068 * sem_prag.adb (Analyze_Pragma): Analyze pragma
7069 Debug rewritten node before rewriting it as a null statement in
7070 GNATprove mode.
7071
70722014-02-06 Robert Dewar <dewar@adacore.com>
7073
7074 * sem_attr.adb (Min_Max): New procedure.
7075 (Max_Alignment_For_Allocation_Max_Size_In_Storage_Elements): New
7076 procedure.
7077
c3b266d6
AC
70782014-02-06 Sergey Rybin <rybin@adacore.com frybin>
7079
7080 * gnat_ugn.texi, vms_data.ads: Add documentation of '-t' option for
7081 gnatmetric/gnatpp.
7082
70832014-02-06 Hristian Kirtchev <kirtchev@adacore.com>
7084
7085 * sem_prag.adb (Analyze_Abstract_State): Update
7086 all calls to Create_Abstract_State to pass the proper state
7087 "declaration".
7088 (Create_Abstract_State): Add new formal parameter
7089 State_Decl along with comment on usage. Establish a link between
7090 the abstract state entity and the state declaration.
7091
428684fd
RD
70922014-02-06 Robert Dewar <dewar@adacore.com>
7093
7094 * sem_attr.adb (Analyze_Attribute, case Max): Check for improper
7095 comparison of unordered enumeration type.
7096 (Analyze_Attribute, case Max): Check for improper comparison of
7097 unordered enumeration type.
7098 * sem_res.adb (Bad_Unordered_Enumeration_Reference): Moved to
7099 sem_util.adb.
7100 * sem_util.ads, sem_util.adb (Bad_Unordered_Enumeration_Reference):
7101 Moved here from Sem_Res.
7102
8c35b40a
AC
71032014-02-06 Robert Dewar <dewar@adacore.com>
7104
7105 * sem_ch3.adb, sem_prag.adb, sem_res.adb, lib-xref.adb: Minor
7106 reformatting.
7107
71082014-02-06 Hristian Kirtchev <kirtchev@adacore.com>
7109
7110 * sem_ch6.adb (Process_Formals): Error message reformatting.
7111
79b49b87
HK
71122014-02-06 Hristian Kirtchev <kirtchev@adacore.com>
7113
7114 * sem_ch3.adb (Handle_Late_Controlled_Primitive): Add local
7115 variable Spec. Do not inherit the null indicator from the
7116 subprogram body when generating the spec.
7117
4446a13f
AC
71182014-02-06 Robert Dewar <dewar@adacore.com>
7119
7120 * casing.adb (Determine_Casing): Consider SPARK_Mode to be
7121 mixed case.
7122
71232014-02-06 Ed Schonberg <schonberg@adacore.com>
7124
7125 * exp_ch6.adb (Is_Build_In_Place_Function): Predicate is false
7126 when the function has a foreign convention, but not if only the
7127 limited return type has such a convention.
7128
71292014-02-06 Hristian Kirtchev <kirtchev@adacore.com>
7130
7131 * sem_ch3.adb (Handle_Late_Controlled_Primitive): Remove local
7132 variable Spec. Comment reformatting. Use Copy_Separate_Tree
7133 rather than New_Copy_Tree when building the corresponding
7134 subprogram declaration.
7135
71362014-02-06 Hristian Kirtchev <kirtchev@adacore.com>
7137
7138 * sem_prag.adb (Analyze_Global_Item): Remove
7139 the mode-related checks on abstract states with enabled external
7140 properties.
7141 (Property_Error): Removed.
7142
71432014-02-06 Javier Miranda <miranda@adacore.com>
7144
7145 * lib-xref.adb (Generate_Reference): When
7146 generating the reference to the first private entity take care
7147 of handling swapped entities.
7148
e09a5598
AC
71492014-02-06 Sergey Rybin <rybin@adacore.com frybin>
7150
7151 * gnat_ugn.texi, vms_data.ads: Add documentation of -j option for
7152 gnatmetric.
7153
71542014-02-06 Robert Dewar <dewar@adacore.com>
7155
7156 * exp_ch4.adb (Expand_N_Shift_Left): Handle shift counts greater
7157 than the word size when operating in Modify_Tree_For_C mode.
7158 * sinfo.ads: Add documentation section on Modify_Tree_For_C mode.
7159
71602014-02-06 Robert Dewar <dewar@adacore.com>
7161
7162 * erroutc.adb (Warning_Specifically_Suppressed.Matches):
7163 compare is case insensitive.
7164 * gnat_rm.texi: Document that string compare for Warnings Off
7165 is now case insensitive.
7166
5216b599
AC
71672014-02-06 Eric Botcazou <ebotcazou@adacore.com>
7168
7169 * gnat_rm.texi: Small wording tweak.
7170
71712014-02-06 Pascal Obry <obry@adacore.com>
7172
7173 * prj-attr.adb, projects.texi, snames.ads-tmpl: Add Included_Patterns
7174 and Included_Artifact_Patterns attribute definitions.
7175
71762014-02-06 Yannick Moy <moy@adacore.com>
7177
7178 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Set
7179 SPARK_Mode pragma component for all subprograms, including stubs.
7180
71812014-02-06 Hristian Kirtchev <kirtchev@adacore.com>
7182
7183 * sem_ch10.adb (Analyze_Package_Body_Stub): Maintain
7184 the configuration options of the enclosing context in a
7185 stack-like fasion.
7186 (Analyze_Subprogram_Body_Stub): Maintain the
7187 configuration options of the enclosing context in a stack-like
7188 fashion.
7189
71902014-02-06 Robert Dewar <dewar@adacore.com>
7191
7192 * debug.adb: -gnatd.u sets Modify_Tree_For C
7193 * exp_ch4.adb (Expand_N_Op_Rotate_Left): Expand out
7194 if Modify_Tree_For_C (Expand_N_Op_Rotate_Right): ditto.
7195 (Expand_N_Op_Arithmetic_Right_Shift): ditto.
7196 * exp_intr.adb (Expand_Shift): Call expander so we do
7197 Modify_Tree_For_C expansions.
7198 * gnat1drv.adb (Adjust_Global_Switches): Set Modify_Tree_For_C
7199 if -gnatd.u set.
7200
72012014-02-06 Fedor Rybin <frybin@adacore.com>
7202
7203 * prj-proc.ads (Tree_Loaded_Callback): new type Callback used
7204 after the phase 1 of the processing of each aggregated project
7205 to get access to project trees of aggregated projects.
7206 (Process_Project_Tree_Phase_1): new parameter On_New_Tree_Loaded
7207 If specified, On_New_Tree_Loaded is called after each aggregated
7208 project has been processed succesfully.
7209 (Process): new parameter On_New_Tree_Loaded.
7210 * prj-proc.adb (Process_Aggregated_Projects): On_New_Tree_Loaded
7211 callback added after processing of each aggregated project.
7212 (Recursive_Process): new parameter On_New_Tree_Loaded.
7213 (Process): new parameter On_New_Tree_Loaded.
7214 (Process_Project_Tree_Phase_1): new parameter On_New_Tree_Loaded.
7215 * prj-conf.ads (Parse_Project_And_Apply_Config): new parameter
7216 On_New_Tree_Loaded.
7217 * prj-conf.adb (Parse_Project_And_Apply_Config): new parameter
7218 On_New_Tree_Loaded.
7219
72202014-02-06 Bob Duff <duff@adacore.com>
7221
7222 * gnat_ugn.texi: Implement --insert-blank-lines and
7223 --preserve-blank-lines switches.
7224
8c7ff9a0
AC
72252014-02-06 Sergey Rybin <rybin@adacore.com frybin>
7226
7227 * gnat_ugn.texi, vms_data.ads: Add documentation of -j option for
7228 gnatelim.
7229
72302014-02-06 Eric Botcazou <ebotcazou@adacore.com>
7231
7232 * gnat_rm.texi (Pragma Optimize_Alignment): Document the effect
7233 of the pragma on individual objects.
7234
72352014-02-06 Hristian Kirtchev <kirtchev@adacore.com>
7236
7237 * einfo.adb Node29 is now used as BIP_Initialization_Call.
7238 (BIP_Initialization_Call): New routine.
7239 (Set_BIP_Initialization_Call): New routine.
7240 (Write_Field29_Name): Add an entry for constants and variables.
7241 * einfo.ads Add new attribute BIP_Initialization_Call and update
7242 its usage in nodes.
7243 (BIP_Initialization_Call): New routine along with pragma Inline.
7244 (Set_BIP_Initialization_Call): New routine along with pragma Inline.
7245 * exp_ch6.adb (Make_Build_In_Place_Call_In_Object_Declaration):
7246 Add local declaration Res_Decl. Capture the build-in-place
7247 initialization call when the related object declaration has
7248 created a transient block.
7249 * exp_ch7.adb (Process_Transient_Objects): Add local variable
7250 Fin_Insrt. Recognize a scenario where an object declaration acts
7251 as a transient context and is initialized by a build-in-place
7252 function call.
7253
a0367a97
AC
72542014-02-06 Pascal Obry <obry@adacore.com>
7255
7256 * prj-util.adb (For_Interface_Sources): Fix handling of required
7257 bodies for aggregate libs.
7258
72592014-02-06 Robert Dewar <dewar@adacore.com>
7260
7261 * nlists.ads: Minor comment clarifications.
7262
72632014-02-06 Robert Dewar <dewar@adacore.com>
7264
7265 * gnat1drv.adb (Adjust_Global_Switches): Set Modify_Tree_For_C
7266 if gnatd.V set.
7267 * opt.ads (Modify_Tree_For_C): New flag.
7268 * output.ads, output.adb (Last_Char): New function.
7269
72702014-02-06 Pascal Obry <obry@adacore.com>
7271
7272 * projects.texi, prj-env.adb (Initialize_Default_Project_Path): Add
7273 share/gpr for cross-builds.
7274
155b4fcc
RD
72752014-02-06 Robert Dewar <dewar@adacore.com>
7276
7277 * exp_util.ads, checks.adb, sem_prag.adb, prj-util.adb, sem_ch13.adb:
7278 Minor reformatting and code clean ups.
7279
49d8d177
PO
72802014-02-06 Pascal Obry <obry@adacore.com>
7281
7282 * prj-util.adb (For_Interface_Sources): Skip non compilable languages.
7283 * prj.ads: Minor typo fix in comment.
7284
8e1e62e3
AC
72852014-02-06 Hristian Kirtchev <kirtchev@adacore.com>
7286
7287 * sem_prag.adb (Analyze_Depends_In_Decl_Part): Add
7288 local variable Expr. Flag clauses with extra parenthesis as this
7289 is not allowed by the syntax of the pragma. Code reformatting.
7290
72912014-02-06 Hristian Kirtchev <kirtchev@adacore.com>
7292
7293 * exp_attr.adb (Expand_N_Attribute_Reference): Alphabetize
7294 variables. Rename variabme Tnn to Temp. Do not create a temporary
7295 if assertions are disabled. Find enclosing routine _Postconditions
7296 and insert the temporary that captures the value of the prefix
7297 before the routine.
7298 * exp_ch6.adb (Build_Postconditions_Procedure):
7299 Insert the generated _Postconditions routine
7300 before the first source declaration of the related
7301 subprogram.
7302 (Insert_After_Last_Declaration): Removed.
7303 (Insert_Before_First_Source_Declaration): New routine.
7304
73052014-02-06 Ed Schonberg <schonberg@adacore.com>
7306
7307 * exp_util.adb, exp_util.ads (Within_Internal_Subprogram):
7308 Utility to determine whether current expansion is for the body
7309 of a predefined primitive operation.
7310 (Make_Predicate_Check): Use Within_Internal_Subpgram
7311 * checks.adb (Apply_Predicate_Check): Use
7312 Within_Internal_Subprogram
7313 * sem_ch13.adb (Freeze_Entity_Checks): Ditto.
7314
73152014-02-06 Pascal Obry <obry@adacore.com>
7316
7317 * prj.ads, prj-util.adb: Minor reformatting.
7318
cbee4f74
AC
73192014-02-06 Ed Schonberg <schonberg@adacore.com>
7320
7321 * exp_ch6.adb (Expand_Subprogram_Contract, Append_Enabled_Item):
7322 Take into account the Split_PPC flag to ensure that conjuncts
7323 in a composite postcondition aspect are tested in source order.
7324
73252014-02-06 Hristian Kirtchev <kirtchev@adacore.com>
7326
7327 * sem_ch6.adb (Analyze_Generic_Subprogram_Body): Flag illegal
7328 use of SPARK_Mode.
7329 * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration): Flag
7330 illegal use of SPARK_Mode.
7331 (Instantiate_Subprogram_Body): Flag illegal use of SPARK_Mode.
7332 * sem_prag.adb (Analyze_Pragma): Code reformatting.
7333 * sem_util.adb Add with and use clause for Aspects.
7334 (Check_SPARK_Mode_In_Generic): New routine.
7335 * sem_util.ads (Check_SPARK_Mode_In_Generic): New routine.
7336
73372014-02-06 Thomas Quinot <quinot@adacore.com>
7338
7339 * a-calend.adb (Formatting_Operations.Split): Ensure that
7340 Time_Error is raised for invalid time values.
7341
e2ef0ff6
AC
73422014-02-06 Arnaud Charlet <charlet@adacore.com>
7343
7344 * sem_prag.adb (Analyze_Pragma): Rewrite as a null statement
7345 in GNATprove_Mode.
7346
73472014-02-06 Robert Dewar <dewar@adacore.com>
7348
7349 * einfo.ads, einfo.adb (Is_Discriminant_Check_Function): New flag.
7350 * exp_ch3.adb (Build_Dcheck_Function): Set
7351 Is_Discriminant_Check_Function.
7352
73532014-02-06 Hristian Kirtchev <kirtchev@adacore.com>
7354
7355 * exp_ch7.adb (Is_Subprogram_Call): Inspect
7356 the original tree in certain cases where a construct has been
7357 factored out and replaced by a reference to a temporary.
7358
73592014-02-06 Ed Schonberg <schonberg@adacore.com>
7360
7361 * sem_ch3.adb (Process_Full_View): Fix typo in the order of
7362 parameters when propagating predicate function to full view.
7363 (Find_Type_Of_Object): Freeze base type of object type to catch
7364 premature use of discriminated private type without a full view.
7365
97779c34
AC
73662014-02-06 Robert Dewar <dewar@adacore.com>
7367
7368 * sprint.adb: Minor reformatting.
7369
73702014-02-06 Hristian Kirtchev <kirtchev@adacore.com>
7371
7372 * exp_ch4.adb (Process_Transient_Object): Add local variable
7373 Temp_Ins. When the transient object is initialized by an
7374 aggregate, the hook must capture the object after the last
7375 component assignment takes place.
7376 * exp_ch7.adb (Detect_Subprogram_Call): Expose the subprogram to
7377 routine Is_Subprogram_Call.
7378 (Is_Subprogram_Call): Inspect an
7379 aggregate that has been heavily expanded for subprogram calls.
7380 (Process_Transient_Objects): Add local variables Expr, Ptr_Id
7381 and Temp_Ins. Remove the nested declare block and adjust the
7382 indentation. When the transient object is initialized by an
7383 aggregate, the hook must capture the object after the last
7384 component assignment takes place.
7385
73862014-02-06 Hristian Kirtchev <kirtchev@adacore.com>
7387
7388 * sem_prag.adb (Analyze_Global_Item): Detect illegal uses of
7389 external states with enabled properties that do not match the
7390 global mode.
7391 (Property_Error): New routine.
7392 * sem_res.adb (Property_Error): New routine.
7393 (Resolve_Actuals): Detect illegal uses of external variables with
7394 enabled properties in procedure calls that do not match the mode of
7395 the corresponding formal parameter.
7396
73972014-02-06 Hristian Kirtchev <kirtchev@adacore.com>
7398
7399 * sem_util.adb (Has_Enabled_Property): Rename
7400 formal parameter Prop_Nam to Property. Update the comment on usage
7401 and all occurrences in the body. Add local variable Prop_Nam. When
7402 inspecting a property with an expression, the property name
7403 appears as the first choice of the component association.
7404
3e247e58
RD
74052014-02-04 Robert Dewar <dewar@adacore.com>
7406
7407 * exp_ch5.adb, einfo.ads, freeze.adb, sem_ch8.adb: Minor reformatting.
7408
2db5b47e
AC
74092014-02-04 Gary Dismukes <dismukes@adacore.com>
7410
7411 * sem_aggr.adb: Change "runtime" to "run time" in warning message,
7412 for consistency with other messages.
7413
74142014-02-04 Ed Schonberg <schonberg@adacore.com>
7415
7416 * exp_ch5.adb (Expand_Iterator_Loop): For a container element
7417 iterator, indicate that the element is a constant if the container
7418 type does not have a variable indexing aspect.
7419 * sem_ch8.adb (Analyze_Object_Renaming): If the entity is already
7420 marked as constant, do not reset its Ekind, to ensure that
7421 container elements in an element loop are not modified if the
7422 container (e.g. a hashed set) only has a constant indexing aspect.
7423
74242014-02-04 Arnaud Charlet <charlet@adacore.com>
7425
7426 * g-souinf.ads: Subprograms in this unit are actually not pure.
7427 * freeze.adb (Freeze_Subprogram): Do not reset Is_Pure for Intrinsics.
7428 * einfo.ads (Is_Pure): Update doc to match implementation.
7429
5a521b8a
AC
74302014-02-04 Gary Dismukes <dismukes@adacore.com>
7431
7432 * exp_ch13.adb: Minor spelling fix.
7433
74342014-02-04 Robert Dewar <dewar@adacore.com>
7435
7436 * opt.ads: Minor comment update.
7437
74382014-02-04 Robert Dewar <dewar@adacore.com>
7439
7440 * exp_ch4.adb (Expand_N_Expression_With_Actions): Use Rewrite
7441 instead of Replace.
7442
74432014-02-04 Ed Schonberg <schonberg@adacore.com>
7444
7445 * sem_aggr.adb (Resolve_Array_Aggregate): Suppress warnings
7446 on null expressions if component type is non-null, when the
7447 corresponding association covers an empty range of index values.
7448
81bd8c90
AC
74492014-02-04 Robert Dewar <dewar@adacore.com>
7450
7451 * sinfo.ads: Further comments on N_Expression_With_Actions node.
7452
74532014-02-04 Hristian Kirtchev <kirtchev@adacore.com>
7454
7455 * sem_prag.adb (Analyze_Refined_Depends_In_Decl_Part): Remove global
7456 variables Out_Items and Ref_Global. Remove local constant
7457 Body_Id along with dummy variables D1, D2, D3, D4, D5, D6, D7
7458 and D8. Remove the useless collection of global items as this
7459 was a leftover from an earlier version of the routine. Move
7460 several routines out to avoid deep nesting and indentation.
7461 (Inputs_Match): Add formal parameter Dep_Clause. Rename formal
7462 parameter Do_Checks to Post_Errors. Update the comment on usage.
7463 (Is_Matching_Input): Renamed to Input_Match. Add formal parameters
7464 Ref_Inputs and Do_Checks. Rename formal parameter Do_Checks
7465 to Post_Errors. Update the comment on usage. Account for the
7466 case where a self referential state may have a null input_list.
7467 (Is_Self_Referential): New routine.
7468
74692014-02-04 Ed Schonberg <schonberg@adacore.com>
7470
7471 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): If the
7472 entity renames an expression, as in the case of an object of
7473 an unconstrained type initialized by a function call, defer the
7474 rewriting of the expression to the expander.
7475 * exp_ch13.adb (Expand_N_Attribute_Definition_Clause, case
7476 'Alignment): If the entity renames an expression, introduce
7477 temporary to capture value, and rewrite original declaration to
7478 use temporary.
7479
ebdaa81b
AC
74802014-02-04 Gary Dismukes <dismukes@adacore.com>
7481
7482 * g-comlin.adb: Minor typo fix.
7483
74842014-02-04 Ed Schonberg <schonberg@adacore.com>
7485
7486 * freeze.adb (Freeze_All): Types derived from a formal
7487 access_to_classwide type do not have a finalization master.
7488
74892014-02-04 Robert Dewar <dewar@adacore.com>
7490
7491 * sprint.adb: Minor reformatting.
7492
74932014-02-04 Robert Dewar <dewar@adacore.com>
7494
7495 * exp_ch4.adb (Expand_N_Expression_With_Actions): Eliminate
7496 cases where Actions is a null list.
7497 * sinfo.ads (N_Expression_With_Actions): Actions can be
7498 temporarily empty during semantic analysis, but must be non-empty
7499 in the final expanded tree.
7500
d66f9f0b
AC
75012014-01-31 Robert Dewar <dewar@adacore.com>
7502
7503 * exp_ch9.adb: Minor reformatting.
7504
75052014-01-31 Emmanuel Briot <briot@adacore.com>
7506
7507 * g-comlin.adb (Set_Command_Line): Take the switches
7508 configuration from the Command_Line_Config.
7509
75102014-01-31 Hristian Kirtchev <kirtchev@adacore.com>
7511
7512 * sem_prag.adb (Analyze_Refinement_Clause): Guard against a malformed
7513 refinement clause.
7514
75152014-01-31 Vincent Celier <celier@adacore.com>
7516
7517 * projects.texi: Add more documentation about others used as an
7518 index in indexed attributes.
7519
f3920a13
AC
75202014-01-31 Robert Dewar <dewar@adacore.com>
7521
7522 * gnat_ugn.texi: Minor update.
7523 * gnat_rm.texi: Add example to Restriction_Warnings documentation.
7524 * exp_util.adb: Minor reformatting.
7525
75262014-01-31 Ed Schonberg <schonberg@adacore.com>
7527
7528 * exp_ch9.adb (Expand_Entry_Barrier): Warn if the barrier
7529 depends on data that is not private to the protected object,
7530 and potentially modifiable in unsynchronized fashion.
7531
31d922e3
AC
75322014-01-31 Yannick Moy <moy@adacore.com>
7533
7534 * erroutc.adb (Validate_Specific_Warnings): Remove special case for
7535 GNATprove_Mode.
7536
75372014-01-31 Robert Dewar <dewar@adacore.com>
7538
7539 * prj-attr.ads (First_Attribute_Of): Returns Empty_Attribute
7540 for Unknown_Package.
7541 * sem_ch6.adb, sem_attr.adb: Minor comment addition.
7542
75432014-01-31 Hristian Kirtchev <kirtchev@adacore.com>
7544
7545 * exp_util.adb (Build_Allocate_Deallocate_Proc): Rewrite
7546 the logic that generates a runtime check to determine the
7547 controlled status of the object about to be allocated or
7548 deallocated. Class-wide types now always use a runtime check
7549 even if they appear as generic actuals.
7550 (Find_Object): Detect
7551 a special case that involves interface class-wide types because
7552 the object appears as a complex expression.
7553
5b6f12c7
AC
75542014-01-31 Ed Schonberg <schonberg@adacore.com>
7555
7556 * sem_ch6.adb (Process_Formals): In Ada2012 mode, place
7557 subprogram with an incomplete untagged formals on the list of
7558 private dependents, to verify that the type is properly completed
7559 in the private part.
7560 * sem_attr.adb: Code clean up.
7561
75622014-01-31 Robert Dewar <dewar@adacore.com>
7563
7564 * exp_ch6.adb: Minor reformatting.
7565
75662014-01-31 Vincent Celier <celier@adacore.com>
7567
7568 * prj-attr.adb (First_Attribute_Of): Return Unknown_Attribute
7569 when Pkg is unknown.
7570
d950f051
AC
75712014-01-31 Hristian Kirtchev <kirtchev@adacore.com>
7572
7573 * sem_res.adb (Resolve_Entity_Name): Comment
7574 reformatting. Allow volatile objects in various generated checks.
7575
75762014-01-31 Ed Schonberg <schonberg@adacore.com>
7577
7578 * sem_attr.adb (Analyze_Attribute, case 'Update): For a record
7579 component association, set the etype of the identifier, for
7580 SPARK use.
7581
75822014-01-31 Ed Schonberg <schonberg@adacore.com>
7583
7584 * exp_ch6.adb (Has_Visibility_Of_Subprogram): If type is not
7585 declared in a package, not checks can apply to the subprogram.
7586
74c10109
AC
75872014-01-31 Robert Dewar <dewar@adacore.com>
7588
7589 * erroutc.adb (Validate_Specific_Warnings): Warnings are
7590 controlled -gnatw.W.
7591 * gnat_ugn.texi: Document new warnings controlled by -gnatw.w.
7592 * opt.ads (Warn_On_Warnings_Off): Now controls more cases.
7593
75942014-01-31 Arnaud Charlet <charlet@adacore.com>
7595
7596 * exp_disp.adb: Update comments.
7597
75982014-01-31 Yannick Moy <moy@adacore.com>
7599
7600 * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration,
7601 Save_Global_References): Guard access to expression in aspect.
7602
76032014-01-31 Yannick Moy <moy@adacore.com>
7604
7605 * sem_prag.adb (Analyze_Pragma/Pragma_SPARK_Mode):
7606 Issue an error when the pragma is applied to a generic unit,
7607 a generic declaration, or inside a generic.
7608
76092014-01-31 Yannick Moy <moy@adacore.com>
7610
7611 * sem_ch8.adb (Analyze_Subprogram_Renaming): Set SPARK_Mode on renaming
7612 entity.
7613
bdfb8ec4
AC
76142014-01-31 Robert Dewar <dewar@adacore.com>
7615
7616 * exp_ch9.adb, s-tassta.adb, s-tposen.adb, s-tposen.ads: Minor
7617 reformatting.
7618
76192014-01-31 Tristan Gingold <gingold@adacore.com>
7620
7621 * exp_disp.adb: Add a historic note.
7622
76232014-01-31 Robert Dewar <dewar@adacore.com>
7624
7625 * sem_warn.adb (Warn_On_Useless_Assignments): Add call to
7626 Process_Deferred_References.
7627
76282014-01-31 Yannick Moy <moy@adacore.com>
7629
7630 * erroutc.adb (Validate_Specific_Warnings): Do not issue a message for
7631 ineffective pragma Warnings(Off) in GNATprove_Mode.
7632
5b0e6852
BD
76332014-01-31 Bob Duff <duff@adacore.com>
7634
7635 * s-taskin.ads: Minor comment fix.
7636 * s-tassta.adb (Abort_Dependents): Don't abort all dependents;
7637 just direct dependents. If this is actually an abort, each task
7638 will take care of aborting its dependents, so all dependents will
7639 get aborted, as before. However, when this is called the second
7640 time from Vulnerable_Complete_Master "for convenience" (i.e. to
7641 kill off tasks waiting at terminate alternatives), aborting
7642 indirect dependents is wrong, because it causes some unrelated
7643 tasks to get aborted.
7644
a54ffd6c
AC
76452014-01-31 Robert Dewar <dewar@adacore.com>
7646
7647 * sem_ch4.adb: Minor reformatting.
7648
76492014-01-31 Robert Dewar <dewar@adacore.com>
7650
7651 * exp_ch2.adb: New calling sequence for Is_LHS.
7652 * frontend.adb: Add call to Process_Deferred_References.
7653 * lib-xref.ads, lib-xref.adb (Process_Deferred_References): New.
7654 (Deferred_References): New table.
7655 * sem_ch8.adb (Find_Direct_Name): Make deferred reference table
7656 entries.
7657 (Find_Expanded_Name): Ditto.
7658 * sem_res.adb: New calling sequence for Is_LHS.
7659 * sem_util.ads, sem_util.adb (Is_LHS): New calling sequence.
7660 * sem_warn.adb: Call Process_Deferred_References before issuing
7661 warnings.
7662
76632014-01-31 Tristan Gingold <gingold@adacore.com>
7664
7665 * exp_util.adb (Corresponding_Runtime_Package): Restrict the
7666 use of System_Tasking_Protected_Objects_Single_Entry.
7667 * exp_ch9.adb (Build_Simple_Entry_Call): Remove Mode parameter
7668 of Protected_Single_Entry_Call.
7669 (Expand_N_Timed_Entry_Call): Remove single_entry case.
7670 * exp_disp.adb (Make_Disp_Asynchronous_Select_Body): Remove
7671 single_entry case.
7672 (Make_Disp_Timed_Select_Body): Likewise.
7673 * rtsfind.ads (RE_Timed_Protected_Single_Entry_Call): Remove.
7674 * s-tposen.adb (Send_Program_Error, PO_Do_Or_Queue): Remove
7675 Self_Id parameter.
7676 (Wakeup_Entry_Caller): Remove Self_ID and New_State parameters.
7677 (Wait_For_Completion_With_Timeout): Remove.
7678 (Protected_Single_Entry_Call): Remove Mode parameter
7679 (always Simple_Call).
7680 (Service_Entry): Remove Self_Id constant (not used anymore).
7681 (Timed_Protected_Single_Entry_Call): Remove.
7682 * s-tposen.ads (Timed_Protected_Single_Entry_Call): Remove.
7683 (Protected_Single_Entry_Call): Remove Mode parameter.
7684
4f7c83ca
AC
76852014-01-29 Hristian Kirtchev <kirtchev@adacore.com>
7686
7687 * einfo.adb (Get_Pragma): Handle the retrieval of pragma Refined_Post.
7688 * einfo.ads (Get_Pragma): Update the comment on special pragmas
7689 handled by this routine.
7690 * sem_prag.adb (Analyze_Pragma): Add a legal pragma Refined_Post
7691 to the contract of the related subprogram body.
7692 * sem_util.adb (Add_Contract_Item): Handle the insertion of
7693 pragma Refined_Post into the contract of a subprogram body.
7694 * sinfo.ads Update the documentation of node N_Contract.
7695 * sem_res.adb (Resolve_Entity_Name): Add a guard
7696 to detect abstract states and variables only when checking the
7697 SPARK 2014 rules concerning volatile object placement.
7698
76992014-01-29 Ed Schonberg <schonberg@adacore.com>
7700
7701 * sem_ch4.adb (Find_Equality_Types, Try_One_Interp): within an instance,
7702 null is compatible with any access type.
7703
385e1a99
HK
77042014-01-29 Hristian Kirtchev <kirtchev@adacore.com>
7705
7706 * sem_util.adb (Find_Placement_In_State_Space): Assume that the default
7707 placement is not in a package.
7708
159a5104
AC
77092014-01-29 Hristian Kirtchev <kirtchev@adacore.com>
7710
7711 * sem_util.adb (Has_Enabled_Property): Compare the character field of
7712 the sole property.
7713
77142014-01-29 Robert Dewar <dewar@adacore.com>
7715
7716 * sem_intr.adb, a-ztexio.ads, sinfo.ads, sem_res.adb, gnatlink.adb,
7717 vms_conv.adb, a-except.ads, a-except-2005.ads, a-teioed.adb,
7718 sem_warn.ads, treepr.ads, erroutc.ads, a-excach.adb: Minor reformatting.
7719
87e9b935
RD
77202014-01-29 Robert Dewar <dewar@adacore.com>
7721
7722 * sem_util.ads, sem_util.adb (In_Pragma_Expression): New function.
7723 * sem_warn.adb (Check_References): Suppress warnings if inside
7724 Initial_Condition pragma.
7725
98b5d298
HK
77262014-01-29 Hristian Kirtchev <kirtchev@adacore.com>
7727
7728 * sem_prag.adb (Check_Missing_Part_Of): List all values of
7729 State_Space_Kind for readability reasons. Do not emit an error on
7730 a private item when the enclosing package lacks aspect/pragma
7731 Abstract_State. Do not emit an error on a private package
7732 instantiation when the corresponding generic template lacks
7733 visible state.
7734 (Has_Visible_State): New routine.
7735 * sem_util.adb (Find_Placement_In_State_Space): The visible
7736 declarations of any kind of child units in general act as proper
7737 placement location.
7738
a90bd866
RD
77392014-01-29 Robert Dewar <dewar@adacore.com>
7740
7741 * a-except-2005.adb, a-except.adb, a-excpol-abort.adb, a-exstat.adb,
7742 ali.adb, a-numaux.ads, a-numaux-darwin.ads, a-numaux-libc-x86.ads,
7743 a-numaux-vms.ads, a-numaux-vxworks.ads, a-numaux-x86.ads, aspects.ads,
7744 a-taside.adb, a-teioed.adb, a-textio.adb, a-textio.ads, atree.adb,
7745 atree.ads, a-witeio.adb, a-witeio.ads, a-wtedit.adb, a-ztedit.adb,
7746 a-ztexio.adb, bcheck.adb, binde.adb, checks.adb, comperr.adb,
7747 cstand.adb, debug_a.adb, einfo.ads, errout.adb, erroutc.adb,
7748 eval_fat.adb, exp_aggr.adb, exp_attr.adb, exp_ch11.adb, exp_ch3.adb,
7749 exp_ch4.adb, exp_ch5.adb, exp_ch6.adb, exp_ch9.adb, exp_dbug.adb,
7750 exp_disp.adb, exp_fixd.adb, exp_imgv.adb, exp_intr.adb, exp_util.adb,
7751 freeze.adb, frontend.adb, g-comlin.ads, g-mbdira.adb, gnat1drv.adb,
7752 gprep.adb, g-spipat.adb, i-cpp.ads, i-vxwork.ads, i-vxwork-x86.ads,
7753 krunch.ads, layout.adb, lib-load.adb, lib-writ.adb, lib-writ.ads,
7754 live.adb, namet.ads, osint.adb, osint-c.adb, output.ads, par.adb,
7755 par-ch10.adb, par-ch13.adb, par-ch3.adb, par-ch4.adb, par-ch5.adb,
7756 par-ch6.adb, par-ch9.adb, par-endh.adb, par-labl.adb, par-prag.adb,
7757 par-sync.adb, par-tchk.adb, par-util.adb, prj.adb, repinfo.adb,
7758 rtsfind.adb, s-arit64.adb, s-asthan-vms-alpha.adb,
7759 s-asthan-vms-ia64.adb, s-bignum.adb, scans.adb, scng.adb, s-dimmks.ads,
7760 sem_aggr.adb, sem_attr.adb, sem_aux.adb, sem_cat.adb, sem_ch10.adb,
7761 sem_ch12.adb, sem_ch13.adb, sem_ch13.ads, sem_ch3.adb, sem_ch4.adb,
7762 sem_ch5.adb, sem_ch6.adb, sem_ch8.adb, sem_disp.adb, sem_elab.adb,
7763 sem_elim.adb, sem_eval.adb, sem_intr.adb, sem_prag.adb, sem_res.adb,
7764 sem_type.adb, sem_util.adb, sem_warn.adb, set_targ.adb, s-fatgen.adb,
7765 s-fatgen.ads, s-fileio.adb, s-imgcha.adb, s-imgrea.adb, sinfo.ads,
7766 sinput-c.adb, snames.ads-tmpl, s-os_lib.adb, sprint.adb,
7767 s-regpat.adb, s-secsta.adb, s-stalib.ads,
7768 s-stchop.adb, s-stoele.ads, stand.ads, s-taprop-solaris.adb,
7769 s-tasdeb-vms.adb, s-tasini.adb, s-tassta.adb, s-valdec.adb,
7770 s-valuti.adb, s-wchjis.adb, s-wchwts.adb, system.ads, system-vms_64.ads,
7771 system-vms-ia64.ads, treepr.adb, types.ads, uintp.adb, uname.adb,
7772 urealp.adb, usage.adb, vxaddr2line.adb: Minor reformatting.
7773
0d66cee5
AC
77742014-01-29 Robert Dewar <dewar@adacore.com>
7775
7776 * expander.adb: Minor reformatting.
7777
77782014-01-29 Javier Miranda <miranda@adacore.com>
7779
7780 * exp_ch3.adb (Predefined_Primitive_Bodies): Adding documentation to
7781 previous patch.
7782
b7cb4a61
AC
77832014-01-29 Javier Miranda <miranda@adacore.com>
7784
7785 * exp_ch3.adb (Predefined_Primitive_Bodies): Complete the code
7786 that checks if an interface types defines the predefined "="
7787 function because the compiler was erroneously not generating the
7788 predefined "=" primitive as soon as the name of some interface
7789 primitive is "=" (formals were not checked).
7790
77912014-01-29 Ed Schonberg <schonberg@adacore.com>
7792
7793 * expander.adb (Expander): In GNATprove mode, do not process
7794 transient scopes: they are in general not created in this mode,
7795 and an attempt to examine them will lead to constraint errors when
7796 processing configuration pragmas that have analyzable expressions.
7797
35d4d899
VC
77982014-01-29 Vincent Celier <celier@adacore.com>
7799
7800 * clean.adb (Gnatclean): Fail if main project is an aggregate
7801 project or if there is an aggregate library project in the
7802 project tree.
7803 * gnatcmd.adb: Fail if the main project is an aggregate project
7804 or if there is an aggegate library project in the project tree.
7805 * make.adb (Initialize): : Fail if main project is an aggregate
7806 project or if there is an aggregate library project in the
7807 project tree.
7808 * makeutl.ads (Aggregate_Libraries_In): New Boolean function.
7809 * prj-makr.adb (Initialize): Fail if the main project is an
7810 aggregate project or an aggregate library project.
7811
88de755d
VC
78122014-01-29 Vincent Celier <celier@adacore.com>
7813
7814 * prj-part.adb (Check_Import_Aggregate): New procedure
7815 to check if an imported project is an aggregate project.
7816 (Parse_Single_Project): Call Check_Import_Aggregate
7817 * projects.texi: Document that aggregate projects cannot be
7818 extended or imported.
7819
d0e69402
RD
78202014-01-29 Robert Dewar <dewar@adacore.com>
7821
7822 * exp_ch9.adb, sem_ch7.ads, s-regexp.adb, sem_ch13.adb: Minor
7823 reformatting and code clean up.
7824 * gnat_ugn.texi: Add documentation section on Atomic Variables
7825 and Optimization.
7826
5627964c
AC
78272014-01-29 Hristian Kirtchev <kirtchev@adacore.com>
7828
7829 * einfo.adb Flag264 is now unused.
7830 (Has_Body_References): Removed.
7831 (Set_Has_Body_References): Removed.
7832 (Write_Entity_Flags): Remove the output for flag Has_Body_References.
7833 * einfo.ads Update the comment on usage of attribute
7834 Body_References. Remove attribute Has_Body_References and its
7835 usage in nodes.
7836 (Has_Body_References): Removed along with pragma Inline.
7837 (Set_Has_Body_References): Removed along with pragma Inline.
7838 * sem_prag.adb (Analyze_Global_Item): Move the call to
7839 Record_Possible_Body_Reference in the state related checks
7840 section. Add a comment intended function.
7841 (Analyze_Input_Output): Move the call to Record_Possible_Body_Reference
7842 in the state related checks section. Add a comment intended function.
7843 (Analyze_Refinement_Clause): Cleanup the illegal body reference
7844 reporting. Add a comment on timing of error reporting.
7845 (Record_Possible_Body_Reference): Reimplement the routine.
7846
78472014-01-29 Vincent Celier <celier@adacore.com>
7848
7849 * makeutl.adb (Mains.Find_File_Add_Extension): Only look for specs for
7850 unit-based languages.
7851 (Mains.Complete_Mains.Do_Complete): Use the source file project
7852 tree when calling Find_File_Add_Extension. Use the correct
7853 project name when reporting an error.
7854
d7af5ea5
HK
78552014-01-29 Hristian Kirtchev <kirtchev@adacore.com>
7856
7857 * aspects.adb Add an entry for aspect Part_Of in table
7858 Canonical_Aspect.
7859 * aspects.ads Add an entry for aspect Part_Of in tables Aspect_Id,
7860 Aspect_Argument, Aspect_Names and Aspect_Delay.
7861 * atree.h Define Elist9.
7862 * atree.adb (Elist9): New routine.
7863 (Set_Elist9): New routine.
7864 * atree.ads (Elist9): New routine.
7865 (Set_Elist9): New routine.
7866 * einfo.adb Add Part_Of_Constituents and Encapsulating_State to
7867 the list of node usage. Remove Refined_State from the list of
7868 node usage.
7869 (Encapsulating_State): New routine.
7870 (Get_Pragma):
7871 Handle pragma Part_Of; (Part_Of_Constituents): New routine.
7872 (Refined_State): Removed.
7873 (Set_Encapsulating_State): New routine.
7874 (Set_Part_Of_Constituents): New routine.
7875 (Set_Refined_State): Removed.
7876 (Write_Field9_Name): Add an entry
7877 for Part_Of_Constituents (Write_Field10_Name): Add an entry for
7878 Encapsulating_State. Remove the entry for Refined_State.
7879 * einfo.ads Add new attributes Encapsulating_State
7880 and Part_Of_Constituents alond with their usage in
7881 entities. Remove attribute Refined_State along with its
7882 usage in entities.
7883 (Encapsulating_State): New routine and
7884 pragma Inline. (Get_Pragma): Update the comment on usage.
7885 (Part_Of_Constituents): New routine and pragma Inline.
7886 (Refined_State): Removed along with pragma Inline.
7887 (Set_Encapsulating_State): New routine and pragma Inline.
7888 (Set_Part_Of_Constituents): New routine and pragma Inline.
7889 (Set_Refined_State): Removed along with pragma Inline.
7890 * par-prag.adb Pragma Part_Of does not need any special processing
7891 by the parser.
7892 * sem_ch3.adb (Analyze_Declarations): Remove local variables
7893 Body_Id and Prag. Call separate routines to analyze the
7894 contract of a package [body].
7895 (Analyze_Object_Contract):
7896 Update the comment on usage. Remove local variables
7897 Items and Nam. Use Get_Pragma rather than traversing the
7898 classification list. Verify whether the lack of indicator
7899 Part_Of agrees with the placement of the variable in state space.
7900 (Analyze_Object_Declaration): Initialize the encapsulating state
7901 of a variable. (Requires_State_Refinement): Moved to sem_util.
7902 * sem_ch7.adb (Analyze_Package_Body_Contract): New routine.
7903 (Analyze_Package_Contract): New routine.
7904 * sem_ch7.ads (Analyze_Package_Body_Contract): New routine.
7905 (Analyze_Package_Contract): New routine.
7906 * sem_ch10.adb (Decorate_State): Initialize the encapsulating
7907 state and Part_Of constituents.
7908 * sem_ch13.adb (Analyze_Aspect_Specifications):
7909 Add processing for aspect Part_Of. Update all
7910 calls to Decorate_Delayed_Aspect_And_Pragma.
7911 (Check_Aspect_At_Freeze_Point): Aspect Part_Of does
7912 not need any special processing at freeze time.
7913 (Decorate_Delayed_Aspect_And_Pragma): Renamed to
7914 Decorate_Aspect_And_Pragma. Add formal parameter Delayed and
7915 update the associated comment.
7916 * sem_prag.adb Add an entry for pragma Part_Of in table Sig_Flags.
7917 (Analyze_Abstract_State): Add new global variable State_Id. Remove
7918 local constants Errors and Loc. Remove local variables Is_Null
7919 and State_Nam. Create the entity of the abstract state on the
7920 spot, before all remaining checks are performed. Verify that a
7921 missing Part_Of option agrees with the placement of the abstract
7922 state within the state space.
7923 (Analyze_Depends_In_Decl_Part):
7924 Add new global variables Constits_Seen and States_Seen. Check
7925 that a state and a corresponding constituent do not appear
7926 in pragma [Refined_]Depends.
7927 (Analyze_Global_In_Decl_Part):
7928 Add new global variables Constits_Seen and States_Seen. Check
7929 that a state and a corresponding constituent do not appear
7930 in pragma [Refined_]Global.
7931 (Analyze_Global_Item):
7932 Remove the now obsolete code that deals with Part_Of.
7933 Add the entity of the global item to the list of processed
7934 items. (Analyze_Initializes_In_Decl_Part): Add new global
7935 variables Constits_Seen and States_Seen. Check that a state
7936 and a corresponding constituent do not appear in pragma
7937 Initializes.
7938 (Analyze_Initialization_Item): Add the entity
7939 of the initialization item to the list of processed items.
7940 (Analyze_Input_Item): Add the entity of the initialization
7941 item to the list of processed items.
7942 (Analyze_Input_Output):
7943 Remove the now obsolete code that deals with Part_Of. Add the
7944 entity of the input/output to the list of processed items.
7945 (Analyze_Part_Of): New routine.
7946 (Analyze_Part_Of_Option): Remove
7947 local constant Par_State. Add local constant Encaps and local
7948 variables Encaps_Id and Legal. Use Analyze_Part of to analyze
7949 the option. Turn the related state into a Part_Of constituent
7950 if the option is legal.
7951 (Analyze_Pragma): Add processing
7952 for pragma Part_Of.
7953 (Analyze_Refined_State_In_Decl_Part):
7954 Remove global constants Pack_Body and Spec_Id. Remove
7955 global variables Abstr_States and Hidden_States. Add new
7956 global variables Available_States, Body_Id, Body_States and
7957 Spec_Id. Add new local constant Body_Decl. Reimplement the
7958 logic that extracts the states available for refinement from
7959 the related package and the body hidden states of the said
7960 package.
7961 (Analyze_Refinement_Clause): Add local variable Part_Of_Constits.
7962 (Check_Applicable_Policy): Alphabetize body.
7963 (Check_Dependency_Clause): Replace Refined_State
7964 with Encapsulating_State.
7965 (Check_Matching_Constituent):
7966 Reimplement the logic that determines whether an item is a valid
7967 / invalid constituent of the current refined state. Return when
7968 a construct does not denote a valid abstract state. Extract the
7969 list of Part_Of constituents for further analysis. Check that all
7970 Part_Of constituents of a state have been used in its refinement.
7971 (Check_Matching_State): Update the comment on usage. Operate
7972 on the list of available states.
7973 (Check_Missing_Part_Of): New routine.
7974 (Check_Refined_Global_Item): Replace Refined_State
7975 with Encapsulating_State.
7976 (Check_State_And_Constituent_Use): New routine.
7977 (Create_Abstract_State): New routine.
7978 (Is_Matching_Input): Replace Refined_State with Encapsulating_State.
7979 (Is_Part_Of): Removed.
7980 (Collect_Body_States): New routine.
7981 (Collect_Constituent): Replace Refined_State with Encapsulating_State.
7982 (Collect_Hidden_States): Removed.
7983 (Report_Unrefined_States): Change the profile of the procedure along
7984 with the comment on usage.
7985 (Report_Unused_Constituents): New routine.
7986 (Report_Unused_Hidden_States): Removed.
7987 (Report_Unused_States): New routine.
7988 * sem_prag.ads (Check_Missing_Part_Of): New routine.
7989 * sem_util.adb (Add_Contract_Item): Pragma Part_Of can now
7990 appear in the classification pragmas of a package instantiation
7991 or a variable.
7992 (Find_Placement_In_State_Space): New routine.
7993 (Is_Child): Removed.
7994 (Is_Child_Or_Sibling): Remove formal
7995 parameter Private_Child. Remove the private child checks.
7996 (Requires_State_Refinement): Moved from sem_ch3.
7997 * sem_util.ads Add new type State_Space_Kind along with
7998 comment on its usage and values.
7999 (Add_Contract_Item): Update the comment on usage.
8000 (Find_Body_Discriminal): Alphabetize spec.
8001 (Find_Placement_In_State_Space): New routine.
8002 (Is_Child_Or_Sibling): Remove formal parameter Private_Child
8003 and update the comment on usage.
8004 (Requires_State_Refinement): Moved from sem_ch3.
8005 * sinfo.ads: Update the documentation of N_Contract.
8006 * snames.ads-tmpl The predefined name for Part_Of is now used
8007 to denote a pragma. Add Pragma_Id for Part_Of.
8008
0830210c
AC
80092014-01-29 Emmanuel Briot <briot@adacore.com>
8010
8011 * s-regexp.adb (Create_Secondary_Table): Automatically grow the state
8012 machine as needed.
8013 (Dump): New subprogram.
8014
80152014-01-29 Tristan Gingold <gingold@adacore.com>
8016
8017 * exp_ch9.adb (Expand_N_Protected_Type_Declaration): Add
8018 Expand_Entry_Declaration to factorize code.
8019
1ae70618
ES
80202014-01-29 Ed Schonberg <schonberg@adacore.com>
8021
8022 * checks.adb: minor clarification.
8023 * sem_ch7.adb (Declare_Inherited_Private_Subprograms): Limit
8024 search for primitive operations to the entities that immediately
8025 follow the type declaration.
8026
cca7f107
AC
80272014-01-29 Tristan Gingold <gingold@adacore.com>
8028
8029 * exp_ch9.adb (Build_Protected_Entry): Do not call
8030 Complete_Entry_Body anymore.
8031 * rtsfind.ads (RE_Complete_Single_Entry_Body): Remove.
8032 * s-tposen.ads, s-tposen.adb (Complete_Single_Entry_Body): Remove.
8033
80342014-01-29 Pierre-Marie Derodat <derodat@adacore.com>
8035
8036 * s-os_lib.adb, s-os_lib.ads (Normalize_Pathname): Return an empty
8037 string when the Name input bigger than allowed. Adapt the function
8038 specification.
8039
80402014-01-29 Ed Schonberg <schonberg@adacore.com>
8041
8042 * checks.adb (Install_Null_Excluding_Check): Do not emit warning
8043 if expression is within a case_expression of if_expression.
8044
443dd772
RD
80452014-01-29 Robert Dewar <dewar@adacore.com>
8046
8047 * exp_ch9.adb, inline.ads: Minor reformatting.
8048
4043fd0b
AC
80492014-01-29 Tristan Gingold <gingold@adacore.com>
8050
8051 * exp_ch9.adb (Is_Exception_Safe): Return true if no exceptions.
8052
80532014-01-29 Yannick Moy <moy@adacore.com>
8054
8055 * inline.ads (Pending_Body_Info): Add SPARK_Mode and
8056 SPARK_Mode_Pragma components to be able to analyze generic
8057 instance.
8058 * sem_ch12.adb (Analyze_Package_Instantiation,
8059 Inline_Instance_Body, Need_Subprogram_Instance_Body,
8060 Load_Parent_Of_Generic): Pass in SPARK_Mode from instantiation
8061 for future analysis of the instance.
8062 (Instantiate_Package_Body,
8063 Instantiate_Subprogram_Body, Set_Instance_Inv): Set SPARK_Mode
8064 from instantiation to analyze the instance.
8065
cf3e6845
AC
80662014-01-29 Robert Dewar <dewar@adacore.com>
8067
8068 * sem_ch7.adb, sem_prag.adb, sem_ch4.adb, sem_ch6.adb: Minor code
8069 reorganization.
8070
80712014-01-29 Yannick Moy <moy@adacore.com>
8072
8073 * gnat_rm.texi: Update description of SPARK_Mode pragma.
8074
80752014-01-29 Tristan Gingold <gingold@adacore.com>
8076
8077 * exp_ch9.adb (Expand_N_Protected_Body): Remove Num_Entries.
8078
f90d14ac
AC
80792014-01-29 Thomas Quinot <quinot@adacore.com>
8080
8081 * sem_ch4.adb (Find_Component_In_Instance): Update comment.
8082
80832014-01-29 Ed Schonberg <schonberg@adacore.com>
8084
8085 * exp_util.adb (Build_Task_Image_Prefix): Indicate that the
8086 resulting string is an internal entity. and thus requires no
8087 initialization. This is relevant when Initialize_ Scalars is
8088 enabled, because the resultant spurious initialization may lead to
8089 secondary stack anomalies that produce a mangled name for a task.
8090
80912014-01-29 Yannick Moy <moy@adacore.com>
8092
8093 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): SPARK_Mode
8094 not inherited from spec anymore. Check consistency
8095 rules after processing of declarations.
8096 * sem_ch7.adb (Analyze_Package_Body_Helper): SPARK_Mode not inherited
8097 from spec anymore. Check consistency rules after processing of
8098 declarations.
8099 (Analyze_Package_Declaration): Set SPARK_Mode only for non-generic
8100 packages.
8101 * sem_prag.adb (Analyze_Pragma/Pragma_SPARK_Mode): Implement new
8102 consistency rules.
8103
b1d12996
AC
81042014-01-27 Robert Dewar <dewar@adacore.com>
8105
8106 * sem_res.adb (Resolve_Comparison_Op): Add type name/location
8107 to unordered msg.
8108 (Resolve_Range): Add type name/location to unordered msg.
8109
81102014-01-27 Claire Dross <dross@adacore.com>
8111
8112 * a-cofove.adb/s (Copy): Add precondition so that Copy (Source,
8113 Capacity) is only called with Capacity >= Length (Source) and
8114 Capacity in Capacity_Range.
8115 * a-cfdlli.adb/s, a-cfhase.adb/s, a-cfhama.adb/s, a-cforse.adb/s,
8116 a-cforma.adb/s (Copy): Add precondition so that Copy (Source, Capacity)
8117 is only called with Capacity >= Source.Capacity. Raise Capacity_Error
8118 in the code is this is not the case.
8119
81202014-01-27 Thomas Quinot <quinot@adacore.com>
8121
8122 * sem_ch4.adb (Analyze_Selected_Component): Fix handling of
8123 selected component in an instance where the component of the
8124 actual is not visibile at instantiation.
8125
fcadacf7
ES
81262014-01-27 Ed Schonberg <schonberg@adacore.com>
8127
8128 * sem_ch6.adb: sem_ch6.adb (Set_Actual_Subtypes): If the type
8129 has a dynamic predicate, generate freeze node for Actual_Subtype
8130 at once, because the declaration of the corresponding predicate
8131 function will make reference to it.
8132
8b4230c8
AC
81332014-01-27 Tristan Gingold <gingold@adacore.com>
8134
8135 * exp_ch7.adb, exp_ch9.adb: Adjust comments.
8136
81372014-01-27 Robert Dewar <dewar@adacore.com>
8138
8139 * exp_ch4.adb (Expand_N_Op_Expon): Remove unsigned type test
8140 for 2**X optimization.
8141
81422014-01-27 Ed Schonberg <schonberg@adacore.com>
8143
8144 * a-suenst.adb: strings.utf_encoding.strings (Decode): Check
8145 explicitly whether value is in range of Character, because the
8146 library is typically compiled with range checks disabled, and
8147 we cannot rely on the implicit check on the argument of 'Val.
8148
81492014-01-27 Vincent Celier <celier@adacore.com>
8150
8151 * a-ciorma.adb, a-cihama.adb (Assign): Copy the Source to the Target,
8152 not the Target to itself.
8153
81542014-01-27 Robert Dewar <dewar@adacore.com>
8155
8156 * vms_conv.ads, ali.adb, sem_ch6.ads, opt.ads, vms_cmds.ads: Minor
8157 changes to avoid incorrect use of unordered enum types.
8158
81592014-01-27 Thomas Quinot <quinot@adacore.com>
8160
8161 * sem_ch4.adb: Minor reformatting.
8162
29077c18
AC
81632014-01-27 Robert Dewar <dewar@adacore.com>
8164
8165 * scn.adb (Check_End_Of_Line): Removed.
8166 (Error_Long_Line): Removed.
8167 (Determine_License): Use versions of above routines from Scanner.
8168 * scng.adb (Check_End_Of_Line): Moved to spec.
8169 (Error_Long_Line): Removed, no longer used.
8170 * scng.ads (Check_End_Of_Line): Moved here from body.
8171
81722014-01-27 Tristan Gingold <gingold@adacore.com>
8173
8174 * exp_ch7.adb (Build_Cleanup_Statements): Call
8175 Build_Protected_Subprogram_Call_Cleanup to insert the cleanup
8176 for protected body.
8177 * exp_ch9.adb (Build_Protected_Subprogram_Body): Likewise.
8178 Remove Service_Name variable.
8179 (Build_Protected_SUbprogam_Call_Cleanup): New procedure that
8180 factorize code from the above subprograms.
8181 * exp_ch9.ads (Build_Protected_Subprogram_Call_Cleanup): New procedure.
8182
2757c5bf
AC
81832014-01-27 Hristian Kirtchev <kirtchev@adacore.com>
8184
8185 * einfo.adb (Has_Option): Reimplemented.
8186 * sem_prag.adb (Analyze_Refinement_Clause): Add global
8187 variables AR_Constit, AW_Constit, ER_Constit, EW_Constit,
8188 External_Constit_Seen and State. Add local variables Body_Ref,
8189 Body_Ref_Elmt and Extra_State. Reimplement part of the logic to
8190 avoid a cumbersome while pool. Verify the legality of an external
8191 state and relevant properties.
8192 (Check_External_Property): New routine.
8193 (Check_Matching_State): Remove parameter profile
8194 and update comment on usage.
8195 (Collect_Constituent): Store the
8196 relevant external property of a constituent.
8197 * sem_util.adb (Async_Readers_Enabled): Update the call to
8198 Has_Enabled_Property.
8199 (Async_Writers_Enabled): Update the call to Has_Enabled_Property.
8200 (Effective_Reads_Enabled): Update the call to Has_Enabled_Property.
8201 (Effective_Writes_Enabled): Update the call to Has_Enabled_Property.
8202 (Has_Enabled_Property): Rename formal parameter Extern to State_Id.
8203 Update comment on usage. Reimplement the logic to recognize the various
8204 formats of properties.
8205
82062014-01-27 Ed Schonberg <schonberg@adacore.com>
8207
8208 * par-ch5.adb: Minor reformatting.
8209
82102014-01-27 Tristan Gingold <gingold@adacore.com>
8211
8212 * s-tposen.ads: Harmonize style and comments.
8213
82142014-01-27 Vincent Celier <celier@adacore.com>
8215
8216 * projects.texi: Document that shared library projects, by
8217 default, cannot import projects that are not shared library
8218 projects.
8219
82202014-01-27 Robert Dewar <dewar@adacore.com>
8221
8222 * sem_ch8.adb (Find_Selected_Component): Use Replace instead
8223 of Rewrite.
8224
82252014-01-27 Ed Schonberg <schonberg@adacore.com>
8226
8227 * a-suenco.adb, a-suenst.adb (Decode): Raise encoding error if
8228 any other exception is raised.
8229 (Convert): If both Input_Scheme and Output_Scheme are UTF_8 it is
8230 still necessary to perform a conversion in order to remove overlong
8231 encodings.
8232
00ba7be8
AC
82332014-01-27 Robert Dewar <dewar@adacore.com>
8234
8235 * exp_smem.adb: Minor reformatting.
8236
82372014-01-27 Thomas Quinot <quinot@adacore.com>
8238
8239 * a-calfor.ads: Fix incorrect reference to operator "-" in comment.
8240
82412014-01-27 Ed Schonberg <schonberg@adacore.com>
8242
8243 * sem_res.adb (Make_Call_Into_Operator): In ASIS mode, relocate
8244 nodes for operands to the original node for the call, to preserve
8245 Original_Node pointers within the resolved operands, given that
8246 they may have been rewritten as well. Previous approach copied
8247 the operands into a new tree and lost those pointers.
8248
82492014-01-27 Claire Dross <dross@adacore.com>
8250
8251
8252 * a-cofove.adb, a-cofove.ads: Add Strict_Equal function to the API.
8253
82542014-01-27 Ed Schonberg <schonberg@adacore.com>
8255
8256 * sem_util.adb (Check_Internal_Protected_Use): A call through
8257 an anonymous access parameter of the current protected function
8258 is not a potential modification of the current object.
8259
82602014-01-27 Ed Schonberg <schonberg@adacore.com>
8261
8262 * a-cobove.adb (Reserve_Capacity): Procedure raises
8263 Capacity_Error, not Constraint_Error, when request cannot be
8264 satisfied.
8265
82662014-01-27 Vincent Celier <celier@adacore.com>
8267
8268 * a-coorma.adb, a-cohama.adb (Assign): Copy the Source to the Target,
8269 not the Target to itself.
8270
82712014-01-27 Ed Schonberg <schonberg@adacore.com>
8272
8273 * exp_ch4.adb (Expand_Concatenate): If the target of the
8274 concatenation is a library-level entity, always use the off-line
8275 version of concatenation, regardless of optimization level. This
8276 is space-efficient, and prevents linking problems when some
8277 units are compiled with different optimization levels.
8278
82792014-01-27 Ed Schonberg <schonberg@adacore.com>
8280
8281 * sem_ch5.adb: Code clean up.
8282
82832014-01-27 Ed Schonberg <schonberg@adacore.com>
8284
8285 * par-ch5.adb (P_Iterator_Specification): Improve error recovery
8286 when an array or container iterator includes a subtype indication,
8287 which is only legal in an element iterator.
8288
8fdafe44
AC
82892014-01-27 Thomas Quinot <quinot@adacore.com>
8290
8291 * exp_ch7.adb: Minor reformatting.
8292
82932014-01-27 Robert Dewar <dewar@adacore.com>
8294
8295 * opt.adb (SPARK_Mode): Default for library units is None rather
8296 than Off.
8297 * opt.ads: Remove AUTO from SPARK_Mode_Type SPARK_Mode_Type is
8298 no longer ordered.
8299 * sem_prag.adb (Analyze_Pragma, case SPARK_Mode): Remove AUTO
8300 possibility.
8301 * snames.ads-tmpl (Name_Auto): Removed, no longer used.
8302
83032014-01-27 Robert Dewar <dewar@adacore.com>
8304
8305 * par-ch5.adb (P_Sequence_Of_Statements): Make entry in
8306 Suspicious_Labels table if we have identifier; followed by loop
8307 or block.
8308 * par-endh.adb (Evaluate_End_Entry): Search Suspicious_Labels table.
8309 * par.adb (Suspicious_Labels): New table.
8310
83112014-01-27 Robert Dewar <dewar@adacore.com>
8312
8313 * exp_aggr.adb (Check_Bounds): Reason is range check, not
8314 length check.
8315
83162014-01-27 Yannick Moy <moy@adacore.com>
8317
8318 * get_spark_xrefs.adb (Get_SPARK_Xrefs): Accept new type 'c' for
8319 reference.
8320 * lib-xref-spark_specific.adb (Is_Global_Constant): Remove useless
8321 function now.
8322 (Add_SPARK_Xrefs): Include references to constants.
8323 * spark_xrefs.ads Document new character 'c' for references to
8324 constants.
8325
83262014-01-27 Thomas Quinot <quinot@adacore.com>
8327
8328 * exp_smem.adb (Add_Write_After): For a function call, insert write as
8329 an after action in a transient scope.
8330
b3a69993
AC
83312014-01-27 Thomas Quinot <quinot@adacore.com>
8332
8333 * exp_smem.adb (Expand_Shared_Passive_Variable): For a reference
8334 to a shared variable as an OUT formal in a call to an init proc,
8335 the 'Read call must be emitted after, not before, the call.
8336
83372014-01-27 Robert Dewar <dewar@adacore.com>
8338
8339 * gnat_rm.texi: Remove mention of AUTO mode for SPARK_Mode pragma.
8340
f1bd0415
AC
83412014-01-27 Robert Dewar <dewar@adacore.com>
8342
8343 * a-wichha.adb (Character_Set_Version): Change to output proper
8344 value.
8345
83462014-01-27 Hristian Kirtchev <kirtchev@adacore.com>
8347
8348 * einfo.adb (Is_Input_Only_State): Removed.
8349 (Is_Non_Volatile_State): Removed.
8350 (Is_Output_State): Removed.
8351 * einfo.ads (Is_Input_Only_State): Remove attribute and
8352 subprogram. Update related entity.
8353 (Is_Non_Volatile_State):
8354 Remove attribute and subprogram. Update related entity.
8355 (Is_Output_State): Removed attribute and subprogram. Update
8356 related entity.
8357 * exp_ch6.adb (Expand_Subprogram_Contract): Update comment on
8358 generated code.
8359 * sem_ch3.adb (Analyze_Declarations): Analyze the contract of
8360 an object, not just variables.
8361 (Analyze_Object_Contract): New routine.
8362 (Analyze_Variable_Contract): Removed.
8363 (Process_Discriminants): Detect an illegal use of volatile
8364 discriminant in SPARK mode.
8365 * sem_ch5.adb (Analyze_Iterator_Specification):
8366 Detect an illegal use of volatile loop variable.
8367 (Analyze_Loop_Parameter_Specification): Detect an illegal use
8368 of volatile loop variable.
8369 * sem_ch6.adb (Process_Formals): Update the volatile object
8370 detection. Detect an illegal formal of mode IN OUT or OUT in
8371 SPARK mode. Enhance the error messages with references.
8372 * sem_ch12.adb (Instantiate_Object): Update the volatile object
8373 detection. Enhance the error messages with references.
8374 * sem_prag.adb (Analyze_Abstract_State): Enhance the error
8375 messages with references.
8376 (Analyze_Contract_Case): Enhance the error messages with references.
8377 (Analyze_External_Property): Call Check_Duplicate_Property to process
8378 an external property.
8379 (Analyze_External_Property_In_Decl_Part): New routine.
8380 (Analyze_External_State_In_Decl_Part): Removed.
8381 (Analyze_Global_Item): Detect an illegal
8382 use of a volatile constant. Detect an illegal use
8383 of a variable with enabled Effective_Reads. Enhance
8384 the error messages with references. Remove obsolete
8385 checks concerning Input_Only and Output_Only states.
8386 (Analyze_Initialization_Item): Enhance the error messages
8387 with references.
8388 (Analyze_Initializes_In_Decl_Part): Do not
8389 collect the states and variables when the initialization list
8390 is null.
8391 (Analyze_Input_Item): Enhance the error messages with references.
8392 (Analyze_Input_Output): Enhance the error messages with references.
8393 (Analyze_Pragma): Enhance the error messages with references.
8394 (Analyze_Refinement_Clause): Code reformatting.
8395 (Analyze_Refined_Depends_In_Decl_Part):
8396 Rename global variable Global to Reg_Global and update all
8397 occurrences. Add local variables D7 and D8. Update the error
8398 messages with references. Update the call to Collect_Global_Items.
8399 (Analyze_Refined_Global_In_Decl_Part): Add local variables
8400 Has_Proof_In_State, Proof_In_Constits and Proof_In_Items. Update
8401 the call to Collect_Global_Items. Account for a Proof_In state
8402 in null / useless refinement checks. Verify the coverage of
8403 Proof_In states.
8404 (Check_Dependency_Clause): Remove local variable
8405 Out_Constits. Remove the retrieval and removal of constituents
8406 for an Output_Only state. Remove the reporting of unused
8407 Output_Only state constituents.
8408 (Check_Duplicate_Mode): Enhance
8409 the error message with a reference.
8410 (Check_Duplicate_Property): New routine.
8411 (Check_Duplicate_Option): Enhance the error message with a reference.
8412 (Check_External_Properties): Enhance the error message with a reference.
8413 (Check_Function_Return): Enhance the error message with a reference.
8414 (Check_In_Out_States): Update
8415 comment on usage. Add a specialized error message for Proof_In
8416 constituents. Enhance the error message with a reference.
8417 (Check_Input_States): Update comment on usage. Account for
8418 possible Proof_In constituents. Enhance the error message
8419 with a areference.
8420 (Check_Matching_Constituent): Enhance the error message with a
8421 reference.
8422 (Check_Matching_State): Enchance the error message with a reference.
8423 (Check_Mode): Add local variable From_Global. Update the call to
8424 Find_Mode. Emit more precise error messages concerning extra items
8425 (Check_Mode_Restriction_In_Enclosing_Context): Consider
8426 pragma Refined_Global. Enhance the error message with a
8427 reference.
8428 (Check_Mode_Restriction_In_Function): Enhance the error message with
8429 a reference.
8430 (Check_Output_States): Update comment on usage. Add local variable
8431 Posted. Account for possible Proof_In constituents. Produce a detailed
8432 list of missing constituents.
8433 (Check_Proof_In_States): New routine.
8434 (Check_Refined_Global_Item): Handle Proof_In
8435 constituents. Enchance the error message with a reference.
8436 (Collect_Global_Items): Add formal parameters Proof_In_Items
8437 and Has_Proof_In_State. Update the comment on usage. Account
8438 for Proof_In items.
8439 (Create_Or_Modify_Clause): Enchance
8440 the error message with a reference.
8441 (Find_Mode): Add
8442 formal parameter From_Global. Update the comment on usage.
8443 Detect when the mode is governed by pragma [Refined_]Global.
8444 (Output_Constituents): Removed.
8445 (Report_Extra_Constituents):
8446 Report extra Proof_In constituents.
8447 (Report_Unused_Constituents): Removed.
8448 (Usage_Error): Code reformatting. Enhance the error
8449 messages with reference.
8450 * sem_prag.ads (Analyze_External_Property_In_Decl_Part): New routine.
8451 (Analyze_External_State_In_Decl_Part): Removed.
8452 * sem_res.adb (Resolve_Actuals): Update the volatile object
8453 detection. Enhance the error message with a reference.
8454 (Resolve_Entity_Name): Update the volatile object
8455 detection. Enhance the error message with a reference.
8456 * sem_util.adb (Is_Refined_State): Add a guard to avoid a crash.
8457 (Is_SPARK_Volatile_Object): New routine.
8458 (Has_Volatile_Component): New routine.
8459 * sem_util.ads (Is_Delegate): Alphabetized.
8460 (Is_SPARK_Volatile_Object): New routine.
8461 (Has_Volatile_Component): New routine.
8462 * snames.ads-tmpl: Remove names Name_Input_Only and Name_Output_Only.
8463
84642014-01-27 Ed Schonberg <schonberg@adacore.com>
8465
8466 * sem_attr.adb: Resolve fully prefix of 'Update.
8467
48b08b18
AC
84682014-01-27 Ben Brosgol <brosgol@adacore.com>
8469
8470 * gnat_rm.texi: Minor clarifications.
8471
84722014-01-27 Robert Dewar <dewar@adacore.com>
8473
8474 * sem_elab.adb (Check_Internal_Call_Continue): Avoid complaining
8475 about call that is generated as part of an Initial_Condition
8476 check.
8477 * sem_prag.adb: Minor spelling correction.
8478
1b8b4638
RD
84792014-01-27 Robert Dewar <dewar@adacore.com>
8480
8481 * sem_prag.adb (Set_Convention_From_Pragma): Check that
8482 convention Ghost can only apply to functions.
8483 * einfo.ads, einfo.adb (Is_Ghost_Subprogram): Add clarifying comment.
8484
42959b0c
RD
84852014-01-27 Robert Dewar <dewar@adacore.com>
8486
8487 * gnat_ugn.texi: Add Short_Enums to documentation of
8488 -gnatet/-gnateT.
8489
84902014-01-27 Robert Dewar <dewar@adacore.com>
8491
8492 * sem_prag.adb (Analyze_Input_Item): Correct check for input
8493 item in same package.
8494 * sem_util.ads, sem_util.adb (Within_Scope): New function.
8495
87e9c2a2
AC
84962014-01-26 Arnaud Charlet <charlet@adacore.com>
8497
8498 * a-intnam-lynxos.ads, mlib-tgt-specific-lynxos.adb,
8499 s-osinte-lynxos-3.adb, s-osinte-lynxos-3.ads, s-osinte-lynxos.adb,
8500 s-osinte-lynxos.ads, s-taprop-lynxos.adb, s-tpopsp-lynxos.adb,
8501 system-lynxos-ppc.ads, system-lynxos-x86.ads: Removed, no longer
8502 maintained.
8503
54dce195
EB
85042014-01-25 Eric Botcazou <ebotcazou@adacore.com>
8505
8506 * gcc-interface/Makefile.in: Fix oversight.
8507
88293f03
EB
85082014-01-25 Eric Botcazou <ebotcazou@adacore.com>
8509
8510 * gcc-interface/utils.c (convert_to_fat_pointer): Un-obfuscate the
8511 conversion from a thin pointer with a shifted value.
8512 * gcc-interface/utils2.c (gnat_build_constructor): Propagate the
8513 read-only flag from the values onto the result.
8514 (gnat_invariant_expr): Accept read-only CONSTRUCTORs.
8515
ae56e442
TG
85162014-01-25 Tristan Gingold <gingold@adacore.com>
8517
8518 * gcc-interface/decl.c (gnat_to_gnu_entity): Always build a variable
8519 for E_Variable with a pragma Linker_Section.
8520
3a70ba74
RD
85212014-01-25 Robert Dewar <dewar@adacore.com>
8522
8523 * gcc-interface/decl.c (gnat_to_gnu_param): Make sure an Out parameter
8524 with Default_Value aspect is passed in by copy.
8525
c51f5910
AC
85262014-01-24 Eric Botcazou <ebotcazou@adacore.com>
8527
8528 * set_targ.adb: Set Short_Enums.
8529 * gcc-interface/lang.opt (fshort-enums): New option.
8530 * gcc-interface/misc.c (gnat_handle_option): Handle it.
8531 (gnat_post_options): Do not modify the global settings.
8532
85332014-01-24 Robert Dewar <dewar@adacore.com>
8534
8535 * g-rannum.ads, g-rannum.adb (Random_Ordinary_Fixed): New generic
8536 function.
8537 (Random_Decimal_Fixed): New generic function.
8538 * s-rannum.ads: Minor comment clarifications.
8539
f27ad2b2
RD
85402014-01-24 Robert Dewar <dewar@adacore.com>
8541
8542 * back_end.adb: Remove Short_Enums handling (handled in
8543 Ttypes/Get_Targ now) Minor added comments.
8544 * freeze.adb: Change name Short_Enums_On_Target to
8545 Target_Short_Enums.
8546 * get_targ.ads, get_targ.adb (Get_Short_Enums): New function.
8547 * opt.ads: Minor comment updates.
8548 * sem_ch13.adb: Change name Short_Enums_On_Target to
8549 Target_Short_Enums.
8550 * set_targ.adb: Set Short_Enums from gcc back end.
8551 * set_targ.ads (Short_Enums): New variable.
8552 * targparm.ads, targparm.adb: Remove Short_Enums entries (handled in
8553 Ttypes/Get_Targ now).
8554 * ttypes.ads (Target_Short_Enums): New constant boolean switch
8555
dd6ab508
PO
85562014-01-24 Pascal Obry <obry@adacore.com>
8557
8558 * g-sercom-mingw.adb: Fix serial port name for port number > 10.
8559
e6d5d940
GD
85602014-01-24 Gary Dismukes <dismukes@adacore.com>
8561
8562 * exp_disp.adb (Expand_Dispatching_Call): Call Unqualify on Param when
8563 comparing it with Ctrl_Arg, since Ctrl_Arg may have had qualification
8564 stripped off.
8565
ab986406
AC
85662014-01-24 Robert Dewar <dewar@adacore.com>
8567
8568 * sinfo.ads, make.adb, prj-env.adb: Minor reformatting.
8569
85702014-01-24 Vincent Celier <celier@adacore.com>
8571
8572 * prj.adb (Add_Aggregated_Project): Do not add a project in
8573 the list if it is already there.
8574
85752014-01-24 Yannick Moy <moy@adacore.com>
8576
8577 * lib-xref-spark_specific.adb (Enclosing_Subprogram_Or_Package):
8578 Correct the search for a subrogram declaration to which a pragma is
8579 attached.
8580
85812014-01-24 Bob Duff <duff@adacore.com>
8582
8583 * gnat_ugn.texi: Document --decimal-grouping and
8584 --based-grouping switches in gnatpp.
8585
979b94ea
AC
85862014-01-24 Ed Schonberg <schonberg@adacore.com>
8587
8588 * sinfo.ads: Documentation update.
8589
85902014-01-24 Ed Schonberg <schonberg@adacore.com>
8591
8592 * sem_ch3.adb (Constant_Redeclaration): New declaration is
8593 illegal if previous one has an initial expression that is an
8594 aggregate expanded into assignments.
8595
85962014-01-24 Ed Schonberg <schonberg@adacore.com>
8597
8598 * sem_ch5.adb (Analyze_Loop_Parameter_Specification): Small
8599 code reorganization to remove spurious warning on a loop with
8600 an array element iterator that has a null range.
8601
86022014-01-24 Vincent Celier <celier@adacore.com>
8603
8604 * make.adb (Binding_Phase): When setting the Ada paths, use
8605 the library ALI dir, not the object dir in libraries.
8606
86072014-01-24 Yannick Moy <moy@adacore.com>
8608
8609 * sinfo.ads: Add documentation of check flag fields.
8610
86112014-01-24 Ed Schonberg <schonberg@adacore.com>
8612
8613 * sem_res.adb (Resolve_Actuals): If an actual is a view
8614 conversion of a discriminated object, and the formal type is
8615 discriminated and constrained, apply a discriminant check to
8616 the object itself.
8617
8edc33fa
RD
86182014-01-24 Robert Dewar <dewar@adacore.com>
8619
8620 * prj.adb, prj-env.adb, back_end.adb: Add comment, minor code clean ups.
8621
ad4e3362
ES
86222014-01-24 Ed Schonberg <schonberg@adacore.com>
8623
8624 * sem_ch3.adb (Analyze_Declarations): At the end of an
8625 appropriate declarative part, call Freeze_All from the first
8626 declaration in the scope, not from the first unfrozen one. This
8627 is necessary to apply visibility checks to entities with delayed
8628 aspects. Otherwise, in the presence of instantiations and cleanups
8629 that they may generate, the delayed aspects may be analyzed too
8630 late and produce spurious visibility errors.
8631 * sem_attr.adb: Place etype on range.
8632 * sem_ch6.adb: Documentation expression functions.
8633
d0ef7921
AC
86342014-01-24 Robert Dewar <dewar@adacore.com>
8635
8636 * exp_ch7.adb: Minor change of Indices to Indexes (preferred
8637 terminology in compiler).
8638
86392014-01-24 Robert Dewar <dewar@adacore.com>
8640
8641 * scans.ads: Remove Tok_Raise from Sterm, Eterm, After_SM
8642 categories, now that Ada 95 supports raise expressions.
8643
86442014-01-24 Robert Dewar <dewar@adacore.com>
8645
8646 * freeze.adb (Freeze_Enumeration_Type): Use new target parameter
8647 Short_Enums_On_Target.
8648 * sem_ch13.adb (Set_Enum_Esize): Take Short_Enums_On_Target
8649 into account.
8650 * targparm.ads, targparm.adb: Add new target parameter Short_Enums.
8651
86522014-01-24 Ed Schonberg <schonberg@adacore.com>
8653
8654 * sem_ch5.adb (Analyze_Iterator_Specification): If subtype
8655 indication is given explicity, check that it matches the array
8656 component type or the container element type of the domain
8657 of iteration.
8658
86592014-01-24 Tristan Gingold <gingold@adacore.com>
8660
8661 * back_end.adb (Scan_Compiler_Arguments): Set Short_Enums_On_Target.
bff2d234
TG
8662 * gcc-interface/misc.c (flag_short_enums): Declare.
8663 (gnat_post_options): Set it.
d0ef7921
AC
8664
86652014-01-24 Vincent Celier <celier@adacore.com>
8666
8667 * prj-env.adb (Ada_Objects_Path): Use Ada_Objects_Path_No_Libs
8668 to cache the result when Including_Libraries is False.
8669 * prj-env.ads (Ada_Objects_Path): Update documentation
8670 * prj.adb (Free (Project_Id)): Also free Ada_Objects_Path_No_Libs
8671 (Get_Object_Directory): Return the Library_Ali_Dir only when
8672 when Including_Libraries is True.
8673 * prj.ads (Get_Object_Directory): Fix and complete documentation
8674 (Project_Data): New component Ada_Objects_Path_No_Libs
8675
162c21d9
AC
86762014-01-24 Robert Dewar <dewar@adacore.com>
8677
8678 * checks.adb (Expr_Known_Valid): Result of fpt operator never
8679 considered valid.
8680
86812014-01-24 Eric Botcazou <ebotcazou@adacore.com>
8682
8683 * back_end.adb: Minor fix in comment.
8684
86852014-01-24 Javier Miranda <miranda@adacore.com>
8686
8687 * sem_ch3.adb (Check_Abstract_Overriding): Code reestructuration
8688 required to report the error in case of task types.
8689
86902014-01-24 Ed Schonberg <schonberg@adacore.com>
8691
8692 * sem_attr.adb: Additional index checking.
8693
08cd7c2f
AC
86942014-01-24 Ed Schonberg <schonberg@adacore.com>
8695
8696 * sem_attr.adb (Analyze_Attribute, case 'Update): Analyze
8697 expressions in each component association, and for records note
8698 the entity in each association choice, for subsequent resolution.
8699 (Resolve_Attribute, case 'Update): Complete resolution of
8700 expressions in each component association.
8701
87022014-01-24 Robert Dewar <dewar@adacore.com>
8703
8704 * sem.adb (Sem): Avoid premature reference to Current_Sem_Unit
8705 (this was causing Is_Main_Unit_Or_Main_Unit_Spec to be set wrong,
8706 leading to wrong handling of SPARK_Mode for library units).
8707
87082014-01-24 Robert Dewar <dewar@adacore.com>
8709
8710 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Set SPARK_Mode
8711 on generic instances (do not consider them to be internally
8712 generated)
8713
87142014-01-24 Doug Rupp <rupp@adacore.com>
8715
8716 * s-osinte-android.ads (pthread_sigmask): Import sigprocmask
8717 vice pthread_sigmask.
8718
87192014-01-24 Vincent Celier <celier@adacore.com>
8720
8721 * prj.adb (Debug_Output (Str, Str2)): Output if verbosity is
8722 not default.
8723
87242014-01-24 Vincent Celier <celier@adacore.com>
8725
8726 * prj-ext.adb (Add): Do not output anything when Silent is True,
8727 whatever the verbosity. When Source is From_External_Attribute,
8728 set the corresponding environment variable if it is not already set.
8729 * prj-ext.ads (Add): New Boolean parameter Silent, defaulted
8730 to False
8731 * prj-proc.adb (Process_Expression_For_Associative_Array):
8732 For attribute External, call Prj.Ext.Add with Silent set to
8733 True for the child environment, to avoid useless output in non
8734 default verbosity.
8735
87362014-01-24 Ed Schonberg <schonberg@adacore.com>
8737
8738 * sem_res.adb (Set_Slice_Subtype): Handle properly a discrete
8739 range given by a subtype indication, and force evaluation of
8740 the bounds, as for a simple range.
8741 * exp_util.adb (Evaluate_Slice_Bounds): Utility to force evaluation
8742 of bounds of slice for various kinds of discrete ranges.
8743 (Evaluate_Name, Evaluate_Subtype_From_Expr): use
8744 Evaluate_Slice_Bounds.
8745
87462014-01-24 Bob Duff <duff@adacore.com>
8747
8748 * s-taskin.ads (Activator): Make this Atomic, because
8749 Activation_Is_Complete reads it, and that can be called
8750 from any task. Previously, this component was only
8751 modified by the activator before activation, and by
8752 Self after activation.
8753 * a-taside.ads, a-taside.adb (Environment_Task,
8754 Activation_Is_Complete): Implement these missing functions.
8755
7610fee8
AC
87562014-01-24 Doug Rupp <rupp@adacore.com>
8757
8758 * init.c: Add a handler section for Android.
8759
87602014-01-24 Arnaud Charlet <charlet@adacore.com>
8761
8762 * i-cexten.ads (Unsigned_33..64, Unsigned_33..64): New types.
8763
87642014-01-24 Ed Schonberg <schonberg@adacore.com>
8765
8766 * sem_ch4.adb (Operator_Check): If one operand is a
8767 Raise_Expression, set its type to that of the other operand.
8768 * sem_res.adb (Resolve_Raise_Expression): new procedure.
8769 (Resolve_Actuals): For an actual that is a Raise_Expression,
8770 set the type to that of the formal.
8771 * sem_type.adb (Find_Unique_Type): If one of the operands is a
8772 Raise_Expression, return type of the other operand.
8773
87742014-01-24 Ed Schonberg <schonberg@adacore.com>
8775
8776 * sem_aggr.adb (Resolve_Record_Aggregate): If a scalar
8777 component of the record has a type with a default aspect, and
8778 the corresponding aggregate component is initiaized with a box,
8779 use the default value in the rewritten aggregate.
8780
87812014-01-24 Tristan Gingold <gingold@adacore.com>
8782
8783 * s-interr.ads, s-interr.adb, s-interr-hwint.adb, s-interr-vms.adb,
8784 s-interr-sigaction.adb,
8785 s-interr-dummy.adb (Install_Restricted_Handlers): Add Prio parameter.
8786 * exp_ch9.adb (Make_Initialize_Protection): Add Prio parameter
8787 to the call to Install_Restricted_Handlers.
8788
87892014-01-24 Emmanuel Briot <briot@adacore.com>
8790
8791 * prj-nmsc.adb (Check_File): Add protection when the source is
8792 not fully initialized.
8793
4a854847
AC
87942014-01-24 Ed Schonberg <schonberg@adacore.com>
8795
8796 * sem_util.adb (Is_Post_State): In a postcondition, a selected
8797 component that denotes an implicit dereference is a reference
8798 to the post state of the subprogram.
8799
88002014-01-24 Robert Dewar <dewar@adacore.com>
8801
8802 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): SPARK_Mode OFF
8803 for generated subprograms.
8804 (Analyze_Subprogram_Specification): Ditto.
8805
88062014-01-24 Vincent Celier <celier@adacore.com>
8807
8808 * prj-dect.adb (Check_Attribute_Allowed): Detect more forbidden
8809 attributes in package Builder of aggregate and aggregate library
8810 projects.
8811 * prj-nmsc.adb (Process_Naming_Scheme.Check.Check_Aggregate):
8812 Remove procedure (Process_Naming_Scheme.Check.Check_Aggregated):
8813 Remove parameters. Change error message from "... externally
8814 build library ..." to "... externally built project ...".
8815 (Process_Naming_Scheme.Check): Do not do any check in aggregate
8816 project, as attribute Library_Dir and Library_Name have already
8817 been detected as forbidden.
8818
88192014-01-24 Vincent Celier <celier@adacore.com>
8820
8821 * prj-env.adb (Find_Project): If cached project path is not in
8822 project directory, look in current directory first and use cached
8823 project path only if project is not found in project directory.
8824
a6ae518f
RD
88252014-01-24 Robert Dewar <dewar@adacore.com>
8826
8827 * sem_util.adb, lib-xref.adb: Correct false positive warnings.
8828
0bd38d94
AC
88292014-01-24 Vincent Celier <celier@adacore.com>
8830
8831 * projects.texi: Document that aggregate projects are only
8832 supported by gprbuild, but not by gnatmake. Document that the
8833 only attribute Switches in package Binder of aggregate projects
8834 will be ignored if its index is not others. Document that
8835 attribute Global_Config_File is allowed in package Binder of
8836 aggregate projects.
8837
88382014-01-24 Robert Dewar <dewar@adacore.com>
8839
8840 * sem_prag.adb: Minor code reorganization.
8841 * sem_util.adb: Minor fix of potential latent bug in Is_LHS.
8842
0567ae8d
AC
88432014-01-24 Pascal Obry <obry@adacore.com>
8844
8845 * prj-attr.adb, projects.texi, snames.ads-tmpl: Add Excluded_Patterns
8846 attribute definition.
8847
88482014-01-24 Vincent Celier <celier@adacore.com>
8849
8850 * makeutl.adb (Queue.Insert_No_Roots): In gprbuild, do not put
8851 in the Queue the same source (same path, same multi-source index)
8852 from the same project file, to avoid compiling several times
8853 the same source.
8854
88552014-01-24 Eric Botcazou <ebotcazou@adacore.com>
8856
8857 * einfo.ads (First_Rep_Item): Remove obsolete stuff.
8858 (Has_Gigi_Rep_Item): Likewise.
8859 * sem_prag.adb (Analyze_Pragma) <Pragma_Linker_Section>: Do not set
8860 Has_Gigi_Rep_Item for objects.
8861 * gcc-interface/decl.c (prepend_one_attribute_to): Rename into...
8862 (prepend_one_attribute): ...this.
8863 (prepend_one_attribute_pragma): New function extracted from...
8864 (prepend_attributes): ...here. Swap the parameters for consistency.
8865 (gnat_to_gnu_entity): Adjust calls to prepend_one_attribute_to and to
8866 prepend_attributes.
8867 <object>: Deal with a pragma Linker_Section on a constant
8868 or variable. <E_Function>: Deal with a pragma Linker_Section
8869 on a subprogram.
8870 (get_minimal_subprog_decl): Adjust calls to prepend_one_attribute_to.
8871
88722014-01-24 Vincent Celier <celier@adacore.com>
8873
8874 * opt.ads: Minor comment update.
8875
4437ea95
AC
88762014-01-24 Robert Dewar <dewar@adacore.com>
8877
8878 * sem_prag.adb (Analyze_Input_Output): Add missing error check
8879 for junk operand.
8880 * sem_util.adb (Is_Refined_State): Add defense against junk
8881 tree from error.
8882
88832014-01-24 Pascal Obry <obry@adacore.com>
8884
8885 * projects.texi: Removes Build_Slaves attribute documentation.
8886
ea0f1fc8
AC
88872014-01-23 Robert Dewar <dewar@adacore.com>
8888
8889 * opt.adb (Register_Opt_Config_Switches): Save SPARK_Mode_Pragma
8890 setting.
8891
88922014-01-23 Ed Schonberg <schonberg@adacore.com>
8893
8894 * sem_util.adb (Is_Potentially_Unevaluated): Predicate only
8895 applies to expressions that come from source.
8896 * sem_attr.adb (Analyze_Attribute, case 'Old): Improve error
8897 message.
8898 (Analyze_Attribute, case 'Loop_Entry): Apply SPARK 2014 legality
8899 rule regarding potentially unevaluated expressions, to prefix
8900 of attribute.
8901
19992053
AC
89022014-01-23 Ed Schonberg <schonberg@adacore.com>
8903
8904 * exp_util.adb (Make_Invqriant_Call): If type of expression is
8905 a private extension, get invariant from base type.
8906
89072014-01-23 Robert Dewar <dewar@adacore.com>
8908
8909 * sem_util.adb, sem_attr.adb: Minor reformatting.
8910
89112014-01-23 Robert Dewar <dewar@adacore.com>
8912
8913 * opt.adb (Save_Opt_Config_Switches): Save SPARK_Mode_Pragma
8914 (Restore_Opt_Config_Switches): Restore SPARK_Mode_Pragma.
8915 * sem.adb (Semantics): Remove save/restore of
8916 SPARK_Mode[_Pragma]. Not needed since already done in
8917 Save/Restore_Opt_Config_Switches.
8918
89192014-01-23 Robert Dewar <dewar@adacore.com>
8920
8921 * gnat_rm.texi, einfo.adb, einfo.ads, sem_prag.adb, gnat_ugn.texi,
8922 freeze.adb, repinfo.adb, aspects.adb, aspects.ads, sem_ch13.adb:
8923 Linker_Section enhancements.
8924
c733429f
AC
89252014-01-23 Tristan Gingold <gingold@adacore.com>
8926
8927 * gnat_rm.texi: Minor editing.
8928
89292014-01-23 Robert Dewar <dewar@adacore.com>
8930
8931 * opt.adb (Set_Opt_Config_Switches): Reset SPARK mode for
8932 with'ed internal units.
8933 * sem.adb (Semantics): Save and restore SPARK_Mode[_Pragma].
8934
89352014-01-23 Javier Miranda <miranda@adacore.com>
8936
8937 * lib-xref.adb (Generate_Reference): As part of processing the
8938 "end-of-spec" reference generate an extra reference to the first
8939 private entity of the package.
8940 * xr_tabls.adb (Add_Reference): No action needed for the extra
8941 'E' reference associated; similar to the processing of the
8942 'e' reference.
8943
89442014-01-23 Bob Duff <duff@adacore.com>
8945
8946 * gnat_ugn.texi: Change "--&pp off" to "--!pp off".
8947
89482014-01-23 Ed Schonberg <schonberg@adacore.com>
8949
8950 * sem_util.ads, sem_util.adb (Is_Potentially_Unevaluated): new
8951 predicate to implement rule given in 6.1.1 (20/3).
8952 * sem_attr.adb (Analyze_Attribute, case 'Old): Reject prefix of
8953 'Old in a postcondition, if it is potentially unevaluated and
8954 it is not an entity name.
8955
8bdc02c2
BD
89562014-01-23 Bob Duff <duff@adacore.com>
8957
8958 * gnat_ugn.texi: Document the new "--&pp off" feature of gnatpp.
8959
e949ee22
AC
89602014-01-23 Robert Dewar <dewar@adacore.com>
8961
8962 * gnatlink.adb (Gnatlink): Fix problem of generating bad name
8963 msg on VMS.
8964
89652014-01-23 Bob Duff <duff@adacore.com>
8966
8967 * g-dynhta.ads: Minor comment fix.
8968
89692014-01-23 Yannick Moy <moy@adacore.com>
8970
8971 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Inherit SPARK_Mode
8972 from spec on body only when not already inherited on spec. Set
8973 SPARK_Mode from context on body without previous spec. *
8974 * sem_prag.adb (Analyze_Pragma): Check placement of pragma on
8975 library-level entities. Correct retrieval of entity from
8976 declaration, for cases where the declaration is not a unit.
8977 * sem_ch12.adb (Instantiate_Object): Avoid
8978 calling Is_Volatile_Object on an empty node.
8979
545d3e65
RD
89802014-01-23 Robert Dewar <dewar@adacore.com>
8981
8982 * gnatlink.adb (Gnatlink): Check for suspicious executable file
8983 names on windows.
8984
89852014-01-23 Robert Dewar <dewar@adacore.com>
8986
8987 * a-ngelfu.ads: Remove bad uses of AND which should be AND THEN.
8988 * sem_res.adb (Check_No_Direct_Boolean_Operators): Don't give
8989 style errors in instances.
8990 * g-dynhta.ads (Static_HTable): Comment updates.
8991
cc55f9be
VC
89922014-01-23 Vincent Celier <celier@adacore.com>
8993
8994 * prj-conf.adb (Get_Or_Create_Configuration_File): Do not attempt
8995 to find a configuration project file when Config_File_Name is
8996 No_Configuration_File.
8997 * prj-conf.ads (No_Configuration_File): New constant String.
8998 * prj-pars.adb (Parse): Call Get_Or_Create_Configuration_File
8999 with Config_File_Name set to No_Configuration_File, so that
9000 no existing configuration project file will be used, and the
9001 configuration project will be only created in memory when
9002 Add_Default_GNAT_Naming_Scheme is called.
9003 * projects.texi: Minor reformatting.
9004
225a0c5c
VC
90052014-01-23 Vincent Celier <celier@adacore.com>
9006
9007 * prj-conf.adb (Get_Or_Create_Configuration_File): Never parse
9008 a config project file if On_Load_Config is not null.
9009 * prj-pars.adb: Minor comment changes.
9010
89253742
ES
90112014-01-23 Ed Schonberg <schonberg@adacore.com>
9012
9013 * lib-xref.adb (Output_References): Output progenitors of
9014 synchronized tagged types, for source navigation.
9015
53c53f6d
AC
90162014-01-23 Robert Dewar <dewar@adacore.com>
9017
9018 * exp_util.adb, sinfo.adb, sinfo.ads, sem.adb, sem_res.adb,
9019 expander.adb, exp_ch11.adb, exp_ch11.ads, sem_ch11.adb, sem_ch11.ads,
9020 sprint.adb, sprint.ads: Remove unused node N_Subprogram_Info.
9021
90222014-01-23 Emmanuel Briot <briot@adacore.com>
9023
9024 * prj-conf.adb (Get_Or_Create_Configuration_File): call
9025 On_Load_Config later.
9026
90272014-01-23 Hristian Kirtchev <kirtchev@adacore.com>
9028
9029 * sem_ch3.adb (Analyze_Declarations): Do not
9030 generate the spec of the late primitive in ASIS mode. Add two
9031 comments to explain the special cases when the expansion is
9032 not performed.
9033
90342014-01-23 Robert Dewar <dewar@adacore.com>
9035
9036 * sem_util.adb (Note_Possible_Modification): Fix error of
9037 misbehaving for implicit dereference cases in -gnatc mode.
9038
90392014-01-23 Emmanuel Briot <briot@adacore.com>
9040
9041 * prj-pars.adb: Minor reformatting.
9042
3b8056a5
AC
90432014-01-22 Ed Schonberg <schonberg@adacore.com>
9044
9045 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): A subprogram
9046 body generated for an expression function within a protected body
9047 needs a set of renaming declarations if the expression function
9048 comes from source.
9049
90502014-01-22 Ed Schonberg <schonberg@adacore.com>
9051
9052 * lib-xref.adb (Get_Type_Reference): In semantics-only mode,
9053 list interface progenitor of a tagged concurrent type, for better
9054 source navigation.
9055
90562014-01-22 Robert Dewar <dewar@adacore.com>
9057
9058 * lib.adb (In_Extended_Main_Code_Unit): Return False for
9059 Standard_Location.
9060 (In_Extended_Main_Source_Unit): Return False for Standard_Location.
9061 * lib.ads (In_Extended_Main_Code_Unit): Add documentation on
9062 treatment of Slocs No_Location and Standard_Location.
9063 * restrict.adb (Check_Restriction_No_Dependence): Explicitly
9064 check for entity with Standard_Location Sloc, rather than relying
9065 on Lib routines to do that.
9066 * sem_res.adb (Resolve_Call): Implement SPARK_05 restriction
9067 that a call cannot occur before a later occuring body within
9068 the same unit.
9069
fba9ebfc
AC
90702014-01-22 Thomas Quinot <quinot@adacore.com>
9071
9072 * rtsfind.adb: Update comment.
9073
90742014-01-22 Hristian Kirtchev <kirtchev@adacore.com>
9075
9076 * sem_aux.ads, sem_aux.adb (Is_Body): New routine.
9077 * sem_ch3.adb (Analyze_Declarations): Add local variable
9078 Body_Seen. Generate the spec of a late controlled
9079 primitive body that is about to freeze its related type.
9080 (Handle_Late_Controlled_Primitive): New routine.
9081
90822014-01-22 Robert Dewar <dewar@adacore.com>
9083
9084 * a-stream.adb: Minor reformatting.
9085
90862014-01-22 Ed Schonberg <schonberg@adacore.com>
9087
9088 * sem_ch8.adb (From_Actual_Package): Introduce a recursive
9089 sub-procedure Declared_In_Actual to handle properly the visibility
9090 of actuals in actual packages, that are themselves actuals to a
9091 actual package of the current instance. This mimics properly the
9092 visibility of formals of formal packages declared with a box,
9093 within the corresponding generic unit.
9094
90952014-01-22 Robert Dewar <dewar@adacore.com>
9096
9097 * checks.adb: Do not assume that a volatile variable is valid.
9098
90992014-01-22 Thomas Quinot <quinot@adacore.com>
9100
9101 * g-catiio.ads (Image, Value): Clarify that these functions
9102 operate in the local time zone. Minor documentation update.
9103
91042014-01-22 Thomas Quinot <quinot@adacore.com>
9105
9106 * csets.adb, csets.ads, opt.ads: Minor documentation fixes.
9107
b2834fbd
AC
91082014-01-22 Robert Dewar <dewar@adacore.com>
9109
9110 * sem_aux.adb, sem_aux.ads, sem_ch3.adb (Has_Unconstrained_Elements):
9111 Moved to sem_aux.adb.
9112
91132014-01-22 Robert Dewar <dewar@adacore.com>
9114
9115 * vms_data.ads: Minor reformatting.
9116
91172014-01-22 Robert Dewar <dewar@adacore.com>
9118
9119 * debug.adb: Document messages affected by -gnatd.E including
9120 the new ones that relate to late definition of equality.
9121 * sem_ch6.adb (Check_Untagged_Equality): In Ada 2012 mode, if
9122 debug flag -gnatd.E is set, then generate warnings rather than
9123 errors.
9124 (Check_Untagged_Equality): In earlier versions of Ada,
9125 generate warnings if Warn_On_Ada_2012_Incompatibility flag is set.
9126
91272014-01-22 Robert Dewar <dewar@adacore.com>
9128
9129 * sem_prag.adb (Usage_Error): Output additional messages for
9130 unconstrained OUT parameters lacking an input dependency.
9131
91322014-01-22 Robert Dewar <dewar@adacore.com>
9133
9134 * sem_ch4.adb: Minor reformatting.
9135
91362014-01-22 Robert Dewar <dewar@adacore.com>
9137
9138 * restrict.ads: Minor reformatting.
9139 * sem_res.adb (Resolve_Call): Check for SPARK_05 restriction that
9140 forbids a call from within a subprogram to the same subprogram.
9141
91422014-01-22 Thomas Quinot <quinot@adacore.com>
9143
9144 * a-stream.ads (Read_SEA, Write_SEA): New subprograms, optimized
9145 stream attributes for Stream_Element_Array.
9146 * a-stream.adb (Read_SEA, Write_SEA): Bodies for the above.
9147 * rtsfind.adb (Check_CRT): Do not reject a reference to an entity
9148 defined in the current scope.
9149
d4129bfa
AC
91502014-01-22 Robert Dewar <dewar@adacore.com>
9151
9152 * debug.adb, exp_ch4.adb, erroutc.adb: Minor reformatting.
9153
91542014-01-22 Thomas Quinot <quinot@adacore.com>
9155
9156 * sem_ch7.adb, sem_ch8.adb, exp_ch3.adb: Minor reformatting.
9157
91582014-01-22 Thomas Quinot <quinot@adacore.com>
9159
9160 * sem_ch3.adb (Analyze_Object_Declaration): For a constant
9161 declaration initialized with a function call, whose type
9162 has variable size, need to remove side effects so that the
9163 initialization expression becomes a dereference of a temporary
9164 reference to the function result.
9165
b6f36bf8
YM
91662014-01-22 Yannick Moy <moy@adacore.com>
9167
9168 * errout.adb (Initialize): Remove trick to add dummy entry
9169 in Warnings table.
9170 * erroutc.adb (Set_Warnings_Mode_Off,
9171 Set_Warnings_Mode_On): Do nothing if warnings are suppressed by
9172 command line switch.
9173 * opt.ads (Warning_Mode): Document behavior
9174 wrt pragma Warnings, in normal mode and in GNATprove_Mode.
9175
113a62d9
RD
91762014-01-22 Robert Dewar <dewar@adacore.com>
9177
9178 * sem_ch3.adb, errout.adb, erroutc.adb: Minor reformatting.
9179
91802014-01-22 Robert Dewar <dewar@adacore.com>
9181
9182 * sem_ch13.adb (Check_Pool_Size_Clash): New procedure
9183 (Analyze_Attribute_Definition_Clause, case Storage_Pool): call
9184 Check_Pool_Size_Clash (Analyze_Attribute_Definition_Clause,
9185 case Storage_Size): call Check_Pool_Size_Clash.
9186
f5f6d8d7
AC
91872014-01-22 Robert Dewar <dewar@adacore.com>
9188
9189 * sem_ch3.adb, exp_util.adb, sem_dim.adb, sem_elab.adb, sem_ch8.adb,
9190 sem_eval.ads: Minor reformatting.
9191
91922014-01-22 Thomas Quinot <quinot@adacore.com>
9193
9194 * sem_eval.adb (Compile_Time_Known_Bounds): Return False for
9195 Any_Composite to prevent cascaded errors.
9196
91972014-01-22 Yannick Moy <moy@adacore.com>
9198
9199 * errout.adb (Initialize): Do not insert special entry in Warnings
9200 table in GNATprove_Mode.
9201 * erroutc.adb (Set_Warnings_Mode_On): Add info in Warnings table in
9202 GNATprove_Mode.
9203 * gnat1drv.adb (Adjust_Global_Switches): Do not suppress frontend
9204 warnings anymore.
9205
2e70d415
AC
92062014-01-22 Robert Dewar <dewar@adacore.com>
9207
9208 * sem_prag.adb (Analyze_Initializes_In_Decl_Part): Handle null
9209 initializes case.
9210
92112014-01-22 Robert Dewar <dewar@adacore.com>
9212
9213 * snames.ads-tmpl: Update header.
9214
92152014-01-22 Thomas Quinot <quinot@adacore.com>
9216
9217 * exp_util.adb (Insert_Actions): When inserting actions on a
9218 short circuit operator that has already been analyzed, do not park
9219 actions in node; instead introduce an N_Expression_With_Actions
9220 and insert actions immediately.
9221 Add guard for unexpected case of climbing up through statement
9222 in Actions list of an N_Expression_With_Actions.
9223 * sem_elab.adb (Insert_Elab_Check): Remove complex
9224 specialized circuitry for the case where the context is already
9225 analyzed, as it is not needed and introduces irregularities in
9226 finalization. Instead rely on the above change to Insert_Actions
9227 to ensure that late insertion on short circuit operators works
9228 as expected.
9229
92302014-01-22 Ed Schonberg <schonberg@adacore.com>
9231
9232 * sem_ch4.adb (Operator_Check): Improve error message when an
9233 operand of concatenation is an access type.
9234
92352014-01-22 Thomas Quinot <quinot@adacore.com>
9236
9237 * sem_dim.adb (Analyze_Dimension_Identifier): Add guard against
9238 cascaded error.
9239
92402014-01-22 Ed Schonberg <schonberg@adacore.com>
9241
9242 * sem_ch8.adb (Find_Selected_Component): Handle properly the case
9243 of an expanded name in a proper body, whose prefix is a package
9244 in the context of the proper body, when there is a homonym of
9245 the package declared in the parent unit.
9246
1250f802
RD
92472014-01-22 Robert Dewar <dewar@adacore.com>
9248
9249 * sem_warn.adb (Check_Use_Clause): Don't give no entities used
9250 msg if errors found.
9251 (Check_One_Unit): Same change.
9252
92532014-01-22 Robert Dewar <dewar@adacore.com>
9254
9255 * ug_words: Add missing/wrong entries for VMS warning switches.
9256 * sem_prag.adb (Check_Duplicate_Pragma): Avoid flagging parent type.
9257
54533a0b
AC
92582014-01-22 Jerome Guitton <guitton@adacore.com>
9259
9260 * mlib-tgt-specific-vxworks.adb (Get_Target_Suffix): Replace xscale by
9261 arm.
9262
92632014-01-22 Robert Dewar <dewar@adacore.com>
9264
9265 * gnat_rm.texi, gnat_ugn.texi: Document passive task optimization
9266
3044bbe4
EB
92672014-01-22 Eric Botcazou <ebotcazou@adacore.com>
9268
9269 * gcc-interface/Makefile.in: Minor fixes.
9270
71affc54
AC
92712014-01-21 Robert Dewar <dewar@adacore.com>
9272
9273 * par-ch4.adb (P_If_Expression): Rewritten to improve error recovery.
9274 * par-ch5.adb (P_Condition): New version with expression prescanned.
9275 * par.adb (P_Condition): New version with expression prescanned.
9276
92772014-01-21 Robert Dewar <dewar@adacore.com>
9278
9279 * gnat_rm.texi: Document that Allow_Integer_Address is ignored
9280 if Address is not a private type.
9281 * sem_prag.adb (Analyze_Pragma, case Allow_Integer_Address):
9282 Ignore pragma if System.Address is not a private type.
9283
92842014-01-21 Arnaud Charlet <charlet@adacore.com>
9285
9286 * namet.ads (Name_Len): Initialize to 0 to avoid accessing an
9287 uninitialized value.
9288
ef1c0511
AC
92892014-01-21 Thomas Quinot <quinot@adacore.com>
9290
9291 * gnat_rm.texi (Scalar_Storage_Order): Update documentation.
9292
92932014-01-21 Ed Schonberg <schonberg@adacore.com>
9294
9295 * sem_ch12.adb (Set_Instance_Env): In Ada 2012 mode, preserve
9296 the value of Assertions_Enabled flag when compiling an instance of
9297 an internal unit. This facilitates the use of pre/postconditions
9298 in generic internal units, such as the new elementary function
9299 libraries.
9300
93012014-01-21 Robert Dewar <dewar@adacore.com>
9302
9303 * exp_aggr.adb: Minor reformatting.
9304 * sem_attr.adb: Minor reformatting.
9305 * sem_res.adb: Minor comment addition.
9306 * einfo.adb: Minor comment updates.
9307 * freeze.adb: Minor reformatting and code reorganization.
9308
93092014-01-21 Ed Schonberg <schonberg@adacore.com>
9310
9311 * par-ch4.adb (P_If_Expression): Handle more gracefully an
9312 elsif clause that does not have an else part.
9313
637a41a5
AC
93142014-01-21 Robert Dewar <dewar@adacore.com>
9315
9316 * checks.adb, sem_util.ads, sem_ch4.adb: Minor reformatting.
9317 * gcc-interface/Makefile.in: clean up target pairs.
9318
93192014-01-21 Pascal Obry <obry@adacore.com>
9320
9321 * projects.texi: Minor typo fix.
9322
93232014-01-21 Thomas Quinot <quinot@adacore.com>
9324
9325 * freeze.adb (Check_Component_Storage_Order): If a record type
9326 has an explicit Scalar_Storage_Order attribute definition clause,
9327 reject any component that itself is of a composite type and does
9328 not have one.
9329
93302014-01-21 Ed Schonberg <schonberg@adacore.com>
9331
9332 * sem_ch10.adb (Generate_Parent_Reference): Make public so it
9333 can be used to generate proper cross-reference information for
9334 the parent units of proper bodies.
9335
93362014-01-21 Thomas Quinot <quinot@adacore.com>
9337
9338 * exp_pakd.adb (Expand_Packed_Element_Set,
9339 Expand_Packed_Element_Reference): No byte swapping required in
9340 the front-end for the case of a reverse storage order array,
9341 as this is now handled uniformly in the back-end. However we
9342 still need to swap back an extracted element if it is itself a
9343 nested composite with reverse storage order.
9344
497716fe
AC
93452014-01-21 Hristian Kirtchev <kirtchev@adacore.com>
9346
9347 * sem_prag.adb (Analyze_External_Property): Add processing for "others".
9348 (Analyze_Pragma): Update the grammar of pragma Abstract_State to
9349 include "others".
9350
93512014-01-21 Arnaud Charlet <charlet@adacore.com>
9352
9353 * gnat_ugn.texi: Minor updates.
9354
fb1fdf7d
AC
93552014-01-21 Thomas Quinot <quinot@adacore.com>
9356
9357 * exp_pakd.adb: Update comment, minor reformatting.
9358
93592014-01-21 Hristian Kirtchev <kirtchev@adacore.com>
9360
9361 * sem_ch3.adb (Analyze_Variable_Contract): Trigger the volatile
9362 object check when SPARK_Mode is on.
9363 * sem_ch6.adb (Process_Formals): Trigger the volatile object
9364 check when SPARK_Mode is on.
9365 * sem_ch12.adb (Instantiate_Object): Trigger the volatile object
9366 check when SPARK_Mode is on.
9367 * sem_ch13.adb (Analyze_Aspect_Specifications): Insert the
9368 corresponding pragma of aspect SPARK_Mode in the visible
9369 declarations of a package declaration.
9370 * sem_prag.adb (Analyze_Pragma): Trigger the volatile object
9371 check when SPARK_Mode is on.
9372 * sem_res.adb (Resolve_Actuals): Trigger the volatile object
9373 check when SPARK_Mode is on.
9374 (Resolve_Entity_Name): Trigger
9375 the volatile object check when SPARK_Mode is on.
9376
84f80f5b
AC
93772014-01-21 Robert Dewar <dewar@adacore.com>
9378
9379 * sem_ch3.adb, sem_prag.adb, sem_prag.ads, sem_ch12.adb, sem_res.adb,
9380 sem_ch6.adb, a-except-2005.adb: Minor reformatting.
9381
93822014-01-21 Ed Schonberg <schonberg@adacore.com>
9383
9384 * exp_ch3.adb (Expand_N_Object_Declaration): When a class-wide
9385 object is declared, it is rewritten as a renaming of an dynamic
9386 expression that wraps the initial value. The renaming declaration
9387 is first given an internal name, to prevent collisions with the
9388 entity already declared, and then the name is modified to reflect
9389 the original one. the modification of the name must preserve
9390 the source location of the original, to prevent spurious errors
9391 when compiling with style checks if the declaration involves
9392 more than one entity.
9393
6c3c671e
AC
93942014-01-21 Hristian Kirtchev <kirtchev@adacore.com>
9395
9396 * aspects.adb Add entries for Async_Readers, Async_Writers,
9397 Effective_Reads and Effective_Writes in table Canonical_Aspect.
9398 * aspects.ads Add entries for Async_Readers, Async_Writers,
9399 Effective_Reads and Effective_Writes in tables Aspect_Id,
9400 Aspect_Names, Aspect_Delay and Implementation_Defined_Aspect.
9401 * atree.adb (Ekind_In): New version with 8 parameters.
9402 (Node34): New routine.
9403 (Set_Node34): New routine.
9404 * atree.ads (Ekind_In): New version with 8 parameters.
9405 (Node34): New routine.
9406 (Set_Node34): New routine.
9407 * einfo.adb Contract is now Node34.
9408 (Contract): Update the assertion and node usage.
9409 (Get_Pragma): Include pragmas Async_Readers, Async_Writers,
9410 Effective_Reads and Effective_Writes.
9411 (Set_Contract): Update the assertion and node usage.
9412 (Write_Field24_Name): Remove the output for a contract.
9413 (Write_Field34_Name): Add output for a contract.
9414 * einfo.ads Contract is now Node34. Update the comment on
9415 attribute usage and related node structures.
9416 (Get_Pragma): Update the comment on usage.
9417 * par-prag.adb (Prag): Pragmas Async_Readers, Async_Writers,
9418 Effective_Reads and Effective_Writes do not require special
9419 processing by the parser.
9420 * sem_ch3.adb (Analyze_Variable_Contract): New routine.
9421 (Analyze_Declarations): Analyze the contract of a variable at
9422 the end of the declarative region.
9423 (Analyze_Object_Declaration): Create a contract for a variable.
9424 * sem_ch6.adb (Analyze_Subprogram_Contract): Update the retrieval
9425 of classification pragmas.
9426 (Process_Formals): Detect an illegal
9427 use of a volatile object as a formal in a function.
9428 * sem_ch12.adb (Instantiate_Object): Detect an illegal use of
9429 a volatile object as an actual in generic instantiation.
9430 * sem_prag.adb Add entries for Async_Readers, Async_Writers,
9431 Effective_Reads and Effective_Writes in table Sig_Flags.
9432 (Analyze_External_State_In_Decl_Part): New routine.
9433 (Analyze_Global_Item): Detect an illegal use of a volatile object
9434 as a global item of a function.
9435 (Analyze_Pragma): Reimplement
9436 pragma Abstract_State. Add support for pragmas Async_Readers,
9437 Async_Writers, Effective_Reads and Effective_Writes.
9438 (Check_External_Properties): New routine.
9439 * sem_prag.ads (Analyze_External_State_In_Decl_Part): New routine.
9440 (Check_External_Properties): New routine.
9441 * sem_res.adb (Resolve_Actuals): Detect an illegal use of a
9442 volatile object as an actual in a call.
9443 (Resolve_Entity_Name):
9444 Add local variables Par, Prev and Usage_OK. Detect illegal
9445 contexts of volatile objects.
9446 * sem_util.adb (Add_Contract_Item): Add support for
9447 pragmas associated with the contract of a variable.
9448 (Async_Readers_Enabled): New routine.
9449 (Async_Writers_Enabled): New routine.
9450 (Effective_Reads_Enabled): New routine.
9451 (Effective_Writes_Enabled): New routine.
9452 (Has_Enabled_Property):
9453 New routine.
9454 (Is_Unchecked_Conversion_Instance): New routine.
9455 (Is_Volatile_Object): Add support for entities that may denote
9456 a volatile object.
9457 * sem_util.ads (Add_Contract_Item): Update the
9458 comment on usage.
9459 (Async_Readers_Enabled): New routine.
9460 (Async_Writers_Enabled): New routine.
9461 (Effective_Reads_Enabled): New routine.
9462 (Effective_Writes_Enabled): New routine.
9463 (Is_Unchecked_Conversion_Instance): New routine.
9464 * sinfo.ads Update the comment on the structure of N_Contract.
9465 * snames.ads-tmpl Add predefined names for Async_Readers,
9466 Async_Writers, Effective_Reads and Effective_Writes. Add
9467 pragma ids for Async_Readers, Async_Writers, Effective_Reads
9468 and Effective_Writes.
9469
94702014-01-21 Robert Dewar <dewar@adacore.com>
9471
9472 * exp_ch4.adb (Eval_Op_Expon): Use CRT_Safe_Compile_Time_Known_Value
9473 * sem_eval.adb (Compile_Time_Known_Value): Remove special
9474 handling of CRT mode (CRT_Safe_Compile_Time_Known_Value): New
9475 function (Eval_Op_Expon): Add CRT_Safe in call to Test_Foldable
9476 (Test_Foldable): Add CRT_Safe parameter
9477 * sem_eval.ads (Compile_Time_Known_Value): Remove special
9478 handling of CRT mode.
9479 (CRT_Safe_Compile_Time_Known_Value): New function.
9480
084c2203
RD
94812014-01-21 Robert Dewar <dewar@adacore.com>
9482
9483 * sem_prag.adb (Analyze_Pragma, case SPARK_Mode): Fix problem
9484 with pragma or aspect that applies to package spec or subprogram
9485 spec.
9486
579847c2
AC
94872014-01-21 Robert Dewar <dewar@adacore.com>
9488
9489 * exp_aggr.adb: Minor reformatting.
9490
94912014-01-21 Johannes Kanig <kanig@adacore.com>
9492
9493 * gnat1drv.adb (Gnat1drv) remove obsolete reference to -gnatd.H.
9494
94952014-01-21 Bob Duff <duff@adacore.com>
9496
9497 * gnat_ugn.texi: Document the "checks" attribute in gnat2xml.
9498
94992014-01-21 Steve Baird <baird@adacore.com>
9500
9501 * gnat_rm.texi: Improve description of SPARK_Mode pragma.
9502
95032014-01-21 Vincent Celier <celier@adacore.com>
9504
9505 * prj-part.adb (Parse_Single_Project): Accept to extend a project
9506 if it has only be imported by an project being extended. When a
9507 project that has only been imported by a project being extended
9508 is imported by another project that is not being extended,
9509 reset the previous indication, so that it will be an error if
9510 this project is extended later.
9511 * prj-tree.adb (Create_Project): Include component From_Extended
9512 in table Projects_HT
9513 * prj-tree.ads (Project_Name_And_Node): New Boolean component
9514 From_Extended
9515
95162014-01-21 Robert Dewar <dewar@adacore.com>
9517
9518 * atree.ads, atree.adb: Add Node33 and Set_Node33.
9519 * einfo.ads, einfo.adb (SPARK_Pragma): New field (SPARK_Aux_Pragma):
9520 New field (SPARK_Pragma_Inherited): New flag
9521 (SPARK_Aux_Pragma_Inherited): New flag (SPARK_Mode_Pragmas):
9522 Removed.
9523 * lib.ads, lib.adb: Remove SPARK_Mode_Pragma, no longer used.
9524 * opt.ads (SPARK_Mode_Pragma): New global variable.
9525 * sem.ads: Add Save_SPARK_Mode_Pragma field to Scope_Stack_Entry.
9526 * sem_ch3.adb: Use new SPARK_Mode data structures.
9527 * sem_ch6.adb: Set SPARK_Mode fields in subprogram specs and bodies.
9528 * sem_ch7.adb: Set SPARK_Mode fields in package spec and body entities.
9529 * sem_ch8.adb (Push_Scope): Save SPARK_Mode_Pragma.
9530 (Pop_Scope): Restore SPARK_Mode_Pragma.
9531 * sem_prag.adb (Analyze_Pragma, case SPARK_Mode): Rewrite for
9532 new data structures.
9533
95342014-01-21 Arnaud Charlet <charlet@adacore.com>
9535
9536 * back_end.adb: Undo previous change, not needed. Minor reformatting.
9537
376e7d14
AC
95382014-01-21 Thomas Quinot <quinot@adacore.com>
9539
9540 * exp_ch5.adb: Fix comment.
9541 * switch-c.adb: Minor comment update.
9542 * exp_ch3.adb: Minor reformatting.
9543
95442014-01-21 Arnaud Charlet <charlet@adacore.com>
9545
9546 * back_end.adb (Scan_Compiler_Arguments): Do not store object
9547 filename in gnatprove mode.
9548
95492014-01-21 Thomas Quinot <quinot@adacore.com>
9550
9551 * sinfo.ads (No_Ctrl_Actions): Clarify documentation (flag also
9552 suppresses usage of primitive _assign for tagged types).
9553 * exp_aggr.adb (Build_Array_Aggr_Code.Gen_Assign): Set
9554 No_Ctrl_Actions for a tagged type that does not require
9555 finalization, as we want to disable usage of _assign (which
9556 may cause undesirable discriminant checks on an uninitialized,
9557 invalid target).
9558
95592014-01-21 Ed Schonberg <schonberg@adacore.com>
9560
9561 * sem_prag.adb: Reject invariant'class on completion.
9562
8d81fb4e
AC
95632014-01-21 Javier Miranda <miranda@adacore.com>
9564
9565 * exp_ch3.adb (Build_Init_Procedure): For
9566 derivations of interfaces, do not move the the initialization
9567 of the _parent field since such assignment is not generated.
9568
95692014-01-21 Ed Schonberg <schonberg@adacore.com>
9570
9571 * sem_res.adb (Rewrite_Renamed_Operator): Do not replace entity
9572 with the operator it renames if we are within an expression of
9573 a pre/postcondition, because the expression will be reanalyzed
9574 at a later point, and the analysis of the renaming may affect
9575 the visibility of the operator when in an instance.
9576
95772014-01-21 Robert Dewar <dewar@adacore.com>
9578
9579 * sinfo.ads, sinfo.adb: Change Do_Discriminant_Check to use new Flag1.
9580 Add this flag to type conversion nodes and assignment nodes.
9581 * treepr.adb: Deal properly with Flag 1,2,3.
9582 * treeprs.adt: Minor comment update.
9583
95842014-01-21 Robert Dewar <dewar@adacore.com>
9585
9586 * sem_eval.adb (Compile_Time_Known_Value): Add Ignore_CRT
9587 parameter.
9588 * sem_eval.ads (Compile_Time_Known_Value): Add Ignore_CRT
9589 parameter, completely rewrite spec.
9590
95912014-01-21 Ed Schonberg <schonberg@adacore.com>
9592
9593 * sem_ch10.adb (Install_Withed_Unit): If the unit is a subprogram
9594 instance that is inlined, it may have been rewritten as a wrapper
9595 package. In that case the unit that must be made visible is the
9596 related instance of the package.
9597
95982014-01-21 Arnaud Charlet <charlet@adacore.com>
9599
9600 * exp_ch9.adb (Expand_N_Selective_Accept.Add_Accept): Refine
9601 previous change in codepeer mode.
9602
6b6041ec
AC
96032014-01-21 Arnaud Charlet <charlet@adacore.com>
9604
9605 * exp_ch9.adb (Expand_N_Selective_Accept.Add_Accept): Always add
9606 call to Abort_Undefer, as expected by the runtime.
9607 * s-tasren.adb (Local_Complete_Rendezvous): Replace
9608 Defer_Abort_Nestable by Defer_Abort, since we do not expect abort to be
9609 deferred at this point. Update comments.
9610
96112014-01-21 Thomas Quinot <quinot@adacore.com>
9612
9613 * exp_ch4.adb, exp_ch5.adb, checks.adb: Minor reformatting.
9614
96152014-01-21 Arnaud Charlet <charlet@adacore.com>
9616
9617 * switch-c.adb, usage.adb, gnat_ugn.texi: Mark -gnates as internal,
9618 remove from doc.
9619
77a2f3df
RD
96202014-01-21 Robert Dewar <dewar@adacore.com>
9621
9622 * switch-c.adb, usage.adb, atree.adb, atree.ads: Minor reformatting.
9623
5f0c4d67
AC
96242014-01-21 Thomas Quinot <quinot@adacore.com>
9625
9626 * atree.adb, atree.ads (Num_Extension_Nodes): Switch to Node_Id, since
9627 this is value is used in Node_Id arithmetic operations.
9628 (Copy_Node, Exchange_Entities): Use loops indexed by Num_Extension_Nodes
9629 instead of hard-coded unrolled code.
9630
96312014-01-21 Yannick Moy <moy@adacore.com>
9632
9633 * gnat1drv.adb: Minor code cleanup, removing useless code.
9634
96352014-01-21 Arnaud Charlet <charlet@adacore.com>
9636
9637 * opt.ads (SPARK_Switches_File_Name): New.
9638 * switch-c.adb (Scan_Front_End_Switches): Add handling of -gnates=xxx *
9639 * usage.adb (Usage): Document -gnates, in gnatprove mode only.
9640 * gnat_ugn.texi: Document -gnates.
9641
96422014-01-21 Yannick Moy <moy@adacore.com>
9643
9644 * errout.adb (Special_Msg_Delete): Update comment. Remove
9645 special case for GNATprove which should not ignore mismatch
9646 in sizes for representation clauses.
9647 * sem_prag.adb (Analyze_Pragma): Remove special case for GNATprove
9648 which should not ignore pragma Pack.
9649
96502014-01-21 Ed Schonberg <schonberg@adacore.com>
9651
9652 * sem_ch4.adb: Code clean up.
9653
96542014-01-21 Steve Baird <baird@adacore.com>
9655
9656 * gnat_rm.texi: Improve GNAT RM description of SPARK_Mode pragma.
9657
4bcf6815
AC
96582014-01-21 Robert Dewar <dewar@adacore.com>
9659
9660 * gcc-interface/gigi.h: Get Flags array address.
9661 * gcc-interface/trans.c: Acquire Flags array address.
9662 * atree.adb: Add support for Flags array and Flag0,1,2,3.
9663 * atree.ads: Add support for Flags array and Flag0,1,2,3.
9664 * atree.h: Add support for Flags array and Flag0,1,2,3.
9665 * back_end.adb: Pass Flags array address to gigi.
9666
96672014-01-21 Ed Schonberg <schonberg@adacore.com>
9668
9669 * sem_ch8.adb (Attribute_Renaming): Transfer original attribute
9670 reference to generated body so that legality checks on stream
9671 attributes are properly applied. If type is tagged and already
9672 frozen, insert generated body at the point of the renaming
9673 declaration.
9674
96752014-01-21 Ed Schonberg <schonberg@adacore.com>
9676
9677 * sem_ch12.adb: Code clean up.
9678 * sem_ch8.adb: Minor reformatting
9679
43417b90
AC
96802014-01-20 Robert Dewar <dewar@adacore.com>
9681
9682 * checks.adb: Check SPARK_Mode instead of GNATProve_Mode for
9683 converting warnings on inevitable exceptions to errors.
9684 * exp_ch4.adb: Check SPARK_Mode instead of GNATProve_Mode for
9685 converting warnings on inevitable exceptions to errors.
9686 * opt.adb (SPARK_Mode_Config): Handled like other config flags
9687 * opt.ads (SPARK_Mode_Type): Moved here from types (renamed from
9688 SPARK_Mode_Id) (SPARK_Mode_Type): Add pragma Ordered, remove
9689 SPARK_ from names (SPARK_Mode): New flag (SPARK_Mode_Config):
9690 New flag (Config_Switches_Type): Add SPARK_Mode field
9691 * sem.adb: Minor code reorganization (remove unnecessary with)
9692 * sem.ads (Scope_Stack_Entry): Add Save_SPARK_Mode field
9693 * sem_aggr.adb: Check SPARK_Mode instead of GNATProve_Mode for
9694 converting warnings on inevitable exceptions to errors.
9695 * sem_attr.adb: Check SPARK_Mode instead of GNATProve_Mode for
9696 converting warnings on inevitable exceptions to errors.
9697 * sem_ch3.adb: Check SPARK_Mode instead of GNATProve_Mode for
9698 converting warnings on inevitable exceptions to errors.
9699 * sem_ch4.adb: Check SPARK_Mode instead of GNATProve_Mode for
9700 converting warnings on inevitable exceptions to errors.
9701 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Reset SPARK_Mode
9702 from spec if needed
9703 * sem_ch7.adb (Analyze_Package_Body_Helper): Reset SPARK_Mode
9704 from spec if needed
9705 * sem_ch8.adb (Push_Scope): Save SPARK_Mode (Pop_Scope):
9706 Restore SPARK_Mode
9707 * sem_elab.adb: Check SPARK_Mode instead of GNATProve_Mode for
9708 converting warnings on inevitable exceptions to errors.
9709 * sem_prag.adb (Get_SPARK_Mode_From_Pragma): New function
9710 (Get_SPARK_Mode_Id): Removed (Get_SPARK_Mode_Type): New name
9711 of Get_SPARK_Mode_Id
9712 * sem_prag.ads (Get_SPARK_Mode_From_Pragma): New function
9713 * sem_res.adb: Check SPARK_Mode instead of GNATProve_Mode for
9714 converting warnings on inevitable exceptions to errors.
9715 * sem_util.adb: Check SPARK_Mode instead of GNATProve_Mode for
9716 converting warnings on inevitable exceptions to errors.
9717 * types.ads (SPARK_Mode_Id): Moved to opt.ads and renamed
9718 SPARK_Mode_Type
9719
97202014-01-20 Ed Schonberg <schonberg@adacore.com>
9721
9722 * sem_ch13.adb: Add semantic information to rewritten type
9723 reference.
9724
97252014-01-20 Ed Schonberg <schonberg@adacore.com>
9726
9727 * exp_ch5.adb (Expand_N_Assignment_Statement): If both sides
9728 are of a type with unknown discriminants, convert both to the
9729 underlying view of the type, so that the proper constraint check
9730 can be applied to the right-hand side.
9731
97322014-01-20 Robert Dewar <dewar@adacore.com>
9733
9734 * atree.adb (Copy_Node): Fix failure to copy last component
9735 (Exchange_Entities): Fix failure to exchange last entity
9736
97372014-01-20 Ed Schonberg <schonberg@adacore.com>
9738
9739 * sem_ch12.adb: Code clean up.
9740
e4deba8e
RD
97412014-01-20 Robert Dewar <dewar@adacore.com>
9742
9743 * gnat_rm.texi, sem_ch4.adb: Minor reformatting.
9744
a736f6e6
AC
97452014-01-20 Ed Schonberg <schonberg@adacore.com>
9746
9747 * sem_ch4.adb (Analyze_Quantified_Expression): If after
9748 pre-analysis the loop parameter specification has been
9749 rewritten as a iterator specification, propagate the change to
9750 the quantified expression, for ASIS navigtion needs.
9751
97522014-01-20 Vincent Celier <celier@adacore.com>
9753
9754 * par-ch10.adb: Minor error message change: escape [ and ].
9755
4a28b181
AC
97562014-01-20 Robert Dewar <dewar@adacore.com>
9757
9758 * checks.adb: Make warnings on exceptions into errors in GNATprove mode.
9759 * errout.adb: Implement [ and ] insertion characters.
9760 * errout.ads: Document new [ and ] insertion characters.
9761 * sem_ch12.adb, restrict.adb, frontend.adb, exp_ch7.adb: Minor
9762 addition of ??? comment.
9763 * lib-xref.adb, exp_util.adb, gnat1drv.adb: Minor reformatting
9764 * exp_ch4.adb, sem_ch3.adb, sem_ch4.adb, sem_ch6.adb, sem_elab.adb,
9765 sem_eval.adb, sem_res.adb, sem_util.adb, sem_attr.adb, sem_aggr.adb:
9766 Make warnings on exceptions into errors in GNATprove mode.
9767 * sem_dim.adb: Minor reformatting throughout Quote [ and ]
9768 in error messages.
9769
97702014-01-20 Ed Schonberg <schonberg@adacore.com>
9771
9772 * sem_ch13.adb: Code clean up.
9773
b465ef6f
AC
97742014-01-20 Robert Dewar <dewar@adacore.com>
9775
9776 * errout.ads, errout.adb: Implement >? >x? >X? sequences in error
9777 messages.
9778 * sem_ch6.adb (Check_Statement_Sequence): Missing return is an
9779 error in GNATprove mode.
9780
97812014-01-20 Ed Schonberg <schonberg@adacore.com>
9782
9783 * par-ch4.adb (Is_Parameterless_Attribute): The Ada2012 attribute
9784 reference 'Old takes no parameters, and thus can appear as a
9785 prefix of a slice.
9786
97872014-01-20 Eric Botcazou <ebotcazou@adacore.com>
9788
9789 * exp_aggr.adb: Fix minor typos.
9790
a6152428
AC
97912014-01-20 Ed Schonberg <schonberg@adacore.com>
9792
9793 * sem_attr.adb (Analyze_Attribute, case 'Constrained): In an
9794 instance the attribute is legal, and its value is determined
9795 statically if the type has no discriminants. This choice is
9796 more useful than rechecking the legality rule in the instance,
9797 is consistent with older usage, and is also consistent with all
9798 existing tests.
9799
98002014-01-20 Arnaud Charlet <charlet@adacore.com>
9801
9802 * sem_cat.adb (Validate_Static_Object_Name): Change error into
9803 warning in Relaxed_Semantic_Mode.
9804
e19fd0bd
AC
98052014-01-20 Ed Schonberg <schonberg@adacore.com>
9806
9807 * sem_attr.adb: Code and comments cleanup.
9808
98092014-01-20 Yannick Moy <moy@adacore.com>
9810
9811 * debug.adb Free debug flags -gnatd.D, -gnatd.G and -gnatd.V *
9812 * errout.adb (Compilation_Errors): Remove special handling in
9813 GNATprove mode.
9814 * gnat1drv.adb (Adjust_Global_Switches): Remove handling of the
9815 removed debug flags.
9816 * gnat_rm.texi: Initial documentation for Abstract_State, Depends,
9817 Global, Initial_Condition, Initializes and Refined_State pragmas and
9818 aspects.
9819 * opt.ads (Frame_Condition_Mode, Formal_Extensions,
9820 SPARK_Strict_Mode): Remove global flags.
9821 * sem_ch3.adb (Analyze_Object_Declaration): Check of no hidden state
9822 always performed now, on packages declaring a null state.
9823 (Signed_Integer_Type_Declaration): Remove ill-designed attempt
9824 at providing pedantic mode for bounds of integer types.
9825 * sem_ch4.adb (Analyze_Quantified_Expression): Warning on suspicious
9826 "some" quantified expression now issued under control of -gnatw.t,
9827 like the other warning on unused bound variable.
9828 * sem_prag.adb (Check_Precondition_Postcondition): Remove useless test
9829 on removed flag.
9830 (Analyze_Pragma): Remove tests for SPARK 2014
9831 pragmas, not officially allowed by GNAT.
9832
58827738
AC
98332014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
9834
9835 * sem_prag.adb (Analyze_Pragma): Ensure that
9836 the sole argument of pragmas Abstract_State, Contract_Cases,
9837 Depends, Global and Initializes in in aggregate form.
9838 (Analyze_Refined_Pragma): Ensure that the sole argument of
9839 pragmas Refined_Depends, Refined_Global and Refined_State is in
9840 aggregate form.
9841 (Ensure_Aggregate_Form): New routine.
9842
98432014-01-20 Doug Rupp <rupp@adacore.com>
9844
9845 * sem_attr.adb (Analyze_Attribute): case
9846 Attribute_Constrained => treat all prefixes as legal for Declib
9847 compatibility.
9848
9559eccf
AC
98492014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
9850
9851 * sem_prag.adb (Check_Mode): Reimplement the routine.
9852 (Find_Mode): New routine.
9853
98542014-01-20 Robert Dewar <dewar@adacore.com>
9855
9856 * sem_ch4.adb (Operator_Check): Handle additional
9857 Allow_Integer_Address cases.
9858
7dbd3de9
RD
98592014-01-20 Robert Dewar <dewar@adacore.com>
9860
9861 * gnat_rm.texi (Allow_Integer_Address): Remove note about not
9862 allowed if address is non-private, no longer true.
9863 * sem_prag.adb (Analyze_Pragma, case Allow_Integer_Address):
9864 Remove check for address being private, causes difficulty when
9865 pragma used in gnat.adc file and is not needed, since we guard
9866 this in Address_Integer_Convert_OK.
9867 * exp_ch7.adb: Minor reformatting.
9868 * sem_ch4.adb: Handle operator operands in Allow_Integer_Address mode.
9869
98702014-01-20 Robert Dewar <dewar@adacore.com>
9871
9872 * checks.adb (Apply_Range_Check): Remove gnatprove special
9873 casing of exponentiation.
9874 * sem_res.adb (Resolve_Op_Expon): Apply range check to right
9875 operand for integer case to check range against Natural.
9876
061828e3
AC
98772014-01-20 Robert Dewar <dewar@adacore.com>
9878
9879 * s-tataat.adb: Minor reformatting.
9880
98812014-01-20 Robert Dewar <dewar@adacore.com>
9882
9883 * einfo.adb (Is_Descendent_Of_Address): Now applies to all
9884 entities, and also fix documentation to remove mention of visible
9885 integer type, since this is not what the implementation does.
9886 * einfo.ads (Is_Descendent_Of_Address): Now applies to all
9887 entities, and also fix documentation to remove mention of visible
9888 integer type, since this is not what the implementation does.
9889 * gnat_rm.texi: Minor clarification of Allow_Integer_Address
9890 function.
9891 * sem_ch4.adb (Analyze_One_Call): Handle Allow_Integer_Address
9892 case for parameter type check.
9893 * sem_res.adb (Resolve): Use new function
9894 Address_Integer_Convert_OK.
9895 * sem_type.adb: Minor code reorganization (use Ekind_In) Minor
9896 reformatting throughout.
9897 * sem_util.adb (Address_Integer_Convert_OK): New function.
9898 * sem_util.ads: Minor reformatting (put specs in alpha order)
9899 (Address_Integer_Convert_OK): New function.
9900
99012014-01-20 Thomas Quinot <quinot@adacore.com>
9902
9903 * exp_ch7.adb (Wrap_Transient_Expression):
9904 Insertion extra conditional expression only if
9905 Opt.Suppress_Control_Flow_Optimizations is set.
9906
ff4e28eb
AC
99072014-01-20 Arnaud Charlet <charlet@adacore.com>
9908
9909 * s-tataat.adb (Initialize_Attributes): Abort might already be
9910 deferred in Create_Task.
9911
99122014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
9913
9914 * checks.adb (Apply_Scalar_Range_Check): Flag
9915 the exponent as requiring a range check when the expression is
9916 an exponentiation.
9917
a1efcc17
AC
99182014-01-20 Fedor Rybin <frybin@adacore.com>
9919
9920 * gnat_ugn.texi: Documenting --passed-tests option for gnattest.
9921
99222014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
9923
9924 * sem_util.adb (Default_Initialization): New routine.
9925 * sem_util.ads: Add new type Default_Initialization_Kind.
9926 (Default_Initialization): New routine.
9927
99282014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
9929
9930 * sem_prag.adb (Check_Mode): Correct all error
9931 message logic dealing with in/in out parameters that may appear
9932 as inputs or have a self reference.
9933
6fd0a72a
AC
99342014-01-20 Robert Dewar <dewar@adacore.com>
9935
9936 * exp_ch9.adb, checks.adb, exp_intr.adb: Minor reformatting.
9937 * sem_res.adb (Resolve): Fix error causing infinite loop for
9938 integer used as address. Allow addresses as integers.
9939
99402014-01-20 Arnaud Charlet <charlet@adacore.com>
9941
9942 * s-osinte-linux.ads (struct_sigaction): Fix rep clause.
9943
99442014-01-20 Bob Duff <duff@adacore.com>
9945
9946 * par-ch8.adb (P_Use_Type_Clause): Detect syntax
9947 error when "use all" is not followed by "type".
9948
3b4598a7
AC
99492014-01-20 Bob Duff <duff@adacore.com>
9950
9951 * exp_intr.adb (Expand_Unc_Deallocation): Remove warning on abort
9952 followed by free.
9953
99542014-01-20 Ed Schonberg <schonberg@adacore.com>
9955
9956 * checks.adb (Apply_Address_Clause_Check): If there is an
9957 alignment check on the expression in an address clause, and there
9958 is no local exception propagation, add an additional explanatory
9959 message to clarify the cause of previous warning.
9960
4058ddcc
AC
99612014-01-20 Robert Dewar <dewar@adacore.com>
9962
9963 * exp_ch7.adb: Minor reformatting.
9964 * opt.ads: Minor comment updates.
9965 * sem.adb: Minor name change Is_Main_Unit =>
9966 Is_Main_Unit_Or_Main_Unit_Spec.
9967 * sem_ch6.adb: Minor reformatting and code reorganization.
9968
99692014-01-20 Bob Duff <duff@adacore.com>
9970
9971 * gnat_ugn.texi: Update gnatpp switches.
9972
99732014-01-20 Thomas Quinot <quinot@adacore.com>
9974
9975 * exp_ch9.adb: Minor comment edit.
9976
d8a764c4
AC
99772014-01-20 Robert Dewar <dewar@adacore.com>
9978
9979 * gnat_rm.texi: Document that Allow_Integer_Address is permitted
9980 only if System.Address is a private type.
9981 * opt.ads (Allow_Integer_Address): No longer set by -gnates.
9982 * sem_prag.adb (Analyze_Pragma, case Allow_Integer_Address):
9983 Allowed only if type System.Address is private, since otherwise
9984 it makes no sense.
9985 * sem_res.adb: Fix failure to properly Analyze unchecked
9986 conversions that were introduced by Allow_Integer_Address.
9987 * switch-c.adb: Remove -gnates switch.
9988 * usage.adb: Remove -gnates switch.
9989 * gnat_ugn.texi: Remove documentation of -gnates flag.
9990
99912014-01-20 Ed Schonberg <schonberg@adacore.com>
9992
9993 * sem_ch6.adb (Analyze_Expression_Function): Pre-analyze and
9994 resolve expression to perform proper name capture.
9995
99962014-01-20 Ed Schonberg <schonberg@adacore.com>
9997
9998 * sem.adb (Semantics): When saving/restoring configuration
9999 switches, the spec of a pre- defined unit that is the main unit
10000 must be treated as a predefined unit as well.
10001
100022014-01-20 Thomas Quinot <quinot@adacore.com>
10003
10004 * exp_ch7.adb (Wrap_Transient_Expression): For a Boolean
10005 expression, insert an extra conditional expression when saving
10006 the value of the expression, for the benefit of control flow
10007 graph based coverage analysis.
10008 * exp_ch3.adb: Minor reformatting.
10009
818b578d
AC
100102014-01-20 Robert Dewar <dewar@adacore.com>
10011
10012 * gnat1drv.adb: Set Allow_Integer_Address in relaxed semantics mode.
10013 * gnat_rm.texi: Document pragma Allow_Integer_Address.
10014 * gnat_ugn.texi: Document pragma Allow_Integer_Address, -gnates.
10015 * opt.ads: New flag Allow_Integer_Address.
10016 * par-prag.adb: Dummy entry for pragma Allow_Integer_Address.
10017 * sem_ch5.adb: Minor reformatting.
10018 * sem_prag.adb: Implement pragma Allow_Integer_Address.
10019 * sem_res.adb (Resolve): Allow integer address value if
10020 switch set.
10021 * sem_util.adb: Minor reformatting.
10022 * snames.ads-tmpl: Add entry for pragma Allow_Integer_Address.
10023 * switch-c.adb: Recognize flag -gnates.
10024 * usage.adb: Document flag -gnates.
10025
100262014-01-20 Thomas Quinot <quinot@adacore.com>
10027
10028 * s-tadeca.adb: Fix minor typos in comment.
10029
c2e54001
AC
100302014-01-20 Pascal Obry <obry@adacore.com>
10031
10032 * s-win32.ads (FreeLibrary): New import.
10033
100342014-01-20 Robert Dewar <dewar@adacore.com>
10035
10036 * sem_res.adb, sem_cat.adb: Minor reformatting.
10037 * sem_ch11.adb (Analyze_Raise_Statement): Only give warning about
10038 assigning to OUT parameters for the current subprogram scope.
10039 * exp_ch4.adb: Minor reformatting.
10040
100412014-01-20 Ed Schonberg <schonberg@adacore.com>
10042
10043 * exp_ch4.adb (Process_Transient_Object,
10044 Find_Enclosing_Contexts): If the top-level if-expression that
10045 generated the transient object is an actual in a call, the proper
10046 Hook_Context is a construct enclosing the call.
10047 * einfo.ads: Indicate that Related_Expression is used to link a
10048 loop variable to the container expression over which the loop
10049 takes place.
10050 (Analyze_Iterator_Specification): Set the Related_Expression of
10051 the loop variable in a container element iterator.
10052 (Note_Possible_Modification): If the variable is the loop
10053 variable in a container element iterator, indicate that the
10054 enclosing container is also modified.
10055
100562014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
10057
10058 * aspects.adb (Move_Or_Merge_Aspects): Reimplemented.
10059
90b51aaf
AC
100602014-01-20 Robert Dewar <dewar@adacore.com>
10061
10062 * s-taasde.ads, gnat_ugn.texi, s-tadeca.adb, sem_res.adb, s-tadeca.ads:
10063 Minor reformatting and code clean up.
10064
100652014-01-20 Arnaud Charlet <charlet@adacore.com>
10066
10067 * sem_cat.adb (Validate_Object_Declaration): Relax semantics
10068 of objects of private type if Relaxed_RM_Semantics.
10069
2838fa93
AC
100702014-01-20 Claire Dross <dross@adacore.com>
10071
10072 * a-cofove.ads (Vector): Capacity discriminant
10073 should be in range of the index.
10074
100752014-01-20 Thomas Quinot <quinot@adacore.com>
10076
10077 * a-caldel.ads(To_Duration), s-taasde.ads(Time_Enqueue):
10078 Clarify specs s-tadeca.adb(Enqueue_Calendar): Compensate for
10079 possible difference between epoch of Ada.Calendar clock and Ada
10080 real-time/tasking clock.
10081 * s-taprop-posix.adb: Minor comment fix.
10082
100832014-01-20 Doug Rupp <rupp@adacore.com>
10084
10085 * sysdep.c [vxworks]: Remove Vxworks version noise for RTP.
10086
100872014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
10088
10089 * exp_attr.adb (Expand_N_Attribute_Reference): Generate validity
10090 checks on the prefix of attribute 'Old.
10091 * sem_ch3.adb (Process_Range_Expr_In_Decl): Suppress the
10092 generation of validity checks on a range that belongs to the
10093 iteration scheme of a quantified expression.
10094 * sem_ch5.adb (One_Bound): Suppress the generation of validity
10095 checks on a bound that belongs to the iteration scheme of a
10096 quantified expression, generate the check in all other cases.
10097
100982014-01-20 Bob Duff <duff@adacore.com>
10099
10100 * gnat_ugn.texi: Enable --pp-new by default. Minor reorganization.
10101
101022014-01-20 Ed Schonberg <schonberg@adacore.com>
10103
10104 * sem_res.adb (Resolve): When compiling a predefined unit, ignore
10105 interpretations that do not come from other predefined units,
10106 to prevent spurious ambiguities in the presence of user-defined
10107 operators in the context of (an instance of) a predefined unit.
10108
1e569204
AC
101092014-01-20 Robert Dewar <dewar@adacore.com>
10110
10111 * gnat_rm.texi: Document that Loop_Variant is included in
10112 Statement_Assertions.
10113 * sem_prag.adb (Check_Kind): Add Loop_Variant to
10114 Statement_Assertions (Check_Applicable_Policy): Add Loop_Variant
10115 to Statement_Assertions.
10116
101172014-01-20 Doug Rupp <rupp@adacore.com>
10118
10119 * sysdep.c (__gnat_is_file_not_found_error) [vxworks6]: Add case
10120 for errno ENOENT from RTP on NFS mounted file system.
10121
0969e96d
AC
101222014-01-20 Ed Schonberg <schonberg@adacore.com>
10123
10124 * sem_util.adb (Check_Function_Writable_Actuals): 1) Do not
10125 examine code that does not come from source. The check does not
10126 apply to code generated for constraint checks, and such code may
10127 generate spurious error messages when compiled with expansion
10128 disabled (as in a generic unit) because side effects may not
10129 have been removed.
10130 2) Make error messages more explicit: indicate the component
10131 of the construct whose value is indeterminate because of a
10132 call to a function with in-out parameter in another component,
10133 when there is no mandated order of execution between the two
10134 components (actuals, aggregate components, alternatives).
10135
101362014-01-20 Robert Dewar <dewar@adacore.com>
10137
10138 * gnat_rm.texi: Minor cleanup.
10139
36eef04a
AC
101402014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
10141
10142 * sem_attr.adb (Analyze_Attribute): Attributes 'Old and 'Result
10143 can now apply to a refined postcondition.
10144 * sem_ch6.adb (Analyze_Subprogram_Contract): Remove local
10145 variable Result_Seen. Add variables Case_Prag, Post_Prag,
10146 Seen_In_Case and Seen_In_Post. Update the mechanism that detects
10147 whether postconditions and/or constract-cases mention attribute
10148 'Result and introduce a post-state when applied to functions.
10149 (Check_Result_And_Post_State): Removed.
10150 * sem_prag.adb (Analyze_Pragma): Add local variable
10151 Result_Seen. Verify that the expression of pragma Refined_Post
10152 mentions attribute 'Result and introduces a post-state.
10153 * sem_util.ads, sem_util.adb (Check_Result_And_Post_State): New routine.
10154
101552014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
10156
10157 * exp_ch7.adb (Is_Subprogram_Call): New routine.
10158 (Process_Transient_Objects): Make variable Must_Hook global with
10159 respect to all locally declared subprograms. Search the context
10160 for at least one subprogram call.
10161 (Requires_Hooking): Removed.
10162
101632014-01-20 Claire Dross <dross@adacore.com>
10164
10165 * a-cfdlli.ads a-cfhama.ads a-cfhase.ads a-cforma.ads
10166 * a-cforse.ads a-cofove.ads: Add pragma Annotate (GNATprove,
10167 External_Axiomatization);
10168
65441a1e
RD
101692014-01-20 Robert Dewar <dewar@adacore.com>
10170
10171 * sem_attr.adb (Analyze_Attribute, case Loop_Entry): Allow
10172 Loop_Entry in Assert, Assert_And_Cut, and Assume pragmas.
10173 * sem_prag.adb (Analyze_Pragma, case Assert[_And_Cut], Assume):
10174 Allow Loop_Entry to be used in these pragmas if they appear in
10175 an appropriate context.
10176 (Placement_Error): Specialize error
10177 message for pragma Assert[_And_Cut] or pragma Assume containing
10178 Loop_Entry attribute.
10179 * a-exexpr-gcc.adb, sinput.adb: Minor reformatting.
10180 * s-excmac-arm.ads, s-except.ads, s-excmac-gcc.ads: Minor reformatting
10181 and code clean ups.
10182
800da977
AC
101832014-01-20 Robert Dewar <dewar@adacore.com>
10184
10185 * gnat1drv.adb: Minor comment update.
10186
101872014-01-20 Tristan Gingold <gingold@adacore.com>
10188
10189 * raise-gcc.c (PERSONALITY_FUNCTION/arm): Remove unused
10190 variables, comment out unused code.
10191 * a-exexpr-gcc.adb: Move declarations to s-excmac-gcc.ads
10192 * s-excmac-gcc.ads: New file, extracted from a-exexpr-gcc.adb
10193 * s-excmac-arm.ads: New file.
10194
101952014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
10196
10197 * exp_ch4.adb (Expand_N_Slice): Remove constant D and variables
10198 Drange and Index_Typ. Remove the circuitry which creates a
10199 range check to compare the index type of the array against the
10200 discrete_range.
10201 * sem_res.adb (Resolve_Slice): Add local variable Dexpr. Update
10202 the circuitry which creates a range check to handle a
10203 discrete_range denoted by a subtype indication.
10204
102052014-01-20 Pierre-Marie Derodat <derodat@adacore.com>
10206
10207 * sinput.adb, sinput.ads (Sloc_Range): Traverse the tree of original
10208 nodes to get the original sloc range.
10209
102102014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
10211
10212 * sem_prag.adb (Analyze_Pragma): Use Defining_Entity to obtain the
10213 entity of a [library level] package.
10214
51b0e05a
AC
102152014-01-20 Tristan Gingold <gingold@adacore.com>
10216
10217 * raise-gcc.c (exception_class_eq): New function.
10218 (is_handled_by): Use it to compare exception classes.
10219 (PERSONALITY_STORAGE): Define. (continue_unwind): New function to
10220 be called to return URC_CONTINUE_UNWIND.
10221 (personality_body): New function, extracted from PERSONALITY_ROUTINE.
10222 (PERSONALITY_ROUTINE): Add an implementation for the ARM unwinder.
10223
102242014-01-20 Robert Dewar <dewar@adacore.com>
10225
10226 * opt.ads: Minor comment update.
10227
5ff90f08
AC
102282014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
10229
10230 * exp_ch4.adb (Expand_N_Slice): Relocate some variables and
10231 constants to the "Local variables" area. Add new constant D. Add
10232 new variables Drange and Index_Typ. Rename Pfx to Rep and Ptp
10233 to Pref_Typ and update all occurrences. Add circuitry to extract
10234 the discrete_range and the index type and build a range check.
10235
102362014-01-20 Arnaud Charlet <charlet@adacore.com>
10237
10238 * gnat1drv.adb (Adjust_Global_Switches): Enable
10239 Treat_Categorization_Errors_As_Warnings when Relaxed_RM_Semantics
10240 is set.
10241
102422014-01-20 Thomas Quinot <quinot@adacore.com>
10243
10244 * sem_ch5.adb, sem_ch4.adb: Minor reformatting.
10245
102462014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
10247
10248 * sem_ch13.adb (Analyze_Aspect_Specifications):
10249 When aspect SPARK_Mode appears on a package body, insert the
10250 generated pragma at the top of the body declarations.
10251
1f0b1e48
RD
102522014-01-20 Robert Dewar <dewar@adacore.com>
10253
10254 * sem_aggr.adb, exp_prag.adb, sem_aux.adb, sinfo.ads, sem_ch10.adb,
10255 checks.adb, sem_prag.adb, sem_ch12.adb, freeze.adb, g-arrspl.adb,
10256 expander.adb, gnat1drv.adb, exp_ch4.adb, sem_ch6.adb,
10257 sem_ch8.adb, exp_dist.adb: Minor reformatting.
10258
c093d3cc
AC
102592014-01-20 Yannick Moy <moy@adacore.com>
10260
10261 * gnat1drv.adb (Gnat1drv): Call Write_ALI with Object=True in GNATprove
10262 mode.
10263
102642014-01-20 Pascal Obry <obry@adacore.com>
10265
10266 * g-arrspl.ads (Slice_Set): New definition (will use a copy on
10267 write scheme).
10268 * g-arrspl.adb: Adapt all routine to this new implementation.
10269 (Set): Copy the Slice_Set definition before reusing it.
10270
0bd75e44
AC
102712014-01-20 Arnaud Charlet <charlet@adacore.com>
10272
10273 * sem_prag.adb (Process_Import_Or_Interface): In
10274 Relaxed_RM_Semantics, support old Ada 83 style of pragma Import.
10275 (Analyze_Pragma): Ditto for pragma Export.
10276 * exp_prag.adb (Expand_Pragma_Import_Or_Interface): Handle old pragma
10277 Import style.
10278
aca90db9
AC
102792014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
10280
10281 * einfo.ads: E_Abstract_State is now part of the entities that
10282 can be overloaded. Update type Overloadable_Kind to reflect the
10283 inclusion of abstract states.
10284 * sem_ch6.adb (New_Overloaded_Entity): A function can now
10285 overload an abstract state.
10286 * sem_prag.adb (Analyze_Constituent): Handle the overloading
10287 of states by functions. Use Entity_Of to obtain the entity of
10288 a constituent. (Analyze_Global_Item): Handle the overloading of
10289 states by functions.
10290 (Analyze_Initialization_Item): Handle the
10291 overloading of states by functions. Use Entity_Of to obtain the
10292 entity of an item.
10293 (Analyze_Input_Item): Handle the overloading
10294 of states by functions. Use Entity_Of to obtain the entity of an item.
10295 (Analyze_Input_Output): Handle the overloading of states by functions.
10296 (Analyze_Refinement_Clause): Handle the overloading
10297 of states by functions. Use Entity_Of to obtain the entity of an item.
10298 (Appears_In): Use Entity_Of to obtain the entity of an element.
10299 (Check_Usage): Use Entity_Of to obtain the entity of
10300 an item. Add a guard to prevent a crash due to a previous error.
10301 (Resolve_State): New routine.
10302
103032014-01-20 Yannick Moy <moy@adacore.com>
10304
10305 * spark_xrefs.ads, debug.adb, gnat1drv.adb, errout.adb, errout.ads,
10306 opt.ads: Minor comments updates.
10307
dc726757
HK
103082014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
10309
10310 * einfo.adb (Non_Limited_View): Applies to abstract states.
10311 (Set_From_Limited_With): Applies to abstract states.
10312 (Set_Non_Limited_View): Applies to abstract states.
10313 (Write_Field17): Output the non-limited view of an abstract state.
10314 * einfo.ads: Update the comment on usage and occurrences in
10315 nodes for attributes From_Limited_With and Non_Limited_View.
10316 * sem_aux.adb (Available_View): This routine can now handle
10317 abstract states.
10318 * sem_aux.ads (Available_View): This routine can now handle
10319 abstract states. Update the comment on usage.
10320 * sem_ch8.adb (Find_Expanded_Name): Handle abstract views
10321 of states and variables.
10322 (In_Pragmas_Depends_Or_Global): New routine.
10323 * sem_ch10.adb (Build_Limited_Views): Implement
10324 abstract (limited) views of variables and states.
10325 (Build_Shadow_Entity): This routine is now a procedure. Add
10326 formal parameter Shadow. Update the comment on usage. Add
10327 context-specific decoration for states and variables.
10328 (Decorate_State): New routine. (Decorate_Variable): New routine.
10329 (Find_And_Process_States): New routine.
10330 (Process_Declarations): Renamed to Process_Declarations_And_States.
10331 (Process_Declarations_And_States): Add formal parameters
10332 Pack and Create_Abstract_Views. Update the comment on usage.
10333 (Process_States): New routine.
10334 * sem_prag.adb (Check_Dependency_Clause): Handle abstract
10335 views of states and variables. Match the abstract view of a state
10336 against its corresponding non-abstract view.
10337 (Is_Matching_Input):
10338 Handle abstract views of states and variables. Match the abstract
10339 view of a state against its corresponding non-abstract view.
10340 (Process_Global_Item): Handle abstract views of states and
10341 variables.
10342
3a5de596
BD
103432014-01-20 Bob Duff <duff@adacore.com>
10344
10345 * sem_ch10.adb (Expand_With_Clause): Don't
10346 recurse on the prefix if the current with-ed name refers to a
10347 package that renames its own parent, eg "package P.Q renames P;".
10348
4460a9bc
YM
103492014-01-20 Yannick Moy <moy@adacore.com>
10350
10351 * exp_spark.adb (Expand_SPARK_Call): Remove procedure.
10352 * opt.adb, opt.ads (Full_Expander_Active): Remove function.
10353 * checks.adb, exp_ch6.adb, exp_ch9.adb, exp_disp.adb, sem_aggr.adb,
10354 * sem_ch10.adb, sem_ch5.adb, sem_ch6.adb, sem_ch8.adb, sem_ch9.adb,
10355 * sem_disp.adb, sem_res.adb Replace Full_Expander_Active by
10356 Expander_Active.
10357
103582014-01-20 Yannick Moy <moy@adacore.com>
10359
10360 * sinfo.ads Update documentation of GNATprove mode.
10361
f5da7a97
YM
103622014-01-20 Yannick Moy <moy@adacore.com>
10363
10364 * adabkend.adb, ali-util.adb, errout.adb, exp_ch7.adb,
10365 * exp_dbug.adb, freeze.adb, lib-xref.adb, restrict.adb,
10366 * sem_attr.adb, sem_ch4.adb, sem_ch5.adb, sem_ch6.adb, sem_ch8.adb,
10367 * sem_prag.adb, sem_res.adb, sem_util.adb Rename SPARK_Mode into
10368 GNATprove_Mode.
10369 * sem_ch13.adb: Remove blank.
10370 * exp_spark.adb, exp_spark.ads (Expand_SPARK_Call): Only replace
10371 subprograms by alias for renamings, not for inherited primitive
10372 operations.
10373 * exp_util.adb (Expand_Subtype_From_Expr): Apply the expansion
10374 in GNATprove mode.
10375 (Remove_Side_Effects): Apply the removal in
10376 GNATprove mode, for the full analysis of expressions.
10377 * expander.adb (Expand): Call the light SPARK expansion in GNATprove
10378 mode.
10379 (Expander_Mode_Restore, Expander_Mode_Save_And_Set): Ignore
10380 save/restore actions for Expander_Active flag in GNATprove mode,
10381 similar to what is done in ASIS mode.
10382 * frontend.adb (Frontend): Generic bodies are instantiated in
10383 GNATprove mode.
10384 * gnat1drv.adb (Adjust_Global_Switches): Set operating
10385 mode to Check_Semantics in GNATprove mode, although a light
10386 expansion is still performed.
10387 (Gnat1drv): Set Back_End_Mode to
10388 Declarations_Only in GNATprove mode, and later on special case
10389 the GNATprove mode to continue analysis anyway.
10390 * lib-writ.adb (Write_ALI): Always generate ALI files in
10391 GNATprove mode.
10392 * opt.adb, opt.ads (Full_Expander_Active): Make it equivalent to
10393 Expander_Active.
10394 (SPARK_Mode): Renamed as GNATprove_Mode.
10395 * sem_aggr.adb (Aggregate_Constraint_Checks): Add checks in the
10396 tree in GNATprove_Mode.
10397 * sem_ch12.adb (Analyze_Package_Instantiation): Always instantiate
10398 body in GNATprove mode.
10399 (Need_Subprogram_Instance_Body): Always instantiate body in GNATprove
10400 mode.
10401 * sem_ch3.adb (Constrain_Index, Process_Range_Expr_In_Decl):
10402 Make sure side effects are removed in GNATprove mode.
10403
fd6e497e
EB
104042014-01-20 Eric Botcazou <ebotcazou@adacore.com>
10405
10406 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Robustify tests
10407 for aliased objects with an unconstrained nominal subtype.
10408 * gcc-interface/trans.c (Call_to_gnu): Likewise.
10409 (gnat_to_gnu) <case N_Op_Not>: Robustify test for private type.
10410 <case N_Op_Minus>: Remove useless code.
10411 (Exception_Handler_to_gnu_zcx): Minor tweaks.
10412
44e9e3ec
EB
104132014-01-20 Eric Botcazou <ebotcazou@adacore.com>
10414
10415 * gcc-interface/decl.c (gnat_to_gnu_entity) <case E_Record_Subtype>:
10416 Tidy up. For a subtype with discriminants and variant part, if a
10417 variant is statically selected and the fields all have a constant
10418 position, put them in order of increasing position. Likewise if
10419 no variant part but representation clause is present.
10420 * gcc-interface/utils.c (make_packable_type): Robustify.
10421 (maybe_pad_type): Use local variable and tidy up condition. If no
10422 alignment is specified, use the original one.
10423 (create_type_stub_decl): Minor tweak.
10424 (convert) <case VECTOR_CST>: Fix typo.
10425 <case CONSTRUCTOR>: Deal with padding types around the same type.
10426 Do not punt on missing fields.
10427 (unchecked_convert): Call finish_record_type to lay out the special
10428 record types made for conversions from/to problematic integer types.
10429 Bump the alignment of CONSTRUCTORs before converting them to a more
10430 aligned type.
10431
59f5c969
EB
104322014-01-20 Eric Botcazou <ebotcazou@adacore.com>
10433
10434 * gcc-interface/decl.c (gnat_to_gnu_entity) <case E_Component>: Remove
10435 obsolete code for type_annotate_only mode, simplify code and slightly
10436 improve wording of comments.
10437
2323a580
EB
104382014-01-12 Eric Botcazou <ebotcazou@adacore.com>
10439
10440 PR ada/59772
10441 * gcc-interface/cuintp.c (build_cst_from_int): Use 32-bit integer type
10442 as intermediate type.
10443 (UI_To_gnu): Likewise.
10444
517c399e
EB
104452014-01-03 Eric Botcazou <ebotcazou@adacore.com>
10446
10447 * gnatvsn.ads (Current_Year): Bump to 2014.
10448
98db73df 104492014-01-02 Tobias Burnus <burnus@net-b.de>
00f96dc9 10450
98db73df 10451 * gnat_ugn.texi: Bump @copying's copyright year.
ad41bd84 10452\f
98db73df 10453Copyright (C) 2014 Free Software Foundation, Inc.
ad41bd84
JM
10454
10455Copying and distribution of this file, with or without modification,
10456are permitted in any medium without royalty provided the copyright
10457notice and this notice are preserved.