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