[multiple changes]
[gcc.git] / gcc / ada / ChangeLog
1 2013-10-10 Hristian Kirtchev <kirtchev@adacore.com>
2
3 * aspects.adb: Add an entry in table Canonical_Aspect for
4 Refined_State.
5 * aspects.ads: Add entries in tables Aspect_Id, Aspect_Argument,
6 Aspect_Names and Aspect_Delay for Refined_State.
7 * einfo.adb: Add with and use clauses for Elists.
8 Remove Refined_State from the list of node usage.
9 Add Refined_State_Pragma to the list of node usage.
10 (Has_Null_Abstract_State): New routine.
11 (Refined_State): Removed.
12 (Refined_State_Pragma): New routine.
13 (Set_Refined_State): Removed.
14 (Set_Refined_State_Pragma): New routine.
15 (Write_Field8_Name): Add output for Refined_State_Pragma.
16 (Write_Field9_Name): Remove the output for Refined_State.
17 * einfo.ads: Add new synthesized attribute Has_Null_Abstract_State
18 along with usage in nodes. Remove attribute Refined_State along
19 with usage in nodes. Add new attribute Refined_State_Pragma along
20 with usage in nodes.
21 (Has_Null_Abstract_State): New routine.
22 (Refined_State): Removed.
23 (Refined_State_Pragma): New routine.
24 (Set_Refined_State): Removed.
25 (Set_Refined_State_Pragma): New routine.
26 * elists.adb (Clone): New routine.
27 * elists.ads (Clone): New routine.
28 * par-prag.adb: Add Refined_State to the pragmas that do not
29 require special processing by the parser.
30 * sem_ch3.adb: Add with and use clause for Sem_Prag.
31 (Analyze_Declarations): Add local variables Body_Id, Context and
32 Spec_Id. Add processing for delayed aspect/pragma Refined_State.
33 * sem_ch13.adb (Analyze_Aspect_Specifications): Update the
34 handling of aspect Abstract_State. Add processing for aspect
35 Refined_State. Remove the bizzare insertion policy for aspect
36 Abstract_State.
37 (Check_Aspect_At_Freeze_Point): Add an entry for Refined_State.
38 * sem_prag.adb: Add an entry to table Sig_Flags
39 for pragma Refined_State.
40 (Add_Item): Update the
41 comment on usage. The inserted items need not be unique.
42 (Analyze_Contract_Cases_In_Decl_Part): Rename variable Restore to
43 Restore_Scope and update all its occurrences.
44 (Analyze_Pragma):
45 Update the handling of pragma Abstract_State. Add processing for
46 pragma Refined_State.
47 (Analyze_Pre_Post_Condition_In_Decl_Part):
48 Rename variable Restore to Restore_Scope and update all its
49 occurrences.
50 (Analyze_Refined_State_In_Decl_Part): New routine.
51 * sem_prag.ads (Analyze_Refined_State_In_Decl_Part): New routine.
52 * snames.ads-tmpl: Add new predefined name for Refined_State. Add
53 new Pragma_Id for Refined_State.
54
55 2013-10-10 Ed Schonberg <schonberg@adacore.com>
56
57 * sem_ch10.adb (Install_Limited_Withed_Unit): handle properly the
58 case of a record declaration in a limited view, when the record
59 contains a self-referential component of an anonymous access type.
60
61 2013-10-10 Thomas Quinot <quinot@adacore.com>
62
63 * exp_ch4.adb (Process_Transient_Object): For any context other
64 than a simple return statement, insert the finalization action
65 after the context, not as an action on the context (which will
66 get evaluated before it).
67
68 2013-10-10 Hristian Kirtchev <kirtchev@adacore.com>
69
70 * einfo.adb (Write_Field19_Name): Correct the
71 string name of attribute Default_Aspect_Value.
72
73 2013-10-10 Ed Schonberg <schonberg@adacore.com>
74
75 * sem_type.adb (Interface_Present_In_Ancestor): The progenitor
76 in a type declaration may be an interface subtype.
77
78 2013-10-10 Robert Dewar <dewar@adacore.com>
79
80 * sinfo.ads (Do_Range_Check): Add special note on handling of
81 range checks for Succ and Pred.
82
83 2013-10-10 Robert Dewar <dewar@adacore.com>
84
85 * erroutc.adb (Output_Msg_Text): Remove VMS special handling.
86
87 2013-10-10 Robert Dewar <dewar@adacore.com>
88
89 * a-chahan.ads, a-chahan.adb (Is_Line_Terminator): New function
90 (Is_Mark): New function.
91 (Is_Other_Format): New function.
92 (Is_Punctuation_Connector): New function.
93 (Is_Space): New function.
94
95 2013-10-10 Robert Dewar <dewar@adacore.com>
96
97 * sem_aggr.adb (Resolve_Array_Aggregate): Redo duplicate/missing
98 choice circuit. Was not quite right in some cases, which showed
99 up in ACATS test B43201C.
100 * sem_attr.adb (Address_Checks): Make sure name is set right
101 for some messages issued.
102 * mlib-prj.adb: Minor code reorganization.
103 * gnat_ugn.texi: Remove special VMS doc for tagging of warning msgs.
104 * exp_ch9.adb: Minor reformatting.
105
106 2013-10-10 Tristan Gingold <gingold@adacore.com>
107
108 * lib-writ.adb (Write_Unit_Information): Adjust previous patch.
109
110 2013-10-10 Robert Dewar <dewar@adacore.com>
111
112 * sem_ch5.adb (Analyze_If_Statement): Warn on redundant if
113 statement.
114 * sem_util.ads, sem_util.adb (Has_No_Obvious_Side_Effects): New
115 function.
116
117 2013-10-10 Ed Schonberg <schonberg@adacore.com>
118
119 * exp_ch9.adb (Expand_N_Timed_Entry_Call): Simplify expansion
120 for the case of a dispatching trigger: there is no need to
121 duplicate the code or create a subprogram to encapsulate the
122 triggering statements. This allows exit statements in the
123 triggering statements, that refer to enclosing loops.
124
125 2013-10-10 Robert Dewar <dewar@adacore.com>
126
127 * freeze.adb: Minor reformatting.
128 * sem_ch13.adb (Freeze_Entity_Checks): New procedure
129 (Analyze_Freeze_Entity): Call Freeze_Entity_Checks
130 (Analyze_Freeze_Generic_Entity): Call Freeze_Entity_Checks.
131 * sinfo.ads: Add syntax for sprint for Freeze_Generic_Entity.
132 * sprint.ads: Add syntax for freeze generic entity node.
133
134 2013-10-10 Robert Dewar <dewar@adacore.com>
135
136 * einfo.adb, einfo.ads: Minor comment updates.
137
138 2013-10-10 Robert Dewar <dewar@adacore.com>
139
140 * lib-writ.adb (Write_Unit_Information): Fatal error if linker
141 options are detected in a predefined generic unit.
142
143 2013-10-10 Thomas Quinot <quinot@adacore.com>
144
145 * s-oscons-tmplt.c (CLOCK_REALTIME): Always define, possibly using
146 a dummy placeholder value.
147 (NEED_PTHREAD_CONDATTR_SETCLOCK): Remove, not needed anymore.
148 * thread.c: Adjust #if test accordingly.
149
150 2013-10-10 Hristian Kirtchev <kirtchev@adacore.com>
151
152 * exp_ch6.adb (Consequence_Error): Generate an
153 implicit if statement.
154 (Expand_Contract_Cases): Generate an implicit if statement.
155 (Process_Contract_Cases): Do not expand Contract_Cases when no code
156 is being generated.
157
158 2013-10-10 Robert Dewar <dewar@adacore.com>
159
160 * sem_attr.adb (Address_Checks): New procedure.
161
162 2013-10-10 Ed Schonberg <schonberg@adacore.com>
163
164 * sinfo.ads, sinfo.adb: New Node Freeze_Generic_Entity, to trigger
165 semantic actions at the proper point for entities that previously
166 had no explicit freeze point.
167 * freeze.adb (Freeze_Generic_Entities): generate new nodes to
168 indicate the point at which semantic checks can be performed on
169 entities declared in generic packages.
170 * sem_ch13.ads, sem_ch13.adb: New procedure
171 Analyze_Freeze_Generic_Entity.
172 * exp_util.adb (Insert_Actions): Treat new node like Freeze_Entity.
173 * sem.adb (Analyze): Call Analyze_Freeze_Generic_Entity.
174 * sprint.adb (Sprint_Node): display Analyze_Freeze_Generic_Entity.
175 * gcc-interface/trans.c: Ignore Analyze_Freeze_Generic_Entity.
176 * gcc-interface/Make-lang.in: Update dependencies.
177
178 2013-10-10 Robert Dewar <dewar@adacore.com>
179
180 * sem_aggr.adb (Resolve_Array_Aggregate): Identify duplicated
181 cases.
182
183 2013-10-10 Robert Dewar <dewar@adacore.com>
184
185 * sem_ch9.adb (Analyze_Task_Body): Aspects are illegal
186 (Analyze_Protected_Body): Aspects are illegal.
187
188 2013-10-10 Robert Dewar <dewar@adacore.com>
189
190 * sem_ch6.adb, sem_ch13.adb: Minor reformatting.
191 * sem_case.adb (Check_Choices): Fix bad listing of missing
192 values from predicated subtype case (Check_Choices): List
193 duplicated values.
194 * errout.adb (Set_Msg_Text): Process warning tags in VMS mode
195 * erroutc.adb (Output_Msg_Text): Handle VMS warning tags
196 * gnat_ugn.texi: Document /WARNINGS=TAG_WARNINGS for VMS
197 * ug_words: Add entries for -gnatw.d and -gnatw.D
198 * vms_data.ads: Add [NO]TAG_WARNINGS for -gnatw.D/-gnatw.d
199 * lib-writ.ads: Documentation fixes
200
201 2013-10-10 Robert Dewar <dewar@adacore.com>
202
203 * a-wichha.adb, a-wichha.ads, a-zchhan.adb, a-zchhan.ads
204 (Is_Other_Format): New name for Is_Other.
205 (Is_Punctuation_Connector): New name for Is_Punctuation
206
207 2013-10-10 Hristian Kirtchev <kirtchev@adacore.com>
208
209 * aspects.adb: Add entries in table Canonical_Aspects for aspects
210 Refined_Depends and Refined_Global.
211 * aspects.ads: Add entries in tables Aspect_Id, Aspect_Argument,
212 Aspect_Names, Aspect_Declay, Aspect_On_Body_Or_Stub_OK for
213 aspects Refined_Depends and Refined_Global.
214 * einfo.adb (Contract): Subprogram bodies are now valid owners
215 of contracts.
216 (Set_Contract): Subprogram bodies are now valid
217 owners of contracts.
218 (Write_Field24_Name): Output the contract
219 attribute for subprogram bodies.
220 * exp_ch6.adb (Expand_Subprogram_Contract): New routine.
221 * exp_ch6.ads (Expand_Subprogram_Contract): New routine.
222 * par-prag.adb: Pragmas Refined_Depends and Refined_Global do
223 not require any special processing by the parser.
224 * sem_ch3.adb (Adjust_D): Renamed to Adjust_Decl.
225 (Analyze_Declarations): Code reformatting. Analyze the contract
226 of a subprogram body at the end of the declarative region.
227 * sem_ch6.adb (Analyze_Generic_Subprogram_Body):
228 Subprogram bodies can now have contracts. Use
229 Expand_Subprogram_Contract to handle the various contract
230 assertions.
231 (Analyze_Subprogram_Body_Contract): New null routine.
232 (Analyze_Subprogram_Body_Helper): Subprogram bodies can now have
233 contracts. Use Expand_Subprogram_Contract to handle the various
234 contract assertions.
235 (Analyze_Subprogram_Contract): Add local
236 variable Nam. Update the call to Analyze_PPC_In_Decl_Part. Capture
237 the pragma name in Nam.
238 (Process_PPCs): Removed.
239 * sem_ch6.ads (Analyze_Subprogram_Body_Contract): New routine.
240 (Analyze_Subprogram_Contract): Update the comment on usage.
241 * sem_ch13.adb (Analyze_Aspect_Specifications): Add null
242 implementations for aspects Refined_Depends and Refined_Global.
243 (Check_Aspect_At_Freeze_Point): Aspects Refined_Depends and
244 Refined_Global do not need to be checked at the freeze point.
245 * sem_prag.adb: Add entries in table Sig_Flags
246 for pragmas Refined_Depends and Refined_Global.
247 (Analyze_Contract_Cases_In_Decl_Part): Add local
248 variable Restore. Use Restore to pop the scope.
249 (Analyze_Depends_In_Decl_Part): Add local variable Restore. Use
250 Restore to pop the scope.
251 (Analyze_Global_In_Decl_List): Add local variable Restore. Use Restore
252 to pop the scope.
253 (Analyze_PPC_In_Decl_Part): Renamed to
254 Analyze_Pre_Post_Condition_In_Decl_Part.
255 (Analyze_Pragma):
256 Add null implementations for pragmas Refined_Depends and
257 Refined_Global. Refined_Pre and Refined_Post are now
258 handled by routine Analyze_Refined_Pre_Post_Condition
259 exclusively.
260 (Analyze_Refined_Depends_In_Decl_Part): New
261 null routine.
262 (Analyze_Refined_Global_In_Decl_Part):
263 New null routine.
264 (Analyze_Refined_Pre_Post):
265 Renamed to Analyze_Refined_Pre_Post_Condition.
266 (Analyze_Refined_Pre_Post_Condition): Analyze the boolean
267 expression.
268 (Check_Precondition_Postcondition): Update the call
269 to Analyze_PPC_In_Decl_Part.
270 * sem_prag.ads: Add entries in table
271 Pragma_On_Body_Or_Stub_OK for pragmas Refined_Depends
272 and Refined_Global.
273 (Analyze_PPC_In_Decl_Part): Renamed
274 to Analyze_Pre_Post_Condition_In_Decl_Part. Update the
275 comment on usage.
276 (Analyze_Refined_Depends_In_Decl_Part): New routine.
277 (Analyze_Refined_Global_In_Decl_Part): New routine.
278 (Analyze_Test_Case_In_Decl_Part): Update the comment on usage.
279 * sem_util.adb (Add_Contract_Item): Rename formal Item to Prag
280 and update all occurrences. Subprogram body contracts can now
281 contain pragmas Refined_Depends and Refined_Global.
282 * sem_util.ads (Add_Contract_Item): Rename formal Item to
283 Prag. Update the comment on usage.
284 * sinfo.ads: Update the comment on structure and usage of
285 N_Contract.
286 * snames.ads-tmpl: Add new predefined names for Refined_Depends
287 and Refined_Global. Add entries in table Pragma_Id for
288 Refined_Depends and Refined_Global.
289
290 2013-10-10 Robert Dewar <dewar@adacore.com>
291
292 * types.ads: Minor reformatting.
293
294 2013-10-10 Thomas Quinot <quinot@adacore.com>
295
296 * s-taprop-posix.adb: Add missing comment.
297
298 2013-10-10 Robert Dewar <dewar@adacore.com>
299
300 * freeze.adb (Freeze_Record_Type): Move choice checking to
301 Analyze_Freeze_Entity (Freeze_Record_Type): Make sure all choices
302 are properly frozen
303 * sem_case.adb (Check_Choices): Remove misguided attempt to
304 freeze choices (this is now done in Freeze_Record_Type where
305 it belongs).
306 (Check_Choices): Remove some analyze/resolve calls
307 that are redundant since they are done in Analyze_Choices.
308 * sem_ch13.adb (Analyze_Freeze_Entity): Do the error
309 checking for choices in variant records here (moved here from
310 Freeze.Freeze_Record_Type)
311
312 2013-10-10 Thomas Quinot <quinot@adacore.com>
313
314 * s-oscons-tmplt.c, s-taprop-posix.adb (CLOCK_REALTIME): Always define,
315 possibly using a dummy placeholder value.
316 (Compute_Deadline): For the case of an
317 Absolute_Calendar deadline, if the target uses another clock
318 than CLOCK_REALTIME as CLOCK_RT_Ada, compensate for possible
319 different epoch.
320
321 2013-10-10 Ed Schonberg <schonberg@adacore.com>
322
323 * sem_ch8.adb (Find_Expanded_Name): Handle properly a fully
324 qualified reference to a generic child unit within itself,
325 in an instantiation.
326
327 2013-10-10 Pascal Obry <obry@adacore.com>
328
329 * prj-conf.adb: Minor typo fixes in comment.
330
331 2013-10-10 Thomas Quinot <quinot@adacore.com>
332
333 * s-taprop-posix.adb (Compute_Deadline): New local subprogram,
334 factors common code between Timed_Sleep and Timed_Delay.
335
336 2013-10-10 Robert Dewar <dewar@adacore.com>
337
338 * freeze.adb (Freeze_Record_Type): Don't replace others if
339 expander inactive. This avoids clobbering the ASIS tree in
340 -gnatct mode.
341
342 2013-10-10 Robert Dewar <dewar@adacore.com>
343
344 * sem_res.adb (Resolve_Op_Expon): Avoid crash testing for
345 fixed-point case in preanalysis mode (error will be caught during
346 full analysis).
347
348 2013-10-10 Robert Dewar <dewar@adacore.com>
349
350 * gnat_rm.texi: Refined_Pre and Refined_Post are now allowed as
351 assertion identifiers for pragma Assertion_Policy.
352 * sem_prag.adb (Is_Valid_Assertion_Kind): Add Refined_Pre/Refined_Post
353 * sem_ch13.adb: Minor reformatting.
354
355 2013-10-10 Pascal Obry <obry@adacore.com>
356
357 * prj-conf.adb: Code refactoring.
358
359 2013-10-10 Hristian Kirtchev <kirtchev@adacore.com>
360
361 * einfo.adb: Remove Integrity_Level from the node usage list.
362 (Has_Option): Update the implementation to match
363 the new terminology.
364 (Has_Property): Renamed to Has_Option.
365 (Integrity_Level): Removed.
366 (Is_External_State): New routine.
367 (Is_Input_Only_State): Use Has_Option to determine whether a state
368 is Input_Only. (Is_Input_State): Renamed to Is_Input_Only_State.
369 (Is_Output_Only_State): Use Has_Option to determine whether
370 a state is Output_Only.
371 (Is_Output_State): Renamed to
372 Is_Output_Only_State.
373 (Is_Volatile_State): Use Has_Option to determine whether a state is
374 volatile.
375 (Set_Integrity_Level): Removed.
376 (Write_Field8): Remove the entry for Integrity_Level.
377 * einfo.ads: Remove Integrity_Level along with its documentation
378 and usage in nodes. Rename Is_Input_State to Is_Input_Only_State.
379 Rename Is_Output_State to Is_Output_Only_State. Update the
380 documentation of Is_Volatile_State. Update the node structure of
381 E_Abstract_Entity.
382 (Integrity_Level): Removed along with pragma Inline.
383 (Is_External_State): New routine.
384 (Is_Input_State): Renamed to Is_Input_Only_State.
385 (Is_Output_State): Renamed to Is_Output_Only_State.
386 (Set_Integrity_Level): Removed along with pragma Inline.
387 * sem_prag.adb (Analyze_Pragma): Update the checks regarding
388 global items and abstract state modes. Update the implementation
389 of pragma Abstract_State to reflect the new rules and terminology.
390 * snames.ads-tmpl: Remove the predefined name for Integrity
391 level. Add new predefined names for Input_Only, Non_Volatile,
392 Output_Only and Part_Of.
393
394 2013-10-10 Ed Schonberg <schonberg@adacore.com>
395
396 * lib-xref.adb (Generate_Reference): Do not generate a reference
397 within a _postcondition procedure: a proper source reference has
398 already been generated when pre- analyzing the original aspect
399 specification, and the use of a formal in a pre/postcondition
400 should not count as a proper use in a subprogram body.
401
402 2013-10-10 Robert Dewar <dewar@adacore.com>
403
404 * sem_eval.adb (Why_Non_Static): Fix bomb for deferred constant
405 case
406
407 2013-10-10 Hristian Kirtchev <kirtchev@adacore.com>
408
409 * aspects.adb: Add an entry for Aspect_Refined_Post in table
410 Canonical_Aspect.
411 * aspects.ads: Add an entry for Aspect_Refined_Post in tables
412 Aspect_Id, Aspect_Argument, Aspect_Names, Aspect_Delay,
413 Aspect_On_Body_Or_Stub_OK. Update the comment on the use of
414 table Aspect_On_Body_Or_Stub_OK.
415 * par-prag.adb: Add pragma Refined_Post to the list of pragmas
416 that do not require special processing by the parser.
417 * sem_attr.adb (Analyze_Attribute): Add special analysis for
418 attributes 'Old and 'Result when code generation is disabled and
419 they appear in aspect/pragma Refined_Post.
420 (In_Refined_Post): New routine.
421 * sem_ch6.adb (Analyze_Expression_Function): Move various
422 aspects and/or pragmas that apply to an expression function to the
423 corresponding spec or body.
424 (Collect_Body_Postconditions): New routine.
425 (Process_PPCs): Use routine Collect_Body_Postconditions
426 to gather all postcondition pragmas.
427 * sem_ch10.adb (Analyze_Proper_Body): Use routine
428 Relocate_Pragmas_To_Body to move all source pragmas that follow
429 a body stub to the proper body.
430 (Move_Stub_Pragmas_To_Body): Removed.
431 * sem_ch13.adb (Analyze_Aspect_Specifications): Add processing
432 for aspect Refined_Post.
433 (Check_Aspect_At_Freeze_Point): Aspect
434 Refined_Post does not need delayed processing at the freeze point.
435 * sem_prag.adb: Add an entry for pragma Refined_Post in
436 table Sig_Flags.
437 (Analyze_Pragma): Add processing for pragma
438 Refined_Post. Update the processing of pragma Refined_Pre
439 to use common routine Analyze_Refined_Pre_Post.
440 (Analyze_Refined_Pre_Post): New routine.
441 (Relocate_Pragmas_To_Body): New routine.
442 * sem_prag.ads: Table Pragma_On_Stub_OK is now known as
443 Pragma_On_Body_Or_Stub_OK. Update the comment on usage of
444 table Pragma_On_Body_Or_Stub_OK.
445 (Relocate_Pragmas_To_Body): New routine.
446 * snames.ads-tmpl: Add new predefined name for Refined_Post. Add
447 new Pragma_Id for Refined_Post.
448
449 2013-10-10 Robert Dewar <dewar@adacore.com>
450
451 * exp_ch3.adb (Expand_N_Variant_Part): Now null, expansion of
452 last choice to others is moved to Freeze_Record_Type.
453 * freeze.adb (Freeze_Record_Type): Expand last variant to others
454 if necessary (moved here from Expand_N_Variant_Part
455
456 2013-10-10 Robert Dewar <dewar@adacore.com>
457
458 * lib-xref-spark_specific.adb, par-ch13.adb, sem_prag.adb, sem_prag.ads,
459 sem_ch12.adb, sem_attr.adb, sem_ch6.adb, sem_ch13.adb, a-sequio.adb,
460 s-atocou-builtin.adb: Minor reformatting.
461
462 2013-10-10 Thomas Quinot <quinot@adacore.com>
463
464 * s-oscons-tmplt.c (NEED_PTHREAD_CONDATTR_SETCLOCK): This
465 constant needs to be output to s-oscons.h, as it is tested
466 by init.c.
467
468 2013-10-10 Robert Dewar <dewar@adacore.com>
469
470 * exp_ch3.adb (Expand_N_Variant_Part): Don't expand choices, too early
471 * exp_ch5.adb (Expand_N_Case_Statement): Use new Has_SP_Choice
472 flag to avoid expanding choices when not necessary.
473 * exp_util.adb: Minor reformatting
474 * freeze.adb (Freeze_Record_Type): Redo expansion of variants
475 * sem_aggr.adb: Minor reformatting
476 * sem_case.ads, sem_case.adb: Major rewrite, separating Analysis and
477 Checking of choices.
478 * sem_ch3.adb (Analyze_Variant_Part): Rewrite to call new
479 Analyze_Choices.
480 * sem_ch4.adb (Analyze_Case_Expression): Call Analyze_Choices
481 and Check_Choices
482 * sem_ch5.adb (Analyze_Case_Statement): Call Analyze_Choices
483 and Check_Choices
484 * sem_util.adb: Minor reformatting
485 * sinfo.ads, sinfo.adb (Has_SP_Choice): New flag.
486
487 2013-10-10 Vincent Celier <celier@adacore.com>
488
489 * mlib-prj.adb (Build_Library): Do not issue link dynamic
490 libraries with an Rpath, if switch -R was used.
491
492 2013-10-10 Tristan Gingold <gingold@adacore.com>
493
494 * s-stalib.ads (Image_Index_Table_8, Image_Index_Table_16,
495 Image_Index_Table_32): Remove as not used.
496 * s-imgint.adb (Image_Integer): Call Set_Image_Integer and
497 remove duplicated code.
498
499 2013-10-10 Hristian Kirtchev <kirtchev@adacore.com>
500
501 * sem_prag.adb (Analyze_Pragma): Provide a
502 more precise error message when pragma Refined_Pre applies to
503 an expression function that is not a completion.
504
505 2013-10-10 Thomas Quinot <quinot@adacore.com>
506
507 * sem_attr.adb (Analyse_Attribute, case
508 Attribute_Scalar_Storage_Order): a 'Scalar_Storage_Order attribute
509 reference for a generic type is permitted in GNAT runtime mode.
510 * a-sequio.adb (Read, Write): Use the endianness of the actual
511 type to encode length information written to the file.
512
513 2013-10-10 Ed Schonberg <schonberg@adacore.com>
514
515 * par-ch13.adb (Aspect_Specifications_Present)): In earlier than
516 Ada2012 mode, assume that a legal aspect name following "with"
517 keyword is an older gnat switch and not a misplaced with_clause.
518
519 2013-10-10 Hristian Kirtchev <kirtchev@adacore.com>
520
521 * aspects.adb: Add an entry for Aspect_Refined_Pre in
522 table Canonical_Aspect.
523 (Aspects_On_Body_OK): Renamed to
524 Aspects_On_Body_Or_Stub_OK.
525 (Aspects_On_Body_Or_Stub_OK):
526 Update the query in table Aspect_On_Body_OK.
527 * aspects.ads: Add an entry for Aspect_Refined_Pre in tables
528 Aspect_Id, Aspect_Argument, Aspect_Names, Aspect_Delay,
529 Aspect_On_Body_Or_Stub_OK. Table Aspect_On_Body_OK is now known as
530 Aspect_On_Body_Or_Stub_OK. Add a section of aspect specifications
531 that apply to body stubs.
532 (Aspects_On_Body_OK): Renamed to Aspects_On_Body_Or_Stub_OK.
533 (Aspects_On_Body_Or_Stub_OK): Update the comment on usage.
534 * par-prag.adb: Add pragma Refined_Pre to the list of pragmas
535 that do not require special processing by the parser.
536 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Delay the
537 analysis of aspect specifications that apply to a body stub
538 until the proper body is analyzed.
539 * sem_ch10.adb: Add with and use clause for Sem_Ch13.
540 (Analyze_Package_Body_Stub): Set the corresponding spec of the stub.
541 (Analyze_Proper_Body): Relocate all pragmas that apply
542 to a subprogram body stub to the declarations of the proper
543 body. Analyze the aspect specifications of the stub when the
544 proper body is not present.
545 (Analyze_Protected_Body_Stub): Set the corresponding spec of the stub.
546 (Analyze_Task_Body_Stub): Set the corresponding spec of the stub.
547 (Move_Stub_Pragmas_To_Body): New routine.
548 * sem_ch13.adb (Analyze_Aspect_Specifications): Add processing
549 for aspect Refined_Pre.
550 (Check_Aspect_At_Freeze_Point): Aspect
551 Refined_Pre does not need delayed processing at the freeze point.
552 * sem_prag.adb: Remove with and use clause for Snames. Add
553 an entry for Pragma_Refined_Pre in table Sig_Flags.
554 (Analyze_Pragma): Add processing for pragma Refined_Pre.
555 * sem_prag.ads: Add with and use clause for Snames. Add table
556 Pragma_On_Stub_OK.
557 * sinfo.adb (Corresponding_Spec_Of_Stub): New routine.
558 (Set_Corresponding_Spec_Of_Stub): New routine.
559 * sinfo.ads: Add new attribute Corresponding_Spec_Of_Stub
560 along with comment on usage and occurrences in nodes.
561 (Corresponding_Spec_Of_Stub): New routine along with pragma
562 Inline.
563 (Set_Corresponding_Spec_Of_Stub): New routine along
564 with pragma Inline.
565 * snames.ads-tmpl: Add new predefined name for Refined_Pre. Add
566 new Pragma_Id for Refined_Pre.
567
568 2013-10-10 Ed Schonberg <schonberg@adacore.com>
569
570 * sem_ch12.adb (Analyze_Package_Instantiation,
571 Analyze_Subprogram_Instantiation): Improve error message when
572 name in instantiation does not designate a generic unit of the
573 right kind.
574
575 2013-10-10 Robert Dewar <dewar@adacore.com>
576
577 * exp_ch3.adb (Expand_N_Variant_Part): Expand statically
578 predicated subtype which appears in Discrete_Choices list.
579 * exp_ch5.adb (Expand_N_Case_Statement): Expand statically
580 predicated subtype which appears in Discrete_Choices list of
581 case statement alternative.
582 * exp_util.ads, exp_util.adb (Expand_Static_Predicates_In_Choices): New
583 procedure.
584 * sem_case.adb: Minor reformatting (Analyze_Choices): Don't
585 expand out Discrete_Choices that are names of subtypes with
586 static predicates. This is now done in the analyzer so that the
587 -gnatct tree is properly formed for ASIS.
588 * sem_case.ads (Generic_Choices_Processing): Does not apply
589 to aggregates any more, so change doc accordingly, and remove
590 unneeded Get_Choices argument.
591 * sem_ch3.adb (Analyze_Variant_Part): Remove no
592 longer used Get_Choices argument in instantiation of
593 Generic_Choices_Processing.
594 * sem_ch4.adb (Analyze_Case_Expression): Remove no
595 longer used Get_Choices argument in instantiation of
596 Generic_Choices_Processing.
597 * sem_ch5.adb (Analyze_Case_Statement): Remove no
598 longer used Get_Choices argument in instantiation of
599 Generic_Choices_Processing.
600 * sinfo.ads: For N_Variant_Part, and N_Case_Statement_Alternative,
601 document that choices that are names of statically predicated
602 subtypes are expanded in the code generation tree passed to the
603 back end, but not in the ASIS tree generated for -gnatct.
604
605 2013-10-10 Ed Schonberg <schonberg@adacore.com>
606
607 * sem_ch7.adb: Revert previous change.
608
609 2013-10-10 Gary Dismukes <dismukes@adacore.com>
610
611 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): In the case where
612 the Storage_Pool aspect is specified by an aspect clause and a
613 renaming is used to capture the evaluation of the pool name,
614 insert the renaming in front of the aspect's associated entity
615 declaration rather than in front of the corresponding attribute
616 definition (which hasn't been appended to the declaration
617 list yet).
618
619 2013-10-10 Ed Schonberg <schonberg@adacore.com>
620
621 * sem_ch6.adb (Is_Interface_Conformant): The controlling type
622 of the interface operation is obtained from the ultimate alias
623 of the interface primitive parameter, because that may be in
624 fact an implicit inherited operation whose signature involves
625 the type extension and not the desired interface.
626
627 2013-10-10 Ed Schonberg <schonberg@adacore.com>
628
629 * par-ch13.adb (Aspect_Specifications_Present): In Ada 2012,
630 recognize an aspect specification with a misspelled name if it
631 is followed by a a comma or semicolon.
632
633 2013-10-10 Vadim Godunko <godunko@adacore.com>
634
635 * s-atocou.adb, s-atocou.ads, s-atocou-x86.adb, s-atocou-builtin.adb:
636 Fix copyright notice.
637
638 2013-10-10 Yannick Moy <moy@adacore.com>
639
640 * lib-xref-spark_specific.adb (Enclosing_Subprogram_Or_Package): Get
641 enclosing subprogram for precondition/postcondition/contract cases.
642
643 2013-10-10 Robert Dewar <dewar@adacore.com>
644
645 * gnat_rm.texi: Minor fix.
646
647 2013-10-10 Robert Dewar <dewar@adacore.com>
648
649 * sem_ch13.adb (Analyze_Attribute_Definition_Clause, case
650 Address): Remove the Comes_From_Source test for the overlap
651 warning.
652
653 2013-10-10 Robert Dewar <dewar@adacore.com>
654
655 * sem_util.adb: Minor code reorganization (use Nkind_In).
656 * sem_warn.adb: Minor code reorganization (optimization in
657 Check_Unset_Reference).
658 * exp_ch9.adb, exp_ch4.adb, sinfo.ads: Minor reformatting.
659
660 2013-10-10 Ed Schonberg <schonberg@adacore.com>
661
662 * sem_ch7.adb (Install_Parent_Private_Declarations): When
663 instantiating a child unit, do not install private declaration of
664 a non-generic ancestor of the generic that is also an ancestor
665 of the current unit: its private part will be installed when
666 private part of ancestor itself is analyzed.
667
668 2013-10-10 Thomas Quinot <quinot@adacore.com>
669
670 * freeze.adb (Check_Component_Storage_Order): Retrieve component
671 aliased status from type entities directly instead of going back
672 to original component definition.
673 * sem_ch7.adb: Minor reformatting.
674
675 2013-10-10 Robert Dewar <dewar@adacore.com>
676
677 * sem_ch13.adb (Analyze_Aspect_Specifications): For Address
678 attribute, consider it to be set in source, because of aliasing
679 considerations.
680 (Analyze_Attribute_Definition_Clause): For the
681 purpose of warning on overlays, take into account the aspect case.
682
683 2013-10-10 Robert Dewar <dewar@adacore.com>
684
685 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads, a-cforse.ads,
686 a-cofove.ads: Minor reformatting.
687
688 2013-10-10 Arnaud Charlet <charlet@adacore.com>
689
690 * gnat_ugn.texi: Remove obsolete mention to -laddr2line.
691
692 2013-10-10 Ed Schonberg <schonberg@adacore.com>
693
694 * exp_ch4.adb (Expand_N_Case_Expression): Indicate that the
695 generated variable used as a target of the expression needs
696 no initialization.
697
698 2013-10-10 Jose Ruiz <ruiz@adacore.com>
699
700 * exp_util.adb (Corresponding_Runtime_Package): Remove the condition
701 related to No_Dynamic_Attachment which was wrong. Protected types
702 with interrupt handlers (when not using a restricted profile)
703 are always treated as protected types with entries, regardless
704 of the No_Dynamic_Attachment restriction.
705 * exp_ch9.adb (Expand_N_Protected_Type_Declaration): Simplify the code
706 using the result of Corresponding_Runtime_Package.
707 (Install_Private_Data_Declarations): When having
708 static handlers and a non restricted profile, we use the
709 type Static_Interrupt_Protection always, so we removed an
710 extra wrong condition looking at the No_Dynamic_Attachment
711 restriction. Simplify the code using the result of
712 Corresponding_Runtime_Package.
713 (Make_Initialize_Protection): Simplify the code using
714 the result of Corresponding_Runtime_Package.
715 (Install_Private_Data_Declaration): The No_Dynamic_Attachment
716 restriction has nothing to do with static handlers. Remove the extra
717 erroneous condition that was creating the wrong data type.
718
719 2013-10-10 Hristian Kirtchev <kirtchev@adacore.com>
720
721 * sem_util.adb (Is_Object_Reference): Attribute
722 'Old produces an object reference.
723 * gnat_rm.texi: Define accessibility level of
724 X'Update(...) result.
725
726 2013-10-10 Yannick Moy <moy@adacore.com>
727
728 * gnat_rm.texi, a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
729 a-cforse.ads, a-cofove.ads: Update comment and doc of formal containers
730
731 2013-10-10 Ed Schonberg <schonberg@adacore.com>
732
733 * sem_ch13.adb (Analyze_Aspect_Specifications): For Pre/Post
734 conditions that apply to a subprogram body, preserve the placement
735 and order of the generated pragmas, which must appear before
736 other declarations in the body.
737
738 2013-10-10 Bob Duff <duff@adacore.com>
739
740 * gnat_ugn.texi: Add gnat2xml doc.
741
742 2013-10-10 Doug Rupp <rupp@adacore.com>
743
744 * s-vxwork-arm.ads: Fix interface to FP_CONTEXT.
745
746 2013-10-10 Ed Schonberg <schonberg@adacore.com>
747
748 * sem_ch13.adb (Analyze_Aspect_Specification): An aspect Import
749 on a variable need not have a convention specified, as long as
750 the implicit convention of the object, obtained from its type,
751 is Ada or Ada-related.
752
753 2013-10-10 Robert Dewar <dewar@adacore.com>
754
755 * cstand.adb (Standard_Unsigned_64): New internal type.
756 * gnat_rm.texi: Update documentation on To_Address.
757 * sem_attr.adb (Analyze_Attribute, case To_Address): Fix
758 problem with out of range static values given as literals or
759 named numbers.
760 * stand.ads (Standard_Unsigned_64): New internal type.
761 * stand.adb: Minor reformatting.
762
763 2013-10-10 Ed Schonberg <schonberg@adacore.com>
764
765 * sem_ch4.adb (Analyze_Selected_Component,
766 Has_Mode_Conformant_Spec): If selected component may be an
767 indexing of a parameterless call to a protected function, and
768 expansion is disabled, this is a valid candidate interpretation.
769
770 2013-10-10 Arnaud Charlet <charlet@adacore.com>
771
772 * gnat_ugn.texi: Minor editing.
773
774 2013-10-10 Robert Dewar <dewar@adacore.com>
775
776 * gnatlink.adb: Minor reformatting.
777
778 2013-10-10 Yannick Moy <moy@adacore.com>
779
780 * debug.adb: Free flag d.E and change doc for flag d.K.
781
782 2013-10-10 Ed Schonberg <schonberg@adacore.com>
783
784 * sem_prag.adb (Check_Precondition_Postcondition): If the
785 pragma comes from an aspect spec, and the subprogram is a
786 library unit, treat as a ppc in a declarative part in ASIS mode,
787 so that expression in aspect is properly analyzed. In this case
788 there is no later point at which the aspect specification would
789 be examined.
790
791 2013-10-10 Bob Duff <duff@adacore.com>
792
793 * opt.ads: Minor comment fix.
794
795 2013-10-10 Vadim Godunko <godunko@adacore.com>
796
797 * a-coinho-shared.ads, a-coinho-shared.adb: New file.
798 * s-atocou.ads: Add procedure to initialize counter.
799 * s-atocou.adb: Likewise.
800 * s-atocou-builtin.adb: Likewise.
801 * s-atocou-x86.adb: Likewise.
802 * gcc-interface/Makefile.in: Select special version of
803 Indefinite_Holders package on platforms where atomic built-ins
804 are supported. Update tools target pairs for PikeOS.
805
806 2013-10-10 Robert Dewar <dewar@adacore.com>
807
808 * sem_ch3.adb: Minor reformatting.
809
810 2013-10-10 Robert Dewar <dewar@adacore.com>
811
812 * sinput-c.adb (Load_File): Ensure Source_Align alignment.
813 * sinput-d.adb (Create_Debug_Source): Ensure Source_Align alignment.
814 * sinput-l.adb (Create_Instantiation_Source): Ensure Source_Align
815 alignment.
816 (Load_File): Ditto.
817 * sinput.ads, sinput.adb (Get_Source_File_Index): New optimized (single
818 line) version.
819 * types.ads (Source_Align): New definition.
820 (Source_Buffer): Document new alignment requirement.
821
822 2013-10-10 Robert Dewar <dewar@adacore.com>
823
824 * sem_prag.adb (Analyze_Pragma, case Linker_Section): Allow
825 this for types.
826
827 2013-10-10 Robert Dewar <dewar@adacore.com>
828
829 * gnat_rm.texi: Minor adjustment to doc for To_Address attribute.
830
831 2013-10-10 Vadim Godunko <godunko@adacore.com>
832
833 * s-stopoo.ads (Root_Storage_Pool): Add pragma
834 Preelaborable_Initialization.
835
836 2013-09-25 Tom Tromey <tromey@redhat.com>
837
838 * gcc-interface/Makefile.in (OUTPUT_OPTION): Define as "-o $@".
839
840 2013-09-18 Eric Botcazou <ebotcazou@adacore.com>
841
842 PR ada/58264
843 * gcc-interface/trans.c (Attribute_to_gnu): Define GNAT_PREFIX local
844 variable and use it throughout.
845 <Attr_Length>: Note whether the prefix is the dereference of a pointer
846 to unconstrained array and, in this case, capture the result for both
847 Attr_First and Attr_Last.
848
849 2013-09-18 Eric Botcazou <ebotcazou@adacore.com>
850
851 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Abstract_State>: New.
852
853 2013-09-18 Eric Botcazou <ebotcazou@adacore.com>
854
855 * gcc-interface/trans.c (gigi): Remove dead code.
856
857 2013-09-18 Eric Botcazou <ebotcazou@adacore.com>
858
859 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Pop the stack of
860 return variables for subprograms using the CICO mechanism.
861
862 2013-09-13 Dominique Dhumieres <dominiq@lps.ens.fr>
863
864 * gcc-interface/Makefile.in: Fix darwin Filter to match on $target_os,
865 not $target_cpu.
866
867 2013-09-11 Thomas Schwinge <thomas@codesourcery.com>
868 Olivier Hainque <hainque@adacore.com>
869
870 * gcc-interface/Makefile.in: Import target_cpu, target_vendor,
871 target_os and their host_ counterparts. Remove host_canonical and
872 target_cpu_default, unused. Remove local ad-hoc computations of
873 "host", "targ", "arch", "osys" and "manu". Replace uses of these by
874 uses of the now imported family, hence back to filters against
875 canonical values. Remove filters on e500 for target_cpu, expected to
876 be canonicalized into powerpc. Invert the logic filtering on 64bit
877 sparc for VxWorks. Simplify the filtering logic for bareboard tools
878 target pairs, now using straight elf/eabi filters on the target_os
879 part only.
880
881 2013-09-10 Ed Schonberg <schonberg@adacore.com>
882
883 * sem_ch3.adb (Replace_Anonymoous_Access_To_Protected_Subprogram): If
884 the return type is itself an access to function, recurse to emit
885 another anonymous type.
886 * gcc-interface/Make-lang.in: Update dependencies.
887
888 2013-09-10 Robert Dewar <dewar@adacore.com>
889
890 * err_vars.ads (Warning_Doc_Switch): Ignored in VMS mode.
891 * errout.adb (Warning_Doc_Switch): Ignored in VMS mode.
892 * errout.ads (Warning_Doc_Switch): Ignored in VMS mode.
893 * inline.ads (Warnings): New component in Pending_Body_Info.
894 * sem_ch12.adb (Pending_Body_Info): Save and restore warnings
895 at instantiation point.
896 * warnsw.adb (Save_Warnings): New function (Restore_Warnings):
897 New procedure Remove special handling of Warning_Doc_Switch,
898 cleaner to handle the VMS case in errout, than to introduce
899 undocumented oddities here.
900 * warnsw.ads (Warning_Record) : New type.
901 (Save_Warnings): New function.
902 (Restore_Warnings): New procedure.
903
904 2013-09-10 Robert Dewar <dewar@adacore.com>
905
906 * sinput.adb (Check_For_BOM): Avoid reading past end of file.
907
908 2013-09-10 Robert Dewar <dewar@adacore.com>
909
910 * errout.adb (Error_Msg_Ada_2012_Feature): New procedure.
911 * errout.ads (Error_Msg_Ada_2012_Feature): New procedure.
912 * inline.ads: Save/Restore Ada_Version_Pragma.
913 * opt.adb: Save/Restore Ada_Version_Pragma.
914 * opt.ads (Ada_Version_Pragma): New variable.
915 * par-ch11.adb, par-ch12.adb, par-ch13.adb, par-ch4.adb, par-ch5.adb,
916 par-ch6.adb, par-ch8.adb, par-prag.adb: Use Error_Msg_Ada_2012_Feature.
917 * prj.adb: Initialize Ada_Version_Pragma.
918 * sem_attr.adb: Use Error_Msg_Ada_2012_Feature.
919 * sem_ch12.adb, sem_ch8.adb: Save/restore Ada_Version_Pragma.
920 * sem_prag.adb (Analyze_Pragma, cases Ada_xx): Set Ada_Version_Pragma.
921 * switch-c.adb: Initialize Ada_Version_Pragma.
922 * sem_ch12.adb: Minor reformatting.
923
924 2013-09-10 Ed Schonberg <schonberg@adacore.com>
925
926 * sem_ch3.adb (Process_Subtype): Discard constraint on access
927 to class-wide type. Such constraints are not supported and are
928 considered a language pathology.
929
930 2013-09-10 Robert Dewar <dewar@adacore.com>
931
932 * gnatbind.adb: Correct starting date in --version string.
933 * gnatdll.adb: Use Check_Version_And_Help_G to implement --help
934 and --version.
935 * gnatkr.adb: Use Check_Version_And_Help_G to implement --help
936 and --version.
937 * gnatlink.adb: Correct starting date in --version string.
938 * gnatls.adb: Correct starting date in --version string.
939 * make.adb: Correct starting date in --version string.
940
941 2013-09-10 Robert Dewar <dewar@adacore.com>
942
943 * switch-c.adb: Minor reformatting.
944 * atree.ads (Original_Nodes): Add documentation on ASIS usage.
945 * sinfo.ads: Add section on ASIS mode (documentation only).
946
947 2013-09-10 Robert Dewar <dewar@adacore.com>
948
949 * sem_prag.adb (Analyze_Pragma, case Warnings): Don't allow
950 REASON parameter in compiler units (bootstrap issues).
951
952 2013-09-10 Robert Dewar <dewar@adacore.com>
953
954 * gnat1drv.adb (Adjust_Global_Switches): Output warning if
955 -gnateE specified for a target that does not support it.
956
957 2013-09-10 Ed Schonberg <schonberg@adacore.com>
958
959 * sem_prag.adb (Analyze_Pragma, case SPARK_Mode): Handle properly
960 a subprogram body without previous spec.
961
962 2013-09-10 Gary Dismukes <dismukes@adacore.com>
963
964 * sem_ch4.adb: Minor typo fixes.
965
966 2013-09-10 Hristian Kirtchev <kirtchev@adacore.com>
967
968 * aspects.adb (Aspects_On_Body_OK): New routine.
969 * aspects.ads: Modify type Aspect_Expression to include
970 the Optional_XXX variants. Update the contents of
971 table Aspect_Argument. Add table Aspect_On_Body_OK.
972 (Aspects_On_Body_OK): New routine.
973 * par-ch13.adb (Get_Aspect_Specifications): Account for optional
974 names and expressions when parsing an aspect.
975 * sem_ch6.adb: Add with and use clause for Aspects.
976 (Analyze_Subprogram_Body_Helper): Do not emit an error when
977 analyzing a body with aspects that can be applied simultaneously
978 to both spec and body.
979 * sem_ch13.adb (Analyze_Aspect_Specifications): Insert the
980 corresponding pragma of an aspect that applies to a subprogram
981 body in the declarative part.
982 (Make_Aitem_Pragma): Do not generate a pragma with an empty argument
983 list.
984
985 2013-09-10 Robert Dewar <dewar@adacore.com>
986
987 * switch-c.adb: Diagnose -gnatc given after -gnatRm.
988 * gnat_ugn.texi: Add documentation for -gnatRm.
989 * usage.adb: Minor reorganization (put style entries in proper
990 order) Document -gnatRm switch.
991 * sinfo.ads: Minor comment fix.
992
993 2013-09-10 Sergey Rybin <rybin@adacore.com frybin>
994
995 * tree_io.ads: Update ASIS_Version_Number.
996
997 2013-09-10 Ed Schonberg <schonberg@adacore.com>
998
999 * sem_ch3.adb (Access_Subprogram_Declaration): Check whether the
1000 designated type can appear in a parameterless call.
1001 * sem_ch4.adb (Analyze_Call): Do not insert an explicit dereference
1002 in the case of an indirect call through an access function that
1003 returns an array type.
1004 (Analyze_One_Call): Handle properly legal parameterless calls
1005 whose result is indexed, in constructs of the for F.all (I)
1006 * sem_ch6.ads (May_Need_Actuals): Make public, for use on access
1007 to subprogram types.
1008 * sem_res.adb (Resolve_Call): If the call is indirect, there is
1009 no entity to set on the name in the call.
1010
1011 2013-09-10 Hristian Kirtchev <kirtchev@adacore.com>
1012
1013 * aspects.adb: Add entries in the Has_Aspect_Specifications_Flag
1014 table for package body and body stubs.
1015 (Move_Or_Merge_Aspects): New routine.
1016 (Remove_Aspects): New routine.
1017 * aspects.ads (Move_Aspects): Update comment on usage.
1018 (Move_Or_Merge_Aspects): New routine.
1019 (Remove_Aspects): New routine.
1020 * par-ch3.adb: Update the grammar of private_type_declaration,
1021 private_extension_declaration, object_renaming_declaration,
1022 and exception_renaming_declaration.
1023 (P_Subprogram): Parse the
1024 aspect specifications that apply to a body stub.
1025 * par-ch6.adb: Update the grammar of subprogram_body_stub and
1026 generic_instantiation.
1027 * par-ch7.adb: Update the grammar of package_declaration,
1028 package_specification, package_body, package_renaming_declaration,
1029 package_body_stub.
1030 (P_Package): Parse the aspect specifications
1031 that apply to a body, a body stub and package renaming.
1032 * par-ch9.adb: Update the grammar of entry_declaration,
1033 protected_body, protected_body_stub, task_body,
1034 and task_body_stub.
1035 (P_Protected): Add local variable
1036 Aspect_Sloc. Add local constant Dummy_Node. Parse the aspect
1037 specifications that apply to a protected body and a protected
1038 body stub.
1039 (P_Task): Add local variable Aspect_Sloc. Add local
1040 constant Dummy_Node. Parse the aspect specifications that apply
1041 to a task body and a task body stub.
1042 * par-ch12.adb: Update the grammar of
1043 generic_renaming_declaration.
1044 (P_Generic): Parse the aspect
1045 specifications that apply to a generic renaming.
1046 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Do not emit
1047 an error when analyzing aspects that apply to a body stub. Such
1048 aspects are relocated to the proper body.
1049 * sem_ch7.adb (Analyze_Package_Body_Helper): Analyze the aspect
1050 specifications that apply to a body.
1051 * sem_ch9.adb (Analyze_Protected_Body): Warn about user-defined
1052 aspects not being supported on protected bodies. Remove the
1053 aspect specifications. (Analyze_Single_Protected_Declaration):
1054 Analyze the aspects that apply to a single protected declaration.
1055 (Analyze_Task_Body): Warn about user-defined aspects not being
1056 supported on task bodies. Remove the aspect specifications.
1057 * sem_ch10.adb: Add with and use clause for Aspects.
1058 (Analyze_Package_Body_Stub): Propagate the aspect specifications
1059 from the stub to the proper body.
1060 * sem_ch13.adb (Analyze_Aspect_Specifications): Insert the
1061 corresponding pragma of an aspect that applies to a body in the
1062 declarations of the body.
1063 * sinfo.ads: Update the gramma of expression_function,
1064 private_type_declaration, private_extension_declaration,
1065 object_renaming_declaration, exception_renaming_declaration,
1066 package_renaming_declaration, subprogram_renaming_declaration,
1067 generic_renaming_declaration, entry_declaration,
1068 subprogram_body_stub, package_body_stub, task_body_stub,
1069 generic_subprogram_declaration.
1070
1071 2013-09-10 Hristian Kirtchev <kirtchev@adacore.com>
1072
1073 * sem_prag.adb (Analyze_Pragma): Add processing
1074 for aspect/pragma SPARK_Mode when it applies to a [library-level]
1075 subprogram or package [body].
1076
1077 2013-09-10 Robert Dewar <dewar@adacore.com>
1078
1079 * gnat_ugn.texi: Document that -gnatc and -gnatR cannot be
1080 given together.
1081 * switch-c.adb (Scan_Front_End_Switches): Give error if both
1082 -gnatR and -gnatc given.
1083
1084 2013-09-10 Robert Dewar <dewar@adacore.com>
1085
1086 * g-table.ads, g-table.adb (For_Each): New generic procedure
1087 (Sort_Table): New generic procedure.
1088
1089 2013-09-10 Thomas Quinot <quinot@adacore.com>
1090
1091 * adaint.c (__gnat_is_executable_file_attr): Should be true
1092 for an executable regular file only only (not for a directory
1093 that has the executable permission).
1094
1095 2013-09-10 Ed Schonberg <schonberg@adacore.com>
1096
1097 * sem_res.adb: Further work on operator calls in ASIS.
1098
1099 2013-09-10 Yannick Moy <moy@adacore.com>
1100
1101 * sinfo.ads, sem_prag.ads, sem_ch13.adb: Minor correction and comment
1102 update.
1103
1104 2013-09-10 Thomas Quinot <quinot@adacore.com>
1105
1106 * aspects.ads, sem_ch13.adb: Minor reformatting.
1107 * adaint.c (__gnat_set_close_on_exec): Add comment documenting
1108 that this routine is shared between OS_Lib and Sockets.
1109
1110 2013-09-10 Robert Dewar <dewar@adacore.com>
1111
1112 * exp_prag.adb (Expand_Pragma_Check): Ignore pragma if Is_Ignored set.
1113 * sem_ch13.adb (Make_Aitem_Pragma): Set Is_Checked if needed.
1114 * sem_prag.adb (Check_Kind): Moved from spec (Analyze_Pragma):
1115 Make sure Is_Ignored/Is_Checked are set right (Analyze_Pragma,
1116 case Check): Ditto (Check_Applicable_Policy): Handle
1117 Statement_Assertion case Throughout, set and check the Is_Checked
1118 flag as appropriate.
1119 * sem_prag.ads (Check_Kind): Moved to body.
1120 * sinfo.ads, sinfo.adb (Is_Checked): New flag.
1121
1122 2013-09-10 Robert Dewar <dewar@adacore.com>
1123
1124 * aspects.ads (Delay_Type): New type (Aspect_Delay): New table.
1125 * einfo.adb (Has_Delayed_Rep_Aspects): New flag
1126 (May_Inherit_Delayed_Rep_Aspects): New flag (Rep_Clause): Removed
1127 (use Get_Attribute_Representation_Clause).
1128 * einfo.ads (Has_Delayed_Rep_Aspects): New flag
1129 (May_Inherit_Delayed_Rep_Aspects): New flag
1130 * freeze.adb: Minor reformatting
1131 * sem_ch13.adb (Analyze_Aspect_Speficifications): Redo
1132 handling of delayed evaluation, including optimizing some cases
1133 and avoiding delays.
1134 (Analyze_Aspects_At_Freeze_Point): Now
1135 handled inheriting delayed rep aspects for type derivation case.
1136 (Inherit_Delayed_Rep_Aspects): New procedure
1137 * sem_ch13.ads (Analyze_Aspects_At_Freeze_Point): Now handled
1138 inheriting delayed rep aspects for type derivation case.
1139 * sem_ch3.adb (Build_Derived_Type): Set
1140 May_Inherit_Derived_Rep_Aspects if parent type flag
1141 Has_Delayed_Rep_Aspects is set
1142
1143 2013-09-10 Robert Dewar <dewar@adacore.com>
1144
1145 * errout.adb (Finalize): Don't delete real errors with specific
1146 warning control.
1147
1148 2013-09-10 Ed Schonberg <schonberg@adacore.com>
1149
1150 * exp_ch9.adb (Expand_N_Timed_Entry_Call,
1151 Expand_N_Conditional_Entry_Call, Expand_N_Asynchronous_Select):
1152 Handle properly a trigger that is a call to a primitive operation
1153 of a type that implements a limited interface, if the type itself
1154 is not limited.
1155
1156 2013-09-10 Robert Dewar <dewar@adacore.com>
1157
1158 * sem_ch3.adb, sinfo.ads, exp_ch9.adb, sem_prag.adb, sem_ch12.adb,
1159 exp_ch4.adb, sprint.adb: Minor reformatting.
1160
1161 2013-09-10 Yannick Moy <moy@adacore.com>
1162
1163 * sinfo.ads: Document splitting of pre/post in N_Contract description.
1164
1165 2013-09-10 Ed Schonberg <schonberg@adacore.com>
1166
1167 * exp_ch4.adb (Expand_N_Op_Multiply): If the operation is of the
1168 form X * 2 ** N and it has been marked Is_Power_Of_2_For_Shift,
1169 add a mod operation if the result type is a binary modular type.
1170
1171 2013-09-10 Hristian Kirtchev <kirtchev@adacore.com>
1172
1173 * sem_prag.adb (Check_Mode_Restriction_In_Enclosing_Context): Add local
1174 variable Context. Remove local variable Subp_Id. Start the
1175 context traversal from the current subprogram rather than the
1176 current scope. Update the scope traversal and error reporting.
1177
1178 2013-09-10 Ed Schonberg <schonberg@adacore.com>
1179
1180 * exp_ch9.adb (Expand_N_Timed_Entry_Call): New procedure
1181 Rewrite_Triggering_Statements, to encapsulate the statements that
1182 follow the trigger of the entry call. This procedure is needed
1183 when the trigger is a dispatching call, because the expansion
1184 requires several copies of those statements. The procedure is
1185 more efficient, and preserves non-local references when the
1186 construct is within an instance.
1187
1188 2013-09-10 Ed Schonberg <schonberg@adacore.com>
1189
1190 * sem_ch12.adb (Analyze_Package_Instantiation): If the
1191 instantiation is a compilation unit, analyze aspects before
1192 analyzing the package declaration for the instance.
1193 * sem_ch13.adb (Analyze_Aspect_Specifications): If the
1194 corresponding node is a package instantiation, insert generated
1195 pragmas at the head of visible declarations.
1196 * sem_prag.adb (Analyze_Pragma, case Preelaborate): In an instance
1197 do not ignore the pragma if it comes from an aspect specification
1198 in the instance, and not from the generic unit.
1199 * sprint.adb (Sprint_Node_Actual): For a package declaration that
1200 is an instantiation, print aspects after declaration.
1201
1202 2013-09-10 Robert Dewar <dewar@adacore.com>
1203
1204 * einfo.adb, sem_prag.adb, rtsfind.ads: Minor reformatting.
1205
1206 2013-09-10 Hristian Kirtchev <kirtchev@adacore.com>
1207
1208 * sem_prag.adb (Get_SPARK_Mode_Id): Handle the
1209 case where the pragma may appear without an argument.
1210 (Analyze_Global_List): Add expanded_name to the list of constructs
1211 that denote a single item.
1212 (Collect_Global_List): Add expanded_name to the list of constructs
1213 that denote a single item.
1214
1215 2013-09-10 Hristian Kirtchev <kirtchev@adacore.com>
1216
1217 * exp_ch4.adb (Apply_Accessibility_Check): Add local constant
1218 Pool_Id and local variables Fin_Call and Free_Stmt. Finalize
1219 and deallocate a heap-allocated class-wide object after it
1220 has been determined that it violates the accessibility rules.
1221 * rtsfind.ads: Add new RTU_Id for System.Memory. Add new RE_Id
1222 and entry in RE_Unit_Table for RE_Free.
1223
1224 2013-09-01 Eric Botcazou <ebotcazou@adacore.com>
1225 Iain Sandoe <iain@codesourcery.com>
1226
1227 PR ada/58239
1228 * gcc-interface/Makefile.in (GCC_LINK_FLAGS): Add -static-libstdc++.
1229 (GCC_LINK): Use CXX instead of CC.
1230 * gcc-interface/Make-lang.in (CXX_LFLAGS): New.
1231 (ADA_TOOLS_FLAGS_TO_PASS): Pass CXX, and CXX_LFLAGS for native.
1232
1233 2013-08-13 Eric Botcazou <ebotcazou@adacore.com>
1234
1235 * gcc-interface/decl.c (gnat_to_gnu_entity): Do not bother about alias
1236 sets of derived types in ASIS mode.
1237
1238 2013-08-13 Eric Botcazou <ebotcazou@adacore.com>
1239
1240 * gcc-interface/decl.c (gnat_to_gnu_entity): Replace True with true.
1241 (is_cplusplus_method): Likewise, and False with false.
1242 (components_need_strict_alignment): Likewise.
1243 * gcc-interface/misc.c (gnat_init_gcc_fp): Likewise.
1244 * gcc-interface/trans.c (Loop_Statement_to_gnu): Likewise.
1245 (Handled_Sequence_Of_Statements_to_gnu): Likewise.
1246 (add_cleanup): Likewise.
1247 (Sloc_to_locus1): Likewise.
1248 (Sloc_to_locus): Likewise.
1249 (set_expr_location_from_node): Likewise.
1250 * gcc-interface/utils.c (potential_alignment_gap): Likewise.
1251
1252 2013-08-13 Thomas Quinot <quinot@adacore.com>
1253
1254 * gcc-interface/trans.c (set_end_locus_from_node): Clear column info
1255 for the end_locus of a block if it does not come from an End_Label.
1256
1257 2013-08-13 Thomas Quinot <quinot@adacore.com>
1258
1259 * gcc-interface/trans.c (Handled_Sequence_Of_Statements_to_gnu): If
1260 there is no End_Label, attach cleanup actions to the sloc of the HSS
1261 node instead.
1262 (Exception_Handler_to_gnu_zcx): Associate cleanup actions with the sloc
1263 of the handler itself.
1264 (add_cleanup): Clear column information in sloc of cleanup actions.
1265 (Sloc_to_locus1): New static function.
1266 (Sloc_to_locus): Call it.
1267 (set_expr_location_from_node1): New static function.
1268 (set_expr_location_from_node): Call it.
1269
1270 2013-08-13 Eric Botcazou <ebotcazou@adacore.com>
1271
1272 * gcc-interface/trans.c (Call_to_gnu): Deal with specific conditional
1273 expressions for misaligned actual parameters.
1274
1275 2013-08-13 Eric Botcazou <ebotcazou@adacore.com>
1276
1277 * gcc-interface/trans.c (can_equal_min_or_max_val_p): Be prepared for
1278 values outside of the range of the type.
1279
1280 2013-08-13 Eric Botcazou <ebotcazou@adacore.com>
1281
1282 * gcc-interface/utils2.c (build_atomic_load): Do a mere view-conversion
1283 to the original type before converting to the result type.
1284 (build_atomic_store): First do a conversion to the original type before
1285 view-converting to the effective type, but deal with a padded type
1286 specially.
1287
1288 2013-08-08 Eric Botcazou <ebotcazou@adacore.com>
1289
1290 * gcc-interface/Makefile.in (TOOLS_LIBS): Pick C object files from the
1291 compiler build and use standard library variables.
1292 (../../vxaddr2line$(exeext): Do not depend on targext.o and adjust.
1293 (gnatmake-re): Do not depend on targext.o.
1294 (gnatlink-re): Do not depend on link.o and targext.o.
1295 (../../gnatmake$(exeext): Likewise.
1296 (../../gnatlink$(exeext): Likewise.
1297
1298 2013-07-21 OndÅ\99ej Bílka <neleai@seznam.cz>
1299
1300 * gcc-interface/gigi.h: Fix typos.
1301 * gcc-interface/trans.c: Likewise.
1302 * gcc-interface/utils2.c: Likewise.
1303 * gnat_rm.texi: Likewise.
1304 * gnat_ugn.texi: Likewise.
1305 * raise-gcc.c: Likewise.
1306 * sigtramp-ppcvxw.c: Likewise.
1307 * sysdep.c: Likewise.
1308 * terminals.c: Likewise.
1309
1310 2013-07-20 Eric Botcazou <ebotcazou@adacore.com>
1311
1312 PR ada/57934
1313 * gcc-interface/ada.h (CAT): Fix typo.
1314
1315 2013-07-08 Hristian Kirtchev <kirtchev@adacore.com>
1316
1317 * einfo.adb (Get_Pragma): Handle the retrieval of delayed
1318 pragmas stored in N_Contract nodes.
1319 * einfo.ads (Get_Pragma): Update the comment on usage.
1320 * sem_prag.adb (Check_Precondition_Postcondition): Retain a copy
1321 of the pragma when it applies to a body that acts as a spec. The
1322 copy is preanalyzed and chained on the contract of the body.
1323
1324 2013-07-08 Robert Dewar <dewar@adacore.com>
1325
1326 * rtsfind.adb: Minor comment fix.
1327
1328 2013-07-08 Hristian Kirtchev <kirtchev@adacore.com>
1329
1330 * sem_ch4.adb (Check_Ghost_Subprogram_Call): Do not check the placement
1331 of a Ghost function call when the enclosing context is being
1332 preanalyzed.
1333
1334 2013-07-08 Ed Schonberg <schonberg@adacore.com>
1335
1336 * exp_ch6.adb (Expand_Inlined_Call, Process_Formals): If the
1337 expression in a return statement is a numeric literal, qualify
1338 it with the return type for proper resolution.
1339
1340 2013-07-08 Robert Dewar <dewar@adacore.com>
1341
1342 * sem.ads: Minor comment updates.
1343 * s-restri.ads, exp_ch6.adb, lib-load.ads, exp_ch3.adb, sem_ch10.adb:
1344 Minor reformatting.
1345
1346 2013-07-08 Robert Dewar <dewar@adacore.com>
1347
1348 * exp_attr.adb (Expand_N_Attribute_Reference): Add dummy entry
1349 for Restriction_Set.
1350 * gnat_rm.texi: Add missing menu entry for Attribute Ref Add
1351 documentation for attribute Restriction_Set.
1352 * lib-writ.adb (Write_With_Lines): Generate special W lines
1353 for Restriction_Set.
1354 * lib-writ.ads: Document special use of W lines for
1355 Restriction_Set.
1356 * lib.ads (Restriction_Set_Dependences): New table.
1357 * par-ch4.adb (Is_Parameterless_Attribute): Add Loop_Entry to
1358 list (Scan_Name_Extension_Apostrophe): Remove kludge test for
1359 Loop_Entry (Scan_Name_Extension_Apostrophe): Handle No_Dependence
1360 for Restricton_Set.
1361 * restrict.adb (Check_SPARK_Restriction): Put in Alfa order
1362 (OK_No_Dependence_Unit_Name): New function.
1363 * restrict.ads (OK_No_Dependence_Unit_Name): New function.
1364 * rtsfind.adb: Minor reformatting Minor code reorganization.
1365 * sem_attr.adb (Analyze_Attribute): Add processing for
1366 Restriction_Set.
1367 * sem_prag.adb (Process_Restrictions_Or_Restriction_Warnings):
1368 Remove Check_Unit_Name and use new function
1369 OK_No_Dependence_Unit_Name instead.
1370 * sinfo.ads: Minor comment updates.
1371 * snames.ads-tmpl: Add entry for Restriction_Set attribute.
1372
1373 2013-07-08 Hristian Kirtchev <kirtchev@adacore.com>
1374
1375 * exp_ch4.adb (Apply_Accessibility_Check): Remove local constant
1376 Pool_Id and local variable Free_Stmt. Do not deallocate the faulty
1377 object as "free" is not available on all targets/profiles.
1378
1379 2013-07-08 Robert Dewar <dewar@adacore.com>
1380
1381 * sem_ch13.adb (Analyze_Aspect_Specifications): Handle
1382 Storage_Size aspect for task type in case discriminant is
1383 referenced.
1384 (Analyze_Attribute_Definition_Clause): Do not flag Storage_Size
1385 attribute definition clause as obsolescent if from aspect.
1386
1387 2013-07-08 Robert Dewar <dewar@adacore.com>
1388
1389 * gnat_rm.texi: Add documentation for Img returning a function.
1390 * par-prag.adb: Minor reformatting.
1391 * restrict.adb: Minor reformatting and code reorganization.
1392
1393 2013-07-08 Ed Schonberg <schonberg@adacore.com>
1394
1395 * sem_res.adb: add guard to ASIS transform.
1396
1397 2013-07-08 Ed Schonberg <schonberg@adacore.com>
1398
1399 * exp_ch9.adb (Expand_N_Asynchronous_Select): If the trigger
1400 of the asynchronous select is a dispatching call, transform the
1401 abortable part into a procedure, to avoid duplication of local
1402 loop variables that may appear within.
1403
1404 2013-07-08 Vincent Celier <celier@adacore.com>
1405
1406 * projects.texi: Update the documentation of suffixes in package
1407 Naming.
1408
1409 2013-07-08 Ed Schonberg <schonberg@adacore.com>
1410
1411 * sem_ch6.adb (Conforming_Types): Anonymous_access_to_subprograsm
1412 types are type conformant if the designated type of one is
1413 protected and the other is not. Convention only matters when
1414 checking subtype conformance.
1415
1416 2013-07-08 Ed Schonberg <schonberg@adacore.com>
1417
1418 * sem_res.adb (Make_Call_Into_Operator): In ASIS mode, propagate
1419 back the fully resolved operands to the original function call
1420 so that all semantic information remains available to ASIS.
1421
1422 2013-07-08 Ed Schonberg <schonberg@adacore.com>
1423
1424 * sem_ch4.adb: minor reformatting (remove obsolete comment).
1425 * sem_ch9.adb: improve error message on illegal trigger.
1426
1427 2013-07-08 Robert Dewar <dewar@adacore.com>
1428
1429 * sem_prag.adb: Minor reformatting.
1430
1431 2013-07-08 Robert Dewar <dewar@adacore.com>
1432
1433 * gnatcmd.adb: Minor reformatting.
1434
1435 2013-07-08 Robert Dewar <dewar@adacore.com>
1436
1437 * targparm.adb (Get_Target_Parameters): Recognize pragma
1438 Partition_Elaboration_Policy.
1439
1440 2013-07-08 Robert Dewar <dewar@adacore.com>
1441
1442 * gnat_ugn.texi: Minor update to mention partition elaboration policy.
1443
1444 2013-07-08 Ed Schonberg <schonberg@adacore.com>
1445
1446 * sem_ch4.adb (Comple_Object_Operation): Revert previous change.
1447 (Analyze_Indexed_Component_Form): In ASIS mode, if node has been
1448 transformed but not rewritten as a function call (as is the case
1449 in a generic), analyze it as such.
1450
1451 2013-07-08 Thomas Quinot <quinot@adacore.com>
1452
1453 * gnat_rm.texi: Minor rewording: add missing word "operators"
1454 in documentation for restriction No_Direct_Boolean_Operator.
1455
1456 2013-07-08 Robert Dewar <dewar@adacore.com>
1457
1458 * errout.adb (Set_Msg_Txt): No longer sets Is_Style_Msg,
1459 Is_Warning_Msg, or Is_Unconditional_Msg (all are set elsewhere
1460 now).
1461 * errout.ads: Insertions ! and !! no longer have to be at the
1462 end of the message, they can be anywhere in the message.
1463 * erroutc.adb (Test_Style_Warning_Serious_Unconditional_Msg):
1464 Replaces Test_Style_Warning_Serious_Msg
1465 * erroutc.ads (Has_Double_Exclam): New flag New comments for
1466 existing flags (Test_Style_Warning_Serious_Unconditional_Msg):
1467 Replaces Test_Style_Warning_Serious_Msg
1468 * errutil.adb (Test_Style_Warning_Serious_Unconditional_Msg):
1469 Replaces Test_Style_Warning_Serious_Msg
1470
1471 2013-07-08 Robert Dewar <dewar@adacore.com>
1472
1473 * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings):
1474 Recognize SPARK_05 as synonym for SPARK in restrictions pragma.
1475 * restrict.ads, restrict.adb (SPARK_Hides): Table moved to body, only
1476 referenced there.
1477 * scng.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb, sem_ch8.adb,
1478 sem_res.adb, sem_util.adb: Use restriction SPARK_05 instead of SPARK.
1479 * snames.ads-tmpl (Name_No_Obsolescent_Features): New entry.
1480
1481 2013-07-08 Vincent Celier <celier@adacore.com>
1482
1483 * gnatcmd.adb (Check_Files): Use a response file for gnatls
1484 when possible.
1485
1486 2013-07-08 Gary Dismukes <dismukes@adacore.com>
1487
1488 * freeze.adb: Minor typo fixes.
1489
1490 2013-07-08 Robert Dewar <dewar@adacore.com>
1491
1492 * gnat_rm.texi: Document SPARK_05 (replaces SPARK) Document
1493 obsolete recognition of SPARK Document all other obsolete synonyms
1494 for old restrictions.
1495 * restrict.adb (Check_SPARK_Restriction): SPARK_05 replaces
1496 SPARK (Process_Restriction_Synonyms): Handle SPARK as synonym
1497 for SPARK_05.
1498 * restrict.ads: Restriction SPARK_05 replaces SPARK.
1499 * s-rident.ads: Replace restriction SPARK by SPARK_05 Add SPARK
1500 as synonym for SPARK_05.
1501 * sem_prag.adb: Minor reformatting.
1502 * snames.ads-tmpl: Add entries for Name_SPARK and Name_SPARK_05.
1503
1504 2013-07-08 Robert Dewar <dewar@adacore.com>
1505
1506 * sem_dim.adb: Minor error message change.
1507 * freeze.adb (Freeze_Entity, array type case): Extend handling
1508 of Implicit_Packing to handle multi-dimensional array case.
1509 * gnat_rm.texi: Update doc on Implicit_Packing.
1510
1511 2013-07-08 Robert Dewar <dewar@adacore.com>
1512
1513 * exp_ch4.adb: Minor reformatting.
1514
1515 2013-07-08 Ed Schonberg <schonberg@adacore.com>
1516
1517 * sem_ch4.adb (Complete_Object_Operation): In ASIS mode, if
1518 the parent node is a selected component and the analysis as a
1519 call is successful, set the type of the selector in the parent
1520 node for subsequent checks, because the rewriting of the node
1521 does not take place during pre-analysis.
1522
1523 2013-07-08 Robert Dewar <dewar@adacore.com>
1524
1525 * sem_ch8.adb, exp_ch3.adb: Minor reformatting.
1526
1527 2013-07-08 Hristian Kirtchev <kirtchev@adacore.com>
1528
1529 * exp_ch4.adb (Expand_N_Op_Eq): When comparing two
1530 Bounded_Strings, use the predefined equality function of the
1531 root Super_String type.
1532
1533 2013-07-08 Hristian Kirtchev <kirtchev@adacore.com>
1534
1535 * exp_ch4.adb (Create_Alternative): Removed.
1536 (Expand_N_If_Expression): Remove constant
1537 In_Case_Or_If_Expression. Add local variable
1538 Ptr_Typ. Inspect the "then" and "else" action lists
1539 for transient controlled objects and generate code to
1540 finalize them. (Is_Controlled_Function_Call): Removed.
1541 (Process_Action): Update the comment on usage. Update the call
1542 to Process_Transient_Object. There is no need to continue the
1543 traversal of the object itself.
1544 (Process_Actions): New routine.
1545 (Process_Transient_Object): Moved to the top level of Exp_Ch4. Add
1546 a new formal and update the related comment on usage.
1547 * exp_util.adb (Within_Case_Or_If_Expression): Start the search
1548 from the parent of the node.
1549
1550 2013-07-08 Robert Dewar <dewar@adacore.com>
1551
1552 * a-cusyqu.ads, a-cbprqu.ads, s-interr.ads, a-cuprqu.ads,
1553 a-cbsyqu.ads: Minor reformatting (proper formatting of overriding).
1554
1555 2013-07-08 Ed Schonberg <schonberg@adacore.com>
1556
1557 * sem_ch8.adb (Attribute_Renaming): Treat 'Img as an attribute
1558 that can be renamed as a function.
1559
1560 2013-07-08 Thomas Quinot <quinot@adacore.com>
1561
1562 * g-socket.ads: Document target dependency: FIONBIO may or may not
1563 be inherited from listening socket by accepted socket.
1564
1565 2013-07-08 Hristian Kirtchev <kirtchev@adacore.com>
1566
1567 * exp_ch4.adb (Apply_Accessibility_Check): Do not deallocate the object
1568 on targets that can't deallocate.
1569
1570 2013-07-08 Hristian Kirtchev <kirtchev@adacore.com>
1571
1572 * exp_ch3.adb (Freeze_Type): Generate a
1573 subpools-related accessibility check only on profiles that
1574 include the corresponding library unit.
1575
1576 2013-07-08 Gary Dismukes <dismukes@adacore.com>
1577
1578 * sem_ch8.adb: Minor typo fixes.
1579
1580 2013-07-08 Javier Miranda <miranda@adacore.com>
1581
1582 * sem_ch8.adb (Save_Scope_Stack): Adding documentation.
1583 (Restore_Scope_Stack): Remove the elements of the list when the
1584 visibility of each entity is restored.
1585
1586 2013-07-08 Robert Dewar <dewar@adacore.com>
1587
1588 * exp_ch9.adb, sem.ads, sem_util.adb: Minor reformatting.
1589
1590 2013-07-08 Robert Dewar <dewar@adacore.com>
1591
1592 * sem_ch8.adb, sem_ch8.ads: Minor reformatting.
1593
1594 2013-07-08 Gary Dismukes <dismukes@adacore.com>
1595
1596 * gnat_rm.texi: Minor reformatting and rewording for consistency.
1597
1598 2013-07-08 Bob Duff <duff@adacore.com>
1599
1600 * exp_ch3.adb (Build_Master): If Desig_Type is an incomplete
1601 view coming from a limited-with'ed package, use the nonlimited
1602 view in case it has tasks.
1603
1604 2013-07-08 Javier Miranda <miranda@adacore.com>
1605
1606 * sem_ch8.ad[sb] (Save_Scope_Stack): Modified to return the list
1607 of entities which have been temporarily removed from immediate
1608 visibility.
1609 (Restore_Scope_Stack): Modified to receive an
1610 additional parameter with the list of entities whose immediate
1611 visibility must be restored.
1612 * sem.adb (Do_Analyze): Use new version of
1613 Save_Scope_Stack/Restore_Scope_Stack
1614 * sem_ch12.adb (Inline_Instance_Body): Use new version of
1615 Save_Scope_Stack and Restore_Scope_Stack
1616
1617 2013-07-08 Hristian Kirtchev <kirtchev@adacore.com>
1618
1619 * sem_prag.adb (Analyze_Pragma): Remove
1620 variable Unit_Prag. Remove the check on duplicate mode for the
1621 configuration form of the pragma.
1622 (Redefinition_Error): Removed.
1623
1624 2013-07-08 Robert Dewar <dewar@adacore.com>
1625
1626 * lib.ads, gnat_rm.texi, einfo.ads, sem_ch13.adb: Minor reformatting
1627 and editing.
1628
1629 2013-07-08 Ed Schonberg <schonberg@adacore.com>
1630
1631 * sem_prag.adb (Analyze_PPC_In_Decl_Part): In ASIS mode,
1632 pre-analyze only the original expression attached to the source
1633 aspect, not the relocated expression of the pragma, to prevent
1634 malformed trees in ASIS mode.
1635 * sem_ch13.adb (Analyze_Aspect_Specifications): Revert previous
1636 patch: the expression in the aspect for pre/post must be relocated
1637 to the pragma for proper analysis.
1638
1639 2013-07-05 Hristian Kirtchev <kirtchev@adacore.com>
1640
1641 * aspects.adb: Add an entry for SPARK_Mode in table Canonical_Aspect.
1642 * aspects.ads: Add an entry for SPARK_Mode in tables Aspect_Id,
1643 Aspect_Argument, Aspect_Names.
1644 * atree.adb (Node32): New routine.
1645 (Set_Node32): New routine.
1646 * atree.ads (Node32): New routine.
1647 (Set_Node32): New routine.
1648 * einfo.adb: Node32 is now used as SPARK_Mode_Pragmas.
1649 (Set_SPARK_Mode_Pragmas): New routine.
1650 (SPARK_Mode_Pragmas): New routine.
1651 (Write_Field32_Name): Add and entry for SPARK_Modes.
1652 * einfo.ads: Add attribute SPARK_Mode_Pragmas along with usage
1653 in various entities.
1654 (Set_SPARK_Mode_Pragmas): New routine and
1655 pragma Inline.
1656 (SPARK_Mode_Pragmas): New routine and pragma Inline.
1657 * gnat_rm.texi: Add sections explaining the syntax and semantics
1658 of aspect/pragma SPARK_Mode.
1659 * gnat_ugn.texi: Add pragma SPARK_Mode to the list of
1660 configuration pragmas.
1661 * lib.adb (Set_SPARK_Mode_Pragma): New routine.
1662 (SPARK_Mode_Pragma): New routine.
1663 * lib.ads: Alphabetize the comments on fields of record
1664 Unit_Record. Add new field SPARK_Mode_Pragma along with
1665 comment on its usage. Update the layout of record Unit_Record.
1666 (Set_SPARK_Mode_Pragma): New routine and pragma Inline.
1667 (SPARK_Mode_Pragma): New routine and pragma Inline.
1668 * lib-load.adb (Create_Dummy_Package_Unit): Initialize
1669 field SPARK_Mode_Pragma.
1670 (Load_Main_Source): Initialize field SPARK_Mode_Pragma.
1671 (Load_Unit): Initialize field SPARK_Mode_Pragma.
1672 * lib-writ.adb (Add_Preprocessing_Dependency): Initialize field
1673 SPARK_Mode_Pragma.
1674 (Ensure_System_Dependency): Initialize field SPARK_Mode_Pragma.
1675 * opt.ads: Alphabetize verification flags. Store the
1676 compilation-wide SPARK mode in variable Global_SPARK_Mode.
1677 * par-prag.adb: Pragma SPARK_Mode does not need special processing
1678 by the parser.
1679 * sem_ch13.adb (Analyze_Aspect_Specifications): Convert aspect
1680 SPARK_Mode into a pragma.
1681 (Check_Aspect_At_Freeze_Point): Aspect SPARK_Mode does not need
1682 delayed processing.
1683 * sem_prag.adb: Add an entry for SPARK_Mode in table Sig_Flags.
1684 (Analyze_Pragma): Add processing for pragma SPARK_Mode.
1685 (Get_SPARK_Mode_Id): New routine.
1686 (Is_Elaboration_SPARK_Mode): New routine.
1687 (Is_Private_SPARK_Mode): New routine.
1688 * sem_prag.ads (Get_SPARK_Mode_Id): New routine.
1689 (Is_Elaboration_SPARK_Mode): New routine.
1690 (Is_Private_SPARK_Mode): New routine.
1691 * sinfo.ads: Update the comment on the usage of field Next_Pragma.
1692 * snames.ads-tmpl: Add new predefined name for SPARK_Mode and
1693 Auto. Add new pragma Id for SPARK_Mode.
1694 * types.ads: Add new type SPARK_Mode_Id.
1695
1696 2013-07-05 Ed Schonberg <schonberg@adacore.com>
1697
1698 * sem_ch13.adb (Analyze_Aspect_Specifications): For
1699 pre/postconditions copy the expression to the generated pragma,
1700 to avoid sharing between the original aspect and the pragma node,
1701 because in ASIS_Mode both will be independently analyzed.
1702
1703 2013-07-05 Ed Schonberg <schonberg@adacore.com>
1704
1705 * exp_ch3.adb (Build_Variant_Record_Equality): Add pairs of
1706 formals for each discriminant of an unchecked union.
1707 (Make_Eq_Case): Suprogram accepts a list of discriminants. Nested
1708 variants are supported. New helper function Corresponding_Formal.
1709 * exp_ch4.adb (Build_Equality_Call): For unchecked unions,
1710 loop through discriminants to create list of inferred values,
1711 and modify call to equality routine accordingly.
1712
1713 2013-07-05 Claire Dross <dross@adacore.com>
1714
1715 * a-cfdlli.ads, a-cfhama.ads, a-cfhase.ads, a-cforma.ads,
1716 a-cforse.ads, a-cofove.ads: Add preconditions when needed +
1717 container types are not tagged any more.
1718
1719 2013-07-05 Thomas Quinot <quinot@adacore.com>
1720
1721 * freeze.adb (Freeze_Entity): For an object with captured
1722 initialization statements, do not remove Init_Stmts from the
1723 enclosing list, as Freeze_All might rely on it to know where to
1724 stop freezing.
1725
1726 2013-07-05 Robert Dewar <dewar@adacore.com>
1727
1728 * exp_ch4.adb, a-cfdlli.ads, a-ngelfu.ads, s-bignum.adb: Minor
1729 reformatting.
1730
1731 2013-07-05 Hristian Kirtchev <kirtchev@adacore.com>
1732
1733 * exp_ch4.adb (Expand_Composite_Equality): Use the full view
1734 when the base type is private.
1735
1736 2013-07-05 Claire Dross <dross@adacore.com>
1737
1738 * a-cfdlli.ads: Add preconditions when needed.
1739
1740 2013-07-05 Robert Dewar <dewar@adacore.com>
1741
1742 * sem_ch8.adb: Minor reformatting.
1743
1744 2013-07-05 Ed Schonberg <schonberg@adacore.com>
1745
1746 * sem_ch3.adb (Access_Subprogram_Declaration): Use
1747 Generate_Reference_To_Formals.
1748 * lib-xref.adb (Generate_Reference_To_Formals): In the case of
1749 access to subprograms, the formals are found in the designated
1750 subprogram type.
1751
1752 2013-07-05 Robert Dewar <dewar@adacore.com>
1753
1754 * gnat_ugn.texi: Document that comments can be lined up with
1755 previous non-blank line.
1756 * styleg.adb (Check_Comment): Allow indentation to match previous
1757 non-blank line (Same_Column_As_Previous_Line): New function
1758
1759 2013-07-05 Robert Dewar <dewar@adacore.com>
1760
1761 * gnat_rm.texi: Update doc on missing pragmas.
1762 * sem_ch12.adb: Minor comment additions.
1763
1764 2013-07-05 Hristian Kirtchev <kirtchev@adacore.com>
1765
1766 * sem_prag.adb (Analyze_Pragma): Ensure that
1767 Contract_Cases, Depends and Global are analyzed when they apply
1768 to a subprogram compilation unit. The pragmas are all added
1769 unconditionally to the construct's contract. This ensures that
1770 proof tools can locate the pragmas.
1771
1772 2013-07-05 Ed Schonberg <schonberg@adacore.com>
1773
1774 * sem_ch8.adb (Freeze_Actual_Profile): An instance within
1775 a generic unit does not freeze a generic private type of the
1776 enclosing generic. This rule must also apply to a type derived
1777 from a generic private type.
1778
1779 2013-07-05 Arnaud Charlet <charlet@adacore.com>
1780
1781 * gnat_rm.texi: Add missing documentation for pragmas.
1782
1783 2013-07-05 Yannick Moy <moy@adacore.com>
1784
1785 * sem_ch12.adb: Minor comment.
1786
1787 2013-07-05 Robert Dewar <dewar@adacore.com>
1788
1789 * gnat_rm.texi: Document that -gnatR and -gnatD cannot be used
1790 together.
1791 * switch-c.adb: Do not allow -gnatD and -gnatR to both be
1792 specified.
1793
1794 2013-07-05 Robert Dewar <dewar@adacore.com>
1795
1796 * gnat_rm.texi: Add missing documentation for pragmas.
1797 * sem_ch8.adb: Minor reformatting.
1798 * gnat_ugn.texi: Document that -gnatR and -gnatD cannot be used
1799 together.
1800
1801 2013-07-05 Yannick Moy <moy@adacore.com>
1802
1803 * sem_ch12.ads, sem_ch12.adb (Need_Subprogram_Instance_Body): Force
1804 instance of subprogram body in SPARK mode, by testing Expander_Active
1805 (set in SPARK mode) instead of Full_Expander_Active (not set in
1806 SPARK mode).
1807 * sem_ch8.adb: Minor reformatting.
1808
1809 2013-07-05 Robert Dewar <dewar@adacore.com>
1810
1811 * freeze.adb (Freeze_Entity): Remove test of obsolete flag
1812 Propagate_Exceptions, and associated useless code that did
1813 nothing.
1814 * gnat_rm.texi: Add documentation for obsolete pragma
1815 Propagate_Exceptions.
1816 * opt.ads (Propagate_Exceptions): Obsolete flag removed.
1817 * sem_prag.adb (Analyze_Pragma, case Propagate_Exceptions):
1818 Remove useless and obsolete setting of Propagate_Exceptions flag.
1819
1820 2013-07-05 Robert Dewar <dewar@adacore.com>
1821
1822 * gnat_rm.texi, sem_prag.adb: Minor comment/text fixes.
1823
1824 2013-07-05 Robert Dewar <dewar@adacore.com>
1825
1826 * gnat_rm.texi: Add missing doc for various pragmas.
1827
1828 2013-07-05 Robert Dewar <dewar@adacore.com>
1829
1830 * par_sco.adb, sem_ch12.adb, par-ch5.adb: Minor reformatting.
1831 * gnat_rm.texi: Document pragma Profile_Warnings.
1832 * restrict.ads, sem_prag.adb: Minor reformatting.
1833
1834 2013-07-05 Ed Schonberg <schonberg@adacore.com>
1835
1836 * sem_ch12.adb (Check_Formal_Package_Instance): Handle properly
1837 a formal subprogram that was defaulted in the formal package.
1838
1839 2013-07-05 Thomas Quinot <quinot@adacore.com>
1840
1841 * par_sco.adb (Traverse_Declarations_Or_Statements): Ignore
1842 N_Implicit_Label_Declaration nodes.
1843
1844 2013-07-05 Robert Dewar <dewar@adacore.com>
1845
1846 * a-cfhase.adb, sem_prag.adb, a-cfhama.adb: Minor reformatting.
1847
1848 2013-07-05 Ed Schonberg <schonberg@adacore.com>
1849
1850 * sem_ch12.adb (Copy_Generic_Node): Check that name in function
1851 call is a valid entity name before preserving entity in generic
1852 copy.
1853
1854 2013-07-05 Thomas Quinot <quinot@adacore.com>
1855
1856 * par-ch5.adb: Minor reformatting.
1857
1858 2013-07-05 Thomas Quinot <quinot@adacore.com>
1859
1860 * sinfo.ads: Minor clarification to documentation for
1861 N_Implicit_Label_Declaration.
1862
1863 2013-07-05 Hristian Kirtchev <kirtchev@adacore.com>
1864
1865 * a-except-2005.adb, a-except.adb: Add constant Rmsg_17. Correct the
1866 values of all remaining constants.
1867 (Rcheck_35): New routine along with pragmas Export and No_Return.
1868 (Rcheck_PE_Aliased_Parameters): New routine along with pragmas
1869 Export and No_Return.
1870 (Rcheck_PE_All_Guards_Closed,
1871 Rcheck_PE_Bad_Predicated_Generic_Type,
1872 Rcheck_PE_Current_Task_In_Entry_Body,
1873 Rcheck_PE_Duplicated_Entry_Address, Rcheck_PE_Explicit_Raise,
1874 Rcheck_PE_Implicit_Return, Rcheck_PE_Misaligned_Address_Value,
1875 Rcheck_PE_Missing_Return, Rcheck_PE_Overlaid_Controlled_Object,
1876 Rcheck_PE_Potentially_Blocking_Operation
1877 Rcheck_PE_Stubbed_Subprogram_Called,
1878 Rcheck_PE_Unchecked_Union_Restriction,
1879 Rcheck_PE_Non_Transportable_Actual, Rcheck_SE_Empty_Storage_Pool,
1880 Rcheck_SE_Explicit_Raise, Rcheck_SE_Infinite_Recursion,
1881 Rcheck_SE_Object_Too_Large, Rcheck_PE_Finalize_Raised_Exception):
1882 Update the use of Rmsg_XX.
1883 (Rcheck_17, Rcheck_18, Rcheck_19,
1884 Rcheck_20, Rcheck_21, Rcheck_22, Rcheck_23, Rcheck_24, Rcheck_25,
1885 Rcheck_26, Rcheck_27, Rcheck_28, Rcheck_29, Rcheck_30, Rcheck_31,
1886 Rcheck_32, Rcheck_33, Rcheck_34, Rcheck_35): Update corresponding
1887 renamed subprograms.
1888 * checks.adb: Add with and use clause for Stringt.
1889 (Apply_Parameter_Aliasing_Checks): Make constant Loc visible in
1890 all subprograms of Apply_Parameter_Aliasing_Checks. Remove local
1891 variable Cond. Initialize Check at the start of the routine. Use
1892 routine Overlap_Check to construct a simple or a detailed run-time
1893 check. Update the creation of the simple check.
1894 (Overlap_Check): New routine.
1895 * exp_ch11.adb (Get_RT_Exception_Name): Add a value for
1896 PE_Aliased_Parameters.
1897 * types.ads: Add new enumeration literal
1898 PE_Aliased_Parameters. Update the corresponding integer values
1899 of all RT_Exception_Code literals.
1900 * types.h: Add new constant PE_Aliased_Parameters. Correct the
1901 values of all remaining constants.
1902
1903 2013-07-05 Yannick Moy <moy@adacore.com>
1904
1905 * gnat_rm.texi: Minor renaming of SPARK into SPARK 2005 in
1906 documentation.
1907
1908 2013-07-05 Ed Schonberg <schonberg@adacore.com>
1909
1910 * sem_prag.adb (Analyze_PPC_In_Decl_Part): For a class-wide
1911 condition, when replacing the name of a formal by a conversion
1912 to the class-wide type, exempt selector names that appear in
1913 parameter associations.
1914
1915 2013-06-13 Eric Botcazou <ebotcazou@adacore.com>
1916
1917 * gcc-interface/ada-tree.h (DECL_BY_DOUBLE_REF_P): Delete.
1918 * gcc-interface/gigi.h (annotate_object): Adjust prototype.
1919 (convert_vms_descriptor): Likewise.
1920 * gcc-interface/decl.c (gnat_to_gnu_param): Do not pass fat pointer
1921 types by double dereference.
1922 (annotate_object): Remove BY_DOUBLE_REF parameter and adjust.
1923 (gnat_to_gnu_entity): Adjust calls to annotate_object.
1924 * gcc-interface/trans.c (Identifier_to_gnu): Do not deal with double
1925 dereference.
1926 (Call_to_gnu): Likewise.
1927 (build_function_stub): Adjust call to convert_vms_descriptor.
1928 (Subprogram_Body_to_gnu): Adjust call to annotate_object.
1929 * gcc-interface/utils.c (convert_vms_descriptor): Remove BY_REF
1930 parameter and adjust.
1931
1932 2013-05-30 Eric Botcazou <ebotcazou@adacore.com>
1933
1934 * gcc-interface/Makefile.in (arm% androideabi): Robustify.
1935
1936 2013-05-26 Eric Botcazou <ebotcazou@adacore.com>
1937
1938 * gcc-interface/decl.c: (gnat_to_gnu_entity): In ASIS mode, do not
1939 check that access types have a set size.
1940
1941 2013-05-26 Eric Botcazou <ebotcazou@adacore.com>
1942
1943 * gcc-interface/decl.c (vinfo_t): New type and associated vector.
1944 (components_to_record): Change return type to bool.
1945 Lay out the variants in two passes. Do not force a specific layout for
1946 the variant part if the variants do not have a representation clause.
1947 Take the alignment of the variant part into account when laying out
1948 variants without rep clause in a record type with a partial rep clause.
1949 (create_rep_part): Do not set the position of the field.
1950
1951 2013-05-26 Eric Botcazou <ebotcazou@adacore.com>
1952
1953 * gcc-interface/trans.c (Attribute_to_gnu) <Attr_Last_Bit>: Add kludge
1954 to avoid generating an overflow for -1.
1955
1956 2013-05-26 Eric Botcazou <ebotcazou@adacore.com>
1957
1958 * gcc-interface/gigi.h (create_type_decl): Adjust prototype.
1959 (create_label_decl): Complete prototype.
1960 (process_attributes): Declare.
1961 * gcc-interface/decl.c (gnat_to_gnu_entity): Adjust multiple calls to
1962 create_type_decl throughout.
1963 <E_Enumeration_Type>: Do the layout of the type manually and call
1964 process_attributes on it. Reindent.
1965 <E_Enumeration_Subtype>: Minor tweak.
1966 <E_Floating_Point_Subtype>: Reindent.
1967 <E_Array_Subtype>: Call process_attributes on the array type built
1968 for a packed array type.
1969 <E_Record_Type>: Call process_attributes on the type.
1970 <E_Record_Subtype>: Likewise.
1971 <E_Access_Type>: Likewise.
1972 <E_Subprogram_Type>: Likewise.
1973 Likewise for all types at the end of the processing.
1974 * gcc-interface/utils.c (make_aligning_type): Adjust call to
1975 create_type_decl.
1976 (maybe_pad_type): Likewise.
1977 (create_index_type): Likewise.
1978 (create_type_decl): Remove attr_list parameter and associated code.
1979 (create_var_decl_1): Call process_attributes on the variable.
1980 (process_attributes): Take a pointer to the object and add in_place
1981 and gnat_node parameters and adjust throughout.
1982 <ATTR_MACHINE_ATTRIBUTE>: Pass ATTR_FLAG_TYPE_IN_PLACE only on demand
1983 and set the input location.
1984 Zap the attribute list at the end.
1985 (create_subprog_decl): Call process_attributes on the subprogram.
1986 (build_unc_object_type): Adjust call to create_type_decl.
1987 (handle_vector_type_attribute): Remove dead code.
1988
1989 2013-05-26 Eric Botcazou <ebotcazou@adacore.com>
1990
1991 * gcc-interface/gigi.h (make_aligning_type): Adjust prototype.
1992 * gcc-interface/utils.c (make_aligning_type): Take GNAT_NODE parameter
1993 for the position of the associated TYPE_DECL.
1994 * gcc-interface/decl.c (gnat_to_gnu_entity): Adjust call to above.
1995 * gcc-interface/utils2.c (maybe_wrap_malloc): Likewise.
1996
1997 2013-05-26 Eric Botcazou <ebotcazou@adacore.com>
1998
1999 * gcc-interface/decl.c (gnat_to_gnu_entity): Do not prematurely
2000 elaborate the full view of a type with a freeze node.
2001 * gcc-interface/trans.c (process_type): Add explicit predicate.
2002
2003 2013-05-26 Eric Botcazou <ebotcazou@adacore.com>
2004
2005 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Always build the
2006 UNC variable for aliased objects with unconstrained nominal subtype.
2007
2008 2013-05-24 Eric Botcazou <ebotcazou@adacore.com>
2009
2010 * gcc-interface/gigi.h (gnat_init_gcc_fp): Declare.
2011 * gcc-interface/trans.c (gigi): Call it.
2012 * gcc-interface/misc.c (gnat_init_gcc_fp): New function.
2013
2014 2013-05-24 Eric Botcazou <ebotcazou@adacore.com>
2015
2016 * gcc-interface/gigi.h (enum inline_status_t): New type.
2017 (create_subprog_decl): Adjust prototype.
2018 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Procedure>: Adjust
2019 calls to create_subprog_decl.
2020 (get_minimal_subprog_decl): Likewise.
2021 * gcc-interface/trans.c (gigi): Likewise.
2022 (build_raise_check): Likewise.
2023 (establish_gnat_vms_condition_handler): Likewise.
2024 (Compilation_Unit_to_gnu): Likewise.
2025 (gnat_to_gnu): Likewise.
2026 * gcc-interface/utils.c (create_subprog_decl): Change inline_flag
2027 parameter to inline_status and implement for suppressed inlining.
2028
2029 2013-05-24 Eric Botcazou <ebotcazou@adacore.com>
2030
2031 * gcc-interface/ada-tree.h (LOOP_STMT_NO_UNROLL): New define.
2032 (LOOP_STMT_UNROLL): Likewise.
2033 (LOOP_STMT_NO_VECTOR): Likewise.
2034 (LOOP_STMT_VECTOR): Likewise.
2035 * gcc-interface/trans.c (struct loop_info_d): Replace label field
2036 with stmt field.
2037 (Pragma_to_gnu) <Pragma_Loop_Optimize>: New case.
2038 (Loop_Statement_to_gnu): Save the loop statement onto the stack
2039 instead of the label.
2040 (gnat_to_gnu) <N_Exit_Statement>: Retrieve the loop label.
2041
2042 2013-05-24 Eric Botcazou <ebotcazou@adacore.com>
2043
2044 * gcc-interface/trans.c: Include diagnostic.h and opts.h.
2045 (Pragma_to_gnu) <Pragma_Warnings>: New case.
2046
2047 2013-05-24 Eric Botcazou <ebotcazou@adacore.com>
2048
2049 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Record_Type>: Constify
2050 a handful of local variables.
2051 For a derived untagged type that renames discriminants, change the type
2052 of the stored discriminants to a subtype with the bounds of the type
2053 of the visible discriminants.
2054 (build_subst_list): Rename local variable.
2055
2056 2013-05-16 Jason Merrill <jason@redhat.com>
2057
2058 * gcc-interface/Make-lang.in (gnat1$(exeext)): Use link mutex.
2059
2060 2013-05-13 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
2061
2062 PR ada/57188
2063 * gcc-interface/Makefile.in: Allow for amd64 solaris2.
2064
2065 2013-05-07 Eric Botcazou <ebotcazou@adacore.com>
2066
2067 PR ada/56474
2068 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Subtype>: Use
2069 int_const_binop to shift bounds by 1 when they are integer constants.
2070
2071 2013-04-25 Arnaud Charlet <charlet@adacore.com>>
2072
2073 * gcc-interface/Makefile.in (ADA_EXCLUDE_SRCS): Exclude s-init.ad{s,b}
2074
2075 2013-04-25 Hristian Kirtchev <kirtchev@adacore.com>
2076
2077 * checks.adb (Apply_Predicate_Check): Update the comment associated
2078 with the call to Check_Expression_Against_Static_Predicate.
2079 * sem_ch3.adb (Analyze_Object_Declaration): Update the comment
2080 associated with the call to Check_Expression_Against_Static_Predicate.
2081 * sem_util.adb (Check_Expression_Against_Static_Predicate):
2082 Broaden the check from a static expression to an expression with
2083 a known value at compile time.
2084 * sem_util.ads (Check_Expression_Against_Static_Predicate): Update
2085 comment on usage.
2086
2087 2013-04-25 Thomas Quinot <quinot@adacore.com>
2088
2089 * exp_attr.adb (Expand_N_Attribute_Reference, cases Position,
2090 First_Bit, and Last_Bit): Fix incorrect test in implementation of
2091 RM 2005 13.5.2(3/2).
2092
2093 2013-04-25 Claire Dross <dross@adacore.com>
2094
2095 * a-cfhase.adb, a-cfhase.ads, a-cforma.adb, a-cforma.ads, a-cfhama.adb,
2096 a-cfhama.ads, a-cforse.adb, a-cforse.ads, a-cofove.adb, a-cofove.ads
2097 (Query_Element): Removed.
2098 (Update_Element): Removed.
2099 (Insert): The version with no New_Item specified is removed.
2100 (Iterate): Removed.
2101 (Write): Removed.
2102 (Read): Removed.
2103 Every check of fields Busy and Lock has been removed.
2104
2105 2013-04-25 Robert Dewar <dewar@adacore.com>
2106
2107 * sem_prag.adb (Analyze_Pragma, case Contract_Cases): Remove
2108 call to S14_Pragma (Find_Related_Subprogram): Require proper
2109 placement in subprogram body (Find_Related_Subprogram): Detect
2110 duplicates for all cases (Find_Related_Subprogram): Handle case
2111 of spec nested inside body.
2112
2113 2013-04-25 Arnaud Charlet <charlet@adacore.com>
2114
2115 * par-prag.adb: Fix typo.
2116
2117 2013-04-25 Hristian Kirtchev <kirtchev@adacore.com>
2118
2119 * checks.adb (Apply_Predicate_Check): If the type has a static
2120 predicate and the expression is also static, check whether the
2121 expression satisfies the predicate.
2122 * sem_ch3.adb (Analyze_Object_Declaration): If the type has a
2123 static predicate and the expression is also static, see if the
2124 expression satisfies the predicate.
2125 * sem_util.adb: Alphabetize several routines.
2126 (Check_Expression_Against_Static_Predicate): New routine.
2127 * sem_util.ads (Check_Expression_Against_Static_Predicate): New routine.
2128
2129 2013-04-25 Robert Dewar <dewar@adacore.com>
2130
2131 * gnat_rm.texi: Document Reason argument for pragma Warnings.
2132 * par-prag.adb: Handle Reason parameter for pragma Warnings.
2133 * sem_prag.adb (Analyze_Pragma, case Warnings): Allow Reason argument.
2134 * snames.ads-tmpl (Name_Reason): New name entry.
2135
2136 2013-04-25 Yannick Moy <moy@adacore.com>
2137
2138 * exp_spark.adb (Expand_SPARK_N_In): Remove procedure.
2139 (Expand_SPARK): Remove special expansion for membership tests.
2140
2141 2013-04-25 Hristian Kirtchev <kirtchev@adacore.com>
2142
2143 * exp_ch3.adb (Expand_N_Object_Declaration): Update all places
2144 that should use constant Base_Typ. When building an invariant
2145 check, account for invariants coming from the base type. Prevent
2146 the creation of a junk invariant check when the related object
2147 is of an array type and it is initialized with an aggregate.
2148 * exp_util.adb (Make_Invariant_Call): Typ is now a variable. Use
2149 the base type to create an invariant call when the type of the
2150 expression is a composite subtype.
2151
2152 2013-04-25 Vasiliy Fofanov <fofanov@adacore.com>
2153
2154 * a-cborse.adb: Fix minor typo.
2155
2156 2013-04-25 Ed Schonberg <schonberg@adacore.com>
2157
2158 * sem_ch6.adb (Different_Generic_Profile): A spec and body
2159 match in an instance if a subtype declaration that renames a
2160 generic actual with the same name appears between spec and body.
2161
2162 2013-04-25 Robert Dewar <dewar@adacore.com>
2163
2164 * sem_util.adb: Minor reformatting.
2165
2166 2013-04-25 Ed Schonberg <schonberg@adacore.com>
2167
2168 * exp_aggr.adb (Expand_N_Aggregate): Use special circuitry to
2169 fold strings with a single others choice only if there are no
2170 expressions in the aggregate.
2171
2172 2013-04-25 Arnaud Charlet <charlet@adacore.com>
2173
2174 * gnat_ugn.texi: Update doc on Ada 2012 default mode.
2175
2176 2013-04-25 Hristian Kirtchev <kirtchev@adacore.com>
2177
2178 * exp_ch6.adb: Add with and use clause for Stringt.
2179 (Expand_Contract_Cases): Moved from sem_ch6. Add formal parameters
2180 Decls and Stmts along with comments on their usage.
2181 * exp_ch6.ads (Expand_Contract_Cases): Moved from sem_ch6.
2182 * sem_ch6.adb (Expand_Contract_Cases): Moved to exp_ch6.
2183 (Process_Contract_Cases): Update the call to Expand_Contract_Cases.
2184
2185 2013-04-25 Ed Schonberg <schonberg@adacore.com>
2186
2187 * gnat_rm.texi: Minor editing, to clarify use of dimension aspects.
2188 * sem_util.adb (Is_OK_Variable_For_Out_Formal): Reject an
2189 aggregate for a packed type, which may be converted into an
2190 unchecked conversion of an object.
2191
2192 2013-04-25 Robert Dewar <dewar@adacore.com>
2193
2194 * sem_prag.adb: Minor code reorganization (correct misspelling
2195 Restiction).
2196 * sem_util.adb, aspects.ads, sem_ch6.adb: Minor reformatting.
2197 * gnat_rm.texi: Document impl-defined aspects.
2198 * sem_dim.adb, sem_dim.ads, gnat_ugn.texi, s-dimmks.ads: Minor
2199 reformatting.
2200
2201 2013-04-25 Hristian Kirtchev <kirtchev@adacore.com>
2202
2203 * einfo.adb (Set_Abstract_States): The attribute now applies
2204 to generic packages.
2205 * sem_ch4.adb (Referenced): Moved to sem_util.
2206 * sem_ch7.adb (Unit_Requires_Body): A [generic] package with
2207 a non-null abstract state needs a body.
2208 * sem_prag.adb (Analyze_Depends_In_Decl_Part): Update the calls
2209 to Collect_Subprogram_Inputs_Outputs.
2210 (Analyze_Global_Item): Verify the proper usage of an item with mode
2211 In_Out or Output relative to the enclosing context.
2212 (Analyze_Pragma): Abstract_State can now be applied to a generic
2213 package. Do not reset the Analyzed flag for pragmas Depends and Global
2214 as this is not needed.
2215 (Appears_In): Moved to library level.
2216 (Check_Mode_Restiction_In_Enclosing_Context): New routine.
2217 (Collect_Subprogram_Inputs_Outputs): Moved to library level. Add
2218 formal parameters Subp_Id, Subp_Inputs, Subp_Outputs and Global
2219 seen along with comments on usage.
2220 * sem_util.ads, sem_util.adb (Referenced): New routine.
2221
2222 2013-04-25 Hristian Kirtchev <kirtchev@adacore.com>
2223
2224 * sem_ch6.adb (Expand_Contract_Cases): Generate
2225 detailed error messages only when switch -gnateE is in effect.
2226
2227 2013-04-25 Yannick Moy <moy@adacore.com>
2228
2229 * sem_attr.adb (Analyze_Attribute): Do not issue
2230 an error for a possibly misplaced 'Result or 'Old attribute when
2231 analyzing the aspect.
2232
2233 2013-04-25 Robert Dewar <dewar@adacore.com>
2234
2235 * sem_ch12.adb, sem_util.adb, sem_ch4.adb: Minor reformatting.
2236
2237 2013-04-25 Hristian Kirtchev <kirtchev@adacore.com>
2238
2239 * sem_ch4.adb (Analyze_Quantified_Expression):
2240 Add local variable Loop_Id. Verify that the loop variable
2241 is used within the condition of the quantified expression.
2242 (Referenced): New routine.
2243
2244 2013-04-25 Hristian Kirtchev <kirtchev@adacore.com>
2245
2246 * sem_case.adb (Analyze_Choices): Enhance the error message
2247 given on a bad use of subtype predicate.
2248 * sem_ch5.adb (Analyze_Loop_Parameter_Specification): Enhance
2249 the error message given on a bad use of subtype predicate.
2250 * sem_util.adb (Bad_Predicated_Subtype_Use): Add formal parameter
2251 Suggest_Static. Emit an extra error message advising how to
2252 remedy the bad use of the predicate if the context warrants it.
2253 * sem_util.ads (Bad_Predicated_Subtype_Use): Add formal parameter
2254 Suggest_Static along with a comment explaining its usage.
2255
2256 2013-04-25 Ed Schonberg <schonberg@adacore.com>
2257
2258 * sem_disp.adb (Check_Dispatching_Operation): Further refinement
2259 to checks for AI05-0125: the check for a hidden primitive that
2260 may be overridden by the new declaration only applies if the
2261 hidden operation is never declared. This is not the case if the
2262 operation is declared in a parent unit.
2263
2264 2013-04-25 Robert Dewar <dewar@adacore.com>
2265
2266 * debug.adb: Remove d.X and d.Y entries and documentation.
2267 * exp_ch4.adb (Expand_N_If_Expression): Remove special code used
2268 if expression with actions not available (now always available).
2269 (Expand_Short_Circuit_Operator): Same change.
2270 * gnat1drv.adb (Adjust_Global_Switches) Remove setting
2271 Use_Expression_With_Actions flag, since this is now obsolete.
2272 * opt.ads (Use_Expression_Actions): Removed (always True now).
2273 * sinfo.ads: Minor comment updates.
2274
2275 2013-04-25 Ed Schonberg <schonberg@adacore.com>
2276
2277 * sem_ch12.adb (Check_Generic_Actuals): If an actual is an array
2278 subtype whose base type is currently private, install full view
2279 when compiling instance body.
2280
2281 2013-04-25 Ed Schonberg <schonberg@adacore.com>
2282
2283 * sem_disp.adb (Check_Dispatching_Operation): Refine checks for
2284 AI05-0125: the check for a hidden primitive that may be overridden
2285 by the new declaration is only performed if the declaration comes
2286 from source, and it must carry an explicit overriding indicator.
2287
2288 2013-04-25 Hristian Kirtchev <kirtchev@adacore.com>
2289
2290 * einfo.adb (Abstract_States): The attribute now applies to
2291 generic packages.
2292 * sem_ch3.adb (Analyze_Object_Declaration): Check whether an
2293 object declaration introduces an illegal hidden state.
2294 * sem_prag.adb (Analyze_Abstract_State): Check whether a state
2295 declaration introduces an illegal hidden state.
2296 * sem_util.ads, sem_util.adb (Check_No_Hidden_State): New routine.
2297
2298 2013-04-25 Ed Schonberg <schonberg@adacore.com>
2299
2300 * exp_ch6.adb (Is_Build_In_Place_Function_Call): The call may
2301 be to a protected function, in which case the name in the call
2302 is a selected component.
2303
2304 2013-04-25 Hristian Kirtchev <kirtchev@adacore.com>
2305
2306 * sem_ch4.adb (Analyze_Quantified_Expression):
2307 Warn on a suspicious use of quantifier "some" when "all" was meant.
2308 (No_Else_Or_Trivial_True): New routine.
2309
2310 2013-04-25 Robert Dewar <dewar@adacore.com>
2311
2312 * einfo.ads, einfo.adb: Put back with/use for Namet.
2313 (Get_Pragma): New name (wi new spec) for Find_Pragma.
2314 * sem_ch6.adb: Change name Find_Pragma to Get_Pragma with
2315 different interface.
2316
2317 2013-04-25 Ed Schonberg <schonberg@adacore.com>
2318
2319 * sem_ch3.adb (Is_Visible_Component): In an instance all
2320 components are visible.
2321
2322 2013-04-25 Matthew Heaney <heaney@adacore.com>
2323
2324 * a-rbtgbo.adb, a-crbtgo.adb (Generic_Equal): do not test for
2325 tampering when container empty.
2326 * a-crbtgk.adb (Ceiling, Find, Floor): ditto.
2327 (Generic_Conditional_Insert, Generic_Conditional_Insert_With_Hint):
2328 ditto.
2329
2330 2013-04-25 Ed Schonberg <schonberg@adacore.com>
2331
2332 * par-ch12.adb: Move aspects from package specification to
2333 generic package declaration.
2334 * sem_ch12.adb: Analyze aspect specifications before building
2335 and analyzing the generic copy, so that the generated pragmas
2336 are properly taken into account.
2337 * sem_ch13.adb: For compilation unit aspects that apply to a
2338 generic package declaration, insert corresponding pragmas ahead
2339 of visible declarations.
2340 * sprint.adb: Display properly the aspects of a generic type
2341 declaration.
2342
2343 2013-04-25 Robert Dewar <dewar@adacore.com>
2344
2345 * frontend.adb: Minor reformatting.
2346
2347 2013-04-25 Ed Schonberg <schonberg@adacore.com>
2348
2349 * einfo.ads: Extend documentation on use of Is_Private_Ancestor
2350 for untagged types.
2351 * sem_ch3.adb (Is_Visible_Component): Refine predicate for the
2352 case of untagged types derived from private types, to reject
2353 illegal selected components.
2354
2355 2013-04-25 Gary Dismukes <dismukes@adacore.com>
2356
2357 * sem_util.adb (Is_Dependent_Component_Of_Mutable_Object): Test
2358 for case of selecting from an unexpanded implicit dereference
2359 and do not make a recursive call on such a prefix.
2360
2361 2013-04-25 Doug Rupp <rupp@adacore.com>
2362
2363 * targparm.adb (VXF{_Str}): New tag for vaxfloat.
2364 (Get_Target_Parameters): Handle VXF tag.
2365 * targparm.ads (VAX_Float_On_Target): New boolean.
2366 * system-vms-ia64.ads (VAX_Float): New boolean.
2367 * frontend.adb (Frontend): Handle VAX float boolean.
2368
2369 2013-04-25 Hristian Kirtchev <kirtchev@adacore.com>
2370
2371 * einfo.ads, einfo.adb: Remove with and use clauses for Namet.
2372 (Find_Pragma): New routine.
2373 * sem_util.ads, sem_util.adb (Find_Pragma): Moved to einfo.
2374
2375 2013-04-25 Hristian Kirtchev <kirtchev@adacore.com>
2376
2377 * sem_ch13.adb (Add_Call): Do not capture the nature of the inherited
2378 predicate.
2379 (Add_Predicates): Save the static predicate for diagnostics and error
2380 reporting purposes.
2381 (Process_PPCs): Remove local variables Dynamic_Predicate_Present and
2382 Static_Predicate_Present. Add local variable Static_Pred. Ensure that
2383 the expression of a static predicate is static.
2384
2385 2013-04-25 Hristian Kirtchev <kirtchev@adacore.com>
2386
2387 * einfo.adb (Is_Ghost_Subprogram): Remove useless code.
2388
2389 2013-04-25 Robert Dewar <dewar@adacore.com>
2390
2391 * gnat_rm.texi: Minor addition of index entry.
2392
2393 2013-04-25 Hristian Kirtchev <kirtchev@adacore.com>
2394
2395 * sem_ch6.adb (Check_Access_Invariants): Test whether an
2396 invariant procedure is empty before generating a call to it.
2397 (Has_Enabled_Predicate): New routine.
2398 (Has_Null_Body): New routine.
2399 (Process_PPCs): Test whether an invariant procedure is
2400 empty before generating a call to it. Test whether predicates are
2401 enabled for a particular type before generating a predicate call.
2402 * sem_util.ads, sem_util.adb (Find_Pragma): New routine.
2403
2404 2013-04-25 Robert Dewar <dewar@adacore.com>
2405
2406 * sem_ch7.adb, einfo.adb, repinfo.adb, snames.adb-tmpl,
2407 snames.ads-tmpl: Minor reformatting.
2408
2409 2013-04-25 Thomas Quinot <quinot@adacore.com>
2410
2411 * sem_ch7.adb: Minor reformatting.
2412
2413 2013-04-25 Robert Dewar <dewar@adacore.com>
2414
2415 * gnat_rm.texi: Minor fix to Loop_Variant doc (Loop_Entry allowed).
2416 * s-tarest.adb: Minor reformatting.
2417
2418 2013-04-25 Hristian Kirtchev <kirtchev@adacore.com>
2419
2420 * aspects.ads, aspects.adb: Remove aspect Ghost from all relevant
2421 tables.
2422 * einfo.adb: Remove with and use clause for Aspects.
2423 (Is_Ghost_Function): Removed.
2424 (Is_Ghost_Entity): New routine.
2425 (Is_Ghost_Subprogram): New routine.
2426 * einfo.ads: Remove synthesized attribute Is_Ghost_Function
2427 along with its uses in entities. Add synthesized attributes
2428 Is_Ghost_Entity and Is_Ghost_Subprogram along with uses in related
2429 entities.
2430 (Is_Ghost_Function): Removed.
2431 (Is_Ghost_Entity): New routine.
2432 (Is_Ghost_Subprogram): New routine.
2433 * par-prag.adb: Remove pragma Ghost from the processing machinery.
2434 * repinfo.adb (List_Mechanisms): Add a value for convention Ghost.
2435 * sem_attr.adb (Analyze_Access_Attribute): Update the check
2436 for ghost subprograms.
2437 * sem_ch4.adb (Analyze_Call): Update the check for calls
2438 to ghost subprograms.
2439 (Check_Ghost_Function_Call): Removed.
2440 (Check_Ghost_Subprogram_Call): New routine.
2441 * sem_ch6.adb (Check_Convention): Rewritten.
2442 (Check_Overriding_Indicator): Remove the check for overriding
2443 ghost functions.
2444 (Convention_Of): New routine.
2445 * sem_ch12.adb (Preanalyze_Actuals): Update the check for ghost
2446 generic actual subprograms.
2447 * sem_mech.adb (Set_Mechanisms): Add an entry for convention Ghost.
2448 * sem_prag.adb: Remove the value for pragma Ghost from
2449 table Sig_Flags.
2450 (Analyze_Pragma): Remove the processing for pragma Ghost.
2451 (Process_Convention): Emit an error when a ghost
2452 subprogram attempts to override.
2453 (Set_Convention_From_Pragma): Emit an error when a ghost subprogram
2454 attempts to override.
2455 * sinfo.ads: Clarify the usage of field Label_Construct.
2456 * snames.adb-tmpl (Get_Convention_Id): Add an entry for
2457 predefined name Ghost.
2458 (Get_Convention_Name): Add an entry for convention Ghost.
2459 * snames.ads-tmpl: Move predefined name Ghost to the sublist
2460 denoting conventions. Add convention id Ghost. Remove pragma
2461 id Ghost.
2462
2463 2013-04-25 Ed Schonberg <schonberg@adacore.com>
2464
2465 * sem_ch7.adb (Swap_Private_Dependents): Do no recurse on child
2466 units if within a generic hierarchy.
2467
2468 2013-04-24 Hristian Kirtchev <kirtchev@adacore.com>
2469
2470 * exp_ch6.adb (Expand_Actuals): Add a predicate check on an
2471 actual the related type has a predicate function.
2472 * sem_ch3.adb (Constant_Redeclaration): Ensure that the related
2473 type has an invariant procedure before building a call to it.
2474 * sem_ch6.adb (Append_Enabled_Item): New routine.
2475 (Check_Access_Invariants): Use routine
2476 Append_Enabled_Item to chain onto the list of postconditions.
2477 (Contains_Enabled_Pragmas): Removed.
2478 (Expand_Contract_Cases): Use routine Append_Enabled_Item to chain onto
2479 the list of postconditions.
2480 (Invariants_Or_Predicates_Present): Removed.
2481 (Process_PPCs): Partially reimplemented.
2482
2483 2013-04-24 Sergey Rybin <rybin@adacore.com frybin>
2484
2485 * tree_io.ads: Update ASIS_Version_Number because of changes
2486 in the way how entities are chained in a scope by means of
2487 Next_Entity link.
2488
2489 2013-04-24 Ed Schonberg <schonberg@adacore.com>
2490
2491 * exp_ch13.adb (Expand_N_Attribute_Definition_Clause, case
2492 Storage_Size): If the clause is not from an aspect, insert
2493 assignment to size variable of task type at the point of the
2494 clause, not after the task definition, to prevent access before
2495 elaboration in the back-end.
2496
2497 2013-04-24 Yannick Moy <moy@adacore.com>
2498
2499 * sem_prag.adb (Sig_Flags): Set correct value for Pragma_Assume.
2500
2501 2013-04-24 Yannick Moy <moy@adacore.com>
2502
2503 * gnat_rm.texi: Document 'Loop_Entry.
2504
2505 2013-04-24 Jose Ruiz <ruiz@adacore.com>
2506
2507 * s-tassta.adb, s-tarest.adb (Task_Wrapper): Start looking for
2508 fall-back termination handlers from the parents, because they apply
2509 only to dependent tasks.
2510 * s-solita.adb (Task_Termination_Handler_T): Do not look for fall-back
2511 termination handlers because the environment task has no parent,
2512 and if it defines one of these handlers it does not apply to
2513 itself because they apply only to dependent tasks.
2514
2515 2013-04-24 Robert Dewar <dewar@adacore.com>
2516
2517 * sem_type.adb, exp_attr.adb, exp_ch4.adb: Minor reformatting.
2518
2519 2013-04-24 Robert Dewar <dewar@adacore.com>
2520
2521 * gnat_rm.texi: Document 'Update attribute.
2522 * sem_attr.adb (Analyze_Attribute, case Update): Remove call
2523 to S14_Attribute (S14_Attribute): removed.
2524
2525 2013-04-24 Robert Dewar <dewar@adacore.com>
2526
2527 * interfac.ads: Add size clauses for IEEE_Float_32/64
2528
2529 2013-04-24 Claire Dross <dross@adacore.com>
2530
2531 * gnat1drv.adb (Adjust_Global_Switches): Remove
2532 special assignment of Use_Expression_With_Actions for SPARK_Mode.
2533
2534 2013-04-24 Hristian Kirtchev <kirtchev@adacore.com>
2535
2536 * checks.adb (Apply_Predicate_Check): Check for the presence
2537 of the dynamic predicate aspect when trying to determine if the
2538 predicate of a type is non-static.
2539 * sem_ch5.adb (Analyze_Loop_Parameter_Specification): Check
2540 for the presence of the dynamic predicate aspect when trying to
2541 determine if the predicate of a type is non- static.
2542 * sem_ch13.adb (Add_Call): Capture the nature of the
2543 inherited ancestor predicate.
2544 (Build_Predicate_Functions): Update comments. Rewrite the checks on
2545 static predicate application. Complain about the form of a non-static
2546 expression only when the type is static.
2547
2548 2013-04-24 Ed Schonberg <schonberg@adacore.com>
2549
2550 * sem_prag.adb: Add guard to tree traversal.
2551
2552 2013-04-24 Vincent Celier <celier@adacore.com>
2553
2554 * clean.adb (Clean): Remove local variable Root_Environment,
2555 use Makeutl.Root_Environment instead.
2556 * gnatcmd.adb: Remove local variable Root_Environment, use
2557 Makeutl.Root_Environment instead.
2558 * make.adb (Gnatmake): Remove local variable Root_Environment,
2559 use Makeutl.Root_Environment instead.
2560 * prj-makr.adb: Remove local variable Root_Environment, use
2561 Makeutl.Root_Environment instead.
2562
2563 2013-04-24 Hristian Kirtchev <kirtchev@adacore.com>
2564
2565 * exp_attr.adb (Expand_Loop_Entry_Attribute): Clarify the
2566 extraction of the declarative part of the conditional block. Move
2567 the processing of simple infinite loops to the start of the
2568 expansion logic. Correct the check which determines whether the
2569 proper scope is installed in visibility.
2570 * sem_attr.adb (Analyze_Attribute): Add local variable Attr
2571 to keep track of the attribute in case the enclosing indexed
2572 component has to be rewritten. When searching for the enclosing
2573 loop, start from the proper attribute reference in case of a
2574 rewriting. Do not allow for 'Loop_Entry to appear in pragma
2575 Assert. Replace loop variable J with Index. Set the type of the
2576 proper attribute.
2577 * sem_ch5.adb (Check_Unreachable_Code): Detect a specialized
2578 block that services a loop statement subject to at least one
2579 'Loop_Entry attribute.
2580
2581 2013-04-24 Ed Schonberg <schonberg@adacore.com>
2582
2583 * sem_type.adb (Disambiguate): In Ada 2012 mode, when trying to
2584 resolve a fixed point operation, use first subtype to determine
2585 whether type and operator are declared in the same list of
2586 declarations.
2587
2588 2013-04-24 Hristian Kirtchev <kirtchev@adacore.com>
2589
2590 * par-ch6.adb (P_Subprogram): Detect an illegal
2591 placement of the aspect specification list in the context of
2592 expression functions.
2593
2594 2013-04-24 Ed Schonberg <schonberg@adacore.com>
2595
2596 * exp_ch4.adb (Expand_N_Allocator): If the designated object
2597 has tasks, and the pointer type is an itype that has no master
2598 id, create a master renaming in the current context, which can
2599 only be an init_proc.
2600
2601 2013-04-24 Robert Dewar <dewar@adacore.com>
2602
2603 * sem_ch3.adb, sem_ch7.adb: Minor reformatting.
2604 * gnat_rm.texi: Document pragma Loop_Invariant.
2605 * sem_attr.adb (Analyze_Attribute, case Loop_Entry): This is
2606 no longer an S14_Attribute.
2607 * sem_prag.adb (Analyze_Pragma, case Loop_Invariant): Combine
2608 processing with Assert, allow message parameter, remove call
2609 to S14_Pragma.
2610
2611 2013-04-24 Thomas Quinot <quinot@adacore.com>
2612
2613 * exp_ch4.adb: Minor reformatting.
2614
2615 2013-04-24 Ed Schonberg <schonberg@adacore.com>
2616
2617 * sem_ch7.adb (Swap_Private_Dependents): New internal routine
2618 to Install_Private_Declarations, to make the installation of
2619 private dependents recursive in the presence of child units.
2620 * sem_ch3.adb (Build_Discriminated_Subtype): Initialize properly
2621 the Private_Dependents of a private subtype.
2622
2623 2013-04-24 Hristian Kirtchev <kirtchev@adacore.com>
2624
2625 * exp_attr.adb (Expand_Loop_Entry_Attribute): Update the
2626 retrieval of the block declarations.
2627 * par-ch4.adb (P_Name): Let the name parsing machinery create
2628 a sequence of nested indexed components for attribute Loop_Entry.
2629 * sem_attr.adb (Analyze_Attribute): Add local constant
2630 Context. Reimplement part of the analysis of attribute Loop_Entry.
2631 (Convert_To_Indexed_Component): Removed.
2632 * sem_ch4.adb (Analyze_Indexed_Component_Form): Do not analyze
2633 an indexed component after it has been rewritten into attribute
2634 Loop_Entry.
2635
2636 2013-04-24 Yannick Moy <moy@adacore.com>
2637
2638 * snames.ads-tmpl: Minor change to list
2639 Loop_(In)variant not in configuration pragma.
2640 * sem_ch3.adb (Analyze_Declarations): Do not look at the original node
2641 for analyzing the expressions in pre/postconditions.
2642
2643 2013-04-24 Robert Dewar <dewar@adacore.com>
2644
2645 * gnatcmd.adb, xref_lib.adb, gnatls.adb, sem_ch13.adb: Minor
2646 reformatting.
2647
2648 2013-04-24 Yannick Moy <moy@adacore.com>
2649
2650 * sem_ch6.adb (Analyze_Generic_Subprogram_Body,
2651 Analyze_Subprogram_Body_Helper): Reset contract node to Empty
2652 before setting entity to E_Subprogram_Body.
2653 * sem_ch8.adb (Analyze_Subprogram_Renaming): Reset contract node to
2654 Empty before setting entity to E_Subprogram_Body.
2655
2656 2013-04-24 Vincent Celier <celier@adacore.com>
2657
2658 * gnat_ugn.texi: Document new gnatls switch -aPdir.
2659 * gnatcmd.adb: Pass switch -aP<dir> to gnatls.
2660 * gnatls.adb (Scan_Ls_Arg): Process new switch -aP<dir>. Issue
2661 a warning for unknown switches.
2662 (Usage): Add line for new switch -aPdir.
2663
2664 2013-04-24 Ed Schonberg <schonberg@adacore.com>
2665
2666 * sem_util.adb, sem_util.ads (Is_Limited_Class_Wide_Type): Return true
2667 if the type comes from a limited view, so that task attributes can be
2668 constructed.
2669
2670 2013-04-24 Yannick Moy <moy@adacore.com>
2671
2672 * checks.adb (Apply_Float_Conversion_Check): Do not apply checks if
2673 full expansion is not enabled.
2674
2675 2013-04-24 Ed Schonberg <schonberg@adacore.com>
2676
2677 * sem_ch6.adb (Create_Extra_Formals): In Ada 2012, create extra
2678 formals if the type does not yet have a completion, and thus
2679 has no underlying view.
2680
2681 2013-04-24 Ed Schonberg <schonberg@adacore.com>
2682
2683 * sem_ch13.adb (Analyze_Aspect_Specifications): Treat an aspect
2684 specification for Address as a reference, to suppress warnings
2685 on entities that may be read by an external device.
2686
2687 2013-04-24 Sergey Rybin <rybin@adacore.com frybin>
2688
2689 * gnat_ugn.texi: Add description of '--help' and '--version'
2690 options for ASIS tools: gnatelim, gnatmetric, gnatstub, gnatpp.
2691
2692 2013-04-24 Arnaud Charlet <charlet@adacore.com>
2693
2694 * gnat_rm.texi: Minor syntax fix.
2695
2696 2013-04-24 Hristian Kirtchev <kirtchev@adacore.com>
2697
2698 * exp_attr.adb (Expand_Loop_Entry_Attribute): Add extra comments on
2699 what and why is being analyzed. Remove the decoration of renamings as
2700 this simply falls out of the general analysis mechanism.
2701
2702 2013-04-24 Hristian Kirtchev <kirtchev@adacore.com>
2703
2704 * sem_res.adb (Explain_Redundancy): New routine.
2705 (Resolve_Equality_Op): Place the error concerning a redundant
2706 comparison to True at the "=". Try to explain the nature of the
2707 redundant True.
2708
2709 2013-04-24 Javier Miranda <miranda@adacore.com>
2710
2711
2712 * checks.adb, exp_ch6.adb (Install_Null_Excluding_Check): No
2713 check in interface thunks since it is performed at the caller
2714 side.
2715 (Expand_Simple_Function_Return): No accessibility check
2716 needed in thunks since the check is done by the target routine.
2717
2718 2013-04-24 Vincent Celier <celier@adacore.com>
2719
2720 * xref_lib.adb (Add_Entity): Use the canonical file names
2721 so that source file names with capital letters are found on
2722 platforms where file names are case insensitive.
2723
2724 2013-04-24 Hristian Kirtchev <kirtchev@adacore.com>
2725
2726 * par-ch4.adb (P_Name): Continue to parse the name extension when the
2727 construct is attribute Loop_Entry. Do not convert the attribute
2728 reference into an indexed component when there is at least one
2729 expression / range following 'Loop_Entry.
2730
2731 2013-04-24 Hristian Kirtchev <kirtchev@adacore.com>
2732
2733 * sem_ch6.adb (Contains_Enabled_Pragmas): New routine.
2734 (Process_PPCs): Generate procedure _Postconditions
2735 only when the context has invariants or predicates or enabled
2736 aspects/pragmas.
2737
2738 2013-04-24 Thomas Quinot <quinot@adacore.com>
2739
2740 * g-socket.adb (Host_Entry): Introduce intermediate copy of
2741 memory location pointed to by Hostent_H_Addr, as it might not
2742 have sufficient alignment.
2743
2744 2013-04-24 Yannick Moy <moy@adacore.com>
2745
2746 * repinfo.adb (List_Rep_Info): Set the value of Unit_Casing before
2747 calling subprograms which may read it.
2748
2749 2013-04-24 Hristian Kirtchev <kirtchev@adacore.com>
2750
2751 * einfo.adb: Remove Loop_Entry_Attributes from the usage of
2752 nodes. Flag 260 is now used.
2753 (Has_Loop_Entry_Attributes): New routine.
2754 (Loop_Entry_Attributes): Removed.
2755 (Set_Has_Loop_Entry_Attributes): New routine.
2756 (Set_Loop_Entry_Attributes): Removed.
2757 (Write_Entity_Flags): Write out Flag 260.
2758 (Write_Field10_Name): Remove the output for Loop_Entry_Attributes.
2759 * einfo.ads: Remove attribute Loop_Entry_Attributes,
2760 its related comment and uses in nodes. Add new attribute
2761 Has_Loop_Entry_Attributes, related comment and uses in loop nodes.
2762 (Has_Loop_Entry_Attributes): New routine and pragma Inline.
2763 (Loop_Entry_Attributes): Removed along with pragma Inline.
2764 (Set_Has_Loop_Entry_Attributes): New routine and pragma Inline.
2765 (Set_Loop_Entry_Attributes): Removed along with pragma Inline.
2766 * exp_attr.adb (Expand_Loop_Entry_Attribute): New routine.
2767 (Expand_N_Attribute_Reference): Expand attribute 'Loop_Entry.
2768 * exp_ch5.adb: Remove with and use clause for Elists.
2769 (Expand_Loop_Entry_Attributes): Removed.
2770 (Expand_N_Loop_Statement): Add local variable Stmt. Rename local
2771 constant Isc to Scheme. When a loop is subject to attribute
2772 'Loop_Entry, retrieve the nested loop from the conditional
2773 block. Move the processing of controlled object at the end of
2774 loop expansion.
2775 * sem_attr.adb (Analyze_Attribute): Do not chain attribute
2776 'Loop_Entry to its related loop.
2777 * sem_ch5.adb (Analyze_Loop_Statement): Add local variable
2778 Stmt. When the iteration scheme mentions attribute 'Loop_Entry,
2779 the entire loop is rewritten into a block. Retrieve the nested
2780 loop in such cases to complete the analysis.
2781 * sem_util.ads, sem_util.adb (Find_Loop_In_Conditional_Block): New
2782 routine.
2783 (Subject_To_Loop_Entry_Attributes): New routine.
2784
2785 2013-04-24 Robert Dewar <dewar@adacore.com>
2786
2787 * exp_prag.adb (Expand_Loop_Variant): Generate pragma Check
2788 (Loop_Variant, xxx) rather than Assert (xxx).
2789 * gnat_rm.texi: Document pragma Loop_Variant.
2790 * sem_prag.adb (Analyze_Pragma, case Loop_Variant): Remove call
2791 to S14_Pragma.
2792
2793 2013-04-24 Yannick Moy <moy@adacore.com>
2794
2795 * adabkend.adb, ali-util.adb, ali.adb, debug.adb,
2796 errout.adb, errout.ads, erroutc.adb, exp_ch3.adb, exp_ch4.adb,
2797 exp_ch6.adb, exp_ch7.adb, exp_dbug.adb, exp_util.adb,
2798 expander.adb, freeze.adb, gnat1drv.adb, lib-writ.adb,
2799 lib-writ.ads, lib-xref.adb, lib-xref.ads, opt.adb, opt.ads,
2800 restrict.adb, sem_aggr.adb, sem_attr.adb, sem_ch3.adb,
2801 sem_ch4.adb, sem_ch5.adb, sem_ch6.adb, sem_eval.adb, sem_prag.adb,
2802 sem_res.adb, sem_util.adb: Everything with name
2803 'Alfa' renamed in 'SPARK'. Update comments.
2804 Renaming of units with name 'Alfa', renamed with 'SPARK' instead.
2805 * exp_alfa.adb: renamed exp_spark.adb.
2806 * exp_alfa.ads: renamed exp_spark.ads.
2807 * get_alfa.adb: renamed get_spark_xrefs.adb.
2808 * get_alfa.ads: renamed get_spark_xrefs.ads.
2809 * lib-xref-alfa.adb: renamed lib-xref-spark_specific.adb.
2810 * put_alfa.adb: renamed put_spark_xrefs.adb.
2811 * put_alfa.ads: renamed put_spark_xrefs.ads.
2812 * alfa.adb: renamed spark_xrefs.adb.
2813 * alfa.ads: renamed spark_xrefs.ads.
2814 * alfa_test.adb: renamed spark_xrefs_test.adb.
2815 * gcc-interface/Make-lang.in: Update dependencies.
2816
2817 2013-04-24 Robert Dewar <dewar@adacore.com>
2818
2819 * gnat_rm.texi: Document pragma Assume.
2820 * sem_prag.adb (Analyze_Pragma, case Assume): Now processed as
2821 part of Assert, and no longer requires -gnatd.F
2822
2823 2013-04-24 Robert Dewar <dewar@adacore.com>
2824
2825 * gnat_rm.texi: Document pragma Assert_And_Cut.
2826 * sem_prag.adb (Analyze_Pragma, case Assert_And_Cut): Remove
2827 S14_Pragma call.
2828
2829 2013-04-24 Ed Schonberg <schonberg@adacore.com>
2830
2831 * sem_aux.adb: Add guard in Available_View.
2832
2833 2013-04-24 Hristian Kirtchev <kirtchev@adacore.com>
2834
2835 * sem_prag.adb (Analyze_Depends_In_Decl_Part): Use
2836 Find_Related_Subprogram to find the associated subprogram.
2837 (Analyze_Global_In_Decl_List): Use Find_Related_Subprogram
2838 to find the associated subprogram.
2839 (Analyze_Pragma): Use Find_Related_Subprogram to find the associated
2840 subprogram.
2841
2842 2013-04-24 Hristian Kirtchev <kirtchev@adacore.com>
2843
2844 * exp_ch6.adb: Remove with and use clause for Sem_Prag.
2845 (Freeze_Subprogram): Call Analyze_Subprogram_Contract to analyze
2846 the contract of a subprogram.
2847 * sem_ch3.adb: Remove with and use clause for Sem_Prag.
2848 (Analyze_Declarations): Call Analyze_Subprogram_Contract to
2849 analyze the contract of a subprogram.
2850 * sem_ch6.adb (Analyze_Subprogram_Contract): New routine.
2851 (Check_Subprogram_Contract): Removed.
2852 * sem_ch6.ads (Analyze_Subprogram_Contract): New routine.
2853 (Check_Subprogram_Contract): Removed.
2854 (Expand_Contract_Cases): Add a guard against malformed contract cases.
2855 * sem_ch13.adb (Analyze_Aspect_Specifications): Call
2856 Decorate_Delayed_Aspect_And_Pragma to decorate aspects
2857 Contract_Cases, Depends and Global. Reimplement the analysis of
2858 aspect Contract_Cases.
2859 (Decorate_Delayed_Aspect_And_Pragma): New routine.
2860 * sem_prag.adb (Analyze_Contract_Cases_In_Decl_Part): New routine.
2861 (Analyze_CTC_In_Decl_Part): Removed.
2862 (Analyze_Pragma): Reimplement the analysis of pragma Contract_Cases.
2863 (Analyze_Test_Case_In_Decl_Part): New routine.
2864 (Find_Related_Subprogram): New routine.
2865 (Requires_Profile_Installation): Add new formal Prag. Update
2866 the logic to take into account the origin of the pragma.
2867 * sem_prag.ads (Analyze_Contract_Cases_In_Decl_Part): New routine.
2868 (Analyze_CTC_In_Decl_Part): Removed.
2869 (Analyze_Test_Case_In_Decl_Part): New routine.
2870
2871 2013-04-24 Robert Dewar <dewar@adacore.com>
2872
2873 * sem_prag.adb (Process_Convention): Move Stdcall tests to
2874 Set_Convention_From_Pragma so that they are applied to each
2875 entry of a homonym set.
2876 (Process_Convention): Don't try to set convention if already set.
2877
2878 2013-04-24 Robert Dewar <dewar@adacore.com>
2879
2880 * gnatbind.adb: Minor reformatting.
2881
2882 2013-04-24 Vincent Celier <celier@adacore.com>
2883
2884 * clean.adb (Gnatclean): Add the default project search
2885 directories in the project search path after scanning the
2886 switches on the command line.
2887 (Initialize): Do not put the default project search directories in the
2888 project search path.
2889 * gnatcmd.adb (GNATcmd): Add the default project search
2890 directories in the project search path after scanning the switches
2891 on the command line.
2892 * make.adb (Initialize): Add the default project search
2893 directories in the project search path after scanning the switches
2894 on the command line.
2895
2896 2013-04-24 Yannick Moy <moy@adacore.com>
2897
2898 * restrict.ads (Restriction_Warnings): Initialize with all False value.
2899
2900 2013-04-24 Robert Dewar <dewar@adacore.com>
2901
2902 * checks.ads, checks.adb (Predicate_Checks_Suppressed): New function.
2903 * exp_util.ads, exp_util.adb (Make_Predicate_Check): Check setting of
2904 Predicate_Check.
2905 * snames.ads-tmpl (Name_Predicate_Check): New check name.
2906 * types.ads (Predicate_Check): New definition.
2907 * gnat_rm.texi: Add documentation for Predicate_Check.
2908
2909 2013-04-24 Ed Schonberg <schonberg@adacore.com>
2910
2911 * exp_ch8.adb (Expand_N_Subprogram_Renaming_Declaration): If this
2912 is a renaming of predefined equality for an untagged record,
2913 add generated body to the freeze actions for the subprogram, to
2914 prevent freezing issues when the record has incomplete components.
2915 * exp_ch4.adb (Expand_Composite_Equality): If the type is a type
2916 without completion, return a predefined comparison instead of
2917 just False. This may happen when building the expression for
2918 record equality, when some component has a type whose completion
2919 has not been seen yet. The operation will be analyzed an expanded
2920 after the type has been frozen, at which point all component
2921 types will have been completed, or an error reported.
2922
2923 2013-04-24 Ed Schonberg <schonberg@adacore.com>
2924
2925 * sem_ch13.adb (Analyze_Aspect_Specifications): Do not delay
2926 analysis of a Convention aspect.
2927
2928 2013-04-24 Eric Botcazou <ebotcazou@adacore.com>
2929
2930 * fe.h (Machine_Overflows_On_Target): New macro and declaration.
2931 (Signed_Zeros_On_Target): Likewise.
2932
2933 2013-04-24 Hristian Kirtchev <kirtchev@adacore.com>
2934
2935 * exp_ch6.adb: Add with and use clause for Sem_Prag.
2936 (Freeze_Subprogram): Analyze all delayed aspects for a null
2937 procedure so that they are available when analyzing the
2938 internally-generated _Postconditions routine.
2939 * exp_ch13.adb: Remove with and use clause for Sem_Prag.
2940 (Expand_N_Freeze_Entity): Move the code that analyzes delayed
2941 aspects of null procedures to exp_ch6.Freeze_Subprogram.
2942 * sem_prag.adb (Analyze_Abstract_State): Update the check on
2943 volatile requirements.
2944
2945 2013-04-24 Bob Duff <duff@adacore.com>
2946
2947 * ali-util.ads (Source_Record): New component Stamp_File
2948 to record from whence the Stamp came.
2949 * ali-util.adb (Set_Source_Table): Set Stamp_File component.
2950 * bcheck.adb (Check_Consistency): Print additional information in
2951 Verbose_Mode.
2952 * gnatbind.adb (Gnatbind): Print additional information in
2953 Verbose_Mode.
2954
2955 2013-04-24 Robert Dewar <dewar@adacore.com>
2956
2957 * exp_ch13.adb, sem_prag.adb: Update comments.
2958 * sem_ch3.adb, exp_ch9.adb, g-socket.adb, sem_ch13.adb: Minor
2959 reformatting.
2960
2961 2013-04-24 Doug Rupp <rupp@adacore.com>
2962
2963 * vms_data.ads (/{NO}INHIBIT-EXEC): Document new default behavior.
2964
2965 2013-04-24 Yannick Moy <moy@adacore.com>
2966
2967 * sinfo.ads: Minor correction of typo.
2968
2969 2013-04-24 Ed Schonberg <schonberg@adacore.com>
2970
2971 * sem_ch3.adb: Create packed array only when expander is
2972 active.
2973
2974 2013-04-24 Hristian Kirtchev <kirtchev@adacore.com>
2975
2976 * sem_prag.adb (Analyze_Depends_In_Decl_Part): Install the formals only
2977 when the context warrants it.
2978 (Analyze_Global_In_Decl_List): Install the formals only when
2979 the context warrants it.
2980 (Requires_Profile_Installation): New routine.
2981
2982 2013-04-24 Ed Schonberg <schonberg@adacore.com>
2983
2984 * exp_ch6.adb (Expand_N_Simple_Return_Statement): When the return
2985 type is a discriminated private type that does not require use
2986 of the secondary stack, a constrained subtype of the underlying
2987 type is created to convey the proper object size to the backend.
2988 If the return type is originally a private type, the return
2989 expression is wrapped in an unchecked_conversion. If the return
2990 expression is used subsequently in a call to the postcondition
2991 function, this conversion must be undone to prevent a spurious
2992 error on the analysis of that call.
2993
2994 2013-04-23 Kai Tietz <ktietz@redhat.com>
2995
2996 PR target/55445
2997 * raise-gcc.c (__SEH__): Additional check that SjLj isn't active.
2998
2999 2013-04-23 Eric Botcazou <ebotcazou@adacore.com>
3000 Pascal Obry <obry@adacore.com>
3001
3002 * gcc-interface/Makefile.in (targ): Fix target name check.
3003 (../../gnatmake$(exeext)): Add '+' for LTO.
3004 (../../gnatlink$(exeext)): Likewise.
3005
3006 2013-04-23 Hristian Kirtchev <kirtchev@adacore.com>
3007
3008 * exp_ch9.adb (Build_PPC_Wrapper): Correct the traversal of
3009 pre- and post-conditions.
3010 (Expand_N_Task_Type_Declaration):
3011 Use the correct attribute to check for pre- and post-conditions.
3012 * exp_ch13.adb (Expand_N_Freeze_Entity): Correct the traversal of
3013 pre- and post-conditions. Analyze delayed classification items.
3014 * freeze.adb (Freeze_Entity): Use the correct attribute to
3015 check for pre- and post- conditions.
3016 * sem_ch3.adb (Analyze_Declarations): Correct the traversal
3017 of pre- and post-conditions as well as contract- and
3018 test-cases. Analyze delayed pragmas Depends and Global.
3019 * sem_ch6.adb (Check_Subprogram_Contract): Use the correct
3020 attribute to check for pre- and post-conditions, as well as
3021 contract-cases and test-cases. (List_Inherited_Pre_Post_Aspects):
3022 Correct the traversal of pre- and post- conditions.
3023 (Process_Contract_Cases): Update the comment on usage. Correct
3024 the traversal of contract-cases.
3025 (Process_Post_Conditions): Update the comment on usage. Correct the
3026 traversal of pre- and post-conditions.
3027 (Process_PPCs): Correct the traversal of pre- and post-conditions.
3028 (Spec_Postconditions): Use the correct
3029 attribute to check for pre- and post- conditions, as well as
3030 contract-cases and test-cases.
3031 * sem_ch13.adb (Analyze_Aspect_Specifications): Reimplement the
3032 actions related to aspects Depends and Global. Code refactoring
3033 for pre- and post-conditions.
3034 (Insert_Delayed_Pragma): New routine.
3035 * sem_prag.adb (Add_Item): New routine.
3036 (Analyze_Depends_In_Decl_Part): New routine.
3037 (Analyze_Global_In_Decl_Part): New routine.
3038 (Analyze_Pragma): Reimplement the actions related to aspects Depends and
3039 Global. Verify that a body acts as a spec for pragma Contract_Cases.
3040 (Chain_PPC): Use Add_Contract_Item to chain a pragma.
3041 (Chain_CTC): Correct the traversal of contract-
3042 and test-cases. Use Add_Contract_Item to chain a pragma.
3043 (Chain_Contract_Cases): Correct the traversal of contract-
3044 and test-cases. Use Add_Contract_Item to chain a pragma.
3045 (Check_Precondition_Postcondition): Update the comment on usage.
3046 (Check_Test_Case): Update the comment on usage.
3047 * sem_prag.ads (Analyze_Depends_In_Decl_Part): New routine.
3048 (Analyze_Global_In_Decl_Part): New routine.
3049 * sem_util.ads, sem_util.adb (Add_Contract_Item): New routine.
3050 * sinfo.adb (Classifications): New routine.
3051 (Contract_Test_Cases): New routine.
3052 (Pre_Post_Conditions): New routine.
3053 (Set_Classifications): New routine.
3054 (Set_Contract_Test_Cases): New routine.
3055 (Set_Pre_Post_Conditions): New routine.
3056 (Set_Spec_CTC_List): Removed.
3057 (Set_Spec_PPC_List): Removed.
3058 (Spec_CTC_List): Removed.
3059 (Spec_PPC_List): Removed.
3060 * sinfo.ads: Update the structure of N_Contruct along with all
3061 related comments.
3062 (Classifications): New routine and pragma Inline.
3063 (Contract_Test_Cases): New routine and pragma Inline.
3064 (Pre_Post_Conditions): New routine and pragma Inline.
3065 (Set_Classifications): New routine and pragma Inline.
3066 (Set_Contract_Test_Cases): New routine and pragma Inline.
3067 (Set_Pre_Post_Conditions): New routine and pragma Inline.
3068 (Set_Spec_CTC_List): Removed.
3069 (Set_Spec_PPC_List): Removed.
3070 (Spec_CTC_List): Removed.
3071 (Spec_PPC_List): Removed.
3072
3073 2013-04-23 Doug Rupp <rupp@adacore.com>
3074
3075 * init.c (GNAT$STOP) [VMS]: Bump sigargs[0] count by 2
3076 to account for LIB$STOP not having the chance to add the PC and
3077 PSL fields.
3078
3079 2013-04-23 Robert Dewar <dewar@adacore.com>
3080
3081 * sem_ch13.adb: Minor code reorganization (remove some redundant
3082 assignments).
3083 * sem_ch3.adb, sem_prag.adb: Minor reformatting.
3084
3085 2013-04-23 Yannick Moy <moy@adacore.com>
3086
3087 * einfo.ads: Minor typo fix.
3088 * sem_ch13.adb (Build_Predicate_Functions): Reject cases where
3089 Static_Predicate is applied to a non-scalar or non-static type.
3090 * sem_prag.adb: Minor typo fix.
3091
3092 2013-04-23 Doug Rupp <rupp@adacore.com>
3093
3094 * init.c (GNAT$STOP) [VMS]: New function.
3095
3096 2013-04-23 Ed Schonberg <schonberg@adacore.com>
3097
3098 * sem_ch3.adb: Add exp_pakd to context.
3099 (Constrain_Component_Type): If the component of the parent is
3100 packed, and the record subtype being built is already frozen,
3101 as is the case for an itype, the component type itself will not
3102 be frozen, and the packed array type for it must be constructed
3103 explicitly.
3104
3105 2013-04-23 Thomas Quinot <quinot@adacore.com>
3106
3107 * g-socket.adb, g-socket.ads (Set_Close_On_Exec): New subprogram.
3108
3109 2013-04-23 Yannick Moy <moy@adacore.com>
3110
3111 * err_vars.ads (Error_Msg_Qual_Level): Set variable to zero
3112 at declaration.
3113 * opt.ads (Multiple_Unit_Index): Set variable to zero at declaration.
3114 * sem_util.adb (NCT_Table_Entries): Set variable to zero at declaration.
3115 * set_targ.ads (Num_FPT_Modes): Set variable to zero at declaration.
3116 * stylesw.adb (Save_Style_Check_Options): Protect testing the
3117 value of Style_Check_Comments_Spacing by a previous test that
3118 Style_Check_Comments is True.
3119
3120 2013-04-23 Thomas Quinot <quinot@adacore.com>
3121
3122 * sem_prag.adb, sem_prag.ads (Effective_Name): Rename to
3123 Original_Name, and move declaration to package body as this
3124 subprogram is not used from outside. Also clarify documentation.
3125
3126 2013-04-23 Ed Schonberg <schonberg@adacore.com>
3127
3128 * exp_ch6.adb (Expand_N_Subprogram_Body): When compiling with
3129 initialize_scalars, disable predicate checks on the generated
3130 assignment to an out scalar parameter.
3131
3132 2013-04-23 Gary Dismukes <dismukes@adacore.com>
3133
3134 * sem_ch4.adb (Analyze_Allocator): Remove error
3135 check for "constrained in partial view" constraints entirely.
3136
3137 2013-04-23 Robert Dewar <dewar@adacore.com>
3138
3139 * einfo.ads, sem_prag.ads: Minor reformatting.
3140 * errout.ads: Comment update.
3141
3142 2013-04-23 Yannick Moy <moy@adacore.com>
3143
3144 * exp_ch5.adb: Minor typo.
3145
3146 2013-04-23 Thomas Quinot <quinot@adacore.com>
3147
3148 * gnat_ugn.texi: Fix typo.
3149
3150 2013-04-23 Ed Schonberg <schonberg@adacore.com>
3151
3152 * einfo.ads: Minor documentation clarification.
3153
3154 2013-04-23 Bob Duff <duff@adacore.com>
3155
3156 * types.ads: Fix incorrect comment.
3157
3158 2013-04-23 Ed Schonberg <schonberg@adacore.com>
3159
3160 * sem_aux.adb sem_aux.ads (Effectively_has_Constrained_Partial_View):
3161 Rename subprogram as Object_Type_Has_Constrained_Partial_View, better
3162 description of purpose.
3163 * checks.adb (Apply_Discriminant_Check): Use above renaming.
3164 * sem_ch4.adb (Analyze_Allocator): Check Has_Constrained_Partial_View
3165 of the base type, rather than using the Object_Type predicate.
3166 * sem_attr.adb (Analyze_Attribute, case 'Access): Use above renaming.
3167 * sem_util.adb (Is_Dependent_Component_Of_Mutable_Object): ditto.
3168 * exp_attr.adb (Expand_N_Attribute_Reference, case 'Constrained): Ditto.
3169 * exp_ch4.adb (Expand_N_Allocator): Ditto.
3170
3171 2013-04-23 Robert Dewar <dewar@adacore.com>
3172
3173 * exp_prag.adb (Expand_Pragma_Check): Check for Assert rather
3174 than Assertion.
3175 * sem_prag.adb (Is_Valid_Assertion_Kind): Moved to spec
3176 (Effective_Name): New function (Analyze_Pragma, case Check):
3177 Disallow [Statement_]Assertions (Check_Kind): Implement
3178 Statement_Assertions (Check_Applicable_Policy): Use Effective_Name
3179 (Is_Valid_Assertion_Kind): Allow Statement_Assertions.
3180 * sem_prag.ads (Is_Valid_Assertion_Kind): Moved here from body
3181 (Effective_Name): New function.
3182 * sem_res.adb: Minor reformatting.
3183 * snames.ads-tmpl (Name_Statement_Assertions): New entry.
3184 * gnat_rm.texi: Add documentation of new assertion kind
3185 Statement_Assertions.
3186
3187 2013-04-23 Robert Dewar <dewar@adacore.com>
3188
3189 * sinfo.ads, einfo.adb, sem_res.adb, exp_ch6.adb, aspects.adb: Minor
3190 reformatting and code clean up.
3191
3192 2013-04-23 Vincent Celier <celier@adacore.com>
3193
3194 * prj-part.ads, prj-conf.ads: Minor comment updates.
3195
3196 2013-04-23 Ed Schonberg <schonberg@adacore.com>
3197
3198 * einfo.adb (Predicate_Function): For a private type, retrieve
3199 predicate function from full view.
3200 * aspects.adb (Find_Aspect): Ditto.
3201 * exp_ch6.adb (Expand_Actuals): If the formal is class-wide and
3202 the actual is a definite type, apply predicate check after call.
3203 * sem_res.adb: Do not apply a predicate check before the call to
3204 a generated Init_Proc.
3205
3206 2013-04-23 Robert Dewar <dewar@adacore.com>
3207
3208 * sem_ch13.adb (Analyze_Aspect_Specifications): Significant
3209 rewrite to make sure Is_Ignore is properly captured when aspect
3210 is declared.
3211 * sem_ch6.adb: Minor reformatting.
3212 * sem_prag.adb (Analyze_Pragma): Do not test policy at time of
3213 pragma for the case of a pragma coming from an aspect (already
3214 tested when we analyzed the aspect).
3215
3216 2013-04-23 Vincent Celier <celier@adacore.com>
3217
3218 * prj-conf.adb (Parse_Project_And_Apply_Config): New
3219 Boolean parameter Implicit_Project, defaulted to False. Call
3220 Prj.Part.Parse with Implicit_Project.
3221 * prj-conf.ads (Parse_Project_And_Apply_Config): New Boolean
3222 parameter Implicit_Project, defaulted to False.
3223 * prj-part.adb (Parse_Single_Project): New Boolean parameter
3224 Implicit_Project, defaulted to False. When Implicit_Project is
3225 True, change the Directory of the project node to the Current_Dir.
3226 * prj-part.ads (Parse): New Boolean parameter, defaulted to False
3227
3228 2013-04-23 Robert Dewar <dewar@adacore.com>
3229
3230 * exp_util.adb: Minor reformatting.
3231
3232 2013-04-23 Robert Dewar <dewar@adacore.com>
3233
3234 * xoscons.adb: Minor reformatting.
3235
3236 2013-04-23 Hristian Kirtchev <kirtchev@adacore.com>
3237
3238 * sem_prag.adb (Check_Mode): Ensure that a
3239 self-referential output appears in both input and output lists of
3240 the subprogram as categorized by aspect Global.
3241 (Check_Usage): Rename formal parameters to better illustrate their
3242 function. Update all uses of the said formals.
3243
3244 2013-04-23 Thomas Quinot <quinot@adacore.com>
3245
3246 * exp_util.adb, exp_util.ads (Fully_Qualified_Name_String): New
3247 parameter Append_NUL to make NUL-termination optional.
3248 * exp_dist.adb: Consistently use the above throughout instead of
3249 Get_Library_Unit_Name_String.
3250
3251 2013-04-23 Robert Dewar <dewar@adacore.com>
3252
3253 * sem_util.adb, sem_res.adb, prj-tree.adb, prj-tree.ads: Minor
3254 reformatting.
3255
3256 2013-04-23 Pascal Obry <obry@adacore.com>
3257
3258 * xoscons.adb: Remove unused use clause, minor code clean-up.
3259
3260 2013-04-23 Ed Schonberg <schonberg@adacore.com>
3261
3262 * sem_util.ads, sem_util.adb: Code cleanup for Is_Expression_Function
3263 (can apply to any scope entity).
3264 * sem_res.adb (Resolve_Call): If the call is within another
3265 expression function it does not constitute a freeze point.
3266
3267 2013-04-23 Yannick Moy <moy@adacore.com>
3268
3269 * exp_ch6.adb (Expand_Actuals): Test that Subp
3270 is overloadable before testing if it's an inherited operation.
3271
3272 2013-04-23 Robert Dewar <dewar@adacore.com>
3273
3274 * a-envvar.adb, a-envvar.ads, exp_util.adb, sem_ch12.adb: Minor
3275 reformatting.
3276
3277 2013-04-23 Ed Schonberg <schonberg@adacore.com>
3278
3279 * sem_ch3.adb (Analyze_Object_Declarations): Undo previous patch.
3280 * exp_util.adb (Expand_Subtype_From_Expr): If the expression
3281 is a source entity and the declaration is for an aliased
3282 unconstrained array, create a new subtype so that the flag
3283 Is_Constr_Subt_For_UN_Aliased does not pollute other entities.
3284
3285 2013-04-23 Hristian Kirtchev <kirtchev@adacore.com>
3286
3287 * aspects.adb: Move tables Base_Aspect and Inherited_Aspect
3288 from the spec to the body.
3289 (Find_Aspect): Update the call to Get_Aspect_Id.
3290 (Get_Aspect_Id): New version that takes an aspect specification.
3291 * aspects.ads: Reorganize all aspect related tables.
3292 (Get_Aspect_Id): New version that takes an aspect specification.
3293 * par_sco.adb (Traverse_Aspects): Update the call to Get_Aspect_Id.
3294 * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration): Update
3295 the call to Get_Aspect_Id.
3296 * sem_ch13.adb (Analyze_Aspect_At_Freeze_Point): Update the
3297 call to Get_Aspect_Id. (Analyze_Aspect_Specifications): Update
3298 the call to Get_Aspect_Id. Update the call to Impl_Defined_Aspect.
3299
3300 2013-04-23 Robert Dewar <dewar@adacore.com>
3301
3302 * sem_prag.adb (Fix_Error): Rewrite to do more accurate job
3303 of getting proper name in the case where pragma comes from
3304 aspect.
3305 * sem_ch3.adb, sinfo.ads, par-ch6.adb, exp_ch6.adb: Minor reformatting.
3306
3307 2013-04-23 Yannick Moy <moy@adacore.com>
3308
3309 * sem_ch6.adb (Process_PPCs): Do not filter postconditions based on
3310 applicable policy.
3311
3312 2013-04-23 Thomas Quinot <quinot@adacore.com>
3313
3314 * par_sco.adb (Traverse_Aux_Decls): Minor code reorganization.
3315
3316 2013-04-23 Doug Rupp <rupp@adacore.com>
3317
3318 * init.c: Move facility macros outside IN_RTS.
3319
3320 2013-04-23 Thomas Quinot <quinot@adacore.com>
3321
3322 * freeze.adb (Freeze_Entity): For the case of a bit-packed
3323 array time that is known at compile time to have more that
3324 Integer'Last+1 elements, issue an error, since such arrays are
3325 not supported.
3326
3327 2013-04-23 Hristian Kirtchev <kirtchev@adacore.com>
3328
3329 * sem_prag.adb (Analyze_Dependency_Clause): Update all calls to
3330 Analyze_Input_Output.
3331 (Analyze_Input_List): Update all calls to Analyze_Input_Output.
3332 (Analyze_Input_Output): Add formal parameter Self_Ref along with
3333 comment on its usage. Update all calls to Analyze_Input_Output.
3334 (Analyze_Pragma): Add new local variable Self_Ref to capture
3335 the presence of a self-referential dependency clause. Update
3336 all calls to Analyze_Input_Output.
3337 (Check_Mode): Add formal parameter Self_Ref along with comment on its
3338 usage. Verify the legality of a self-referential output.
3339
3340 2013-04-23 Ed Schonberg <schonberg@adacore.com>
3341
3342 * exp_ch6.adb: Add predicate checks on by-copy parameter.
3343
3344 2013-04-23 Vincent Celier <celier@adacore.com>
3345
3346 * a-envvar.adb, a-envvar.ads (Value): New.
3347
3348 2013-04-22 Yannick Moy <moy@adacore.com>
3349
3350 * exp_prag.adb (Expand_Pragma_Loop_Variant): Rewrite pragma as
3351 null statement if ignored.
3352 * sem_ch6.adb (Expand_Contract_Cases): Do nothing if pragma is ignored.
3353 * sem_prag.adb (Analyze_Pragma): Keep analyzing ignored pragmas.
3354
3355 2013-04-22 Hristian Kirtchev <kirtchev@adacore.com>
3356
3357 * sem_prag.adb (Analyze_Contract_Case): New routine.
3358 (Analyze_Pragma): Aspect/pragma Contract_Cases can
3359 now be associated with a library level subprogram.
3360 Add circuitry to detect illegal uses of aspect/pragma Contract_Cases
3361 in a subprogram body.
3362 (Chain_Contract_Cases): Rename formal parameter Subp_Decl to
3363 Subp_Id. Remove local constant Subp. The entity of the subprogram
3364 is now obtained via the formal paramter.
3365
3366 2013-04-22 Ed Schonberg <schonberg@adacore.com>
3367
3368 * sem_ch3.adb (Analyze_Object_Declaration): Do not set
3369 Is_Constr_Subt_For_Unc_Aliased on the subtype of the expression,
3370 if the expression is a source entity.
3371
3372 2013-04-22 Yannick Moy <moy@adacore.com>
3373
3374 * exp_prag.adb, sinfo.ads, sem_prag.ads: Minor correction of typos in
3375 comments.
3376 * sem_ch6.adb (Expand_Contract_Cases): Add location to message.
3377
3378 2013-04-22 Thomas Quinot <quinot@adacore.com>
3379
3380 * sem_prag.adb (Fix_Error): For a pragma rewritten from another
3381 pragma, fix up error message to include original pragma name.
3382 * par_sco.adb: Minor reformatting.
3383
3384 2013-04-22 Robert Dewar <dewar@adacore.com>
3385
3386 * sem_prag.adb, sem_util.adb, sem_util.ads, sem_res.adb, exp_ch6.adb,
3387 sem_ch6.adb, opt.ads: Minor reformatting.
3388
3389 2013-04-22 Pascal Obry <obry@adacore.com>
3390
3391 * gnat_ugn.texi, prj-nmsc.adb, projects.texi: Add check for
3392 Library_Standalone and Library_Kind.
3393
3394 2013-04-22 Ed Schonberg <schonberg@adacore.com>
3395
3396 * exp_ch6.adb (Expand_Actuals): If the call is to an
3397 inherited operation and the actual is a by-reference type with
3398 predicates, add predicate call to post-call actions.
3399 * sem_util.adb (Is_Inherited_Operation_For_Type): Fix coding
3400 error: a type declaration has a defining identifier, not an Etype.
3401 * sem_res.adb: Restore code removed because of above error.
3402
3403 2013-04-22 Doug Rupp <rupp@adacore.com>
3404
3405 * init.c (__gnat_handle_vms_condition): Also match C$_SIGINT.
3406
3407 2013-04-22 Yannick Moy <moy@adacore.com>
3408
3409 * gnat_rm.texi, exp_util.adb, sem_prag.adb, sem_prag.ads, par-ch2.adb,
3410 opt.ads, sem_ch13.adb: Minor correction of typos in comments/doc.
3411
3412 2013-04-22 Vincent Celier <celier@adacore.com>
3413
3414 * prj-nmsc.adb (Check_Library_Attributes): Set Library_Dir to
3415 No_Path_Information only when Directories_Must_Exist_In_Projects
3416 is False.
3417 (Get_Directories): Set Object_Directory
3418 or Exec_Directory to No_Path_Information only when
3419 Directories_Must_Exist_In_Projects is False.
3420
3421 2013-04-22 Yannick Moy <moy@adacore.com>
3422
3423 * par-prag.adb, sem_attr.adb, sem_ch6.adb, sem_prag.adb, sem_warn.adb,
3424 snames.ads-tmpl, sinfo.ads, sem_util.ads: Remove all references to
3425 Pragma_Contract_Case and Name_Contract_Case.
3426
3427 2013-04-22 Yannick Moy <moy@adacore.com>
3428
3429 * aspects.ads, aspects.adb, sem_ch13.adb: Removal of references to
3430 Contract_Case.
3431 * gnat_ugn.texi, gnat_rm.texi Description of Contract_Case replaced by
3432 description of Contract_Cases.
3433
3434 2013-04-12 Robert Dewar <dewar@adacore.com>
3435
3436 * makeutl.adb, prj-nmsc.adb: Minor reformatting.
3437
3438 2013-04-12 Robert Dewar <dewar@adacore.com>
3439
3440 * exp_util.adb (Make_Invariant_Call): Use Check_Kind instead
3441 of Check_Enabled.
3442 * gnat_rm.texi (Check_Policy): Update documentation for new
3443 Check_Policy syntax.
3444 * sem_prag.adb (Check_Kind): Replaces Check_Enabled
3445 (Analyze_Pragma, case Check_Policy): Rework to accomodate new
3446 syntax (like Assertion_Policy).
3447 * sem_prag.ads (Check_Kind): Replaces Check_Enabled.
3448
3449 2013-04-12 Doug Rupp <rupp@adacore.com>
3450
3451 * init.c (SS$_CONTROLC, SS$_CONTINUE) [VMS]: New macros.
3452 (__gnat_handle_vms_condition) [VMS]: Dispatch on the Crtl/C user
3453 handler if installed.
3454 * ctrl_c.c (__gnat_install_int_handler)
3455 [VMS]: Install a dummy sigaction handler to trigger the real
3456 user handler dispatch in init.c/__gnat_handle_vms_condition.
3457 (__gnat_uninstall_int_handler) [VMS]: Likewise.
3458
3459 2013-04-12 Vincent Celier <celier@adacore.com>
3460
3461 * clean.adb (Parse_Cmd_Line): Set Directories_Must_Exist_In_Projects
3462 to False if switch is specified.
3463 * makeutl.adb (Initialize_Source_Record): Do not look for the
3464 object file if there is no object directory.
3465 * opt.ads (Directories_Must_Exist_In_Projects): New Boolean
3466 variable, defaulted to True.
3467 * prj-nmsc.adb (Check_Library_Attributes): Do not fail if library
3468 directory does not exist when Directories_Must_Exist_In_Projects is
3469 False.
3470 (Get_Directories): Do not fail when the object or the exec directory
3471 do not exist when Directories_Must_Exist_In_Projects is False.
3472
3473 2013-04-12 Robert Dewar <dewar@adacore.com>
3474
3475 * namet.adb, namet.ads: Minor addition (7 arg version of Nam_In).
3476 * exp_prag.adb, sem_ch3.adb, sem_intr.adb, sem_type.adb, exp_util.adb,
3477 sem_aux.adb, exp_ch9.adb, sem_ch7.adb, sem_ch10.adb, sem_prag.adb,
3478 par-ch2.adb, tbuild.adb, rtsfind.adb, freeze.adb, sem_util.adb,
3479 sem_res.adb, sem_attr.adb, exp_ch2.adb, prj-makr.adb, sem_elab.adb,
3480 exp_ch4.adb, sem_ch4.adb, sem_mech.adb, sem_ch6.adb, par-prag.adb,
3481 prj-nmsc.adb, exp_disp.adb, sem_ch8.adb, sem_warn.adb, par-util.adb,
3482 sem_eval.adb, exp_intr.adb, sem_ch13.adb, exp_cg.adb, lib-xref.adb,
3483 sem_disp.adb, exp_ch3.adb: Minor code reorganization (use Nam_In).
3484
3485 2013-04-12 Doug Rupp <rupp@adacore.com>
3486
3487 * init.c: Don't clobber condition code on VMS.
3488
3489 2013-04-12 Robert Dewar <dewar@adacore.com>
3490
3491 * exp_aggr.adb: Minor reformatting.
3492 * namet.ads, namet.adb (Nam_In): New functions.
3493
3494 2013-04-12 Robert Dewar <dewar@adacore.com>
3495
3496 * einfo.adb (Has_Dynamic_Predicate_Aspect): New flag.
3497 (Has_Static_Predicate_Aspect): New flag.
3498 * einfo.ads (Has_Dynamic_Predicate_Aspect): New flag.
3499 (Has_Static_Predicate_Aspect): New flag.
3500 * exp_ch9.adb: Minor reformatting.
3501 * exp_util.adb (Make_Invariant_Call): Check_Enabled now handles
3502 synonyms.
3503 * gnat1drv.adb: Remove setting of Debug_Pragmas_Enabled,
3504 since this switch is gone and control of Debug is done with
3505 Assertions_Enabled.
3506 * gnat_rm.texi: Update documentation for Assertion_Policy and
3507 Check_Policy pragmas.
3508 * opt.adb (Debug_Pragmas_Disabled[_Config]): Removed
3509 (Debug_Pragmas_Enabled[_Config]): Removed Since debug now
3510 controlled by Assertion_Enabled.
3511 * opt.ads (Debug_Pragmas_Disabled[_Config]): Removed
3512 (Debug_Pragmas_Enabled[_Config]): Removed Since debug now
3513 controlled by Assertion_Enabled.
3514 * par-ch2.adb (Scan_Pragma_Argument_Association): Allow new
3515 'Class forms.
3516 * sem_attr.adb: Minor reformatting.
3517 * sem_ch13.adb (Analyze_Aspect_Specification): Disable aspect
3518 if DISABLE policy applies.
3519 * sem_ch6.adb (Grab_PPC): Check original name of aspect for
3520 aspect from pragma (Process_PPCs): Properly check assertion policy.
3521 * sem_prag.adb (Check_Enabled): Rewritten for new Assertion_Policy
3522 (Check_Appicable_Policy): New procedure.
3523 (Is_Valid_Assertion_Kind): New function.
3524 (Rewrite_Assertion_Kind): New procedure.
3525 (Analyze_Pragma): Handle case of disabled assertion pragma.
3526 (Analyze_Pragma, case Assertion_Policy): Rewritten for Ada 2012.
3527 (Analyze_Pragma, case Check): Deal with 'Class possibilities.
3528 (Analyze_Pragma, case Check_Policy): Deal with 'Class possibilities.
3529 (Analyze_Pragma, case Contract_Class): New handling of ignored pragma.
3530 (Analyze_Pragma, case Debug): New control with Assertion_Policy.
3531 (Analyze_Pragma, case Debug_Policy): Now consistent with
3532 Assertion_Policy.
3533 (Analyze_Pragma, case Loop_Invariant): New handling of ignored
3534 pragma.
3535 (Analyze_Pragma, case Loop_Variant): New handling of ignored pragma.
3536 (Analyze_Pragma, case Precondition): Use proper name for Check pragma.
3537 (Analyze_Pragma, case Check_Enabled): Rewritten for new policy stuff.
3538 * sem_prag.ads (Check_Enabled): Rewritten for new
3539 Assertion_Policy stuff.
3540 (Check_Appicable_Policy): New procedure.
3541 * sinfo.adb (Is_Disabled): New flag.
3542 (Is_Ignored): New flag.
3543 * sinfo.ads (Is_Disabled): New flag.
3544 (Is_Ignored): New flag.
3545 (N_Pragma_Argument_Association): New 'Class forms.
3546 * snames.ads-tmpl: New names Name_uPre, Name_uPost,
3547 Name_uType_Invariant, Name_uInvariant.
3548 * switch-c.adb: Remove setting of Debug_Pragmas_Enabled for -gnata.
3549 * tree_io.ads (ASIS_Version_Number): Updated (remove
3550 read write of obsolete flags Debug_Pragmas_Disabled and
3551 Debug_Pragmas_Enabled.
3552
3553 2013-04-12 Ed Schonberg <schonberg@adacore.com>
3554
3555 * exp_aggr.adb (Get_Explicit_Discriminant_Value): Subsidiary
3556 of Build_Record_Aggr_Code, used to retrieve explicit values
3557 for inherited discriminants in an extension aggregate, when the
3558 ancestor type is unconstrained.
3559
3560 2013-04-12 Ed Schonberg <schonberg@adacore.com>
3561
3562 * sem_attr.adb (Check_Stream_Attribute): If restriction
3563 No_Default_Stream_Attributes is active, it is illegal to use a
3564 predefined elementary type stream attribute either by itself,
3565 or more importantly as part of the attribute subprogram for a
3566 composite type. However, if the broader restriction No_Streams
3567 is active, then stream operations are not generated, and there
3568 is no error.
3569
3570 2013-04-12 Robert Dewar <dewar@adacore.com>
3571
3572 * gnatbind.adb: Minor reformatting.
3573
3574 2013-04-12 Bob Duff <duff@adacore.com>
3575
3576 * sem_attr.adb (Analyze_Access_Attribute): Treat P'Access like a
3577 call only in the static elaboration model.
3578
3579 2013-04-12 Hristian Kirtchev <kirtchev@adacore.com>
3580
3581 * sem_prag.adb (Analyze_Input_List): Detect an illegal dependency
3582 clause where both input and output lists are null.
3583 (Analyze_Pragma): Update the grammar of pragma Depends.
3584
3585 2013-04-12 Vincent Celier <celier@adacore.com>
3586
3587 * gnatbind.adb (No_Restriction_List): Exclude restrictions that
3588 take a parameter value, not a count.
3589 * prj.ads, prj.adb (Remove_All_Restricted_Languages): New procedure.
3590 * projects.texi: Complete documentation of attribute Roots.
3591
3592 2013-04-12 Thomas Quinot <quinot@adacore.com>
3593
3594 * exp_ch3.adb, exp_util.ads, checks.adb, freeze.adb, sem_attr.adb,
3595 sem_ch3.adb: Minor reformatting.
3596 * exp_ch4.adb (Size_In_Storage_Elements): Minor documentation
3597 improvement: note that the computation is pessimistic for bit
3598 packed arrays.
3599 * gnat_rm.texi (Range_Length): Fix minor error in description
3600 of attribute.
3601
3602 2013-04-12 Hristian Kirtchev <kirtchev@adacore.com>
3603
3604 * aspects.adb (Find_Aspect): New routine.
3605 (Find_Value_Of_Aspect): New routine.
3606 (Has_Aspect): Reimplemented.
3607 * aspects.ads (Find_Aspect): New routine.
3608 (Find_Value_Of_Aspect): New routine, previously known as Find_Aspect.
3609 * exp_ch5.adb (Expand_Iterator_Loop): Update the call to Find_Aspect.
3610 * exp_util.adb (Is_Iterated_Container): Update the call to Find_Aspect.
3611 * sem_ch4.adb (Try_Container_Indexing): Update calls to Find_Aspect.
3612 * sem_ch5.adb (Analyze_Iterator_Specification): Update
3613 the call to Find_Aspect. Use function Has_Aspect for better
3614 readability.
3615 (Preanalyze_Range): Use function Has_Aspect for better readability.
3616 * sem_ch13.adb (Check_One_Function): Update the call to Find_Aspect.
3617 * sem_prag.adb (Analyze_Pragma): There is no longer need to
3618 look at the parent to extract the corresponding pragma for
3619 aspect Global.
3620
3621 2013-04-12 Robert Dewar <dewar@adacore.com>
3622
3623 * checks.adb, sem_elab.adb, repinfo.adb, sem_ch4.adb, restrict.adb,
3624 restrict.ads: Minor reformatting.
3625
3626 2013-04-12 Ed Schonberg <schonberg@adacore.com>
3627
3628 * lib-xref.adb: Retrieve original name of classwide type if any.
3629
3630 2013-04-12 Thomas Quinot <quinot@adacore.com>
3631
3632 * exp_ch11.ads: Minor reformatting.
3633
3634 2013-04-12 Hristian Kirtchev <kirtchev@adacore.com>
3635
3636 * aspects.adb: Alphabetize subprogram bodies in this unit. Add
3637 an entry for Aspect_Ghost in the table of canonical aspects.
3638 (Has_Aspect): New routine.
3639 * aspects.ads: Add Aspect_Ghost to all relevant
3640 tables. Alphabetize subprograms in this unit.
3641 (Has_Aspect): New routine.
3642 * einfo.adb: Add with and use clauses for Aspects.
3643 (Is_Ghost_Function): New routine.
3644 * einfo.ads: Add new synthesized attribute Is_Ghost_Function and
3645 update the structure of the related nodes.
3646 (Is_Ghost_Function): New routine.
3647 * exp_ch4.adb (Find_Enclosing_Context): Use routine
3648 Is_Body_Or_Package_Declaration to terminate a search.
3649 (Is_Body_Or_Unit): Removed.
3650 * exp_util.adb (Within_Case_Or_If_Expression): Use routine
3651 Is_Body_Or_Package_Declaration to terminate a search.
3652 * par-prag.adb: Add pragma Ghost to the list of pragmas that do
3653 not need special processing by the parser.
3654 * sem_attr.adb (Analyze_Access_Attribute): Detect an
3655 illegal use of 'Access where the prefix is a ghost function.
3656 (Analyze_Attribute): Use routine Is_Body_Or_Package_Declaration
3657 to terminate a search. (Check_References_In_Prefix): Use routine
3658 Is_Body_Or_Package_Declaration to terminate a search.
3659 * sem_ch4.adb (Analyze_Call): Mark a function when it appears
3660 inside an assertion expression. Verify the legality of a call
3661 to a ghost function.
3662 (Check_Ghost_Function_Call): New routine.
3663 * sem_ch6.adb (Analyze_Function_Call): Code reformatting. Move
3664 the setting of attribute In_Assertion_Expression to Analyze_Call.
3665 (Check_Overriding_Indicator): Detect an illegal attempt to
3666 override a function with a ghost function.
3667 * sem_ch12.adb (Preanalyze_Actuals): Detect an illegal use of
3668 a ghost function as a generic actual.
3669 * sem_elab.adb (Check_Internal_Call_Continue): Update the call
3670 to In_Assertion.
3671 * sem_prag.adb: Add an entry for pragma Ghost in the table
3672 of significant arguments.
3673 (Analyze_Pragma): Do not analyze
3674 an "others" case guard. Add processing for pragma Ghost. Use
3675 Preanalyze_Assert_Expression when analyzing the expression of
3676 pragmas Loop_Invariant and Loop_Variant.
3677 * sem_util.adb (Get_Subprogram_Entity): Reimplemented.
3678 (Is_Body_Or_Package_Declaration): New routine.
3679 * sem_util.ads: Alphabetize subprotrams in this unit.
3680 (Is_Body_Or_Package_Declaration): New routine.
3681 * sinfo.adb (In_Assertion): Rename to In_Assertion_Expression.
3682 (Set_In_Assertion): Rename to Set_In_Assertion_Expression.
3683 * sinfo.ads: Rename flag In_Assertion to In_Assertion_Expression
3684 to better reflect its use. Update all places that mention the flag.
3685 (In_Assertion): Rename to In_Assertion_Expression. Update
3686 related pragma Inline. (Set_In_Assertion): Rename to
3687 Set_In_Assertion_Expression. Update related pragma Inline.
3688 * snames.ads-tmpl: Add new predefined name Ghost. Add new pragma
3689 id Pragma_Ghost.
3690
3691 2013-04-12 Arnaud Charlet <charlet@adacore.com>
3692
3693 * sem_prag.adb (Set_Imported): Do not generate error for multiple
3694 Import in CodePeer mode.
3695 * s-rident.ads: Fix minor typo.
3696
3697 2013-04-12 Ed Schonberg <schonberg@adacore.com>
3698
3699 * checks.adb (Insert_Valid_Check): Do not insert validity check
3700 in the body of the generated predicate function, to prevent
3701 infinite recursion.
3702
3703 2013-04-12 Ed Schonberg <schonberg@adacore.com>
3704
3705 * s-rident.ads: Add various missing Ada 2012 restrictions:
3706 No_Access_Parameter_Allocators, No_Coextensions,
3707 No_Use_Of_Attribute, No_Use_Of_Pragma.
3708 * snames.ads-tmpl: Add corresponding names.
3709 * restrict.ads restrict.adb: Subprograms and data structures to
3710 handle aspects No_Use_Of_Attribute and No_Use_Of_Pragma.
3711 * sem_ch4.adb: Correct name of restrictions is
3712 No_Standard_Allocators_After_Elaboration.
3713 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Check
3714 violation of restriction No_Use_Of_Attribute.
3715 * sem_prag.adb (Process_Restrictions_Or_Restriction_Warnings):
3716 Set restrictions No_Use_Of_Pragma and No_Use_Of_Attribute.
3717 (Analyze_Pragma): Check violation of restriction No_Use_Of_Pragma.
3718 * sem_res.adb: Check restrictions No_Access_Parameter_Allocators
3719 and No_Coextensions.
3720 * bcheck.adb: Correct name of restrictions is
3721 No_Standard_Allocators_After_Elaboration.
3722 * gnatbind.adb: Correct name of restrictions is
3723 No_Standard_Allocators_After_Elaboration.
3724
3725 2013-04-12 Hristian Kirtchev <kirtchev@adacore.com>
3726
3727 * sem_prag.adb (Analyze_Pragma, (Check_Mode_Restriction_In_Function):
3728 Correct error message format.
3729
3730 2013-04-12 Robert Dewar <dewar@adacore.com>
3731
3732 * sem_attr.adb: Minor reformatting.
3733
3734 2013-04-12 Ed Schonberg <schonberg@adacore.com>
3735
3736 * sem_elab.adb (Within_Elaborate_All): Do not examine a context
3737 item that has not been analyzed, because the unit may have errors,
3738 or the context item may come from a proper unit inserted at the
3739 point of a stub and not analyzed yet.
3740
3741 2013-04-12 Thomas Quinot <quinot@adacore.com>
3742
3743 * gnat1drv.adb, repinfo.adb, repinfo.ads (Repinfo.List_Array_Info,
3744 List_Record_Info): Also include scalar storage order information in
3745 output.
3746
3747 2013-04-12 Yannick Moy <moy@adacore.com>
3748
3749 * sem_ch6.adb (Process_Contract_Cases): Update code to apply to
3750 Contract_Cases instead of Contract_Case pragma.
3751
3752 2013-04-12 Robert Dewar <dewar@adacore.com>
3753
3754 * a-cfdlli.ads, g-socket.adb, s-fileio.adb: Minor reformatting.
3755
3756 2013-04-12 Yannick Moy <moy@adacore.com>
3757
3758 * sem_attr.adb (Analyze_Attribute): Update analyse of
3759 Attribute_Old and Attribute_Result so they are allowed in the
3760 right-hand-side of an association in a Contract_Cases pragma.
3761 * sem_prag.adb (Analyze_CTC_In_Decl_Part): Add pre-analysis of
3762 the expressions in a Contract_Cases pragma.
3763
3764 2013-04-12 Robert Dewar <dewar@adacore.com>
3765
3766 * sem.ads, opt.ads: Minor comment edits.
3767 * sem_warn.adb, sem_ch6.adb: Minor reformatting.
3768
3769 2013-04-12 Claire Dross <dross@adacore.com>
3770
3771 * a-cfdlli.adb a-cfdlli.ads (List, Not_No_Element, Iterate,
3772 Reverse_Iterate, Query_Element, Update_Element, Read, Write): Removed,
3773 not suitable for formal analysis.
3774
3775 2013-04-12 Ed Schonberg <schonberg@adacore.com>
3776
3777 * sem_prag.adb (Analyze_Abstract_State): Use Defining entity
3778 to locate package entity, which may be a child unit.
3779
3780 2013-04-12 Thomas Quinot <quinot@adacore.com>
3781
3782 * g-socket.adb, g-socket.ads (Connect_Socket, version with timeout): If
3783 the specified timeout is 0, do not attempt to determine whether the
3784 connection succeeded.
3785
3786 2013-04-12 Doug Rupp <rupp@adacore.com>
3787
3788 * s-fileio.adb (Form_RMS Context_Key): Fix some thinkos.
3789
3790 2013-04-12 Doug Rupp <rupp@adacore.com>
3791
3792 * s-fileio.adb: Minor reformatting.
3793
3794 2013-04-12 Ed Schonberg <schonberg@adacore.com>
3795
3796 * sem_warn.adb (Check_Infinite_Loop_Warning): Do not warn if
3797 the last statement in the analyzed loop is an unconditional
3798 exit statement.
3799
3800 2013-04-12 Robert Dewar <dewar@adacore.com>
3801
3802 * opt.ads (Style_Check_Main): New switch.
3803 * sem.adb (Semantics): Set Style_Check flag properly for new
3804 unit to be analyzed.
3805 * sem_ch10.adb (Analyze_With_Clause): Don't reset Style_Check,
3806 the proper setting of this flag is now part of the Semantics
3807 procedure.
3808 * switch-c.adb (Scan_Front_End_Switches): Set Style_Check_Main
3809 for -gnatg and -gnaty
3810
3811 2013-04-12 Doug Rupp <rupp@adacore.com>
3812
3813 * s-crtl.ads (fopen, freopen): Add vms_form parameter
3814 * i-cstrea.ads (fopen, freopen): Likewise.
3815 * adaint.h (__gnat_fopen, __gnat_freopen): Likewise.
3816 * adaint.c (__gnat_fopen, __gnat_freopen): Likewise.
3817 [VMS]: Split out RMS keys and call CRTL function appropriately.
3818 * s-fileio.adb (Form_VMS_RMS_Keys, Form_RMS_Context_Key): New
3819 subprograms.
3820 (Open, Reset): Call Form_VMS_RMS_Keys. Call fopen,freopen with
3821 vms_form
3822 * gnat_rm.texi: Document implemented RMS keys.
3823
3824 2013-04-12 Hristian Kirtchev <kirtchev@adacore.com>
3825
3826 * sem_ch13.adb (Analyze_Aspect_Specifications):
3827 Insert the corresponding pragma for aspect Abstract_State at
3828 the top of the visible declarations of the related package.
3829 Previously this was only done when the package is a compilation
3830 unit.
3831
3832 2013-04-12 Arnaud Charlet <charlet@adacore.com>
3833
3834 * gnat_ugn.texi: Further menu clean ups.
3835 * sem_prag.adb, opt.ads: Minor reformatting.
3836 * sem_util.ads: Minor comment fix.
3837
3838 2013-04-12 Hristian Kirtchev <kirtchev@adacore.com>
3839
3840 * sem_ch13.adb (Analyze_Aspect_Specifications): Aspect
3841 Depends is now a delayed aspect. The delay is required
3842 due to the interplay between aspects Depends and Global.
3843 (Check_Aspect_At_Freeze_Point): Add an entry for aspect Depends.
3844 * sem_prag.adb: Reformat various error messages.
3845 (Add_Item): New subsidiary routine.
3846 (Analyze_Pragma): Add new variables
3847 Global_Seen, Result_Seen, Subp_Inputs and Subp_Outputs. The
3848 analysis of pragma Depends now has the capability to check
3849 the proper mode and usage of subprogram inputs and outputs.
3850 (Appears_In): New routine.
3851 (Check_Function_Return): New routine.
3852 (Check_Mode): New routine.
3853 (Check_Usage): New routine.
3854 (Collect_Subprogram_Inputs_Outputs): New routine.
3855
3856 2013-04-12 Bob Duff <duff@adacore.com>
3857
3858 * par-ch7.adb (P_Package): Initialize Sloc in the newly-pushed scope
3859 stack entry.
3860
3861 2013-04-12 Robert Dewar <dewar@adacore.com>
3862
3863 * switch-c.adb: Minor fix to wording of error message for
3864 -gnatet/eT.
3865
3866 2013-04-12 Robert Dewar <dewar@adacore.com>
3867
3868 * impunit.adb: Add s-multip and s-mudido to list of impl defined
3869 system units.
3870 * gnat_rm.texi: Add documentation for
3871 System.Multiprocessors[.Dispatching_Domains].
3872
3873 2013-04-12 Ben Brosgol <brosgol@adacore.com>
3874
3875 * gnat_ugn.texi: Completion of menu cleanups.
3876
3877 2013-04-12 Arnaud Charlet <charlet@adacore.com>
3878
3879 * sem_prag.adb (Diagnose_Multiple_Pragmas): Relax the rules
3880 in Relaxed_RM_Semantics.
3881
3882 2013-04-12 Arnaud Charlet <charlet@adacore.com>
3883
3884 * set_targ.adb (elab code): Add support for non gcc back-ends
3885 where save_argv is null.
3886
3887 2013-04-12 Robert Dewar <dewar@adacore.com>
3888
3889 * gnat1drv.adb (Gnat1drv): Test Target_Dependent_Info_Write_Name.
3890 * opt.ads (Target_Dependent_Info_Read): Add _Name, now an access
3891 type (Target_Dependent_Info_Write): Add _Name, now an access type.
3892 * set_targ.adb (Write_Target_Dependent_Values): Use name
3893 from -gnatet switch stored in Target_Dependent_Info_Write_Name
3894 (Read_Target_Dependent_Values): Use name from -gnateT switch
3895 stored in Target_Dependent_Info_Read_Name.
3896 * switch-c.adb: New form of -gnatet and -gnateT switches.
3897 * usage.adb: New form of -gnatet and -gnateT switches with
3898 file name.
3899
3900 2013-04-11 Eric Botcazou <ebotcazou@adacore.com>
3901
3902 * gcc-interface/decl.c (elaborate_expression_1): Skip only constant
3903 arithmetics when looking for a read-only variable in the expression.
3904
3905 2013-04-11 Javier Miranda <miranda@adacore.com>
3906
3907 * check.ads, exp_ch6.adb (Install_Null_Excluding_Check): No check in
3908 interface thunks since it is performed at the caller side.
3909 (Expand_Simple_Function_Return): No accessibility check needed in thunks
3910 since the check is done by the target routine.
3911
3912 2013-04-11 Ed Schonberg <schonberg@adacore.com>
3913
3914 * sem_prag.adb (Analyze_Pragma, case Priority): pre-analyze
3915 expression with type Any_Priority.
3916 * exp_ch9.adb (Initialize_Protection): Check that the value
3917 of the priority expression is within the bounds of the proper
3918 priority type.
3919
3920 2013-04-11 Robert Dewar <dewar@adacore.com>
3921
3922 * sem_prag.adb, prj-env.adb: Minor reformatting.
3923
3924 2013-04-11 Ben Brosgol <brosgol@adacore.com>
3925
3926 * gnat_ugn.texi: Clean ups.
3927
3928 2013-04-11 Yannick Moy <moy@adacore.com>
3929
3930 * set_targ.adb: Minor comment update.
3931
3932 2013-04-11 Pascal Obry <obry@adacore.com>
3933
3934 * gnat_ugn.texi: Remove obsolete comment about DLL calling
3935 convention.
3936
3937 2013-04-11 Javier Miranda <miranda@adacore.com>
3938
3939 * exp_ch6.adb (Expand_Call): For the call to the target primitive
3940 of an interface thunks do not compute the extra actuals; just
3941 propagate the extra actuals received by the thunk.
3942 * exp_disp.adb (Expand_Interface_Thunk): Decorate new attribute
3943 Thunk_Entity.
3944 * sem_ch6.adb (Create_Extra_Formals): Do not generate extra
3945 formals in interface thunks whose target primitive has no extra
3946 formals.
3947
3948 2013-04-11 Hristian Kirtchev <kirtchev@adacore.com>
3949
3950 * sem_prag.adb (Analyze_Pragma): Detect
3951 a renaming by looking at the Renamed_Object attribute.
3952 (Is_Renaming): Removed.
3953
3954 2013-04-11 Vincent Celier <celier@adacore.com>
3955
3956 * prj-env.adb (Initialize_Default_Project_Path): Take
3957 into account a project path file, specified by environment
3958 variable GPR_PROJECT_PATH_FILE, before taking into account
3959 GPR_PROJECT_PATH.
3960 * projects.texi: Add documentation for GPR_PROJECT_PATH_FILE
3961
3962 2013-04-11 Ed Schonberg <schonberg@adacore.com>
3963
3964 * a-cdlili.adb, a-cdlili.ads, a-cihama.adb, a-cihama.ads, a-coinve.adb,
3965 a-coinve.ads, a-ciorse.adb, a-ciorse.ads, a-coorma.adb, a-coorma.ads,
3966 a-cfdlli.adb, a-cfdlli.ads, a-cborma.adb, a-cborma.ads, a-cidlli.adb,
3967 a-cidlli.ads, a-ciormu.adb, a-ciormu.ads, a-cihase.adb, a-cihase.ads,
3968 a-cohama.adb, a-cohama.ads, a-coorse.adb, a-coorse.ads, a-cbhama.adb,
3969 a-cbhama.ads, a-cborse.adb, a-cborse.ads, a-ciorma.adb, a-cobove.adb,
3970 a-ciorma.ads, a-cobove.ads, a-coormu.adb, a-coormu.ads, a-cohase.adb,
3971 a-cohase.ads, a-cbdlli.adb, a-cbdlli.ads, a-cbhase.adb, a-cbhase.ads:
3972 Move Iterator operations from body to private part of spec.
3973
3974 2013-04-11 Eric Botcazou <ebotcazou@adacore.com>
3975
3976 * ttypes.ads, get_targ.ads: More minor rewording of comments.
3977
3978 2013-04-11 Johannes Kanig <kanig@adacore.com>
3979
3980 * debug.adb: Document use of switch -gnatd.Z.
3981
3982 2013-04-11 Hristian Kirtchev <kirtchev@adacore.com>
3983
3984 * sem_prag.adb (Analyze_Pragma): Both pragma Depends and Global can now
3985 support renamings of entire objects. Legal renamings are replaced by
3986 the object they rename.
3987 (Is_Renaming): New routine.
3988
3989 2013-04-11 Yannick Moy <moy@adacore.com>
3990
3991 * set_targ.adb, opt.ads: Minor changes in comments.
3992
3993 2013-04-11 Ben Brosgol <brosgol@adacore.com>
3994
3995 * gnat_ugn.texi: Minor clean ups.
3996
3997 2013-04-11 Robert Dewar <dewar@adacore.com>
3998
3999 * nlists.ads, nlists.adb, treepr.adb, treepr.ads: Move debugging
4000 function p from Nlists to Treepr.
4001
4002 2013-04-11 Ed Schonberg <schonberg@adacore.com>
4003
4004 * sem_disp.adb (Check_Dispatching_Context): If the context is
4005 a contract for a null procedure defer error reporting until
4006 postcondition body is created.
4007 * exp_ch13.adb (Expand_N_Freeze_Entity): If the entity is a
4008 null procedure, complete the analysis of its contracts so that
4009 calls within classwide conditions are properly rewritten as
4010 dispatching calls.
4011
4012 2013-04-11 Thomas Quinot <quinot@adacore.com>
4013
4014 * sem_ch10.adb, sem_ch12.adb: Minor reformatting.
4015
4016 2013-04-11 Robert Dewar <dewar@adacore.com>
4017
4018 * exp_attr.adb, sem_res.adb, sem_attr.adb: Minor reformatting.
4019
4020 2013-04-11 Robert Dewar <dewar@adacore.com>
4021
4022 * atree.adb, atree.ads (Node31): New function.
4023 (Set_Node31): New procedure.
4024
4025 2013-04-11 Robert Dewar <dewar@adacore.com>
4026
4027 * errout.ads: Minor typo correction.
4028
4029 2013-04-11 Javier Miranda <miranda@adacore.com>
4030
4031 * einfo.ad[sb] (Thunk_Entity/Set_Thunk_Entity): New attribute.
4032
4033 2013-04-11 Robert Dewar <dewar@adacore.com>
4034
4035 * back_end.adb (Register_Back_End_Types): Moved to Get_Targ
4036 * back_end.ads (C_String): Moved to Get_Targ
4037 (Register_Type_Proc): Moved to Get_Targ (Register_Back_End_Types):
4038 Moved to Get_Targ.
4039 * cstand.adb (Register_Float_Type): New interface
4040 (Create_Back_End_Float_Types): Use entries in FPT_Mode_Table.
4041 * get_targ.adb (Register_Back_End_Types): Moved here from
4042 Back_End.
4043 * get_targ.ads (C_String): Moved here from Back_End
4044 (Register_Type_Proc): Moved here from Back_End
4045 (Register_Back_End_Types): here from Back_End.
4046 * gnat1drv.adb (GGnat11drv): Add call to
4047 Write_Target_Dependent_Values;
4048 * lib-writ.ads, lib-writ.adb (Write_ALI): Remove section writing
4049 obsolete target dependent info.
4050 * opt.ads (Generate_Target_Dependent_Info):
4051 Removed (Target_Dependent_Info_Read): New flag
4052 (Target_Dependent_Info_Write): New flag
4053 * output.adb: Minor comment change
4054 * s-os_lib.ads: Minor reformatting
4055 * set_targ.ads, set_targ.adb: Minor reformatting.
4056 * switch-c.adb (Scan_Switches.First_Ptr): New variable
4057 (Scan_Front_End_Switches): Check -gnatd.b, -gnateT come first
4058 (Scan_Front_End_Switches): Handle -gnatet, -gnateT
4059 * ttypes.ads: Remove documentation section on target dependent
4060 info in ali file Remove four letter codes, no longer used Instead
4061 of using Get_Targ.Get_xxx, we use Set_Targ.xxx
4062 * usage.adb: Add usage lines for -gnatet/-gnateT
4063 * gcc-interface/Make-lang.in: Update dependencies.
4064
4065 2013-04-11 Thomas Quinot <quinot@adacore.com>
4066
4067 * sem_ch4.adb: Update documentation.
4068 * sinfo.ads (N_Expression_With_Actions): Ditto.
4069
4070 2013-04-11 Hristian Kirtchev <kirtchev@adacore.com>
4071
4072 * sem_ch13.adb (Analyze_Aspect_Specifications):
4073 Add a guard to prevent the double insertion of the same aspect
4074 into a rep item list. This previously led to a circularity.
4075
4076 2013-04-11 Ed Schonberg <schonberg@adacore.com>
4077
4078 * sem_attr.adb (Eval_Attribute, case 'Access): Reject attribute
4079 reference if the prefix is the dereference of an anonymous access
4080 to subprogram type.
4081 * exp_attr.adb (Expand_N_Attribute_Reference, Access_Cases): Handle
4082 properly a reference to the current instance of a protected type
4083 from within a protected subprogram.
4084 * sem_res.adb (Find_Unique_Access_Type): Treat
4085 Attribute_Access_Type like Allocator_Type when resolving an
4086 equality operator.
4087
4088 2013-04-11 Arnaud Charlet <charlet@adacore.com>
4089
4090 * xgnatugn.adb: Remove obsolete comments.
4091
4092 2013-04-11 Robert Dewar <dewar@adacore.com>
4093
4094 * back_end.ads, back_end.adb: Minor reformatting.
4095 * set_targ.ads, set_targ.adb: New files.
4096
4097 2013-04-11 Hristian Kirtchev <kirtchev@adacore.com>
4098
4099 * sem_case.adb (Check_Against_Predicate): New routine.
4100 (Check_Choices): When the type covered by the list of choices
4101 is a static subtype with a static predicate, check all choices
4102 agains the predicate.
4103 (Issue_Msg): All versions removed.
4104 (Missing_Choice): New routines.
4105 * sem_ch4.adb: Code and comment reformatting.
4106 (Analyze_Case_Expression): Do not check the choices when the case
4107 expression is being preanalyzed and the type of the expression
4108 is a subtype with a static predicate.
4109 (Has_Static_Predicate): New routine.
4110 * sem_ch13.adb: Code and comment reformatting. (Build_Range):
4111 Always build a range even if the low and hi bounds denote the
4112 same value. This is needed by the machinery in Check_Choices.
4113 (Build_Static_Predicate): Always build a range even if the low and
4114 hi bounds denote the same value. This is needed by the machinery
4115 in Check_Choices.
4116
4117 2013-04-11 Robert Dewar <dewar@adacore.com>
4118
4119 * einfo.ads, sem_util.adb, exp_ch6.adb, xgnatugn.adb: Minor
4120 reformatting.
4121
4122 2013-04-11 Doug Rupp <rupp@adacore.com>
4123
4124 * gnatlink.adb: Fold program basename to lower case on VMS for
4125 consistency.
4126
4127 2013-04-11 Matthew Heaney <heaney@adacore.com>
4128
4129 * a-rbtgbo.adb (Generic_Equal): Initialize Result variable before
4130 entering loop.
4131
4132 2013-04-11 Arnaud Charlet <charlet@adacore.com>
4133
4134 * xgnatugn.adb: Remove dead code (handling of @ifset/@ifclear).
4135
4136 2013-04-11 Arnaud Charlet <charlet@adacore.com>
4137
4138 * gnat_ugn.texi: Remove some use of ifset in menus. Not strictly
4139 needed, and seems to confuse some versions of makeinfo.
4140
4141 2013-04-11 Javier Miranda <miranda@adacore.com>
4142
4143 * einfo.adb (Is_Thunk): Remove assertion.
4144 (Set_Is_Thunk): Add assertion.
4145 * einfo.ads (Is_Thunk): Complete documentation.
4146 * exp_ch11.adb (Expand_N_Handled_Sequence_Of_Statements): Code cleanup.
4147 * exp_ch3.ad[sb] (Is_Variable_Size_Array): Moved to sem_util
4148 (Is_Variable_Size_Record): Moved to sem_util
4149 * exp_ch6.adb (Expand_Call): Code cleanup.
4150 (Expand_N_Extended_Return_Statement): Code cleanup.
4151 (Expand_Simple_Function_Return): Code cleanup.
4152 * exp_disp.adb Remove dependency on exp_ch3
4153 (Expand_Interface_Thunk): Add minimum decoration needed to set
4154 attribute Is_Thunk.
4155 * sem_ch3.ad[sb] (Is_Constant_Bound): moved to sem_util
4156 * sem_util.ad[sb] (Is_Constant_Bound): Moved from
4157 sem_ch3 (Is_Variable_Size_Array): Moved from exp_ch3
4158 (Is_Variable_Size_Record): Moved from exp_ch3
4159
4160 2013-04-11 Javier Miranda <miranda@adacore.com>
4161
4162 * exp_ch11.adb (Expand_N_Handled_Sequence_Of_Statements): Do
4163 not add cleanup actions in thunks associated with interface types.
4164 * exp_ch3.ad[sb] (Is_Variable_Size_Record): Move declaration to
4165 the package spec.
4166 * exp_ch4.adb (Tagged_Conversion): Update call to
4167 Expand_Interface_Conversion since the parameter Is_Static is no
4168 longer needed.
4169 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Adding
4170 assertion to ensure that interface thunks are never handled by
4171 this routine.
4172 (Expand_N_Simple_Function_Return): Do not rewrite this statement
4173 as an extended return statement in interface thunks, and do not
4174 perform copy in the secondary stack if the return statement is
4175 located in a thunk.
4176 * exp_disp.adb (Expand_Dispatching_Call): No longer displace
4177 the pointer to the returned object in functions returning interface
4178 types.
4179 (Expand_Interface_Thunk): For functions returning interface types
4180 displace the pointer to the returned object.
4181 (Expand_Interface_Conversion): Remove formal
4182 Is_Static since this subprogram can now evaluate it locally.
4183 * sem_ch3.adb (Add_Internal_Interface_Entities): For functions
4184 propagate the type returned by the covered interface primitive to
4185 the internal interface entity. Needed by the thunk to generate
4186 the code which displaces "this" to reference the corresponding
4187 secondary dispatch table.
4188 * sem_disp.adb (Propagate_Tag): Update call to
4189 Expand_Interface_Conversion since the parameter Is_Static is no
4190 longer needed.
4191 * sem_res.adb (Resolve_Type_Conversion): Update calls to
4192 Expand_Interface_Conversion since the parameter Is_Static is no
4193 longer needed plus code cleanup.
4194
4195 2013-04-11 Eric Botcazou <ebotcazou@adacore.com>
4196
4197 * init.c (RETURN_ADDR_OFFSET): Delete as unused.
4198
4199 2013-04-11 Robert Dewar <dewar@adacore.com>
4200
4201 * a-crbtgk.adb, a-ciorse.adb, a-crbtgo.adb, a-coorse.adb, a-rbtgbo.adb,
4202 a-cborse.adb, a-rbtgso.adb, exp_ch3.adb: Minor reformatting.
4203
4204 2013-04-11 Yannick Moy <moy@adacore.com>
4205
4206 * exp_ch4.adb (Expand_N_Selected_Component): Do not expand
4207 discriminant check for Unchecked_Union.
4208 * sem_res.adb (Resolve_Selected_Component): Set flag
4209 Do_Discriminant_Check even when expansion is not performed.
4210 * sinfo.ads (Do_Discriminant_Check): Update documentation for the case
4211 of Unchecked_Union.
4212
4213 2013-04-11 Thomas Quinot <quinot@adacore.com>
4214
4215 * sem_ch13.adb (Same_Representation): Two types with different scalar
4216 storage order never have the same representation.
4217
4218 2013-04-11 Arnaud Charlet <charlet@adacore.com>
4219
4220 * xgnatugn.adb (Push_Conditional): Simplify handling,
4221 no longer need to keep track of "excluding" sections.
4222 (Currently_Excluding): Removed.
4223 (Process_Source_File):
4224 Set unw/vms flag so that texinfo can do the whole handling of
4225 @ifset/@ifclear sections. Fix handling of nested @ifset/@ifclear
4226 sections.
4227 * gnat_ugn.texi: Add a section on performing unassisted install
4228 on Windows.
4229
4230 2013-04-11 Johannes Kanig <kanig@adacore.com>
4231
4232 * debug.adb: Document usage of -gnatd.Q switch.
4233
4234 2013-04-11 Matthew Heaney <heaney@adacore.com>
4235
4236 * a-crbtgk.adb (Ceiling, Find, Floor): Adjust locks
4237 before element comparisons.
4238 (Generic_Conditional_Insert, Generic_Conditional_Insert_With_Hint):
4239 Ditto.
4240 * a-crbtgo.adb, a-rbtgbo.adb (Generic_Equal): Adjust locks before
4241 element comparisons.
4242 * a-rbtgso.adb (Difference, Intersection): Adjust locks
4243 before element comparisons.
4244 (Is_Subset, Overlap): Ditto
4245 (Symmetric_Difference, Union): Ditto
4246 * a-btgbso.adb (Set_Difference, Set_Intersection): Adjust locks
4247 before element comparisons.
4248 (Set_Subset, Set_Overlap): Ditto
4249 (Set_Symmetric_Difference, Set_Union): Ditto
4250 * a-coorse.adb, a-ciorse.adb, a-cborse.adb
4251 (Update_Element_Preserving_Key): Adjust locks before element
4252 comparisons (Replace_Element): Ditto
4253
4254 2013-04-11 Pascal Obry <obry@adacore.com>
4255
4256 * prj-attr.adb, projects.texi, snames.ads-tmpl: Remove Build_Slaves
4257 attribute.
4258
4259 2013-04-11 Ed Schonberg <schonberg@adacore.com>
4260
4261 * exp_ch3.adb (Build_Equivalent_Aggregate): Subsidiary of
4262 Expand_N_Object_Declaration, used to construct an aggregate
4263 with static components whenever possible, so that objects of a
4264 discriminated type can be initialized without calling the init.
4265 proc for the type.
4266
4267 2013-04-11 Vincent Celier <celier@adacore.com>
4268
4269 * prj-makr.adb (Process_Directory): On VMS, always delete,
4270 then recreate the temporary file with Create_Output_Text_File,
4271 otherwise the output redirection does not work properly.
4272
4273 2013-04-11 Eric Botcazou <ebotcazou@adacore.com>
4274
4275 * urealp.ads: Fix minor typo.
4276
4277 2013-04-11 Fabien Chouteau <chouteau@adacore.com>
4278
4279 * cio.c (mktemp): Don't use tmpnam function from the
4280 system on VxWorks in kernel mode.
4281
4282 2013-04-11 Vincent Celier <celier@adacore.com>
4283
4284 * make.adb (Compile): Clarify the error message reported
4285 when gnatmake refuses to compile a runtime source.
4286 (Start_Compile_If_Possible): Ditto.
4287
4288 2013-04-11 Vincent Celier <celier@adacore.com>
4289
4290 * gnat_ugn.texi: Add documentation about -gnatc and gnatmake.
4291
4292 2013-04-11 Vincent Celier <celier@adacore.com>
4293
4294 * switch-c.adb: Document internal switches.
4295 * usage.adb: Remove lines for internal switches: -gnatea, -gnateO,
4296 -gnatez and -gnateO.
4297
4298 2013-04-11 Ed Schonberg <schonberg@adacore.com>
4299
4300 * par-ch6.adb (P_Subprogram): Attach aspects to subprogram stub.
4301 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Allow aspects on
4302 subprogram stubs.
4303 * sem_ch13.adb (Analyze_Aspect_Specifications): Analyze generated
4304 pre/post pragmas at once before analyzing the proper body.
4305 * sem_prag.adb (Chain_PPC): Handle pragma that comes from an
4306 aspect on a subprogram stub.
4307 * aspects.adb: Aspect specifications can appear on a
4308 subprogram_Body_Stub.
4309
4310 2013-04-11 Vincent Celier <celier@adacore.com>
4311
4312 * gnatname.adb: Minor comment fix.
4313
4314 2013-04-11 Vincent Celier <celier@adacore.com>
4315
4316 * prj-makr.adb (Process_Directory): Create a new temporary
4317 file for each invocation of the compiler, in directory pointed
4318 by environment variable TMPDIR if it exists.
4319
4320 2013-04-11 Arnaud Charlet <charlet@adacore.com>
4321
4322 * gnat_ugn.texi: Minor editing/clean ups.
4323
4324 2013-04-11 Ed Schonberg <schonberg@adacore.com>
4325
4326 * sem_ch6.adb (Analyze_Null_Procedure): New subprogram, mostly
4327 extracted from Analyze_Subprogram_Declaration, to handle null
4328 procedure declarations that in ada 2012 can be completions of
4329 previous declarations.
4330
4331 2013-04-11 Hristian Kirtchev <kirtchev@adacore.com>
4332
4333 * sem_prag.adb (Entity_Of): Moved to Exp_Util.
4334 * exp_util.ads, exp_util.adb (Entity_Of): New routine.
4335
4336 2013-04-11 Robert Dewar <dewar@adacore.com>
4337
4338 * g-spipat.ads: Minor comment fix.
4339
4340 2013-04-11 Robert Dewar <dewar@adacore.com>
4341
4342 * sem_prag.adb, sem_util.adb, sem_res.adb, exp_ch4.adb: Minor
4343 reformatting.
4344
4345 2013-04-11 Thomas Quinot <quinot@adacore.com>
4346
4347 * exp_util.ads (Fully_Qualified_Name_String): Document that the
4348 constructed literal is the entity name in all upper case.
4349
4350 2013-04-11 Thomas Quinot <quinot@adacore.com>
4351
4352 * sem_util.adb (Set_Entity_With_Style_Check): Fix logic of
4353 check for implementation defined identifiers.
4354
4355 2013-04-11 Yannick Moy <moy@adacore.com>
4356
4357 * checks.adb (Apply_Type_Conversion_Checks): Add an explanation
4358 of why range check and length are put on different nodes.
4359 * exp_ch4.adb (Apply_Type_Conversion_Checks): Remove check marks
4360 when doing their expansion.
4361
4362 2013-04-11 Ed Schonberg <schonberg@adacore.com>
4363
4364 * sem_util.ads, sem_util.adb (Get_Incomplete_View_Of_Ancestor):
4365 New function to implement the notion introduced in RM 7.3.1
4366 (5.2/3): in a child unit, a derived type is within the derivation
4367 class of an ancestor declared in a parent unit, even if there
4368 is an intermediate derivation that does not see the full view
4369 of that ancestor.
4370 * sem_res.adb (Valid_Conversion): if all else fails, examine if an
4371 incomplete view of an ancestor makes a numeric conversion legal.
4372
4373 2013-04-11 Ed Schonberg <schonberg@adacore.com>
4374
4375 * sem_ch6.adb: in Ada2012 operators can only have in
4376 parameters.
4377
4378 2013-04-11 Vincent Celier <celier@adacore.com>
4379
4380 * makeutl.adb (Create_Binder_Mapping_File): Do not put into
4381 the mapping file ALI files of sources that have been replaced.
4382
4383 2013-04-11 Vincent Celier <celier@adacore.com>
4384
4385 * projects.texi: Add subsection Duplicate Sources in Projects.
4386
4387 2013-04-11 Vincent Celier <celier@adacore.com>
4388
4389 * gnat_ugn.texi: Add documentation for gnatmake switch -droot_dir/**
4390
4391 2013-04-11 Arnaud Charlet <charlet@adacore.com>
4392
4393 * init.c (__gnat_install_handler): Only set up an alternate
4394 stack when installing a signal handler for SIGSEGV.
4395
4396 2013-04-11 Thomas Quinot <quinot@adacore.com>
4397
4398 * g-socket.adb (Connect_Socket, timeout version): Call
4399 underlying connect operation directly, not through the 2-argument
4400 Connect_Socket thick binding, in order to avoid raising a junk
4401 exception for the EINPROGRESS return.
4402
4403 2013-04-11 Robert Dewar <dewar@adacore.com>
4404
4405 * a-cdlili.adb: Minor addition of pragma Warnings (Off).
4406
4407 2013-04-11 Robert Dewar <dewar@adacore.com>
4408
4409 * hostparm.ads: Minor reformatting.
4410
4411 2013-04-11 Hristian Kirtchev <kirtchev@adacore.com>
4412
4413 * aspects.ads, aspects.adb: Add Aspect_Depends to all the relevant
4414 tables.
4415 * elists.ads, elists.adb (Contains): New routine.
4416 * par-prag.adb: Pragma Depends does not need any special treatment
4417 by the parser.
4418 * sem_ch13.adb (Analyze_Aspect_Specifications):
4419 Transform aspect Depends into a corresponding pragma.
4420 (Check_Aspect_At_Freeze_Point): Aspect Depends does not need
4421 inspection at its freeze point.
4422 * sem_prag.adb (Analyze_Pragma): Perform analysis and
4423 normalization of pragma Depends. Remove the use of function
4424 Is_Duplicate_Item. Use End_Scope to uninstalle the formal
4425 parameters of a subprogram. Add a value for pragma Depends in
4426 table Sig_Flags.
4427 (Is_Duplicate_Item): Removed.
4428 * snames.ads-tmpl: Add predefined name for Depends as well as
4429 a pragma identifier.
4430
4431 2013-04-11 Arnaud Charlet <charlet@adacore.com>
4432
4433 * gnat1drv.adb: Minor code clean up.
4434
4435 2013-04-11 Arnaud Charlet <charlet@adacore.com>
4436
4437 * debug.adb, sem_ch13.adb (Analyze_Enumeration_Representation_Clause):
4438 Ignore enumeration rep clauses by default in CodePeer mode, unless
4439 -gnatd.I is specified.
4440
4441 2013-04-11 Ed Schonberg <schonberg@adacore.com>
4442
4443 * sem_util.adb (Safe_To_Capture_Value): If the node belongs to
4444 an expression that has been attached to the else_actions of an
4445 if-expression, the capture is not safe.
4446
4447 2013-04-11 Yannick Moy <moy@adacore.com>
4448
4449 * checks.adb (Apply_Type_Conversion_Checks): Put check mark on type
4450 conversion for arrays.
4451
4452 2013-04-11 Robert Dewar <dewar@adacore.com>
4453
4454 * a-cdlili.adb, a-cidlli.adb, a-cbdlli.adb: Minor reformatting.
4455
4456 2013-04-11 Johannes Kanig <kanig@adacore.com>
4457
4458 * adabkend.adb: Minor comment addition.
4459
4460 2013-04-11 Matthew Heaney <heaney@adacore.com>
4461
4462 * a-cdlili.adb, a-cidlli.adb, a-cbdlli.adb ("="): Increment
4463 lock counts before entering loop.
4464 (Find): Ditto.
4465 (Is_Sorted, Merge, Sort): Ditto.
4466 (Reverse_Find): Ditto.
4467 (Splice_Internal): Internal operation to refactor splicing logic.
4468 (Splice): Some logic moved into Splice_Internal.
4469
4470 2013-04-11 Johannes Kanig <kanig@adacore.com>
4471
4472 * adabkend.adb (Scan_Compiler_Arguments): Do not call
4473 Set_Output_Object_File_Name in Alfa_Mode
4474 * gnat1drv.adb (Adjust_Global_Switches): Take Alfa_Mode into account.
4475 * opt.ads: Fix documentation.
4476
4477 2013-04-11 Robert Dewar <dewar@adacore.com>
4478
4479 * sem_res.adb: Minor code reorganization and comment fixes.
4480 * sem_type.adb: Minor reformatting.
4481
4482 2013-04-11 Hristian Kirtchev <kirtchev@adacore.com>
4483
4484 * exp_ch4.adb (Process_Transient_Object): Add new
4485 local variable Fin_Call. Remove and explain ??? comment. Use the
4486 Actions of logical operators "and then" and "or else" to insert
4487 the generated finalization call.
4488
4489 2013-04-11 Eric Botcazou <ebotcazou@adacore.com>
4490
4491 * gnat_rm.texi: Fix typo.
4492
4493 2013-04-11 Ed Schonberg <schonberg@adacore.com>
4494
4495 * sem_res.adb: Minor reformatting.
4496
4497 2013-04-11 Robert Dewar <dewar@adacore.com>
4498
4499 * atree.h: Add declarations for Flag255-Flag289 Fix declaration
4500 of Field30 (was wrong, but no effect, since not yet referenced by
4501 back end) Add declarations for Field31-Field35 Add declarations
4502 for Node31-Node35.
4503 * einfo.ads, einfo.adb (Has_Invariants): No longer applies to
4504 procedures.
4505 (Has_Predicates): No longer applies to functions.
4506 (Is_Predicate_Function): New flag.
4507 (Is_Predicate_Function_M): New flag.
4508 (Is_Invariant_Procedure): New flag.
4509 (Predicate_Function_M): New function.
4510 (Set_Predicate_Function_M): New procedure.
4511 * exp_ch11.adb (Expand_N_Raise_Expression): Take care of special
4512 case of appearing in predicate used for membership test.
4513 * exp_ch3.adb (Insert_Component_Invariant_Checks): Set
4514 Is_Invariant_Procedure flag.
4515 * exp_ch4.adb (Expand_Op_In): Call special predicate function
4516 that takes care of raise_expression nodes in the predicate.
4517 * exp_util.ads, exp_util.adb (Make_Predicate_Call): Add argument Mem for
4518 membership case.
4519 * sem_ch13.adb (Build_Predicate_Functions): New name for
4520 Build_Predicate_Function. Major rewrite to take care of raise
4521 expression in predicate for membership tests.
4522 * sem_res.adb (Resolve_Actuals): Include both predicate functions
4523 in defense against infinite predicate function loops.
4524 * sinfo.ads, sinfo.adb (Convert_To_Return_False): New flag.
4525
4526 2013-04-11 Robert Dewar <dewar@adacore.com>
4527
4528 * sem_prag.adb: Minor reformatting.
4529
4530 2013-04-11 Ed Schonberg <schonberg@adacore.com>
4531
4532 * lib-xref.adb: Generate reference for component of anonymous
4533 access type.
4534
4535 2013-04-11 Robert Dewar <dewar@adacore.com>
4536
4537 * stand.ads: Minor reformatting.
4538
4539 2013-04-11 Matthew Heaney <heaney@adacore.com>
4540
4541 * a-convec.adb, a-coinve.adb, a-cobove.adb ("="): Increment lock
4542 counts before entering loop.
4543 (Find, Find_Index): Ditto.
4544 (Is_Sorted, Merge, Sort): Ditto.
4545 (Reverse_Find, Reverse_Find_Index): Ditto.
4546
4547 2013-04-11 Robert Dewar <dewar@adacore.com>
4548
4549 * exp_ch11.ads, exp_ch11.adb (Expand_N_Raise_Expression): New procedure.
4550 * exp_util.adb (Insert_Actions): Add entry for N_Raise_Expression.
4551 * expander.adb: Add call to Expand_N_Raise_Expression.
4552 * par-ch11.adb (P_Raise_Expression): New procedure.
4553 * par-ch4.adb (P_Relation): Handle Raise_Expression.
4554 * par.adb (P_Raise_Expression): New procedure.
4555 * sem.adb: Add handling for N_Raise_Expression.
4556 * sem_ch11.ads, sem_ch11.adb (Analyze_Raise_Expression): New procedure.
4557 * sem_res.adb (Resolve): Add handling for N_Raise_Expression.
4558 * sinfo.ads, sinfo.adb (N_Raise_Expression): New node.
4559 * sprint.adb (Sprint_Node_Actual): Add handling for N_Raise_Expression.
4560 * stand.ads (Any_Type): Document use with N_Raise_Expression.
4561
4562 2013-04-11 Vincent Celier <celier@adacore.com>
4563
4564 * gnat_ugn.texi: Remove section "The Development Environments"
4565 now that all predefined attributes are documented, including
4566 those in package IDE.
4567
4568 2013-04-11 Ed Schonberg <schonberg@adacore.com>
4569
4570 * sem_ch6.adb: Preserve parent link in copy of expression.
4571
4572 2013-04-11 Vincent Celier <celier@adacore.com>
4573
4574 * projects.texi: Complete rewrite of the subsection Attributes
4575 in section "Project file Reference".
4576
4577 2013-04-11 Robert Dewar <dewar@adacore.com>
4578
4579 * exp_ch4.adb: Minor reformatting.
4580
4581 2013-04-11 Robert Dewar <dewar@adacore.com>
4582
4583 * exp_ch4.adb (Expand_Concatenate): Remove wrapping in
4584 expression-with-actions node. No longer needed given fix to
4585 sem_prag and caused loss of some useful warnings.
4586 * sem.ads: Minor reformatting.
4587 * sem_prag.adb (Check_Disabled): Removed, to be replaced by not
4588 Check_Enabled. These two routines were curiously incompatible
4589 causing confusion.
4590 (Analyze_Pragma, case Check): Make sure we do
4591 not expand the string argument if the check is disabled. Avoid
4592 use of Check_Disabled, which resulted in missing analysis in
4593 some cases.
4594 * sem_prag.ads (Check_Disabled): Removed, to be replaced by not
4595 Check_Enabled. These two routines were curiously incompatible
4596 causing confusion.
4597
4598 2013-04-11 Hristian Kirtchev <kirtchev@adacore.com>
4599
4600 * exp_ch4.adb (Process_Transient_Object): Use
4601 an unchecked conversion when associating a transient controlled
4602 object with its "hook".
4603
4604 2013-04-11 Ed Schonberg <schonberg@adacore.com>
4605
4606 * sem_prag.adb (Analyze_Pragma, case
4607 Preelaborable_Initialization): The pragma is legal if it comes
4608 from an aspect on the private view of the type, even though its
4609 analysis point takes place later at the freeze point.
4610
4611 2013-04-11 Robert Dewar <dewar@adacore.com>
4612
4613 * sem_ch6.adb: Minor reformatting.
4614
4615 2013-04-11 Yannick Moy <moy@adacore.com>
4616
4617 * ali-util.adb (Read_Withed_ALIs): Do not consider it an error to
4618 read ALI files with No_Object=True in Alfa mode.
4619 * gnat1drv.adb: Set appropriately Back_End_Mode in Alfa mode, whether
4620 this is during frame condition generation of translation to Why.
4621
4622 2013-04-11 Robert Dewar <dewar@adacore.com>
4623
4624 * exp_ch4.adb: Minor code reorganization
4625 * types.ads: Minor reformatting.
4626
4627 2013-04-11 Johannes Kanig <kanig@adacore.com>
4628
4629 * opt.ads New global boolean Frame_Condition_Mode to avoid
4630 referring to command line switch.
4631 * gnat1drv.adb (Gnat1drv) set frame condition mode when -gnatd.G
4632 is present, and disable Code generation in that case. Disable
4633 ALI file generation when switch is *not* present.
4634
4635 2013-04-11 Ed Schonberg <schonberg@adacore.com>
4636
4637 * sem_ch6.adb (Analyze_Expression_Function): Perform the
4638 pre-analysis on a copy of the expression, to prevent downstream
4639 visbility issues involving operators and instantiations.
4640
4641 2013-04-11 Johannes Kanig <kanig@adacore.com>
4642
4643 * debug.adb: Reservation and documentation for -gnatd.G switch.
4644 * gnat1drv.adb (Adjust_Global_Switches) Take into account -gnatd.G
4645 switch, and set ALI file generation accordingly.
4646
4647 2013-04-11 Robert Dewar <dewar@adacore.com>
4648
4649 * exp_ch4.adb, exp_dist.adb: Minor reformatting.
4650 * gnat_rm.texi, gnat_ugn.texi: -020 Add documentation clarifying that
4651 check names introduced with pragma Check_Name are suppressed by -gnatp.
4652
4653 2013-04-11 Vincent Celier <celier@adacore.com>
4654
4655 * gnat_ugn.texi, projects.texi: Move chapter "Tools Supporting Project
4656 Files" from projects.texi to gnat_ugn.texi.
4657
4658 2013-04-11 Arnaud Charlet <charlet@adacore.com>
4659
4660 * gcc-interface/Make-lang.in: Update dependencies.
4661
4662 2013-04-11 Yannick Moy <moy@adacore.com>
4663
4664 * gnat1drv.adb (Adjust_Global_Switches): Allow missing body in Alfa
4665 mode.
4666
4667 2013-04-11 Hristian Kirtchev <kirtchev@adacore.com>
4668
4669 * exp_ch4.adb (Expand_N_Allocator): Detect the
4670 allocation of an anonymous controlled object where the type of
4671 the context is named. Use the pool and finalization master of
4672 the named access type to allocate the object.
4673
4674 2013-04-11 Vincent Celier <celier@adacore.com>
4675
4676 * gnat_ugn.texi: Remove most mentions of gprbuild.
4677 * projects.texi: Remove all mentions of asociative array
4678 attributes.
4679
4680 2013-04-11 Robert Dewar <dewar@adacore.com>
4681
4682 * sem_prag.adb, sem_attr.adb, gnat1drv.adb, prj-makr.adb,
4683 opt.ads, sem_ch13.adb: Minor reformatting.
4684 * debug.adb: Minor comment fix (remove junk .I doc).
4685
4686 2013-04-11 Thomas Quinot <quinot@adacore.com>
4687
4688 * rtsfind.ads, exp_dist.adb, exp_dist.ads (Rtsfind.PCS_Version, case
4689 PolyORB): Bump to 6.
4690 (Exp_Dist.PolyORB_Support): Replace TC_Build with
4691 Build_Complex_TC.
4692
4693 2013-04-11 Arnaud Charlet <charlet@adacore.com>
4694
4695 * debug.adb, sem_prag.adb, par-ch2.adb, sem_attr.adb, gnat1drv.adb,
4696 exp_disp.adb, opt.ads, sem_ch13.adb (Relaxed_RM_Semantics): New flag.
4697 Enable this flag in CodePeer mode, and also via -gnatd.M.
4698 Replace some uses of CodePeer_Mode by Relaxed_RM_Semantics.
4699
4700 2013-04-11 Ed Schonberg <schonberg@adacore.com>
4701
4702 * sem_ch8.adb (Check_Constrained_Object): If a subtype is created
4703 from the renamed object in an object renaming declaration with
4704 an unconstrained nominal subtype, freeze the created subtype at
4705 once, to prevent order of elaboration issues in the backend.
4706
4707 2013-04-11 Arnaud Charlet <charlet@adacore.com>
4708
4709 * exp_aggr.adb (Aggr_Size_OK): Refine setting of Max_Aggr_Size
4710 in particular in CodePeer mode.
4711
4712 2013-04-11 Vincent Celier <celier@adacore.com>
4713
4714 * gnat_ugn.texi: Add documentation for backup copies of project
4715 files for gnatname.
4716
4717 2013-04-11 Tristan Gingold <gingold@adacore.com>
4718
4719 * gnat_rm.texi: Add Detect_BLocking in the ravenscar profile
4720 pragma list.
4721
4722 2013-04-11 Vincent Celier <celier@adacore.com>
4723
4724 * gnatname.adb (Scan_Args): Recognize new switch --no-backup
4725 (Usage): Add line for --no-backup.
4726 * opt.ads (No_Backup): New Boolean variable, initialized to False.
4727 (Ada_Version_Default): Switch to Ada 2012 by default.
4728 * prj-makr.adb (Initialize): Create a backup for an existing
4729 project file if gnatname is not invoked with --no-backup.
4730
4731 2013-04-11 Thomas Quinot <quinot@adacore.com>
4732
4733 * exp_ch4.adb: Minor code improvement: replace various calls to
4734 Make_If_Statement in expansion with Make_Implicit_If_Statement.
4735
4736 2013-04-11 Eric Botcazou <ebotcazou@adacore.com>
4737
4738 * ali.adb: Fix minor typo.
4739
4740 2013-04-11 Thomas Quinot <quinot@adacore.com>
4741
4742 * exp_ch4.adb (Find_Enclosing_Context): Add missing case of
4743 N_Procedure_Call_Statement.
4744
4745 2013-04-11 Robert Dewar <dewar@adacore.com>
4746
4747 * debug.adb: Minor comment fix.
4748
4749 2013-04-11 Johannes Kanig <kanig@adacore.com>
4750
4751 * debug.adb: Remove comment for -gnatd.G.
4752
4753 2013-04-11 Thomas Quinot <quinot@adacore.com>
4754
4755 * exp_ch4.adb (Expand_Record_Equality.Suitable_Element):
4756 Remove recursive routine, replace with...
4757 (Expand_Record_Equality.Element_To_Compare): New subroutine,
4758 implement iterative search for next element to compare.
4759 Add explanatory comment in the tagged case.
4760
4761 2013-04-11 Ed Schonberg <schonberg@adacore.com>
4762
4763 * sem_ch5.adb: remove spurious warning from non-empty loop.
4764 * sem_ch8.adb (Enclosing_Instance): Make public to other routines
4765 in the package, in order to suppress redundant semantic checks
4766 on subprogram renamings in nested instantiations.
4767
4768 2013-04-11 Robert Dewar <dewar@adacore.com>
4769
4770 * errout.ads: Minor reformatting.
4771 * sem_eval.adb (Why_Not_Static): Now issues continuation messages
4772 (Why_Not_Static): Test for aggregates behind string literals.
4773 * sem_eval.ads (Why_Not_Static): Now issues continuation messages.
4774
4775 2013-04-11 Robert Dewar <dewar@adacore.com>
4776
4777 * exp_ch4.adb (Expand_Concatenation): Wrap expansion in
4778 Expressions_With_Actions.
4779
4780 2013-04-11 Ed Schonberg <schonberg@adacore.com>
4781
4782 * sem_ch6.adb (Base_Types_Match): For an actual type in an
4783 instance, the base type may itself be a subtype, so find true
4784 base type to determine compatibility.
4785
4786 2013-04-11 Robert Dewar <dewar@adacore.com>
4787
4788 * s-osprim-mingw.adb, sem_ch3.adb, sem_prag.adb, sem_util.adb.
4789 makeutl.adb, sem_ch8.adb: Minor reformatting.
4790
4791 2013-04-11 Vincent Celier <celier@adacore.com>
4792
4793 * gnat_ugn.texi: Minor fixes for VMS.
4794 * ug_words: Minor addition: -gnato? => /OVERFLOW_CHECKS=?.
4795
4796 2013-04-11 Robert Dewar <dewar@adacore.com>
4797
4798 * usage.adb (Usage): Minor edit to -gnatW message
4799
4800 2013-04-11 Robert Dewar <dewar@adacore.com>
4801
4802 * exp_aggr.adb (Expand_N_Aggregate): Add circuit for handling
4803 others for string literal case. Also add big ??? comment about
4804 this new code, which should be redundant, but is not.
4805 * sem_eval.adb (Eval_Concatenation): Handle non-static case
4806 properly (Eval_String_Literal): Handle non-static literal properly
4807
4808 2013-03-20 Tobias Burnus <burnus@net-b.de>
4809
4810 * i-fortra.ads: Update comment, add Ada 2012's optional
4811 Star and Kind data types for enhanced interoperability.
4812
4813 2013-03-16 Eric Botcazou <ebotcazou@adacore.com>
4814
4815 * gnatvsn.ads (Library_Version): Bump to 4.9.
4816
4817 2013-03-08 Cesar Strauss <cestrauss@gmail.com>
4818
4819 PR ada/52123
4820 * seh_init.c (Raise_From_Signal_Handler): Declare as no-return.
4821 (__gnat_SEH_error_handler): Likewise. Remove final return.
4822
4823 2013-03-06 Eric Botcazou <ebotcazou@adacore.com>
4824
4825 * gcc-interface/trans.c (Attribute_to_gnu): Abort instead of erroring
4826 out for an unimplemented attribute.
4827
4828 2013-03-06 Eric Botcazou <ebotcazou@adacore.com>
4829
4830 * gcc-interface/decl.c (gnat_to_gnu_field): Remove the wrapper around
4831 a misaligned integral type if a size is specified for the field.
4832
4833 2013-03-06 Eric Botcazou <ebotcazou@adacore.com>
4834
4835 * gcc-interface/trans.c (Raise_Error_to_gnu) <CE_Index_Check_Failed>:
4836 Record the unpadded type of the index type on the RCI stack.
4837
4838 2013-03-06 Eric Botcazou <ebotcazou@adacore.com>
4839
4840 * gcc-interface/trans.c (emit_range_check): Assert that the range type
4841 is a numerical type and remove useless local variables.
4842
4843 2013-02-25 Eric Botcazou <ebotcazou@adacore.com>
4844
4845 * gcc-interface/ada-tree.h: Back out change accidentally committed.
4846
4847 2013-02-21 Jakub Jelinek <jakub@redhat.com>
4848
4849 PR bootstrap/56258
4850 * gnat-style.texi (@title): Remove @hfill.
4851 * projects.texi: Avoid line wrapping inside of @pxref or @xref.
4852
4853 2013-02-14 Rainer Emrich <rainer@emrich-ebersheim.de>
4854
4855 PR target/52123
4856 * tracebak.c: Cast from pointer via FARPROC.
4857
4858 2013-02-07 Simon Wright <simon@pushface.org>
4859
4860 PR target/50678
4861 * init.c (__darwin_major_version): New function for x86-64/Darwin.
4862 (__gnat_adjust_context_for_raise) [Darwin]: Disable the workaround
4863 on Darwin 12 and above.
4864
4865 2013-02-06 Rainer Emrich <rainer@emrich-ebersheim.de>
4866
4867 PR target/52123
4868 * adaint.c (__gnat_check_OWNER_ACL): Cast from pointer via
4869 SECURITY_DESCRIPTOR *
4870 (__gnat_set_OWNER_ACL): Cast from DWORD to ACCESS_MODE
4871 (__gnat_portable_spawn): Fix cast to char* const*
4872 (add_handle): Cast from pointer via void **
4873 (add_handle): Cast from pointer via int *
4874 (__gnat_locate_exec_on_path): Cast from pointer via TCHAR *
4875 (__gnat_locate_exec_on_path): Cast from pointer via char *
4876 * initialize.c (append_arg): Cast from pointer via LPWSTR
4877 (__gnat_initialize): Cast from pointer via LPWSTR
4878 * seh_init.c (__gnat_map_SEH): Cast from pointer via FARPROC
4879
4880 2013-02-06 Hristian Kirtchev <kirtchev@adacore.com>
4881
4882 * gcc-interface/Make-lang.in: Enable System.Stack_Checking.Operations
4883 target pairs on VxWorks 5 only.
4884
4885 2013-02-06 Arnaud Charlet <charlet@adacore.com>
4886
4887 * gcc-interface/Make-lang.in: Update dependencies.
4888
4889 2013-02-06 Vincent Celier <celier@adacore.com>
4890
4891 * prj-proc.adb (Process_Aggregated_Projects): Use a new project
4892 node tree for each project tree rooted at an aggregated project.
4893
4894 2013-02-06 Hristian Kirtchev <kirtchev@adacore.com>
4895
4896 * sem_util.adb (Is_Interface_Conversion): New routine.
4897 (Object_Access_Level): Detect an interface conversion
4898 that has been rewritten into a different construct. Use the
4899 original form of the conversion to find the access level of
4900 the operand.
4901
4902 2013-02-06 Eric Botcazou <ebotcazou@adacore.com>
4903
4904 * einfo.ads (Has_Pragma_No_Inline): New flag using Flag201.
4905 (Has_Pragma_No_Inline): Declare and mark as inline.
4906 (Set_Has_Pragma_No_Inline): Likewise.
4907 * einfo.adb (Has_Pragma_No_Inline): New function.
4908 (Set_Has_Pragma_No_Inline): New procedure.
4909 (Write_Entity_Flags): Handle Has_Pragma_No_Inline.
4910 * snames.ads-tmpl (Name_No_Inline): New pragma-related name.
4911 (Pragma_Id): Add Pragma_No_Inline value.
4912 * par-prag.adb (Prag): Handle Pragma_Inline.
4913 * sem_prag.adb (Inline_Status): New enumeration type.
4914 (Process_Inline): Change Active parameter
4915 to Inline_Status and add support for suppressed inlining.
4916 (Analyze_Pragma) <Pragma_Inline>: Adjust to above change.
4917 <Pragma_Inline_Always>: Likewise.
4918 <Pragma_No_Inline>: Implement new pragma No_Inline.
4919 (Sig_Flags): Add Pragma_No_Inline.
4920 * gnat_rm.texi (Implementation Defined Pragmas): Add No_Inline.
4921 * gnat_ugn.texi (Switches for gcc): Mention Pragma No_Inline.
4922
4923 2013-02-06 Pascal Obry <obry@adacore.com>
4924
4925 * s-osprim-mingw.adb (Clock): Make sure we copy all data locally
4926 to avoid interleaved modifications that could happen from another
4927 task calling Get_Base_Data.
4928 (Get_Base_Data): Make it a critical section. Avoid updating if another
4929 task has already done it.
4930
4931 2013-02-06 Eric Botcazou <ebotcazou@adacore.com>
4932
4933 * sem_prag.adb: Minor reformatting.
4934
4935 2013-02-06 Pascal Obry <obry@adacore.com>
4936
4937 * s-tasloc.ads: Set System.Task_Lock to preelaborate.
4938
4939 2013-02-06 Eric Botcazou <ebotcazou@adacore.com>
4940
4941 * snames.ads-tmpl (Name_Loop_Optimize, Name_No_Unroll,
4942 Name_Unroll, Name_No_Vector, Name_Vector): New pragma-related
4943 names.
4944 (Pragma_Id): Add Pragma_Loop_Optimize value.
4945 * par-prag.adb (Prag): Handle Pragma_Loop_Optimize.
4946 * sem_prag.adb (Check_Loop_Invariant_Variant_Placement): Rename to...
4947 (Check_Loop_Pragma_Placement): ...this.
4948 (Analyze_Pragma)
4949 <Pragma_Loop_Invariant>: Adjust to above renaming.
4950 <Loop_Variant>: Likewise.
4951 <Pragma_Loop_Optimize>: Implement new pragma Loop_Optimize.
4952 (Sig_Flags): Add Pragma_Loop_Optimize.
4953 * gnat_rm.texi (Implementation Defined Pragmas): Add Loop_Optimize.
4954 * gnat_ugn.texi (Vectorization of loops): Mention Loop_Optimize.
4955
4956 2013-02-06 Robert Dewar <dewar@adacore.com>
4957
4958 * osint.ads: Minor fix of typo.
4959
4960 2013-02-06 Sergey Rybin <rybin@adacore.com frybin>
4961
4962 * gnat_ugn.texi: gnatmetric: update the documentation of
4963 complexity metrics for Ada 2012.
4964
4965 2013-02-06 Javier Miranda <miranda@adacore.com>
4966
4967 * exp_disp.adb (Make_Secondary_DT): Code cleanup:
4968 remove useless initialization.
4969
4970 2013-02-06 Ed Schonberg <schonberg@adacore.com>
4971
4972 * sem_ch3.adb (Build_Discriminant_Constraints): Do not
4973 generate overflow checks on a discriminant expression if the
4974 discriminant constraint is applied to a private type that has
4975 a full view, because the check will be applied when the full
4976 view is elaborated. Removing the redundant check is not just
4977 an optimization, but it prevents spurious assembler errors,
4978 because of the way the backend generates names for expressions
4979 that require overflow checking.
4980
4981 2013-02-06 Pascal Obry <obry@adacore.com>
4982
4983 * s-osprim-mingw.adb: Removes workaround for an old GNU/Linker
4984 limitation on Windows.
4985 (DA): Removed.
4986 (LIA): Removed.
4987 (LLIA): Removed.
4988 (TFA): Removed.
4989 (BTA): Removed.
4990 (BMTA): Removed.
4991 (BCA): Removed.
4992 (BMCA): Removed.
4993 (BTiA): Removed.
4994 (Clock): Use variable corresponding to access.
4995 (Get_Base_Time): Likewise.
4996 (Monotonic_Clock): Likewise.
4997
4998 2013-02-06 Vincent Celier <celier@adacore.com>
4999
5000 * make.adb (Gnatmake): When gnatmake is called with a project
5001 file, do not invoke gnatbind with -I-.
5002 * makeutl.adb (Create_Binder_Mapping_File): Rewrite function. Get
5003 the infos from all the sources.
5004
5005 2013-02-06 Ed Schonberg <schonberg@adacore.com>
5006
5007 * snames.ads-tmpl: Add Name_Overriding_Renamings and pragma
5008 Overriding_Renamings.
5009 * par-prag.adb: Recognize pragma Overriding_Renamings.
5010 * opt.ads (Overriding_Renamings): flag to control compatibility
5011 mode with Rational compiler, replaces Rational_Profile flag.
5012 * sem_ch8.adb (Analyze_Subprogram_Renaming): When
5013 Overriding_Renamings is enabled, accept renaming declarations
5014 where the new subprogram renames and overrides a locally inherited
5015 operation. Improve error message for some illegal renamings.
5016 * sem_prag.adb (Analyze_Pragma): Add case for Overriding_Renamings.
5017 (Set_Rational_Profile): The Rational_Profile enables
5018 Overriding_Renamings, Implicit_Packing, and Use_Vads_Size.
5019
5020 2013-02-06 Ed Schonberg <schonberg@adacore.com>
5021
5022 * sem_util.adb: Set parent of copied aggregate component, to
5023 prevent infinite loop.
5024
5025 2013-02-06 Robert Dewar <dewar@adacore.com>
5026
5027 * sem_ch3.adb, sem_ch10.adb: Minor reformatting.
5028 * exp_disp.adb: Minor comment update.
5029 * comperr.ads, osint.ads, rtsfind.adb, sem_prag.adb: Minor addition of
5030 No_Return pragmas.
5031
5032 2013-02-06 Thomas Quinot <quinot@adacore.com>
5033
5034 * targparm.ads, sem_ch13.adb (Support_Nondefault_SSO): New target
5035 parameter, defaulted to False for now, indicates targets where
5036 non-default scalar storage order may be specified.
5037
5038 2013-02-06 Thomas Quinot <quinot@adacore.com>
5039
5040 * sprint.adb (Write_Itype): Treat E_Record_Subtype_With_Private
5041 same as E_Record_Subtype. Display E_Class_Wide_Subtype as
5042 subtype, not type.
5043
5044 2013-02-06 Hristian Kirtchev <kirtchev@adacore.com>
5045
5046 * sem_ch3.adb (Complete_Private_Subtype): Inherit the
5047 Has_Unknown_Discriminants from the full view of the base type.
5048
5049 2013-02-06 Tristan Gingold <gingold@adacore.com>
5050
5051 * raise-gcc.c: Remove useless includes (sys/stat.h, adaint.h)
5052 Enclosing debugging functions within #ifndef inhibit_libc to
5053 support builds without full C headers.
5054
5055 2013-02-06 Thomas Quinot <quinot@adacore.com>
5056
5057 * gnat_rm.texi: Add a minimal example of Scalar_Storage_Order.
5058
5059 2013-02-06 Hristian Kirtchev <kirtchev@adacore.com>
5060
5061 * sem_ch10.adb (Install_Limited_Withed_Unit): Add a missing
5062 check to detect a parent-child relationship between two units in
5063 order to correctly bypass the installation of a limited view. In
5064 other words, the comment on the intended usage of the check was
5065 correct, but the code itself did not reflect the behavior.
5066
5067 2013-02-06 Javier Miranda <miranda@adacore.com>
5068
5069 * exp_ch5.adb (Expand_N_Assignment_Statement): Do not generate the
5070 runtime check on assignment to tagged types if compiling with checks
5071 suppressed.
5072
5073 2013-02-06 Robert Dewar <dewar@adacore.com>
5074
5075 * exp_util.adb, checks.adb, sem_ch12.adb, sem_res.adb, prj-conf.adb,
5076 s-os_lib.adb: Minor reformatting
5077
5078 2013-02-06 Vincent Celier <celier@adacore.com>
5079
5080 * ug_words: Add -gnateY = /IGNORE_STYLE_CHECKS_PRAGMAS.
5081
5082 2013-02-06 Ed Schonberg <schonberg@adacore.com>
5083
5084 * snames.ads-tmpl: Add Name_Rational and pragma Rational.
5085 * par-prag.adb: Recognize pragma Rational.
5086 * opt.ads (Rational_Profile): flag to control compatibility mode
5087 with Rational compiler.
5088 * sem_ch8.adb (Analyze_Subprogram_Renaming): When Rational profile
5089 is enable, accept renaming declarations where the new subprogram
5090 and the renamed entity have the same name.
5091 * sem_prag.adb (analyze_pragma): Add pragma Rational, and recognize
5092 Rational as a profile.
5093
5094 2013-02-06 Hristian Kirtchev <kirtchev@adacore.com>
5095
5096 * exp_ch5.adb (Expand_Loop_Entry_Attributes): When
5097 dealing with a for loop that iterates over a subtype indication
5098 with a range, use the low and high bounds of the subtype.
5099
5100 2013-02-06 Nicolas Roche <roche@adacore.com>
5101
5102 * s-os_lib.adb (Normalize_Arguments): Arguments containing tabs should
5103 be quoted
5104
5105 2013-02-06 Vincent Celier <celier@adacore.com>
5106
5107 * prj-conf.adb (Process_Project_And_Apply_Config): New variable
5108 Conf_Project. New recursive procedure Check_Project to find a non
5109 aggregate project and put its Project_Id in Conf_Project. Fails if
5110 no such project can be found.
5111 (Get_Or_Create_Configuration_File): New parameter Conf_Project.
5112 (Do_Autoconf): Use project directory of project Conf_Project to store
5113 the generated configuration project file.
5114 * prj-conf.ads (Get_Or_Create_Configuration_File): New parameter
5115 Conf_Project.
5116
5117 2013-02-06 Javier Miranda <miranda@adacore.com>
5118
5119 * sem_res.adb (Resolve_Actuals): Generate a read
5120 reference for out-mode parameters in the cases specified by
5121 RM 6.4.1(12).
5122
5123 2013-02-06 Hristian Kirtchev <kirtchev@adacore.com>
5124
5125 * sem_attr.adb (Resolve_Attribute): Do not resolve the prefix of
5126 Loop_Entry, instead wait until the attribute has been expanded. The
5127 delay ensures that any generated checks or temporaries are inserted
5128 before the relocated prefix.
5129
5130 2013-02-06 Ed Schonberg <schonberg@adacore.com>
5131
5132 * sem_ch12.adb: Code clean up.
5133
5134 2013-02-06 Ed Schonberg <schonberg@adacore.com>
5135
5136 * checks.adb (Apply_Discriminant_Check): Look for discriminant
5137 constraint in full view of private type when needed.
5138 * sem_ch12.adb (Validate_Array_Type_Instance): Specialize
5139 previous patch to components types that are private and without
5140 discriminants.
5141
5142 2013-02-06 Hristian Kirtchev <kirtchev@adacore.com>
5143
5144 * exp_ch4.adb (Find_Enclosing_Context): Recognize
5145 a simple return statement as one of the cases that require special
5146 processing with respect to temporary controlled function results.
5147 (Process_Transient_Object): Do attempt to finalize a temporary
5148 controlled function result when the associated context is
5149 a simple return statement. Instead, leave this task to the
5150 general finalization mechanism.
5151
5152 2013-02-06 Thomas Quinot <quinot@adacore.com>
5153
5154 * einfo.ads: Minor reformatting.
5155 (Status_Flag_Or_Transient_Decl): Add ??? comment.
5156
5157 2013-02-06 Hristian Kirtchev <kirtchev@adacore.com>
5158
5159 * exp_ch4.adb (Expand_N_Expression_With_Actions): Rewritten. This
5160 routine should be able to properly detect controlled transient
5161 objects in its actions and generate the appropriate finalization
5162 actions.
5163 * exp_ch6.adb (Enclosing_Context): Removed.
5164 (Expand_Ctrl_Function_Call): Remove local subprogram and
5165 constant. Use routine Within_Case_Or_If_Expression to determine
5166 whether the lifetime of the function result must be extended to
5167 match that of the context.
5168 * exp_util.ads, exp_util.adb (Within_Case_Or_If_Expression): New
5169 routine.
5170
5171 2013-02-06 Ed Schonberg <schonberg@adacore.com>
5172
5173 * sem_ch12.adb (Validate_Array_Type_Instance): Extend check
5174 for subtype matching of component type of formal array type,
5175 to avoid spurious error when component type is a separate actual
5176 in the instance, and there may be a discrepancy between private
5177 and full view of component type.
5178
5179 2013-02-06 Robert Dewar <dewar@adacore.com>
5180
5181 * s-dim.ads, clean.adb: Minor reformatting.
5182
5183 2013-02-06 Javier Miranda <miranda@adacore.com>
5184
5185 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Undo previous patch.
5186 (Can_Split_Unconstrained_Function): Only split the inlined function if
5187 the compiler generates the code of its body.
5188
5189 2013-02-06 Robert Dewar <dewar@adacore.com>
5190
5191 * exp_prag.adb, sem_ch3.adb, exp_attr.adb, sem_prag.adb, sem_ch6.adb,
5192 exp_intr.adb, exp_dist.adb, sem_ch13.adb: Internal clean up for
5193 N_Pragma nodes.
5194
5195 2013-02-06 Robert Dewar <dewar@adacore.com>
5196
5197 * gnat_rm.texi: Minor text updates for pragma Warning.
5198
5199 2013-02-06 Geert Bosch <bosch@adacore.com>
5200
5201 * s-multip.adb (Number_Of_CPUs): Short-circuit in case of
5202 CPU'Last = 1.
5203
5204 2013-02-06 Vincent Celier <celier@adacore.com>
5205
5206 * clean.adb (Delete): On VMS use host notation to delete all files.
5207
5208 2013-02-06 Robert Dewar <dewar@adacore.com>
5209
5210 * sem_prag.adb, sem_ch6.adb, prj-conf.adb, erroutc.adb: Minor
5211 reformatting.
5212
5213 2013-02-06 Gary Dismukes <dismukes@adacore.com>
5214
5215 * sem_ch6.adb (Check_For_Primitive_Subprogram): Test for
5216 the special case of a user-defined equality that overrides
5217 the predefined equality of a nonderived type declared in a
5218 declarative part.
5219 * sem_util.adb (Collect_Primitive_Operations): Add test for
5220 Is_Primitive when looping over the subprograms following a type,
5221 to catch the case of primitives such as a user-defined equality,
5222 which otherwise won't be found when the type is not a derived
5223 type and is declared in a declarative part.
5224
5225 2013-02-06 Vincent Celier <celier@adacore.com>
5226
5227 * prj-conf.adb (Check_Target): Always return True when Target
5228 is empty (Get_Or_Create_Configuration_File.Get_Project_Target):
5229 New procedure to get the value of attribute Target in the main
5230 project.
5231 (Get_Or_Create_Configuration_File.Do_Autoconf): No
5232 need to get the value of attribute Target in the main project.
5233 (Get_Or_Create_Configuration_File): Call Get_Project_Target and
5234 use the target fom this call.
5235
5236 2013-02-06 Eric Botcazou <ebotcazou@adacore.com>
5237
5238 * erroutc.adb (Validate_Specific_Warning): Do not issue the
5239 warning about an ineffective Pragma Warnings for -Wxxx warnings.
5240 * sem_prag.adb (Analyze_Pragma) <Warnings>: Accept -Wxxx warnings.
5241 * gnat_rm.texi (Pragma Warnings): Document coordination with
5242 warnings of the GCC back-end.
5243
5244 2013-02-06 Javier Miranda <miranda@adacore.com>
5245
5246 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Do not build the body
5247 of an inlined function if we do not generate code for the function.
5248
5249 2013-02-06 Pascal Obry <obry@adacore.com>
5250
5251 * s-os_lib.adb (Locate_Exec_On_Path): Call Normalize_Pathname
5252 with Resolve_Links set to False.
5253
5254 2013-02-03 Eric Botcazou <ebotcazou@adacore.com>
5255
5256 * gcc-interface/decl.c: Include diagnostic-core.h.
5257 (gnat_to_gnu_entity) <E_Array_Type>: Sorry if Reverse_Storage_Order
5258 is set on the entity.
5259 <E_Record_Type>: Likewise.
5260 * gcc-interface/Make-lang.in (ada/decl.o): Add $(DIAGNOSTIC_CORE_H).
5261
5262 2013-01-29 Ben Brosgol <brosgol@adacore.com>
5263
5264 * gnat_rm.texi: Fixed typos. Minor edits.
5265
5266 2013-01-29 Bob Duff <duff@adacore.com>
5267
5268 * a-convec.adb: Minor reformatting.
5269
5270 2013-01-29 Pascal Obry <obry@adacore.com>
5271
5272 * tempdir.adb, tempdir.ads (Use_Temp_Dir): Set wether to use the temp
5273 directory.
5274
5275 2013-01-29 Ed Schonberg <schonberg@adacore.com>
5276
5277 * exp_ch5.adb (Expand_Iterator_Loop_Over_Array): Preserve loop
5278 identifier only if it comes from source.
5279 (Expand_N_Loop_Statement): If the domain of iteration is an
5280 enumeration type with a representation clause, remove from
5281 visibility the loop identifier before rewriting the loop as a
5282 block with a declaration for said identifier.
5283 * sem_util.adb (Remove_Homonym): Handle properly the default case.
5284
5285 2013-01-29 Vincent Celier <celier@adacore.com>
5286
5287 * prj-proc.adb: Minor comment spelling fix.
5288
5289 2013-01-29 Pascal Obry <obry@adacore.com>
5290
5291 * prj-proc.adb (Process_Expression_Variable_Decl): Prepend
5292 Project_Path to current environment.
5293
5294 2013-01-29 Thomas Quinot <quinot@adacore.com>
5295
5296 * sprint.adb (Sprint_Node_Actual): Output freeze nodes for
5297 itypes even if Dump_Freeze_Null is not set.
5298
5299 2013-01-29 Robert Dewar <dewar@adacore.com>
5300
5301 * sem_util.adb: Minor reformatting.
5302 * s-rident.ads: Minor comment fixes.
5303
5304 2013-01-29 Pascal Obry <obry@adacore.com>
5305
5306 * prj-env.ads, prj-env.adb (Add_Directories): Add parameter to
5307 control if the path is prepended or appended.
5308
5309 2013-01-29 Ed Schonberg <schonberg@adacore.com>
5310
5311 * sem_ch6.adb (Analyze_Expression_Function): An expression
5312 function declaration is not a subprogram declaration, and thus
5313 cannot appear in a protected definition.
5314
5315 2013-01-29 Hristian Kirtchev <kirtchev@adacore.com>
5316
5317 * exp_util.adb (Insert_Actions): When new
5318 actions come from the expression of the expression with actions,
5319 then they must be added to the list of existing actions.
5320
5321 2013-01-29 Eric Botcazou <ebotcazou@adacore.com>
5322
5323 * sem_ch3.adb (Analyze_Subtype_Declaration) <Private_Kind>: For
5324 the subtype of a constrained private type with discriminants
5325 that has got a full view, show that the completion is a clone
5326 of the full view.
5327
5328 2013-01-29 Javier Miranda <miranda@adacore.com>
5329
5330 * errout.ads, errout.adb (Get_Ignore_Errors): New subprogram.
5331 * opt.ads (Warn_On_Overlap): Update documentation.
5332 * sem_aggr.adb (Resolve_Aggregate, Resolve_Extension_Aggregate):
5333 Check function writable actuals.
5334 * sem_ch3.adb (Build_Derived_Record_Type,
5335 Record_Type_Declaration): Check function writable actuals.
5336 * sem_ch4.adb (Analyze_Range): Check function writable actuals.
5337 * sem_ch5.adb (Analyze_Assignment): Remove code of the initial
5338 implementation of AI05-0144.
5339 * sem_ch6.adb (Analyze_Function_Return,
5340 (Analyze_Procedure_Call.Analyze_Call_And_Resolve): Remove code
5341 of the initial implementation of AI05-0144.
5342 * sem_res.adb (Resolve): Remove code of the initial implementation.
5343 (Resolve_Actuals): Call Check_Function_Writable_Actuals and remove call
5344 of the initial implementation.
5345 (Resolve_Arithmetic_Op, Resolve_Logical_Op,
5346 Resolve_Membership_Op): Check function writable actuals.
5347 * sem_util.ad[sb] (Actuals_In_Call): Removed
5348 (Check_Order_Dependence): Removed (Save_Actual): Removed
5349 (Check_Function_Writable_Actuals): New subprogram.
5350 * usage.adb (Usage): Update documentation.
5351 * warnsw.adb (Set_Warning_Switch): Enable warn_on_overlap when
5352 setting all warnings.
5353
5354 2013-01-29 Robert Dewar <dewar@adacore.com>
5355
5356 * a-calend-vms.adb: Minor comment fix.
5357
5358 2013-01-29 Robert Dewar <dewar@adacore.com>
5359
5360 * mlib-utl.adb, gnatlink.adb: Avoid reference to ASCII.Back_Slash
5361 because of casing issues.
5362 * sem_util.ads: Minor comment fix.
5363 * style.adb (Check_Identifier): Set proper casing for entities
5364 in ASCII.
5365 * styleg.adb: Minor comment improvement.
5366 * stylesw.ads (Style_Check_Standard): Fix bad comments.
5367
5368 2013-01-29 Hristian Kirtchev <kirtchev@adacore.com>
5369
5370 * sem_prag.adb: Add the grammar for pragmas Abstract_State and Global.
5371 (Analyze_Pragma): Push the scope of the related subprogram and install
5372 its formals once before starting the analysis of the [moded] global
5373 list.
5374
5375 2013-01-29 Pascal Obry <obry@adacore.com>
5376
5377 * prj-proc.adb (Process_Expression_Variable_Decl): Always handle
5378 relative paths in Project_Path as relative to the aggregate
5379 project location. Note that this was what was documented.
5380
5381 2013-01-29 Vincent Celier <celier@adacore.com>
5382
5383 * gnatcmd.adb: For "gnat stub -P ...", do not check the naming
5384 scheme for Ada, when Ada is not a language for the project.
5385
5386 2013-01-29 Ed Schonberg <schonberg@adacore.com>
5387
5388 * sem_ch3.adb (Analyze_Subtype_Declaration): Inherit
5389 Is_Generic_Actual_Type flag in a nested instance.
5390 * sem_ch12.adb (Restore_Private_Views): Preserve
5391 Is_Generic_Actual_Type flag if actual is a Generic_Actual_Type
5392 of an enclosing instance.
5393 * sem_util.adb (Corresponding_Generic_Type): Handle generic actual
5394 which is an actual of an enclosing instance.
5395 * sem_type.adb (Real_Actual): If a generic_actual_type is the
5396 formal of an enclosing generic and thus renames the corresponding
5397 actual, use the actual of the enclosing instance to resolve
5398 spurious ambiguities in instantiations when two formals are
5399 instantiated with the same actual.
5400
5401 2013-01-29 Robert Dewar <dewar@adacore.com>
5402
5403 * gnat_rm.texi: Document all Ada 2005 and Ada 2012 pragmas as
5404 being available as implementation-defined pragmas in earlier
5405 versions of Ada.
5406
5407 2013-01-29 Vincent Celier <celier@adacore.com>
5408
5409 * clean.adb (Delete): On VMS, delete all versions of the file.
5410
5411 2013-01-29 Robert Dewar <dewar@adacore.com>
5412
5413 * par-ch6.adb (No_Constraint_Maybe_Expr_Func): New procedure.
5414 * par-util.adb (No_Constraint): Undo special handling, moved
5415 to par-ch6.adb.
5416
5417 2013-01-29 Robert Dewar <dewar@adacore.com>
5418
5419 * aspects.ads: Aspect Warnings is implementation defined Add
5420 some other missing entries to impl-defined list Mark Warnings
5421 as GNAT pragma in main list.
5422 * sem_ch8.adb: Process aspects for all cases of renaming
5423 declarations.
5424
5425 2013-01-29 Robert Dewar <dewar@adacore.com>
5426
5427 * sem_ch6.adb (Analyze_Function_Call): Set In_Assertion flag.
5428 * sem_elab.adb (Check_Internal_Call_Continue): Do not issue
5429 warnings about possible elaboration error if call is within
5430 an assertion.
5431 * sinfo.ads, sinfo.adb (In_Assertion): New flag in N_Function_Call node.
5432
5433 2013-01-29 Robert Dewar <dewar@adacore.com>
5434
5435 * a-calend-vms.adb, g-eacodu-vms.adb, g-trasym-vms-alpha.adb,
5436 * s-auxdec-vms-ia64.adb, s-mastop-vms.adb, s-osprim-vms.adb,
5437 s-tasdeb-vms.adb: Replace pragma Interface by pragma Import.
5438
5439 2013-01-29 Robert Dewar <dewar@adacore.com>
5440
5441 * opt.ads (Ignore_Style_Checks_Pragmas): New flag.
5442 * par-prag.adb (Par, case Style_Checks): Recognize
5443 Ignore_Style_Checks_Pragmas.
5444 * sem_prag.adb (Analyze_Pragma, case Style_Checks): Recognize
5445 Ignore_Style_Checks_Pragmas.
5446 * switch-c.adb: Recognize -gnateY switch.
5447 * usage.adb: Add documentation for "-gnateY".
5448 * vms_data.ads: Add IGNORE_STYLE_CHECKS_PRAGMAS (-gnateY).
5449
5450 2013-01-29 Vincent Celier <celier@adacore.com>
5451
5452 * clean.adb (Clean_Executables): Add Sid component when calling
5453 Queue.Insert.
5454 * make.adb: When inserting in the Queue, add the Source_Id
5455 (Sid) when it is known (Start_Compile_If_Possible): When the
5456 Source_Id is known (Sid), get the path name of the ALI file
5457 (Full_Lib_File) from it, to avoid finding old ALI files in other
5458 object directories.
5459 * makeutl.ads (Source_Info): New Source_Id component Sid in
5460 Format_Gnatmake variant.
5461
5462 2013-01-29 Robert Dewar <dewar@adacore.com>
5463
5464 * gnat_ugn.texi: Document -gnateY.
5465
5466 2013-01-29 Doug Rupp <rupp@adacore.com>
5467
5468 * s-osinte-vms.ads, s-taprop-vms.adb, system-vms_64.ads,
5469 system-vms-ia64.ads: Replace pragma Interface by pragma Import.
5470
5471 2013-01-29 Robert Dewar <dewar@adacore.com>
5472
5473 * atree.ads, atree.adb (Node30): New function.
5474 (Set_Node30): New procedure.
5475 (Num_Extension_Nodes): Change to 5 (activate new fields/flags).
5476 * atree.h: Add macros for Field30 and Node30.
5477 * einfo.ads, einfo.adb: Move some fields to avoid duplexing.
5478 * treepr.adb (Print_Entity_Information): Print fields 30-35.
5479
5480 2013-01-29 Robert Dewar <dewar@adacore.com>
5481
5482 * sem_prag.adb (Analyze_Pragma, case Interface): Consider to
5483 be a violation of No_Obsolescent_Features even in Ada 95. Also
5484 generates a warning in -gnatwj mode.
5485 (Analyze_Pragma, case Interface_Name): Generates a warning in -gnatwj
5486 mode.
5487 * gnat_ugn.texi: Additional documentation on -gnatwj and pragma
5488 Interface[_Name].
5489
5490 2013-01-29 Vincent Celier <celier@adacore.com>
5491
5492 * snames.ads-tmpl: Add new standard name Trailing_Switches.
5493
5494 2013-01-29 Ed Schonberg <schonberg@adacore.com>
5495
5496 * sem_disp.adb (Check_Controlling_Type): If a designated type T
5497 of an anonymous access type is a limited view of a tagged type,
5498 it can be a controlling type only if the subprogram is in the
5499 same scope as T.
5500
5501 2013-01-29 Vincent Celier <celier@adacore.com>
5502
5503 * gnatcmd.adb: Use the project where the config pragmas file is
5504 declared to get its path.
5505
5506 2013-01-29 Vincent Celier <celier@adacore.com>
5507
5508 * prj-attr.adb: New attribute Linker'Trailing_Switches.
5509
5510 2013-01-22 Eric Botcazou <ebotcazou@adacore.com>
5511
5512 * gcc-interface/trans.c (gnat_to_gnu) <N_Expression_With_Actions>: Do
5513 not translate the Etype of the node before translating the Actions.
5514
5515 2013-01-22 Eric Botcazou <ebotcazou@adacore.com>
5516
5517 * gcc-interface/trans.c (Pragma_to_gnu) <Name_Space>: Use optimize_size
5518 instead of optimize and adjust warning message.
5519 (Compilation_Unit_to_gnu): Process pragmas preceding the unit.
5520
5521 2013-01-22 Tristan Gingold <gingold@adacore.com>
5522
5523 * gcc-interface/gigi.h (ADT_unhandled_except_decl,
5524 ADT_unhandled_others_decl): New.
5525 (unhandled_others_decl, unhandled_except_decl): Define.
5526 * gcc-interface/trans.c: Include common/common-target.h.
5527 (gigi): Initialize them.
5528 (Subprogram_Body_to_gnu): On SEH targets, wrap the body of the main
5529 function in a try/catch clause.
5530
5531 2013-01-11 Eric Botcazou <ebotcazou@adacore.com>
5532
5533 * gcc-interface/Make-lang.in (COMMON_ADAFLAGS): Remove -gnata.
5534 (CHECKING_ADAFLAGS): New.
5535 (ALL_ADAFLAGS): Include CHECKING_ADAFLAGS.
5536
5537 2013-01-10 Eric Botcazou <ebotcazou@adacore.com>
5538
5539 * gcc-interface/config-lang.in (boot_language_boot_flags): Delete.
5540 * gcc-interface/Make-lang.in (BOOT_ADAFLAGS): Likewise.
5541
5542 2013-01-07 Eric Botcazou <ebotcazou@adacore.com>
5543
5544 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Record_Type>: Adjust
5545 comment about type extension with discriminants.
5546 <E_Record_Subtype>: Remove useless test and reorder conditions.
5547 (elaborate_entity) <E_Record_Subtype>: Likewise.
5548
5549 2013-01-07 Richard Biener <rguenther@suse.de>
5550
5551 PR ada/864
5552 * gcc-interface/Make-lang.in (ada.install-common): Always apply
5553 program_transform_name.
5554
5555 2013-01-06 Eric Botcazou <ebotcazou@adacore.com>
5556
5557 * gnatvsn.ads (Current_Year): Bump to 2013.
5558
5559 2013-01-06 Olivier Hainque <hainque@adacore.com>
5560
5561 * gcc-interface/decl.c (gnat_to_gnu_field): Emit a specialized
5562 diagnostic for component size mismatch wrt volatile requirements.
5563 Add a gcc_unreachable() at the end of the checks for size. Split
5564 the check on volatile for positions into one check on atomic and
5565 a subsequent one on volatile.
5566
5567 2013-01-06 Eric Botcazou <ebotcazou@adacore.com>
5568
5569 * gcc-interface/decl.c (elaborate_entity) <E_Record_Type>: Delete.
5570
5571 2013-01-06 Eric Botcazou <ebotcazou@adacore.com>
5572
5573 * gcc-interface/decl.c (gnat_to_gnu_entity) <discrete_type>: Do not
5574 pack the field of the record type made for a misaligned type.
5575
5576 2013-01-06 Eric Botcazou <ebotcazou@adacore.com>
5577
5578 * gcc-interface/decl.c (annotate_value) <COMPONENT_REF>: Be prepared
5579 for discriminants inherited from parent record types.
5580
5581 2013-01-04 Robert Dewar <dewar@adacore.com>
5582
5583 * warnsw.adb: Minor fixes to -gnatw.d handling.
5584
5585 2013-01-04 Robert Dewar <dewar@adacore.com>
5586
5587 * einfo.adb, atree.adb: Enlarge entities to make 63 more flags, 6 more
5588 fields.
5589
5590 2013-01-04 Joel Brobecker <brobecker@adacore.com>
5591
5592 * gnat_ugn.texi: Fix typo.
5593
5594 2013-01-04 Robert Dewar <dewar@adacore.com>
5595
5596 * gnat_rm.texi: Document alignment choice for subtypes.
5597
5598 2013-01-04 Robert Dewar <dewar@adacore.com>
5599
5600 * validsw.ads: Minor fix to comment.
5601
5602 2013-01-04 Doug Rupp <rupp@adacore.com>
5603
5604 * Makefile.rtl (GNATRTL_NONTASKING_OBJS,
5605 GNATRTL_ALTIVEC_OBJS): Factor g-al* objects.
5606 * gcc-interface/Makefile.in (ADA_EXCLUDE_SRCS): Add g-al* sources.
5607 (GNATRTL_ALTIVEC_OBJS): Override to null for VMS.
5608 Rename leon vxworks toolchain as leon-wrs-vxworks.
5609 * gcc-interface/Make-lang.in: Update dependencies
5610
5611 2013-01-04 Pascal Obry <obry@adacore.com>
5612
5613 * prj.ads (For_Each_Source): Add Locally_Removed parameter.
5614 (Source_Iterator): Add Locally_Removed field.
5615 * prj.adb (For_Each_Source): Ignore Locally_Removed files if needed.
5616 (Next): Likewise.
5617
5618 2013-01-04 Robert Dewar <dewar@adacore.com>
5619
5620 * exp_attr.adb: Minor reformatting.
5621
5622 2013-01-04 Robert Dewar <dewar@adacore.com>
5623
5624 * checks.adb (Insert_Valid_Check): Fix handling of renamed
5625 packed array element.
5626 * exp_ch4.adb (Expand_Concatenate): Fix some missing parent
5627 fields in generated code.
5628 * exp_util.adb (Side_Effect_Free): Improve detection of cases
5629 needing renaming.
5630
5631 2013-01-04 Robert Dewar <dewar@adacore.com>
5632
5633 * sinfo.ads: Clean up order of N_xxx subtypes
5634
5635 2013-01-04 Vincent Celier <celier@adacore.com>
5636
5637 * prj-conf.adb (Check_Target): Allow --autoconf= with no target.
5638
5639 2013-01-04 Robert Dewar <dewar@adacore.com>
5640
5641 * types.ads, prj-conf.adb, par-tchk.adb: Minor reformatting.
5642
5643 2013-01-04 Robert Dewar <dewar@adacore.com>
5644
5645 * par-ch6.adb (P_Subprogram): Better handling of missing IS
5646 after expression function.
5647 * par-util.adb (No_Constraint): Improve handling to avoid bad warnings.
5648
5649 2013-01-04 Robert Dewar <dewar@adacore.com>
5650
5651 * exp_util.ads, exp_util.adb (Insert_Actions): In expression with
5652 actions case, new actions are appended to the sequence rather than
5653 prepended.
5654
5655 2013-01-04 Robert Dewar <dewar@adacore.com>
5656
5657 * gnat_ugn.texi: Document -gnatw.d/w.D (does no apply in VMS mode).
5658 * usage.adb: Add lines for -gnatw.d/w.D switches.
5659 * warnsw.adb: Minor fixes (some missing cases of setting
5660 Warning_Doc_Switch). Reject -gnatw.d and -gnatw.D in VMS mode.
5661
5662 2013-01-04 Robert Dewar <dewar@adacore.com>
5663
5664 * exp_util.adb (Remove_Side_Effects): Make sure scope suppress
5665 is restored on exit.
5666
5667 2013-01-04 Robert Dewar <dewar@adacore.com>
5668
5669 * usage.adb: Document -gnateF (check overflow for predefined Float).
5670
5671 2013-01-04 Robert Dewar <dewar@adacore.com>
5672
5673 * sem_res.adb (Resolve_Type_Conversion): Remove incorrect
5674 prevention of call to Apply_Type_Conversion_Checks, which resulted
5675 in missing check flags in formal mode.
5676
5677 2013-01-04 Vincent Celier <celier@adacore.com>
5678
5679 * makeutl.ads (Db_Switch_Args): New table used by gprbuild.
5680 * prj-conf.adb (Check_Builder_Switches): Check for switches
5681 --config= (Get_Db_Switches): New procedure to get the --db
5682 switches so that they are used when invoking gprconfig in
5683 auto-configuration.
5684 (Do_Autoconf): When invoking gprconfig, use the --db switches, if any.
5685
5686 2013-01-04 Pascal Obry <obry@adacore.com>
5687
5688 * prj-nmsc.adb: Minor reformatting.
5689
5690 2013-01-04 Vincent Celier <celier@adacore.com>
5691
5692 * makeutl.ads (Root_Environment): New variable, moved rom
5693 gprbuild (Load_Standard_Base): New Boolean variable, moved
5694 from gprbuild.
5695 * prj-conf.adb (Check_Builder_Switches): New procedure to check
5696 for switch --RTS in package Builder. If a runtime specified
5697 by --RTS is a relative path name, but not a base name, then
5698 find the path on the Project Search Path.
5699 (Do_Autoconf): Call Check_Builder_Switches.
5700 (Locate_Runtime): New procedure, moved from gprbuild, to get the
5701 absolute paths of runtimes when they are not specified as a base name.
5702 * prj-conf.ads (Locate_Runtime): New procedure, moved from gprbuild.
5703
5704 2013-01-04 Ed Schonberg <schonberg@adacore.com>
5705
5706 * sem_ch3.adb (Build_Private_Derived_Type): Set
5707 Has_Private_Ancestor on type derived from an untagged private
5708 type whose full view has discriminants
5709 * sem_aggr.adb (Resolve_Record_Aggregate): Reject non-extension
5710 aggregate for untagged record type with private ancestor.
5711
5712 2013-01-04 Thomas Quinot <quinot@adacore.com>
5713
5714 * sem_elab.adb, sem_ch3.adb: Minor reformatting.
5715
5716 2013-01-04 Robert Dewar <dewar@adacore.com>
5717
5718 * table.adb: Minor reformatting.
5719
5720 2013-01-04 Ed Schonberg <schonberg@adacore.com>
5721
5722 * sem_ch10.adb (Check_Redundant_Withs): A with_clause that does
5723 not come from source does not generate a warning for redundant
5724 with_clauses.
5725
5726 2013-01-04 Hristian Kirtchev <kirtchev@adacore.com>
5727
5728 * aspects.adb, aspects.ads: Add Aspect_Global to all relevant tables.
5729 * par-prag.adb: Add pragma Global to the list of pragmas that
5730 do not need special processing by the parser.
5731 * sem_ch13.adb (Analyze_Aspect_Specifications): Convert aspect
5732 Global into a pragma without any form of legality checks. The
5733 work is done by Analyze_Pragma. The aspect and pragma are both
5734 marked as needing delayed processing. Insert the corresponding
5735 pragma of aspect Abstract_State in the visible declarations of the
5736 related package.
5737 (Check_Aspect_At_Freeze_Point): Aspect Global
5738 does not need processing even though it is marked as delayed.
5739 Alphabetize the list on aspect names.
5740 * sem_prag.adb: Add a value for pragma Global in table Sig_Flags.
5741 (Analyze_Pragma): Add ??? comment about the grammar of pragma
5742 Abstract_State. Move the error location from the pragma to the
5743 state to improve the quality of error placement. Add legality
5744 checks for pragma Global.
5745 * snames.ads-tmpl Add the following specially recognized names
5746
5747 2013-01-04 Eric Botcazou <ebotcazou@adacore.com>
5748
5749 * sem_ch3.adb: Fix minor typo.
5750
5751 2013-01-04 Ed Schonberg <schonberg@adacore.com>
5752
5753 * par-ch13.adb (Aspect_Specifications_Present): In Strict mode,
5754 accept an aspect name followed by a comma, indicating a defaulted
5755 boolean aspect.
5756
5757 2013-01-04 Joel Brobecker <brobecker@adacore.com brobecker>
5758
5759 * gnat_ugn.texi: Document procedure to codesign GDB on Darwin.
5760 Update doc on gnattest --separates switch.
5761
5762 2013-01-04 Thomas Quinot <quinot@adacore.com>
5763
5764 * s-chepoo.ads: Minor reformatting.
5765
5766 2013-01-04 Arnaud Charlet <charlet@adacore.com>
5767
5768 * usage.adb: Remove mention of -gnatN in usage.
5769
5770 2013-01-04 Robert Dewar <dewar@adacore.com>
5771
5772 * exp_prag.adb, gnatcmd.adb, exp_util.adb, table.adb, sem_prag.adb,
5773 freeze.adb, sem_ch4.adb, sem_warn.adb, opt.ads, exp_aggr.adb,
5774 prj-conf.adb, sem_ch13.adb: Minor reformatting.
5775
5776 2013-01-04 Thomas Quinot <quinot@adacore.com>
5777
5778 * sinfo.ads: Minor documentation update.
5779
5780 2013-01-04 Thomas Quinot <quinot@adacore.com>
5781
5782 * sem_ch3.adb, einfo.adb (Analyze_Object_Declaration): Do not set Ekind
5783 before resolving initialization expression.
5784
5785 2013-01-04 Hristian Kirtchev <kirtchev@adacore.com>
5786
5787 * checks.adb (Generate_Index_Checks): Delay the generation of
5788 the check for an indexed component where the prefix mentions
5789 Loop_Entry until the attribute has been properly expanded.
5790 * exp_ch5.adb (Expand_Loop_Entry_Attributes): Perform minor
5791 decoration of the constant that captures the value of Loop_Entry's
5792 prefix at the entry point into a loop. Generate index checks
5793 for an attribute reference that has been transformed into an
5794 indexed component.
5795
5796 2013-01-04 Thomas Quinot <quinot@adacore.com>
5797
5798 * exp_prag.adb, exp_util.adb, exp_util.ads, freeze.adb, exp_aggr.adb,
5799 sem_ch13.adb (Exp_Aggr.Collect_Initialization_Statements): Nothing to
5800 do if Obj is already frozen.
5801 (Exp_Util.Find_Init_Call): Rename to...
5802 (Exp_Util.Remove_Init_Call): New subprogram, renamed from
5803 Find_Init_Call. Remove the initialization call from the enclosing
5804 list if found, and if it is from an Initialization_Statements
5805 attribute, reset it.
5806 (Exp_Util.Append_Freeze_Action): Minor code reorganization.
5807 (Exp_Util.Append_Freeze_Actions): Ensure a freeze node has been
5808 allocated (as is already done in Append_Freeze_Action).
5809 (Freeze.Freeze_Entity): For an object with captured
5810 Initialization_Statements and non-delayed freezeing, unwrap the
5811 initialization statements and insert and them directly in the
5812 enclosing list.
5813 (Sem_Ch13.Check_Address_Clause): For an object
5814 with Initialization_Statements and an address clause, unwrap the
5815 initialization statements when moving them to the freeze actions.
5816
5817 2013-01-03 Pascal Obry <obry@adacore.com>
5818
5819 * prj-attr.adb, projects.texi, snames.ads-tmpl: Add package remote and
5820 corresponding attibutes.
5821
5822 2013-01-03 Thomas Quinot <quinot@adacore.com>
5823
5824 * exp_aggr.adb: Minor comment improvement.
5825
5826 2013-01-03 Hristian Kirtchev <kirtchev@adacore.com>
5827
5828 * aspects.adb, aspects.ads: Add Aspect_Abstract_State to all the
5829 relevant tables.
5830 * einfo.ads, einfo.adb: Add Integrity_Level and Refined_State to
5831 the description of fields (Abstract_States): New routine.
5832 (Integrity_Level): New routine.
5833 (Has_Property): New routine.
5834 (Is_Input_State): New routine.
5835 (Is_Null_State): New routine.
5836 (Is_Output_State): New routine.
5837 (Is_Volatile_State): New routine.
5838 (Refined_State): New routine.
5839 (Set_Abstract_States): New routine.
5840 (Set_Integrity_Level): New routine.
5841 (Set_Refined_State): New routine.
5842 (Write_Field8_Name): Add proper output for E_Abstract_State.
5843 (Write_Field9_Name): Add proper output for E_Abstract_State.
5844 (Write_Field25_Name): Add proper output for E_Package.
5845 * lib-xref.ads: Add new letter for an abstract state.
5846 * par-prag.adb: Add pragma Abstract_State to the list of pragma
5847 that do not need special processing by the parser.
5848 * sem_ch13.adb (Analyze_Aspect_Specifications): Convert
5849 aspect Abstract_State into a pragma without any form
5850 of legality checks. The work is done by Analyze_Pragma.
5851 (Check_Aspect_At_Freeze_Point): Aspect Abstract_State does not
5852 require delayed analysis.
5853 * sem_prag.adb: Add a value for pragma Abstract_State in table
5854 Sig_Flags.
5855 (Analyze_Pragma): Add legality checks for pragma
5856 Abstract_State. Analysis of individual states introduces a state
5857 abstraction entity into the visibility chain.
5858 * snames.ads-tmpl: Add new names for abstract state and
5859 integrity. Add new pragma id for abstract state.
5860
5861 2013-01-03 Bob Duff <duff@adacore.com>
5862
5863 * table.adb (Reallocate): Calculate new Length in
5864 Long_Integer to avoid overflow.
5865
5866 2013-01-03 Thomas Quinot <quinot@adacore.com>
5867
5868 * sem_ch3.adb, sinfo.ads, freeze.adb, sem_ch4.adb, exp_aggr.adb
5869 (Sem_Ch3.Analyze_Object_Declaration): Set Ekind early so that
5870 it is set properly when expanding the initialization expression.
5871 (Freeze.Check_Address_Clause): Transfer initialization expression
5872 to an assignment in the freeze actions, so that the object is
5873 initialized only after being elaborated by GIGI.
5874 (Sinfo (comments), Sem_Ch4.Analyze_Expression_With_Actions): Allow
5875 a Null_Statement as the expression in an Expression_With_Actions.
5876 (Exp_Aggr.Collect_Initialization_Statements): New subprogram
5877 shared by expansion of record and array aggregates, used to
5878 capture statements for an aggregate used to initalize an object
5879 into an Expression_With_Actions (which acts as a container for
5880 a list of actions).
5881 (Exp_Aggr.Convert_Aggr_In_Obj_Decl): Use the above to
5882 capture initialization statements, instead of the previously
5883 existing loop which left freeze nodes out of the capturing
5884 construct (causing out of order elaboration crashes in GIGI).
5885 (Exp_Aggr.Expand_Array_Aggregate): Use the above to capture
5886 initialization statements (this was previously not done for
5887 arrays). Also do not unconditionally prevent in place expansion
5888 for an object with address clause.
5889
5890 2013-01-03 Thomas Quinot <quinot@adacore.com>
5891
5892 * gnat_rm.texi, freeze.adb (Check_Component_Storage_Order): Check that
5893 a record extension has the same scalar storage order as the parent type.
5894
5895 2013-01-03 Thomas Quinot <quinot@adacore.com>
5896
5897 * exp_ch4.adb: Add comment.
5898
5899 2013-01-03 Vincent Celier <celier@adacore.com>
5900
5901 * prj.adb: Minor spelling error correction in comment.
5902
5903 2013-01-03 Vincent Celier <celier@adacore.com>
5904
5905 * gnatcmd.adb (GNATCmd): If a single main has been specified
5906 as an absolute path, use its simple file name to find specific
5907 switches, instead of the absolute path.
5908
5909 2013-01-03 Javier Miranda <miranda@adacore.com>
5910
5911 * sem_warn.adb (Warn_On_Overlapping_Actuals): For overlapping
5912 parameters that are record types or array types generate warnings
5913 only compiling under -gnatw.i
5914 * opt.ads (Extensions_Allowed): Restore previous documentation.
5915
5916 2013-01-03 Vincent Celier <celier@adacore.com>
5917
5918 * prj-conf.adb (Do_Autoconf): If Target is specified in the
5919 main project, but not on the command line, use the Target in
5920 the project to invoke gprconfig in auto-configuration.
5921 * makeutl.ads (Default_Config_Name): New constant String.
5922
5923 2013-01-03 Arnaud Charlet <charlet@adacore.com>
5924
5925 * usage.adb: Minor: fix typo in usage.
5926
5927 2013-01-03 Thomas Quinot <quinot@adacore.com>
5928
5929 * sem_ch13.adb (Analyze_Record_Representation_Clause): Reject
5930 an illegal component clause for an inherited component in a
5931 record extension.
5932
5933 2013-01-03 Emmanuel Briot <briot@adacore.com>
5934
5935 * xref_lib.adb (Parse_Identifier_Info): Fix handling of arrays, which
5936 have information in the ALI file for both the index and the component
5937 types.
5938
5939 2013-01-03 Emmanuel Briot <briot@adacore.com>
5940
5941 * projects.texi: Fix error in documenting the project path
5942 computed for an aggregate project.
5943
5944 2013-01-03 Javier Miranda <miranda@adacore.com>
5945
5946 * sem_warn.adb (Warn_On_Overlapping_Actuals): Adding documentation
5947 plus restricting the functionality of this routine to cover the
5948 cases described in the Ada 2012 reference manual. The previous
5949 extended support is now available under -gnatX.
5950 * s-tassta.adb (Finalize_Global_Tasks): Addition of a dummy
5951 variable to call Timed_Sleep. Required to avoid warning on
5952 overlapping out-mode actuals.
5953 * opt.ads (Extensions_Allowed): Update documentation.
5954
5955 2013-01-03 Tristan Gingold <gingold@adacore.com>
5956
5957 * s-arit64.ads: Use Multiply_With_Ovflo_Check as __gnat_mulv64.
5958 * arit64.c: Removed
5959 * gcc-interface/Makefile.in: Remove reference to arit64.c.
5960
5961 2013-01-03 Thomas Quinot <quinot@adacore.com>
5962
5963 * checks.adb, checks.ads (Apply_Address_Clause_Check): The check must
5964 be generated at the start of the freeze actions for the entity, not
5965 before (or after) the freeze node.
5966
5967 2013-01-03 Thomas Quinot <quinot@adacore.com>
5968
5969 * exp_aggr.adb (Exp_Aggr.Convert_Aggregate_In_Obj_Decl):
5970 Reorganize code to capture initialization statements in a block,
5971 so that freeze nodes are excluded from the captured block.
5972
5973 2013-01-03 Thomas Quinot <quinot@adacore.com>
5974
5975 * exp_ch11.adb: Minor reformatting.
5976
5977 2013-01-03 Thomas Quinot <quinot@adacore.com>
5978
5979 * exp_util.adb, einfo.adb, einfo.ads, freeze.adb, exp_aggr.adb,
5980 sem_ch13.adb (Einfo.Initialization_Statements,
5981 Einfo.Set_Initialization_Statements): New entity attribute
5982 for objects.
5983 (Exp_Util.Find_Init_Call): Handle case of an object initialized
5984 by an aggregate converted to a block of assignment statements.
5985 (Freeze.Check_Address_Clause): Do not clear Has_Delayed_Freeze
5986 even for objects that require a constant address, because the
5987 address expression might involve entities that have yet to be
5988 elaborated at the point of the object declaration.
5989 (Exp_Aggr.Convert_Aggregate_In_Obj_Decl): For a type that does
5990 not require a transient scope, capture the assignment statements
5991 in a block so that they can be moved down after elaboration of
5992 an address clause if needed.
5993 (Sem_Ch13.Check_Constant_Address_Clause.Check_Expr_Constants,
5994 case N_Unchecked_Conversion): Do not replace operand subtype with
5995 its base type as this violates a GIGI invariant if the operand
5996 is an identifier (in which case the etype of the identifier
5997 is expected to be equal to that of the denoted entity).
5998
5999 2013-01-03 Javier Miranda <miranda@adacore.com>
6000
6001 * sem_util.ads, sem_util.adb (Denotes_Same_Object): Extend the
6002 functionality of this routine to cover cases described in the Ada 2012
6003 reference manual.
6004
6005 2013-01-03 Ed Schonberg <schonberg@adacore.com>
6006
6007 * sem_elab.adb (Set_Elaboration_Constraint): Handle properly
6008 a 'Access attribute reference when the subprogram is called
6009 Initialize.
6010
6011 2013-01-03 Arnaud Charlet <charlet@adacore.com>
6012
6013 * s-tpobop.adb (PO_Do_Or_Queue): Refine assertion, since a
6014 select statement may be called from a controlled (e.g. Initialize)
6015 operation and have abort always deferred.
6016
6017 2013-01-03 Robert Dewar <dewar@adacore.com>
6018
6019 * sem_ch8.adb, einfo.ads, einfo.adb: Minor code reorganization.
6020
6021 2013-01-03 Javier Miranda <miranda@adacore.com>
6022
6023 * exp_ch3.adb (Make_Controlling_Function_Wrappers): Exclude
6024 internal entities associated with interfaces and add minimum
6025 decoration to the defining entity of the generated wrapper to
6026 allow overriding interface primitives.
6027 * sem_disp.ads (Override_Dispatching_Operation): Addition of a
6028 new formal (Is_Wrapper).
6029 * sem_disp.adb (Override_Dispatching_Operation): When overriding
6030 interface primitives the new formal helps identifying that the
6031 new operation is not fully decorated.
6032
6033 2013-01-03 Thomas Quinot <quinot@adacore.com>
6034
6035 * sem_ch7.adb, sem_ch10.adb, einfo.adb, einfo.ads, sem_ch12.adb,
6036 rtsfind.adb, sem_elab.adb, sem_ch4.adb, sem_ch8.adb
6037 (Einfo.Is_Visible_Child_Unit, Einfo.Set_Is_Visible_Child_Unit):
6038 Rename to Is_Visible_Lib_Unit, Set_Is_Visible_Lib_Unit, and
6039 update spec accordingly (now also applies to root library units).
6040 (Sem_Ch10.Analyze_Subunit.Analyze_Subunit_Context): Toggle above flag
6041 on root library units, not only child units.
6042 (Sem_Ch10.Install[_Limited]_Withed_Unit): Same.
6043 (Sem_Ch10.Remove_Unit_From_Visibility): Reset Is_Visible_Lib_Unit
6044 even for root library units.
6045 (Sem_Ch8.Find_Expanded_Name): A selected component form whose prefix is
6046 Standard is an expanded name for a root library unit.
6047
6048 2013-01-03 Thomas Quinot <quinot@adacore.com>
6049
6050 * exp_ch3.adb: Minor reformatting.
6051
6052 2013-01-03 Olivier Hainque <hainque@adacore.com>
6053
6054 * tracebak.c: Reinstate changes to support ppc-lynx178.
6055
6056 2013-01-03 Ed Schonberg <schonberg@adacore.com>
6057
6058 * atree.ads: Minor reformatting and documentation enhancement.
6059
6060 2013-01-03 Ed Schonberg <schonberg@adacore.com>
6061
6062 * exp_ch3.adb (Expand_N_Object_Declaration): If the object has
6063 a class-wide type and a renaming declaration is created for it,
6064 preserve entity chain, which already contains generated internal
6065 types. This ensures that freezing actions are properly generated
6066 for all objects declared subsequently in the same scope, and
6067 that debugging information is generated for them.
6068 * sem_util.adb, sem_util.ads (we): New debugging routine, to
6069 display entity chain of a given scope.
6070
6071 2013-01-03 Robert Dewar <dewar@adacore.com>
6072
6073 * exp_intr.adb: Minor reformatting.
6074
6075 2013-01-03 Robert Dewar <dewar@adacore.com>
6076
6077 * einfo.adb: Minor reformatting.
6078
6079 2013-01-03 Pascal Obry <obry@adacore.com>
6080
6081 * adaint.c, adaint.h (__gnat_get_module_name): Removed.
6082 (__gnat_is_module_name_supported): Removed.
6083 * s-win32.ads: Add some needed definitions.
6084 * g-trasym.ads: Update comments.
6085
6086 2013-01-03 Robert Dewar <dewar@adacore.com>
6087
6088 * layout.adb (Set_Composite_Alignment): Fix problems of
6089 interactions with Optimize_Alignment set to Space.
6090
6091 2013-01-03 Thomas Quinot <quinot@adacore.com>
6092
6093 * exp_disp.adb: Minor reformatting.
6094
6095 2013-01-02 Richard Biener <rguenther@suse.de>
6096
6097 PR bootstrap/55784
6098 * gcc-interface/Makefile.in: Add $(GMPINC) to includes.
6099
6100 2013-01-02 Thomas Quinot <quinot@adacore.com>
6101
6102 * exp_intr.adb (Expand_Dispatching_Constructor_Call): Remove
6103 side effects from Tag_Arg early, doing it too late may cause a
6104 crash due to inconsistent Parent link.
6105 * sem_ch8.adb, einfo.ads: Minor reformatting.
6106
6107 2013-01-02 Robert Dewar <dewar@adacore.com>
6108
6109 * einfo.ads, einfo.adb (Has_Independent_Components): New flag.
6110 * freeze.adb (Size_Known): We do not know the size of a packed
6111 record if it has atomic components, by reference type components,
6112 or independent components.
6113 * sem_prag.adb (Analyze_Pragma, case Independent_Components): Set new
6114 flag Has_Independent_Components.
6115
6116 2013-01-02 Yannick Moy <moy@adacore.com>
6117
6118 * opt.ads (Warn_On_Suspicious_Contract): Set to True by default.
6119 * usage.adb (Usage): Update usage message.
6120
6121 2013-01-02 Pascal Obry <obry@adacore.com>
6122
6123 * adaint.c (__gnat_is_module_name_supported): New constant.
6124
6125 2013-01-02 Ed Schonberg <schonberg@adacore.com>
6126
6127 * sem_attr.adb (Check_Array_Type): Reject an attribute reference on an
6128 array whose component type does not have a completion.
6129
6130 2013-01-02 Geert Bosch <bosch@adacore.com>
6131
6132 * a-nllcef.ads, a-nlcefu.ads, a-nscefu.ads: Make Pure.
6133
6134 2013-01-02 Robert Dewar <dewar@adacore.com>
6135
6136 * par_sco.adb: Minor reformatting.
6137
6138 2013-01-02 Javier Miranda <miranda@adacore.com>
6139
6140 * sem_aggr.adb (Resolve_Array_Aggregate): Remove dead code.
6141
6142 2013-01-02 Olivier Hainque <hainque@adacore.com>
6143
6144 * a-exctra.ads (Get_PC): New function.
6145
6146 2013-01-02 Thomas Quinot <quinot@adacore.com>
6147
6148 * sem_ch8.adb: Minor reformatting.
6149
6150 2013-01-02 Thomas Quinot <quinot@adacore.com>
6151
6152 * sem_ch7.adb: Minor reformatting.
6153
6154 2013-01-02 Thomas Quinot <quinot@adacore.com>
6155
6156 * freeze.adb (Check_Component_Storage_Order): Do not crash on
6157 _Tag component.
6158
6159 2013-01-02 Robert Dewar <dewar@adacore.com>
6160
6161 * gnat1drv.adb, targparm.adb, targparm.ads: Minor name change: add
6162 On_Target to Atomic_Sync_Default.
6163
6164 2013-01-02 Robert Dewar <dewar@adacore.com>
6165
6166 * sem_warn.adb (Warn_On_Known_Condition): Suppress warning for
6167 comparison of attribute result with constant
6168 * a-ststio.adb, s-direio.adb, s-rannum.adb: Remove unnecessary pragma
6169 Warnings (Off, "..");
6170
6171 2013-01-02 Yannick Moy <moy@adacore.com>
6172
6173 * sem_prag.ads: Minor correction of comment.
6174
6175 2013-01-02 Thomas Quinot <quinot@adacore.com>
6176
6177 * par_sco.adb (Traverse_Package_Declaration): The first
6178 declaration in a nested package is dominated by the preceding
6179 declaration in the enclosing scope.
6180
6181 2013-01-02 Pascal Obry <obry@adacore.com>
6182
6183 * adaint.c, adaint.h (__gnat_get_module_name): Return the actual
6184 module containing a given address.
6185
6186 2013-01-02 Thomas Quinot <quinot@adacore.com>
6187
6188 * sem_ch3.adb: Minor reformatting.
6189
6190 2013-01-02 Pascal Obry <obry@adacore.com>
6191
6192 * cstreams.c (__gnat_ftell64): New routine. Use _ftelli64 on
6193 Win64 and default to ftell on other platforms.
6194 (__gnat_fsek64): Likewise.
6195 * i-cstrea.ads: Add fssek64 and ftell64 specs.
6196 * s-crtl.ads: Likewise.
6197 * a-ststio.adb, s-direio.adb (Size): Use 64 bits version when required.
6198 (Set_Position): Likewise.
6199
6200 2013-01-02 Thomas Quinot <quinot@adacore.com>
6201
6202 * par_sco.adb: Generate X SCOs for default expressions in
6203 subprogram body stubs. Do not generate any SCO for package,
6204 task, or protected body stubs.
6205
6206 2013-01-02 Ed Schonberg <schonberg@adacore.com>
6207
6208 * sem_ch3.adb: Further improvement to ASIS mode for anonymous
6209 access to protected subprograms.
6210
6211 2013-01-02 Robert Dewar <dewar@adacore.com>
6212
6213 * par_sco.adb, vms_data.ads: Minor reformatting.
6214
6215 2013-01-02 Thomas Quinot <quinot@adacore.com>
6216
6217 * par_sco.adb (Traverse_Declarations_Or_Statement): Function
6218 form, returning value of Current_Dominant upon exit, for chaining
6219 purposes.
6220 (Traverse_Declarations_Or_Statement.Traverse_One, case
6221 N_Block_Statement): First statement is dominated by last declaration.
6222 (Traverse_Subprogram_Or_Task_Body): Ditto.
6223 (Traverse_Package_Declaration): First private
6224 declaration is dominated by last visible declaration.
6225 (Traverse_Sync_Definition): Ditto.
6226
6227 2013-01-02 Thomas Quinot <quinot@adacore.com>
6228
6229 * gnat_rm.texi: Restrict the requirement for Scalar_Storage_Order
6230 matching Bit_Order to record types only, since array types do not
6231 have a Bit_Order.
6232
6233 2013-01-02 Vincent Celier <celier@adacore.com>
6234
6235 * gnat_ugn.texi: Remove documentation of -gnateO, which is an
6236 internal switch.
6237 * usage.adb: Indicate that -gnateO is an internal switch.
6238
6239 2013-01-02 Thomas Quinot <quinot@adacore.com>
6240
6241 * par_sco.adb: Add SCO generation for task types and single
6242 task declarations.
6243 * get_scos.adb: When adding an instance table entry for a
6244 non-nested instantiation, make sure the Enclosing_Instance is
6245 correctly set to 0.
6246
6247 2013-01-02 Hristian Kirtchev <kirtchev@adacore.com>
6248
6249 * sem_attr.adb (Analyze_Attribute): Skip the special _Parent
6250 scope generated for subprogram inlining purposes while trying
6251 to locate the enclosing function.
6252 * sem_prag.adb (Analyze_Pragma): Preanalyze the boolean
6253 expression of pragma Postcondition when the pragma comes from
6254 source and appears inside a subprogram body.
6255
6256 2013-01-02 Thomas Quinot <quinot@adacore.com>
6257
6258 * switch-c.adb, fe.h, back_end.adb: Enable generation of instantiation
6259 information in debug info unconditionally when using -fdump-scos,
6260 instead of relying on a separate command line switch -fdebug-instances.
6261 * gcc-interface/Make-lang.in: Update dependencies.
6262
6263 2013-01-02 Ed Schonberg <schonberg@adacore.com>
6264
6265 * sem_ch12.adb: Additional refinement of predicate.
6266
6267 2013-01-02 Vincent Celier <celier@adacore.com>
6268
6269 * vms_data.ads: Remove incorrect spaces at end of descriptions
6270 of qualifiers for single switch.
6271
6272 2013-01-02 Ben Brosgol <brosgol@adacore.com>
6273
6274 * gnat_rm.texi: Minor edits / wordsmithing in section on pragma
6275 Check_Float_Overflow.
6276
6277 2013-01-02 Thomas Quinot <quinot@adacore.com>
6278
6279 * sprint.adb (Sprint_Node_Actual): Do not add extra parens for
6280 a conditional expression (CASE or IF expression) that already
6281 has parens. Also omit ELSE keyword for an IF expression without
6282 an ELSE part.
6283
6284 2013-01-02 Thomas Quinot <quinot@adacore.com>
6285
6286 * gnat1drv.adb (Adjust_Global_Switches): Adjust back-end
6287 flag_debug_instances here, after front-end switches have been
6288 processed.
6289
6290 2013-01-02 Vincent Celier <celier@adacore.com>
6291
6292 * usage.adb: Minor reformatting.
6293
6294 2013-01-02 Arnaud Charlet <charlet@adacore.com>
6295
6296 * opt.ads: Fix typo.
6297
6298 2013-01-02 Thomas Quinot <quinot@adacore.com>
6299
6300 * par_sco.adb: Generate P decision SCOs for SPARK pragmas
6301 Assume and Loop_Invariant.
6302
6303 2013-01-02 Robert Dewar <dewar@adacore.com>
6304
6305 * vms_data.ads: Add entry for Float_Check_Valid (-gnateF).
6306 * ug_words: Add entry for Float_Check_Overflow.
6307 * usage.adb: Minor reformatting.
6308 * gnat_ugn.texi: Add documentation for -gnateF (Check_Float_Overflow).
6309
6310 2013-01-02 Vincent Celier <celier@adacore.com>
6311
6312 * gnat_ugn.texi: Add documentation for switches -gnateA, -gnated,
6313 -gnateO=, -gnatet and -gnateV.
6314 * ug_words: Add qualifiers equivalent to -gnateA, -gnated,
6315 -gnatet and -gnateV.
6316 * usage.adb: Add lines for -gnatea, -gnateO and -gnatez.
6317 * vms_data.ads: Add new compiler qualifiers /ALIASING_CHECK
6318 (-gnateA), /DISABLE_ATOMIC_SYNCHRONIZATION (-gnated),
6319 /PARAMETER_VALIDITY_CHECK (-gnateV) and /TARGET_DEPENDENT_INFO
6320 (-gnatet).
6321
6322 2013-01-02 Robert Dewar <dewar@adacore.com>
6323
6324 * checks.adb (Apply_Scalar_Range_Check): Implement Check_Float_Overflow.
6325 * opt.ads, opt.adb: Handle flags Check_Float_Overflow[_Config].
6326 * par-prag.adb: Add dummy entry for pragma Check_Float_Overflow.
6327 * sem_prag.adb: Implement pragma Check_Float_Overflow.
6328 * snames.ads-tmpl: Add entries for pragma Check_Float_Overflow.
6329 * switch-c.adb: Recognize -gnateF switch.
6330 * tree_io.ads: Update ASIS version number.
6331 * gnat_rm.texi: Add documentation of pragma Check_Float_Overflow.
6332
6333 2013-01-02 Robert Dewar <dewar@adacore.com>
6334
6335 * checks.adb, exp_ch4.adb, exp_ch6.adb, exp_ch7.adb, exp_ch9.adb,
6336 exp_disp.adb, exp_dist.adb, exp_intr.adb, exp_prag.adb, exp_util.adb,
6337 freeze.adb, gnat1drv.adb, inline.adb, layout.adb, lib-xref.adb,
6338 par-ch10.adb, par-labl.adb, par-load.adb, par-util.adb, restrict.adb,
6339 sem_ch13.adb, sem_ch4.adb, sem_ch6.adb, sem_dim.adb, sem_elab.adb,
6340 sem_res.adb, sem_warn.adb, sinput-l.adb: Add tags to warning messages.
6341 * sem_ch6.ads, warnsw.ads, opt.ads: Minor comment updates.
6342
6343 2013-01-02 Robert Dewar <dewar@adacore.com>
6344
6345 * err_vars.ads: Minor comment fix.
6346
6347 2013-01-02 Ed Schonberg <schonberg@adacore.com>
6348
6349 * sem_ch12.adb: Refine predicate.
6350
6351 2013-01-02 Robert Dewar <dewar@adacore.com>
6352
6353 * errout.ads: Minor comment fixes.
6354 * opt.ads: Minor comment additions.
6355 * exp_aggr.adb: Add tags to warning messages
6356 * exp_ch11.adb, exp_ch3.adb, exp_ch4.adb, exp_util.adb, sem_aggr.adb,
6357 sem_attr.adb, sem_case.adb, sem_cat.adb, sem_ch3.adb, sem_ch4.adb,
6358 sem_ch5.adb, sem_disp.adb, sem_dist.adb, sem_elab.adb, sem_eval.adb,
6359 sem_intr.adb, sem_mech.adb, sem_prag.adb, sem_res.adb, sem_util.adb,
6360 sem_warn.adb: Add tags to warning messages
6361
6362 2013-01-02 Doug Rupp <rupp@adacore.com>
6363
6364 * init.c [VMS] Remove subtest on reason mask for ACCVIO that is a C_E.
6365
6366 2013-01-02 Ed Schonberg <schonberg@adacore.com>
6367
6368 * sem_ch12.adb: Recover source name for renamed packagea.
6369
6370 2013-01-02 Robert Dewar <dewar@adacore.com>
6371
6372 * errout.adb (Set_Msg_Insertion_Warning): Correct typo causing
6373 tests to fail if insertion sequence is at end of message string.
6374 * opt.ads: Minor comment fixes and additions.
6375 * sem_ch7.adb, sem_ch8.adb, sem_ch9.adb, sem_ch10.adb, sem_ch11.adb,
6376 sem_ch12.adb, sem_ch13.adb: Add tags to warning messages.
6377 * sem_ch6.ads, sem_ch6.adb (Cannot_Inline): Deal with warning message
6378 tags. Add tags to warning messages.
6379
6380 2013-01-02 Robert Dewar <dewar@adacore.com>
6381
6382 * err_vars.ads (Warning_Doc_Switch): New flag.
6383 * errout.adb (Error_Msg_Internal): Implement new warning flag
6384 doc tag stuff (Set_Msg_Insertion_Warning): New procedure.
6385 * errout.ads: Document new insertion sequences ?? ?x? ?.x?
6386 * erroutc.adb (Output_Msg_Text): Handle ?? and ?x? warning doc
6387 tag stuff.
6388 * erroutc.ads (Warning_Msg_Char): New variable.
6389 (Warn_Chr): New field in error message object.
6390 * errutil.adb (Error_Msg): Set Warn_Chr in error message object.
6391 * sem_ch13.adb: Minor reformatting.
6392 * warnsw.adb: Add handling for -gnatw.d and -gnatw.D
6393 (Warning_Doc_Switch).
6394 * warnsw.ads: Add handling of -gnatw.d/.D switches (warning
6395 doc tag).
6396
6397 2013-01-02 Robert Dewar <dewar@adacore.com>
6398
6399 * opt.ads: Minor reformatting.
6400
6401 2013-01-02 Doug Rupp <rupp@adacore.com>
6402
6403 * init.c: Reorganize VMS section.
6404 (scan_condtions): New function for scanning condition tables.
6405 (__gnat_handle_vms_condtion): Use actual exception name for imported
6406 exceptions vice IMPORTED_EXCEPTION.
6407 Move condition table scanning into separate function. Move formerly
6408 special handled conditions to system condition table. Use SYS$PUTMSG
6409 output to fill exception message field for formally special handled
6410 condtions, in particular HPARITH to provide more clues about cause and
6411 location then raised from the translated image.
6412
6413 2013-01-02 Thomas Quinot <quinot@adacore.com>
6414
6415 * sem_ch13.adb (Analyze_Aspect_Specifications): For a Pre/Post
6416 aspect that applies to a library subprogram, prepend corresponding
6417 pragma to the Pragmas_After list, in order for split AND THEN
6418 sections to be processed in the expected order.
6419
6420 2013-01-02 Thomas Quinot <quinot@adacore.com>
6421
6422 * exp_prag.adb (Expand_Pragma_Check): The statements generated
6423 for the pragma must have the sloc of the pragma, not the
6424 sloc of the condition, otherwise this creates anomalies in the
6425 generated debug information that confuse coverage analysis tools.
6426
6427 2013-01-02 Thomas Quinot <quinot@adacore.com>
6428
6429 * sem_ch13.adb: Minor reformatting.
6430
6431 2013-01-02 Arnaud Charlet <charlet@adacore.com>
6432
6433 * g-excact.ads (Core_Dump): Clarify that this subprogram does
6434 not dump cores under Windows.
6435
6436 2013-01-02 Ed Schonberg <schonberg@adacore.com>
6437
6438 * sem_ch8.adb (Analyze_Primitive_Renamed_Operation): The prefixed
6439 view of a subprogram has convention Intrnnsic, and a renaming
6440 of a prefixed view cannot be the prefix of an Access attribute.
6441
6442 2013-01-02 Robert Dewar <dewar@adacore.com>
6443
6444 * restrict.adb: Minor reformatting.
6445
6446 2013-01-02 Thomas Quinot <quinot@adacore.com>
6447
6448 * exp_prag.adb: Minor reformatting.
6449
6450 2013-01-02 Ed Schonberg <schonberg@adacore.com>
6451
6452 * sem_ch12.adb (Get_Associated_Node): If the node is an
6453 identifier that denotes an unconstrained array in an object
6454 declaration, it is rewritten as the name of an anonymous
6455 subtype whose bounds are given by the initial expression in the
6456 declaration. When checking whether that identifier is global
6457 reference, use the original node, not the local generated subtype.
6458
6459 2013-01-02 Olivier Hainque <hainque@adacore.com>
6460
6461 * tracebak.c: Revert previous change, incomplete.
6462
6463 2013-01-02 Ed Schonberg <schonberg@adacore.com>
6464
6465 * sem_ch13.adb (Analyze_Aspect_Specifications): If the aspect
6466 appears on a subprogram body that acts as a spec, place the
6467 corresponding pragma in the declarations of the body, so that
6468 e.g. pre/postcondition checks can be generated appropriately.
6469
6470 2013-01-02 Robert Dewar <dewar@adacore.com>
6471
6472 * sem_ch3.adb: Minor reformatting and code reorganization.
6473
6474 2013-01-02 Vincent Celier <celier@adacore.com>
6475
6476 * switch-m.adb (Normalize_Compiler_Switches): Record the
6477 complete switch -fstack-check=specific instead of its shorter
6478 alias -fstack-check.
6479
6480 2013-01-02 Ed Schonberg <schonberg@adacore.com>
6481
6482 * sem_ch3.adb (Derive_Subprogram): Enforce RM 6.3.1 (8):
6483 if the derived type is a tagged generic formal type with
6484 unknown discriminants, the inherited operation has convention
6485 Intrinsic. As such, the 'Access attribute cannot be applied to it.
6486
6487 2013-01-02 Thomas Quinot <quinot@adacore.com>
6488
6489 * sem_attr.adb: Minor reformatting.
6490
6491 2013-01-02 Thomas Quinot <quinot@adacore.com>
6492
6493 * par_sco.adb: Add SCO generation for S of protected types and
6494 single protected object declarations.
6495
6496 2013-01-02 Robert Dewar <dewar@adacore.com>
6497
6498 * sem_eval.adb, osint.ads: Minor reformatting.
6499
6500 2013-01-02 Hristian Kirtchev <kirtchev@adacore.com>
6501
6502 * sem_prag.adb (Analyze_Pragma): Check the legality of pragma Assume.
6503
6504 2013-01-02 Thomas Quinot <quinot@adacore.com>
6505
6506 * sem_eval.adb (Compile_Time_Compare): For static operands, we
6507 can perform a compile time comparison even if in preanalysis mode.
6508
6509 2013-01-02 Thomas Quinot <quinot@adacore.com>
6510
6511 * par_sco.adb (SCO_Record): Always use
6512 Traverse_Declarations_Or_Statements to process the library level
6513 declaration, so that SCOs are properly generated for its aspects.
6514
6515 2013-01-02 Thomas Quinot <quinot@adacore.com>
6516
6517 * scos.ads (In_Decision): Add missing entry for 'a'.
6518 * sem_prag.adb (Analyze_Pragma, case pragma Check): Omit
6519 call to Set_SCO_Pragma_Enabled for Invariant and Predicate.
6520 * sem_ch13.adb: Minor comment update.
6521 \f
6522 Copyright (C) 2013 Free Software Foundation, Inc.
6523
6524 Copying and distribution of this file, with or without modification,
6525 are permitted in any medium without royalty provided the copyright
6526 notice and this notice are preserved.