1 2013-10-10 Robert Dewar <dewar@adacore.com>
3 * sem_aggr.adb (Resolve_Array_Aggregate): Identify duplicated
6 2013-10-10 Robert Dewar <dewar@adacore.com>
8 * sem_ch9.adb (Analyze_Task_Body): Aspects are illegal
9 (Analyze_Protected_Body): Aspects are illegal.
11 2013-10-10 Robert Dewar <dewar@adacore.com>
13 * sem_ch6.adb, sem_ch13.adb: Minor reformatting.
14 * sem_case.adb (Check_Choices): Fix bad listing of missing
15 values from predicated subtype case (Check_Choices): List
17 * errout.adb (Set_Msg_Text): Process warning tags in VMS mode
18 * erroutc.adb (Output_Msg_Text): Handle VMS warning tags
19 * gnat_ugn.texi: Document /WARNINGS=TAG_WARNINGS for VMS
20 * ug_words: Add entries for -gnatw.d and -gnatw.D
21 * vms_data.ads: Add [NO]TAG_WARNINGS for -gnatw.D/-gnatw.d
22 * lib-writ.ads: Documentation fixes
24 2013-10-10 Robert Dewar <dewar@adacore.com>
26 * a-wichha.adb, a-wichha.ads, a-zchhan.adb, a-zchhan.ads
27 (Is_Other_Format): New name for Is_Other.
28 (Is_Punctuation_Connector): New name for Is_Punctuation
30 2013-10-10 Hristian Kirtchev <kirtchev@adacore.com>
32 * aspects.adb: Add entries in table Canonical_Aspects for aspects
33 Refined_Depends and Refined_Global.
34 * aspects.ads: Add entries in tables Aspect_Id, Aspect_Argument,
35 Aspect_Names, Aspect_Declay, Aspect_On_Body_Or_Stub_OK for
36 aspects Refined_Depends and Refined_Global.
37 * einfo.adb (Contract): Subprogram bodies are now valid owners
39 (Set_Contract): Subprogram bodies are now valid
41 (Write_Field24_Name): Output the contract
42 attribute for subprogram bodies.
43 * exp_ch6.adb (Expand_Subprogram_Contract): New routine.
44 * exp_ch6.ads (Expand_Subprogram_Contract): New routine.
45 * par-prag.adb: Pragmas Refined_Depends and Refined_Global do
46 not require any special processing by the parser.
47 * sem_ch3.adb (Adjust_D): Renamed to Adjust_Decl.
48 (Analyze_Declarations): Code reformatting. Analyze the contract
49 of a subprogram body at the end of the declarative region.
50 * sem_ch6.adb (Analyze_Generic_Subprogram_Body):
51 Subprogram bodies can now have contracts. Use
52 Expand_Subprogram_Contract to handle the various contract
54 (Analyze_Subprogram_Body_Contract): New null routine.
55 (Analyze_Subprogram_Body_Helper): Subprogram bodies can now have
56 contracts. Use Expand_Subprogram_Contract to handle the various
58 (Analyze_Subprogram_Contract): Add local
59 variable Nam. Update the call to Analyze_PPC_In_Decl_Part. Capture
60 the pragma name in Nam.
61 (Process_PPCs): Removed.
62 * sem_ch6.ads (Analyze_Subprogram_Body_Contract): New routine.
63 (Analyze_Subprogram_Contract): Update the comment on usage.
64 * sem_ch13.adb (Analyze_Aspect_Specifications): Add null
65 implementations for aspects Refined_Depends and Refined_Global.
66 (Check_Aspect_At_Freeze_Point): Aspects Refined_Depends and
67 Refined_Global do not need to be checked at the freeze point.
68 * sem_prag.adb: Add entries in table Sig_Flags
69 for pragmas Refined_Depends and Refined_Global.
70 (Analyze_Contract_Cases_In_Decl_Part): Add local
71 variable Restore. Use Restore to pop the scope.
72 (Analyze_Depends_In_Decl_Part): Add local variable Restore. Use
73 Restore to pop the scope.
74 (Analyze_Global_In_Decl_List): Add local variable Restore. Use Restore
76 (Analyze_PPC_In_Decl_Part): Renamed to
77 Analyze_Pre_Post_Condition_In_Decl_Part.
79 Add null implementations for pragmas Refined_Depends and
80 Refined_Global. Refined_Pre and Refined_Post are now
81 handled by routine Analyze_Refined_Pre_Post_Condition
83 (Analyze_Refined_Depends_In_Decl_Part): New
85 (Analyze_Refined_Global_In_Decl_Part):
87 (Analyze_Refined_Pre_Post):
88 Renamed to Analyze_Refined_Pre_Post_Condition.
89 (Analyze_Refined_Pre_Post_Condition): Analyze the boolean
91 (Check_Precondition_Postcondition): Update the call
92 to Analyze_PPC_In_Decl_Part.
93 * sem_prag.ads: Add entries in table
94 Pragma_On_Body_Or_Stub_OK for pragmas Refined_Depends
96 (Analyze_PPC_In_Decl_Part): Renamed
97 to Analyze_Pre_Post_Condition_In_Decl_Part. Update the
99 (Analyze_Refined_Depends_In_Decl_Part): New routine.
100 (Analyze_Refined_Global_In_Decl_Part): New routine.
101 (Analyze_Test_Case_In_Decl_Part): Update the comment on usage.
102 * sem_util.adb (Add_Contract_Item): Rename formal Item to Prag
103 and update all occurrences. Subprogram body contracts can now
104 contain pragmas Refined_Depends and Refined_Global.
105 * sem_util.ads (Add_Contract_Item): Rename formal Item to
106 Prag. Update the comment on usage.
107 * sinfo.ads: Update the comment on structure and usage of
109 * snames.ads-tmpl: Add new predefined names for Refined_Depends
110 and Refined_Global. Add entries in table Pragma_Id for
111 Refined_Depends and Refined_Global.
113 2013-10-10 Robert Dewar <dewar@adacore.com>
115 * types.ads: Minor reformatting.
117 2013-10-10 Thomas Quinot <quinot@adacore.com>
119 * s-taprop-posix.adb: Add missing comment.
121 2013-10-10 Robert Dewar <dewar@adacore.com>
123 * freeze.adb (Freeze_Record_Type): Move choice checking to
124 Analyze_Freeze_Entity (Freeze_Record_Type): Make sure all choices
126 * sem_case.adb (Check_Choices): Remove misguided attempt to
127 freeze choices (this is now done in Freeze_Record_Type where
129 (Check_Choices): Remove some analyze/resolve calls
130 that are redundant since they are done in Analyze_Choices.
131 * sem_ch13.adb (Analyze_Freeze_Entity): Do the error
132 checking for choices in variant records here (moved here from
133 Freeze.Freeze_Record_Type)
135 2013-10-10 Thomas Quinot <quinot@adacore.com>
137 * s-oscons-tmplt.c, s-taprop-posix.adb (CLOCK_REALTIME): Always define,
138 possibly using a dummy placeholder value.
139 (Compute_Deadline): For the case of an
140 Absolute_Calendar deadline, if the target uses another clock
141 than CLOCK_REALTIME as CLOCK_RT_Ada, compensate for possible
144 2013-10-10 Ed Schonberg <schonberg@adacore.com>
146 * sem_ch8.adb (Find_Expanded_Name): Handle properly a fully
147 qualified reference to a generic child unit within itself,
150 2013-10-10 Pascal Obry <obry@adacore.com>
152 * prj-conf.adb: Minor typo fixes in comment.
154 2013-10-10 Thomas Quinot <quinot@adacore.com>
156 * s-taprop-posix.adb (Compute_Deadline): New local subprogram,
157 factors common code between Timed_Sleep and Timed_Delay.
159 2013-10-10 Robert Dewar <dewar@adacore.com>
161 * freeze.adb (Freeze_Record_Type): Don't replace others if
162 expander inactive. This avoids clobbering the ASIS tree in
165 2013-10-10 Robert Dewar <dewar@adacore.com>
167 * sem_res.adb (Resolve_Op_Expon): Avoid crash testing for
168 fixed-point case in preanalysis mode (error will be caught during
171 2013-10-10 Robert Dewar <dewar@adacore.com>
173 * gnat_rm.texi: Refined_Pre and Refined_Post are now allowed as
174 assertion identifiers for pragma Assertion_Policy.
175 * sem_prag.adb (Is_Valid_Assertion_Kind): Add Refined_Pre/Refined_Post
176 * sem_ch13.adb: Minor reformatting.
178 2013-10-10 Pascal Obry <obry@adacore.com>
180 * prj-conf.adb: Code refactoring.
182 2013-10-10 Hristian Kirtchev <kirtchev@adacore.com>
184 * einfo.adb: Remove Integrity_Level from the node usage list.
185 (Has_Option): Update the implementation to match
187 (Has_Property): Renamed to Has_Option.
188 (Integrity_Level): Removed.
189 (Is_External_State): New routine.
190 (Is_Input_Only_State): Use Has_Option to determine whether a state
191 is Input_Only. (Is_Input_State): Renamed to Is_Input_Only_State.
192 (Is_Output_Only_State): Use Has_Option to determine whether
193 a state is Output_Only.
194 (Is_Output_State): Renamed to
195 Is_Output_Only_State.
196 (Is_Volatile_State): Use Has_Option to determine whether a state is
198 (Set_Integrity_Level): Removed.
199 (Write_Field8): Remove the entry for Integrity_Level.
200 * einfo.ads: Remove Integrity_Level along with its documentation
201 and usage in nodes. Rename Is_Input_State to Is_Input_Only_State.
202 Rename Is_Output_State to Is_Output_Only_State. Update the
203 documentation of Is_Volatile_State. Update the node structure of
205 (Integrity_Level): Removed along with pragma Inline.
206 (Is_External_State): New routine.
207 (Is_Input_State): Renamed to Is_Input_Only_State.
208 (Is_Output_State): Renamed to Is_Output_Only_State.
209 (Set_Integrity_Level): Removed along with pragma Inline.
210 * sem_prag.adb (Analyze_Pragma): Update the checks regarding
211 global items and abstract state modes. Update the implementation
212 of pragma Abstract_State to reflect the new rules and terminology.
213 * snames.ads-tmpl: Remove the predefined name for Integrity
214 level. Add new predefined names for Input_Only, Non_Volatile,
215 Output_Only and Part_Of.
217 2013-10-10 Ed Schonberg <schonberg@adacore.com>
219 * lib-xref.adb (Generate_Reference): Do not generate a reference
220 within a _postcondition procedure: a proper source reference has
221 already been generated when pre- analyzing the original aspect
222 specification, and the use of a formal in a pre/postcondition
223 should not count as a proper use in a subprogram body.
225 2013-10-10 Robert Dewar <dewar@adacore.com>
227 * sem_eval.adb (Why_Non_Static): Fix bomb for deferred constant
230 2013-10-10 Hristian Kirtchev <kirtchev@adacore.com>
232 * aspects.adb: Add an entry for Aspect_Refined_Post in table
234 * aspects.ads: Add an entry for Aspect_Refined_Post in tables
235 Aspect_Id, Aspect_Argument, Aspect_Names, Aspect_Delay,
236 Aspect_On_Body_Or_Stub_OK. Update the comment on the use of
237 table Aspect_On_Body_Or_Stub_OK.
238 * par-prag.adb: Add pragma Refined_Post to the list of pragmas
239 that do not require special processing by the parser.
240 * sem_attr.adb (Analyze_Attribute): Add special analysis for
241 attributes 'Old and 'Result when code generation is disabled and
242 they appear in aspect/pragma Refined_Post.
243 (In_Refined_Post): New routine.
244 * sem_ch6.adb (Analyze_Expression_Function): Move various
245 aspects and/or pragmas that apply to an expression function to the
246 corresponding spec or body.
247 (Collect_Body_Postconditions): New routine.
248 (Process_PPCs): Use routine Collect_Body_Postconditions
249 to gather all postcondition pragmas.
250 * sem_ch10.adb (Analyze_Proper_Body): Use routine
251 Relocate_Pragmas_To_Body to move all source pragmas that follow
252 a body stub to the proper body.
253 (Move_Stub_Pragmas_To_Body): Removed.
254 * sem_ch13.adb (Analyze_Aspect_Specifications): Add processing
255 for aspect Refined_Post.
256 (Check_Aspect_At_Freeze_Point): Aspect
257 Refined_Post does not need delayed processing at the freeze point.
258 * sem_prag.adb: Add an entry for pragma Refined_Post in
260 (Analyze_Pragma): Add processing for pragma
261 Refined_Post. Update the processing of pragma Refined_Pre
262 to use common routine Analyze_Refined_Pre_Post.
263 (Analyze_Refined_Pre_Post): New routine.
264 (Relocate_Pragmas_To_Body): New routine.
265 * sem_prag.ads: Table Pragma_On_Stub_OK is now known as
266 Pragma_On_Body_Or_Stub_OK. Update the comment on usage of
267 table Pragma_On_Body_Or_Stub_OK.
268 (Relocate_Pragmas_To_Body): New routine.
269 * snames.ads-tmpl: Add new predefined name for Refined_Post. Add
270 new Pragma_Id for Refined_Post.
272 2013-10-10 Robert Dewar <dewar@adacore.com>
274 * exp_ch3.adb (Expand_N_Variant_Part): Now null, expansion of
275 last choice to others is moved to Freeze_Record_Type.
276 * freeze.adb (Freeze_Record_Type): Expand last variant to others
277 if necessary (moved here from Expand_N_Variant_Part
279 2013-10-10 Robert Dewar <dewar@adacore.com>
281 * lib-xref-spark_specific.adb, par-ch13.adb, sem_prag.adb, sem_prag.ads,
282 sem_ch12.adb, sem_attr.adb, sem_ch6.adb, sem_ch13.adb, a-sequio.adb,
283 s-atocou-builtin.adb: Minor reformatting.
285 2013-10-10 Thomas Quinot <quinot@adacore.com>
287 * s-oscons-tmplt.c (NEED_PTHREAD_CONDATTR_SETCLOCK): This
288 constant needs to be output to s-oscons.h, as it is tested
291 2013-10-10 Robert Dewar <dewar@adacore.com>
293 * exp_ch3.adb (Expand_N_Variant_Part): Don't expand choices, too early
294 * exp_ch5.adb (Expand_N_Case_Statement): Use new Has_SP_Choice
295 flag to avoid expanding choices when not necessary.
296 * exp_util.adb: Minor reformatting
297 * freeze.adb (Freeze_Record_Type): Redo expansion of variants
298 * sem_aggr.adb: Minor reformatting
299 * sem_case.ads, sem_case.adb: Major rewrite, separating Analysis and
301 * sem_ch3.adb (Analyze_Variant_Part): Rewrite to call new
303 * sem_ch4.adb (Analyze_Case_Expression): Call Analyze_Choices
305 * sem_ch5.adb (Analyze_Case_Statement): Call Analyze_Choices
307 * sem_util.adb: Minor reformatting
308 * sinfo.ads, sinfo.adb (Has_SP_Choice): New flag.
310 2013-10-10 Vincent Celier <celier@adacore.com>
312 * mlib-prj.adb (Build_Library): Do not issue link dynamic
313 libraries with an Rpath, if switch -R was used.
315 2013-10-10 Tristan Gingold <gingold@adacore.com>
317 * s-stalib.ads (Image_Index_Table_8, Image_Index_Table_16,
318 Image_Index_Table_32): Remove as not used.
319 * s-imgint.adb (Image_Integer): Call Set_Image_Integer and
320 remove duplicated code.
322 2013-10-10 Hristian Kirtchev <kirtchev@adacore.com>
324 * sem_prag.adb (Analyze_Pragma): Provide a
325 more precise error message when pragma Refined_Pre applies to
326 an expression function that is not a completion.
328 2013-10-10 Thomas Quinot <quinot@adacore.com>
330 * sem_attr.adb (Analyse_Attribute, case
331 Attribute_Scalar_Storage_Order): a 'Scalar_Storage_Order attribute
332 reference for a generic type is permitted in GNAT runtime mode.
333 * a-sequio.adb (Read, Write): Use the endianness of the actual
334 type to encode length information written to the file.
336 2013-10-10 Ed Schonberg <schonberg@adacore.com>
338 * par-ch13.adb (Aspect_Specifications_Present)): In earlier than
339 Ada2012 mode, assume that a legal aspect name following "with"
340 keyword is an older gnat switch and not a misplaced with_clause.
342 2013-10-10 Hristian Kirtchev <kirtchev@adacore.com>
344 * aspects.adb: Add an entry for Aspect_Refined_Pre in
345 table Canonical_Aspect.
346 (Aspects_On_Body_OK): Renamed to
347 Aspects_On_Body_Or_Stub_OK.
348 (Aspects_On_Body_Or_Stub_OK):
349 Update the query in table Aspect_On_Body_OK.
350 * aspects.ads: Add an entry for Aspect_Refined_Pre in tables
351 Aspect_Id, Aspect_Argument, Aspect_Names, Aspect_Delay,
352 Aspect_On_Body_Or_Stub_OK. Table Aspect_On_Body_OK is now known as
353 Aspect_On_Body_Or_Stub_OK. Add a section of aspect specifications
354 that apply to body stubs.
355 (Aspects_On_Body_OK): Renamed to Aspects_On_Body_Or_Stub_OK.
356 (Aspects_On_Body_Or_Stub_OK): Update the comment on usage.
357 * par-prag.adb: Add pragma Refined_Pre to the list of pragmas
358 that do not require special processing by the parser.
359 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Delay the
360 analysis of aspect specifications that apply to a body stub
361 until the proper body is analyzed.
362 * sem_ch10.adb: Add with and use clause for Sem_Ch13.
363 (Analyze_Package_Body_Stub): Set the corresponding spec of the stub.
364 (Analyze_Proper_Body): Relocate all pragmas that apply
365 to a subprogram body stub to the declarations of the proper
366 body. Analyze the aspect specifications of the stub when the
367 proper body is not present.
368 (Analyze_Protected_Body_Stub): Set the corresponding spec of the stub.
369 (Analyze_Task_Body_Stub): Set the corresponding spec of the stub.
370 (Move_Stub_Pragmas_To_Body): New routine.
371 * sem_ch13.adb (Analyze_Aspect_Specifications): Add processing
372 for aspect Refined_Pre.
373 (Check_Aspect_At_Freeze_Point): Aspect
374 Refined_Pre does not need delayed processing at the freeze point.
375 * sem_prag.adb: Remove with and use clause for Snames. Add
376 an entry for Pragma_Refined_Pre in table Sig_Flags.
377 (Analyze_Pragma): Add processing for pragma Refined_Pre.
378 * sem_prag.ads: Add with and use clause for Snames. Add table
380 * sinfo.adb (Corresponding_Spec_Of_Stub): New routine.
381 (Set_Corresponding_Spec_Of_Stub): New routine.
382 * sinfo.ads: Add new attribute Corresponding_Spec_Of_Stub
383 along with comment on usage and occurrences in nodes.
384 (Corresponding_Spec_Of_Stub): New routine along with pragma
386 (Set_Corresponding_Spec_Of_Stub): New routine along
388 * snames.ads-tmpl: Add new predefined name for Refined_Pre. Add
389 new Pragma_Id for Refined_Pre.
391 2013-10-10 Ed Schonberg <schonberg@adacore.com>
393 * sem_ch12.adb (Analyze_Package_Instantiation,
394 Analyze_Subprogram_Instantiation): Improve error message when
395 name in instantiation does not designate a generic unit of the
398 2013-10-10 Robert Dewar <dewar@adacore.com>
400 * exp_ch3.adb (Expand_N_Variant_Part): Expand statically
401 predicated subtype which appears in Discrete_Choices list.
402 * exp_ch5.adb (Expand_N_Case_Statement): Expand statically
403 predicated subtype which appears in Discrete_Choices list of
404 case statement alternative.
405 * exp_util.ads, exp_util.adb (Expand_Static_Predicates_In_Choices): New
407 * sem_case.adb: Minor reformatting (Analyze_Choices): Don't
408 expand out Discrete_Choices that are names of subtypes with
409 static predicates. This is now done in the analyzer so that the
410 -gnatct tree is properly formed for ASIS.
411 * sem_case.ads (Generic_Choices_Processing): Does not apply
412 to aggregates any more, so change doc accordingly, and remove
413 unneeded Get_Choices argument.
414 * sem_ch3.adb (Analyze_Variant_Part): Remove no
415 longer used Get_Choices argument in instantiation of
416 Generic_Choices_Processing.
417 * sem_ch4.adb (Analyze_Case_Expression): Remove no
418 longer used Get_Choices argument in instantiation of
419 Generic_Choices_Processing.
420 * sem_ch5.adb (Analyze_Case_Statement): Remove no
421 longer used Get_Choices argument in instantiation of
422 Generic_Choices_Processing.
423 * sinfo.ads: For N_Variant_Part, and N_Case_Statement_Alternative,
424 document that choices that are names of statically predicated
425 subtypes are expanded in the code generation tree passed to the
426 back end, but not in the ASIS tree generated for -gnatct.
428 2013-10-10 Ed Schonberg <schonberg@adacore.com>
430 * sem_ch7.adb: Revert previous change.
432 2013-10-10 Gary Dismukes <dismukes@adacore.com>
434 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): In the case where
435 the Storage_Pool aspect is specified by an aspect clause and a
436 renaming is used to capture the evaluation of the pool name,
437 insert the renaming in front of the aspect's associated entity
438 declaration rather than in front of the corresponding attribute
439 definition (which hasn't been appended to the declaration
442 2013-10-10 Ed Schonberg <schonberg@adacore.com>
444 * sem_ch6.adb (Is_Interface_Conformant): The controlling type
445 of the interface operation is obtained from the ultimate alias
446 of the interface primitive parameter, because that may be in
447 fact an implicit inherited operation whose signature involves
448 the type extension and not the desired interface.
450 2013-10-10 Ed Schonberg <schonberg@adacore.com>
452 * par-ch13.adb (Aspect_Specifications_Present): In Ada 2012,
453 recognize an aspect specification with a misspelled name if it
454 is followed by a a comma or semicolon.
456 2013-10-10 Vadim Godunko <godunko@adacore.com>
458 * s-atocou.adb, s-atocou.ads, s-atocou-x86.adb, s-atocou-builtin.adb:
459 Fix copyright notice.
461 2013-10-10 Yannick Moy <moy@adacore.com>
463 * lib-xref-spark_specific.adb (Enclosing_Subprogram_Or_Package): Get
464 enclosing subprogram for precondition/postcondition/contract cases.
466 2013-10-10 Robert Dewar <dewar@adacore.com>
468 * gnat_rm.texi: Minor fix.
470 2013-10-10 Robert Dewar <dewar@adacore.com>
472 * sem_ch13.adb (Analyze_Attribute_Definition_Clause, case
473 Address): Remove the Comes_From_Source test for the overlap
476 2013-10-10 Robert Dewar <dewar@adacore.com>
478 * sem_util.adb: Minor code reorganization (use Nkind_In).
479 * sem_warn.adb: Minor code reorganization (optimization in
480 Check_Unset_Reference).
481 * exp_ch9.adb, exp_ch4.adb, sinfo.ads: Minor reformatting.
483 2013-10-10 Ed Schonberg <schonberg@adacore.com>
485 * sem_ch7.adb (Install_Parent_Private_Declarations): When
486 instantiating a child unit, do not install private declaration of
487 a non-generic ancestor of the generic that is also an ancestor
488 of the current unit: its private part will be installed when
489 private part of ancestor itself is analyzed.
491 2013-10-10 Thomas Quinot <quinot@adacore.com>
493 * freeze.adb (Check_Component_Storage_Order): Retrieve component
494 aliased status from type entities directly instead of going back
495 to original component definition.
496 * sem_ch7.adb: Minor reformatting.
498 2013-10-10 Robert Dewar <dewar@adacore.com>
500 * sem_ch13.adb (Analyze_Aspect_Specifications): For Address
501 attribute, consider it to be set in source, because of aliasing
503 (Analyze_Attribute_Definition_Clause): For the
504 purpose of warning on overlays, take into account the aspect case.
506 2013-10-10 Robert Dewar <dewar@adacore.com>
508 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads, a-cforse.ads,
509 a-cofove.ads: Minor reformatting.
511 2013-10-10 Arnaud Charlet <charlet@adacore.com>
513 * gnat_ugn.texi: Remove obsolete mention to -laddr2line.
515 2013-10-10 Ed Schonberg <schonberg@adacore.com>
517 * exp_ch4.adb (Expand_N_Case_Expression): Indicate that the
518 generated variable used as a target of the expression needs
521 2013-10-10 Jose Ruiz <ruiz@adacore.com>
523 * exp_util.adb (Corresponding_Runtime_Package): Remove the condition
524 related to No_Dynamic_Attachment which was wrong. Protected types
525 with interrupt handlers (when not using a restricted profile)
526 are always treated as protected types with entries, regardless
527 of the No_Dynamic_Attachment restriction.
528 * exp_ch9.adb (Expand_N_Protected_Type_Declaration): Simplify the code
529 using the result of Corresponding_Runtime_Package.
530 (Install_Private_Data_Declarations): When having
531 static handlers and a non restricted profile, we use the
532 type Static_Interrupt_Protection always, so we removed an
533 extra wrong condition looking at the No_Dynamic_Attachment
534 restriction. Simplify the code using the result of
535 Corresponding_Runtime_Package.
536 (Make_Initialize_Protection): Simplify the code using
537 the result of Corresponding_Runtime_Package.
538 (Install_Private_Data_Declaration): The No_Dynamic_Attachment
539 restriction has nothing to do with static handlers. Remove the extra
540 erroneous condition that was creating the wrong data type.
542 2013-10-10 Hristian Kirtchev <kirtchev@adacore.com>
544 * sem_util.adb (Is_Object_Reference): Attribute
545 'Old produces an object reference.
546 * gnat_rm.texi: Define accessibility level of
547 X'Update(...) result.
549 2013-10-10 Yannick Moy <moy@adacore.com>
551 * gnat_rm.texi, a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
552 a-cforse.ads, a-cofove.ads: Update comment and doc of formal containers
554 2013-10-10 Ed Schonberg <schonberg@adacore.com>
556 * sem_ch13.adb (Analyze_Aspect_Specifications): For Pre/Post
557 conditions that apply to a subprogram body, preserve the placement
558 and order of the generated pragmas, which must appear before
559 other declarations in the body.
561 2013-10-10 Bob Duff <duff@adacore.com>
563 * gnat_ugn.texi: Add gnat2xml doc.
565 2013-10-10 Doug Rupp <rupp@adacore.com>
567 * s-vxwork-arm.ads: Fix interface to FP_CONTEXT.
569 2013-10-10 Ed Schonberg <schonberg@adacore.com>
571 * sem_ch13.adb (Analyze_Aspect_Specification): An aspect Import
572 on a variable need not have a convention specified, as long as
573 the implicit convention of the object, obtained from its type,
574 is Ada or Ada-related.
576 2013-10-10 Robert Dewar <dewar@adacore.com>
578 * cstand.adb (Standard_Unsigned_64): New internal type.
579 * gnat_rm.texi: Update documentation on To_Address.
580 * sem_attr.adb (Analyze_Attribute, case To_Address): Fix
581 problem with out of range static values given as literals or
583 * stand.ads (Standard_Unsigned_64): New internal type.
584 * stand.adb: Minor reformatting.
586 2013-10-10 Ed Schonberg <schonberg@adacore.com>
588 * sem_ch4.adb (Analyze_Selected_Component,
589 Has_Mode_Conformant_Spec): If selected component may be an
590 indexing of a parameterless call to a protected function, and
591 expansion is disabled, this is a valid candidate interpretation.
593 2013-10-10 Arnaud Charlet <charlet@adacore.com>
595 * gnat_ugn.texi: Minor editing.
597 2013-10-10 Robert Dewar <dewar@adacore.com>
599 * gnatlink.adb: Minor reformatting.
601 2013-10-10 Yannick Moy <moy@adacore.com>
603 * debug.adb: Free flag d.E and change doc for flag d.K.
605 2013-10-10 Ed Schonberg <schonberg@adacore.com>
607 * sem_prag.adb (Check_Precondition_Postcondition): If the
608 pragma comes from an aspect spec, and the subprogram is a
609 library unit, treat as a ppc in a declarative part in ASIS mode,
610 so that expression in aspect is properly analyzed. In this case
611 there is no later point at which the aspect specification would
614 2013-10-10 Bob Duff <duff@adacore.com>
616 * opt.ads: Minor comment fix.
618 2013-10-10 Vadim Godunko <godunko@adacore.com>
620 * a-coinho-shared.ads, a-coinho-shared.adb: New file.
621 * s-atocou.ads: Add procedure to initialize counter.
622 * s-atocou.adb: Likewise.
623 * s-atocou-builtin.adb: Likewise.
624 * s-atocou-x86.adb: Likewise.
625 * gcc-interface/Makefile.in: Select special version of
626 Indefinite_Holders package on platforms where atomic built-ins
627 are supported. Update tools target pairs for PikeOS.
629 2013-10-10 Robert Dewar <dewar@adacore.com>
631 * sem_ch3.adb: Minor reformatting.
633 2013-10-10 Robert Dewar <dewar@adacore.com>
635 * sinput-c.adb (Load_File): Ensure Source_Align alignment.
636 * sinput-d.adb (Create_Debug_Source): Ensure Source_Align alignment.
637 * sinput-l.adb (Create_Instantiation_Source): Ensure Source_Align
640 * sinput.ads, sinput.adb (Get_Source_File_Index): New optimized (single
642 * types.ads (Source_Align): New definition.
643 (Source_Buffer): Document new alignment requirement.
645 2013-10-10 Robert Dewar <dewar@adacore.com>
647 * sem_prag.adb (Analyze_Pragma, case Linker_Section): Allow
650 2013-10-10 Robert Dewar <dewar@adacore.com>
652 * gnat_rm.texi: Minor adjustment to doc for To_Address attribute.
654 2013-10-10 Vadim Godunko <godunko@adacore.com>
656 * s-stopoo.ads (Root_Storage_Pool): Add pragma
657 Preelaborable_Initialization.
659 2013-09-25 Tom Tromey <tromey@redhat.com>
661 * gcc-interface/Makefile.in (OUTPUT_OPTION): Define as "-o $@".
663 2013-09-18 Eric Botcazou <ebotcazou@adacore.com>
666 * gcc-interface/trans.c (Attribute_to_gnu): Define GNAT_PREFIX local
667 variable and use it throughout.
668 <Attr_Length>: Note whether the prefix is the dereference of a pointer
669 to unconstrained array and, in this case, capture the result for both
670 Attr_First and Attr_Last.
672 2013-09-18 Eric Botcazou <ebotcazou@adacore.com>
674 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Abstract_State>: New.
676 2013-09-18 Eric Botcazou <ebotcazou@adacore.com>
678 * gcc-interface/trans.c (gigi): Remove dead code.
680 2013-09-18 Eric Botcazou <ebotcazou@adacore.com>
682 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Pop the stack of
683 return variables for subprograms using the CICO mechanism.
685 2013-09-13 Dominique Dhumieres <dominiq@lps.ens.fr>
687 * gcc-interface/Makefile.in: Fix darwin Filter to match on $target_os,
690 2013-09-11 Thomas Schwinge <thomas@codesourcery.com>
691 Olivier Hainque <hainque@adacore.com>
693 * gcc-interface/Makefile.in: Import target_cpu, target_vendor,
694 target_os and their host_ counterparts. Remove host_canonical and
695 target_cpu_default, unused. Remove local ad-hoc computations of
696 "host", "targ", "arch", "osys" and "manu". Replace uses of these by
697 uses of the now imported family, hence back to filters against
698 canonical values. Remove filters on e500 for target_cpu, expected to
699 be canonicalized into powerpc. Invert the logic filtering on 64bit
700 sparc for VxWorks. Simplify the filtering logic for bareboard tools
701 target pairs, now using straight elf/eabi filters on the target_os
704 2013-09-10 Ed Schonberg <schonberg@adacore.com>
706 * sem_ch3.adb (Replace_Anonymoous_Access_To_Protected_Subprogram): If
707 the return type is itself an access to function, recurse to emit
708 another anonymous type.
709 * gcc-interface/Make-lang.in: Update dependencies.
711 2013-09-10 Robert Dewar <dewar@adacore.com>
713 * err_vars.ads (Warning_Doc_Switch): Ignored in VMS mode.
714 * errout.adb (Warning_Doc_Switch): Ignored in VMS mode.
715 * errout.ads (Warning_Doc_Switch): Ignored in VMS mode.
716 * inline.ads (Warnings): New component in Pending_Body_Info.
717 * sem_ch12.adb (Pending_Body_Info): Save and restore warnings
718 at instantiation point.
719 * warnsw.adb (Save_Warnings): New function (Restore_Warnings):
720 New procedure Remove special handling of Warning_Doc_Switch,
721 cleaner to handle the VMS case in errout, than to introduce
722 undocumented oddities here.
723 * warnsw.ads (Warning_Record) : New type.
724 (Save_Warnings): New function.
725 (Restore_Warnings): New procedure.
727 2013-09-10 Robert Dewar <dewar@adacore.com>
729 * sinput.adb (Check_For_BOM): Avoid reading past end of file.
731 2013-09-10 Robert Dewar <dewar@adacore.com>
733 * errout.adb (Error_Msg_Ada_2012_Feature): New procedure.
734 * errout.ads (Error_Msg_Ada_2012_Feature): New procedure.
735 * inline.ads: Save/Restore Ada_Version_Pragma.
736 * opt.adb: Save/Restore Ada_Version_Pragma.
737 * opt.ads (Ada_Version_Pragma): New variable.
738 * par-ch11.adb, par-ch12.adb, par-ch13.adb, par-ch4.adb, par-ch5.adb,
739 par-ch6.adb, par-ch8.adb, par-prag.adb: Use Error_Msg_Ada_2012_Feature.
740 * prj.adb: Initialize Ada_Version_Pragma.
741 * sem_attr.adb: Use Error_Msg_Ada_2012_Feature.
742 * sem_ch12.adb, sem_ch8.adb: Save/restore Ada_Version_Pragma.
743 * sem_prag.adb (Analyze_Pragma, cases Ada_xx): Set Ada_Version_Pragma.
744 * switch-c.adb: Initialize Ada_Version_Pragma.
745 * sem_ch12.adb: Minor reformatting.
747 2013-09-10 Ed Schonberg <schonberg@adacore.com>
749 * sem_ch3.adb (Process_Subtype): Discard constraint on access
750 to class-wide type. Such constraints are not supported and are
751 considered a language pathology.
753 2013-09-10 Robert Dewar <dewar@adacore.com>
755 * gnatbind.adb: Correct starting date in --version string.
756 * gnatdll.adb: Use Check_Version_And_Help_G to implement --help
758 * gnatkr.adb: Use Check_Version_And_Help_G to implement --help
760 * gnatlink.adb: Correct starting date in --version string.
761 * gnatls.adb: Correct starting date in --version string.
762 * make.adb: Correct starting date in --version string.
764 2013-09-10 Robert Dewar <dewar@adacore.com>
766 * switch-c.adb: Minor reformatting.
767 * atree.ads (Original_Nodes): Add documentation on ASIS usage.
768 * sinfo.ads: Add section on ASIS mode (documentation only).
770 2013-09-10 Robert Dewar <dewar@adacore.com>
772 * sem_prag.adb (Analyze_Pragma, case Warnings): Don't allow
773 REASON parameter in compiler units (bootstrap issues).
775 2013-09-10 Robert Dewar <dewar@adacore.com>
777 * gnat1drv.adb (Adjust_Global_Switches): Output warning if
778 -gnateE specified for a target that does not support it.
780 2013-09-10 Ed Schonberg <schonberg@adacore.com>
782 * sem_prag.adb (Analyze_Pragma, case SPARK_Mode): Handle properly
783 a subprogram body without previous spec.
785 2013-09-10 Gary Dismukes <dismukes@adacore.com>
787 * sem_ch4.adb: Minor typo fixes.
789 2013-09-10 Hristian Kirtchev <kirtchev@adacore.com>
791 * aspects.adb (Aspects_On_Body_OK): New routine.
792 * aspects.ads: Modify type Aspect_Expression to include
793 the Optional_XXX variants. Update the contents of
794 table Aspect_Argument. Add table Aspect_On_Body_OK.
795 (Aspects_On_Body_OK): New routine.
796 * par-ch13.adb (Get_Aspect_Specifications): Account for optional
797 names and expressions when parsing an aspect.
798 * sem_ch6.adb: Add with and use clause for Aspects.
799 (Analyze_Subprogram_Body_Helper): Do not emit an error when
800 analyzing a body with aspects that can be applied simultaneously
801 to both spec and body.
802 * sem_ch13.adb (Analyze_Aspect_Specifications): Insert the
803 corresponding pragma of an aspect that applies to a subprogram
804 body in the declarative part.
805 (Make_Aitem_Pragma): Do not generate a pragma with an empty argument
808 2013-09-10 Robert Dewar <dewar@adacore.com>
810 * switch-c.adb: Diagnose -gnatc given after -gnatRm.
811 * gnat_ugn.texi: Add documentation for -gnatRm.
812 * usage.adb: Minor reorganization (put style entries in proper
813 order) Document -gnatRm switch.
814 * sinfo.ads: Minor comment fix.
816 2013-09-10 Sergey Rybin <rybin@adacore.com frybin>
818 * tree_io.ads: Update ASIS_Version_Number.
820 2013-09-10 Ed Schonberg <schonberg@adacore.com>
822 * sem_ch3.adb (Access_Subprogram_Declaration): Check whether the
823 designated type can appear in a parameterless call.
824 * sem_ch4.adb (Analyze_Call): Do not insert an explicit dereference
825 in the case of an indirect call through an access function that
826 returns an array type.
827 (Analyze_One_Call): Handle properly legal parameterless calls
828 whose result is indexed, in constructs of the for F.all (I)
829 * sem_ch6.ads (May_Need_Actuals): Make public, for use on access
831 * sem_res.adb (Resolve_Call): If the call is indirect, there is
832 no entity to set on the name in the call.
834 2013-09-10 Hristian Kirtchev <kirtchev@adacore.com>
836 * aspects.adb: Add entries in the Has_Aspect_Specifications_Flag
837 table for package body and body stubs.
838 (Move_Or_Merge_Aspects): New routine.
839 (Remove_Aspects): New routine.
840 * aspects.ads (Move_Aspects): Update comment on usage.
841 (Move_Or_Merge_Aspects): New routine.
842 (Remove_Aspects): New routine.
843 * par-ch3.adb: Update the grammar of private_type_declaration,
844 private_extension_declaration, object_renaming_declaration,
845 and exception_renaming_declaration.
846 (P_Subprogram): Parse the
847 aspect specifications that apply to a body stub.
848 * par-ch6.adb: Update the grammar of subprogram_body_stub and
849 generic_instantiation.
850 * par-ch7.adb: Update the grammar of package_declaration,
851 package_specification, package_body, package_renaming_declaration,
853 (P_Package): Parse the aspect specifications
854 that apply to a body, a body stub and package renaming.
855 * par-ch9.adb: Update the grammar of entry_declaration,
856 protected_body, protected_body_stub, task_body,
858 (P_Protected): Add local variable
859 Aspect_Sloc. Add local constant Dummy_Node. Parse the aspect
860 specifications that apply to a protected body and a protected
862 (P_Task): Add local variable Aspect_Sloc. Add local
863 constant Dummy_Node. Parse the aspect specifications that apply
864 to a task body and a task body stub.
865 * par-ch12.adb: Update the grammar of
866 generic_renaming_declaration.
867 (P_Generic): Parse the aspect
868 specifications that apply to a generic renaming.
869 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Do not emit
870 an error when analyzing aspects that apply to a body stub. Such
871 aspects are relocated to the proper body.
872 * sem_ch7.adb (Analyze_Package_Body_Helper): Analyze the aspect
873 specifications that apply to a body.
874 * sem_ch9.adb (Analyze_Protected_Body): Warn about user-defined
875 aspects not being supported on protected bodies. Remove the
876 aspect specifications. (Analyze_Single_Protected_Declaration):
877 Analyze the aspects that apply to a single protected declaration.
878 (Analyze_Task_Body): Warn about user-defined aspects not being
879 supported on task bodies. Remove the aspect specifications.
880 * sem_ch10.adb: Add with and use clause for Aspects.
881 (Analyze_Package_Body_Stub): Propagate the aspect specifications
882 from the stub to the proper body.
883 * sem_ch13.adb (Analyze_Aspect_Specifications): Insert the
884 corresponding pragma of an aspect that applies to a body in the
885 declarations of the body.
886 * sinfo.ads: Update the gramma of expression_function,
887 private_type_declaration, private_extension_declaration,
888 object_renaming_declaration, exception_renaming_declaration,
889 package_renaming_declaration, subprogram_renaming_declaration,
890 generic_renaming_declaration, entry_declaration,
891 subprogram_body_stub, package_body_stub, task_body_stub,
892 generic_subprogram_declaration.
894 2013-09-10 Hristian Kirtchev <kirtchev@adacore.com>
896 * sem_prag.adb (Analyze_Pragma): Add processing
897 for aspect/pragma SPARK_Mode when it applies to a [library-level]
898 subprogram or package [body].
900 2013-09-10 Robert Dewar <dewar@adacore.com>
902 * gnat_ugn.texi: Document that -gnatc and -gnatR cannot be
904 * switch-c.adb (Scan_Front_End_Switches): Give error if both
905 -gnatR and -gnatc given.
907 2013-09-10 Robert Dewar <dewar@adacore.com>
909 * g-table.ads, g-table.adb (For_Each): New generic procedure
910 (Sort_Table): New generic procedure.
912 2013-09-10 Thomas Quinot <quinot@adacore.com>
914 * adaint.c (__gnat_is_executable_file_attr): Should be true
915 for an executable regular file only only (not for a directory
916 that has the executable permission).
918 2013-09-10 Ed Schonberg <schonberg@adacore.com>
920 * sem_res.adb: Further work on operator calls in ASIS.
922 2013-09-10 Yannick Moy <moy@adacore.com>
924 * sinfo.ads, sem_prag.ads, sem_ch13.adb: Minor correction and comment
927 2013-09-10 Thomas Quinot <quinot@adacore.com>
929 * aspects.ads, sem_ch13.adb: Minor reformatting.
930 * adaint.c (__gnat_set_close_on_exec): Add comment documenting
931 that this routine is shared between OS_Lib and Sockets.
933 2013-09-10 Robert Dewar <dewar@adacore.com>
935 * exp_prag.adb (Expand_Pragma_Check): Ignore pragma if Is_Ignored set.
936 * sem_ch13.adb (Make_Aitem_Pragma): Set Is_Checked if needed.
937 * sem_prag.adb (Check_Kind): Moved from spec (Analyze_Pragma):
938 Make sure Is_Ignored/Is_Checked are set right (Analyze_Pragma,
939 case Check): Ditto (Check_Applicable_Policy): Handle
940 Statement_Assertion case Throughout, set and check the Is_Checked
942 * sem_prag.ads (Check_Kind): Moved to body.
943 * sinfo.ads, sinfo.adb (Is_Checked): New flag.
945 2013-09-10 Robert Dewar <dewar@adacore.com>
947 * aspects.ads (Delay_Type): New type (Aspect_Delay): New table.
948 * einfo.adb (Has_Delayed_Rep_Aspects): New flag
949 (May_Inherit_Delayed_Rep_Aspects): New flag (Rep_Clause): Removed
950 (use Get_Attribute_Representation_Clause).
951 * einfo.ads (Has_Delayed_Rep_Aspects): New flag
952 (May_Inherit_Delayed_Rep_Aspects): New flag
953 * freeze.adb: Minor reformatting
954 * sem_ch13.adb (Analyze_Aspect_Speficifications): Redo
955 handling of delayed evaluation, including optimizing some cases
957 (Analyze_Aspects_At_Freeze_Point): Now
958 handled inheriting delayed rep aspects for type derivation case.
959 (Inherit_Delayed_Rep_Aspects): New procedure
960 * sem_ch13.ads (Analyze_Aspects_At_Freeze_Point): Now handled
961 inheriting delayed rep aspects for type derivation case.
962 * sem_ch3.adb (Build_Derived_Type): Set
963 May_Inherit_Derived_Rep_Aspects if parent type flag
964 Has_Delayed_Rep_Aspects is set
966 2013-09-10 Robert Dewar <dewar@adacore.com>
968 * errout.adb (Finalize): Don't delete real errors with specific
971 2013-09-10 Ed Schonberg <schonberg@adacore.com>
973 * exp_ch9.adb (Expand_N_Timed_Entry_Call,
974 Expand_N_Conditional_Entry_Call, Expand_N_Asynchronous_Select):
975 Handle properly a trigger that is a call to a primitive operation
976 of a type that implements a limited interface, if the type itself
979 2013-09-10 Robert Dewar <dewar@adacore.com>
981 * sem_ch3.adb, sinfo.ads, exp_ch9.adb, sem_prag.adb, sem_ch12.adb,
982 exp_ch4.adb, sprint.adb: Minor reformatting.
984 2013-09-10 Yannick Moy <moy@adacore.com>
986 * sinfo.ads: Document splitting of pre/post in N_Contract description.
988 2013-09-10 Ed Schonberg <schonberg@adacore.com>
990 * exp_ch4.adb (Expand_N_Op_Multiply): If the operation is of the
991 form X * 2 ** N and it has been marked Is_Power_Of_2_For_Shift,
992 add a mod operation if the result type is a binary modular type.
994 2013-09-10 Hristian Kirtchev <kirtchev@adacore.com>
996 * sem_prag.adb (Check_Mode_Restriction_In_Enclosing_Context): Add local
997 variable Context. Remove local variable Subp_Id. Start the
998 context traversal from the current subprogram rather than the
999 current scope. Update the scope traversal and error reporting.
1001 2013-09-10 Ed Schonberg <schonberg@adacore.com>
1003 * exp_ch9.adb (Expand_N_Timed_Entry_Call): New procedure
1004 Rewrite_Triggering_Statements, to encapsulate the statements that
1005 follow the trigger of the entry call. This procedure is needed
1006 when the trigger is a dispatching call, because the expansion
1007 requires several copies of those statements. The procedure is
1008 more efficient, and preserves non-local references when the
1009 construct is within an instance.
1011 2013-09-10 Ed Schonberg <schonberg@adacore.com>
1013 * sem_ch12.adb (Analyze_Package_Instantiation): If the
1014 instantiation is a compilation unit, analyze aspects before
1015 analyzing the package declaration for the instance.
1016 * sem_ch13.adb (Analyze_Aspect_Specifications): If the
1017 corresponding node is a package instantiation, insert generated
1018 pragmas at the head of visible declarations.
1019 * sem_prag.adb (Analyze_Pragma, case Preelaborate): In an instance
1020 do not ignore the pragma if it comes from an aspect specification
1021 in the instance, and not from the generic unit.
1022 * sprint.adb (Sprint_Node_Actual): For a package declaration that
1023 is an instantiation, print aspects after declaration.
1025 2013-09-10 Robert Dewar <dewar@adacore.com>
1027 * einfo.adb, sem_prag.adb, rtsfind.ads: Minor reformatting.
1029 2013-09-10 Hristian Kirtchev <kirtchev@adacore.com>
1031 * sem_prag.adb (Get_SPARK_Mode_Id): Handle the
1032 case where the pragma may appear without an argument.
1033 (Analyze_Global_List): Add expanded_name to the list of constructs
1034 that denote a single item.
1035 (Collect_Global_List): Add expanded_name to the list of constructs
1036 that denote a single item.
1038 2013-09-10 Hristian Kirtchev <kirtchev@adacore.com>
1040 * exp_ch4.adb (Apply_Accessibility_Check): Add local constant
1041 Pool_Id and local variables Fin_Call and Free_Stmt. Finalize
1042 and deallocate a heap-allocated class-wide object after it
1043 has been determined that it violates the accessibility rules.
1044 * rtsfind.ads: Add new RTU_Id for System.Memory. Add new RE_Id
1045 and entry in RE_Unit_Table for RE_Free.
1047 2013-09-01 Eric Botcazou <ebotcazou@adacore.com>
1048 Iain Sandoe <iain@codesourcery.com>
1051 * gcc-interface/Makefile.in (GCC_LINK_FLAGS): Add -static-libstdc++.
1052 (GCC_LINK): Use CXX instead of CC.
1053 * gcc-interface/Make-lang.in (CXX_LFLAGS): New.
1054 (ADA_TOOLS_FLAGS_TO_PASS): Pass CXX, and CXX_LFLAGS for native.
1056 2013-08-13 Eric Botcazou <ebotcazou@adacore.com>
1058 * gcc-interface/decl.c (gnat_to_gnu_entity): Do not bother about alias
1059 sets of derived types in ASIS mode.
1061 2013-08-13 Eric Botcazou <ebotcazou@adacore.com>
1063 * gcc-interface/decl.c (gnat_to_gnu_entity): Replace True with true.
1064 (is_cplusplus_method): Likewise, and False with false.
1065 (components_need_strict_alignment): Likewise.
1066 * gcc-interface/misc.c (gnat_init_gcc_fp): Likewise.
1067 * gcc-interface/trans.c (Loop_Statement_to_gnu): Likewise.
1068 (Handled_Sequence_Of_Statements_to_gnu): Likewise.
1069 (add_cleanup): Likewise.
1070 (Sloc_to_locus1): Likewise.
1071 (Sloc_to_locus): Likewise.
1072 (set_expr_location_from_node): Likewise.
1073 * gcc-interface/utils.c (potential_alignment_gap): Likewise.
1075 2013-08-13 Thomas Quinot <quinot@adacore.com>
1077 * gcc-interface/trans.c (set_end_locus_from_node): Clear column info
1078 for the end_locus of a block if it does not come from an End_Label.
1080 2013-08-13 Thomas Quinot <quinot@adacore.com>
1082 * gcc-interface/trans.c (Handled_Sequence_Of_Statements_to_gnu): If
1083 there is no End_Label, attach cleanup actions to the sloc of the HSS
1085 (Exception_Handler_to_gnu_zcx): Associate cleanup actions with the sloc
1086 of the handler itself.
1087 (add_cleanup): Clear column information in sloc of cleanup actions.
1088 (Sloc_to_locus1): New static function.
1089 (Sloc_to_locus): Call it.
1090 (set_expr_location_from_node1): New static function.
1091 (set_expr_location_from_node): Call it.
1093 2013-08-13 Eric Botcazou <ebotcazou@adacore.com>
1095 * gcc-interface/trans.c (Call_to_gnu): Deal with specific conditional
1096 expressions for misaligned actual parameters.
1098 2013-08-13 Eric Botcazou <ebotcazou@adacore.com>
1100 * gcc-interface/trans.c (can_equal_min_or_max_val_p): Be prepared for
1101 values outside of the range of the type.
1103 2013-08-13 Eric Botcazou <ebotcazou@adacore.com>
1105 * gcc-interface/utils2.c (build_atomic_load): Do a mere view-conversion
1106 to the original type before converting to the result type.
1107 (build_atomic_store): First do a conversion to the original type before
1108 view-converting to the effective type, but deal with a padded type
1111 2013-08-08 Eric Botcazou <ebotcazou@adacore.com>
1113 * gcc-interface/Makefile.in (TOOLS_LIBS): Pick C object files from the
1114 compiler build and use standard library variables.
1115 (../../vxaddr2line$(exeext): Do not depend on targext.o and adjust.
1116 (gnatmake-re): Do not depend on targext.o.
1117 (gnatlink-re): Do not depend on link.o and targext.o.
1118 (../../gnatmake$(exeext): Likewise.
1119 (../../gnatlink$(exeext): Likewise.
1121 2013-07-21 OndÃ…
\99ej BÃÂlka <neleai@seznam.cz>
1123 * gcc-interface/gigi.h: Fix typos.
1124 * gcc-interface/trans.c: Likewise.
1125 * gcc-interface/utils2.c: Likewise.
1126 * gnat_rm.texi: Likewise.
1127 * gnat_ugn.texi: Likewise.
1128 * raise-gcc.c: Likewise.
1129 * sigtramp-ppcvxw.c: Likewise.
1130 * sysdep.c: Likewise.
1131 * terminals.c: Likewise.
1133 2013-07-20 Eric Botcazou <ebotcazou@adacore.com>
1136 * gcc-interface/ada.h (CAT): Fix typo.
1138 2013-07-08 Hristian Kirtchev <kirtchev@adacore.com>
1140 * einfo.adb (Get_Pragma): Handle the retrieval of delayed
1141 pragmas stored in N_Contract nodes.
1142 * einfo.ads (Get_Pragma): Update the comment on usage.
1143 * sem_prag.adb (Check_Precondition_Postcondition): Retain a copy
1144 of the pragma when it applies to a body that acts as a spec. The
1145 copy is preanalyzed and chained on the contract of the body.
1147 2013-07-08 Robert Dewar <dewar@adacore.com>
1149 * rtsfind.adb: Minor comment fix.
1151 2013-07-08 Hristian Kirtchev <kirtchev@adacore.com>
1153 * sem_ch4.adb (Check_Ghost_Subprogram_Call): Do not check the placement
1154 of a Ghost function call when the enclosing context is being
1157 2013-07-08 Ed Schonberg <schonberg@adacore.com>
1159 * exp_ch6.adb (Expand_Inlined_Call, Process_Formals): If the
1160 expression in a return statement is a numeric literal, qualify
1161 it with the return type for proper resolution.
1163 2013-07-08 Robert Dewar <dewar@adacore.com>
1165 * sem.ads: Minor comment updates.
1166 * s-restri.ads, exp_ch6.adb, lib-load.ads, exp_ch3.adb, sem_ch10.adb:
1169 2013-07-08 Robert Dewar <dewar@adacore.com>
1171 * exp_attr.adb (Expand_N_Attribute_Reference): Add dummy entry
1172 for Restriction_Set.
1173 * gnat_rm.texi: Add missing menu entry for Attribute Ref Add
1174 documentation for attribute Restriction_Set.
1175 * lib-writ.adb (Write_With_Lines): Generate special W lines
1176 for Restriction_Set.
1177 * lib-writ.ads: Document special use of W lines for
1179 * lib.ads (Restriction_Set_Dependences): New table.
1180 * par-ch4.adb (Is_Parameterless_Attribute): Add Loop_Entry to
1181 list (Scan_Name_Extension_Apostrophe): Remove kludge test for
1182 Loop_Entry (Scan_Name_Extension_Apostrophe): Handle No_Dependence
1184 * restrict.adb (Check_SPARK_Restriction): Put in Alfa order
1185 (OK_No_Dependence_Unit_Name): New function.
1186 * restrict.ads (OK_No_Dependence_Unit_Name): New function.
1187 * rtsfind.adb: Minor reformatting Minor code reorganization.
1188 * sem_attr.adb (Analyze_Attribute): Add processing for
1190 * sem_prag.adb (Process_Restrictions_Or_Restriction_Warnings):
1191 Remove Check_Unit_Name and use new function
1192 OK_No_Dependence_Unit_Name instead.
1193 * sinfo.ads: Minor comment updates.
1194 * snames.ads-tmpl: Add entry for Restriction_Set attribute.
1196 2013-07-08 Hristian Kirtchev <kirtchev@adacore.com>
1198 * exp_ch4.adb (Apply_Accessibility_Check): Remove local constant
1199 Pool_Id and local variable Free_Stmt. Do not deallocate the faulty
1200 object as "free" is not available on all targets/profiles.
1202 2013-07-08 Robert Dewar <dewar@adacore.com>
1204 * sem_ch13.adb (Analyze_Aspect_Specifications): Handle
1205 Storage_Size aspect for task type in case discriminant is
1207 (Analyze_Attribute_Definition_Clause): Do not flag Storage_Size
1208 attribute definition clause as obsolescent if from aspect.
1210 2013-07-08 Robert Dewar <dewar@adacore.com>
1212 * gnat_rm.texi: Add documentation for Img returning a function.
1213 * par-prag.adb: Minor reformatting.
1214 * restrict.adb: Minor reformatting and code reorganization.
1216 2013-07-08 Ed Schonberg <schonberg@adacore.com>
1218 * sem_res.adb: add guard to ASIS transform.
1220 2013-07-08 Ed Schonberg <schonberg@adacore.com>
1222 * exp_ch9.adb (Expand_N_Asynchronous_Select): If the trigger
1223 of the asynchronous select is a dispatching call, transform the
1224 abortable part into a procedure, to avoid duplication of local
1225 loop variables that may appear within.
1227 2013-07-08 Vincent Celier <celier@adacore.com>
1229 * projects.texi: Update the documentation of suffixes in package
1232 2013-07-08 Ed Schonberg <schonberg@adacore.com>
1234 * sem_ch6.adb (Conforming_Types): Anonymous_access_to_subprograsm
1235 types are type conformant if the designated type of one is
1236 protected and the other is not. Convention only matters when
1237 checking subtype conformance.
1239 2013-07-08 Ed Schonberg <schonberg@adacore.com>
1241 * sem_res.adb (Make_Call_Into_Operator): In ASIS mode, propagate
1242 back the fully resolved operands to the original function call
1243 so that all semantic information remains available to ASIS.
1245 2013-07-08 Ed Schonberg <schonberg@adacore.com>
1247 * sem_ch4.adb: minor reformatting (remove obsolete comment).
1248 * sem_ch9.adb: improve error message on illegal trigger.
1250 2013-07-08 Robert Dewar <dewar@adacore.com>
1252 * sem_prag.adb: Minor reformatting.
1254 2013-07-08 Robert Dewar <dewar@adacore.com>
1256 * gnatcmd.adb: Minor reformatting.
1258 2013-07-08 Robert Dewar <dewar@adacore.com>
1260 * targparm.adb (Get_Target_Parameters): Recognize pragma
1261 Partition_Elaboration_Policy.
1263 2013-07-08 Robert Dewar <dewar@adacore.com>
1265 * gnat_ugn.texi: Minor update to mention partition elaboration policy.
1267 2013-07-08 Ed Schonberg <schonberg@adacore.com>
1269 * sem_ch4.adb (Comple_Object_Operation): Revert previous change.
1270 (Analyze_Indexed_Component_Form): In ASIS mode, if node has been
1271 transformed but not rewritten as a function call (as is the case
1272 in a generic), analyze it as such.
1274 2013-07-08 Thomas Quinot <quinot@adacore.com>
1276 * gnat_rm.texi: Minor rewording: add missing word "operators"
1277 in documentation for restriction No_Direct_Boolean_Operator.
1279 2013-07-08 Robert Dewar <dewar@adacore.com>
1281 * errout.adb (Set_Msg_Txt): No longer sets Is_Style_Msg,
1282 Is_Warning_Msg, or Is_Unconditional_Msg (all are set elsewhere
1284 * errout.ads: Insertions ! and !! no longer have to be at the
1285 end of the message, they can be anywhere in the message.
1286 * erroutc.adb (Test_Style_Warning_Serious_Unconditional_Msg):
1287 Replaces Test_Style_Warning_Serious_Msg
1288 * erroutc.ads (Has_Double_Exclam): New flag New comments for
1289 existing flags (Test_Style_Warning_Serious_Unconditional_Msg):
1290 Replaces Test_Style_Warning_Serious_Msg
1291 * errutil.adb (Test_Style_Warning_Serious_Unconditional_Msg):
1292 Replaces Test_Style_Warning_Serious_Msg
1294 2013-07-08 Robert Dewar <dewar@adacore.com>
1296 * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings):
1297 Recognize SPARK_05 as synonym for SPARK in restrictions pragma.
1298 * restrict.ads, restrict.adb (SPARK_Hides): Table moved to body, only
1300 * scng.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb, sem_ch8.adb,
1301 sem_res.adb, sem_util.adb: Use restriction SPARK_05 instead of SPARK.
1302 * snames.ads-tmpl (Name_No_Obsolescent_Features): New entry.
1304 2013-07-08 Vincent Celier <celier@adacore.com>
1306 * gnatcmd.adb (Check_Files): Use a response file for gnatls
1309 2013-07-08 Gary Dismukes <dismukes@adacore.com>
1311 * freeze.adb: Minor typo fixes.
1313 2013-07-08 Robert Dewar <dewar@adacore.com>
1315 * gnat_rm.texi: Document SPARK_05 (replaces SPARK) Document
1316 obsolete recognition of SPARK Document all other obsolete synonyms
1317 for old restrictions.
1318 * restrict.adb (Check_SPARK_Restriction): SPARK_05 replaces
1319 SPARK (Process_Restriction_Synonyms): Handle SPARK as synonym
1321 * restrict.ads: Restriction SPARK_05 replaces SPARK.
1322 * s-rident.ads: Replace restriction SPARK by SPARK_05 Add SPARK
1323 as synonym for SPARK_05.
1324 * sem_prag.adb: Minor reformatting.
1325 * snames.ads-tmpl: Add entries for Name_SPARK and Name_SPARK_05.
1327 2013-07-08 Robert Dewar <dewar@adacore.com>
1329 * sem_dim.adb: Minor error message change.
1330 * freeze.adb (Freeze_Entity, array type case): Extend handling
1331 of Implicit_Packing to handle multi-dimensional array case.
1332 * gnat_rm.texi: Update doc on Implicit_Packing.
1334 2013-07-08 Robert Dewar <dewar@adacore.com>
1336 * exp_ch4.adb: Minor reformatting.
1338 2013-07-08 Ed Schonberg <schonberg@adacore.com>
1340 * sem_ch4.adb (Complete_Object_Operation): In ASIS mode, if
1341 the parent node is a selected component and the analysis as a
1342 call is successful, set the type of the selector in the parent
1343 node for subsequent checks, because the rewriting of the node
1344 does not take place during pre-analysis.
1346 2013-07-08 Robert Dewar <dewar@adacore.com>
1348 * sem_ch8.adb, exp_ch3.adb: Minor reformatting.
1350 2013-07-08 Hristian Kirtchev <kirtchev@adacore.com>
1352 * exp_ch4.adb (Expand_N_Op_Eq): When comparing two
1353 Bounded_Strings, use the predefined equality function of the
1354 root Super_String type.
1356 2013-07-08 Hristian Kirtchev <kirtchev@adacore.com>
1358 * exp_ch4.adb (Create_Alternative): Removed.
1359 (Expand_N_If_Expression): Remove constant
1360 In_Case_Or_If_Expression. Add local variable
1361 Ptr_Typ. Inspect the "then" and "else" action lists
1362 for transient controlled objects and generate code to
1363 finalize them. (Is_Controlled_Function_Call): Removed.
1364 (Process_Action): Update the comment on usage. Update the call
1365 to Process_Transient_Object. There is no need to continue the
1366 traversal of the object itself.
1367 (Process_Actions): New routine.
1368 (Process_Transient_Object): Moved to the top level of Exp_Ch4. Add
1369 a new formal and update the related comment on usage.
1370 * exp_util.adb (Within_Case_Or_If_Expression): Start the search
1371 from the parent of the node.
1373 2013-07-08 Robert Dewar <dewar@adacore.com>
1375 * a-cusyqu.ads, a-cbprqu.ads, s-interr.ads, a-cuprqu.ads,
1376 a-cbsyqu.ads: Minor reformatting (proper formatting of overriding).
1378 2013-07-08 Ed Schonberg <schonberg@adacore.com>
1380 * sem_ch8.adb (Attribute_Renaming): Treat 'Img as an attribute
1381 that can be renamed as a function.
1383 2013-07-08 Thomas Quinot <quinot@adacore.com>
1385 * g-socket.ads: Document target dependency: FIONBIO may or may not
1386 be inherited from listening socket by accepted socket.
1388 2013-07-08 Hristian Kirtchev <kirtchev@adacore.com>
1390 * exp_ch4.adb (Apply_Accessibility_Check): Do not deallocate the object
1391 on targets that can't deallocate.
1393 2013-07-08 Hristian Kirtchev <kirtchev@adacore.com>
1395 * exp_ch3.adb (Freeze_Type): Generate a
1396 subpools-related accessibility check only on profiles that
1397 include the corresponding library unit.
1399 2013-07-08 Gary Dismukes <dismukes@adacore.com>
1401 * sem_ch8.adb: Minor typo fixes.
1403 2013-07-08 Javier Miranda <miranda@adacore.com>
1405 * sem_ch8.adb (Save_Scope_Stack): Adding documentation.
1406 (Restore_Scope_Stack): Remove the elements of the list when the
1407 visibility of each entity is restored.
1409 2013-07-08 Robert Dewar <dewar@adacore.com>
1411 * exp_ch9.adb, sem.ads, sem_util.adb: Minor reformatting.
1413 2013-07-08 Robert Dewar <dewar@adacore.com>
1415 * sem_ch8.adb, sem_ch8.ads: Minor reformatting.
1417 2013-07-08 Gary Dismukes <dismukes@adacore.com>
1419 * gnat_rm.texi: Minor reformatting and rewording for consistency.
1421 2013-07-08 Bob Duff <duff@adacore.com>
1423 * exp_ch3.adb (Build_Master): If Desig_Type is an incomplete
1424 view coming from a limited-with'ed package, use the nonlimited
1425 view in case it has tasks.
1427 2013-07-08 Javier Miranda <miranda@adacore.com>
1429 * sem_ch8.ad[sb] (Save_Scope_Stack): Modified to return the list
1430 of entities which have been temporarily removed from immediate
1432 (Restore_Scope_Stack): Modified to receive an
1433 additional parameter with the list of entities whose immediate
1434 visibility must be restored.
1435 * sem.adb (Do_Analyze): Use new version of
1436 Save_Scope_Stack/Restore_Scope_Stack
1437 * sem_ch12.adb (Inline_Instance_Body): Use new version of
1438 Save_Scope_Stack and Restore_Scope_Stack
1440 2013-07-08 Hristian Kirtchev <kirtchev@adacore.com>
1442 * sem_prag.adb (Analyze_Pragma): Remove
1443 variable Unit_Prag. Remove the check on duplicate mode for the
1444 configuration form of the pragma.
1445 (Redefinition_Error): Removed.
1447 2013-07-08 Robert Dewar <dewar@adacore.com>
1449 * lib.ads, gnat_rm.texi, einfo.ads, sem_ch13.adb: Minor reformatting
1452 2013-07-08 Ed Schonberg <schonberg@adacore.com>
1454 * sem_prag.adb (Analyze_PPC_In_Decl_Part): In ASIS mode,
1455 pre-analyze only the original expression attached to the source
1456 aspect, not the relocated expression of the pragma, to prevent
1457 malformed trees in ASIS mode.
1458 * sem_ch13.adb (Analyze_Aspect_Specifications): Revert previous
1459 patch: the expression in the aspect for pre/post must be relocated
1460 to the pragma for proper analysis.
1462 2013-07-05 Hristian Kirtchev <kirtchev@adacore.com>
1464 * aspects.adb: Add an entry for SPARK_Mode in table Canonical_Aspect.
1465 * aspects.ads: Add an entry for SPARK_Mode in tables Aspect_Id,
1466 Aspect_Argument, Aspect_Names.
1467 * atree.adb (Node32): New routine.
1468 (Set_Node32): New routine.
1469 * atree.ads (Node32): New routine.
1470 (Set_Node32): New routine.
1471 * einfo.adb: Node32 is now used as SPARK_Mode_Pragmas.
1472 (Set_SPARK_Mode_Pragmas): New routine.
1473 (SPARK_Mode_Pragmas): New routine.
1474 (Write_Field32_Name): Add and entry for SPARK_Modes.
1475 * einfo.ads: Add attribute SPARK_Mode_Pragmas along with usage
1476 in various entities.
1477 (Set_SPARK_Mode_Pragmas): New routine and
1479 (SPARK_Mode_Pragmas): New routine and pragma Inline.
1480 * gnat_rm.texi: Add sections explaining the syntax and semantics
1481 of aspect/pragma SPARK_Mode.
1482 * gnat_ugn.texi: Add pragma SPARK_Mode to the list of
1483 configuration pragmas.
1484 * lib.adb (Set_SPARK_Mode_Pragma): New routine.
1485 (SPARK_Mode_Pragma): New routine.
1486 * lib.ads: Alphabetize the comments on fields of record
1487 Unit_Record. Add new field SPARK_Mode_Pragma along with
1488 comment on its usage. Update the layout of record Unit_Record.
1489 (Set_SPARK_Mode_Pragma): New routine and pragma Inline.
1490 (SPARK_Mode_Pragma): New routine and pragma Inline.
1491 * lib-load.adb (Create_Dummy_Package_Unit): Initialize
1492 field SPARK_Mode_Pragma.
1493 (Load_Main_Source): Initialize field SPARK_Mode_Pragma.
1494 (Load_Unit): Initialize field SPARK_Mode_Pragma.
1495 * lib-writ.adb (Add_Preprocessing_Dependency): Initialize field
1497 (Ensure_System_Dependency): Initialize field SPARK_Mode_Pragma.
1498 * opt.ads: Alphabetize verification flags. Store the
1499 compilation-wide SPARK mode in variable Global_SPARK_Mode.
1500 * par-prag.adb: Pragma SPARK_Mode does not need special processing
1502 * sem_ch13.adb (Analyze_Aspect_Specifications): Convert aspect
1503 SPARK_Mode into a pragma.
1504 (Check_Aspect_At_Freeze_Point): Aspect SPARK_Mode does not need
1506 * sem_prag.adb: Add an entry for SPARK_Mode in table Sig_Flags.
1507 (Analyze_Pragma): Add processing for pragma SPARK_Mode.
1508 (Get_SPARK_Mode_Id): New routine.
1509 (Is_Elaboration_SPARK_Mode): New routine.
1510 (Is_Private_SPARK_Mode): New routine.
1511 * sem_prag.ads (Get_SPARK_Mode_Id): New routine.
1512 (Is_Elaboration_SPARK_Mode): New routine.
1513 (Is_Private_SPARK_Mode): New routine.
1514 * sinfo.ads: Update the comment on the usage of field Next_Pragma.
1515 * snames.ads-tmpl: Add new predefined name for SPARK_Mode and
1516 Auto. Add new pragma Id for SPARK_Mode.
1517 * types.ads: Add new type SPARK_Mode_Id.
1519 2013-07-05 Ed Schonberg <schonberg@adacore.com>
1521 * sem_ch13.adb (Analyze_Aspect_Specifications): For
1522 pre/postconditions copy the expression to the generated pragma,
1523 to avoid sharing between the original aspect and the pragma node,
1524 because in ASIS_Mode both will be independently analyzed.
1526 2013-07-05 Ed Schonberg <schonberg@adacore.com>
1528 * exp_ch3.adb (Build_Variant_Record_Equality): Add pairs of
1529 formals for each discriminant of an unchecked union.
1530 (Make_Eq_Case): Suprogram accepts a list of discriminants. Nested
1531 variants are supported. New helper function Corresponding_Formal.
1532 * exp_ch4.adb (Build_Equality_Call): For unchecked unions,
1533 loop through discriminants to create list of inferred values,
1534 and modify call to equality routine accordingly.
1536 2013-07-05 Claire Dross <dross@adacore.com>
1538 * a-cfdlli.ads, a-cfhama.ads, a-cfhase.ads, a-cforma.ads,
1539 a-cforse.ads, a-cofove.ads: Add preconditions when needed +
1540 container types are not tagged any more.
1542 2013-07-05 Thomas Quinot <quinot@adacore.com>
1544 * freeze.adb (Freeze_Entity): For an object with captured
1545 initialization statements, do not remove Init_Stmts from the
1546 enclosing list, as Freeze_All might rely on it to know where to
1549 2013-07-05 Robert Dewar <dewar@adacore.com>
1551 * exp_ch4.adb, a-cfdlli.ads, a-ngelfu.ads, s-bignum.adb: Minor
1554 2013-07-05 Hristian Kirtchev <kirtchev@adacore.com>
1556 * exp_ch4.adb (Expand_Composite_Equality): Use the full view
1557 when the base type is private.
1559 2013-07-05 Claire Dross <dross@adacore.com>
1561 * a-cfdlli.ads: Add preconditions when needed.
1563 2013-07-05 Robert Dewar <dewar@adacore.com>
1565 * sem_ch8.adb: Minor reformatting.
1567 2013-07-05 Ed Schonberg <schonberg@adacore.com>
1569 * sem_ch3.adb (Access_Subprogram_Declaration): Use
1570 Generate_Reference_To_Formals.
1571 * lib-xref.adb (Generate_Reference_To_Formals): In the case of
1572 access to subprograms, the formals are found in the designated
1575 2013-07-05 Robert Dewar <dewar@adacore.com>
1577 * gnat_ugn.texi: Document that comments can be lined up with
1578 previous non-blank line.
1579 * styleg.adb (Check_Comment): Allow indentation to match previous
1580 non-blank line (Same_Column_As_Previous_Line): New function
1582 2013-07-05 Robert Dewar <dewar@adacore.com>
1584 * gnat_rm.texi: Update doc on missing pragmas.
1585 * sem_ch12.adb: Minor comment additions.
1587 2013-07-05 Hristian Kirtchev <kirtchev@adacore.com>
1589 * sem_prag.adb (Analyze_Pragma): Ensure that
1590 Contract_Cases, Depends and Global are analyzed when they apply
1591 to a subprogram compilation unit. The pragmas are all added
1592 unconditionally to the construct's contract. This ensures that
1593 proof tools can locate the pragmas.
1595 2013-07-05 Ed Schonberg <schonberg@adacore.com>
1597 * sem_ch8.adb (Freeze_Actual_Profile): An instance within
1598 a generic unit does not freeze a generic private type of the
1599 enclosing generic. This rule must also apply to a type derived
1600 from a generic private type.
1602 2013-07-05 Arnaud Charlet <charlet@adacore.com>
1604 * gnat_rm.texi: Add missing documentation for pragmas.
1606 2013-07-05 Yannick Moy <moy@adacore.com>
1608 * sem_ch12.adb: Minor comment.
1610 2013-07-05 Robert Dewar <dewar@adacore.com>
1612 * gnat_rm.texi: Document that -gnatR and -gnatD cannot be used
1614 * switch-c.adb: Do not allow -gnatD and -gnatR to both be
1617 2013-07-05 Robert Dewar <dewar@adacore.com>
1619 * gnat_rm.texi: Add missing documentation for pragmas.
1620 * sem_ch8.adb: Minor reformatting.
1621 * gnat_ugn.texi: Document that -gnatR and -gnatD cannot be used
1624 2013-07-05 Yannick Moy <moy@adacore.com>
1626 * sem_ch12.ads, sem_ch12.adb (Need_Subprogram_Instance_Body): Force
1627 instance of subprogram body in SPARK mode, by testing Expander_Active
1628 (set in SPARK mode) instead of Full_Expander_Active (not set in
1630 * sem_ch8.adb: Minor reformatting.
1632 2013-07-05 Robert Dewar <dewar@adacore.com>
1634 * freeze.adb (Freeze_Entity): Remove test of obsolete flag
1635 Propagate_Exceptions, and associated useless code that did
1637 * gnat_rm.texi: Add documentation for obsolete pragma
1638 Propagate_Exceptions.
1639 * opt.ads (Propagate_Exceptions): Obsolete flag removed.
1640 * sem_prag.adb (Analyze_Pragma, case Propagate_Exceptions):
1641 Remove useless and obsolete setting of Propagate_Exceptions flag.
1643 2013-07-05 Robert Dewar <dewar@adacore.com>
1645 * gnat_rm.texi, sem_prag.adb: Minor comment/text fixes.
1647 2013-07-05 Robert Dewar <dewar@adacore.com>
1649 * gnat_rm.texi: Add missing doc for various pragmas.
1651 2013-07-05 Robert Dewar <dewar@adacore.com>
1653 * par_sco.adb, sem_ch12.adb, par-ch5.adb: Minor reformatting.
1654 * gnat_rm.texi: Document pragma Profile_Warnings.
1655 * restrict.ads, sem_prag.adb: Minor reformatting.
1657 2013-07-05 Ed Schonberg <schonberg@adacore.com>
1659 * sem_ch12.adb (Check_Formal_Package_Instance): Handle properly
1660 a formal subprogram that was defaulted in the formal package.
1662 2013-07-05 Thomas Quinot <quinot@adacore.com>
1664 * par_sco.adb (Traverse_Declarations_Or_Statements): Ignore
1665 N_Implicit_Label_Declaration nodes.
1667 2013-07-05 Robert Dewar <dewar@adacore.com>
1669 * a-cfhase.adb, sem_prag.adb, a-cfhama.adb: Minor reformatting.
1671 2013-07-05 Ed Schonberg <schonberg@adacore.com>
1673 * sem_ch12.adb (Copy_Generic_Node): Check that name in function
1674 call is a valid entity name before preserving entity in generic
1677 2013-07-05 Thomas Quinot <quinot@adacore.com>
1679 * par-ch5.adb: Minor reformatting.
1681 2013-07-05 Thomas Quinot <quinot@adacore.com>
1683 * sinfo.ads: Minor clarification to documentation for
1684 N_Implicit_Label_Declaration.
1686 2013-07-05 Hristian Kirtchev <kirtchev@adacore.com>
1688 * a-except-2005.adb, a-except.adb: Add constant Rmsg_17. Correct the
1689 values of all remaining constants.
1690 (Rcheck_35): New routine along with pragmas Export and No_Return.
1691 (Rcheck_PE_Aliased_Parameters): New routine along with pragmas
1692 Export and No_Return.
1693 (Rcheck_PE_All_Guards_Closed,
1694 Rcheck_PE_Bad_Predicated_Generic_Type,
1695 Rcheck_PE_Current_Task_In_Entry_Body,
1696 Rcheck_PE_Duplicated_Entry_Address, Rcheck_PE_Explicit_Raise,
1697 Rcheck_PE_Implicit_Return, Rcheck_PE_Misaligned_Address_Value,
1698 Rcheck_PE_Missing_Return, Rcheck_PE_Overlaid_Controlled_Object,
1699 Rcheck_PE_Potentially_Blocking_Operation
1700 Rcheck_PE_Stubbed_Subprogram_Called,
1701 Rcheck_PE_Unchecked_Union_Restriction,
1702 Rcheck_PE_Non_Transportable_Actual, Rcheck_SE_Empty_Storage_Pool,
1703 Rcheck_SE_Explicit_Raise, Rcheck_SE_Infinite_Recursion,
1704 Rcheck_SE_Object_Too_Large, Rcheck_PE_Finalize_Raised_Exception):
1705 Update the use of Rmsg_XX.
1706 (Rcheck_17, Rcheck_18, Rcheck_19,
1707 Rcheck_20, Rcheck_21, Rcheck_22, Rcheck_23, Rcheck_24, Rcheck_25,
1708 Rcheck_26, Rcheck_27, Rcheck_28, Rcheck_29, Rcheck_30, Rcheck_31,
1709 Rcheck_32, Rcheck_33, Rcheck_34, Rcheck_35): Update corresponding
1710 renamed subprograms.
1711 * checks.adb: Add with and use clause for Stringt.
1712 (Apply_Parameter_Aliasing_Checks): Make constant Loc visible in
1713 all subprograms of Apply_Parameter_Aliasing_Checks. Remove local
1714 variable Cond. Initialize Check at the start of the routine. Use
1715 routine Overlap_Check to construct a simple or a detailed run-time
1716 check. Update the creation of the simple check.
1717 (Overlap_Check): New routine.
1718 * exp_ch11.adb (Get_RT_Exception_Name): Add a value for
1719 PE_Aliased_Parameters.
1720 * types.ads: Add new enumeration literal
1721 PE_Aliased_Parameters. Update the corresponding integer values
1722 of all RT_Exception_Code literals.
1723 * types.h: Add new constant PE_Aliased_Parameters. Correct the
1724 values of all remaining constants.
1726 2013-07-05 Yannick Moy <moy@adacore.com>
1728 * gnat_rm.texi: Minor renaming of SPARK into SPARK 2005 in
1731 2013-07-05 Ed Schonberg <schonberg@adacore.com>
1733 * sem_prag.adb (Analyze_PPC_In_Decl_Part): For a class-wide
1734 condition, when replacing the name of a formal by a conversion
1735 to the class-wide type, exempt selector names that appear in
1736 parameter associations.
1738 2013-06-13 Eric Botcazou <ebotcazou@adacore.com>
1740 * gcc-interface/ada-tree.h (DECL_BY_DOUBLE_REF_P): Delete.
1741 * gcc-interface/gigi.h (annotate_object): Adjust prototype.
1742 (convert_vms_descriptor): Likewise.
1743 * gcc-interface/decl.c (gnat_to_gnu_param): Do not pass fat pointer
1744 types by double dereference.
1745 (annotate_object): Remove BY_DOUBLE_REF parameter and adjust.
1746 (gnat_to_gnu_entity): Adjust calls to annotate_object.
1747 * gcc-interface/trans.c (Identifier_to_gnu): Do not deal with double
1749 (Call_to_gnu): Likewise.
1750 (build_function_stub): Adjust call to convert_vms_descriptor.
1751 (Subprogram_Body_to_gnu): Adjust call to annotate_object.
1752 * gcc-interface/utils.c (convert_vms_descriptor): Remove BY_REF
1753 parameter and adjust.
1755 2013-05-30 Eric Botcazou <ebotcazou@adacore.com>
1757 * gcc-interface/Makefile.in (arm% androideabi): Robustify.
1759 2013-05-26 Eric Botcazou <ebotcazou@adacore.com>
1761 * gcc-interface/decl.c: (gnat_to_gnu_entity): In ASIS mode, do not
1762 check that access types have a set size.
1764 2013-05-26 Eric Botcazou <ebotcazou@adacore.com>
1766 * gcc-interface/decl.c (vinfo_t): New type and associated vector.
1767 (components_to_record): Change return type to bool.
1768 Lay out the variants in two passes. Do not force a specific layout for
1769 the variant part if the variants do not have a representation clause.
1770 Take the alignment of the variant part into account when laying out
1771 variants without rep clause in a record type with a partial rep clause.
1772 (create_rep_part): Do not set the position of the field.
1774 2013-05-26 Eric Botcazou <ebotcazou@adacore.com>
1776 * gcc-interface/trans.c (Attribute_to_gnu) <Attr_Last_Bit>: Add kludge
1777 to avoid generating an overflow for -1.
1779 2013-05-26 Eric Botcazou <ebotcazou@adacore.com>
1781 * gcc-interface/gigi.h (create_type_decl): Adjust prototype.
1782 (create_label_decl): Complete prototype.
1783 (process_attributes): Declare.
1784 * gcc-interface/decl.c (gnat_to_gnu_entity): Adjust multiple calls to
1785 create_type_decl throughout.
1786 <E_Enumeration_Type>: Do the layout of the type manually and call
1787 process_attributes on it. Reindent.
1788 <E_Enumeration_Subtype>: Minor tweak.
1789 <E_Floating_Point_Subtype>: Reindent.
1790 <E_Array_Subtype>: Call process_attributes on the array type built
1791 for a packed array type.
1792 <E_Record_Type>: Call process_attributes on the type.
1793 <E_Record_Subtype>: Likewise.
1794 <E_Access_Type>: Likewise.
1795 <E_Subprogram_Type>: Likewise.
1796 Likewise for all types at the end of the processing.
1797 * gcc-interface/utils.c (make_aligning_type): Adjust call to
1799 (maybe_pad_type): Likewise.
1800 (create_index_type): Likewise.
1801 (create_type_decl): Remove attr_list parameter and associated code.
1802 (create_var_decl_1): Call process_attributes on the variable.
1803 (process_attributes): Take a pointer to the object and add in_place
1804 and gnat_node parameters and adjust throughout.
1805 <ATTR_MACHINE_ATTRIBUTE>: Pass ATTR_FLAG_TYPE_IN_PLACE only on demand
1806 and set the input location.
1807 Zap the attribute list at the end.
1808 (create_subprog_decl): Call process_attributes on the subprogram.
1809 (build_unc_object_type): Adjust call to create_type_decl.
1810 (handle_vector_type_attribute): Remove dead code.
1812 2013-05-26 Eric Botcazou <ebotcazou@adacore.com>
1814 * gcc-interface/gigi.h (make_aligning_type): Adjust prototype.
1815 * gcc-interface/utils.c (make_aligning_type): Take GNAT_NODE parameter
1816 for the position of the associated TYPE_DECL.
1817 * gcc-interface/decl.c (gnat_to_gnu_entity): Adjust call to above.
1818 * gcc-interface/utils2.c (maybe_wrap_malloc): Likewise.
1820 2013-05-26 Eric Botcazou <ebotcazou@adacore.com>
1822 * gcc-interface/decl.c (gnat_to_gnu_entity): Do not prematurely
1823 elaborate the full view of a type with a freeze node.
1824 * gcc-interface/trans.c (process_type): Add explicit predicate.
1826 2013-05-26 Eric Botcazou <ebotcazou@adacore.com>
1828 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Always build the
1829 UNC variable for aliased objects with unconstrained nominal subtype.
1831 2013-05-24 Eric Botcazou <ebotcazou@adacore.com>
1833 * gcc-interface/gigi.h (gnat_init_gcc_fp): Declare.
1834 * gcc-interface/trans.c (gigi): Call it.
1835 * gcc-interface/misc.c (gnat_init_gcc_fp): New function.
1837 2013-05-24 Eric Botcazou <ebotcazou@adacore.com>
1839 * gcc-interface/gigi.h (enum inline_status_t): New type.
1840 (create_subprog_decl): Adjust prototype.
1841 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Procedure>: Adjust
1842 calls to create_subprog_decl.
1843 (get_minimal_subprog_decl): Likewise.
1844 * gcc-interface/trans.c (gigi): Likewise.
1845 (build_raise_check): Likewise.
1846 (establish_gnat_vms_condition_handler): Likewise.
1847 (Compilation_Unit_to_gnu): Likewise.
1848 (gnat_to_gnu): Likewise.
1849 * gcc-interface/utils.c (create_subprog_decl): Change inline_flag
1850 parameter to inline_status and implement for suppressed inlining.
1852 2013-05-24 Eric Botcazou <ebotcazou@adacore.com>
1854 * gcc-interface/ada-tree.h (LOOP_STMT_NO_UNROLL): New define.
1855 (LOOP_STMT_UNROLL): Likewise.
1856 (LOOP_STMT_NO_VECTOR): Likewise.
1857 (LOOP_STMT_VECTOR): Likewise.
1858 * gcc-interface/trans.c (struct loop_info_d): Replace label field
1860 (Pragma_to_gnu) <Pragma_Loop_Optimize>: New case.
1861 (Loop_Statement_to_gnu): Save the loop statement onto the stack
1862 instead of the label.
1863 (gnat_to_gnu) <N_Exit_Statement>: Retrieve the loop label.
1865 2013-05-24 Eric Botcazou <ebotcazou@adacore.com>
1867 * gcc-interface/trans.c: Include diagnostic.h and opts.h.
1868 (Pragma_to_gnu) <Pragma_Warnings>: New case.
1870 2013-05-24 Eric Botcazou <ebotcazou@adacore.com>
1872 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Record_Type>: Constify
1873 a handful of local variables.
1874 For a derived untagged type that renames discriminants, change the type
1875 of the stored discriminants to a subtype with the bounds of the type
1876 of the visible discriminants.
1877 (build_subst_list): Rename local variable.
1879 2013-05-16 Jason Merrill <jason@redhat.com>
1881 * gcc-interface/Make-lang.in (gnat1$(exeext)): Use link mutex.
1883 2013-05-13 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1886 * gcc-interface/Makefile.in: Allow for amd64 solaris2.
1888 2013-05-07 Eric Botcazou <ebotcazou@adacore.com>
1891 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Subtype>: Use
1892 int_const_binop to shift bounds by 1 when they are integer constants.
1894 2013-04-25 Arnaud Charlet <charlet@adacore.com>>
1896 * gcc-interface/Makefile.in (ADA_EXCLUDE_SRCS): Exclude s-init.ad{s,b}
1898 2013-04-25 Hristian Kirtchev <kirtchev@adacore.com>
1900 * checks.adb (Apply_Predicate_Check): Update the comment associated
1901 with the call to Check_Expression_Against_Static_Predicate.
1902 * sem_ch3.adb (Analyze_Object_Declaration): Update the comment
1903 associated with the call to Check_Expression_Against_Static_Predicate.
1904 * sem_util.adb (Check_Expression_Against_Static_Predicate):
1905 Broaden the check from a static expression to an expression with
1906 a known value at compile time.
1907 * sem_util.ads (Check_Expression_Against_Static_Predicate): Update
1910 2013-04-25 Thomas Quinot <quinot@adacore.com>
1912 * exp_attr.adb (Expand_N_Attribute_Reference, cases Position,
1913 First_Bit, and Last_Bit): Fix incorrect test in implementation of
1914 RM 2005 13.5.2(3/2).
1916 2013-04-25 Claire Dross <dross@adacore.com>
1918 * a-cfhase.adb, a-cfhase.ads, a-cforma.adb, a-cforma.ads, a-cfhama.adb,
1919 a-cfhama.ads, a-cforse.adb, a-cforse.ads, a-cofove.adb, a-cofove.ads
1920 (Query_Element): Removed.
1921 (Update_Element): Removed.
1922 (Insert): The version with no New_Item specified is removed.
1926 Every check of fields Busy and Lock has been removed.
1928 2013-04-25 Robert Dewar <dewar@adacore.com>
1930 * sem_prag.adb (Analyze_Pragma, case Contract_Cases): Remove
1931 call to S14_Pragma (Find_Related_Subprogram): Require proper
1932 placement in subprogram body (Find_Related_Subprogram): Detect
1933 duplicates for all cases (Find_Related_Subprogram): Handle case
1934 of spec nested inside body.
1936 2013-04-25 Arnaud Charlet <charlet@adacore.com>
1938 * par-prag.adb: Fix typo.
1940 2013-04-25 Hristian Kirtchev <kirtchev@adacore.com>
1942 * checks.adb (Apply_Predicate_Check): If the type has a static
1943 predicate and the expression is also static, check whether the
1944 expression satisfies the predicate.
1945 * sem_ch3.adb (Analyze_Object_Declaration): If the type has a
1946 static predicate and the expression is also static, see if the
1947 expression satisfies the predicate.
1948 * sem_util.adb: Alphabetize several routines.
1949 (Check_Expression_Against_Static_Predicate): New routine.
1950 * sem_util.ads (Check_Expression_Against_Static_Predicate): New routine.
1952 2013-04-25 Robert Dewar <dewar@adacore.com>
1954 * gnat_rm.texi: Document Reason argument for pragma Warnings.
1955 * par-prag.adb: Handle Reason parameter for pragma Warnings.
1956 * sem_prag.adb (Analyze_Pragma, case Warnings): Allow Reason argument.
1957 * snames.ads-tmpl (Name_Reason): New name entry.
1959 2013-04-25 Yannick Moy <moy@adacore.com>
1961 * exp_spark.adb (Expand_SPARK_N_In): Remove procedure.
1962 (Expand_SPARK): Remove special expansion for membership tests.
1964 2013-04-25 Hristian Kirtchev <kirtchev@adacore.com>
1966 * exp_ch3.adb (Expand_N_Object_Declaration): Update all places
1967 that should use constant Base_Typ. When building an invariant
1968 check, account for invariants coming from the base type. Prevent
1969 the creation of a junk invariant check when the related object
1970 is of an array type and it is initialized with an aggregate.
1971 * exp_util.adb (Make_Invariant_Call): Typ is now a variable. Use
1972 the base type to create an invariant call when the type of the
1973 expression is a composite subtype.
1975 2013-04-25 Vasiliy Fofanov <fofanov@adacore.com>
1977 * a-cborse.adb: Fix minor typo.
1979 2013-04-25 Ed Schonberg <schonberg@adacore.com>
1981 * sem_ch6.adb (Different_Generic_Profile): A spec and body
1982 match in an instance if a subtype declaration that renames a
1983 generic actual with the same name appears between spec and body.
1985 2013-04-25 Robert Dewar <dewar@adacore.com>
1987 * sem_util.adb: Minor reformatting.
1989 2013-04-25 Ed Schonberg <schonberg@adacore.com>
1991 * exp_aggr.adb (Expand_N_Aggregate): Use special circuitry to
1992 fold strings with a single others choice only if there are no
1993 expressions in the aggregate.
1995 2013-04-25 Arnaud Charlet <charlet@adacore.com>
1997 * gnat_ugn.texi: Update doc on Ada 2012 default mode.
1999 2013-04-25 Hristian Kirtchev <kirtchev@adacore.com>
2001 * exp_ch6.adb: Add with and use clause for Stringt.
2002 (Expand_Contract_Cases): Moved from sem_ch6. Add formal parameters
2003 Decls and Stmts along with comments on their usage.
2004 * exp_ch6.ads (Expand_Contract_Cases): Moved from sem_ch6.
2005 * sem_ch6.adb (Expand_Contract_Cases): Moved to exp_ch6.
2006 (Process_Contract_Cases): Update the call to Expand_Contract_Cases.
2008 2013-04-25 Ed Schonberg <schonberg@adacore.com>
2010 * gnat_rm.texi: Minor editing, to clarify use of dimension aspects.
2011 * sem_util.adb (Is_OK_Variable_For_Out_Formal): Reject an
2012 aggregate for a packed type, which may be converted into an
2013 unchecked conversion of an object.
2015 2013-04-25 Robert Dewar <dewar@adacore.com>
2017 * sem_prag.adb: Minor code reorganization (correct misspelling
2019 * sem_util.adb, aspects.ads, sem_ch6.adb: Minor reformatting.
2020 * gnat_rm.texi: Document impl-defined aspects.
2021 * sem_dim.adb, sem_dim.ads, gnat_ugn.texi, s-dimmks.ads: Minor
2024 2013-04-25 Hristian Kirtchev <kirtchev@adacore.com>
2026 * einfo.adb (Set_Abstract_States): The attribute now applies
2027 to generic packages.
2028 * sem_ch4.adb (Referenced): Moved to sem_util.
2029 * sem_ch7.adb (Unit_Requires_Body): A [generic] package with
2030 a non-null abstract state needs a body.
2031 * sem_prag.adb (Analyze_Depends_In_Decl_Part): Update the calls
2032 to Collect_Subprogram_Inputs_Outputs.
2033 (Analyze_Global_Item): Verify the proper usage of an item with mode
2034 In_Out or Output relative to the enclosing context.
2035 (Analyze_Pragma): Abstract_State can now be applied to a generic
2036 package. Do not reset the Analyzed flag for pragmas Depends and Global
2037 as this is not needed.
2038 (Appears_In): Moved to library level.
2039 (Check_Mode_Restiction_In_Enclosing_Context): New routine.
2040 (Collect_Subprogram_Inputs_Outputs): Moved to library level. Add
2041 formal parameters Subp_Id, Subp_Inputs, Subp_Outputs and Global
2042 seen along with comments on usage.
2043 * sem_util.ads, sem_util.adb (Referenced): New routine.
2045 2013-04-25 Hristian Kirtchev <kirtchev@adacore.com>
2047 * sem_ch6.adb (Expand_Contract_Cases): Generate
2048 detailed error messages only when switch -gnateE is in effect.
2050 2013-04-25 Yannick Moy <moy@adacore.com>
2052 * sem_attr.adb (Analyze_Attribute): Do not issue
2053 an error for a possibly misplaced 'Result or 'Old attribute when
2054 analyzing the aspect.
2056 2013-04-25 Robert Dewar <dewar@adacore.com>
2058 * sem_ch12.adb, sem_util.adb, sem_ch4.adb: Minor reformatting.
2060 2013-04-25 Hristian Kirtchev <kirtchev@adacore.com>
2062 * sem_ch4.adb (Analyze_Quantified_Expression):
2063 Add local variable Loop_Id. Verify that the loop variable
2064 is used within the condition of the quantified expression.
2065 (Referenced): New routine.
2067 2013-04-25 Hristian Kirtchev <kirtchev@adacore.com>
2069 * sem_case.adb (Analyze_Choices): Enhance the error message
2070 given on a bad use of subtype predicate.
2071 * sem_ch5.adb (Analyze_Loop_Parameter_Specification): Enhance
2072 the error message given on a bad use of subtype predicate.
2073 * sem_util.adb (Bad_Predicated_Subtype_Use): Add formal parameter
2074 Suggest_Static. Emit an extra error message advising how to
2075 remedy the bad use of the predicate if the context warrants it.
2076 * sem_util.ads (Bad_Predicated_Subtype_Use): Add formal parameter
2077 Suggest_Static along with a comment explaining its usage.
2079 2013-04-25 Ed Schonberg <schonberg@adacore.com>
2081 * sem_disp.adb (Check_Dispatching_Operation): Further refinement
2082 to checks for AI05-0125: the check for a hidden primitive that
2083 may be overridden by the new declaration only applies if the
2084 hidden operation is never declared. This is not the case if the
2085 operation is declared in a parent unit.
2087 2013-04-25 Robert Dewar <dewar@adacore.com>
2089 * debug.adb: Remove d.X and d.Y entries and documentation.
2090 * exp_ch4.adb (Expand_N_If_Expression): Remove special code used
2091 if expression with actions not available (now always available).
2092 (Expand_Short_Circuit_Operator): Same change.
2093 * gnat1drv.adb (Adjust_Global_Switches) Remove setting
2094 Use_Expression_With_Actions flag, since this is now obsolete.
2095 * opt.ads (Use_Expression_Actions): Removed (always True now).
2096 * sinfo.ads: Minor comment updates.
2098 2013-04-25 Ed Schonberg <schonberg@adacore.com>
2100 * sem_ch12.adb (Check_Generic_Actuals): If an actual is an array
2101 subtype whose base type is currently private, install full view
2102 when compiling instance body.
2104 2013-04-25 Ed Schonberg <schonberg@adacore.com>
2106 * sem_disp.adb (Check_Dispatching_Operation): Refine checks for
2107 AI05-0125: the check for a hidden primitive that may be overridden
2108 by the new declaration is only performed if the declaration comes
2109 from source, and it must carry an explicit overriding indicator.
2111 2013-04-25 Hristian Kirtchev <kirtchev@adacore.com>
2113 * einfo.adb (Abstract_States): The attribute now applies to
2115 * sem_ch3.adb (Analyze_Object_Declaration): Check whether an
2116 object declaration introduces an illegal hidden state.
2117 * sem_prag.adb (Analyze_Abstract_State): Check whether a state
2118 declaration introduces an illegal hidden state.
2119 * sem_util.ads, sem_util.adb (Check_No_Hidden_State): New routine.
2121 2013-04-25 Ed Schonberg <schonberg@adacore.com>
2123 * exp_ch6.adb (Is_Build_In_Place_Function_Call): The call may
2124 be to a protected function, in which case the name in the call
2125 is a selected component.
2127 2013-04-25 Hristian Kirtchev <kirtchev@adacore.com>
2129 * sem_ch4.adb (Analyze_Quantified_Expression):
2130 Warn on a suspicious use of quantifier "some" when "all" was meant.
2131 (No_Else_Or_Trivial_True): New routine.
2133 2013-04-25 Robert Dewar <dewar@adacore.com>
2135 * einfo.ads, einfo.adb: Put back with/use for Namet.
2136 (Get_Pragma): New name (wi new spec) for Find_Pragma.
2137 * sem_ch6.adb: Change name Find_Pragma to Get_Pragma with
2138 different interface.
2140 2013-04-25 Ed Schonberg <schonberg@adacore.com>
2142 * sem_ch3.adb (Is_Visible_Component): In an instance all
2143 components are visible.
2145 2013-04-25 Matthew Heaney <heaney@adacore.com>
2147 * a-rbtgbo.adb, a-crbtgo.adb (Generic_Equal): do not test for
2148 tampering when container empty.
2149 * a-crbtgk.adb (Ceiling, Find, Floor): ditto.
2150 (Generic_Conditional_Insert, Generic_Conditional_Insert_With_Hint):
2153 2013-04-25 Ed Schonberg <schonberg@adacore.com>
2155 * par-ch12.adb: Move aspects from package specification to
2156 generic package declaration.
2157 * sem_ch12.adb: Analyze aspect specifications before building
2158 and analyzing the generic copy, so that the generated pragmas
2159 are properly taken into account.
2160 * sem_ch13.adb: For compilation unit aspects that apply to a
2161 generic package declaration, insert corresponding pragmas ahead
2162 of visible declarations.
2163 * sprint.adb: Display properly the aspects of a generic type
2166 2013-04-25 Robert Dewar <dewar@adacore.com>
2168 * frontend.adb: Minor reformatting.
2170 2013-04-25 Ed Schonberg <schonberg@adacore.com>
2172 * einfo.ads: Extend documentation on use of Is_Private_Ancestor
2174 * sem_ch3.adb (Is_Visible_Component): Refine predicate for the
2175 case of untagged types derived from private types, to reject
2176 illegal selected components.
2178 2013-04-25 Gary Dismukes <dismukes@adacore.com>
2180 * sem_util.adb (Is_Dependent_Component_Of_Mutable_Object): Test
2181 for case of selecting from an unexpanded implicit dereference
2182 and do not make a recursive call on such a prefix.
2184 2013-04-25 Doug Rupp <rupp@adacore.com>
2186 * targparm.adb (VXF{_Str}): New tag for vaxfloat.
2187 (Get_Target_Parameters): Handle VXF tag.
2188 * targparm.ads (VAX_Float_On_Target): New boolean.
2189 * system-vms-ia64.ads (VAX_Float): New boolean.
2190 * frontend.adb (Frontend): Handle VAX float boolean.
2192 2013-04-25 Hristian Kirtchev <kirtchev@adacore.com>
2194 * einfo.ads, einfo.adb: Remove with and use clauses for Namet.
2195 (Find_Pragma): New routine.
2196 * sem_util.ads, sem_util.adb (Find_Pragma): Moved to einfo.
2198 2013-04-25 Hristian Kirtchev <kirtchev@adacore.com>
2200 * sem_ch13.adb (Add_Call): Do not capture the nature of the inherited
2202 (Add_Predicates): Save the static predicate for diagnostics and error
2204 (Process_PPCs): Remove local variables Dynamic_Predicate_Present and
2205 Static_Predicate_Present. Add local variable Static_Pred. Ensure that
2206 the expression of a static predicate is static.
2208 2013-04-25 Hristian Kirtchev <kirtchev@adacore.com>
2210 * einfo.adb (Is_Ghost_Subprogram): Remove useless code.
2212 2013-04-25 Robert Dewar <dewar@adacore.com>
2214 * gnat_rm.texi: Minor addition of index entry.
2216 2013-04-25 Hristian Kirtchev <kirtchev@adacore.com>
2218 * sem_ch6.adb (Check_Access_Invariants): Test whether an
2219 invariant procedure is empty before generating a call to it.
2220 (Has_Enabled_Predicate): New routine.
2221 (Has_Null_Body): New routine.
2222 (Process_PPCs): Test whether an invariant procedure is
2223 empty before generating a call to it. Test whether predicates are
2224 enabled for a particular type before generating a predicate call.
2225 * sem_util.ads, sem_util.adb (Find_Pragma): New routine.
2227 2013-04-25 Robert Dewar <dewar@adacore.com>
2229 * sem_ch7.adb, einfo.adb, repinfo.adb, snames.adb-tmpl,
2230 snames.ads-tmpl: Minor reformatting.
2232 2013-04-25 Thomas Quinot <quinot@adacore.com>
2234 * sem_ch7.adb: Minor reformatting.
2236 2013-04-25 Robert Dewar <dewar@adacore.com>
2238 * gnat_rm.texi: Minor fix to Loop_Variant doc (Loop_Entry allowed).
2239 * s-tarest.adb: Minor reformatting.
2241 2013-04-25 Hristian Kirtchev <kirtchev@adacore.com>
2243 * aspects.ads, aspects.adb: Remove aspect Ghost from all relevant
2245 * einfo.adb: Remove with and use clause for Aspects.
2246 (Is_Ghost_Function): Removed.
2247 (Is_Ghost_Entity): New routine.
2248 (Is_Ghost_Subprogram): New routine.
2249 * einfo.ads: Remove synthesized attribute Is_Ghost_Function
2250 along with its uses in entities. Add synthesized attributes
2251 Is_Ghost_Entity and Is_Ghost_Subprogram along with uses in related
2253 (Is_Ghost_Function): Removed.
2254 (Is_Ghost_Entity): New routine.
2255 (Is_Ghost_Subprogram): New routine.
2256 * par-prag.adb: Remove pragma Ghost from the processing machinery.
2257 * repinfo.adb (List_Mechanisms): Add a value for convention Ghost.
2258 * sem_attr.adb (Analyze_Access_Attribute): Update the check
2259 for ghost subprograms.
2260 * sem_ch4.adb (Analyze_Call): Update the check for calls
2261 to ghost subprograms.
2262 (Check_Ghost_Function_Call): Removed.
2263 (Check_Ghost_Subprogram_Call): New routine.
2264 * sem_ch6.adb (Check_Convention): Rewritten.
2265 (Check_Overriding_Indicator): Remove the check for overriding
2267 (Convention_Of): New routine.
2268 * sem_ch12.adb (Preanalyze_Actuals): Update the check for ghost
2269 generic actual subprograms.
2270 * sem_mech.adb (Set_Mechanisms): Add an entry for convention Ghost.
2271 * sem_prag.adb: Remove the value for pragma Ghost from
2273 (Analyze_Pragma): Remove the processing for pragma Ghost.
2274 (Process_Convention): Emit an error when a ghost
2275 subprogram attempts to override.
2276 (Set_Convention_From_Pragma): Emit an error when a ghost subprogram
2277 attempts to override.
2278 * sinfo.ads: Clarify the usage of field Label_Construct.
2279 * snames.adb-tmpl (Get_Convention_Id): Add an entry for
2280 predefined name Ghost.
2281 (Get_Convention_Name): Add an entry for convention Ghost.
2282 * snames.ads-tmpl: Move predefined name Ghost to the sublist
2283 denoting conventions. Add convention id Ghost. Remove pragma
2286 2013-04-25 Ed Schonberg <schonberg@adacore.com>
2288 * sem_ch7.adb (Swap_Private_Dependents): Do no recurse on child
2289 units if within a generic hierarchy.
2291 2013-04-24 Hristian Kirtchev <kirtchev@adacore.com>
2293 * exp_ch6.adb (Expand_Actuals): Add a predicate check on an
2294 actual the related type has a predicate function.
2295 * sem_ch3.adb (Constant_Redeclaration): Ensure that the related
2296 type has an invariant procedure before building a call to it.
2297 * sem_ch6.adb (Append_Enabled_Item): New routine.
2298 (Check_Access_Invariants): Use routine
2299 Append_Enabled_Item to chain onto the list of postconditions.
2300 (Contains_Enabled_Pragmas): Removed.
2301 (Expand_Contract_Cases): Use routine Append_Enabled_Item to chain onto
2302 the list of postconditions.
2303 (Invariants_Or_Predicates_Present): Removed.
2304 (Process_PPCs): Partially reimplemented.
2306 2013-04-24 Sergey Rybin <rybin@adacore.com frybin>
2308 * tree_io.ads: Update ASIS_Version_Number because of changes
2309 in the way how entities are chained in a scope by means of
2312 2013-04-24 Ed Schonberg <schonberg@adacore.com>
2314 * exp_ch13.adb (Expand_N_Attribute_Definition_Clause, case
2315 Storage_Size): If the clause is not from an aspect, insert
2316 assignment to size variable of task type at the point of the
2317 clause, not after the task definition, to prevent access before
2318 elaboration in the back-end.
2320 2013-04-24 Yannick Moy <moy@adacore.com>
2322 * sem_prag.adb (Sig_Flags): Set correct value for Pragma_Assume.
2324 2013-04-24 Yannick Moy <moy@adacore.com>
2326 * gnat_rm.texi: Document 'Loop_Entry.
2328 2013-04-24 Jose Ruiz <ruiz@adacore.com>
2330 * s-tassta.adb, s-tarest.adb (Task_Wrapper): Start looking for
2331 fall-back termination handlers from the parents, because they apply
2332 only to dependent tasks.
2333 * s-solita.adb (Task_Termination_Handler_T): Do not look for fall-back
2334 termination handlers because the environment task has no parent,
2335 and if it defines one of these handlers it does not apply to
2336 itself because they apply only to dependent tasks.
2338 2013-04-24 Robert Dewar <dewar@adacore.com>
2340 * sem_type.adb, exp_attr.adb, exp_ch4.adb: Minor reformatting.
2342 2013-04-24 Robert Dewar <dewar@adacore.com>
2344 * gnat_rm.texi: Document 'Update attribute.
2345 * sem_attr.adb (Analyze_Attribute, case Update): Remove call
2346 to S14_Attribute (S14_Attribute): removed.
2348 2013-04-24 Robert Dewar <dewar@adacore.com>
2350 * interfac.ads: Add size clauses for IEEE_Float_32/64
2352 2013-04-24 Claire Dross <dross@adacore.com>
2354 * gnat1drv.adb (Adjust_Global_Switches): Remove
2355 special assignment of Use_Expression_With_Actions for SPARK_Mode.
2357 2013-04-24 Hristian Kirtchev <kirtchev@adacore.com>
2359 * checks.adb (Apply_Predicate_Check): Check for the presence
2360 of the dynamic predicate aspect when trying to determine if the
2361 predicate of a type is non-static.
2362 * sem_ch5.adb (Analyze_Loop_Parameter_Specification): Check
2363 for the presence of the dynamic predicate aspect when trying to
2364 determine if the predicate of a type is non- static.
2365 * sem_ch13.adb (Add_Call): Capture the nature of the
2366 inherited ancestor predicate.
2367 (Build_Predicate_Functions): Update comments. Rewrite the checks on
2368 static predicate application. Complain about the form of a non-static
2369 expression only when the type is static.
2371 2013-04-24 Ed Schonberg <schonberg@adacore.com>
2373 * sem_prag.adb: Add guard to tree traversal.
2375 2013-04-24 Vincent Celier <celier@adacore.com>
2377 * clean.adb (Clean): Remove local variable Root_Environment,
2378 use Makeutl.Root_Environment instead.
2379 * gnatcmd.adb: Remove local variable Root_Environment, use
2380 Makeutl.Root_Environment instead.
2381 * make.adb (Gnatmake): Remove local variable Root_Environment,
2382 use Makeutl.Root_Environment instead.
2383 * prj-makr.adb: Remove local variable Root_Environment, use
2384 Makeutl.Root_Environment instead.
2386 2013-04-24 Hristian Kirtchev <kirtchev@adacore.com>
2388 * exp_attr.adb (Expand_Loop_Entry_Attribute): Clarify the
2389 extraction of the declarative part of the conditional block. Move
2390 the processing of simple infinite loops to the start of the
2391 expansion logic. Correct the check which determines whether the
2392 proper scope is installed in visibility.
2393 * sem_attr.adb (Analyze_Attribute): Add local variable Attr
2394 to keep track of the attribute in case the enclosing indexed
2395 component has to be rewritten. When searching for the enclosing
2396 loop, start from the proper attribute reference in case of a
2397 rewriting. Do not allow for 'Loop_Entry to appear in pragma
2398 Assert. Replace loop variable J with Index. Set the type of the
2400 * sem_ch5.adb (Check_Unreachable_Code): Detect a specialized
2401 block that services a loop statement subject to at least one
2402 'Loop_Entry attribute.
2404 2013-04-24 Ed Schonberg <schonberg@adacore.com>
2406 * sem_type.adb (Disambiguate): In Ada 2012 mode, when trying to
2407 resolve a fixed point operation, use first subtype to determine
2408 whether type and operator are declared in the same list of
2411 2013-04-24 Hristian Kirtchev <kirtchev@adacore.com>
2413 * par-ch6.adb (P_Subprogram): Detect an illegal
2414 placement of the aspect specification list in the context of
2415 expression functions.
2417 2013-04-24 Ed Schonberg <schonberg@adacore.com>
2419 * exp_ch4.adb (Expand_N_Allocator): If the designated object
2420 has tasks, and the pointer type is an itype that has no master
2421 id, create a master renaming in the current context, which can
2422 only be an init_proc.
2424 2013-04-24 Robert Dewar <dewar@adacore.com>
2426 * sem_ch3.adb, sem_ch7.adb: Minor reformatting.
2427 * gnat_rm.texi: Document pragma Loop_Invariant.
2428 * sem_attr.adb (Analyze_Attribute, case Loop_Entry): This is
2429 no longer an S14_Attribute.
2430 * sem_prag.adb (Analyze_Pragma, case Loop_Invariant): Combine
2431 processing with Assert, allow message parameter, remove call
2434 2013-04-24 Thomas Quinot <quinot@adacore.com>
2436 * exp_ch4.adb: Minor reformatting.
2438 2013-04-24 Ed Schonberg <schonberg@adacore.com>
2440 * sem_ch7.adb (Swap_Private_Dependents): New internal routine
2441 to Install_Private_Declarations, to make the installation of
2442 private dependents recursive in the presence of child units.
2443 * sem_ch3.adb (Build_Discriminated_Subtype): Initialize properly
2444 the Private_Dependents of a private subtype.
2446 2013-04-24 Hristian Kirtchev <kirtchev@adacore.com>
2448 * exp_attr.adb (Expand_Loop_Entry_Attribute): Update the
2449 retrieval of the block declarations.
2450 * par-ch4.adb (P_Name): Let the name parsing machinery create
2451 a sequence of nested indexed components for attribute Loop_Entry.
2452 * sem_attr.adb (Analyze_Attribute): Add local constant
2453 Context. Reimplement part of the analysis of attribute Loop_Entry.
2454 (Convert_To_Indexed_Component): Removed.
2455 * sem_ch4.adb (Analyze_Indexed_Component_Form): Do not analyze
2456 an indexed component after it has been rewritten into attribute
2459 2013-04-24 Yannick Moy <moy@adacore.com>
2461 * snames.ads-tmpl: Minor change to list
2462 Loop_(In)variant not in configuration pragma.
2463 * sem_ch3.adb (Analyze_Declarations): Do not look at the original node
2464 for analyzing the expressions in pre/postconditions.
2466 2013-04-24 Robert Dewar <dewar@adacore.com>
2468 * gnatcmd.adb, xref_lib.adb, gnatls.adb, sem_ch13.adb: Minor
2471 2013-04-24 Yannick Moy <moy@adacore.com>
2473 * sem_ch6.adb (Analyze_Generic_Subprogram_Body,
2474 Analyze_Subprogram_Body_Helper): Reset contract node to Empty
2475 before setting entity to E_Subprogram_Body.
2476 * sem_ch8.adb (Analyze_Subprogram_Renaming): Reset contract node to
2477 Empty before setting entity to E_Subprogram_Body.
2479 2013-04-24 Vincent Celier <celier@adacore.com>
2481 * gnat_ugn.texi: Document new gnatls switch -aPdir.
2482 * gnatcmd.adb: Pass switch -aP<dir> to gnatls.
2483 * gnatls.adb (Scan_Ls_Arg): Process new switch -aP<dir>. Issue
2484 a warning for unknown switches.
2485 (Usage): Add line for new switch -aPdir.
2487 2013-04-24 Ed Schonberg <schonberg@adacore.com>
2489 * sem_util.adb, sem_util.ads (Is_Limited_Class_Wide_Type): Return true
2490 if the type comes from a limited view, so that task attributes can be
2493 2013-04-24 Yannick Moy <moy@adacore.com>
2495 * checks.adb (Apply_Float_Conversion_Check): Do not apply checks if
2496 full expansion is not enabled.
2498 2013-04-24 Ed Schonberg <schonberg@adacore.com>
2500 * sem_ch6.adb (Create_Extra_Formals): In Ada 2012, create extra
2501 formals if the type does not yet have a completion, and thus
2502 has no underlying view.
2504 2013-04-24 Ed Schonberg <schonberg@adacore.com>
2506 * sem_ch13.adb (Analyze_Aspect_Specifications): Treat an aspect
2507 specification for Address as a reference, to suppress warnings
2508 on entities that may be read by an external device.
2510 2013-04-24 Sergey Rybin <rybin@adacore.com frybin>
2512 * gnat_ugn.texi: Add description of '--help' and '--version'
2513 options for ASIS tools: gnatelim, gnatmetric, gnatstub, gnatpp.
2515 2013-04-24 Arnaud Charlet <charlet@adacore.com>
2517 * gnat_rm.texi: Minor syntax fix.
2519 2013-04-24 Hristian Kirtchev <kirtchev@adacore.com>
2521 * exp_attr.adb (Expand_Loop_Entry_Attribute): Add extra comments on
2522 what and why is being analyzed. Remove the decoration of renamings as
2523 this simply falls out of the general analysis mechanism.
2525 2013-04-24 Hristian Kirtchev <kirtchev@adacore.com>
2527 * sem_res.adb (Explain_Redundancy): New routine.
2528 (Resolve_Equality_Op): Place the error concerning a redundant
2529 comparison to True at the "=". Try to explain the nature of the
2532 2013-04-24 Javier Miranda <miranda@adacore.com>
2535 * checks.adb, exp_ch6.adb (Install_Null_Excluding_Check): No
2536 check in interface thunks since it is performed at the caller
2538 (Expand_Simple_Function_Return): No accessibility check
2539 needed in thunks since the check is done by the target routine.
2541 2013-04-24 Vincent Celier <celier@adacore.com>
2543 * xref_lib.adb (Add_Entity): Use the canonical file names
2544 so that source file names with capital letters are found on
2545 platforms where file names are case insensitive.
2547 2013-04-24 Hristian Kirtchev <kirtchev@adacore.com>
2549 * par-ch4.adb (P_Name): Continue to parse the name extension when the
2550 construct is attribute Loop_Entry. Do not convert the attribute
2551 reference into an indexed component when there is at least one
2552 expression / range following 'Loop_Entry.
2554 2013-04-24 Hristian Kirtchev <kirtchev@adacore.com>
2556 * sem_ch6.adb (Contains_Enabled_Pragmas): New routine.
2557 (Process_PPCs): Generate procedure _Postconditions
2558 only when the context has invariants or predicates or enabled
2561 2013-04-24 Thomas Quinot <quinot@adacore.com>
2563 * g-socket.adb (Host_Entry): Introduce intermediate copy of
2564 memory location pointed to by Hostent_H_Addr, as it might not
2565 have sufficient alignment.
2567 2013-04-24 Yannick Moy <moy@adacore.com>
2569 * repinfo.adb (List_Rep_Info): Set the value of Unit_Casing before
2570 calling subprograms which may read it.
2572 2013-04-24 Hristian Kirtchev <kirtchev@adacore.com>
2574 * einfo.adb: Remove Loop_Entry_Attributes from the usage of
2575 nodes. Flag 260 is now used.
2576 (Has_Loop_Entry_Attributes): New routine.
2577 (Loop_Entry_Attributes): Removed.
2578 (Set_Has_Loop_Entry_Attributes): New routine.
2579 (Set_Loop_Entry_Attributes): Removed.
2580 (Write_Entity_Flags): Write out Flag 260.
2581 (Write_Field10_Name): Remove the output for Loop_Entry_Attributes.
2582 * einfo.ads: Remove attribute Loop_Entry_Attributes,
2583 its related comment and uses in nodes. Add new attribute
2584 Has_Loop_Entry_Attributes, related comment and uses in loop nodes.
2585 (Has_Loop_Entry_Attributes): New routine and pragma Inline.
2586 (Loop_Entry_Attributes): Removed along with pragma Inline.
2587 (Set_Has_Loop_Entry_Attributes): New routine and pragma Inline.
2588 (Set_Loop_Entry_Attributes): Removed along with pragma Inline.
2589 * exp_attr.adb (Expand_Loop_Entry_Attribute): New routine.
2590 (Expand_N_Attribute_Reference): Expand attribute 'Loop_Entry.
2591 * exp_ch5.adb: Remove with and use clause for Elists.
2592 (Expand_Loop_Entry_Attributes): Removed.
2593 (Expand_N_Loop_Statement): Add local variable Stmt. Rename local
2594 constant Isc to Scheme. When a loop is subject to attribute
2595 'Loop_Entry, retrieve the nested loop from the conditional
2596 block. Move the processing of controlled object at the end of
2598 * sem_attr.adb (Analyze_Attribute): Do not chain attribute
2599 'Loop_Entry to its related loop.
2600 * sem_ch5.adb (Analyze_Loop_Statement): Add local variable
2601 Stmt. When the iteration scheme mentions attribute 'Loop_Entry,
2602 the entire loop is rewritten into a block. Retrieve the nested
2603 loop in such cases to complete the analysis.
2604 * sem_util.ads, sem_util.adb (Find_Loop_In_Conditional_Block): New
2606 (Subject_To_Loop_Entry_Attributes): New routine.
2608 2013-04-24 Robert Dewar <dewar@adacore.com>
2610 * exp_prag.adb (Expand_Loop_Variant): Generate pragma Check
2611 (Loop_Variant, xxx) rather than Assert (xxx).
2612 * gnat_rm.texi: Document pragma Loop_Variant.
2613 * sem_prag.adb (Analyze_Pragma, case Loop_Variant): Remove call
2616 2013-04-24 Yannick Moy <moy@adacore.com>
2618 * adabkend.adb, ali-util.adb, ali.adb, debug.adb,
2619 errout.adb, errout.ads, erroutc.adb, exp_ch3.adb, exp_ch4.adb,
2620 exp_ch6.adb, exp_ch7.adb, exp_dbug.adb, exp_util.adb,
2621 expander.adb, freeze.adb, gnat1drv.adb, lib-writ.adb,
2622 lib-writ.ads, lib-xref.adb, lib-xref.ads, opt.adb, opt.ads,
2623 restrict.adb, sem_aggr.adb, sem_attr.adb, sem_ch3.adb,
2624 sem_ch4.adb, sem_ch5.adb, sem_ch6.adb, sem_eval.adb, sem_prag.adb,
2625 sem_res.adb, sem_util.adb: Everything with name
2626 'Alfa' renamed in 'SPARK'. Update comments.
2627 Renaming of units with name 'Alfa', renamed with 'SPARK' instead.
2628 * exp_alfa.adb: renamed exp_spark.adb.
2629 * exp_alfa.ads: renamed exp_spark.ads.
2630 * get_alfa.adb: renamed get_spark_xrefs.adb.
2631 * get_alfa.ads: renamed get_spark_xrefs.ads.
2632 * lib-xref-alfa.adb: renamed lib-xref-spark_specific.adb.
2633 * put_alfa.adb: renamed put_spark_xrefs.adb.
2634 * put_alfa.ads: renamed put_spark_xrefs.ads.
2635 * alfa.adb: renamed spark_xrefs.adb.
2636 * alfa.ads: renamed spark_xrefs.ads.
2637 * alfa_test.adb: renamed spark_xrefs_test.adb.
2638 * gcc-interface/Make-lang.in: Update dependencies.
2640 2013-04-24 Robert Dewar <dewar@adacore.com>
2642 * gnat_rm.texi: Document pragma Assume.
2643 * sem_prag.adb (Analyze_Pragma, case Assume): Now processed as
2644 part of Assert, and no longer requires -gnatd.F
2646 2013-04-24 Robert Dewar <dewar@adacore.com>
2648 * gnat_rm.texi: Document pragma Assert_And_Cut.
2649 * sem_prag.adb (Analyze_Pragma, case Assert_And_Cut): Remove
2652 2013-04-24 Ed Schonberg <schonberg@adacore.com>
2654 * sem_aux.adb: Add guard in Available_View.
2656 2013-04-24 Hristian Kirtchev <kirtchev@adacore.com>
2658 * sem_prag.adb (Analyze_Depends_In_Decl_Part): Use
2659 Find_Related_Subprogram to find the associated subprogram.
2660 (Analyze_Global_In_Decl_List): Use Find_Related_Subprogram
2661 to find the associated subprogram.
2662 (Analyze_Pragma): Use Find_Related_Subprogram to find the associated
2665 2013-04-24 Hristian Kirtchev <kirtchev@adacore.com>
2667 * exp_ch6.adb: Remove with and use clause for Sem_Prag.
2668 (Freeze_Subprogram): Call Analyze_Subprogram_Contract to analyze
2669 the contract of a subprogram.
2670 * sem_ch3.adb: Remove with and use clause for Sem_Prag.
2671 (Analyze_Declarations): Call Analyze_Subprogram_Contract to
2672 analyze the contract of a subprogram.
2673 * sem_ch6.adb (Analyze_Subprogram_Contract): New routine.
2674 (Check_Subprogram_Contract): Removed.
2675 * sem_ch6.ads (Analyze_Subprogram_Contract): New routine.
2676 (Check_Subprogram_Contract): Removed.
2677 (Expand_Contract_Cases): Add a guard against malformed contract cases.
2678 * sem_ch13.adb (Analyze_Aspect_Specifications): Call
2679 Decorate_Delayed_Aspect_And_Pragma to decorate aspects
2680 Contract_Cases, Depends and Global. Reimplement the analysis of
2681 aspect Contract_Cases.
2682 (Decorate_Delayed_Aspect_And_Pragma): New routine.
2683 * sem_prag.adb (Analyze_Contract_Cases_In_Decl_Part): New routine.
2684 (Analyze_CTC_In_Decl_Part): Removed.
2685 (Analyze_Pragma): Reimplement the analysis of pragma Contract_Cases.
2686 (Analyze_Test_Case_In_Decl_Part): New routine.
2687 (Find_Related_Subprogram): New routine.
2688 (Requires_Profile_Installation): Add new formal Prag. Update
2689 the logic to take into account the origin of the pragma.
2690 * sem_prag.ads (Analyze_Contract_Cases_In_Decl_Part): New routine.
2691 (Analyze_CTC_In_Decl_Part): Removed.
2692 (Analyze_Test_Case_In_Decl_Part): New routine.
2694 2013-04-24 Robert Dewar <dewar@adacore.com>
2696 * sem_prag.adb (Process_Convention): Move Stdcall tests to
2697 Set_Convention_From_Pragma so that they are applied to each
2698 entry of a homonym set.
2699 (Process_Convention): Don't try to set convention if already set.
2701 2013-04-24 Robert Dewar <dewar@adacore.com>
2703 * gnatbind.adb: Minor reformatting.
2705 2013-04-24 Vincent Celier <celier@adacore.com>
2707 * clean.adb (Gnatclean): Add the default project search
2708 directories in the project search path after scanning the
2709 switches on the command line.
2710 (Initialize): Do not put the default project search directories in the
2711 project search path.
2712 * gnatcmd.adb (GNATcmd): Add the default project search
2713 directories in the project search path after scanning the switches
2714 on the command line.
2715 * make.adb (Initialize): Add the default project search
2716 directories in the project search path after scanning the switches
2717 on the command line.
2719 2013-04-24 Yannick Moy <moy@adacore.com>
2721 * restrict.ads (Restriction_Warnings): Initialize with all False value.
2723 2013-04-24 Robert Dewar <dewar@adacore.com>
2725 * checks.ads, checks.adb (Predicate_Checks_Suppressed): New function.
2726 * exp_util.ads, exp_util.adb (Make_Predicate_Check): Check setting of
2728 * snames.ads-tmpl (Name_Predicate_Check): New check name.
2729 * types.ads (Predicate_Check): New definition.
2730 * gnat_rm.texi: Add documentation for Predicate_Check.
2732 2013-04-24 Ed Schonberg <schonberg@adacore.com>
2734 * exp_ch8.adb (Expand_N_Subprogram_Renaming_Declaration): If this
2735 is a renaming of predefined equality for an untagged record,
2736 add generated body to the freeze actions for the subprogram, to
2737 prevent freezing issues when the record has incomplete components.
2738 * exp_ch4.adb (Expand_Composite_Equality): If the type is a type
2739 without completion, return a predefined comparison instead of
2740 just False. This may happen when building the expression for
2741 record equality, when some component has a type whose completion
2742 has not been seen yet. The operation will be analyzed an expanded
2743 after the type has been frozen, at which point all component
2744 types will have been completed, or an error reported.
2746 2013-04-24 Ed Schonberg <schonberg@adacore.com>
2748 * sem_ch13.adb (Analyze_Aspect_Specifications): Do not delay
2749 analysis of a Convention aspect.
2751 2013-04-24 Eric Botcazou <ebotcazou@adacore.com>
2753 * fe.h (Machine_Overflows_On_Target): New macro and declaration.
2754 (Signed_Zeros_On_Target): Likewise.
2756 2013-04-24 Hristian Kirtchev <kirtchev@adacore.com>
2758 * exp_ch6.adb: Add with and use clause for Sem_Prag.
2759 (Freeze_Subprogram): Analyze all delayed aspects for a null
2760 procedure so that they are available when analyzing the
2761 internally-generated _Postconditions routine.
2762 * exp_ch13.adb: Remove with and use clause for Sem_Prag.
2763 (Expand_N_Freeze_Entity): Move the code that analyzes delayed
2764 aspects of null procedures to exp_ch6.Freeze_Subprogram.
2765 * sem_prag.adb (Analyze_Abstract_State): Update the check on
2766 volatile requirements.
2768 2013-04-24 Bob Duff <duff@adacore.com>
2770 * ali-util.ads (Source_Record): New component Stamp_File
2771 to record from whence the Stamp came.
2772 * ali-util.adb (Set_Source_Table): Set Stamp_File component.
2773 * bcheck.adb (Check_Consistency): Print additional information in
2775 * gnatbind.adb (Gnatbind): Print additional information in
2778 2013-04-24 Robert Dewar <dewar@adacore.com>
2780 * exp_ch13.adb, sem_prag.adb: Update comments.
2781 * sem_ch3.adb, exp_ch9.adb, g-socket.adb, sem_ch13.adb: Minor
2784 2013-04-24 Doug Rupp <rupp@adacore.com>
2786 * vms_data.ads (/{NO}INHIBIT-EXEC): Document new default behavior.
2788 2013-04-24 Yannick Moy <moy@adacore.com>
2790 * sinfo.ads: Minor correction of typo.
2792 2013-04-24 Ed Schonberg <schonberg@adacore.com>
2794 * sem_ch3.adb: Create packed array only when expander is
2797 2013-04-24 Hristian Kirtchev <kirtchev@adacore.com>
2799 * sem_prag.adb (Analyze_Depends_In_Decl_Part): Install the formals only
2800 when the context warrants it.
2801 (Analyze_Global_In_Decl_List): Install the formals only when
2802 the context warrants it.
2803 (Requires_Profile_Installation): New routine.
2805 2013-04-24 Ed Schonberg <schonberg@adacore.com>
2807 * exp_ch6.adb (Expand_N_Simple_Return_Statement): When the return
2808 type is a discriminated private type that does not require use
2809 of the secondary stack, a constrained subtype of the underlying
2810 type is created to convey the proper object size to the backend.
2811 If the return type is originally a private type, the return
2812 expression is wrapped in an unchecked_conversion. If the return
2813 expression is used subsequently in a call to the postcondition
2814 function, this conversion must be undone to prevent a spurious
2815 error on the analysis of that call.
2817 2013-04-23 Kai Tietz <ktietz@redhat.com>
2820 * raise-gcc.c (__SEH__): Additional check that SjLj isn't active.
2822 2013-04-23 Eric Botcazou <ebotcazou@adacore.com>
2823 Pascal Obry <obry@adacore.com>
2825 * gcc-interface/Makefile.in (targ): Fix target name check.
2826 (../../gnatmake$(exeext)): Add '+' for LTO.
2827 (../../gnatlink$(exeext)): Likewise.
2829 2013-04-23 Hristian Kirtchev <kirtchev@adacore.com>
2831 * exp_ch9.adb (Build_PPC_Wrapper): Correct the traversal of
2832 pre- and post-conditions.
2833 (Expand_N_Task_Type_Declaration):
2834 Use the correct attribute to check for pre- and post-conditions.
2835 * exp_ch13.adb (Expand_N_Freeze_Entity): Correct the traversal of
2836 pre- and post-conditions. Analyze delayed classification items.
2837 * freeze.adb (Freeze_Entity): Use the correct attribute to
2838 check for pre- and post- conditions.
2839 * sem_ch3.adb (Analyze_Declarations): Correct the traversal
2840 of pre- and post-conditions as well as contract- and
2841 test-cases. Analyze delayed pragmas Depends and Global.
2842 * sem_ch6.adb (Check_Subprogram_Contract): Use the correct
2843 attribute to check for pre- and post-conditions, as well as
2844 contract-cases and test-cases. (List_Inherited_Pre_Post_Aspects):
2845 Correct the traversal of pre- and post- conditions.
2846 (Process_Contract_Cases): Update the comment on usage. Correct
2847 the traversal of contract-cases.
2848 (Process_Post_Conditions): Update the comment on usage. Correct the
2849 traversal of pre- and post-conditions.
2850 (Process_PPCs): Correct the traversal of pre- and post-conditions.
2851 (Spec_Postconditions): Use the correct
2852 attribute to check for pre- and post- conditions, as well as
2853 contract-cases and test-cases.
2854 * sem_ch13.adb (Analyze_Aspect_Specifications): Reimplement the
2855 actions related to aspects Depends and Global. Code refactoring
2856 for pre- and post-conditions.
2857 (Insert_Delayed_Pragma): New routine.
2858 * sem_prag.adb (Add_Item): New routine.
2859 (Analyze_Depends_In_Decl_Part): New routine.
2860 (Analyze_Global_In_Decl_Part): New routine.
2861 (Analyze_Pragma): Reimplement the actions related to aspects Depends and
2862 Global. Verify that a body acts as a spec for pragma Contract_Cases.
2863 (Chain_PPC): Use Add_Contract_Item to chain a pragma.
2864 (Chain_CTC): Correct the traversal of contract-
2865 and test-cases. Use Add_Contract_Item to chain a pragma.
2866 (Chain_Contract_Cases): Correct the traversal of contract-
2867 and test-cases. Use Add_Contract_Item to chain a pragma.
2868 (Check_Precondition_Postcondition): Update the comment on usage.
2869 (Check_Test_Case): Update the comment on usage.
2870 * sem_prag.ads (Analyze_Depends_In_Decl_Part): New routine.
2871 (Analyze_Global_In_Decl_Part): New routine.
2872 * sem_util.ads, sem_util.adb (Add_Contract_Item): New routine.
2873 * sinfo.adb (Classifications): New routine.
2874 (Contract_Test_Cases): New routine.
2875 (Pre_Post_Conditions): New routine.
2876 (Set_Classifications): New routine.
2877 (Set_Contract_Test_Cases): New routine.
2878 (Set_Pre_Post_Conditions): New routine.
2879 (Set_Spec_CTC_List): Removed.
2880 (Set_Spec_PPC_List): Removed.
2881 (Spec_CTC_List): Removed.
2882 (Spec_PPC_List): Removed.
2883 * sinfo.ads: Update the structure of N_Contruct along with all
2885 (Classifications): New routine and pragma Inline.
2886 (Contract_Test_Cases): New routine and pragma Inline.
2887 (Pre_Post_Conditions): New routine and pragma Inline.
2888 (Set_Classifications): New routine and pragma Inline.
2889 (Set_Contract_Test_Cases): New routine and pragma Inline.
2890 (Set_Pre_Post_Conditions): New routine and pragma Inline.
2891 (Set_Spec_CTC_List): Removed.
2892 (Set_Spec_PPC_List): Removed.
2893 (Spec_CTC_List): Removed.
2894 (Spec_PPC_List): Removed.
2896 2013-04-23 Doug Rupp <rupp@adacore.com>
2898 * init.c (GNAT$STOP) [VMS]: Bump sigargs[0] count by 2
2899 to account for LIB$STOP not having the chance to add the PC and
2902 2013-04-23 Robert Dewar <dewar@adacore.com>
2904 * sem_ch13.adb: Minor code reorganization (remove some redundant
2906 * sem_ch3.adb, sem_prag.adb: Minor reformatting.
2908 2013-04-23 Yannick Moy <moy@adacore.com>
2910 * einfo.ads: Minor typo fix.
2911 * sem_ch13.adb (Build_Predicate_Functions): Reject cases where
2912 Static_Predicate is applied to a non-scalar or non-static type.
2913 * sem_prag.adb: Minor typo fix.
2915 2013-04-23 Doug Rupp <rupp@adacore.com>
2917 * init.c (GNAT$STOP) [VMS]: New function.
2919 2013-04-23 Ed Schonberg <schonberg@adacore.com>
2921 * sem_ch3.adb: Add exp_pakd to context.
2922 (Constrain_Component_Type): If the component of the parent is
2923 packed, and the record subtype being built is already frozen,
2924 as is the case for an itype, the component type itself will not
2925 be frozen, and the packed array type for it must be constructed
2928 2013-04-23 Thomas Quinot <quinot@adacore.com>
2930 * g-socket.adb, g-socket.ads (Set_Close_On_Exec): New subprogram.
2932 2013-04-23 Yannick Moy <moy@adacore.com>
2934 * err_vars.ads (Error_Msg_Qual_Level): Set variable to zero
2936 * opt.ads (Multiple_Unit_Index): Set variable to zero at declaration.
2937 * sem_util.adb (NCT_Table_Entries): Set variable to zero at declaration.
2938 * set_targ.ads (Num_FPT_Modes): Set variable to zero at declaration.
2939 * stylesw.adb (Save_Style_Check_Options): Protect testing the
2940 value of Style_Check_Comments_Spacing by a previous test that
2941 Style_Check_Comments is True.
2943 2013-04-23 Thomas Quinot <quinot@adacore.com>
2945 * sem_prag.adb, sem_prag.ads (Effective_Name): Rename to
2946 Original_Name, and move declaration to package body as this
2947 subprogram is not used from outside. Also clarify documentation.
2949 2013-04-23 Ed Schonberg <schonberg@adacore.com>
2951 * exp_ch6.adb (Expand_N_Subprogram_Body): When compiling with
2952 initialize_scalars, disable predicate checks on the generated
2953 assignment to an out scalar parameter.
2955 2013-04-23 Gary Dismukes <dismukes@adacore.com>
2957 * sem_ch4.adb (Analyze_Allocator): Remove error
2958 check for "constrained in partial view" constraints entirely.
2960 2013-04-23 Robert Dewar <dewar@adacore.com>
2962 * einfo.ads, sem_prag.ads: Minor reformatting.
2963 * errout.ads: Comment update.
2965 2013-04-23 Yannick Moy <moy@adacore.com>
2967 * exp_ch5.adb: Minor typo.
2969 2013-04-23 Thomas Quinot <quinot@adacore.com>
2971 * gnat_ugn.texi: Fix typo.
2973 2013-04-23 Ed Schonberg <schonberg@adacore.com>
2975 * einfo.ads: Minor documentation clarification.
2977 2013-04-23 Bob Duff <duff@adacore.com>
2979 * types.ads: Fix incorrect comment.
2981 2013-04-23 Ed Schonberg <schonberg@adacore.com>
2983 * sem_aux.adb sem_aux.ads (Effectively_has_Constrained_Partial_View):
2984 Rename subprogram as Object_Type_Has_Constrained_Partial_View, better
2985 description of purpose.
2986 * checks.adb (Apply_Discriminant_Check): Use above renaming.
2987 * sem_ch4.adb (Analyze_Allocator): Check Has_Constrained_Partial_View
2988 of the base type, rather than using the Object_Type predicate.
2989 * sem_attr.adb (Analyze_Attribute, case 'Access): Use above renaming.
2990 * sem_util.adb (Is_Dependent_Component_Of_Mutable_Object): ditto.
2991 * exp_attr.adb (Expand_N_Attribute_Reference, case 'Constrained): Ditto.
2992 * exp_ch4.adb (Expand_N_Allocator): Ditto.
2994 2013-04-23 Robert Dewar <dewar@adacore.com>
2996 * exp_prag.adb (Expand_Pragma_Check): Check for Assert rather
2998 * sem_prag.adb (Is_Valid_Assertion_Kind): Moved to spec
2999 (Effective_Name): New function (Analyze_Pragma, case Check):
3000 Disallow [Statement_]Assertions (Check_Kind): Implement
3001 Statement_Assertions (Check_Applicable_Policy): Use Effective_Name
3002 (Is_Valid_Assertion_Kind): Allow Statement_Assertions.
3003 * sem_prag.ads (Is_Valid_Assertion_Kind): Moved here from body
3004 (Effective_Name): New function.
3005 * sem_res.adb: Minor reformatting.
3006 * snames.ads-tmpl (Name_Statement_Assertions): New entry.
3007 * gnat_rm.texi: Add documentation of new assertion kind
3008 Statement_Assertions.
3010 2013-04-23 Robert Dewar <dewar@adacore.com>
3012 * sinfo.ads, einfo.adb, sem_res.adb, exp_ch6.adb, aspects.adb: Minor
3013 reformatting and code clean up.
3015 2013-04-23 Vincent Celier <celier@adacore.com>
3017 * prj-part.ads, prj-conf.ads: Minor comment updates.
3019 2013-04-23 Ed Schonberg <schonberg@adacore.com>
3021 * einfo.adb (Predicate_Function): For a private type, retrieve
3022 predicate function from full view.
3023 * aspects.adb (Find_Aspect): Ditto.
3024 * exp_ch6.adb (Expand_Actuals): If the formal is class-wide and
3025 the actual is a definite type, apply predicate check after call.
3026 * sem_res.adb: Do not apply a predicate check before the call to
3027 a generated Init_Proc.
3029 2013-04-23 Robert Dewar <dewar@adacore.com>
3031 * sem_ch13.adb (Analyze_Aspect_Specifications): Significant
3032 rewrite to make sure Is_Ignore is properly captured when aspect
3034 * sem_ch6.adb: Minor reformatting.
3035 * sem_prag.adb (Analyze_Pragma): Do not test policy at time of
3036 pragma for the case of a pragma coming from an aspect (already
3037 tested when we analyzed the aspect).
3039 2013-04-23 Vincent Celier <celier@adacore.com>
3041 * prj-conf.adb (Parse_Project_And_Apply_Config): New
3042 Boolean parameter Implicit_Project, defaulted to False. Call
3043 Prj.Part.Parse with Implicit_Project.
3044 * prj-conf.ads (Parse_Project_And_Apply_Config): New Boolean
3045 parameter Implicit_Project, defaulted to False.
3046 * prj-part.adb (Parse_Single_Project): New Boolean parameter
3047 Implicit_Project, defaulted to False. When Implicit_Project is
3048 True, change the Directory of the project node to the Current_Dir.
3049 * prj-part.ads (Parse): New Boolean parameter, defaulted to False
3051 2013-04-23 Robert Dewar <dewar@adacore.com>
3053 * exp_util.adb: Minor reformatting.
3055 2013-04-23 Robert Dewar <dewar@adacore.com>
3057 * xoscons.adb: Minor reformatting.
3059 2013-04-23 Hristian Kirtchev <kirtchev@adacore.com>
3061 * sem_prag.adb (Check_Mode): Ensure that a
3062 self-referential output appears in both input and output lists of
3063 the subprogram as categorized by aspect Global.
3064 (Check_Usage): Rename formal parameters to better illustrate their
3065 function. Update all uses of the said formals.
3067 2013-04-23 Thomas Quinot <quinot@adacore.com>
3069 * exp_util.adb, exp_util.ads (Fully_Qualified_Name_String): New
3070 parameter Append_NUL to make NUL-termination optional.
3071 * exp_dist.adb: Consistently use the above throughout instead of
3072 Get_Library_Unit_Name_String.
3074 2013-04-23 Robert Dewar <dewar@adacore.com>
3076 * sem_util.adb, sem_res.adb, prj-tree.adb, prj-tree.ads: Minor
3079 2013-04-23 Pascal Obry <obry@adacore.com>
3081 * xoscons.adb: Remove unused use clause, minor code clean-up.
3083 2013-04-23 Ed Schonberg <schonberg@adacore.com>
3085 * sem_util.ads, sem_util.adb: Code cleanup for Is_Expression_Function
3086 (can apply to any scope entity).
3087 * sem_res.adb (Resolve_Call): If the call is within another
3088 expression function it does not constitute a freeze point.
3090 2013-04-23 Yannick Moy <moy@adacore.com>
3092 * exp_ch6.adb (Expand_Actuals): Test that Subp
3093 is overloadable before testing if it's an inherited operation.
3095 2013-04-23 Robert Dewar <dewar@adacore.com>
3097 * a-envvar.adb, a-envvar.ads, exp_util.adb, sem_ch12.adb: Minor
3100 2013-04-23 Ed Schonberg <schonberg@adacore.com>
3102 * sem_ch3.adb (Analyze_Object_Declarations): Undo previous patch.
3103 * exp_util.adb (Expand_Subtype_From_Expr): If the expression
3104 is a source entity and the declaration is for an aliased
3105 unconstrained array, create a new subtype so that the flag
3106 Is_Constr_Subt_For_UN_Aliased does not pollute other entities.
3108 2013-04-23 Hristian Kirtchev <kirtchev@adacore.com>
3110 * aspects.adb: Move tables Base_Aspect and Inherited_Aspect
3111 from the spec to the body.
3112 (Find_Aspect): Update the call to Get_Aspect_Id.
3113 (Get_Aspect_Id): New version that takes an aspect specification.
3114 * aspects.ads: Reorganize all aspect related tables.
3115 (Get_Aspect_Id): New version that takes an aspect specification.
3116 * par_sco.adb (Traverse_Aspects): Update the call to Get_Aspect_Id.
3117 * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration): Update
3118 the call to Get_Aspect_Id.
3119 * sem_ch13.adb (Analyze_Aspect_At_Freeze_Point): Update the
3120 call to Get_Aspect_Id. (Analyze_Aspect_Specifications): Update
3121 the call to Get_Aspect_Id. Update the call to Impl_Defined_Aspect.
3123 2013-04-23 Robert Dewar <dewar@adacore.com>
3125 * sem_prag.adb (Fix_Error): Rewrite to do more accurate job
3126 of getting proper name in the case where pragma comes from
3128 * sem_ch3.adb, sinfo.ads, par-ch6.adb, exp_ch6.adb: Minor reformatting.
3130 2013-04-23 Yannick Moy <moy@adacore.com>
3132 * sem_ch6.adb (Process_PPCs): Do not filter postconditions based on
3135 2013-04-23 Thomas Quinot <quinot@adacore.com>
3137 * par_sco.adb (Traverse_Aux_Decls): Minor code reorganization.
3139 2013-04-23 Doug Rupp <rupp@adacore.com>
3141 * init.c: Move facility macros outside IN_RTS.
3143 2013-04-23 Thomas Quinot <quinot@adacore.com>
3145 * freeze.adb (Freeze_Entity): For the case of a bit-packed
3146 array time that is known at compile time to have more that
3147 Integer'Last+1 elements, issue an error, since such arrays are
3150 2013-04-23 Hristian Kirtchev <kirtchev@adacore.com>
3152 * sem_prag.adb (Analyze_Dependency_Clause): Update all calls to
3153 Analyze_Input_Output.
3154 (Analyze_Input_List): Update all calls to Analyze_Input_Output.
3155 (Analyze_Input_Output): Add formal parameter Self_Ref along with
3156 comment on its usage. Update all calls to Analyze_Input_Output.
3157 (Analyze_Pragma): Add new local variable Self_Ref to capture
3158 the presence of a self-referential dependency clause. Update
3159 all calls to Analyze_Input_Output.
3160 (Check_Mode): Add formal parameter Self_Ref along with comment on its
3161 usage. Verify the legality of a self-referential output.
3163 2013-04-23 Ed Schonberg <schonberg@adacore.com>
3165 * exp_ch6.adb: Add predicate checks on by-copy parameter.
3167 2013-04-23 Vincent Celier <celier@adacore.com>
3169 * a-envvar.adb, a-envvar.ads (Value): New.
3171 2013-04-22 Yannick Moy <moy@adacore.com>
3173 * exp_prag.adb (Expand_Pragma_Loop_Variant): Rewrite pragma as
3174 null statement if ignored.
3175 * sem_ch6.adb (Expand_Contract_Cases): Do nothing if pragma is ignored.
3176 * sem_prag.adb (Analyze_Pragma): Keep analyzing ignored pragmas.
3178 2013-04-22 Hristian Kirtchev <kirtchev@adacore.com>
3180 * sem_prag.adb (Analyze_Contract_Case): New routine.
3181 (Analyze_Pragma): Aspect/pragma Contract_Cases can
3182 now be associated with a library level subprogram.
3183 Add circuitry to detect illegal uses of aspect/pragma Contract_Cases
3184 in a subprogram body.
3185 (Chain_Contract_Cases): Rename formal parameter Subp_Decl to
3186 Subp_Id. Remove local constant Subp. The entity of the subprogram
3187 is now obtained via the formal paramter.
3189 2013-04-22 Ed Schonberg <schonberg@adacore.com>
3191 * sem_ch3.adb (Analyze_Object_Declaration): Do not set
3192 Is_Constr_Subt_For_Unc_Aliased on the subtype of the expression,
3193 if the expression is a source entity.
3195 2013-04-22 Yannick Moy <moy@adacore.com>
3197 * exp_prag.adb, sinfo.ads, sem_prag.ads: Minor correction of typos in
3199 * sem_ch6.adb (Expand_Contract_Cases): Add location to message.
3201 2013-04-22 Thomas Quinot <quinot@adacore.com>
3203 * sem_prag.adb (Fix_Error): For a pragma rewritten from another
3204 pragma, fix up error message to include original pragma name.
3205 * par_sco.adb: Minor reformatting.
3207 2013-04-22 Robert Dewar <dewar@adacore.com>
3209 * sem_prag.adb, sem_util.adb, sem_util.ads, sem_res.adb, exp_ch6.adb,
3210 sem_ch6.adb, opt.ads: Minor reformatting.
3212 2013-04-22 Pascal Obry <obry@adacore.com>
3214 * gnat_ugn.texi, prj-nmsc.adb, projects.texi: Add check for
3215 Library_Standalone and Library_Kind.
3217 2013-04-22 Ed Schonberg <schonberg@adacore.com>
3219 * exp_ch6.adb (Expand_Actuals): If the call is to an
3220 inherited operation and the actual is a by-reference type with
3221 predicates, add predicate call to post-call actions.
3222 * sem_util.adb (Is_Inherited_Operation_For_Type): Fix coding
3223 error: a type declaration has a defining identifier, not an Etype.
3224 * sem_res.adb: Restore code removed because of above error.
3226 2013-04-22 Doug Rupp <rupp@adacore.com>
3228 * init.c (__gnat_handle_vms_condition): Also match C$_SIGINT.
3230 2013-04-22 Yannick Moy <moy@adacore.com>
3232 * gnat_rm.texi, exp_util.adb, sem_prag.adb, sem_prag.ads, par-ch2.adb,
3233 opt.ads, sem_ch13.adb: Minor correction of typos in comments/doc.
3235 2013-04-22 Vincent Celier <celier@adacore.com>
3237 * prj-nmsc.adb (Check_Library_Attributes): Set Library_Dir to
3238 No_Path_Information only when Directories_Must_Exist_In_Projects
3240 (Get_Directories): Set Object_Directory
3241 or Exec_Directory to No_Path_Information only when
3242 Directories_Must_Exist_In_Projects is False.
3244 2013-04-22 Yannick Moy <moy@adacore.com>
3246 * par-prag.adb, sem_attr.adb, sem_ch6.adb, sem_prag.adb, sem_warn.adb,
3247 snames.ads-tmpl, sinfo.ads, sem_util.ads: Remove all references to
3248 Pragma_Contract_Case and Name_Contract_Case.
3250 2013-04-22 Yannick Moy <moy@adacore.com>
3252 * aspects.ads, aspects.adb, sem_ch13.adb: Removal of references to
3254 * gnat_ugn.texi, gnat_rm.texi Description of Contract_Case replaced by
3255 description of Contract_Cases.
3257 2013-04-12 Robert Dewar <dewar@adacore.com>
3259 * makeutl.adb, prj-nmsc.adb: Minor reformatting.
3261 2013-04-12 Robert Dewar <dewar@adacore.com>
3263 * exp_util.adb (Make_Invariant_Call): Use Check_Kind instead
3265 * gnat_rm.texi (Check_Policy): Update documentation for new
3266 Check_Policy syntax.
3267 * sem_prag.adb (Check_Kind): Replaces Check_Enabled
3268 (Analyze_Pragma, case Check_Policy): Rework to accomodate new
3269 syntax (like Assertion_Policy).
3270 * sem_prag.ads (Check_Kind): Replaces Check_Enabled.
3272 2013-04-12 Doug Rupp <rupp@adacore.com>
3274 * init.c (SS$_CONTROLC, SS$_CONTINUE) [VMS]: New macros.
3275 (__gnat_handle_vms_condition) [VMS]: Dispatch on the Crtl/C user
3276 handler if installed.
3277 * ctrl_c.c (__gnat_install_int_handler)
3278 [VMS]: Install a dummy sigaction handler to trigger the real
3279 user handler dispatch in init.c/__gnat_handle_vms_condition.
3280 (__gnat_uninstall_int_handler) [VMS]: Likewise.
3282 2013-04-12 Vincent Celier <celier@adacore.com>
3284 * clean.adb (Parse_Cmd_Line): Set Directories_Must_Exist_In_Projects
3285 to False if switch is specified.
3286 * makeutl.adb (Initialize_Source_Record): Do not look for the
3287 object file if there is no object directory.
3288 * opt.ads (Directories_Must_Exist_In_Projects): New Boolean
3289 variable, defaulted to True.
3290 * prj-nmsc.adb (Check_Library_Attributes): Do not fail if library
3291 directory does not exist when Directories_Must_Exist_In_Projects is
3293 (Get_Directories): Do not fail when the object or the exec directory
3294 do not exist when Directories_Must_Exist_In_Projects is False.
3296 2013-04-12 Robert Dewar <dewar@adacore.com>
3298 * namet.adb, namet.ads: Minor addition (7 arg version of Nam_In).
3299 * exp_prag.adb, sem_ch3.adb, sem_intr.adb, sem_type.adb, exp_util.adb,
3300 sem_aux.adb, exp_ch9.adb, sem_ch7.adb, sem_ch10.adb, sem_prag.adb,
3301 par-ch2.adb, tbuild.adb, rtsfind.adb, freeze.adb, sem_util.adb,
3302 sem_res.adb, sem_attr.adb, exp_ch2.adb, prj-makr.adb, sem_elab.adb,
3303 exp_ch4.adb, sem_ch4.adb, sem_mech.adb, sem_ch6.adb, par-prag.adb,
3304 prj-nmsc.adb, exp_disp.adb, sem_ch8.adb, sem_warn.adb, par-util.adb,
3305 sem_eval.adb, exp_intr.adb, sem_ch13.adb, exp_cg.adb, lib-xref.adb,
3306 sem_disp.adb, exp_ch3.adb: Minor code reorganization (use Nam_In).
3308 2013-04-12 Doug Rupp <rupp@adacore.com>
3310 * init.c: Don't clobber condition code on VMS.
3312 2013-04-12 Robert Dewar <dewar@adacore.com>
3314 * exp_aggr.adb: Minor reformatting.
3315 * namet.ads, namet.adb (Nam_In): New functions.
3317 2013-04-12 Robert Dewar <dewar@adacore.com>
3319 * einfo.adb (Has_Dynamic_Predicate_Aspect): New flag.
3320 (Has_Static_Predicate_Aspect): New flag.
3321 * einfo.ads (Has_Dynamic_Predicate_Aspect): New flag.
3322 (Has_Static_Predicate_Aspect): New flag.
3323 * exp_ch9.adb: Minor reformatting.
3324 * exp_util.adb (Make_Invariant_Call): Check_Enabled now handles
3326 * gnat1drv.adb: Remove setting of Debug_Pragmas_Enabled,
3327 since this switch is gone and control of Debug is done with
3329 * gnat_rm.texi: Update documentation for Assertion_Policy and
3330 Check_Policy pragmas.
3331 * opt.adb (Debug_Pragmas_Disabled[_Config]): Removed
3332 (Debug_Pragmas_Enabled[_Config]): Removed Since debug now
3333 controlled by Assertion_Enabled.
3334 * opt.ads (Debug_Pragmas_Disabled[_Config]): Removed
3335 (Debug_Pragmas_Enabled[_Config]): Removed Since debug now
3336 controlled by Assertion_Enabled.
3337 * par-ch2.adb (Scan_Pragma_Argument_Association): Allow new
3339 * sem_attr.adb: Minor reformatting.
3340 * sem_ch13.adb (Analyze_Aspect_Specification): Disable aspect
3341 if DISABLE policy applies.
3342 * sem_ch6.adb (Grab_PPC): Check original name of aspect for
3343 aspect from pragma (Process_PPCs): Properly check assertion policy.
3344 * sem_prag.adb (Check_Enabled): Rewritten for new Assertion_Policy
3345 (Check_Appicable_Policy): New procedure.
3346 (Is_Valid_Assertion_Kind): New function.
3347 (Rewrite_Assertion_Kind): New procedure.
3348 (Analyze_Pragma): Handle case of disabled assertion pragma.
3349 (Analyze_Pragma, case Assertion_Policy): Rewritten for Ada 2012.
3350 (Analyze_Pragma, case Check): Deal with 'Class possibilities.
3351 (Analyze_Pragma, case Check_Policy): Deal with 'Class possibilities.
3352 (Analyze_Pragma, case Contract_Class): New handling of ignored pragma.
3353 (Analyze_Pragma, case Debug): New control with Assertion_Policy.
3354 (Analyze_Pragma, case Debug_Policy): Now consistent with
3356 (Analyze_Pragma, case Loop_Invariant): New handling of ignored
3358 (Analyze_Pragma, case Loop_Variant): New handling of ignored pragma.
3359 (Analyze_Pragma, case Precondition): Use proper name for Check pragma.
3360 (Analyze_Pragma, case Check_Enabled): Rewritten for new policy stuff.
3361 * sem_prag.ads (Check_Enabled): Rewritten for new
3362 Assertion_Policy stuff.
3363 (Check_Appicable_Policy): New procedure.
3364 * sinfo.adb (Is_Disabled): New flag.
3365 (Is_Ignored): New flag.
3366 * sinfo.ads (Is_Disabled): New flag.
3367 (Is_Ignored): New flag.
3368 (N_Pragma_Argument_Association): New 'Class forms.
3369 * snames.ads-tmpl: New names Name_uPre, Name_uPost,
3370 Name_uType_Invariant, Name_uInvariant.
3371 * switch-c.adb: Remove setting of Debug_Pragmas_Enabled for -gnata.
3372 * tree_io.ads (ASIS_Version_Number): Updated (remove
3373 read write of obsolete flags Debug_Pragmas_Disabled and
3374 Debug_Pragmas_Enabled.
3376 2013-04-12 Ed Schonberg <schonberg@adacore.com>
3378 * exp_aggr.adb (Get_Explicit_Discriminant_Value): Subsidiary
3379 of Build_Record_Aggr_Code, used to retrieve explicit values
3380 for inherited discriminants in an extension aggregate, when the
3381 ancestor type is unconstrained.
3383 2013-04-12 Ed Schonberg <schonberg@adacore.com>
3385 * sem_attr.adb (Check_Stream_Attribute): If restriction
3386 No_Default_Stream_Attributes is active, it is illegal to use a
3387 predefined elementary type stream attribute either by itself,
3388 or more importantly as part of the attribute subprogram for a
3389 composite type. However, if the broader restriction No_Streams
3390 is active, then stream operations are not generated, and there
3393 2013-04-12 Robert Dewar <dewar@adacore.com>
3395 * gnatbind.adb: Minor reformatting.
3397 2013-04-12 Bob Duff <duff@adacore.com>
3399 * sem_attr.adb (Analyze_Access_Attribute): Treat P'Access like a
3400 call only in the static elaboration model.
3402 2013-04-12 Hristian Kirtchev <kirtchev@adacore.com>
3404 * sem_prag.adb (Analyze_Input_List): Detect an illegal dependency
3405 clause where both input and output lists are null.
3406 (Analyze_Pragma): Update the grammar of pragma Depends.
3408 2013-04-12 Vincent Celier <celier@adacore.com>
3410 * gnatbind.adb (No_Restriction_List): Exclude restrictions that
3411 take a parameter value, not a count.
3412 * prj.ads, prj.adb (Remove_All_Restricted_Languages): New procedure.
3413 * projects.texi: Complete documentation of attribute Roots.
3415 2013-04-12 Thomas Quinot <quinot@adacore.com>
3417 * exp_ch3.adb, exp_util.ads, checks.adb, freeze.adb, sem_attr.adb,
3418 sem_ch3.adb: Minor reformatting.
3419 * exp_ch4.adb (Size_In_Storage_Elements): Minor documentation
3420 improvement: note that the computation is pessimistic for bit
3422 * gnat_rm.texi (Range_Length): Fix minor error in description
3425 2013-04-12 Hristian Kirtchev <kirtchev@adacore.com>
3427 * aspects.adb (Find_Aspect): New routine.
3428 (Find_Value_Of_Aspect): New routine.
3429 (Has_Aspect): Reimplemented.
3430 * aspects.ads (Find_Aspect): New routine.
3431 (Find_Value_Of_Aspect): New routine, previously known as Find_Aspect.
3432 * exp_ch5.adb (Expand_Iterator_Loop): Update the call to Find_Aspect.
3433 * exp_util.adb (Is_Iterated_Container): Update the call to Find_Aspect.
3434 * sem_ch4.adb (Try_Container_Indexing): Update calls to Find_Aspect.
3435 * sem_ch5.adb (Analyze_Iterator_Specification): Update
3436 the call to Find_Aspect. Use function Has_Aspect for better
3438 (Preanalyze_Range): Use function Has_Aspect for better readability.
3439 * sem_ch13.adb (Check_One_Function): Update the call to Find_Aspect.
3440 * sem_prag.adb (Analyze_Pragma): There is no longer need to
3441 look at the parent to extract the corresponding pragma for
3444 2013-04-12 Robert Dewar <dewar@adacore.com>
3446 * checks.adb, sem_elab.adb, repinfo.adb, sem_ch4.adb, restrict.adb,
3447 restrict.ads: Minor reformatting.
3449 2013-04-12 Ed Schonberg <schonberg@adacore.com>
3451 * lib-xref.adb: Retrieve original name of classwide type if any.
3453 2013-04-12 Thomas Quinot <quinot@adacore.com>
3455 * exp_ch11.ads: Minor reformatting.
3457 2013-04-12 Hristian Kirtchev <kirtchev@adacore.com>
3459 * aspects.adb: Alphabetize subprogram bodies in this unit. Add
3460 an entry for Aspect_Ghost in the table of canonical aspects.
3461 (Has_Aspect): New routine.
3462 * aspects.ads: Add Aspect_Ghost to all relevant
3463 tables. Alphabetize subprograms in this unit.
3464 (Has_Aspect): New routine.
3465 * einfo.adb: Add with and use clauses for Aspects.
3466 (Is_Ghost_Function): New routine.
3467 * einfo.ads: Add new synthesized attribute Is_Ghost_Function and
3468 update the structure of the related nodes.
3469 (Is_Ghost_Function): New routine.
3470 * exp_ch4.adb (Find_Enclosing_Context): Use routine
3471 Is_Body_Or_Package_Declaration to terminate a search.
3472 (Is_Body_Or_Unit): Removed.
3473 * exp_util.adb (Within_Case_Or_If_Expression): Use routine
3474 Is_Body_Or_Package_Declaration to terminate a search.
3475 * par-prag.adb: Add pragma Ghost to the list of pragmas that do
3476 not need special processing by the parser.
3477 * sem_attr.adb (Analyze_Access_Attribute): Detect an
3478 illegal use of 'Access where the prefix is a ghost function.
3479 (Analyze_Attribute): Use routine Is_Body_Or_Package_Declaration
3480 to terminate a search. (Check_References_In_Prefix): Use routine
3481 Is_Body_Or_Package_Declaration to terminate a search.
3482 * sem_ch4.adb (Analyze_Call): Mark a function when it appears
3483 inside an assertion expression. Verify the legality of a call
3484 to a ghost function.
3485 (Check_Ghost_Function_Call): New routine.
3486 * sem_ch6.adb (Analyze_Function_Call): Code reformatting. Move
3487 the setting of attribute In_Assertion_Expression to Analyze_Call.
3488 (Check_Overriding_Indicator): Detect an illegal attempt to
3489 override a function with a ghost function.
3490 * sem_ch12.adb (Preanalyze_Actuals): Detect an illegal use of
3491 a ghost function as a generic actual.
3492 * sem_elab.adb (Check_Internal_Call_Continue): Update the call
3494 * sem_prag.adb: Add an entry for pragma Ghost in the table
3495 of significant arguments.
3496 (Analyze_Pragma): Do not analyze
3497 an "others" case guard. Add processing for pragma Ghost. Use
3498 Preanalyze_Assert_Expression when analyzing the expression of
3499 pragmas Loop_Invariant and Loop_Variant.
3500 * sem_util.adb (Get_Subprogram_Entity): Reimplemented.
3501 (Is_Body_Or_Package_Declaration): New routine.
3502 * sem_util.ads: Alphabetize subprotrams in this unit.
3503 (Is_Body_Or_Package_Declaration): New routine.
3504 * sinfo.adb (In_Assertion): Rename to In_Assertion_Expression.
3505 (Set_In_Assertion): Rename to Set_In_Assertion_Expression.
3506 * sinfo.ads: Rename flag In_Assertion to In_Assertion_Expression
3507 to better reflect its use. Update all places that mention the flag.
3508 (In_Assertion): Rename to In_Assertion_Expression. Update
3509 related pragma Inline. (Set_In_Assertion): Rename to
3510 Set_In_Assertion_Expression. Update related pragma Inline.
3511 * snames.ads-tmpl: Add new predefined name Ghost. Add new pragma
3514 2013-04-12 Arnaud Charlet <charlet@adacore.com>
3516 * sem_prag.adb (Set_Imported): Do not generate error for multiple
3517 Import in CodePeer mode.
3518 * s-rident.ads: Fix minor typo.
3520 2013-04-12 Ed Schonberg <schonberg@adacore.com>
3522 * checks.adb (Insert_Valid_Check): Do not insert validity check
3523 in the body of the generated predicate function, to prevent
3526 2013-04-12 Ed Schonberg <schonberg@adacore.com>
3528 * s-rident.ads: Add various missing Ada 2012 restrictions:
3529 No_Access_Parameter_Allocators, No_Coextensions,
3530 No_Use_Of_Attribute, No_Use_Of_Pragma.
3531 * snames.ads-tmpl: Add corresponding names.
3532 * restrict.ads restrict.adb: Subprograms and data structures to
3533 handle aspects No_Use_Of_Attribute and No_Use_Of_Pragma.
3534 * sem_ch4.adb: Correct name of restrictions is
3535 No_Standard_Allocators_After_Elaboration.
3536 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Check
3537 violation of restriction No_Use_Of_Attribute.
3538 * sem_prag.adb (Process_Restrictions_Or_Restriction_Warnings):
3539 Set restrictions No_Use_Of_Pragma and No_Use_Of_Attribute.
3540 (Analyze_Pragma): Check violation of restriction No_Use_Of_Pragma.
3541 * sem_res.adb: Check restrictions No_Access_Parameter_Allocators
3542 and No_Coextensions.
3543 * bcheck.adb: Correct name of restrictions is
3544 No_Standard_Allocators_After_Elaboration.
3545 * gnatbind.adb: Correct name of restrictions is
3546 No_Standard_Allocators_After_Elaboration.
3548 2013-04-12 Hristian Kirtchev <kirtchev@adacore.com>
3550 * sem_prag.adb (Analyze_Pragma, (Check_Mode_Restriction_In_Function):
3551 Correct error message format.
3553 2013-04-12 Robert Dewar <dewar@adacore.com>
3555 * sem_attr.adb: Minor reformatting.
3557 2013-04-12 Ed Schonberg <schonberg@adacore.com>
3559 * sem_elab.adb (Within_Elaborate_All): Do not examine a context
3560 item that has not been analyzed, because the unit may have errors,
3561 or the context item may come from a proper unit inserted at the
3562 point of a stub and not analyzed yet.
3564 2013-04-12 Thomas Quinot <quinot@adacore.com>
3566 * gnat1drv.adb, repinfo.adb, repinfo.ads (Repinfo.List_Array_Info,
3567 List_Record_Info): Also include scalar storage order information in
3570 2013-04-12 Yannick Moy <moy@adacore.com>
3572 * sem_ch6.adb (Process_Contract_Cases): Update code to apply to
3573 Contract_Cases instead of Contract_Case pragma.
3575 2013-04-12 Robert Dewar <dewar@adacore.com>
3577 * a-cfdlli.ads, g-socket.adb, s-fileio.adb: Minor reformatting.
3579 2013-04-12 Yannick Moy <moy@adacore.com>
3581 * sem_attr.adb (Analyze_Attribute): Update analyse of
3582 Attribute_Old and Attribute_Result so they are allowed in the
3583 right-hand-side of an association in a Contract_Cases pragma.
3584 * sem_prag.adb (Analyze_CTC_In_Decl_Part): Add pre-analysis of
3585 the expressions in a Contract_Cases pragma.
3587 2013-04-12 Robert Dewar <dewar@adacore.com>
3589 * sem.ads, opt.ads: Minor comment edits.
3590 * sem_warn.adb, sem_ch6.adb: Minor reformatting.
3592 2013-04-12 Claire Dross <dross@adacore.com>
3594 * a-cfdlli.adb a-cfdlli.ads (List, Not_No_Element, Iterate,
3595 Reverse_Iterate, Query_Element, Update_Element, Read, Write): Removed,
3596 not suitable for formal analysis.
3598 2013-04-12 Ed Schonberg <schonberg@adacore.com>
3600 * sem_prag.adb (Analyze_Abstract_State): Use Defining entity
3601 to locate package entity, which may be a child unit.
3603 2013-04-12 Thomas Quinot <quinot@adacore.com>
3605 * g-socket.adb, g-socket.ads (Connect_Socket, version with timeout): If
3606 the specified timeout is 0, do not attempt to determine whether the
3607 connection succeeded.
3609 2013-04-12 Doug Rupp <rupp@adacore.com>
3611 * s-fileio.adb (Form_RMS Context_Key): Fix some thinkos.
3613 2013-04-12 Doug Rupp <rupp@adacore.com>
3615 * s-fileio.adb: Minor reformatting.
3617 2013-04-12 Ed Schonberg <schonberg@adacore.com>
3619 * sem_warn.adb (Check_Infinite_Loop_Warning): Do not warn if
3620 the last statement in the analyzed loop is an unconditional
3623 2013-04-12 Robert Dewar <dewar@adacore.com>
3625 * opt.ads (Style_Check_Main): New switch.
3626 * sem.adb (Semantics): Set Style_Check flag properly for new
3627 unit to be analyzed.
3628 * sem_ch10.adb (Analyze_With_Clause): Don't reset Style_Check,
3629 the proper setting of this flag is now part of the Semantics
3631 * switch-c.adb (Scan_Front_End_Switches): Set Style_Check_Main
3632 for -gnatg and -gnaty
3634 2013-04-12 Doug Rupp <rupp@adacore.com>
3636 * s-crtl.ads (fopen, freopen): Add vms_form parameter
3637 * i-cstrea.ads (fopen, freopen): Likewise.
3638 * adaint.h (__gnat_fopen, __gnat_freopen): Likewise.
3639 * adaint.c (__gnat_fopen, __gnat_freopen): Likewise.
3640 [VMS]: Split out RMS keys and call CRTL function appropriately.
3641 * s-fileio.adb (Form_VMS_RMS_Keys, Form_RMS_Context_Key): New
3643 (Open, Reset): Call Form_VMS_RMS_Keys. Call fopen,freopen with
3645 * gnat_rm.texi: Document implemented RMS keys.
3647 2013-04-12 Hristian Kirtchev <kirtchev@adacore.com>
3649 * sem_ch13.adb (Analyze_Aspect_Specifications):
3650 Insert the corresponding pragma for aspect Abstract_State at
3651 the top of the visible declarations of the related package.
3652 Previously this was only done when the package is a compilation
3655 2013-04-12 Arnaud Charlet <charlet@adacore.com>
3657 * gnat_ugn.texi: Further menu clean ups.
3658 * sem_prag.adb, opt.ads: Minor reformatting.
3659 * sem_util.ads: Minor comment fix.
3661 2013-04-12 Hristian Kirtchev <kirtchev@adacore.com>
3663 * sem_ch13.adb (Analyze_Aspect_Specifications): Aspect
3664 Depends is now a delayed aspect. The delay is required
3665 due to the interplay between aspects Depends and Global.
3666 (Check_Aspect_At_Freeze_Point): Add an entry for aspect Depends.
3667 * sem_prag.adb: Reformat various error messages.
3668 (Add_Item): New subsidiary routine.
3669 (Analyze_Pragma): Add new variables
3670 Global_Seen, Result_Seen, Subp_Inputs and Subp_Outputs. The
3671 analysis of pragma Depends now has the capability to check
3672 the proper mode and usage of subprogram inputs and outputs.
3673 (Appears_In): New routine.
3674 (Check_Function_Return): New routine.
3675 (Check_Mode): New routine.
3676 (Check_Usage): New routine.
3677 (Collect_Subprogram_Inputs_Outputs): New routine.
3679 2013-04-12 Bob Duff <duff@adacore.com>
3681 * par-ch7.adb (P_Package): Initialize Sloc in the newly-pushed scope
3684 2013-04-12 Robert Dewar <dewar@adacore.com>
3686 * switch-c.adb: Minor fix to wording of error message for
3689 2013-04-12 Robert Dewar <dewar@adacore.com>
3691 * impunit.adb: Add s-multip and s-mudido to list of impl defined
3693 * gnat_rm.texi: Add documentation for
3694 System.Multiprocessors[.Dispatching_Domains].
3696 2013-04-12 Ben Brosgol <brosgol@adacore.com>
3698 * gnat_ugn.texi: Completion of menu cleanups.
3700 2013-04-12 Arnaud Charlet <charlet@adacore.com>
3702 * sem_prag.adb (Diagnose_Multiple_Pragmas): Relax the rules
3703 in Relaxed_RM_Semantics.
3705 2013-04-12 Arnaud Charlet <charlet@adacore.com>
3707 * set_targ.adb (elab code): Add support for non gcc back-ends
3708 where save_argv is null.
3710 2013-04-12 Robert Dewar <dewar@adacore.com>
3712 * gnat1drv.adb (Gnat1drv): Test Target_Dependent_Info_Write_Name.
3713 * opt.ads (Target_Dependent_Info_Read): Add _Name, now an access
3714 type (Target_Dependent_Info_Write): Add _Name, now an access type.
3715 * set_targ.adb (Write_Target_Dependent_Values): Use name
3716 from -gnatet switch stored in Target_Dependent_Info_Write_Name
3717 (Read_Target_Dependent_Values): Use name from -gnateT switch
3718 stored in Target_Dependent_Info_Read_Name.
3719 * switch-c.adb: New form of -gnatet and -gnateT switches.
3720 * usage.adb: New form of -gnatet and -gnateT switches with
3723 2013-04-11 Eric Botcazou <ebotcazou@adacore.com>
3725 * gcc-interface/decl.c (elaborate_expression_1): Skip only constant
3726 arithmetics when looking for a read-only variable in the expression.
3728 2013-04-11 Javier Miranda <miranda@adacore.com>
3730 * check.ads, exp_ch6.adb (Install_Null_Excluding_Check): No check in
3731 interface thunks since it is performed at the caller side.
3732 (Expand_Simple_Function_Return): No accessibility check needed in thunks
3733 since the check is done by the target routine.
3735 2013-04-11 Ed Schonberg <schonberg@adacore.com>
3737 * sem_prag.adb (Analyze_Pragma, case Priority): pre-analyze
3738 expression with type Any_Priority.
3739 * exp_ch9.adb (Initialize_Protection): Check that the value
3740 of the priority expression is within the bounds of the proper
3743 2013-04-11 Robert Dewar <dewar@adacore.com>
3745 * sem_prag.adb, prj-env.adb: Minor reformatting.
3747 2013-04-11 Ben Brosgol <brosgol@adacore.com>
3749 * gnat_ugn.texi: Clean ups.
3751 2013-04-11 Yannick Moy <moy@adacore.com>
3753 * set_targ.adb: Minor comment update.
3755 2013-04-11 Pascal Obry <obry@adacore.com>
3757 * gnat_ugn.texi: Remove obsolete comment about DLL calling
3760 2013-04-11 Javier Miranda <miranda@adacore.com>
3762 * exp_ch6.adb (Expand_Call): For the call to the target primitive
3763 of an interface thunks do not compute the extra actuals; just
3764 propagate the extra actuals received by the thunk.
3765 * exp_disp.adb (Expand_Interface_Thunk): Decorate new attribute
3767 * sem_ch6.adb (Create_Extra_Formals): Do not generate extra
3768 formals in interface thunks whose target primitive has no extra
3771 2013-04-11 Hristian Kirtchev <kirtchev@adacore.com>
3773 * sem_prag.adb (Analyze_Pragma): Detect
3774 a renaming by looking at the Renamed_Object attribute.
3775 (Is_Renaming): Removed.
3777 2013-04-11 Vincent Celier <celier@adacore.com>
3779 * prj-env.adb (Initialize_Default_Project_Path): Take
3780 into account a project path file, specified by environment
3781 variable GPR_PROJECT_PATH_FILE, before taking into account
3783 * projects.texi: Add documentation for GPR_PROJECT_PATH_FILE
3785 2013-04-11 Ed Schonberg <schonberg@adacore.com>
3787 * a-cdlili.adb, a-cdlili.ads, a-cihama.adb, a-cihama.ads, a-coinve.adb,
3788 a-coinve.ads, a-ciorse.adb, a-ciorse.ads, a-coorma.adb, a-coorma.ads,
3789 a-cfdlli.adb, a-cfdlli.ads, a-cborma.adb, a-cborma.ads, a-cidlli.adb,
3790 a-cidlli.ads, a-ciormu.adb, a-ciormu.ads, a-cihase.adb, a-cihase.ads,
3791 a-cohama.adb, a-cohama.ads, a-coorse.adb, a-coorse.ads, a-cbhama.adb,
3792 a-cbhama.ads, a-cborse.adb, a-cborse.ads, a-ciorma.adb, a-cobove.adb,
3793 a-ciorma.ads, a-cobove.ads, a-coormu.adb, a-coormu.ads, a-cohase.adb,
3794 a-cohase.ads, a-cbdlli.adb, a-cbdlli.ads, a-cbhase.adb, a-cbhase.ads:
3795 Move Iterator operations from body to private part of spec.
3797 2013-04-11 Eric Botcazou <ebotcazou@adacore.com>
3799 * ttypes.ads, get_targ.ads: More minor rewording of comments.
3801 2013-04-11 Johannes Kanig <kanig@adacore.com>
3803 * debug.adb: Document use of switch -gnatd.Z.
3805 2013-04-11 Hristian Kirtchev <kirtchev@adacore.com>
3807 * sem_prag.adb (Analyze_Pragma): Both pragma Depends and Global can now
3808 support renamings of entire objects. Legal renamings are replaced by
3809 the object they rename.
3810 (Is_Renaming): New routine.
3812 2013-04-11 Yannick Moy <moy@adacore.com>
3814 * set_targ.adb, opt.ads: Minor changes in comments.
3816 2013-04-11 Ben Brosgol <brosgol@adacore.com>
3818 * gnat_ugn.texi: Minor clean ups.
3820 2013-04-11 Robert Dewar <dewar@adacore.com>
3822 * nlists.ads, nlists.adb, treepr.adb, treepr.ads: Move debugging
3823 function p from Nlists to Treepr.
3825 2013-04-11 Ed Schonberg <schonberg@adacore.com>
3827 * sem_disp.adb (Check_Dispatching_Context): If the context is
3828 a contract for a null procedure defer error reporting until
3829 postcondition body is created.
3830 * exp_ch13.adb (Expand_N_Freeze_Entity): If the entity is a
3831 null procedure, complete the analysis of its contracts so that
3832 calls within classwide conditions are properly rewritten as
3835 2013-04-11 Thomas Quinot <quinot@adacore.com>
3837 * sem_ch10.adb, sem_ch12.adb: Minor reformatting.
3839 2013-04-11 Robert Dewar <dewar@adacore.com>
3841 * exp_attr.adb, sem_res.adb, sem_attr.adb: Minor reformatting.
3843 2013-04-11 Robert Dewar <dewar@adacore.com>
3845 * atree.adb, atree.ads (Node31): New function.
3846 (Set_Node31): New procedure.
3848 2013-04-11 Robert Dewar <dewar@adacore.com>
3850 * errout.ads: Minor typo correction.
3852 2013-04-11 Javier Miranda <miranda@adacore.com>
3854 * einfo.ad[sb] (Thunk_Entity/Set_Thunk_Entity): New attribute.
3856 2013-04-11 Robert Dewar <dewar@adacore.com>
3858 * back_end.adb (Register_Back_End_Types): Moved to Get_Targ
3859 * back_end.ads (C_String): Moved to Get_Targ
3860 (Register_Type_Proc): Moved to Get_Targ (Register_Back_End_Types):
3862 * cstand.adb (Register_Float_Type): New interface
3863 (Create_Back_End_Float_Types): Use entries in FPT_Mode_Table.
3864 * get_targ.adb (Register_Back_End_Types): Moved here from
3866 * get_targ.ads (C_String): Moved here from Back_End
3867 (Register_Type_Proc): Moved here from Back_End
3868 (Register_Back_End_Types): here from Back_End.
3869 * gnat1drv.adb (GGnat11drv): Add call to
3870 Write_Target_Dependent_Values;
3871 * lib-writ.ads, lib-writ.adb (Write_ALI): Remove section writing
3872 obsolete target dependent info.
3873 * opt.ads (Generate_Target_Dependent_Info):
3874 Removed (Target_Dependent_Info_Read): New flag
3875 (Target_Dependent_Info_Write): New flag
3876 * output.adb: Minor comment change
3877 * s-os_lib.ads: Minor reformatting
3878 * set_targ.ads, set_targ.adb: Minor reformatting.
3879 * switch-c.adb (Scan_Switches.First_Ptr): New variable
3880 (Scan_Front_End_Switches): Check -gnatd.b, -gnateT come first
3881 (Scan_Front_End_Switches): Handle -gnatet, -gnateT
3882 * ttypes.ads: Remove documentation section on target dependent
3883 info in ali file Remove four letter codes, no longer used Instead
3884 of using Get_Targ.Get_xxx, we use Set_Targ.xxx
3885 * usage.adb: Add usage lines for -gnatet/-gnateT
3886 * gcc-interface/Make-lang.in: Update dependencies.
3888 2013-04-11 Thomas Quinot <quinot@adacore.com>
3890 * sem_ch4.adb: Update documentation.
3891 * sinfo.ads (N_Expression_With_Actions): Ditto.
3893 2013-04-11 Hristian Kirtchev <kirtchev@adacore.com>
3895 * sem_ch13.adb (Analyze_Aspect_Specifications):
3896 Add a guard to prevent the double insertion of the same aspect
3897 into a rep item list. This previously led to a circularity.
3899 2013-04-11 Ed Schonberg <schonberg@adacore.com>
3901 * sem_attr.adb (Eval_Attribute, case 'Access): Reject attribute
3902 reference if the prefix is the dereference of an anonymous access
3904 * exp_attr.adb (Expand_N_Attribute_Reference, Access_Cases): Handle
3905 properly a reference to the current instance of a protected type
3906 from within a protected subprogram.
3907 * sem_res.adb (Find_Unique_Access_Type): Treat
3908 Attribute_Access_Type like Allocator_Type when resolving an
3911 2013-04-11 Arnaud Charlet <charlet@adacore.com>
3913 * xgnatugn.adb: Remove obsolete comments.
3915 2013-04-11 Robert Dewar <dewar@adacore.com>
3917 * back_end.ads, back_end.adb: Minor reformatting.
3918 * set_targ.ads, set_targ.adb: New files.
3920 2013-04-11 Hristian Kirtchev <kirtchev@adacore.com>
3922 * sem_case.adb (Check_Against_Predicate): New routine.
3923 (Check_Choices): When the type covered by the list of choices
3924 is a static subtype with a static predicate, check all choices
3925 agains the predicate.
3926 (Issue_Msg): All versions removed.
3927 (Missing_Choice): New routines.
3928 * sem_ch4.adb: Code and comment reformatting.
3929 (Analyze_Case_Expression): Do not check the choices when the case
3930 expression is being preanalyzed and the type of the expression
3931 is a subtype with a static predicate.
3932 (Has_Static_Predicate): New routine.
3933 * sem_ch13.adb: Code and comment reformatting. (Build_Range):
3934 Always build a range even if the low and hi bounds denote the
3935 same value. This is needed by the machinery in Check_Choices.
3936 (Build_Static_Predicate): Always build a range even if the low and
3937 hi bounds denote the same value. This is needed by the machinery
3940 2013-04-11 Robert Dewar <dewar@adacore.com>
3942 * einfo.ads, sem_util.adb, exp_ch6.adb, xgnatugn.adb: Minor
3945 2013-04-11 Doug Rupp <rupp@adacore.com>
3947 * gnatlink.adb: Fold program basename to lower case on VMS for
3950 2013-04-11 Matthew Heaney <heaney@adacore.com>
3952 * a-rbtgbo.adb (Generic_Equal): Initialize Result variable before
3955 2013-04-11 Arnaud Charlet <charlet@adacore.com>
3957 * xgnatugn.adb: Remove dead code (handling of @ifset/@ifclear).
3959 2013-04-11 Arnaud Charlet <charlet@adacore.com>
3961 * gnat_ugn.texi: Remove some use of ifset in menus. Not strictly
3962 needed, and seems to confuse some versions of makeinfo.
3964 2013-04-11 Javier Miranda <miranda@adacore.com>
3966 * einfo.adb (Is_Thunk): Remove assertion.
3967 (Set_Is_Thunk): Add assertion.
3968 * einfo.ads (Is_Thunk): Complete documentation.
3969 * exp_ch11.adb (Expand_N_Handled_Sequence_Of_Statements): Code cleanup.
3970 * exp_ch3.ad[sb] (Is_Variable_Size_Array): Moved to sem_util
3971 (Is_Variable_Size_Record): Moved to sem_util
3972 * exp_ch6.adb (Expand_Call): Code cleanup.
3973 (Expand_N_Extended_Return_Statement): Code cleanup.
3974 (Expand_Simple_Function_Return): Code cleanup.
3975 * exp_disp.adb Remove dependency on exp_ch3
3976 (Expand_Interface_Thunk): Add minimum decoration needed to set
3978 * sem_ch3.ad[sb] (Is_Constant_Bound): moved to sem_util
3979 * sem_util.ad[sb] (Is_Constant_Bound): Moved from
3980 sem_ch3 (Is_Variable_Size_Array): Moved from exp_ch3
3981 (Is_Variable_Size_Record): Moved from exp_ch3
3983 2013-04-11 Javier Miranda <miranda@adacore.com>
3985 * exp_ch11.adb (Expand_N_Handled_Sequence_Of_Statements): Do
3986 not add cleanup actions in thunks associated with interface types.
3987 * exp_ch3.ad[sb] (Is_Variable_Size_Record): Move declaration to
3989 * exp_ch4.adb (Tagged_Conversion): Update call to
3990 Expand_Interface_Conversion since the parameter Is_Static is no
3992 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Adding
3993 assertion to ensure that interface thunks are never handled by
3995 (Expand_N_Simple_Function_Return): Do not rewrite this statement
3996 as an extended return statement in interface thunks, and do not
3997 perform copy in the secondary stack if the return statement is
3999 * exp_disp.adb (Expand_Dispatching_Call): No longer displace
4000 the pointer to the returned object in functions returning interface
4002 (Expand_Interface_Thunk): For functions returning interface types
4003 displace the pointer to the returned object.
4004 (Expand_Interface_Conversion): Remove formal
4005 Is_Static since this subprogram can now evaluate it locally.
4006 * sem_ch3.adb (Add_Internal_Interface_Entities): For functions
4007 propagate the type returned by the covered interface primitive to
4008 the internal interface entity. Needed by the thunk to generate
4009 the code which displaces "this" to reference the corresponding
4010 secondary dispatch table.
4011 * sem_disp.adb (Propagate_Tag): Update call to
4012 Expand_Interface_Conversion since the parameter Is_Static is no
4014 * sem_res.adb (Resolve_Type_Conversion): Update calls to
4015 Expand_Interface_Conversion since the parameter Is_Static is no
4016 longer needed plus code cleanup.
4018 2013-04-11 Eric Botcazou <ebotcazou@adacore.com>
4020 * init.c (RETURN_ADDR_OFFSET): Delete as unused.
4022 2013-04-11 Robert Dewar <dewar@adacore.com>
4024 * a-crbtgk.adb, a-ciorse.adb, a-crbtgo.adb, a-coorse.adb, a-rbtgbo.adb,
4025 a-cborse.adb, a-rbtgso.adb, exp_ch3.adb: Minor reformatting.
4027 2013-04-11 Yannick Moy <moy@adacore.com>
4029 * exp_ch4.adb (Expand_N_Selected_Component): Do not expand
4030 discriminant check for Unchecked_Union.
4031 * sem_res.adb (Resolve_Selected_Component): Set flag
4032 Do_Discriminant_Check even when expansion is not performed.
4033 * sinfo.ads (Do_Discriminant_Check): Update documentation for the case
4036 2013-04-11 Thomas Quinot <quinot@adacore.com>
4038 * sem_ch13.adb (Same_Representation): Two types with different scalar
4039 storage order never have the same representation.
4041 2013-04-11 Arnaud Charlet <charlet@adacore.com>
4043 * xgnatugn.adb (Push_Conditional): Simplify handling,
4044 no longer need to keep track of "excluding" sections.
4045 (Currently_Excluding): Removed.
4046 (Process_Source_File):
4047 Set unw/vms flag so that texinfo can do the whole handling of
4048 @ifset/@ifclear sections. Fix handling of nested @ifset/@ifclear
4050 * gnat_ugn.texi: Add a section on performing unassisted install
4053 2013-04-11 Johannes Kanig <kanig@adacore.com>
4055 * debug.adb: Document usage of -gnatd.Q switch.
4057 2013-04-11 Matthew Heaney <heaney@adacore.com>
4059 * a-crbtgk.adb (Ceiling, Find, Floor): Adjust locks
4060 before element comparisons.
4061 (Generic_Conditional_Insert, Generic_Conditional_Insert_With_Hint):
4063 * a-crbtgo.adb, a-rbtgbo.adb (Generic_Equal): Adjust locks before
4064 element comparisons.
4065 * a-rbtgso.adb (Difference, Intersection): Adjust locks
4066 before element comparisons.
4067 (Is_Subset, Overlap): Ditto
4068 (Symmetric_Difference, Union): Ditto
4069 * a-btgbso.adb (Set_Difference, Set_Intersection): Adjust locks
4070 before element comparisons.
4071 (Set_Subset, Set_Overlap): Ditto
4072 (Set_Symmetric_Difference, Set_Union): Ditto
4073 * a-coorse.adb, a-ciorse.adb, a-cborse.adb
4074 (Update_Element_Preserving_Key): Adjust locks before element
4075 comparisons (Replace_Element): Ditto
4077 2013-04-11 Pascal Obry <obry@adacore.com>
4079 * prj-attr.adb, projects.texi, snames.ads-tmpl: Remove Build_Slaves
4082 2013-04-11 Ed Schonberg <schonberg@adacore.com>
4084 * exp_ch3.adb (Build_Equivalent_Aggregate): Subsidiary of
4085 Expand_N_Object_Declaration, used to construct an aggregate
4086 with static components whenever possible, so that objects of a
4087 discriminated type can be initialized without calling the init.
4090 2013-04-11 Vincent Celier <celier@adacore.com>
4092 * prj-makr.adb (Process_Directory): On VMS, always delete,
4093 then recreate the temporary file with Create_Output_Text_File,
4094 otherwise the output redirection does not work properly.
4096 2013-04-11 Eric Botcazou <ebotcazou@adacore.com>
4098 * urealp.ads: Fix minor typo.
4100 2013-04-11 Fabien Chouteau <chouteau@adacore.com>
4102 * cio.c (mktemp): Don't use tmpnam function from the
4103 system on VxWorks in kernel mode.
4105 2013-04-11 Vincent Celier <celier@adacore.com>
4107 * make.adb (Compile): Clarify the error message reported
4108 when gnatmake refuses to compile a runtime source.
4109 (Start_Compile_If_Possible): Ditto.
4111 2013-04-11 Vincent Celier <celier@adacore.com>
4113 * gnat_ugn.texi: Add documentation about -gnatc and gnatmake.
4115 2013-04-11 Vincent Celier <celier@adacore.com>
4117 * switch-c.adb: Document internal switches.
4118 * usage.adb: Remove lines for internal switches: -gnatea, -gnateO,
4119 -gnatez and -gnateO.
4121 2013-04-11 Ed Schonberg <schonberg@adacore.com>
4123 * par-ch6.adb (P_Subprogram): Attach aspects to subprogram stub.
4124 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Allow aspects on
4126 * sem_ch13.adb (Analyze_Aspect_Specifications): Analyze generated
4127 pre/post pragmas at once before analyzing the proper body.
4128 * sem_prag.adb (Chain_PPC): Handle pragma that comes from an
4129 aspect on a subprogram stub.
4130 * aspects.adb: Aspect specifications can appear on a
4131 subprogram_Body_Stub.
4133 2013-04-11 Vincent Celier <celier@adacore.com>
4135 * gnatname.adb: Minor comment fix.
4137 2013-04-11 Vincent Celier <celier@adacore.com>
4139 * prj-makr.adb (Process_Directory): Create a new temporary
4140 file for each invocation of the compiler, in directory pointed
4141 by environment variable TMPDIR if it exists.
4143 2013-04-11 Arnaud Charlet <charlet@adacore.com>
4145 * gnat_ugn.texi: Minor editing/clean ups.
4147 2013-04-11 Ed Schonberg <schonberg@adacore.com>
4149 * sem_ch6.adb (Analyze_Null_Procedure): New subprogram, mostly
4150 extracted from Analyze_Subprogram_Declaration, to handle null
4151 procedure declarations that in ada 2012 can be completions of
4152 previous declarations.
4154 2013-04-11 Hristian Kirtchev <kirtchev@adacore.com>
4156 * sem_prag.adb (Entity_Of): Moved to Exp_Util.
4157 * exp_util.ads, exp_util.adb (Entity_Of): New routine.
4159 2013-04-11 Robert Dewar <dewar@adacore.com>
4161 * g-spipat.ads: Minor comment fix.
4163 2013-04-11 Robert Dewar <dewar@adacore.com>
4165 * sem_prag.adb, sem_util.adb, sem_res.adb, exp_ch4.adb: Minor
4168 2013-04-11 Thomas Quinot <quinot@adacore.com>
4170 * exp_util.ads (Fully_Qualified_Name_String): Document that the
4171 constructed literal is the entity name in all upper case.
4173 2013-04-11 Thomas Quinot <quinot@adacore.com>
4175 * sem_util.adb (Set_Entity_With_Style_Check): Fix logic of
4176 check for implementation defined identifiers.
4178 2013-04-11 Yannick Moy <moy@adacore.com>
4180 * checks.adb (Apply_Type_Conversion_Checks): Add an explanation
4181 of why range check and length are put on different nodes.
4182 * exp_ch4.adb (Apply_Type_Conversion_Checks): Remove check marks
4183 when doing their expansion.
4185 2013-04-11 Ed Schonberg <schonberg@adacore.com>
4187 * sem_util.ads, sem_util.adb (Get_Incomplete_View_Of_Ancestor):
4188 New function to implement the notion introduced in RM 7.3.1
4189 (5.2/3): in a child unit, a derived type is within the derivation
4190 class of an ancestor declared in a parent unit, even if there
4191 is an intermediate derivation that does not see the full view
4193 * sem_res.adb (Valid_Conversion): if all else fails, examine if an
4194 incomplete view of an ancestor makes a numeric conversion legal.
4196 2013-04-11 Ed Schonberg <schonberg@adacore.com>
4198 * sem_ch6.adb: in Ada2012 operators can only have in
4201 2013-04-11 Vincent Celier <celier@adacore.com>
4203 * makeutl.adb (Create_Binder_Mapping_File): Do not put into
4204 the mapping file ALI files of sources that have been replaced.
4206 2013-04-11 Vincent Celier <celier@adacore.com>
4208 * projects.texi: Add subsection Duplicate Sources in Projects.
4210 2013-04-11 Vincent Celier <celier@adacore.com>
4212 * gnat_ugn.texi: Add documentation for gnatmake switch -droot_dir/**
4214 2013-04-11 Arnaud Charlet <charlet@adacore.com>
4216 * init.c (__gnat_install_handler): Only set up an alternate
4217 stack when installing a signal handler for SIGSEGV.
4219 2013-04-11 Thomas Quinot <quinot@adacore.com>
4221 * g-socket.adb (Connect_Socket, timeout version): Call
4222 underlying connect operation directly, not through the 2-argument
4223 Connect_Socket thick binding, in order to avoid raising a junk
4224 exception for the EINPROGRESS return.
4226 2013-04-11 Robert Dewar <dewar@adacore.com>
4228 * a-cdlili.adb: Minor addition of pragma Warnings (Off).
4230 2013-04-11 Robert Dewar <dewar@adacore.com>
4232 * hostparm.ads: Minor reformatting.
4234 2013-04-11 Hristian Kirtchev <kirtchev@adacore.com>
4236 * aspects.ads, aspects.adb: Add Aspect_Depends to all the relevant
4238 * elists.ads, elists.adb (Contains): New routine.
4239 * par-prag.adb: Pragma Depends does not need any special treatment
4241 * sem_ch13.adb (Analyze_Aspect_Specifications):
4242 Transform aspect Depends into a corresponding pragma.
4243 (Check_Aspect_At_Freeze_Point): Aspect Depends does not need
4244 inspection at its freeze point.
4245 * sem_prag.adb (Analyze_Pragma): Perform analysis and
4246 normalization of pragma Depends. Remove the use of function
4247 Is_Duplicate_Item. Use End_Scope to uninstalle the formal
4248 parameters of a subprogram. Add a value for pragma Depends in
4250 (Is_Duplicate_Item): Removed.
4251 * snames.ads-tmpl: Add predefined name for Depends as well as
4252 a pragma identifier.
4254 2013-04-11 Arnaud Charlet <charlet@adacore.com>
4256 * gnat1drv.adb: Minor code clean up.
4258 2013-04-11 Arnaud Charlet <charlet@adacore.com>
4260 * debug.adb, sem_ch13.adb (Analyze_Enumeration_Representation_Clause):
4261 Ignore enumeration rep clauses by default in CodePeer mode, unless
4262 -gnatd.I is specified.
4264 2013-04-11 Ed Schonberg <schonberg@adacore.com>
4266 * sem_util.adb (Safe_To_Capture_Value): If the node belongs to
4267 an expression that has been attached to the else_actions of an
4268 if-expression, the capture is not safe.
4270 2013-04-11 Yannick Moy <moy@adacore.com>
4272 * checks.adb (Apply_Type_Conversion_Checks): Put check mark on type
4273 conversion for arrays.
4275 2013-04-11 Robert Dewar <dewar@adacore.com>
4277 * a-cdlili.adb, a-cidlli.adb, a-cbdlli.adb: Minor reformatting.
4279 2013-04-11 Johannes Kanig <kanig@adacore.com>
4281 * adabkend.adb: Minor comment addition.
4283 2013-04-11 Matthew Heaney <heaney@adacore.com>
4285 * a-cdlili.adb, a-cidlli.adb, a-cbdlli.adb ("="): Increment
4286 lock counts before entering loop.
4288 (Is_Sorted, Merge, Sort): Ditto.
4289 (Reverse_Find): Ditto.
4290 (Splice_Internal): Internal operation to refactor splicing logic.
4291 (Splice): Some logic moved into Splice_Internal.
4293 2013-04-11 Johannes Kanig <kanig@adacore.com>
4295 * adabkend.adb (Scan_Compiler_Arguments): Do not call
4296 Set_Output_Object_File_Name in Alfa_Mode
4297 * gnat1drv.adb (Adjust_Global_Switches): Take Alfa_Mode into account.
4298 * opt.ads: Fix documentation.
4300 2013-04-11 Robert Dewar <dewar@adacore.com>
4302 * sem_res.adb: Minor code reorganization and comment fixes.
4303 * sem_type.adb: Minor reformatting.
4305 2013-04-11 Hristian Kirtchev <kirtchev@adacore.com>
4307 * exp_ch4.adb (Process_Transient_Object): Add new
4308 local variable Fin_Call. Remove and explain ??? comment. Use the
4309 Actions of logical operators "and then" and "or else" to insert
4310 the generated finalization call.
4312 2013-04-11 Eric Botcazou <ebotcazou@adacore.com>
4314 * gnat_rm.texi: Fix typo.
4316 2013-04-11 Ed Schonberg <schonberg@adacore.com>
4318 * sem_res.adb: Minor reformatting.
4320 2013-04-11 Robert Dewar <dewar@adacore.com>
4322 * atree.h: Add declarations for Flag255-Flag289 Fix declaration
4323 of Field30 (was wrong, but no effect, since not yet referenced by
4324 back end) Add declarations for Field31-Field35 Add declarations
4326 * einfo.ads, einfo.adb (Has_Invariants): No longer applies to
4328 (Has_Predicates): No longer applies to functions.
4329 (Is_Predicate_Function): New flag.
4330 (Is_Predicate_Function_M): New flag.
4331 (Is_Invariant_Procedure): New flag.
4332 (Predicate_Function_M): New function.
4333 (Set_Predicate_Function_M): New procedure.
4334 * exp_ch11.adb (Expand_N_Raise_Expression): Take care of special
4335 case of appearing in predicate used for membership test.
4336 * exp_ch3.adb (Insert_Component_Invariant_Checks): Set
4337 Is_Invariant_Procedure flag.
4338 * exp_ch4.adb (Expand_Op_In): Call special predicate function
4339 that takes care of raise_expression nodes in the predicate.
4340 * exp_util.ads, exp_util.adb (Make_Predicate_Call): Add argument Mem for
4342 * sem_ch13.adb (Build_Predicate_Functions): New name for
4343 Build_Predicate_Function. Major rewrite to take care of raise
4344 expression in predicate for membership tests.
4345 * sem_res.adb (Resolve_Actuals): Include both predicate functions
4346 in defense against infinite predicate function loops.
4347 * sinfo.ads, sinfo.adb (Convert_To_Return_False): New flag.
4349 2013-04-11 Robert Dewar <dewar@adacore.com>
4351 * sem_prag.adb: Minor reformatting.
4353 2013-04-11 Ed Schonberg <schonberg@adacore.com>
4355 * lib-xref.adb: Generate reference for component of anonymous
4358 2013-04-11 Robert Dewar <dewar@adacore.com>
4360 * stand.ads: Minor reformatting.
4362 2013-04-11 Matthew Heaney <heaney@adacore.com>
4364 * a-convec.adb, a-coinve.adb, a-cobove.adb ("="): Increment lock
4365 counts before entering loop.
4366 (Find, Find_Index): Ditto.
4367 (Is_Sorted, Merge, Sort): Ditto.
4368 (Reverse_Find, Reverse_Find_Index): Ditto.
4370 2013-04-11 Robert Dewar <dewar@adacore.com>
4372 * exp_ch11.ads, exp_ch11.adb (Expand_N_Raise_Expression): New procedure.
4373 * exp_util.adb (Insert_Actions): Add entry for N_Raise_Expression.
4374 * expander.adb: Add call to Expand_N_Raise_Expression.
4375 * par-ch11.adb (P_Raise_Expression): New procedure.
4376 * par-ch4.adb (P_Relation): Handle Raise_Expression.
4377 * par.adb (P_Raise_Expression): New procedure.
4378 * sem.adb: Add handling for N_Raise_Expression.
4379 * sem_ch11.ads, sem_ch11.adb (Analyze_Raise_Expression): New procedure.
4380 * sem_res.adb (Resolve): Add handling for N_Raise_Expression.
4381 * sinfo.ads, sinfo.adb (N_Raise_Expression): New node.
4382 * sprint.adb (Sprint_Node_Actual): Add handling for N_Raise_Expression.
4383 * stand.ads (Any_Type): Document use with N_Raise_Expression.
4385 2013-04-11 Vincent Celier <celier@adacore.com>
4387 * gnat_ugn.texi: Remove section "The Development Environments"
4388 now that all predefined attributes are documented, including
4389 those in package IDE.
4391 2013-04-11 Ed Schonberg <schonberg@adacore.com>
4393 * sem_ch6.adb: Preserve parent link in copy of expression.
4395 2013-04-11 Vincent Celier <celier@adacore.com>
4397 * projects.texi: Complete rewrite of the subsection Attributes
4398 in section "Project file Reference".
4400 2013-04-11 Robert Dewar <dewar@adacore.com>
4402 * exp_ch4.adb: Minor reformatting.
4404 2013-04-11 Robert Dewar <dewar@adacore.com>
4406 * exp_ch4.adb (Expand_Concatenate): Remove wrapping in
4407 expression-with-actions node. No longer needed given fix to
4408 sem_prag and caused loss of some useful warnings.
4409 * sem.ads: Minor reformatting.
4410 * sem_prag.adb (Check_Disabled): Removed, to be replaced by not
4411 Check_Enabled. These two routines were curiously incompatible
4413 (Analyze_Pragma, case Check): Make sure we do
4414 not expand the string argument if the check is disabled. Avoid
4415 use of Check_Disabled, which resulted in missing analysis in
4417 * sem_prag.ads (Check_Disabled): Removed, to be replaced by not
4418 Check_Enabled. These two routines were curiously incompatible
4421 2013-04-11 Hristian Kirtchev <kirtchev@adacore.com>
4423 * exp_ch4.adb (Process_Transient_Object): Use
4424 an unchecked conversion when associating a transient controlled
4425 object with its "hook".
4427 2013-04-11 Ed Schonberg <schonberg@adacore.com>
4429 * sem_prag.adb (Analyze_Pragma, case
4430 Preelaborable_Initialization): The pragma is legal if it comes
4431 from an aspect on the private view of the type, even though its
4432 analysis point takes place later at the freeze point.
4434 2013-04-11 Robert Dewar <dewar@adacore.com>
4436 * sem_ch6.adb: Minor reformatting.
4438 2013-04-11 Yannick Moy <moy@adacore.com>
4440 * ali-util.adb (Read_Withed_ALIs): Do not consider it an error to
4441 read ALI files with No_Object=True in Alfa mode.
4442 * gnat1drv.adb: Set appropriately Back_End_Mode in Alfa mode, whether
4443 this is during frame condition generation of translation to Why.
4445 2013-04-11 Robert Dewar <dewar@adacore.com>
4447 * exp_ch4.adb: Minor code reorganization
4448 * types.ads: Minor reformatting.
4450 2013-04-11 Johannes Kanig <kanig@adacore.com>
4452 * opt.ads New global boolean Frame_Condition_Mode to avoid
4453 referring to command line switch.
4454 * gnat1drv.adb (Gnat1drv) set frame condition mode when -gnatd.G
4455 is present, and disable Code generation in that case. Disable
4456 ALI file generation when switch is *not* present.
4458 2013-04-11 Ed Schonberg <schonberg@adacore.com>
4460 * sem_ch6.adb (Analyze_Expression_Function): Perform the
4461 pre-analysis on a copy of the expression, to prevent downstream
4462 visbility issues involving operators and instantiations.
4464 2013-04-11 Johannes Kanig <kanig@adacore.com>
4466 * debug.adb: Reservation and documentation for -gnatd.G switch.
4467 * gnat1drv.adb (Adjust_Global_Switches) Take into account -gnatd.G
4468 switch, and set ALI file generation accordingly.
4470 2013-04-11 Robert Dewar <dewar@adacore.com>
4472 * exp_ch4.adb, exp_dist.adb: Minor reformatting.
4473 * gnat_rm.texi, gnat_ugn.texi: -020 Add documentation clarifying that
4474 check names introduced with pragma Check_Name are suppressed by -gnatp.
4476 2013-04-11 Vincent Celier <celier@adacore.com>
4478 * gnat_ugn.texi, projects.texi: Move chapter "Tools Supporting Project
4479 Files" from projects.texi to gnat_ugn.texi.
4481 2013-04-11 Arnaud Charlet <charlet@adacore.com>
4483 * gcc-interface/Make-lang.in: Update dependencies.
4485 2013-04-11 Yannick Moy <moy@adacore.com>
4487 * gnat1drv.adb (Adjust_Global_Switches): Allow missing body in Alfa
4490 2013-04-11 Hristian Kirtchev <kirtchev@adacore.com>
4492 * exp_ch4.adb (Expand_N_Allocator): Detect the
4493 allocation of an anonymous controlled object where the type of
4494 the context is named. Use the pool and finalization master of
4495 the named access type to allocate the object.
4497 2013-04-11 Vincent Celier <celier@adacore.com>
4499 * gnat_ugn.texi: Remove most mentions of gprbuild.
4500 * projects.texi: Remove all mentions of asociative array
4503 2013-04-11 Robert Dewar <dewar@adacore.com>
4505 * sem_prag.adb, sem_attr.adb, gnat1drv.adb, prj-makr.adb,
4506 opt.ads, sem_ch13.adb: Minor reformatting.
4507 * debug.adb: Minor comment fix (remove junk .I doc).
4509 2013-04-11 Thomas Quinot <quinot@adacore.com>
4511 * rtsfind.ads, exp_dist.adb, exp_dist.ads (Rtsfind.PCS_Version, case
4512 PolyORB): Bump to 6.
4513 (Exp_Dist.PolyORB_Support): Replace TC_Build with
4516 2013-04-11 Arnaud Charlet <charlet@adacore.com>
4518 * debug.adb, sem_prag.adb, par-ch2.adb, sem_attr.adb, gnat1drv.adb,
4519 exp_disp.adb, opt.ads, sem_ch13.adb (Relaxed_RM_Semantics): New flag.
4520 Enable this flag in CodePeer mode, and also via -gnatd.M.
4521 Replace some uses of CodePeer_Mode by Relaxed_RM_Semantics.
4523 2013-04-11 Ed Schonberg <schonberg@adacore.com>
4525 * sem_ch8.adb (Check_Constrained_Object): If a subtype is created
4526 from the renamed object in an object renaming declaration with
4527 an unconstrained nominal subtype, freeze the created subtype at
4528 once, to prevent order of elaboration issues in the backend.
4530 2013-04-11 Arnaud Charlet <charlet@adacore.com>
4532 * exp_aggr.adb (Aggr_Size_OK): Refine setting of Max_Aggr_Size
4533 in particular in CodePeer mode.
4535 2013-04-11 Vincent Celier <celier@adacore.com>
4537 * gnat_ugn.texi: Add documentation for backup copies of project
4540 2013-04-11 Tristan Gingold <gingold@adacore.com>
4542 * gnat_rm.texi: Add Detect_BLocking in the ravenscar profile
4545 2013-04-11 Vincent Celier <celier@adacore.com>
4547 * gnatname.adb (Scan_Args): Recognize new switch --no-backup
4548 (Usage): Add line for --no-backup.
4549 * opt.ads (No_Backup): New Boolean variable, initialized to False.
4550 (Ada_Version_Default): Switch to Ada 2012 by default.
4551 * prj-makr.adb (Initialize): Create a backup for an existing
4552 project file if gnatname is not invoked with --no-backup.
4554 2013-04-11 Thomas Quinot <quinot@adacore.com>
4556 * exp_ch4.adb: Minor code improvement: replace various calls to
4557 Make_If_Statement in expansion with Make_Implicit_If_Statement.
4559 2013-04-11 Eric Botcazou <ebotcazou@adacore.com>
4561 * ali.adb: Fix minor typo.
4563 2013-04-11 Thomas Quinot <quinot@adacore.com>
4565 * exp_ch4.adb (Find_Enclosing_Context): Add missing case of
4566 N_Procedure_Call_Statement.
4568 2013-04-11 Robert Dewar <dewar@adacore.com>
4570 * debug.adb: Minor comment fix.
4572 2013-04-11 Johannes Kanig <kanig@adacore.com>
4574 * debug.adb: Remove comment for -gnatd.G.
4576 2013-04-11 Thomas Quinot <quinot@adacore.com>
4578 * exp_ch4.adb (Expand_Record_Equality.Suitable_Element):
4579 Remove recursive routine, replace with...
4580 (Expand_Record_Equality.Element_To_Compare): New subroutine,
4581 implement iterative search for next element to compare.
4582 Add explanatory comment in the tagged case.
4584 2013-04-11 Ed Schonberg <schonberg@adacore.com>
4586 * sem_ch5.adb: remove spurious warning from non-empty loop.
4587 * sem_ch8.adb (Enclosing_Instance): Make public to other routines
4588 in the package, in order to suppress redundant semantic checks
4589 on subprogram renamings in nested instantiations.
4591 2013-04-11 Robert Dewar <dewar@adacore.com>
4593 * errout.ads: Minor reformatting.
4594 * sem_eval.adb (Why_Not_Static): Now issues continuation messages
4595 (Why_Not_Static): Test for aggregates behind string literals.
4596 * sem_eval.ads (Why_Not_Static): Now issues continuation messages.
4598 2013-04-11 Robert Dewar <dewar@adacore.com>
4600 * exp_ch4.adb (Expand_Concatenation): Wrap expansion in
4601 Expressions_With_Actions.
4603 2013-04-11 Ed Schonberg <schonberg@adacore.com>
4605 * sem_ch6.adb (Base_Types_Match): For an actual type in an
4606 instance, the base type may itself be a subtype, so find true
4607 base type to determine compatibility.
4609 2013-04-11 Robert Dewar <dewar@adacore.com>
4611 * s-osprim-mingw.adb, sem_ch3.adb, sem_prag.adb, sem_util.adb.
4612 makeutl.adb, sem_ch8.adb: Minor reformatting.
4614 2013-04-11 Vincent Celier <celier@adacore.com>
4616 * gnat_ugn.texi: Minor fixes for VMS.
4617 * ug_words: Minor addition: -gnato? => /OVERFLOW_CHECKS=?.
4619 2013-04-11 Robert Dewar <dewar@adacore.com>
4621 * usage.adb (Usage): Minor edit to -gnatW message
4623 2013-04-11 Robert Dewar <dewar@adacore.com>
4625 * exp_aggr.adb (Expand_N_Aggregate): Add circuit for handling
4626 others for string literal case. Also add big ??? comment about
4627 this new code, which should be redundant, but is not.
4628 * sem_eval.adb (Eval_Concatenation): Handle non-static case
4629 properly (Eval_String_Literal): Handle non-static literal properly
4631 2013-03-20 Tobias Burnus <burnus@net-b.de>
4633 * i-fortra.ads: Update comment, add Ada 2012's optional
4634 Star and Kind data types for enhanced interoperability.
4636 2013-03-16 Eric Botcazou <ebotcazou@adacore.com>
4638 * gnatvsn.ads (Library_Version): Bump to 4.9.
4640 2013-03-08 Cesar Strauss <cestrauss@gmail.com>
4643 * seh_init.c (Raise_From_Signal_Handler): Declare as no-return.
4644 (__gnat_SEH_error_handler): Likewise. Remove final return.
4646 2013-03-06 Eric Botcazou <ebotcazou@adacore.com>
4648 * gcc-interface/trans.c (Attribute_to_gnu): Abort instead of erroring
4649 out for an unimplemented attribute.
4651 2013-03-06 Eric Botcazou <ebotcazou@adacore.com>
4653 * gcc-interface/decl.c (gnat_to_gnu_field): Remove the wrapper around
4654 a misaligned integral type if a size is specified for the field.
4656 2013-03-06 Eric Botcazou <ebotcazou@adacore.com>
4658 * gcc-interface/trans.c (Raise_Error_to_gnu) <CE_Index_Check_Failed>:
4659 Record the unpadded type of the index type on the RCI stack.
4661 2013-03-06 Eric Botcazou <ebotcazou@adacore.com>
4663 * gcc-interface/trans.c (emit_range_check): Assert that the range type
4664 is a numerical type and remove useless local variables.
4666 2013-02-25 Eric Botcazou <ebotcazou@adacore.com>
4668 * gcc-interface/ada-tree.h: Back out change accidentally committed.
4670 2013-02-21 Jakub Jelinek <jakub@redhat.com>
4673 * gnat-style.texi (@title): Remove @hfill.
4674 * projects.texi: Avoid line wrapping inside of @pxref or @xref.
4676 2013-02-14 Rainer Emrich <rainer@emrich-ebersheim.de>
4679 * tracebak.c: Cast from pointer via FARPROC.
4681 2013-02-07 Simon Wright <simon@pushface.org>
4684 * init.c (__darwin_major_version): New function for x86-64/Darwin.
4685 (__gnat_adjust_context_for_raise) [Darwin]: Disable the workaround
4686 on Darwin 12 and above.
4688 2013-02-06 Rainer Emrich <rainer@emrich-ebersheim.de>
4691 * adaint.c (__gnat_check_OWNER_ACL): Cast from pointer via
4692 SECURITY_DESCRIPTOR *
4693 (__gnat_set_OWNER_ACL): Cast from DWORD to ACCESS_MODE
4694 (__gnat_portable_spawn): Fix cast to char* const*
4695 (add_handle): Cast from pointer via void **
4696 (add_handle): Cast from pointer via int *
4697 (__gnat_locate_exec_on_path): Cast from pointer via TCHAR *
4698 (__gnat_locate_exec_on_path): Cast from pointer via char *
4699 * initialize.c (append_arg): Cast from pointer via LPWSTR
4700 (__gnat_initialize): Cast from pointer via LPWSTR
4701 * seh_init.c (__gnat_map_SEH): Cast from pointer via FARPROC
4703 2013-02-06 Hristian Kirtchev <kirtchev@adacore.com>
4705 * gcc-interface/Make-lang.in: Enable System.Stack_Checking.Operations
4706 target pairs on VxWorks 5 only.
4708 2013-02-06 Arnaud Charlet <charlet@adacore.com>
4710 * gcc-interface/Make-lang.in: Update dependencies.
4712 2013-02-06 Vincent Celier <celier@adacore.com>
4714 * prj-proc.adb (Process_Aggregated_Projects): Use a new project
4715 node tree for each project tree rooted at an aggregated project.
4717 2013-02-06 Hristian Kirtchev <kirtchev@adacore.com>
4719 * sem_util.adb (Is_Interface_Conversion): New routine.
4720 (Object_Access_Level): Detect an interface conversion
4721 that has been rewritten into a different construct. Use the
4722 original form of the conversion to find the access level of
4725 2013-02-06 Eric Botcazou <ebotcazou@adacore.com>
4727 * einfo.ads (Has_Pragma_No_Inline): New flag using Flag201.
4728 (Has_Pragma_No_Inline): Declare and mark as inline.
4729 (Set_Has_Pragma_No_Inline): Likewise.
4730 * einfo.adb (Has_Pragma_No_Inline): New function.
4731 (Set_Has_Pragma_No_Inline): New procedure.
4732 (Write_Entity_Flags): Handle Has_Pragma_No_Inline.
4733 * snames.ads-tmpl (Name_No_Inline): New pragma-related name.
4734 (Pragma_Id): Add Pragma_No_Inline value.
4735 * par-prag.adb (Prag): Handle Pragma_Inline.
4736 * sem_prag.adb (Inline_Status): New enumeration type.
4737 (Process_Inline): Change Active parameter
4738 to Inline_Status and add support for suppressed inlining.
4739 (Analyze_Pragma) <Pragma_Inline>: Adjust to above change.
4740 <Pragma_Inline_Always>: Likewise.
4741 <Pragma_No_Inline>: Implement new pragma No_Inline.
4742 (Sig_Flags): Add Pragma_No_Inline.
4743 * gnat_rm.texi (Implementation Defined Pragmas): Add No_Inline.
4744 * gnat_ugn.texi (Switches for gcc): Mention Pragma No_Inline.
4746 2013-02-06 Pascal Obry <obry@adacore.com>
4748 * s-osprim-mingw.adb (Clock): Make sure we copy all data locally
4749 to avoid interleaved modifications that could happen from another
4750 task calling Get_Base_Data.
4751 (Get_Base_Data): Make it a critical section. Avoid updating if another
4752 task has already done it.
4754 2013-02-06 Eric Botcazou <ebotcazou@adacore.com>
4756 * sem_prag.adb: Minor reformatting.
4758 2013-02-06 Pascal Obry <obry@adacore.com>
4760 * s-tasloc.ads: Set System.Task_Lock to preelaborate.
4762 2013-02-06 Eric Botcazou <ebotcazou@adacore.com>
4764 * snames.ads-tmpl (Name_Loop_Optimize, Name_No_Unroll,
4765 Name_Unroll, Name_No_Vector, Name_Vector): New pragma-related
4767 (Pragma_Id): Add Pragma_Loop_Optimize value.
4768 * par-prag.adb (Prag): Handle Pragma_Loop_Optimize.
4769 * sem_prag.adb (Check_Loop_Invariant_Variant_Placement): Rename to...
4770 (Check_Loop_Pragma_Placement): ...this.
4772 <Pragma_Loop_Invariant>: Adjust to above renaming.
4773 <Loop_Variant>: Likewise.
4774 <Pragma_Loop_Optimize>: Implement new pragma Loop_Optimize.
4775 (Sig_Flags): Add Pragma_Loop_Optimize.
4776 * gnat_rm.texi (Implementation Defined Pragmas): Add Loop_Optimize.
4777 * gnat_ugn.texi (Vectorization of loops): Mention Loop_Optimize.
4779 2013-02-06 Robert Dewar <dewar@adacore.com>
4781 * osint.ads: Minor fix of typo.
4783 2013-02-06 Sergey Rybin <rybin@adacore.com frybin>
4785 * gnat_ugn.texi: gnatmetric: update the documentation of
4786 complexity metrics for Ada 2012.
4788 2013-02-06 Javier Miranda <miranda@adacore.com>
4790 * exp_disp.adb (Make_Secondary_DT): Code cleanup:
4791 remove useless initialization.
4793 2013-02-06 Ed Schonberg <schonberg@adacore.com>
4795 * sem_ch3.adb (Build_Discriminant_Constraints): Do not
4796 generate overflow checks on a discriminant expression if the
4797 discriminant constraint is applied to a private type that has
4798 a full view, because the check will be applied when the full
4799 view is elaborated. Removing the redundant check is not just
4800 an optimization, but it prevents spurious assembler errors,
4801 because of the way the backend generates names for expressions
4802 that require overflow checking.
4804 2013-02-06 Pascal Obry <obry@adacore.com>
4806 * s-osprim-mingw.adb: Removes workaround for an old GNU/Linker
4807 limitation on Windows.
4817 (Clock): Use variable corresponding to access.
4818 (Get_Base_Time): Likewise.
4819 (Monotonic_Clock): Likewise.
4821 2013-02-06 Vincent Celier <celier@adacore.com>
4823 * make.adb (Gnatmake): When gnatmake is called with a project
4824 file, do not invoke gnatbind with -I-.
4825 * makeutl.adb (Create_Binder_Mapping_File): Rewrite function. Get
4826 the infos from all the sources.
4828 2013-02-06 Ed Schonberg <schonberg@adacore.com>
4830 * snames.ads-tmpl: Add Name_Overriding_Renamings and pragma
4831 Overriding_Renamings.
4832 * par-prag.adb: Recognize pragma Overriding_Renamings.
4833 * opt.ads (Overriding_Renamings): flag to control compatibility
4834 mode with Rational compiler, replaces Rational_Profile flag.
4835 * sem_ch8.adb (Analyze_Subprogram_Renaming): When
4836 Overriding_Renamings is enabled, accept renaming declarations
4837 where the new subprogram renames and overrides a locally inherited
4838 operation. Improve error message for some illegal renamings.
4839 * sem_prag.adb (Analyze_Pragma): Add case for Overriding_Renamings.
4840 (Set_Rational_Profile): The Rational_Profile enables
4841 Overriding_Renamings, Implicit_Packing, and Use_Vads_Size.
4843 2013-02-06 Ed Schonberg <schonberg@adacore.com>
4845 * sem_util.adb: Set parent of copied aggregate component, to
4846 prevent infinite loop.
4848 2013-02-06 Robert Dewar <dewar@adacore.com>
4850 * sem_ch3.adb, sem_ch10.adb: Minor reformatting.
4851 * exp_disp.adb: Minor comment update.
4852 * comperr.ads, osint.ads, rtsfind.adb, sem_prag.adb: Minor addition of
4855 2013-02-06 Thomas Quinot <quinot@adacore.com>
4857 * targparm.ads, sem_ch13.adb (Support_Nondefault_SSO): New target
4858 parameter, defaulted to False for now, indicates targets where
4859 non-default scalar storage order may be specified.
4861 2013-02-06 Thomas Quinot <quinot@adacore.com>
4863 * sprint.adb (Write_Itype): Treat E_Record_Subtype_With_Private
4864 same as E_Record_Subtype. Display E_Class_Wide_Subtype as
4867 2013-02-06 Hristian Kirtchev <kirtchev@adacore.com>
4869 * sem_ch3.adb (Complete_Private_Subtype): Inherit the
4870 Has_Unknown_Discriminants from the full view of the base type.
4872 2013-02-06 Tristan Gingold <gingold@adacore.com>
4874 * raise-gcc.c: Remove useless includes (sys/stat.h, adaint.h)
4875 Enclosing debugging functions within #ifndef inhibit_libc to
4876 support builds without full C headers.
4878 2013-02-06 Thomas Quinot <quinot@adacore.com>
4880 * gnat_rm.texi: Add a minimal example of Scalar_Storage_Order.
4882 2013-02-06 Hristian Kirtchev <kirtchev@adacore.com>
4884 * sem_ch10.adb (Install_Limited_Withed_Unit): Add a missing
4885 check to detect a parent-child relationship between two units in
4886 order to correctly bypass the installation of a limited view. In
4887 other words, the comment on the intended usage of the check was
4888 correct, but the code itself did not reflect the behavior.
4890 2013-02-06 Javier Miranda <miranda@adacore.com>
4892 * exp_ch5.adb (Expand_N_Assignment_Statement): Do not generate the
4893 runtime check on assignment to tagged types if compiling with checks
4896 2013-02-06 Robert Dewar <dewar@adacore.com>
4898 * exp_util.adb, checks.adb, sem_ch12.adb, sem_res.adb, prj-conf.adb,
4899 s-os_lib.adb: Minor reformatting
4901 2013-02-06 Vincent Celier <celier@adacore.com>
4903 * ug_words: Add -gnateY = /IGNORE_STYLE_CHECKS_PRAGMAS.
4905 2013-02-06 Ed Schonberg <schonberg@adacore.com>
4907 * snames.ads-tmpl: Add Name_Rational and pragma Rational.
4908 * par-prag.adb: Recognize pragma Rational.
4909 * opt.ads (Rational_Profile): flag to control compatibility mode
4910 with Rational compiler.
4911 * sem_ch8.adb (Analyze_Subprogram_Renaming): When Rational profile
4912 is enable, accept renaming declarations where the new subprogram
4913 and the renamed entity have the same name.
4914 * sem_prag.adb (analyze_pragma): Add pragma Rational, and recognize
4915 Rational as a profile.
4917 2013-02-06 Hristian Kirtchev <kirtchev@adacore.com>
4919 * exp_ch5.adb (Expand_Loop_Entry_Attributes): When
4920 dealing with a for loop that iterates over a subtype indication
4921 with a range, use the low and high bounds of the subtype.
4923 2013-02-06 Nicolas Roche <roche@adacore.com>
4925 * s-os_lib.adb (Normalize_Arguments): Arguments containing tabs should
4928 2013-02-06 Vincent Celier <celier@adacore.com>
4930 * prj-conf.adb (Process_Project_And_Apply_Config): New variable
4931 Conf_Project. New recursive procedure Check_Project to find a non
4932 aggregate project and put its Project_Id in Conf_Project. Fails if
4933 no such project can be found.
4934 (Get_Or_Create_Configuration_File): New parameter Conf_Project.
4935 (Do_Autoconf): Use project directory of project Conf_Project to store
4936 the generated configuration project file.
4937 * prj-conf.ads (Get_Or_Create_Configuration_File): New parameter
4940 2013-02-06 Javier Miranda <miranda@adacore.com>
4942 * sem_res.adb (Resolve_Actuals): Generate a read
4943 reference for out-mode parameters in the cases specified by
4946 2013-02-06 Hristian Kirtchev <kirtchev@adacore.com>
4948 * sem_attr.adb (Resolve_Attribute): Do not resolve the prefix of
4949 Loop_Entry, instead wait until the attribute has been expanded. The
4950 delay ensures that any generated checks or temporaries are inserted
4951 before the relocated prefix.
4953 2013-02-06 Ed Schonberg <schonberg@adacore.com>
4955 * sem_ch12.adb: Code clean up.
4957 2013-02-06 Ed Schonberg <schonberg@adacore.com>
4959 * checks.adb (Apply_Discriminant_Check): Look for discriminant
4960 constraint in full view of private type when needed.
4961 * sem_ch12.adb (Validate_Array_Type_Instance): Specialize
4962 previous patch to components types that are private and without
4965 2013-02-06 Hristian Kirtchev <kirtchev@adacore.com>
4967 * exp_ch4.adb (Find_Enclosing_Context): Recognize
4968 a simple return statement as one of the cases that require special
4969 processing with respect to temporary controlled function results.
4970 (Process_Transient_Object): Do attempt to finalize a temporary
4971 controlled function result when the associated context is
4972 a simple return statement. Instead, leave this task to the
4973 general finalization mechanism.
4975 2013-02-06 Thomas Quinot <quinot@adacore.com>
4977 * einfo.ads: Minor reformatting.
4978 (Status_Flag_Or_Transient_Decl): Add ??? comment.
4980 2013-02-06 Hristian Kirtchev <kirtchev@adacore.com>
4982 * exp_ch4.adb (Expand_N_Expression_With_Actions): Rewritten. This
4983 routine should be able to properly detect controlled transient
4984 objects in its actions and generate the appropriate finalization
4986 * exp_ch6.adb (Enclosing_Context): Removed.
4987 (Expand_Ctrl_Function_Call): Remove local subprogram and
4988 constant. Use routine Within_Case_Or_If_Expression to determine
4989 whether the lifetime of the function result must be extended to
4990 match that of the context.
4991 * exp_util.ads, exp_util.adb (Within_Case_Or_If_Expression): New
4994 2013-02-06 Ed Schonberg <schonberg@adacore.com>
4996 * sem_ch12.adb (Validate_Array_Type_Instance): Extend check
4997 for subtype matching of component type of formal array type,
4998 to avoid spurious error when component type is a separate actual
4999 in the instance, and there may be a discrepancy between private
5000 and full view of component type.
5002 2013-02-06 Robert Dewar <dewar@adacore.com>
5004 * s-dim.ads, clean.adb: Minor reformatting.
5006 2013-02-06 Javier Miranda <miranda@adacore.com>
5008 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Undo previous patch.
5009 (Can_Split_Unconstrained_Function): Only split the inlined function if
5010 the compiler generates the code of its body.
5012 2013-02-06 Robert Dewar <dewar@adacore.com>
5014 * exp_prag.adb, sem_ch3.adb, exp_attr.adb, sem_prag.adb, sem_ch6.adb,
5015 exp_intr.adb, exp_dist.adb, sem_ch13.adb: Internal clean up for
5018 2013-02-06 Robert Dewar <dewar@adacore.com>
5020 * gnat_rm.texi: Minor text updates for pragma Warning.
5022 2013-02-06 Geert Bosch <bosch@adacore.com>
5024 * s-multip.adb (Number_Of_CPUs): Short-circuit in case of
5027 2013-02-06 Vincent Celier <celier@adacore.com>
5029 * clean.adb (Delete): On VMS use host notation to delete all files.
5031 2013-02-06 Robert Dewar <dewar@adacore.com>
5033 * sem_prag.adb, sem_ch6.adb, prj-conf.adb, erroutc.adb: Minor
5036 2013-02-06 Gary Dismukes <dismukes@adacore.com>
5038 * sem_ch6.adb (Check_For_Primitive_Subprogram): Test for
5039 the special case of a user-defined equality that overrides
5040 the predefined equality of a nonderived type declared in a
5042 * sem_util.adb (Collect_Primitive_Operations): Add test for
5043 Is_Primitive when looping over the subprograms following a type,
5044 to catch the case of primitives such as a user-defined equality,
5045 which otherwise won't be found when the type is not a derived
5046 type and is declared in a declarative part.
5048 2013-02-06 Vincent Celier <celier@adacore.com>
5050 * prj-conf.adb (Check_Target): Always return True when Target
5051 is empty (Get_Or_Create_Configuration_File.Get_Project_Target):
5052 New procedure to get the value of attribute Target in the main
5054 (Get_Or_Create_Configuration_File.Do_Autoconf): No
5055 need to get the value of attribute Target in the main project.
5056 (Get_Or_Create_Configuration_File): Call Get_Project_Target and
5057 use the target fom this call.
5059 2013-02-06 Eric Botcazou <ebotcazou@adacore.com>
5061 * erroutc.adb (Validate_Specific_Warning): Do not issue the
5062 warning about an ineffective Pragma Warnings for -Wxxx warnings.
5063 * sem_prag.adb (Analyze_Pragma) <Warnings>: Accept -Wxxx warnings.
5064 * gnat_rm.texi (Pragma Warnings): Document coordination with
5065 warnings of the GCC back-end.
5067 2013-02-06 Javier Miranda <miranda@adacore.com>
5069 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Do not build the body
5070 of an inlined function if we do not generate code for the function.
5072 2013-02-06 Pascal Obry <obry@adacore.com>
5074 * s-os_lib.adb (Locate_Exec_On_Path): Call Normalize_Pathname
5075 with Resolve_Links set to False.
5077 2013-02-03 Eric Botcazou <ebotcazou@adacore.com>
5079 * gcc-interface/decl.c: Include diagnostic-core.h.
5080 (gnat_to_gnu_entity) <E_Array_Type>: Sorry if Reverse_Storage_Order
5081 is set on the entity.
5082 <E_Record_Type>: Likewise.
5083 * gcc-interface/Make-lang.in (ada/decl.o): Add $(DIAGNOSTIC_CORE_H).
5085 2013-01-29 Ben Brosgol <brosgol@adacore.com>
5087 * gnat_rm.texi: Fixed typos. Minor edits.
5089 2013-01-29 Bob Duff <duff@adacore.com>
5091 * a-convec.adb: Minor reformatting.
5093 2013-01-29 Pascal Obry <obry@adacore.com>
5095 * tempdir.adb, tempdir.ads (Use_Temp_Dir): Set wether to use the temp
5098 2013-01-29 Ed Schonberg <schonberg@adacore.com>
5100 * exp_ch5.adb (Expand_Iterator_Loop_Over_Array): Preserve loop
5101 identifier only if it comes from source.
5102 (Expand_N_Loop_Statement): If the domain of iteration is an
5103 enumeration type with a representation clause, remove from
5104 visibility the loop identifier before rewriting the loop as a
5105 block with a declaration for said identifier.
5106 * sem_util.adb (Remove_Homonym): Handle properly the default case.
5108 2013-01-29 Vincent Celier <celier@adacore.com>
5110 * prj-proc.adb: Minor comment spelling fix.
5112 2013-01-29 Pascal Obry <obry@adacore.com>
5114 * prj-proc.adb (Process_Expression_Variable_Decl): Prepend
5115 Project_Path to current environment.
5117 2013-01-29 Thomas Quinot <quinot@adacore.com>
5119 * sprint.adb (Sprint_Node_Actual): Output freeze nodes for
5120 itypes even if Dump_Freeze_Null is not set.
5122 2013-01-29 Robert Dewar <dewar@adacore.com>
5124 * sem_util.adb: Minor reformatting.
5125 * s-rident.ads: Minor comment fixes.
5127 2013-01-29 Pascal Obry <obry@adacore.com>
5129 * prj-env.ads, prj-env.adb (Add_Directories): Add parameter to
5130 control if the path is prepended or appended.
5132 2013-01-29 Ed Schonberg <schonberg@adacore.com>
5134 * sem_ch6.adb (Analyze_Expression_Function): An expression
5135 function declaration is not a subprogram declaration, and thus
5136 cannot appear in a protected definition.
5138 2013-01-29 Hristian Kirtchev <kirtchev@adacore.com>
5140 * exp_util.adb (Insert_Actions): When new
5141 actions come from the expression of the expression with actions,
5142 then they must be added to the list of existing actions.
5144 2013-01-29 Eric Botcazou <ebotcazou@adacore.com>
5146 * sem_ch3.adb (Analyze_Subtype_Declaration) <Private_Kind>: For
5147 the subtype of a constrained private type with discriminants
5148 that has got a full view, show that the completion is a clone
5151 2013-01-29 Javier Miranda <miranda@adacore.com>
5153 * errout.ads, errout.adb (Get_Ignore_Errors): New subprogram.
5154 * opt.ads (Warn_On_Overlap): Update documentation.
5155 * sem_aggr.adb (Resolve_Aggregate, Resolve_Extension_Aggregate):
5156 Check function writable actuals.
5157 * sem_ch3.adb (Build_Derived_Record_Type,
5158 Record_Type_Declaration): Check function writable actuals.
5159 * sem_ch4.adb (Analyze_Range): Check function writable actuals.
5160 * sem_ch5.adb (Analyze_Assignment): Remove code of the initial
5161 implementation of AI05-0144.
5162 * sem_ch6.adb (Analyze_Function_Return,
5163 (Analyze_Procedure_Call.Analyze_Call_And_Resolve): Remove code
5164 of the initial implementation of AI05-0144.
5165 * sem_res.adb (Resolve): Remove code of the initial implementation.
5166 (Resolve_Actuals): Call Check_Function_Writable_Actuals and remove call
5167 of the initial implementation.
5168 (Resolve_Arithmetic_Op, Resolve_Logical_Op,
5169 Resolve_Membership_Op): Check function writable actuals.
5170 * sem_util.ad[sb] (Actuals_In_Call): Removed
5171 (Check_Order_Dependence): Removed (Save_Actual): Removed
5172 (Check_Function_Writable_Actuals): New subprogram.
5173 * usage.adb (Usage): Update documentation.
5174 * warnsw.adb (Set_Warning_Switch): Enable warn_on_overlap when
5175 setting all warnings.
5177 2013-01-29 Robert Dewar <dewar@adacore.com>
5179 * a-calend-vms.adb: Minor comment fix.
5181 2013-01-29 Robert Dewar <dewar@adacore.com>
5183 * mlib-utl.adb, gnatlink.adb: Avoid reference to ASCII.Back_Slash
5184 because of casing issues.
5185 * sem_util.ads: Minor comment fix.
5186 * style.adb (Check_Identifier): Set proper casing for entities
5188 * styleg.adb: Minor comment improvement.
5189 * stylesw.ads (Style_Check_Standard): Fix bad comments.
5191 2013-01-29 Hristian Kirtchev <kirtchev@adacore.com>
5193 * sem_prag.adb: Add the grammar for pragmas Abstract_State and Global.
5194 (Analyze_Pragma): Push the scope of the related subprogram and install
5195 its formals once before starting the analysis of the [moded] global
5198 2013-01-29 Pascal Obry <obry@adacore.com>
5200 * prj-proc.adb (Process_Expression_Variable_Decl): Always handle
5201 relative paths in Project_Path as relative to the aggregate
5202 project location. Note that this was what was documented.
5204 2013-01-29 Vincent Celier <celier@adacore.com>
5206 * gnatcmd.adb: For "gnat stub -P ...", do not check the naming
5207 scheme for Ada, when Ada is not a language for the project.
5209 2013-01-29 Ed Schonberg <schonberg@adacore.com>
5211 * sem_ch3.adb (Analyze_Subtype_Declaration): Inherit
5212 Is_Generic_Actual_Type flag in a nested instance.
5213 * sem_ch12.adb (Restore_Private_Views): Preserve
5214 Is_Generic_Actual_Type flag if actual is a Generic_Actual_Type
5215 of an enclosing instance.
5216 * sem_util.adb (Corresponding_Generic_Type): Handle generic actual
5217 which is an actual of an enclosing instance.
5218 * sem_type.adb (Real_Actual): If a generic_actual_type is the
5219 formal of an enclosing generic and thus renames the corresponding
5220 actual, use the actual of the enclosing instance to resolve
5221 spurious ambiguities in instantiations when two formals are
5222 instantiated with the same actual.
5224 2013-01-29 Robert Dewar <dewar@adacore.com>
5226 * gnat_rm.texi: Document all Ada 2005 and Ada 2012 pragmas as
5227 being available as implementation-defined pragmas in earlier
5230 2013-01-29 Vincent Celier <celier@adacore.com>
5232 * clean.adb (Delete): On VMS, delete all versions of the file.
5234 2013-01-29 Robert Dewar <dewar@adacore.com>
5236 * par-ch6.adb (No_Constraint_Maybe_Expr_Func): New procedure.
5237 * par-util.adb (No_Constraint): Undo special handling, moved
5240 2013-01-29 Robert Dewar <dewar@adacore.com>
5242 * aspects.ads: Aspect Warnings is implementation defined Add
5243 some other missing entries to impl-defined list Mark Warnings
5244 as GNAT pragma in main list.
5245 * sem_ch8.adb: Process aspects for all cases of renaming
5248 2013-01-29 Robert Dewar <dewar@adacore.com>
5250 * sem_ch6.adb (Analyze_Function_Call): Set In_Assertion flag.
5251 * sem_elab.adb (Check_Internal_Call_Continue): Do not issue
5252 warnings about possible elaboration error if call is within
5254 * sinfo.ads, sinfo.adb (In_Assertion): New flag in N_Function_Call node.
5256 2013-01-29 Robert Dewar <dewar@adacore.com>
5258 * a-calend-vms.adb, g-eacodu-vms.adb, g-trasym-vms-alpha.adb,
5259 * s-auxdec-vms-ia64.adb, s-mastop-vms.adb, s-osprim-vms.adb,
5260 s-tasdeb-vms.adb: Replace pragma Interface by pragma Import.
5262 2013-01-29 Robert Dewar <dewar@adacore.com>
5264 * opt.ads (Ignore_Style_Checks_Pragmas): New flag.
5265 * par-prag.adb (Par, case Style_Checks): Recognize
5266 Ignore_Style_Checks_Pragmas.
5267 * sem_prag.adb (Analyze_Pragma, case Style_Checks): Recognize
5268 Ignore_Style_Checks_Pragmas.
5269 * switch-c.adb: Recognize -gnateY switch.
5270 * usage.adb: Add documentation for "-gnateY".
5271 * vms_data.ads: Add IGNORE_STYLE_CHECKS_PRAGMAS (-gnateY).
5273 2013-01-29 Vincent Celier <celier@adacore.com>
5275 * clean.adb (Clean_Executables): Add Sid component when calling
5277 * make.adb: When inserting in the Queue, add the Source_Id
5278 (Sid) when it is known (Start_Compile_If_Possible): When the
5279 Source_Id is known (Sid), get the path name of the ALI file
5280 (Full_Lib_File) from it, to avoid finding old ALI files in other
5282 * makeutl.ads (Source_Info): New Source_Id component Sid in
5283 Format_Gnatmake variant.
5285 2013-01-29 Robert Dewar <dewar@adacore.com>
5287 * gnat_ugn.texi: Document -gnateY.
5289 2013-01-29 Doug Rupp <rupp@adacore.com>
5291 * s-osinte-vms.ads, s-taprop-vms.adb, system-vms_64.ads,
5292 system-vms-ia64.ads: Replace pragma Interface by pragma Import.
5294 2013-01-29 Robert Dewar <dewar@adacore.com>
5296 * atree.ads, atree.adb (Node30): New function.
5297 (Set_Node30): New procedure.
5298 (Num_Extension_Nodes): Change to 5 (activate new fields/flags).
5299 * atree.h: Add macros for Field30 and Node30.
5300 * einfo.ads, einfo.adb: Move some fields to avoid duplexing.
5301 * treepr.adb (Print_Entity_Information): Print fields 30-35.
5303 2013-01-29 Robert Dewar <dewar@adacore.com>
5305 * sem_prag.adb (Analyze_Pragma, case Interface): Consider to
5306 be a violation of No_Obsolescent_Features even in Ada 95. Also
5307 generates a warning in -gnatwj mode.
5308 (Analyze_Pragma, case Interface_Name): Generates a warning in -gnatwj
5310 * gnat_ugn.texi: Additional documentation on -gnatwj and pragma
5313 2013-01-29 Vincent Celier <celier@adacore.com>
5315 * snames.ads-tmpl: Add new standard name Trailing_Switches.
5317 2013-01-29 Ed Schonberg <schonberg@adacore.com>
5319 * sem_disp.adb (Check_Controlling_Type): If a designated type T
5320 of an anonymous access type is a limited view of a tagged type,
5321 it can be a controlling type only if the subprogram is in the
5324 2013-01-29 Vincent Celier <celier@adacore.com>
5326 * gnatcmd.adb: Use the project where the config pragmas file is
5327 declared to get its path.
5329 2013-01-29 Vincent Celier <celier@adacore.com>
5331 * prj-attr.adb: New attribute Linker'Trailing_Switches.
5333 2013-01-22 Eric Botcazou <ebotcazou@adacore.com>
5335 * gcc-interface/trans.c (gnat_to_gnu) <N_Expression_With_Actions>: Do
5336 not translate the Etype of the node before translating the Actions.
5338 2013-01-22 Eric Botcazou <ebotcazou@adacore.com>
5340 * gcc-interface/trans.c (Pragma_to_gnu) <Name_Space>: Use optimize_size
5341 instead of optimize and adjust warning message.
5342 (Compilation_Unit_to_gnu): Process pragmas preceding the unit.
5344 2013-01-22 Tristan Gingold <gingold@adacore.com>
5346 * gcc-interface/gigi.h (ADT_unhandled_except_decl,
5347 ADT_unhandled_others_decl): New.
5348 (unhandled_others_decl, unhandled_except_decl): Define.
5349 * gcc-interface/trans.c: Include common/common-target.h.
5350 (gigi): Initialize them.
5351 (Subprogram_Body_to_gnu): On SEH targets, wrap the body of the main
5352 function in a try/catch clause.
5354 2013-01-11 Eric Botcazou <ebotcazou@adacore.com>
5356 * gcc-interface/Make-lang.in (COMMON_ADAFLAGS): Remove -gnata.
5357 (CHECKING_ADAFLAGS): New.
5358 (ALL_ADAFLAGS): Include CHECKING_ADAFLAGS.
5360 2013-01-10 Eric Botcazou <ebotcazou@adacore.com>
5362 * gcc-interface/config-lang.in (boot_language_boot_flags): Delete.
5363 * gcc-interface/Make-lang.in (BOOT_ADAFLAGS): Likewise.
5365 2013-01-07 Eric Botcazou <ebotcazou@adacore.com>
5367 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Record_Type>: Adjust
5368 comment about type extension with discriminants.
5369 <E_Record_Subtype>: Remove useless test and reorder conditions.
5370 (elaborate_entity) <E_Record_Subtype>: Likewise.
5372 2013-01-07 Richard Biener <rguenther@suse.de>
5375 * gcc-interface/Make-lang.in (ada.install-common): Always apply
5376 program_transform_name.
5378 2013-01-06 Eric Botcazou <ebotcazou@adacore.com>
5380 * gnatvsn.ads (Current_Year): Bump to 2013.
5382 2013-01-06 Olivier Hainque <hainque@adacore.com>
5384 * gcc-interface/decl.c (gnat_to_gnu_field): Emit a specialized
5385 diagnostic for component size mismatch wrt volatile requirements.
5386 Add a gcc_unreachable() at the end of the checks for size. Split
5387 the check on volatile for positions into one check on atomic and
5388 a subsequent one on volatile.
5390 2013-01-06 Eric Botcazou <ebotcazou@adacore.com>
5392 * gcc-interface/decl.c (elaborate_entity) <E_Record_Type>: Delete.
5394 2013-01-06 Eric Botcazou <ebotcazou@adacore.com>
5396 * gcc-interface/decl.c (gnat_to_gnu_entity) <discrete_type>: Do not
5397 pack the field of the record type made for a misaligned type.
5399 2013-01-06 Eric Botcazou <ebotcazou@adacore.com>
5401 * gcc-interface/decl.c (annotate_value) <COMPONENT_REF>: Be prepared
5402 for discriminants inherited from parent record types.
5404 2013-01-04 Robert Dewar <dewar@adacore.com>
5406 * warnsw.adb: Minor fixes to -gnatw.d handling.
5408 2013-01-04 Robert Dewar <dewar@adacore.com>
5410 * einfo.adb, atree.adb: Enlarge entities to make 63 more flags, 6 more
5413 2013-01-04 Joel Brobecker <brobecker@adacore.com>
5415 * gnat_ugn.texi: Fix typo.
5417 2013-01-04 Robert Dewar <dewar@adacore.com>
5419 * gnat_rm.texi: Document alignment choice for subtypes.
5421 2013-01-04 Robert Dewar <dewar@adacore.com>
5423 * validsw.ads: Minor fix to comment.
5425 2013-01-04 Doug Rupp <rupp@adacore.com>
5427 * Makefile.rtl (GNATRTL_NONTASKING_OBJS,
5428 GNATRTL_ALTIVEC_OBJS): Factor g-al* objects.
5429 * gcc-interface/Makefile.in (ADA_EXCLUDE_SRCS): Add g-al* sources.
5430 (GNATRTL_ALTIVEC_OBJS): Override to null for VMS.
5431 Rename leon vxworks toolchain as leon-wrs-vxworks.
5432 * gcc-interface/Make-lang.in: Update dependencies
5434 2013-01-04 Pascal Obry <obry@adacore.com>
5436 * prj.ads (For_Each_Source): Add Locally_Removed parameter.
5437 (Source_Iterator): Add Locally_Removed field.
5438 * prj.adb (For_Each_Source): Ignore Locally_Removed files if needed.
5441 2013-01-04 Robert Dewar <dewar@adacore.com>
5443 * exp_attr.adb: Minor reformatting.
5445 2013-01-04 Robert Dewar <dewar@adacore.com>
5447 * checks.adb (Insert_Valid_Check): Fix handling of renamed
5448 packed array element.
5449 * exp_ch4.adb (Expand_Concatenate): Fix some missing parent
5450 fields in generated code.
5451 * exp_util.adb (Side_Effect_Free): Improve detection of cases
5454 2013-01-04 Robert Dewar <dewar@adacore.com>
5456 * sinfo.ads: Clean up order of N_xxx subtypes
5458 2013-01-04 Vincent Celier <celier@adacore.com>
5460 * prj-conf.adb (Check_Target): Allow --autoconf= with no target.
5462 2013-01-04 Robert Dewar <dewar@adacore.com>
5464 * types.ads, prj-conf.adb, par-tchk.adb: Minor reformatting.
5466 2013-01-04 Robert Dewar <dewar@adacore.com>
5468 * par-ch6.adb (P_Subprogram): Better handling of missing IS
5469 after expression function.
5470 * par-util.adb (No_Constraint): Improve handling to avoid bad warnings.
5472 2013-01-04 Robert Dewar <dewar@adacore.com>
5474 * exp_util.ads, exp_util.adb (Insert_Actions): In expression with
5475 actions case, new actions are appended to the sequence rather than
5478 2013-01-04 Robert Dewar <dewar@adacore.com>
5480 * gnat_ugn.texi: Document -gnatw.d/w.D (does no apply in VMS mode).
5481 * usage.adb: Add lines for -gnatw.d/w.D switches.
5482 * warnsw.adb: Minor fixes (some missing cases of setting
5483 Warning_Doc_Switch). Reject -gnatw.d and -gnatw.D in VMS mode.
5485 2013-01-04 Robert Dewar <dewar@adacore.com>
5487 * exp_util.adb (Remove_Side_Effects): Make sure scope suppress
5488 is restored on exit.
5490 2013-01-04 Robert Dewar <dewar@adacore.com>
5492 * usage.adb: Document -gnateF (check overflow for predefined Float).
5494 2013-01-04 Robert Dewar <dewar@adacore.com>
5496 * sem_res.adb (Resolve_Type_Conversion): Remove incorrect
5497 prevention of call to Apply_Type_Conversion_Checks, which resulted
5498 in missing check flags in formal mode.
5500 2013-01-04 Vincent Celier <celier@adacore.com>
5502 * makeutl.ads (Db_Switch_Args): New table used by gprbuild.
5503 * prj-conf.adb (Check_Builder_Switches): Check for switches
5504 --config= (Get_Db_Switches): New procedure to get the --db
5505 switches so that they are used when invoking gprconfig in
5507 (Do_Autoconf): When invoking gprconfig, use the --db switches, if any.
5509 2013-01-04 Pascal Obry <obry@adacore.com>
5511 * prj-nmsc.adb: Minor reformatting.
5513 2013-01-04 Vincent Celier <celier@adacore.com>
5515 * makeutl.ads (Root_Environment): New variable, moved rom
5516 gprbuild (Load_Standard_Base): New Boolean variable, moved
5518 * prj-conf.adb (Check_Builder_Switches): New procedure to check
5519 for switch --RTS in package Builder. If a runtime specified
5520 by --RTS is a relative path name, but not a base name, then
5521 find the path on the Project Search Path.
5522 (Do_Autoconf): Call Check_Builder_Switches.
5523 (Locate_Runtime): New procedure, moved from gprbuild, to get the
5524 absolute paths of runtimes when they are not specified as a base name.
5525 * prj-conf.ads (Locate_Runtime): New procedure, moved from gprbuild.
5527 2013-01-04 Ed Schonberg <schonberg@adacore.com>
5529 * sem_ch3.adb (Build_Private_Derived_Type): Set
5530 Has_Private_Ancestor on type derived from an untagged private
5531 type whose full view has discriminants
5532 * sem_aggr.adb (Resolve_Record_Aggregate): Reject non-extension
5533 aggregate for untagged record type with private ancestor.
5535 2013-01-04 Thomas Quinot <quinot@adacore.com>
5537 * sem_elab.adb, sem_ch3.adb: Minor reformatting.
5539 2013-01-04 Robert Dewar <dewar@adacore.com>
5541 * table.adb: Minor reformatting.
5543 2013-01-04 Ed Schonberg <schonberg@adacore.com>
5545 * sem_ch10.adb (Check_Redundant_Withs): A with_clause that does
5546 not come from source does not generate a warning for redundant
5549 2013-01-04 Hristian Kirtchev <kirtchev@adacore.com>
5551 * aspects.adb, aspects.ads: Add Aspect_Global to all relevant tables.
5552 * par-prag.adb: Add pragma Global to the list of pragmas that
5553 do not need special processing by the parser.
5554 * sem_ch13.adb (Analyze_Aspect_Specifications): Convert aspect
5555 Global into a pragma without any form of legality checks. The
5556 work is done by Analyze_Pragma. The aspect and pragma are both
5557 marked as needing delayed processing. Insert the corresponding
5558 pragma of aspect Abstract_State in the visible declarations of the
5560 (Check_Aspect_At_Freeze_Point): Aspect Global
5561 does not need processing even though it is marked as delayed.
5562 Alphabetize the list on aspect names.
5563 * sem_prag.adb: Add a value for pragma Global in table Sig_Flags.
5564 (Analyze_Pragma): Add ??? comment about the grammar of pragma
5565 Abstract_State. Move the error location from the pragma to the
5566 state to improve the quality of error placement. Add legality
5567 checks for pragma Global.
5568 * snames.ads-tmpl Add the following specially recognized names
5570 2013-01-04 Eric Botcazou <ebotcazou@adacore.com>
5572 * sem_ch3.adb: Fix minor typo.
5574 2013-01-04 Ed Schonberg <schonberg@adacore.com>
5576 * par-ch13.adb (Aspect_Specifications_Present): In Strict mode,
5577 accept an aspect name followed by a comma, indicating a defaulted
5580 2013-01-04 Joel Brobecker <brobecker@adacore.com brobecker>
5582 * gnat_ugn.texi: Document procedure to codesign GDB on Darwin.
5583 Update doc on gnattest --separates switch.
5585 2013-01-04 Thomas Quinot <quinot@adacore.com>
5587 * s-chepoo.ads: Minor reformatting.
5589 2013-01-04 Arnaud Charlet <charlet@adacore.com>
5591 * usage.adb: Remove mention of -gnatN in usage.
5593 2013-01-04 Robert Dewar <dewar@adacore.com>
5595 * exp_prag.adb, gnatcmd.adb, exp_util.adb, table.adb, sem_prag.adb,
5596 freeze.adb, sem_ch4.adb, sem_warn.adb, opt.ads, exp_aggr.adb,
5597 prj-conf.adb, sem_ch13.adb: Minor reformatting.
5599 2013-01-04 Thomas Quinot <quinot@adacore.com>
5601 * sinfo.ads: Minor documentation update.
5603 2013-01-04 Thomas Quinot <quinot@adacore.com>
5605 * sem_ch3.adb, einfo.adb (Analyze_Object_Declaration): Do not set Ekind
5606 before resolving initialization expression.
5608 2013-01-04 Hristian Kirtchev <kirtchev@adacore.com>
5610 * checks.adb (Generate_Index_Checks): Delay the generation of
5611 the check for an indexed component where the prefix mentions
5612 Loop_Entry until the attribute has been properly expanded.
5613 * exp_ch5.adb (Expand_Loop_Entry_Attributes): Perform minor
5614 decoration of the constant that captures the value of Loop_Entry's
5615 prefix at the entry point into a loop. Generate index checks
5616 for an attribute reference that has been transformed into an
5619 2013-01-04 Thomas Quinot <quinot@adacore.com>
5621 * exp_prag.adb, exp_util.adb, exp_util.ads, freeze.adb, exp_aggr.adb,
5622 sem_ch13.adb (Exp_Aggr.Collect_Initialization_Statements): Nothing to
5623 do if Obj is already frozen.
5624 (Exp_Util.Find_Init_Call): Rename to...
5625 (Exp_Util.Remove_Init_Call): New subprogram, renamed from
5626 Find_Init_Call. Remove the initialization call from the enclosing
5627 list if found, and if it is from an Initialization_Statements
5628 attribute, reset it.
5629 (Exp_Util.Append_Freeze_Action): Minor code reorganization.
5630 (Exp_Util.Append_Freeze_Actions): Ensure a freeze node has been
5631 allocated (as is already done in Append_Freeze_Action).
5632 (Freeze.Freeze_Entity): For an object with captured
5633 Initialization_Statements and non-delayed freezeing, unwrap the
5634 initialization statements and insert and them directly in the
5636 (Sem_Ch13.Check_Address_Clause): For an object
5637 with Initialization_Statements and an address clause, unwrap the
5638 initialization statements when moving them to the freeze actions.
5640 2013-01-03 Pascal Obry <obry@adacore.com>
5642 * prj-attr.adb, projects.texi, snames.ads-tmpl: Add package remote and
5643 corresponding attibutes.
5645 2013-01-03 Thomas Quinot <quinot@adacore.com>
5647 * exp_aggr.adb: Minor comment improvement.
5649 2013-01-03 Hristian Kirtchev <kirtchev@adacore.com>
5651 * aspects.adb, aspects.ads: Add Aspect_Abstract_State to all the
5653 * einfo.ads, einfo.adb: Add Integrity_Level and Refined_State to
5654 the description of fields (Abstract_States): New routine.
5655 (Integrity_Level): New routine.
5656 (Has_Property): New routine.
5657 (Is_Input_State): New routine.
5658 (Is_Null_State): New routine.
5659 (Is_Output_State): New routine.
5660 (Is_Volatile_State): New routine.
5661 (Refined_State): New routine.
5662 (Set_Abstract_States): New routine.
5663 (Set_Integrity_Level): New routine.
5664 (Set_Refined_State): New routine.
5665 (Write_Field8_Name): Add proper output for E_Abstract_State.
5666 (Write_Field9_Name): Add proper output for E_Abstract_State.
5667 (Write_Field25_Name): Add proper output for E_Package.
5668 * lib-xref.ads: Add new letter for an abstract state.
5669 * par-prag.adb: Add pragma Abstract_State to the list of pragma
5670 that do not need special processing by the parser.
5671 * sem_ch13.adb (Analyze_Aspect_Specifications): Convert
5672 aspect Abstract_State into a pragma without any form
5673 of legality checks. The work is done by Analyze_Pragma.
5674 (Check_Aspect_At_Freeze_Point): Aspect Abstract_State does not
5675 require delayed analysis.
5676 * sem_prag.adb: Add a value for pragma Abstract_State in table
5678 (Analyze_Pragma): Add legality checks for pragma
5679 Abstract_State. Analysis of individual states introduces a state
5680 abstraction entity into the visibility chain.
5681 * snames.ads-tmpl: Add new names for abstract state and
5682 integrity. Add new pragma id for abstract state.
5684 2013-01-03 Bob Duff <duff@adacore.com>
5686 * table.adb (Reallocate): Calculate new Length in
5687 Long_Integer to avoid overflow.
5689 2013-01-03 Thomas Quinot <quinot@adacore.com>
5691 * sem_ch3.adb, sinfo.ads, freeze.adb, sem_ch4.adb, exp_aggr.adb
5692 (Sem_Ch3.Analyze_Object_Declaration): Set Ekind early so that
5693 it is set properly when expanding the initialization expression.
5694 (Freeze.Check_Address_Clause): Transfer initialization expression
5695 to an assignment in the freeze actions, so that the object is
5696 initialized only after being elaborated by GIGI.
5697 (Sinfo (comments), Sem_Ch4.Analyze_Expression_With_Actions): Allow
5698 a Null_Statement as the expression in an Expression_With_Actions.
5699 (Exp_Aggr.Collect_Initialization_Statements): New subprogram
5700 shared by expansion of record and array aggregates, used to
5701 capture statements for an aggregate used to initalize an object
5702 into an Expression_With_Actions (which acts as a container for
5704 (Exp_Aggr.Convert_Aggr_In_Obj_Decl): Use the above to
5705 capture initialization statements, instead of the previously
5706 existing loop which left freeze nodes out of the capturing
5707 construct (causing out of order elaboration crashes in GIGI).
5708 (Exp_Aggr.Expand_Array_Aggregate): Use the above to capture
5709 initialization statements (this was previously not done for
5710 arrays). Also do not unconditionally prevent in place expansion
5711 for an object with address clause.
5713 2013-01-03 Thomas Quinot <quinot@adacore.com>
5715 * gnat_rm.texi, freeze.adb (Check_Component_Storage_Order): Check that
5716 a record extension has the same scalar storage order as the parent type.
5718 2013-01-03 Thomas Quinot <quinot@adacore.com>
5720 * exp_ch4.adb: Add comment.
5722 2013-01-03 Vincent Celier <celier@adacore.com>
5724 * prj.adb: Minor spelling error correction in comment.
5726 2013-01-03 Vincent Celier <celier@adacore.com>
5728 * gnatcmd.adb (GNATCmd): If a single main has been specified
5729 as an absolute path, use its simple file name to find specific
5730 switches, instead of the absolute path.
5732 2013-01-03 Javier Miranda <miranda@adacore.com>
5734 * sem_warn.adb (Warn_On_Overlapping_Actuals): For overlapping
5735 parameters that are record types or array types generate warnings
5736 only compiling under -gnatw.i
5737 * opt.ads (Extensions_Allowed): Restore previous documentation.
5739 2013-01-03 Vincent Celier <celier@adacore.com>
5741 * prj-conf.adb (Do_Autoconf): If Target is specified in the
5742 main project, but not on the command line, use the Target in
5743 the project to invoke gprconfig in auto-configuration.
5744 * makeutl.ads (Default_Config_Name): New constant String.
5746 2013-01-03 Arnaud Charlet <charlet@adacore.com>
5748 * usage.adb: Minor: fix typo in usage.
5750 2013-01-03 Thomas Quinot <quinot@adacore.com>
5752 * sem_ch13.adb (Analyze_Record_Representation_Clause): Reject
5753 an illegal component clause for an inherited component in a
5756 2013-01-03 Emmanuel Briot <briot@adacore.com>
5758 * xref_lib.adb (Parse_Identifier_Info): Fix handling of arrays, which
5759 have information in the ALI file for both the index and the component
5762 2013-01-03 Emmanuel Briot <briot@adacore.com>
5764 * projects.texi: Fix error in documenting the project path
5765 computed for an aggregate project.
5767 2013-01-03 Javier Miranda <miranda@adacore.com>
5769 * sem_warn.adb (Warn_On_Overlapping_Actuals): Adding documentation
5770 plus restricting the functionality of this routine to cover the
5771 cases described in the Ada 2012 reference manual. The previous
5772 extended support is now available under -gnatX.
5773 * s-tassta.adb (Finalize_Global_Tasks): Addition of a dummy
5774 variable to call Timed_Sleep. Required to avoid warning on
5775 overlapping out-mode actuals.
5776 * opt.ads (Extensions_Allowed): Update documentation.
5778 2013-01-03 Tristan Gingold <gingold@adacore.com>
5780 * s-arit64.ads: Use Multiply_With_Ovflo_Check as __gnat_mulv64.
5782 * gcc-interface/Makefile.in: Remove reference to arit64.c.
5784 2013-01-03 Thomas Quinot <quinot@adacore.com>
5786 * checks.adb, checks.ads (Apply_Address_Clause_Check): The check must
5787 be generated at the start of the freeze actions for the entity, not
5788 before (or after) the freeze node.
5790 2013-01-03 Thomas Quinot <quinot@adacore.com>
5792 * exp_aggr.adb (Exp_Aggr.Convert_Aggregate_In_Obj_Decl):
5793 Reorganize code to capture initialization statements in a block,
5794 so that freeze nodes are excluded from the captured block.
5796 2013-01-03 Thomas Quinot <quinot@adacore.com>
5798 * exp_ch11.adb: Minor reformatting.
5800 2013-01-03 Thomas Quinot <quinot@adacore.com>
5802 * exp_util.adb, einfo.adb, einfo.ads, freeze.adb, exp_aggr.adb,
5803 sem_ch13.adb (Einfo.Initialization_Statements,
5804 Einfo.Set_Initialization_Statements): New entity attribute
5806 (Exp_Util.Find_Init_Call): Handle case of an object initialized
5807 by an aggregate converted to a block of assignment statements.
5808 (Freeze.Check_Address_Clause): Do not clear Has_Delayed_Freeze
5809 even for objects that require a constant address, because the
5810 address expression might involve entities that have yet to be
5811 elaborated at the point of the object declaration.
5812 (Exp_Aggr.Convert_Aggregate_In_Obj_Decl): For a type that does
5813 not require a transient scope, capture the assignment statements
5814 in a block so that they can be moved down after elaboration of
5815 an address clause if needed.
5816 (Sem_Ch13.Check_Constant_Address_Clause.Check_Expr_Constants,
5817 case N_Unchecked_Conversion): Do not replace operand subtype with
5818 its base type as this violates a GIGI invariant if the operand
5819 is an identifier (in which case the etype of the identifier
5820 is expected to be equal to that of the denoted entity).
5822 2013-01-03 Javier Miranda <miranda@adacore.com>
5824 * sem_util.ads, sem_util.adb (Denotes_Same_Object): Extend the
5825 functionality of this routine to cover cases described in the Ada 2012
5828 2013-01-03 Ed Schonberg <schonberg@adacore.com>
5830 * sem_elab.adb (Set_Elaboration_Constraint): Handle properly
5831 a 'Access attribute reference when the subprogram is called
5834 2013-01-03 Arnaud Charlet <charlet@adacore.com>
5836 * s-tpobop.adb (PO_Do_Or_Queue): Refine assertion, since a
5837 select statement may be called from a controlled (e.g. Initialize)
5838 operation and have abort always deferred.
5840 2013-01-03 Robert Dewar <dewar@adacore.com>
5842 * sem_ch8.adb, einfo.ads, einfo.adb: Minor code reorganization.
5844 2013-01-03 Javier Miranda <miranda@adacore.com>
5846 * exp_ch3.adb (Make_Controlling_Function_Wrappers): Exclude
5847 internal entities associated with interfaces and add minimum
5848 decoration to the defining entity of the generated wrapper to
5849 allow overriding interface primitives.
5850 * sem_disp.ads (Override_Dispatching_Operation): Addition of a
5851 new formal (Is_Wrapper).
5852 * sem_disp.adb (Override_Dispatching_Operation): When overriding
5853 interface primitives the new formal helps identifying that the
5854 new operation is not fully decorated.
5856 2013-01-03 Thomas Quinot <quinot@adacore.com>
5858 * sem_ch7.adb, sem_ch10.adb, einfo.adb, einfo.ads, sem_ch12.adb,
5859 rtsfind.adb, sem_elab.adb, sem_ch4.adb, sem_ch8.adb
5860 (Einfo.Is_Visible_Child_Unit, Einfo.Set_Is_Visible_Child_Unit):
5861 Rename to Is_Visible_Lib_Unit, Set_Is_Visible_Lib_Unit, and
5862 update spec accordingly (now also applies to root library units).
5863 (Sem_Ch10.Analyze_Subunit.Analyze_Subunit_Context): Toggle above flag
5864 on root library units, not only child units.
5865 (Sem_Ch10.Install[_Limited]_Withed_Unit): Same.
5866 (Sem_Ch10.Remove_Unit_From_Visibility): Reset Is_Visible_Lib_Unit
5867 even for root library units.
5868 (Sem_Ch8.Find_Expanded_Name): A selected component form whose prefix is
5869 Standard is an expanded name for a root library unit.
5871 2013-01-03 Thomas Quinot <quinot@adacore.com>
5873 * exp_ch3.adb: Minor reformatting.
5875 2013-01-03 Olivier Hainque <hainque@adacore.com>
5877 * tracebak.c: Reinstate changes to support ppc-lynx178.
5879 2013-01-03 Ed Schonberg <schonberg@adacore.com>
5881 * atree.ads: Minor reformatting and documentation enhancement.
5883 2013-01-03 Ed Schonberg <schonberg@adacore.com>
5885 * exp_ch3.adb (Expand_N_Object_Declaration): If the object has
5886 a class-wide type and a renaming declaration is created for it,
5887 preserve entity chain, which already contains generated internal
5888 types. This ensures that freezing actions are properly generated
5889 for all objects declared subsequently in the same scope, and
5890 that debugging information is generated for them.
5891 * sem_util.adb, sem_util.ads (we): New debugging routine, to
5892 display entity chain of a given scope.
5894 2013-01-03 Robert Dewar <dewar@adacore.com>
5896 * exp_intr.adb: Minor reformatting.
5898 2013-01-03 Robert Dewar <dewar@adacore.com>
5900 * einfo.adb: Minor reformatting.
5902 2013-01-03 Pascal Obry <obry@adacore.com>
5904 * adaint.c, adaint.h (__gnat_get_module_name): Removed.
5905 (__gnat_is_module_name_supported): Removed.
5906 * s-win32.ads: Add some needed definitions.
5907 * g-trasym.ads: Update comments.
5909 2013-01-03 Robert Dewar <dewar@adacore.com>
5911 * layout.adb (Set_Composite_Alignment): Fix problems of
5912 interactions with Optimize_Alignment set to Space.
5914 2013-01-03 Thomas Quinot <quinot@adacore.com>
5916 * exp_disp.adb: Minor reformatting.
5918 2013-01-02 Richard Biener <rguenther@suse.de>
5921 * gcc-interface/Makefile.in: Add $(GMPINC) to includes.
5923 2013-01-02 Thomas Quinot <quinot@adacore.com>
5925 * exp_intr.adb (Expand_Dispatching_Constructor_Call): Remove
5926 side effects from Tag_Arg early, doing it too late may cause a
5927 crash due to inconsistent Parent link.
5928 * sem_ch8.adb, einfo.ads: Minor reformatting.
5930 2013-01-02 Robert Dewar <dewar@adacore.com>
5932 * einfo.ads, einfo.adb (Has_Independent_Components): New flag.
5933 * freeze.adb (Size_Known): We do not know the size of a packed
5934 record if it has atomic components, by reference type components,
5935 or independent components.
5936 * sem_prag.adb (Analyze_Pragma, case Independent_Components): Set new
5937 flag Has_Independent_Components.
5939 2013-01-02 Yannick Moy <moy@adacore.com>
5941 * opt.ads (Warn_On_Suspicious_Contract): Set to True by default.
5942 * usage.adb (Usage): Update usage message.
5944 2013-01-02 Pascal Obry <obry@adacore.com>
5946 * adaint.c (__gnat_is_module_name_supported): New constant.
5948 2013-01-02 Ed Schonberg <schonberg@adacore.com>
5950 * sem_attr.adb (Check_Array_Type): Reject an attribute reference on an
5951 array whose component type does not have a completion.
5953 2013-01-02 Geert Bosch <bosch@adacore.com>
5955 * a-nllcef.ads, a-nlcefu.ads, a-nscefu.ads: Make Pure.
5957 2013-01-02 Robert Dewar <dewar@adacore.com>
5959 * par_sco.adb: Minor reformatting.
5961 2013-01-02 Javier Miranda <miranda@adacore.com>
5963 * sem_aggr.adb (Resolve_Array_Aggregate): Remove dead code.
5965 2013-01-02 Olivier Hainque <hainque@adacore.com>
5967 * a-exctra.ads (Get_PC): New function.
5969 2013-01-02 Thomas Quinot <quinot@adacore.com>
5971 * sem_ch8.adb: Minor reformatting.
5973 2013-01-02 Thomas Quinot <quinot@adacore.com>
5975 * sem_ch7.adb: Minor reformatting.
5977 2013-01-02 Thomas Quinot <quinot@adacore.com>
5979 * freeze.adb (Check_Component_Storage_Order): Do not crash on
5982 2013-01-02 Robert Dewar <dewar@adacore.com>
5984 * gnat1drv.adb, targparm.adb, targparm.ads: Minor name change: add
5985 On_Target to Atomic_Sync_Default.
5987 2013-01-02 Robert Dewar <dewar@adacore.com>
5989 * sem_warn.adb (Warn_On_Known_Condition): Suppress warning for
5990 comparison of attribute result with constant
5991 * a-ststio.adb, s-direio.adb, s-rannum.adb: Remove unnecessary pragma
5992 Warnings (Off, "..");
5994 2013-01-02 Yannick Moy <moy@adacore.com>
5996 * sem_prag.ads: Minor correction of comment.
5998 2013-01-02 Thomas Quinot <quinot@adacore.com>
6000 * par_sco.adb (Traverse_Package_Declaration): The first
6001 declaration in a nested package is dominated by the preceding
6002 declaration in the enclosing scope.
6004 2013-01-02 Pascal Obry <obry@adacore.com>
6006 * adaint.c, adaint.h (__gnat_get_module_name): Return the actual
6007 module containing a given address.
6009 2013-01-02 Thomas Quinot <quinot@adacore.com>
6011 * sem_ch3.adb: Minor reformatting.
6013 2013-01-02 Pascal Obry <obry@adacore.com>
6015 * cstreams.c (__gnat_ftell64): New routine. Use _ftelli64 on
6016 Win64 and default to ftell on other platforms.
6017 (__gnat_fsek64): Likewise.
6018 * i-cstrea.ads: Add fssek64 and ftell64 specs.
6019 * s-crtl.ads: Likewise.
6020 * a-ststio.adb, s-direio.adb (Size): Use 64 bits version when required.
6021 (Set_Position): Likewise.
6023 2013-01-02 Thomas Quinot <quinot@adacore.com>
6025 * par_sco.adb: Generate X SCOs for default expressions in
6026 subprogram body stubs. Do not generate any SCO for package,
6027 task, or protected body stubs.
6029 2013-01-02 Ed Schonberg <schonberg@adacore.com>
6031 * sem_ch3.adb: Further improvement to ASIS mode for anonymous
6032 access to protected subprograms.
6034 2013-01-02 Robert Dewar <dewar@adacore.com>
6036 * par_sco.adb, vms_data.ads: Minor reformatting.
6038 2013-01-02 Thomas Quinot <quinot@adacore.com>
6040 * par_sco.adb (Traverse_Declarations_Or_Statement): Function
6041 form, returning value of Current_Dominant upon exit, for chaining
6043 (Traverse_Declarations_Or_Statement.Traverse_One, case
6044 N_Block_Statement): First statement is dominated by last declaration.
6045 (Traverse_Subprogram_Or_Task_Body): Ditto.
6046 (Traverse_Package_Declaration): First private
6047 declaration is dominated by last visible declaration.
6048 (Traverse_Sync_Definition): Ditto.
6050 2013-01-02 Thomas Quinot <quinot@adacore.com>
6052 * gnat_rm.texi: Restrict the requirement for Scalar_Storage_Order
6053 matching Bit_Order to record types only, since array types do not
6056 2013-01-02 Vincent Celier <celier@adacore.com>
6058 * gnat_ugn.texi: Remove documentation of -gnateO, which is an
6060 * usage.adb: Indicate that -gnateO is an internal switch.
6062 2013-01-02 Thomas Quinot <quinot@adacore.com>
6064 * par_sco.adb: Add SCO generation for task types and single
6066 * get_scos.adb: When adding an instance table entry for a
6067 non-nested instantiation, make sure the Enclosing_Instance is
6070 2013-01-02 Hristian Kirtchev <kirtchev@adacore.com>
6072 * sem_attr.adb (Analyze_Attribute): Skip the special _Parent
6073 scope generated for subprogram inlining purposes while trying
6074 to locate the enclosing function.
6075 * sem_prag.adb (Analyze_Pragma): Preanalyze the boolean
6076 expression of pragma Postcondition when the pragma comes from
6077 source and appears inside a subprogram body.
6079 2013-01-02 Thomas Quinot <quinot@adacore.com>
6081 * switch-c.adb, fe.h, back_end.adb: Enable generation of instantiation
6082 information in debug info unconditionally when using -fdump-scos,
6083 instead of relying on a separate command line switch -fdebug-instances.
6084 * gcc-interface/Make-lang.in: Update dependencies.
6086 2013-01-02 Ed Schonberg <schonberg@adacore.com>
6088 * sem_ch12.adb: Additional refinement of predicate.
6090 2013-01-02 Vincent Celier <celier@adacore.com>
6092 * vms_data.ads: Remove incorrect spaces at end of descriptions
6093 of qualifiers for single switch.
6095 2013-01-02 Ben Brosgol <brosgol@adacore.com>
6097 * gnat_rm.texi: Minor edits / wordsmithing in section on pragma
6098 Check_Float_Overflow.
6100 2013-01-02 Thomas Quinot <quinot@adacore.com>
6102 * sprint.adb (Sprint_Node_Actual): Do not add extra parens for
6103 a conditional expression (CASE or IF expression) that already
6104 has parens. Also omit ELSE keyword for an IF expression without
6107 2013-01-02 Thomas Quinot <quinot@adacore.com>
6109 * gnat1drv.adb (Adjust_Global_Switches): Adjust back-end
6110 flag_debug_instances here, after front-end switches have been
6113 2013-01-02 Vincent Celier <celier@adacore.com>
6115 * usage.adb: Minor reformatting.
6117 2013-01-02 Arnaud Charlet <charlet@adacore.com>
6119 * opt.ads: Fix typo.
6121 2013-01-02 Thomas Quinot <quinot@adacore.com>
6123 * par_sco.adb: Generate P decision SCOs for SPARK pragmas
6124 Assume and Loop_Invariant.
6126 2013-01-02 Robert Dewar <dewar@adacore.com>
6128 * vms_data.ads: Add entry for Float_Check_Valid (-gnateF).
6129 * ug_words: Add entry for Float_Check_Overflow.
6130 * usage.adb: Minor reformatting.
6131 * gnat_ugn.texi: Add documentation for -gnateF (Check_Float_Overflow).
6133 2013-01-02 Vincent Celier <celier@adacore.com>
6135 * gnat_ugn.texi: Add documentation for switches -gnateA, -gnated,
6136 -gnateO=, -gnatet and -gnateV.
6137 * ug_words: Add qualifiers equivalent to -gnateA, -gnated,
6138 -gnatet and -gnateV.
6139 * usage.adb: Add lines for -gnatea, -gnateO and -gnatez.
6140 * vms_data.ads: Add new compiler qualifiers /ALIASING_CHECK
6141 (-gnateA), /DISABLE_ATOMIC_SYNCHRONIZATION (-gnated),
6142 /PARAMETER_VALIDITY_CHECK (-gnateV) and /TARGET_DEPENDENT_INFO
6145 2013-01-02 Robert Dewar <dewar@adacore.com>
6147 * checks.adb (Apply_Scalar_Range_Check): Implement Check_Float_Overflow.
6148 * opt.ads, opt.adb: Handle flags Check_Float_Overflow[_Config].
6149 * par-prag.adb: Add dummy entry for pragma Check_Float_Overflow.
6150 * sem_prag.adb: Implement pragma Check_Float_Overflow.
6151 * snames.ads-tmpl: Add entries for pragma Check_Float_Overflow.
6152 * switch-c.adb: Recognize -gnateF switch.
6153 * tree_io.ads: Update ASIS version number.
6154 * gnat_rm.texi: Add documentation of pragma Check_Float_Overflow.
6156 2013-01-02 Robert Dewar <dewar@adacore.com>
6158 * checks.adb, exp_ch4.adb, exp_ch6.adb, exp_ch7.adb, exp_ch9.adb,
6159 exp_disp.adb, exp_dist.adb, exp_intr.adb, exp_prag.adb, exp_util.adb,
6160 freeze.adb, gnat1drv.adb, inline.adb, layout.adb, lib-xref.adb,
6161 par-ch10.adb, par-labl.adb, par-load.adb, par-util.adb, restrict.adb,
6162 sem_ch13.adb, sem_ch4.adb, sem_ch6.adb, sem_dim.adb, sem_elab.adb,
6163 sem_res.adb, sem_warn.adb, sinput-l.adb: Add tags to warning messages.
6164 * sem_ch6.ads, warnsw.ads, opt.ads: Minor comment updates.
6166 2013-01-02 Robert Dewar <dewar@adacore.com>
6168 * err_vars.ads: Minor comment fix.
6170 2013-01-02 Ed Schonberg <schonberg@adacore.com>
6172 * sem_ch12.adb: Refine predicate.
6174 2013-01-02 Robert Dewar <dewar@adacore.com>
6176 * errout.ads: Minor comment fixes.
6177 * opt.ads: Minor comment additions.
6178 * exp_aggr.adb: Add tags to warning messages
6179 * exp_ch11.adb, exp_ch3.adb, exp_ch4.adb, exp_util.adb, sem_aggr.adb,
6180 sem_attr.adb, sem_case.adb, sem_cat.adb, sem_ch3.adb, sem_ch4.adb,
6181 sem_ch5.adb, sem_disp.adb, sem_dist.adb, sem_elab.adb, sem_eval.adb,
6182 sem_intr.adb, sem_mech.adb, sem_prag.adb, sem_res.adb, sem_util.adb,
6183 sem_warn.adb: Add tags to warning messages
6185 2013-01-02 Doug Rupp <rupp@adacore.com>
6187 * init.c [VMS] Remove subtest on reason mask for ACCVIO that is a C_E.
6189 2013-01-02 Ed Schonberg <schonberg@adacore.com>
6191 * sem_ch12.adb: Recover source name for renamed packagea.
6193 2013-01-02 Robert Dewar <dewar@adacore.com>
6195 * errout.adb (Set_Msg_Insertion_Warning): Correct typo causing
6196 tests to fail if insertion sequence is at end of message string.
6197 * opt.ads: Minor comment fixes and additions.
6198 * sem_ch7.adb, sem_ch8.adb, sem_ch9.adb, sem_ch10.adb, sem_ch11.adb,
6199 sem_ch12.adb, sem_ch13.adb: Add tags to warning messages.
6200 * sem_ch6.ads, sem_ch6.adb (Cannot_Inline): Deal with warning message
6201 tags. Add tags to warning messages.
6203 2013-01-02 Robert Dewar <dewar@adacore.com>
6205 * err_vars.ads (Warning_Doc_Switch): New flag.
6206 * errout.adb (Error_Msg_Internal): Implement new warning flag
6207 doc tag stuff (Set_Msg_Insertion_Warning): New procedure.
6208 * errout.ads: Document new insertion sequences ?? ?x? ?.x?
6209 * erroutc.adb (Output_Msg_Text): Handle ?? and ?x? warning doc
6211 * erroutc.ads (Warning_Msg_Char): New variable.
6212 (Warn_Chr): New field in error message object.
6213 * errutil.adb (Error_Msg): Set Warn_Chr in error message object.
6214 * sem_ch13.adb: Minor reformatting.
6215 * warnsw.adb: Add handling for -gnatw.d and -gnatw.D
6216 (Warning_Doc_Switch).
6217 * warnsw.ads: Add handling of -gnatw.d/.D switches (warning
6220 2013-01-02 Robert Dewar <dewar@adacore.com>
6222 * opt.ads: Minor reformatting.
6224 2013-01-02 Doug Rupp <rupp@adacore.com>
6226 * init.c: Reorganize VMS section.
6227 (scan_condtions): New function for scanning condition tables.
6228 (__gnat_handle_vms_condtion): Use actual exception name for imported
6229 exceptions vice IMPORTED_EXCEPTION.
6230 Move condition table scanning into separate function. Move formerly
6231 special handled conditions to system condition table. Use SYS$PUTMSG
6232 output to fill exception message field for formally special handled
6233 condtions, in particular HPARITH to provide more clues about cause and
6234 location then raised from the translated image.
6236 2013-01-02 Thomas Quinot <quinot@adacore.com>
6238 * sem_ch13.adb (Analyze_Aspect_Specifications): For a Pre/Post
6239 aspect that applies to a library subprogram, prepend corresponding
6240 pragma to the Pragmas_After list, in order for split AND THEN
6241 sections to be processed in the expected order.
6243 2013-01-02 Thomas Quinot <quinot@adacore.com>
6245 * exp_prag.adb (Expand_Pragma_Check): The statements generated
6246 for the pragma must have the sloc of the pragma, not the
6247 sloc of the condition, otherwise this creates anomalies in the
6248 generated debug information that confuse coverage analysis tools.
6250 2013-01-02 Thomas Quinot <quinot@adacore.com>
6252 * sem_ch13.adb: Minor reformatting.
6254 2013-01-02 Arnaud Charlet <charlet@adacore.com>
6256 * g-excact.ads (Core_Dump): Clarify that this subprogram does
6257 not dump cores under Windows.
6259 2013-01-02 Ed Schonberg <schonberg@adacore.com>
6261 * sem_ch8.adb (Analyze_Primitive_Renamed_Operation): The prefixed
6262 view of a subprogram has convention Intrnnsic, and a renaming
6263 of a prefixed view cannot be the prefix of an Access attribute.
6265 2013-01-02 Robert Dewar <dewar@adacore.com>
6267 * restrict.adb: Minor reformatting.
6269 2013-01-02 Thomas Quinot <quinot@adacore.com>
6271 * exp_prag.adb: Minor reformatting.
6273 2013-01-02 Ed Schonberg <schonberg@adacore.com>
6275 * sem_ch12.adb (Get_Associated_Node): If the node is an
6276 identifier that denotes an unconstrained array in an object
6277 declaration, it is rewritten as the name of an anonymous
6278 subtype whose bounds are given by the initial expression in the
6279 declaration. When checking whether that identifier is global
6280 reference, use the original node, not the local generated subtype.
6282 2013-01-02 Olivier Hainque <hainque@adacore.com>
6284 * tracebak.c: Revert previous change, incomplete.
6286 2013-01-02 Ed Schonberg <schonberg@adacore.com>
6288 * sem_ch13.adb (Analyze_Aspect_Specifications): If the aspect
6289 appears on a subprogram body that acts as a spec, place the
6290 corresponding pragma in the declarations of the body, so that
6291 e.g. pre/postcondition checks can be generated appropriately.
6293 2013-01-02 Robert Dewar <dewar@adacore.com>
6295 * sem_ch3.adb: Minor reformatting and code reorganization.
6297 2013-01-02 Vincent Celier <celier@adacore.com>
6299 * switch-m.adb (Normalize_Compiler_Switches): Record the
6300 complete switch -fstack-check=specific instead of its shorter
6301 alias -fstack-check.
6303 2013-01-02 Ed Schonberg <schonberg@adacore.com>
6305 * sem_ch3.adb (Derive_Subprogram): Enforce RM 6.3.1 (8):
6306 if the derived type is a tagged generic formal type with
6307 unknown discriminants, the inherited operation has convention
6308 Intrinsic. As such, the 'Access attribute cannot be applied to it.
6310 2013-01-02 Thomas Quinot <quinot@adacore.com>
6312 * sem_attr.adb: Minor reformatting.
6314 2013-01-02 Thomas Quinot <quinot@adacore.com>
6316 * par_sco.adb: Add SCO generation for S of protected types and
6317 single protected object declarations.
6319 2013-01-02 Robert Dewar <dewar@adacore.com>
6321 * sem_eval.adb, osint.ads: Minor reformatting.
6323 2013-01-02 Hristian Kirtchev <kirtchev@adacore.com>
6325 * sem_prag.adb (Analyze_Pragma): Check the legality of pragma Assume.
6327 2013-01-02 Thomas Quinot <quinot@adacore.com>
6329 * sem_eval.adb (Compile_Time_Compare): For static operands, we
6330 can perform a compile time comparison even if in preanalysis mode.
6332 2013-01-02 Thomas Quinot <quinot@adacore.com>
6334 * par_sco.adb (SCO_Record): Always use
6335 Traverse_Declarations_Or_Statements to process the library level
6336 declaration, so that SCOs are properly generated for its aspects.
6338 2013-01-02 Thomas Quinot <quinot@adacore.com>
6340 * scos.ads (In_Decision): Add missing entry for 'a'.
6341 * sem_prag.adb (Analyze_Pragma, case pragma Check): Omit
6342 call to Set_SCO_Pragma_Enabled for Invariant and Predicate.
6343 * sem_ch13.adb: Minor comment update.
6345 Copyright (C) 2013 Free Software Foundation, Inc.
6347 Copying and distribution of this file, with or without modification,
6348 are permitted in any medium without royalty provided the copyright
6349 notice and this notice are preserved.