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