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