1 2013-11-12 Andrew MacLeod <amacleod@redhat.com>
3 * gcc-interface/trans.c: Include gimplify.h.
5 2013-11-11 Tristan Gingold <gingold@adacore.com>
6 Eric Botcazou <ebotcazou@adacore.com>
8 * gcc-interface/utils2.c (gnat_build_constructor): Also set the flag
9 CONSTRUCTOR_NO_CLEARING on the constructor.
11 2013-10-30 Sharad Singhai <singhai@google.com>
13 * gnat_ugn.texi: Remove option description for PR middle-end/58134.
15 2013-10-29 David Malcolm <dmalcolm@redhat.com>
17 * gcc-interface/trans.c (finalize_nrv): Update for conversion of
18 symtab types to a true class hierarchy.
19 * gcc-interface/utils.c (gnat_write_global_declarations): Likewise.
21 2013-10-28 Trevor Saunders <tsaunders@mozilla.com>
23 * gcc-interface/decl.c (components_to_record): Adjust stack vector.
25 2013-10-24 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
27 * gcc-interface/Make-lang.in (ADA_DEPS): Fix quoting.
29 2013-10-19 Thomas Quinot <quinot@adacore.com>
31 * gcc-interface/Makefile.in: Use canonical absolute path to refer to
32 the top source directory and to the libgcc subidrectories.
34 2013-10-19 Eric Botcazou <ebotcazou@adacore.com>
36 * gcc-interface/utils.c (scale_by_factor_of): New function.
37 (rest_of_record_type_compilation): Use scale_by_factor_of in order to
38 scale the original offset for both rounding cases; in the second case,
39 take into accout the addend to compute the alignment. Tidy up.
41 2013-10-19 Eric Botcazou <ebotcazou@adacore.com>
43 * gcc-interface/cuintp.c: Remove useless include directives.
44 (build_cst_from_int): Use standard predicate.
45 (UI_To_gnu): Simplify.
46 (UI_From_gnu): Fix formatting.
47 * gcc-interface/trans.c (post_error): Likewise.
48 (post_error_ne): Likewise.
50 2013-10-19 Eric Botcazou <ebotcazou@adacore.com>
52 * gcc-interface/utils.c (gnat_set_type_context): New function.
53 (gnat_pushdecl): Use it to set the context of the type.
55 2013-10-17 Hristian Kirtchev <kirtchev@adacore.com>
57 * sem_prag.adb (Check_Dependency_Clause):
58 Recognize the scenario where successful clause matching has
59 depleted the available refinement items and the clause to match
60 technically refines to null => null.
62 2013-10-17 Tristan Gingold <gingold@adacore.com>
64 * exp_prag.adb (Expand_Pragma_Import_Or_Interface): Specify
65 External_Name instead of Link_Name for the RTTI declaration.
67 2013-10-17 Robert Dewar <dewar@adacore.com>
69 * sem_prag.adb (Record_Possible_Body_Reference): Fix test for
71 (Add_Constituent): Merged into Check_Refined_Global_Item.
72 (Check_Matching_Constituent): A constituent that has the proper Part_Of
73 option and comes from a private child or a sibling is now collected.
74 (Check_Matching_Modes): Merged into Check_Refined_Global_Item.
75 (Check_Refined_Global_Item): Code cleanup.
76 (Collect_Constituent): New routine.
77 (Inconsistent_Mode_Error): Moved out from Check_Matching_Modes.
79 2013-10-17 Ed Schonberg <schonberg@adacore.com>
81 * freeze.adb (Check_Current_Instance, Process): Add RM reference
82 and mention immutably limited types, when the current instance
83 is illegal in Ada 2012.
85 2013-10-17 Ed Schonberg <schonberg@adacore.com>
87 * sem_warn.adb (Check_Unused_Withs): If the main unit is a
88 subunit, apply the check to the units mentioned in its context
89 only. This provides additional warnings on with_clauses that
92 2013-10-17 Hristian Kirtchev <kirtchev@adacore.com>
94 * sem_ch3.adb (Analyze_Declarations): Emit an
95 error message concerning state refinement when the spec defines at
96 least one non-null abstract state and the body's SPARK mode is On.
97 (Requires_State_Refinement): New routine.
99 2013-10-17 Robert Dewar <dewar@adacore.com>
101 * sem_ch7.ads: Comment fixes.
103 2013-10-17 Robert Dewar <dewar@adacore.com>
105 * sem_ch7.adb (Analyze_Package_Specification): Remove circuit
106 for ensuring that a package spec requires a body for some other
107 reason than that it contains the declaration of an abstract state.
109 2013-10-17 Tristan Gingold <gingold@adacore.com>
111 * exp_ch11.adb (Expand_N_Raise_Expression): Fix call of
112 Possible_Local_Raise.
114 2013-10-17 Thomas Quinot <quinot@adacore.com>
116 * exp_pakd.adb (Expand_Bit_Packed_Element_Set): Unchecked
117 conversion of Or_Rhs to Etype of New_Rhs is required only when
118 the latter is the result of a byte swap operation.
120 2013-10-17 Thomas Quinot <quinot@adacore.com>
122 * exp_dist.adb (Build_To_Any_Function): For a type with opaque
123 representation that is not transmitted as an unconstrained value,
124 use 'Write, not 'Output, to generate the opaque representation.
126 2013-10-17 Yannick Moy <moy@adacore.com>
128 * sem_res.adb (Resolve_Short_Circuit): Only
129 generate expression-with-action when full expansion is set.
131 2013-10-17 Yannick Moy <moy@adacore.com>
133 * debug.adb Remove obsolete comment.
135 2013-10-17 Thomas Quinot <quinot@adacore.com>
137 * exp_ch4.adb (Process_Transient_Object.Find_Enclosing_Contexts):
138 Avoid late insertion when expanding an expression with action
139 nested within a transient block; Do not inconditionally generate
140 a finalization call if the generated object is from a specific
141 branch of a conditional expression.
143 2013-10-17 Pascal Obry <obry@adacore.com>
145 * g-arrspl.adb: Ensure Finalize call is idempotent.
146 * g-arrspl.adb (Finalize): Makes the call idempotent.
148 2013-10-17 Hristian Kirtchev <kirtchev@adacore.com>
150 * sem_prag.adb (Is_Matching_Input): Account
151 for the case where a state with a null refinement appears as
152 the last input of a refinement clause.
154 2013-10-17 Robert Dewar <dewar@adacore.com>
156 * sem_aux.ads, sem_aux.adb: Minor reformatting.
158 2013-10-17 Hristian Kirtchev <kirtchev@adacore.com>
160 * aspects.adb, aspects.ads, sem_prag.ads: Remove all entries
161 for Refined_Pre from the various tables.
162 * par-prag.adb: Remove the entry for Refined_Pre from the list
163 of pragmas not needing special processing by the parser.
164 * sem_ch13.adb (Analyze_Aspect_Specifications):
165 Remove the processing for aspect Refined_Pre.
166 (Check_Aspect_At_Freeze_Point): Remove the entry for aspect
168 * sem_prag.adb (Analyze_Pragma): Refined_Pre is no longer a
169 valid assertion kind. Remove the analysis of pragma Refined_Pre.
170 (Analyze_Refined_Pragma): Update the comment on usage.
171 (Find_Related_Subprogram_Or_Body): Update the comment on
172 usage. Pragma Refined_Pre is no longer processed by this routine.
173 (Is_Valid_Assertion_Kind): Refined_Pre is no longer a valid
175 * snames.ads-tmpl: Remove predefined name Refined_Pre. Remove
176 the pragma id for Refined_Pre.
178 2013-10-17 Hristian Kirtchev <kirtchev@adacore.com>
180 * exp_util.adb, exp_util.ads (Entity_Of): Moved to Sem_Util.
181 * sem_prag.adb (Analyze_Global_In_Decl_List): Mark a null
182 item list as being analyzed.
183 (Analyze_Global_List): Mark a
184 null global list and multiple global items as being analyzed.
185 (Analyze_Input_Item): Check the unit that defines the input
186 variable or state, not the reference to it.
187 * sem_util.ads, sem_util.adb (Entity_Of): Moved from Exp_Util. Ensure
188 that the input has an entity.
190 2013-10-17 Thomas Quinot <quinot@adacore.com>
192 * exp_util.adb (Get_Current_Value_Condition,
193 Set_Current_Value_Condition): Handle the case of expressions
194 with actions * exp_util.adb (Insert_Actions): Handle the case
195 of an expression with actions whose Actions list is empty.
196 * exp_util.adb (Remove_Side_Effects.Side_Effect_Free): An
197 expression with actions that has no Actions and whose Expression
198 is side effect free is itself side effect free.
199 * exp_util.adb (Remove_Side_Effects): Do not set an incorrect etype on
200 temporary 'R' (Def_Id), which is in general an access to Exp_Type, not
202 * sem_res.adb (Resolve): For an expression with
203 actions, resolve the expression early. * sem_res.adb
204 (Resolve_Expression_With_Actions): Rewrite an expression with
205 actions whose value is compile time known and which has no
206 actions into just its expression, so that its constant value is
207 available downstream.
208 * sem_res.adb (Resolve_Short_Circuit):
209 Wrap the left operand in an expression with actions to contain
210 any required finalization actions.
211 * exp_ch4.adb (Expand_Expression_With_Actions): For an
212 expression with actions returning a Boolean expression, ensure
213 any finalization action is kept within the Actions list.
214 * sem_warn.adb (Check_References, Check_Unset_Reference): add
215 missing circuitry to handle expressions with actions.
216 * checks.adb (Ensure_Valid): For an expression with actions,
217 insert the validity check on the Expression.
218 * sem_ch13.adb (Build_Static_Predicate.Get_RList): An expression
219 with actions that has a non-empty Actions list is not static. An
220 expression with actions that has an empty Actions list has the
221 static ranges of its Expression.
222 * sem_util.adb (Has_No_Obvious_Side_Effects): An expression with
223 actions with an empty Actions list has no obvious side effects
224 if its Expression itsekf has no obvious side effects.
226 2013-10-17 Ed Schonberg <schonberg@adacore.com>
228 * sem_aux.ads, sem_aux.adb (Is_Immutably_Limited_Type): Make
229 predicate compatible with Ada 2012 definition
230 (Is_Limited_View): New name for previous version of
231 Is_Immutably_Limited_Type. Predicate is true for an untagged
232 record type with a limited component.
233 * exp_ch7.adb, exp_ch6.adb, exp_ch4.adb, exp_ch3.adb, exp_aggr.adb,
234 sem_util.adb, sem_res.adb, sem_prag.adb, sem_attr.adb, sem_ch8.adb,
235 sem_ch6.adb, sem_ch3.adb, exp_util.adb: Use Is_Limited_View
236 * freeze.adb Use Is_Immutably_Limited_Type to check the legality
237 of references to the current instance, Is_Limited_View otherwise.
239 2013-10-17 Hristian Kirtchev <kirtchev@adacore.com>
241 * sem_ch13.adb (Analyze_Aspect_Specifications): Flag aspect
242 Refined_Pre as not supported.
243 * sem_prag.adb (Analyze_Pragma): Ignore pragma Refined_Pre.
245 2013-10-17 Ed Schonberg <schonberg@adacore.com>
247 * sem_ch12.adb (Validated_Access_Subprogram_Instance): According
248 to AI05-288, actuals for access_to_subprograms must be subtype
249 conformant with the generic formal. Previous to AI05-288
250 only mode conformance was required, but the AI is a binding
251 interpretation that applies to previous versions of the language,
253 2013-10-17 Robert Dewar <dewar@adacore.com>
255 * gnat_ugn.texi: Minor text correction.
256 * ug_words: Add entry for -gnateu /IGNORE_UNRECOGNIZED.
257 * vms_data.ads: Add /IGNORE_UNRECOGNIZED for -gnateu.
259 2013-10-17 Tristan Gingold <gingold@adacore.com>
261 * impunit.adb (Non_Imp_File_Names_95): Add g-cppexc.
263 2013-10-17 Hristian Kirtchev <kirtchev@adacore.com>
265 * sem_prag.adb (Analyze_Constituent): Move the check
266 concerning option Part_Of to routine Check_Matching_Constituent.
267 (Check_Matching_Constituent): Verify that an abstract state
268 that acts as a constituent has the proper Part_Of option in
269 its aspect/pragma Abstract_State. Account for the case when a
270 constituent comes from a private child or private sibling.
271 * sem_util.ads, sem_util.adb (Is_Child_Or_Sibling): New routine.
273 2013-10-17 Tristan Gingold <gingold@adacore.com>
275 * g-cppexc.adb, g-cppexc.ads: New files.
276 * gcc-interface/Makefile.in: Add g-cppexc when building zcx runtimes.
278 2013-10-17 Thomas Quinot <quinot@adacore.com>
280 * exp_ch7.adb: Minor reformatting.
282 2013-10-17 Ed Schonberg <schonberg@adacore.com>
284 * sem_dim.adb (Process_Minus, Process_Divide): Label dimension
285 expression with standard operator and type, for pretty-printing
288 2013-10-17 Bob Duff <duff@adacore.com>
290 * gnat_ugn.texi: Document --pp-new and --pp-old switches.
292 2013-10-17 Hristian Kirtchev <kirtchev@adacore.com>
294 * einfo.adb: Flag 159 is now known as From_Limited_With. Replace
295 all references to attribute From_With_Type with From_Limited_With.
296 (From_With_Type): Renamed to From_Limited_With.
297 (Set_From_With_Type): Renamd to Set_From_Limited_With.
298 * einfo.ads: Remove attribute From_With_Type and occurrences in
299 nodes. Add attribute From_Limited_With along with occurrences
301 (From_With_Type): Renamed to From_Limited_With along with pragma Inline.
302 (Set_From_With_Type): Renamed to
303 Set_From_Limited_With along with pragma Inline.
304 * sem_ch7.adb, sem_ch8.adb, sem_ch12.adb, sem_ch13.adb, sem_disp.adb,
305 sem_res.adb, sem_type.adb, sem_util.adb, sem_warn.adb,
306 exp_attr.adb, exp_disp.adb, freeze.adb, itypes.adb, layout.adb,
307 lib-writ.adb, rtsfind.adb, sem_attr.adb, sem_aux.adb, sem_ch3.adb,
308 sem_ch4.adb: Replace all references to attribute From_With_Type
309 with From_Limited_With.
310 * sem_ch6.adb: Replace all references to attribute From_With_Type
311 with From_Limited_With.
312 (Designates_From_With_Type): Renamed to Designates_From_Limited_With.
313 (Process_Formals): Update the call to Designates_From_With_Type.
314 * sem_ch10.adb: Replace all references to attribute From_With_Type
315 with From_Limited_With.
316 (Build_Limited_Views): Reimplemented.
317 * gcc-interface/decl.c Replace all references to attribute
318 From_With_Type with From_Limited_With.
319 (finalize_from_with_types): Renamed to finalize_from_limited_with.
320 * gcc-interface/gigi.h (finalize_from_with_types): Renamed to
321 finalize_from_limited_with.
322 * gcc-interface/trans.c: Replace all references to attribute
323 From_With_Type with From_Limited_With.
324 (Compilation_Unit_to_gnu): Update the call to finalize_from_with_types.
326 2013-10-17 Pascal Obry <obry@adacore.com>
328 * projects.texi: Update VCS_Kind documentation.
330 2013-10-17 Matthew Heaney <heaney@adacore.com>
332 * a-convec.adb, a-coinve.adb, a-cobove.adb (Insert, Insert_Space):
333 Inspect value range before converting type.
335 2013-10-17 Hristian Kirtchev <kirtchev@adacore.com>
337 * sem_prag.adb (Analyze_Pragma): Flag the use of pragma Refined_Pre as
340 2013-10-17 Vincent Celier <celier@adacore.com>
342 * gnat_ugn.texi: Remove VMS conversion of -gnatet and -gnateT,
343 now that they are both in ug_words.
344 * ug_words: Update qualifier for -gnatet Add qualifier for -gnateT
345 * vms_data.ads: Update qualifier for -gnatet Add qualifier
347 * projects.texi: Continue to update the project documentation
350 2013-10-17 Robert Dewar <dewar@adacore.com>
352 * einfo.ads, einfo.adb (Has_Body_References): New flag.
353 (Body_References): New field.
354 * sem_prag.adb (Record_Possible_Body_Reference): New procedure
355 (Analyze_Input_Output): Call Record_Possible_Body_Reference
356 (Analyze_Global_Item): Call Record_Possible_Body_Reference
357 (Analyze_Refinement_Clause): Output messages if illegal global refs.
359 2013-10-17 Thomas Quinot <quinot@adacore.com>
361 * freeze.adb (Check_Component_Storage_Order): Reject a record or
362 array type that does not have an explicit Scalar_Storage_Order
363 attribute definition if a component of the record, or the
364 elements of the array, have one.
365 * gnat_rm.texi (attribute Scalar_Storage_Order): Document the above
368 2013-10-17 Vincent Celier <celier@adacore.com>
370 * gnat_ugn.texi: Add examples of switches -gnateD, including
371 one where the value is a string.
372 * projects.texi: Do not convert switches in project files to
375 2013-10-17 Robert Dewar <dewar@adacore.com>
377 * sem_prag.adb (Report_Extra_Clauses): Don't complain about
378 refinements with null input since null should be considered to
381 2013-10-17 Robert Dewar <dewar@adacore.com>
383 * gnat_ugn.texi: Document -gnatw.y/-gnatw.Y.
384 * opt.ads (List_Body_Required_Info): New flag.
385 * prep.adb: Minor reformatting.
386 * sem_ch7.adb (Unit_Requires_Body_Info): New
387 procedure (Analyze_Package_Specification): Add call to
388 Unit_Requires_Body_Info.
389 * ug_words: Add entries for -gnatw.y and -gnatw.Y.
390 * usage.adb: Add line for new warning switch -gnatw.y/.Y.
391 * vms_data.ads: Add entry for [NO_]WHY_SPEC_NEEDS_BODY warning
393 * warnsw.ads, warnsw.adb: Implement new warning switch -gnatw.y/.Y.
395 2013-10-17 Yannick Moy <moy@adacore.com>
397 * sem_ch8.adb (Find_Direct_Name): Keep track of assignments for
398 renamings in SPARK mode.
400 2013-10-17 Yannick Moy <moy@adacore.com>
402 * exp_spark.adb (Expand_SPARK): Remove special case for NOT IN
404 * sinfo.ads: Add special comment section to describe SPARK mode
406 * exp_spark.ads: Remove comments, moved to sinfo.ads.
408 2013-10-17 Yannick Moy <moy@adacore.com>
410 * exp_ch3.adb (Expand_Freeze_Class_Wide_Type,
411 Expand_Freeze_Class_Wide_Type, Expand_Freeze_Class_Wide_Type):
412 Remove useless special cases.
413 * exp_ch4.adb (Expand_Allocator_Expression, Expand_N_Allocator,
414 Expand_N_Op_Expon): Remove useless special cases.
415 * exp_ch6.adb (Is_Build_In_Place_Function_Call): Disable build-in-place
416 in SPARK mode by testing Full_Expander_Active instead of
418 (Make_Build_In_Place_Call_In_Allocator): Remove useless special case.
419 * exp_util.adb (Build_Allocate_Deallocate_Proc): Remove
420 useless special case.
421 * sem_eval.adb (Compile_Time_Known_Value): Remove special handling of
424 2013-10-17 Yannick Moy <moy@adacore.com>
426 * gnat_ugn.texi: Document -gnateT and target file format.
428 2013-10-17 Vincent Celier <celier@adacore.com>
430 * prep.adb (Check_Command_Line_Symbol_Definition): Is_A_String is
431 always False, even when the value starts and ends with double quotes.
433 2013-10-17 Tristan Gingold <gingold@adacore.com>
435 * a-exexpr-gcc.adb: Synchronize declarations of other/all others.
437 2013-10-17 Thomas Quinot <quinot@adacore.com>
439 * exp_pakd.adb: Add missing guard protecting Reverse_Storage_Order
441 * sem_res.adb: Minor code cleanup: use named parameter association
442 (not positional) for Boolean parameter Sec_Stack in calls to
443 Establish_Transient_Scope.
445 2013-10-15 Thomas Quinot <quinot@adacore.com>
447 * exp_pakd.adb (Expand_Packed_Element_Set,
448 Expand_Packed_Element_Reference): Adjust for the case of packed
449 arrays of reverse-storage-order types.
451 2013-10-15 Robert Dewar <dewar@adacore.com>
453 * sem_prag.adb: Minor reformatting.
455 2013-10-15 Ed Schonberg <schonberg@adacore.com>
457 * sem_attr.adb (Analyze_Attribute_Specification, case
458 To_Address): If the expression is an identifier, do not modify
459 its type; it will be converted when necessary, and the type of
460 the expression must remain consistent with that of the entity
461 for back-end consistency.
463 2013-10-15 Robert Dewar <dewar@adacore.com>
465 * sem_ch7.adb (Unit_Requires_Body): Add flag
466 Ignore_Abstract_State (Analyze_Package_Specification): Enforce
467 rule requiring Elaborate_Body if a non-null abstract state is
468 specified for a library-level package.
469 * sem_ch7.ads (Unit_Requires_Body): Add flag Ignore_Abstract_State.
471 2013-10-15 Hristian Kirtchev <kirtchev@adacore.com>
473 * sem_prag.adb (Analyze_Constituent): When
474 a state acts as a constituent of another state, ensure that
475 the said state has a Part_Of dependency in its corresponding
476 aspect/pragma Abstract_State.
478 2013-10-15 Robert Dewar <dewar@adacore.com>
480 * par-ch4.adb (P_If_expression): Handle redundant ELSE cleanly.
482 2013-10-15 Thomas Quinot <quinot@adacore.com>
484 * atree.ads (New_Copy, Relocate_Node): Improve documentation
485 (note that these subprograms reset Is_Overloaded).
487 2013-10-15 Thomas Quinot <quinot@adacore.com>
489 * checks.adb (Check_Needed): Handle the case where the test in
490 the left operand of the short circuit is wrapped in a qualified
491 expression, type conversion, or expression with actions.
493 2013-10-15 Thomas Quinot <quinot@adacore.com>
495 * sem_type.adb, sem_type.ads (Save_Interps): Also propagate
496 Is_Overloaded to New_N, for consistency.
498 2013-10-15 Ed Schonberg <schonberg@adacore.com>
500 * a-tienau.adb (Put): Use file parameter to query values of
501 current column and line length.
503 2013-10-15 Robert Dewar <dewar@adacore.com>
505 * sem_prag.adb, exp_ch11.adb, a-except-2005.adb, a-except-2005.ads:
508 2013-10-15 Eric Botcazou <ebotcazou@adacore.com>
510 * targparm.ads: Fix minor typo in comment.
512 2013-10-15 Ed Schonberg <schonberg@adacore.com>
514 * lib-xref.adb: handle full views that are derived from private
516 * sem_util.adb (Build_Elaboration_Entity): Do nothing in ASIS
517 mode: the elaboration entity is not in the source, and plays no
518 role in semantic analysis. Minor reformatting.
520 2013-10-15 Tristan Gingold <gingold@adacore.com>
522 * adaint.c (__gnat_get_executable_load_address): Remove AIX
525 2013-10-15 Ed Schonberg <schonberg@adacore.com>
527 * exp_aggr.adb (Aggr_Size_OK): Refine criteria to better handle
528 large static aggregates with static record components, to avoid
529 generating a large number of asignments. Conversely, improve
530 handling of aggregates initialized by a single association,
531 which are most efficiently implemented with a loop.
533 2013-10-15 Hristian Kirtchev <kirtchev@adacore.com>
535 * sem_prag.adb (Analyze_Input_Item): Emit an
536 error when the input item comes from the related package.
538 2013-10-15 Arnaud Charlet <charlet@adacore.com>
540 * exp_ch11.adb (Expand_Exception_Handlers): Restrict previous
543 2013-10-14 Tristan Gingold <gingold@adacore.com>
545 * gcc-interface/gigi.h (standard_datatypes): Add
546 ADT_set_exception_parameter_decl
547 (set_exception_parameter_decl): New macro.
548 * gcc-interface/trans.c (gigi): Initialize set_exception_parameter_decl.
549 (Exception_Handler_to_gnu_zcx): Initialize the choice parameter.
550 * gcc-interface/trans.c: Synchronize declarations of other/all others
551 between gigi and the runtime.
553 2013-10-14 Robert Dewar <dewar@adacore.com>
555 * exp_attr.adb (Find_Stream_Subprogram): Optimize
556 Storage_Array stream handling.
557 (Find_Stream_Subprogram): Optimize Stream_Element_Array stream handling
558 * rtsfind.ads: Add entry for Stream_Element_Array Add
559 entries for RE_Storage_Array subprograms Add entries for
560 RE_Stream_Element_Array subprograms
561 * s-ststop.ads, s-ststop.adb: Add processing for System.Storage_Array.
562 Add processing for Ada.Stream_Element_Array.
564 2013-10-14 Tristan Gingold <gingold@adacore.com>
566 * a-except-2005.ads, a-except-2005.adb:
567 (Get_Exception_Machine_Occurrence): New function.
568 * raise-gcc.c (__gnat_unwind_exception_size): New constant.
570 2013-10-14 Robert Dewar <dewar@adacore.com>
572 * sem_res.adb: Minor fix to error message text.
573 * errout.ads, erroutc.ads: Minor reformatting.
574 * s-ststop.ads, s-stratt.ads: Clean up documentation of block IO
576 * s-stratt-xdr.adb: Minor comment update.
578 2013-10-14 Robert Dewar <dewar@adacore.com>
580 * sem_aux.adb, sem_aux.ads, sem_prag.adb: Minor reformatting.
582 2013-10-14 Ed Schonberg <schonberg@adacore.com>
584 * sem_res.adb (Resolve_Actuals): Add error message for a
585 subprogram with an in-out parameter when used in a predicate,
586 to clarify subsequent error at the point of call.
588 2013-10-14 Hristian Kirtchev <kirtchev@adacore.com>
590 * sem_prag.adb (Is_Matching_Input): Consume a matching null input.
592 2013-10-14 Robert Dewar <dewar@adacore.com>
594 * freeze.adb (Freeze_Record): Don't give warning about packed
595 and foreign convention.
597 2013-10-14 Ed Schonberg <schonberg@adacore.com>
599 * sem_aux.adb, sem_aux.ads (Package_Specification): New function, to
600 replace the less efficient idiom Specification.
601 (Unit_Declaration_Node (Pack_Id)), which handles library units and
603 * sem_ch3.adb, sem_ch10.adb, sem_prag.adb, sem_ch12.adb, sem_ch6.adb,
604 exp_disp.adb, sem_cat.adb, exp_dist.adb: Use Package_Specification.
606 2013-10-14 Hristian Kirtchev <kirtchev@adacore.com>
608 * exp_attr.adb (Expand_Update_Attribute): Update the call to
609 Process_Range_Update.
610 (Process_Range_Update): Add new formal parameter Typ and associated
611 comment on usage. Add local constant Index_Typ. Add a type conversion
612 as part of the indexed component to ensure that the loop variable
613 corresponds to the index type.
615 2013-10-14 Tristan Gingold <gingold@adacore.com>
617 * a-exexpr-gcc.adb: Adjust comment.
618 (Others_Value, All_Others_Value,
619 Unhandled_Others_Value): Declare as Character to slightly reduce
622 2013-10-14 Robert Dewar <dewar@adacore.com>
624 * freeze.adb (Size_Known): Size is not known for packed record
625 with aliased components
627 2013-10-14 Robert Dewar <dewar@adacore.com>
629 * sem_ch3.adb: Minor fix to error message.
630 * a-exexpr-gcc.adb, sem_util.adb, sem_case.adb, exp_ch11.adb: Minor
633 2013-10-14 Arnaud Charlet <charlet@adacore.com>
635 * exp_ch11.adb: Fix typo.
637 2013-10-14 Thomas Quinot <quinot@adacore.com>
639 * exp_util.ads: Minor reformatting.
641 2013-10-14 Ed Schonberg <schonberg@adacore.com>
643 * sem_ch3.adb (Build_Derived_Record_Type): Reject full views
644 with no explicit discriminant constraints, when the parents of
645 the partial view and the full view are constrained subtypes with
646 different constraints.
648 2013-10-14 Robert Dewar <dewar@adacore.com>
650 * freeze.adb (Freeze_Array_Type): New procedure, abstracts out
651 this code from Freeze.
652 (Freeze_Array_Type): Detect pragma Pack overriding foreign convention
653 (Freeze_Record_Type): Ditto.
655 2013-10-14 Hristian Kirtchev <kirtchev@adacore.com>
657 * sem_prag.adb (Analyze_Dependency_Clause): Add new local variable
658 Non_Null_Output_Seen. Update the call to Analyze_Input_Output.
659 (Analyze_Input_Item): Streamline the detection mechanism of null and
661 (Analyze_Input_List): Add new local variable
662 Non_Null_Input_Seen. Update all calls to Analyze_Input_Output.
663 (Analyze_Input_Output): Add new formal parameter Non_Null_Seen
664 and update the related comment on usage. Update the
665 recursive call to itself. Attribute 'Result is now treated
666 as a non-null item. Detect mixes of null and non-null items.
667 (Analyze_Initialization_Item): Streamline the detection mechanism
668 of null and non-null items.
670 2013-10-14 Vincent Celier <celier@adacore.com>
672 * projects.texi: Add documentation for the new project level
673 attribute Library_Rpath_Options.
675 2013-10-14 Tristan Gingold <gingold@adacore.com>
677 * a-exexpr-gcc.adb (Set_Exception_Parameter): New procedure.
678 (Set_Foreign_Occurrence): New procedure, extracted from
680 * exp_ch11.adb (Expand_Exception_Handlers): Do not expand choice
681 parameter in case of zcx.
682 * sem_ch11.adb (Analyze_Exception_Handlers): Need debug info
683 for the choice parameter.
684 * raise-gcc.c: Add comments.
686 2013-10-14 Hristian Kirtchev <kirtchev@adacore.com>
688 * aspects.adb: Add an entry in table Canonical_Aspect for
690 * aspects.ads: Add entries in tables Aspect_Id, Aspect_Argument,
691 Aspect_Names and Aspect_Delay for Initial_Condition.
692 * einfo.adb (Get_Pragma): Include pragma Initial_Condition to
693 categorization pragmas.
694 * einfo.ads (Get_Pragma): Update comment on usage.
695 * exp_ch7.adb (Expand_N_Package_Body): Add a runtime check to
696 verify the assertion introduced by pragma Initial_Condition.
697 (Expand_N_Package_Declaration): Add a runtime check to
698 verify the assertion introduced by pragma Initial_Condition.
699 (Expand_Pragma_Initial_Condition): New routine.
700 * par-prag: Include pragma Initial_Condition to the list of
701 pragmas that do not require special processing by the parser.
702 * sem_ch3.adb (Analyze_Declarations): Analyze pragma
703 Initial_Condition at the end of the visible declarations.
704 * sem_ch13.adb (Analyze_Aspect_Specifications): Add processing
705 for aspect Initial_Condition.
706 (Check_Aspect_At_Freeze_Point):
707 Aspect Initial_Condition does not need inspection at freezing.
708 * sem_prag.adb (Analyze_Initial_Condition_In_Decl_Part):
710 (Analyze_Pragma): Update all calls
711 to Check_Declaration_Order. Add processing for pragma
712 Initial_Condition. Initial_Condition is now a valid assertion
713 kind. Add an entry in table Sig_Flags for Initial_Condition.
714 (Check_Declaration_Order): Reimplemented to handle arbitrary
716 (Is_Valid_Assertion_Kind): Add an entry for
718 * sem_pag.ads (Analyze_Initial_Condition_In_Decl_Part):
720 * sem_util.adb (Add_Contract_Item): Pragma Initial_Condition
721 can now be associated with a package spec.
722 * sem_util.ads (Add_Contract_Item): Update comment on usage.
723 * sinfo.ads: Update the documentation of node N_Contract
724 * snames.ads-tmpl: Add new predefined name Initial_Condition. Add
725 new pragma id for Initial_Condition.
727 2013-10-14 Thomas Quinot <quinot@adacore.com>
729 * exp_pakd.adb: Minor reformatting.
731 2013-10-14 Robert Dewar <dewar@adacore.com>
733 * exp_prag.adb: Minor reformatting.
735 2013-10-14 Ed Schonberg <schonberg@adacore.com>
737 * sem_case.adb (Check_Against_Predicate): Handle properly an
738 others clause in various cases.
740 2013-10-14 Hristian Kirtchev <kirtchev@adacore.com>
742 * sem_prag.adb (Check_Matching_Constituent): Do
743 not inspect the hidden states if there are no hidden states. This
744 case arises when the constituents are states coming from a
747 2013-10-14 Doug Rupp <rupp@adacore.com>
749 * init.c [ARMEL and VxWorks] (__gnat_map_signal): Re-arm guard
750 page by clearing VALID bit vice setting page protection.
752 2013-10-14 Arnaud Charlet <charlet@adacore.com>
754 * gnat_rm.texi, adaint.c: Fix typo.
756 2013-10-14 Ed Schonberg <schonberg@adacore.com>
758 * sem_util.adb (Is_Variable, In_Protected_Function): In the
759 body of a protected function, the protected object itself is a
760 constant (not just its components).
762 2013-10-14 Vincent Celier <celier@adacore.com>
764 * snames.ads-tmpl: Add new standard name Library_Rpath_Options.
766 2013-10-14 Tristan Gingold <gingold@adacore.com>
768 * sem_prag.adb (Process_Import_Or_Interface): Allow importing
769 of exception using convention Cpp.
770 * exp_prag.adb (Expand_Pragma_Import_Or_Interface): Expand cpp
772 * raise-gcc.c (is_handled_by): Filter C++ exception occurrences.
773 * gnat_rm.texi: Document how to import C++ exceptions.
775 2013-10-14 Jose Ruiz <ruiz@adacore.com>
777 * sem_ch13.adb (Sem_Ch13.Analyze_Aspect_Specification): For
778 Priority and CPU aspects, when checking, issue a warning only
779 if it is obviously not a main program.
781 2013-10-14 Tristan Gingold <gingold@adacore.com>
783 * adaint.c: Fix condition for AIX. Minor reformatting.
785 2013-10-14 Robert Dewar <dewar@adacore.com>
787 * sem_ch3.adb, sem_prag.adb, prj.ads: Minor reformatting.
789 2013-10-14 Hristian Kirtchev <kirtchev@adacore.com>
791 * sem_prag.adb (Analyze_Depends_In_Decl_Part):
792 Rename Outputs_Seen to All_Outputs_Seen and update all occurrences
794 (Analyze_Input_Output): Add an item to
795 All_Inputs_Seen when it is an input or a self-referential output.
796 (Check_Mode): Comment reformatting.
797 (Analyze_Abstract_State): Remove the restriction that an Export state
798 must also have mode Input_Only or Output_Only.
800 2013-10-14 Hristian Kirtchev <kirtchev@adacore.com>
802 * einfo.adb: Flag 263 is now known as Has_Visible_Refinement.
803 (Has_Non_Null_Refinement): New routine.
804 (Has_Null_Refinement): The routine is now synthesized.
805 (Has_Visible_Refinement): New routine.
806 (Set_Has_Visible_Refinement): New routine.
807 (Write_Entity_Flags): Remove the output for
808 Has_Null_Refinement. Add output for Has_Visible_Refinement.
809 * einfo.ads: Update the occurrences of Has_Non_Null_Refinement,
810 Has_Null_Refinement and Has_Visible_Refinement in entities.
811 (Has_Non_Null_Refinement): New synthesized attribute.
812 (Has_Null_Refinement): This attribute is now synthesized.
813 (Has_Visible_Refinement): New routine with corresponding
815 (Set_Has_Visible_Refinement): New routine with corresponding pragma
817 * sem_ch3.adb (Analyze_Declarations): Add new local
818 variable In_Package_Body. Remove state refinements from
819 visibility at the end of the package body declarations.
820 (Remove_Visible_Refinements): New routine.
821 * sem_prag.adb (Analyze_Constituent): Collect a null
822 constituent and mark the state as having visible refinement.
823 (Analyze_Global_Item): Use attribute Has_Visible_Refinement to
824 detect a state with visible refinement.
825 (Analyze_Input_Output): Use attribute Has_Visible_Refinement to detect
826 a state with visible refinement.
827 (Check_Dependency_Clause): Use attribute Has_Non_Null_Refinement rather
828 than checking the contents of list Refinement_Constituents.
829 (Check_In_Out_States): Use attribute Has_Non_Null_Refinement rather
830 than checking the contents of list Refinement_Constituents.
831 (Check_Input_States): Use attribute Has_Non_Null_Refinement rather
832 than checking the contents of list Refinement_Constituents.
833 (Check_Matching_Constituent): Mark a state as having visible refinement.
834 (Check_Output_States): Use attribute Has_Non_Null_Refinement rather than
835 checking the contents of list Refinement_Constituents.
836 (Check_Refined_Global_Item): Use attribute Has_Visible_Refinement
837 to detect a state with visible refinement.
838 (Is_Matching_Input): Use attribute Has_Non_Null_Refinement rather than
839 checking the contents of list Refinement_Constituents.
840 * sem_util.adb (Is_Refined_State): Use attribute
841 Has_Visible_Refinement to detect a state with visible refinement.
843 2013-10-14 Hristian Kirtchev <kirtchev@adacore.com>
845 * sem_prag.adb (Check_Mode): Do not emit an
846 error when inspecting a self referencial output item of an
849 2013-10-14 Tristan Gingold <gingold@adacore.com>
851 * exp_prag.adb (Expand_Pragma_Import_Export_Exception): Fix
852 target type for code of VMS imported exception.
853 * init.c: Replace Exception_Code by void *.
854 * s-vmexta.adb (Hash, Base_Code_In): Adjust code after changing
855 the type of Exception_Code.
857 2013-10-14 Vincent Celier <celier@adacore.com>
859 * prj.ads: Minor comment updates.
860 * prj-attr.adb: New attribute Library_Rpath_Options.
862 2013-10-14 Robert Dewar <dewar@adacore.com>
864 * gnat_rm.texi: Library_Level attribute now applies to an
866 * sem_attr.adb (Analyze_Attribute, case Library_Level): Prefix
867 is now an entity name.
869 2013-10-14 Jose Ruiz <ruiz@adacore.com>
871 * sem_ch13.adb (Analyze_Aspect_Specification): For
872 Priority and CPU aspects in subprograms, the expression in the
873 aspect is analyzed and exported.
875 2013-10-14 Robert Dewar <dewar@adacore.com>
877 * s-valuti.adb, prep.adb, scng.adb, errout.adb: Minor reformatting.
879 2013-10-14 Eric Botcazou <ebotcazou@adacore.com>
881 * adaint.c: Further disable __gnat_get_executable_load_address
884 2013-10-14 Vincent Celier <celier@adacore.com>
886 * gnat_ugn.texi: Add documentation for comparing symbols to
887 integers in preprocessing expressions.
889 2013-10-14 Jose Ruiz <ruiz@adacore.com>
891 * sem_prag.adb (Analyze_Aspect_Specification): For
892 Priority and CPU aspects in subprograms, the expression in the
893 aspect is analyzed and exported.
894 (Analyze_Pragma): When having a Priority pragma in the
895 main subprogram, load a unit that will force the initialization
896 of the tasking run time, which is needed for setting the required
899 2013-10-14 Vincent Celier <celier@adacore.com>
901 * prj-nmsc.adb (Check_Interfaces): Put in Other_Interfaces all
902 non Ada interface files.
903 * prj.ads (Project_Data): New component Other_Interfaces.
905 2013-10-14 Arnaud Charlet <charlet@adacore.com>
907 * gcc-interface/Makefile.in: Target pairs clean ups.
909 2013-10-14 Vincent Celier <celier@adacore.com>
911 * errout.adb (Write_Error_Summary): Do not output the number
912 of lines when Main_Source_File is unknown.
913 (Output_Messages): Do not write the header when Main_Source_File is
916 2013-10-14 Vincent Celier <celier@adacore.com>
918 * prep.adb (Expression): Accept terms of the form 'symbol <relop>
919 integer", where relop is =, <, <=, > or >=.
920 (Parse_Def_File): Accept literal integer values.
921 * gcc-interface/Make-lang.in: Add s-valint.o, s-valuns.o and
922 s-valuti.o to the compiler object files.
924 2013-10-14 Robert Dewar <dewar@adacore.com>
926 * exp_prag.adb, exp_ch11.adb, s-exctab.adb: Minor reformatting.
927 * usage.adb: Add line for -gnateu switch.
929 2013-10-14 Vincent Celier <celier@adacore.com>
931 * lib-writ.ads: Add comments to indicate that a path name in
932 D lines may be quoted if the path name includes directories
935 2013-10-14 Robert Dewar <dewar@adacore.com>
937 * debug.adb: Document -gnatd.E.
938 * gnat1drv.adb (Adjust_Global_Switches): Set Error_To_Warning
940 * opt.ads (Error_To_Warning): New switch.
941 * osint.adb: Minor reformatting.
942 * sem_warn.adb (Warn_On_Overlapping_Actuals): Overlap is error
943 in some cases in Ada 2012 mode (unless Error_To_Warning) is set.
944 * sem_warn.ads (Warn_On_Overlapping_Actuals): Document error
947 2013-10-14 Tristan Gingold <gingold@adacore.com>
949 * cstand.adb: Add a comment for Standard_Exception_Type.
951 2013-10-14 Ed Schonberg <schonberg@adacore.com>
953 * exp_ch4.adb (Process_Transient_Object): If a transient scope
954 has already been created, use the corresponding Node_To_Be_Wrapped
955 as the insertion point for the controlled actions.
957 2013-10-14 Tristan Gingold <gingold@adacore.com>
959 * cstand.adb (Create_Standard): Change Import_Code component
960 of Standard_Exception_Type to Foreign_Data. Its type is now
961 Standard_A_Char (access to character).
962 * exp_prag.adb (Expand_Pragma_Import_Export_Exception): Adjust
963 definition of Code to match the type of Foreign_Data.
964 * s-stalib.ads (Exception_Data): Replace Import_Code by Foreign_Data
965 Change the definition of standard predefined exceptions.
966 (Exception_Code): Remove.
967 * raise.h (Exception_Code): Remove (Exception_Data): Replace
968 Import_Code field by Foreign_Data.
969 * rtsfind.ads (RE_Exception_Code): Remove
970 (RE_Import_Address): Add.
971 * a-exexpr-gcc.adb (Import_Code_For): Replaced by Foreign_Data_For.
972 * exp_ch11.adb (Expand_N_Exception_Declaration): Associate null
973 to Foreign_Data component.
974 * raise-gcc.c (Import_Code_For): Replaced by Foreign_Data_For.
975 (is_handled_by): Add comments. Use replaced function. Change
976 condition so that an Ada occurrence is never handled by
978 * s-exctab.adb (Internal_Exception): Associate Null_Address to
979 Foreign_Data component.
980 * s-vmexta.adb, s-vmexta.ads (Exception_Code): Declare Replace
981 SSL.Exception_Code by Exception_Code.
983 2013-10-14 Robert Dewar <dewar@adacore.com>
985 * gnat_ugn.texi: Document -gnateu switch.
986 * opt.ads (Ignore_Unrecognized_VWY_Switches): New switch.
987 * stylesw.adb: Ignore unrecognized switch if
988 Ignore_Unrecognized_VWY_Switches set.
989 * switch-c.adb: Implement -gnateu (sets
990 Ignore_Unrecognized_VWY_Switches).
991 * validsw.adb: Ignore unrecognized switch if
992 Ignore_Unrecognized_VWY_Switches set.
993 * warnsw.adb: Ignore unrecognized switch if
994 Ignore_Unrecognized_VWY_Switches set.
996 2013-10-14 Robert Dewar <dewar@adacore.com>
998 * exp_prag.adb, sem_prag.adb, a-exexda.adb, s-vmexta.ads: Minor
1001 2013-10-14 Vincent Celier <celier@adacore.com>
1003 * ali.adb (Get_File_Name): New Boolean parameter May_Be_Quoted,
1004 defaulted to False. Calls Get_Name with May_Be_Quoted.
1005 (Get_Name): New Boolean parameter May_Be_Quoted, defaulted to
1006 False. If May_Be_Quoted is True and first non blank charater is
1007 '"', unquote the name.
1008 (Scan_ALI): For the file/path name on the D line, call Get_File_Name
1009 with May_Be_Quoted = True, as it may have been quoted.
1010 * lib-util.adb, lib-util.ads (Write_Info_Name_May_Be_Quoted): New
1011 procedure to write file/path names that may contain spaces and if they
1013 * lib-writ.adb (Write_ALI): Use new procedure
1014 Write_Info_Name_May_Be_Quoted to write file/path names on D lines.
1016 2013-10-14 Hristian Kirtchev <kirtchev@adacore.com>
1018 * sem_prag.adb (Analyze_Depends_In_Decl_Part,
1019 Analyze_Global_In_Decl_Part,
1020 Analyze_Pre_Post_Condition_In_Decl_Part): Install the subprogram
1021 and its formals only when it is not already installed.
1022 * sem_util.adb (Is_Refined_State): A state is refined when it
1023 has a non-empty list of constituents.
1025 2013-10-14 Tristan Gingold <gingold@adacore.com>
1027 * adaint.c: Disable __gnat_get_executable_load_address for linux.
1028 * exp_prag.adb: Add comment in Expand_Pragma_Import_Export_Exception.
1030 2013-10-14 Tristan Gingold <gingold@adacore.com>
1032 * s-vmexta.ads: Add comments.
1034 2013-10-14 Hristian Kirtchev <kirtchev@adacore.com>
1036 * sem_ch6.adb (Analyze_Subprogram_Body_Contract): Add processing
1037 for pragma Refined_State.
1038 * sem_ch13.adb (Analyze_Aspect_Specifications): Add processing
1039 for aspect Refined_Depends.
1040 * sem_prag.adb (Analyze_Contract_Cases_In_Decl_Part):
1041 Use Find_Related_Subprogram_Or_Body to find the related
1042 context. Use the current scope when determining whether to
1043 ensure proper visibility.
1044 (Analyze_Depends_In_Decl_Part):
1045 Add local variable Spec_Id. Update the comment on usage of
1046 Subp_Id. Use Find_Related_Subprogram_Or_Body to find the
1047 related context. Extract the corresponding spec of the body
1048 (if any). Use the current scope when determining when to
1049 ensure proper visibility.
1050 (Analyze_Global_In_Decl_Part):
1051 Add local variable Spec_Id. Update the comment on usage of
1052 Subp_Id. Use Find_Related_Subprogram_Or_Body to find the
1053 related context. Extract the corresponding spec of the body
1054 (if any). Use the current scope when determining when to
1055 ensure proper visibility.
1056 (Analyze_Global_Item): Use the
1057 entity of the subprogram spec when performing formal parameter
1058 checks. Perform state-related checks.
1059 (Analyze_Input_Output):
1060 Use Is_Attribute_Result to detect 'Result. Query the
1061 entity of a subprogram spec when verifying the prefix of
1062 'Result. Perform state-related checks. (Analyze_Pragma):
1063 Merge the analysis of Refined_Depends and Refined_Global.
1064 (Analyze_Refined_Depends_In_Decl_Part): Provide implemenation.
1065 (Analyze_Refined_Global_In_Decl_Part): Move state-related checks
1066 to the body of Analyze_Global_In_Decl_Part. Rename local constant
1067 List to Items. (Analyze_Refined_Pragma): Remove circuitry to
1068 find the proper context, use Find_Related_Subprogram_Or_Body
1070 (Check_Function_Return): Query the entity of
1071 the subprogram spec when verifying the use of 'Result.
1072 (Check_In_Out_States, Check_Input_States, Check_Output_States):
1073 Avoid using Has_Null_Refinement to detect a state with
1074 a non-null refinement, use the Refinement_Constituents
1076 (Check_Matching_Constituent): Remove initialization code.
1077 (Check_Mode_Restriction_In_Function): Use the entity of the subprogram
1078 spec when verifying mode usage in functions.
1079 (Collect_Global_Items): New routine.
1080 (Collect_Subprogram_Inputs_Outputs): Add local
1081 variable Spec_Id. Add circuitry for bodies-as-specs. Use
1082 pragma Refined_Global when collecting for a body.
1083 (Create_Or_Modify_Clause): Use the location of the
1084 clause. Rename local variable Clause to New_Clause to avoid
1085 confusion and update all occurrences. Use Is_Attribute_Result
1087 (Find_Related_Subprogram): Removed.
1088 (Find_Related_Subprogram_Or_Body): New routine.
1089 (Is_Part_Of): Move routine to top level.
1090 (Normalize_Clause): Update the
1091 comment on usage. The routine can now normalize a clause with
1092 multiple outputs by splitting it.
1093 (Collect_Global_Items):
1094 Rename local constant List to Items. Remove the check for
1096 (Requires_Profile_Installation): Removed.
1097 (Split_Multiple_Outputs): New routine.
1098 * sem_prag.ads: Update the comments on usage of various
1099 pragma-related analysis routines.
1100 * sem_util.adb (Contains_Refined_State): The routine can now
1101 process pragma [Refined_]Depends.
1102 (Has_Refined_State): Removed.
1103 (Has_State_In_Dependency): New routine.
1104 (Has_State_In_Global): New routine.
1105 (Is_Attribute_Result): New routine.
1106 * sem_util.ads (Is_Attribute_Result): New routine.
1108 2013-10-14 Emmanuel Briot <briot@adacore.com>
1110 * s-regpat.adb (Compile): Fix finalization of the automaton
1111 when its size was automatically computed to be exactly 1000 bytes.
1113 2013-10-14 Ed Schonberg <schonberg@adacore.com>
1115 * sem_ch3.adb (Complete_Private_Subtype): If the full view of
1116 the base type is constrained, the full view of the subtype is
1117 known to be constrained as well.
1119 2013-10-14 Vincent Celier <celier@adacore.com>
1121 * projects.texi: Add documentation for new attributes of package
1122 Clean: Artifacts_In_Object_Dir and Artifacts_In_Exec_Dir.
1124 2013-10-14 Tristan Gingold <gingold@adacore.com>
1126 * adaint.c, adaint.h (__gnat_get_executable_load_address):
1128 * a-exexda.adb (Append_Info_Basic_Exception_Traceback): Add
1129 executable load address (Basic_Exception_Tback_Maxlength): Adjust.
1131 2013-10-14 Vincent Celier <celier@adacore.com>
1133 * prj-attr.adb: New attributes in package Clean:
1134 Artifacts_In_Exec_Dir, Artifacts_In_Object_Dir.
1135 * prj-nmsc.adb (Process_Clean (Attributes)): New
1136 procedure to process attributes Artifacts_In_Exec_Dir and
1137 Artifacts_In_Object_Dir in package Clean.
1138 * prj.ads (Project_Configuration): New components
1139 Artifacts_In_Exec_Dir and Artifacts_In_Object_Dir.
1140 * snames.ads-tmpl: New standard names Artifacts_In_Exec_Dir and
1141 Artifacts_In_Object_Dir used only by gprclean.
1143 2013-10-14 Robert Dewar <dewar@adacore.com>
1145 * exp_attr.adb (Expand_N_Attribute_Reference): Add error
1146 entry for Library_Level attribute (which should not survive
1148 * gnat_rm.texi: Document attribute Library_Level
1149 * sem_attr.adb (Analyze_Attribute, case Library_Level): Implement
1150 this new attribute (Set_Boolean_Result): Replaces Set_Result
1151 (Check_Standard_Prefix): Document that Check_E0 is called
1152 (Check_System_Prefix): New procedure
1153 * snames.ads-tmpl: Add entry for Library_Level attribute
1155 2013-10-14 Robert Dewar <dewar@adacore.com>
1157 * exp_ch6.adb, sinfo.ads: Minor reformatting.
1158 * checks.adb (Overlap_Check): Use identifier casing in messages.
1160 2013-10-14 Robert Dewar <dewar@adacore.com>
1162 * einfo.ads, einfo.adb (Default_Aspect_Component_Value): Is on base type
1164 * exp_aggr.adb (Expand_Array_Aggregate): Handle proper
1165 initialization of <> component.
1166 * exp_ch3.adb, exp_tss.adb: Minor reformatting
1167 * sem_ch13.adb (Default_Aspect_Component_Value, Default_Aspect_Value):
1168 Is on base type only.
1169 * sinfo.ads: Minor comment revision.
1171 2013-10-14 Robert Dewar <dewar@adacore.com>
1173 * g-decstr.adb (Decode_Wide_Wide_Character): Fix failure
1174 to detect invalid sequences where longer than necessary
1175 sequences are used for encoding.
1176 (Validate_Wide_Character):
1177 Call Decode_Wide_Character to get the above validations.
1178 (Validate_Wide_Wide_Character): Same fix
1179 * g-decstr.ads: Add documentation making it clear that the UTF-8
1180 implementation here recognizes all valid UTF-8 sequences, rather
1181 than the well-formed subset corresponding to characters defined
1183 (Next_Wide_Character): Remove comment about this
1184 being more efficient than Decode_Wide_Character (because this
1185 no longer the case).
1186 (Prev_Wide_Character): Add note that valid encoding is assumed.
1188 2013-10-14 Robert Dewar <dewar@adacore.com>
1190 * a-wichha.adb (Character_Set_Version): New function.
1191 * a-wichha.ads: Remove comments for pragma Pure (final RM has
1193 (Character_Set_Version): New function.
1194 * gnat_rm.texi: Update doc.
1196 2013-10-14 Hristian Kirtchev <kirtchev@adacore.com>
1198 * einfo.adb: Flag263 is now known as Has_Null_Refinement.
1199 (Has_Null_Refinement): New routine.
1200 (Set_Has_Null_Refinement): New routine.
1201 (Write_Entity_Flags): Output the status of flag
1202 Has_Null_Refinement.
1203 * einfo.ads: Add new flag Has_Null_Refinement along with
1204 comment on usage and update all nodes subject to the flag.
1205 (Has_Null_Refinement): New routine along with pragma Inline.
1206 (Set_Has_Null_Refinement): New rouitine along with pragma Inline.
1207 * sem_prag.adb (Analyze_Constituent): Mark a state as having
1208 a null refinement when the sole constituent is "null".
1209 (Analyze_Global_List): Handle null input/output items.
1210 (Analyze_Refined_Global_In_Decl_Part): Add local variable
1211 Has_Null_State. Add logic to handle combinations of states
1212 with null refinements and null global lists and/or items.
1213 (Check_In_Out_States, Check_Input_States, Check_Output_States):
1214 Use attribute Has_Null_Refinement to detect states with
1216 (Check_Refined_Global_List): Handle null input/output items.
1217 (Process_Global_Item): Handle states with null refinements.
1218 (Process_Global_List): Handle null input/output items.
1220 2013-10-14 Robert Dewar <dewar@adacore.com>
1222 * freeze.adb (Freeze_Entity): Reset Is_True_Constant for
1224 * gnat_ugn.texi: Update doc on aliased variables and constants.
1226 2013-10-14 Ed Schonberg <schonberg@adacore.com>
1228 * exp_pakd.adb (Expand_Packed_Element_Reference): If the
1229 reference is an actual in a call, the prefix has not been fully
1230 expanded, to account for the additional expansion for parameter
1231 passing. the prefix itself is a packed reference as well,
1232 recurse to complete the transformation of the prefix.
1234 2013-10-14 Eric Botcazou <ebotcazou@adacore.com>
1236 * exp_dbug.adb (Debug_Renaming_Declaration): Do not
1237 materialize the entity when the renamed object contains an
1238 N_Explicit_Dereference.
1239 * sem_ch8.adb (Analyze_Object_Renaming):
1240 If the renaming comes from source and the renamed object is a
1241 dereference, mark the prefix as needing debug information.
1243 2013-10-14 Doug Rupp <rupp@adacore.com>
1245 * system-vxworks-arm.ads (Stack_Check_Probes, Stack_Check_Limits):
1246 Enable Stack Probes, Disable Stack Limit Checking.
1247 * init.c [VxWorks] (__gnat_inum_to_ivec): Caste return value.
1248 (__gnat_map_signal): Fix signature.
1249 (__gnat_error_handler): Make
1250 static, fix signature, remove prototype, fix prototype warning.
1251 [ARMEL and VxWorks6] (__gnat_map_signal): Check and re-arm guard
1252 page for storage_error.
1253 * exp_pakd.adb: Minor reformatting.
1255 2013-10-14 Hristian Kirtchev <kirtchev@adacore.com>
1257 * sem_prag.adb (Analyze_Global_In_Decl_Part): Remove local
1258 variable Contract_Seen. Add local variable Proof_Seen.
1259 (Analyze_Global_List): Remove the processing for mode
1260 Contract_In. Add support for mode Proof_In.
1261 (Analyze_Pragma): Update the grammar of pragmas Global and
1263 * snames.ads-tmpl: Remove predefined name Contract_In. Add
1264 predefined name Proof_In.
1266 2013-10-14 Robert Dewar <dewar@adacore.com>
1268 * exp_prag.adb (Expand_Pragma_Check): Generate proper string
1270 * gnat_rm.texi: Add documentation for pragmas
1271 Type_Invariant[_Class]
1272 * par-prag.adb: Add entries for pragmas Type_Invariant[_Class]
1273 * sem_ch13.adb: Minor reformatting
1274 * sem_prag.adb: Implement pragmas Type_Invariant[_Class]
1275 * snames.ads-tmpl: Add entries for pragmas Type_Invariant[_Class]
1277 2013-10-14 Johannes Kanig <kanig@adacore.com>
1279 * debug.adb: Release now unused debug switches that were only
1280 relevant for gnat2why backend, not the frontend
1281 * frontend.adb (Frontend) Do not stop when -gnatd.H is present,
1284 2013-10-14 Hristian Kirtchev <kirtchev@adacore.com>
1286 * sem_prag.adb (Analyze_Global_Item): Allow
1287 references to enclosing formal parameters.
1289 2013-10-14 Thomas Quinot <quinot@adacore.com>
1291 * einfo.adb (Equivalent_Type): Add missing case
1292 E_Access_Subprogram_Type in guard (for remote access to
1293 subprograms) * sem_ch8.adb (Find_Direct_Name, Find_Expanded_Name):
1294 Add missing guards to account for the presence of RAS types
1295 that have already been replaced with the corresponding fat
1298 2013-10-14 Hristian Kirtchev <kirtchev@adacore.com>
1300 * aspects.adb: Add an entry in table Canonical_Aspect for
1302 * aspects.ads: Add entries in tables Aspect_Id, Aspect_Argument,
1303 Aspect_Names and Aspect_Delay for Initializes.
1304 * atree.ads, atree.adb (Ekind_In): New seven argument versions of the
1306 * einfo.adb: Remove Refined_State_Pragma from the list of node
1307 usage. Finalizer is now at position 28.
1309 and package bodies now have a contract.
1311 the assertion and node usage.
1312 (Get_Pragma): Update the Is_CDG
1313 flag to include Abstract_State, Initializes and Refined_State.
1314 (Refined_State_Pragma): Removed.
1315 (Set_Contract): Package and
1316 package bodies now have a contract.
1317 (Set_Finalizer): Update the
1318 assertion and node usage.
1319 (Set_Refined_State_Pragma): Removed.
1320 (Write_Field8_Name): Remove the output for Refined_State_Pragma.
1321 (Write_Field24_Name): Remove the output for Finalizer. Package
1322 and package bodies now have a contract.
1323 (Write_Field28_Name):
1324 Add output for Finalizer.
1325 * einfo.ads: Update the documentation and usage in entities
1326 of attribute Contract. Update the node position and usage in
1327 entities of attribute Finalizer. Remove the documentation
1328 and usage in entities for attribute Refined_State_Pragma.
1329 (Refined_State_Pragma): Removed along with pragma Inline.
1330 (Set_Refined_State_Pragma): Removed along with pragma Inline.
1331 * par-prag.adb: Add Initializes to the pragmas that do not
1332 require special processing by the parser.
1333 * sem_ch3.adb (Analyze_Declarations): Add local variable
1334 Prag. Update the retrieval of pragma Refined_State. Analyze
1335 aspect/pragma Initializes at the end of the visible declarations
1336 of the related package.
1337 * sem_ch6.adb (Analyze_Subprogram_Body_Contract):
1338 Add local variables Ref_Depends and Ref_Global. Analyze
1339 pragmas Refined_Global and Refined_Depends in that order.
1340 (Analyze_Subprogram_Contract): Add local variables Depends and
1341 Global. Analyze pragmas Global and Depends in that order.
1342 * sem_ch7.adb (Analyze_Package_Body_Helper): Package
1343 bodies now have a contract. Move the analysis of the aspect
1344 specifications after the defining entity has been decorated.
1345 (Analyze_Package_Declaration): Packages now have a contract. Move
1346 the analysis of the aspect specifications after the defining
1347 entity has been decorated.
1348 * sem_ch12.adb (Analyze_Generic_Package_Declaration): Packages
1350 * sem_ch13.adb (Analyze_Pragma): Code cleanup for aspect
1351 Abstract_State. Add processing for aspect Initializes.
1352 (Check_Aspect_At_Freeze_Point): Add an entry for Initializes.
1353 * sem_prag.adb: Use Get_Pragma_Arg to extract the expression
1354 of a pragma argument. Add an entry in table Sig_Flags for
1356 (Analyze_Initializes_In_Decl_Part): New routine.
1357 (Analyze_Pragma): Check the declaration order of pragmas
1358 Abstract_State and Initializes. Abstract_State is now part of
1359 the package contract. Analyze pragma Initializes. Check for
1360 duplicate Refined_State pragma. Refined_State is now part of
1361 the package contract.
1362 (Check_Declaration_Order): New routine.
1363 (Check_Test_Case): Alphabetized.
1364 * sem_prag.ads (Analyze_Initializes_In_Decl_Part): New routine.
1365 * sem_util.adb (Add_Contract_Item): Rename formal Subp_Id
1366 to Id. This routine can now support contracts on packages and
1368 * sem_util.ads (Add_Contract_Item): Rename formal Subp_Id to
1369 Id. Update comment on usage.
1370 * sinfo.ads: Update the usage of N_Contract nodes.
1371 * snames.ads-tmpl: Add predefined name Initializes. Add new
1372 pragma id for Initializes.
1374 2013-10-13 Nicolas Roche <roche@adacore.com>
1375 Eric Botcazou <ebotcazou@adacore.com>
1377 * gcc-interface/Make-lang.in (ada/%.o): Replace individual rules with
1378 generic rule and add $(POSTCOMPILE).
1380 (.adb.o): Add @$(ADA_DEPS).
1382 (ada/a-except.o): Likewise.
1383 (ada/s-excdeb.): Likewise.
1384 (ada/s-assert.o): Likewise.
1385 (ada/a-tags.o): Likewise.
1386 (ada_generated_files): New variable.
1387 Use them as dependency order for GNAT1_ADA_OBJS and GNATBIND_OBJS.
1388 (ADA_DEPFILES): New variable.
1392 2013-10-13 Eric Botcazou <ebotcazou@adacore.com>
1394 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Force all local
1395 variables with aggregate types in memory if not optimizing.
1397 2013-10-13 Hristian Kirtchev <kirtchev@adacore.com>
1399 * sem_prag.adb (Check_Mode): Do
1400 not emit an error when we are looking at inputs and
1401 the item is an unconstrained or tagged out parameter.
1402 (Check_Mode_Restriction_In_Enclosing_Context): Use Get_Pragma
1403 to find whether the context is subject to aspect/pragma Global.
1404 (Collect_Subprogram_Inputs_Outputs): Unconstrained or tagged
1405 out parameters are now considered inputs. Use Get_Pragma to
1406 find wheher the subprogram is subject to aspect/pragma Global.
1407 (Is_Unconstrained_Or_Tagged_Item): New routine.
1409 2013-10-13 Thomas Quinot <quinot@adacore.com>
1411 * einfo.ads: Minor reformatting.
1412 * gcc-interface/Make-lang.in: Update dependencies.
1414 2013-10-13 Robert Dewar <dewar@adacore.com>
1416 * gnat_rm.texi: Add documentation for pragmas Pre[_Class]
1418 * par-ch2.adb (Skip_Pragma_Semicolon): Handle extra semicolon nicely.
1419 * par-prag.adb: Add entries for pragmas Pre[_Class] and
1421 * sem_prag.adb: Add handling of pragmas Pre[_Class] and
1423 * sem_util.adb (Original_Aspect_Name): Moved here from
1424 Sem_Prag.Original_Name, and modified to handle pragmas
1425 Pre/Post/Pre_Class/Post_Class.
1426 * sem_util.ads (Original_Aspect_Name): Moved here from
1427 Sem_Prag.Original_Name.
1428 * snames.ads-tmpl: Add entries for pragmas Pre[_Class] and
1431 2013-10-13 Robert Dewar <dewar@adacore.com>
1433 * einfo.adb, sem_ch6.adb: Minor reformatting.
1435 2013-10-13 Hristian Kirtchev <kirtchev@adacore.com>
1437 * einfo.adb: Add node/list usage for Refined_State
1438 and Refinement_Constituents.
1439 (Get_Pragma): Update the
1440 initialization of Is_CDG to include Refined_Global and
1441 Refined_Depends. Rename constant Delayed to In_Contract and update
1442 all of its occurrences.
1443 (Is_Non_Volatile_State): New routine.
1444 (Is_Volatile_State): Removed.
1445 (Refined_State): New routine.
1446 (Refinement_Constituents): New routine.
1447 (Set_Refined_State): New routine.
1448 (Set_Refinement_Constituents): New routine.
1449 (Write_Field8_Name): Add output for Refinement_Constituents.
1450 (Write_Field10_Name): Add output for Refined_State.
1451 * einfo.ads: Add new synthesized attribute Is_Non_Volatile_State.
1452 Remove synthesized attribute Is_Volatile_State. Add new
1453 attributes Refined_State and Refinement_Constituents along with
1455 (Get_Pragma): Update the comment on usage.
1456 (Is_Non_Volatile_State): New routine.
1457 (Is_Volatile_State): Removed.
1458 (Refined_State): New routine and pragma Inline.
1459 (Refinement_Constituents): New routine and pragma Inline.
1460 (Set_Refined_State): New routine and pragma Inline.
1461 (Set_Refinement_Constituents): New routine and pragma Inline.
1462 * elists.ads, elists.adb (Clone): Removed.
1463 (New_Copy_Elist): New routine.
1464 (Remove): New routine.
1465 * sem_ch3.adb (Analyze_Declarations): Use Defining_Entity
1466 to get the entity of the subprogram [body].
1467 (Analyze_Object_Declaration): Add initialization for
1469 * sem_ch6.adb (Analyze_Subprogram_Body_Contract): Add processing
1470 for Refined_Global and Refined_Depends. Emit an error when
1471 the body requires Refined_Global, but the aspect/pragma is
1473 * sem_ch6.ads (Analyze_Subprogram_Body_Contract): Change
1474 procedure signature and add comment on usage.
1475 * sem_ch13.adb (Analyze_Aspect_Specifications): Add processing
1476 for aspect Refined_Global.
1477 * sem_prag.adb (Analyze_Abstract_State): Add initialization
1478 of attributes Refined_State and Refinement_Constituents.
1479 (Analyze_Depends_In_Decl_Part, Analyze_Global_In_Decl_Part,
1480 Analyze_Contract_Cases_In_Decl_Part): Remove local
1482 (Analyze_Pragma): Add processing for pragma
1483 Refined_Global. The analysis of Refined_Post and Refined_Pre
1484 has been merged. Update an error message in the processing of
1485 pragma Refined_State.
1486 (Analyze_Refined_Global_In_Decl_Part): Provide implementation.
1487 (Analyze_Refined_Pragma): New routine.
1488 (Analyze_Refined_Pre_Post_Condition): Removed.
1489 (Analyze_Refined_State_In_Decl_Part): Update the call to Clone.
1490 (Analyze_Refinement_Clause): Make State_Id visible to all
1492 (Check_Matching_Constituent): Establish
1493 a relation between a refined state and its constituent.
1494 (Collect_Hidden_States_In_Decls): Remove ??? comment. Look at
1495 the entity of the object declaration to establish its kind.
1496 * sem_util.adb: Alphabetize with and use clauses.
1497 (Contains_Refined_State): New routine.
1498 * sem_util.ads (Contains_Refined_State): New routine.
1500 2013-10-13 Thomas Quinot <quinot@adacore.com>
1502 * scos.ads: Minor documentation clarification.
1504 2013-10-13 Thomas Quinot <quinot@adacore.com>
1506 * s-oscons-tmplt.c (CLOCK_RT_Ada): Set to CLOCK_MONOTONIC when
1507 building on AIX 5.3 or later, and to CLOCK_REALTIME on older
1509 * init.c (pthread_condattr_setclock): Remove now useless weak symbol.
1510 * thread.c(__gnat_pthread_condattr_setup): Remove bogus AIX 5.2
1512 * s-osinte-aix.ads(clock_id_t): Fix C mapping (this is a 64-bit
1514 (clock_gettime): Import from C runtime library.
1515 * s-osinte-aix.adb (clock_gettime): Remove bogus emulation body,
1516 this routine is provided by the system in current supported
1519 2013-10-13 Robert Dewar <dewar@adacore.com>
1521 * sem_ch3.adb: Minor reformatting.
1523 2013-10-13 Ed Schonberg <schonberg@adacore.com>
1525 * freeze.adb (Freeze_Entity): For a function whose return type
1526 is incomplete, do not replace the type with the full view if the
1527 type is a limited view. In that case the full view appears in a
1528 different unit, and the back-end will retrieve it at the proper
1531 2013-10-13 Yannick Moy <moy@adacore.com>
1533 * exp_spark.adb (Expand_SPARK_Call): Do not introduce temporaries for
1536 2013-10-13 Ed Schonberg <schonberg@adacore.com>
1538 * sem_ch3.adb: in Ada 2012 access_to_function types can have
1540 (Derived_Type_Declaration): SPARK restriction
1541 must be flagged on the original node, since it may have been
1542 written as a subtype declaration.
1543 (Analyze_Subtype_Declaration): Do not enter name of
1544 entity in declaration if it is the current entity, because it may
1545 have been inserted in a previous analysis and it appears in the
1546 else_part of an if-statement that is rewritten during expansion.
1548 2013-10-13 Yannick Moy <moy@adacore.com>
1550 * exp_spark.adb (Expand_SPARK_N_Attribute_Reference): Remove procedure.
1551 (Expand_SPARK): Remove call to Expand_SPARK_N_Attribute_Reference and
1552 Expand_SPARK_N_Simple_Return_Statement.
1553 (Expand_SPARK_N_Simple_Return_Statement,
1554 Expand_SPARK_Simple_Function_Return): Remove procedures.
1556 2013-10-13 Vincent Celier <celier@adacore.com>
1558 * gnat_ugn.texi: Minor editing.
1560 2013-10-13 Ed Schonberg <schonberg@adacore.com>
1562 * sem_ch3.adb (Check_Abstract_Overriding): If a synchronized
1563 operation implements an interface primitive, mark the operation
1564 as referenced, to prevent usually spurious messages about unused
1565 entities: such operations are called in dispatching select
1566 statements that are not visible to the compiler.
1568 2013-10-13 Eric Botcazou <ebotcazou@adacore.com>
1570 * gcc-interface/decl.c (gnat_to_gnu_param): Remove obsolete comment.
1572 2013-10-11 Jakub Jelinek <jakub@redhat.com>
1574 * gcc-interface/utils.c (DEF_FUNCTION_TYPE_8): Define.
1576 2013-10-10 Robert Dewar <dewar@adacore.com>
1578 * par-ch6.adb (Check_Junk_Semicolon_Before_Return): Remove
1581 2013-10-10 Javier Miranda <miranda@adacore.com>
1583 * sem_ch13.adb (Freeze_Entity_Checks): Avoid
1584 loosing errors on CPP entities in -gnatc mode.
1586 2013-10-10 Robert Dewar <dewar@adacore.com>
1588 * sem_ch5.adb (Analyze_If_Statement): Only diagnose redundant
1591 2013-10-10 Robert Dewar <dewar@adacore.com>
1593 * restrict.adb (Check_SPARK_Restriction): Refine test (don't
1594 automatically go to the original node).
1595 * sem_ch11.adb (Analyze_Raise_Statement): Only raise
1596 statements that come from source violate SPARK restrictions.
1597 (Analyze_Raise_xxx_Error): Same fix.
1598 * sem_ch3.adb (Analyze_Object_Declaration): Check OK SPARK
1599 initialization on original node, not on possibly rewritten
1601 * sem_ch4.adb (Analyze_If_Expression): Only if expressions that
1602 come from source violate SPARK mode restrictions.
1604 2013-10-10 Robert Dewar <dewar@adacore.com>
1606 * gnat_ugn.texi: Fix confusing documentation for -gnatyM.
1608 2013-10-10 Yannick Moy <moy@adacore.com>
1610 * errout.adb (Compilation_Errors): In formal verification mode,
1611 always return False.
1613 2013-10-10 Hristian Kirtchev <kirtchev@adacore.com>
1615 * sem_prag.adb (Collect_Hidden_States_In_Decls): Only consider source
1616 non-constant objects.
1618 2013-10-10 Hristian Kirtchev <kirtchev@adacore.com>
1620 * aspects.adb: Add an entry in table Canonical_Aspect for
1622 * aspects.ads: Add entries in tables Aspect_Id, Aspect_Argument,
1623 Aspect_Names and Aspect_Delay for Refined_State.
1624 * einfo.adb: Add with and use clauses for Elists.
1625 Remove Refined_State from the list of node usage.
1626 Add Refined_State_Pragma to the list of node usage.
1627 (Has_Null_Abstract_State): New routine.
1628 (Refined_State): Removed.
1629 (Refined_State_Pragma): New routine.
1630 (Set_Refined_State): Removed.
1631 (Set_Refined_State_Pragma): New routine.
1632 (Write_Field8_Name): Add output for Refined_State_Pragma.
1633 (Write_Field9_Name): Remove the output for Refined_State.
1634 * einfo.ads: Add new synthesized attribute Has_Null_Abstract_State
1635 along with usage in nodes. Remove attribute Refined_State along
1636 with usage in nodes. Add new attribute Refined_State_Pragma along
1637 with usage in nodes.
1638 (Has_Null_Abstract_State): New routine.
1639 (Refined_State): Removed.
1640 (Refined_State_Pragma): New routine.
1641 (Set_Refined_State): Removed.
1642 (Set_Refined_State_Pragma): New routine.
1643 * elists.adb (Clone): New routine.
1644 * elists.ads (Clone): New routine.
1645 * par-prag.adb: Add Refined_State to the pragmas that do not
1646 require special processing by the parser.
1647 * sem_ch3.adb: Add with and use clause for Sem_Prag.
1648 (Analyze_Declarations): Add local variables Body_Id, Context and
1649 Spec_Id. Add processing for delayed aspect/pragma Refined_State.
1650 * sem_ch13.adb (Analyze_Aspect_Specifications): Update the
1651 handling of aspect Abstract_State. Add processing for aspect
1652 Refined_State. Remove the bizzare insertion policy for aspect
1654 (Check_Aspect_At_Freeze_Point): Add an entry for Refined_State.
1655 * sem_prag.adb: Add an entry to table Sig_Flags
1656 for pragma Refined_State.
1657 (Add_Item): Update the
1658 comment on usage. The inserted items need not be unique.
1659 (Analyze_Contract_Cases_In_Decl_Part): Rename variable Restore to
1660 Restore_Scope and update all its occurrences.
1662 Update the handling of pragma Abstract_State. Add processing for
1663 pragma Refined_State.
1664 (Analyze_Pre_Post_Condition_In_Decl_Part):
1665 Rename variable Restore to Restore_Scope and update all its
1667 (Analyze_Refined_State_In_Decl_Part): New routine.
1668 * sem_prag.ads (Analyze_Refined_State_In_Decl_Part): New routine.
1669 * snames.ads-tmpl: Add new predefined name for Refined_State. Add
1670 new Pragma_Id for Refined_State.
1672 2013-10-10 Ed Schonberg <schonberg@adacore.com>
1674 * sem_ch10.adb (Install_Limited_Withed_Unit): handle properly the
1675 case of a record declaration in a limited view, when the record
1676 contains a self-referential component of an anonymous access type.
1678 2013-10-10 Thomas Quinot <quinot@adacore.com>
1680 * exp_ch4.adb (Process_Transient_Object): For any context other
1681 than a simple return statement, insert the finalization action
1682 after the context, not as an action on the context (which will
1683 get evaluated before it).
1685 2013-10-10 Hristian Kirtchev <kirtchev@adacore.com>
1687 * einfo.adb (Write_Field19_Name): Correct the
1688 string name of attribute Default_Aspect_Value.
1690 2013-10-10 Ed Schonberg <schonberg@adacore.com>
1692 * sem_type.adb (Interface_Present_In_Ancestor): The progenitor
1693 in a type declaration may be an interface subtype.
1695 2013-10-10 Robert Dewar <dewar@adacore.com>
1697 * sinfo.ads (Do_Range_Check): Add special note on handling of
1698 range checks for Succ and Pred.
1700 2013-10-10 Robert Dewar <dewar@adacore.com>
1702 * erroutc.adb (Output_Msg_Text): Remove VMS special handling.
1704 2013-10-10 Robert Dewar <dewar@adacore.com>
1706 * a-chahan.ads, a-chahan.adb (Is_Line_Terminator): New function
1707 (Is_Mark): New function.
1708 (Is_Other_Format): New function.
1709 (Is_Punctuation_Connector): New function.
1710 (Is_Space): New function.
1712 2013-10-10 Robert Dewar <dewar@adacore.com>
1714 * sem_aggr.adb (Resolve_Array_Aggregate): Redo duplicate/missing
1715 choice circuit. Was not quite right in some cases, which showed
1716 up in ACATS test B43201C.
1717 * sem_attr.adb (Address_Checks): Make sure name is set right
1718 for some messages issued.
1719 * mlib-prj.adb: Minor code reorganization.
1720 * gnat_ugn.texi: Remove special VMS doc for tagging of warning msgs.
1721 * exp_ch9.adb: Minor reformatting.
1723 2013-10-10 Tristan Gingold <gingold@adacore.com>
1725 * lib-writ.adb (Write_Unit_Information): Adjust previous patch.
1727 2013-10-10 Robert Dewar <dewar@adacore.com>
1729 * sem_ch5.adb (Analyze_If_Statement): Warn on redundant if
1731 * sem_util.ads, sem_util.adb (Has_No_Obvious_Side_Effects): New
1734 2013-10-10 Ed Schonberg <schonberg@adacore.com>
1736 * exp_ch9.adb (Expand_N_Timed_Entry_Call): Simplify expansion
1737 for the case of a dispatching trigger: there is no need to
1738 duplicate the code or create a subprogram to encapsulate the
1739 triggering statements. This allows exit statements in the
1740 triggering statements, that refer to enclosing loops.
1742 2013-10-10 Robert Dewar <dewar@adacore.com>
1744 * freeze.adb: Minor reformatting.
1745 * sem_ch13.adb (Freeze_Entity_Checks): New procedure
1746 (Analyze_Freeze_Entity): Call Freeze_Entity_Checks
1747 (Analyze_Freeze_Generic_Entity): Call Freeze_Entity_Checks.
1748 * sinfo.ads: Add syntax for sprint for Freeze_Generic_Entity.
1749 * sprint.ads: Add syntax for freeze generic entity node.
1751 2013-10-10 Robert Dewar <dewar@adacore.com>
1753 * einfo.adb, einfo.ads: Minor comment updates.
1755 2013-10-10 Robert Dewar <dewar@adacore.com>
1757 * lib-writ.adb (Write_Unit_Information): Fatal error if linker
1758 options are detected in a predefined generic unit.
1760 2013-10-10 Thomas Quinot <quinot@adacore.com>
1762 * s-oscons-tmplt.c (CLOCK_REALTIME): Always define, possibly using
1763 a dummy placeholder value.
1764 (NEED_PTHREAD_CONDATTR_SETCLOCK): Remove, not needed anymore.
1765 * thread.c: Adjust #if test accordingly.
1767 2013-10-10 Hristian Kirtchev <kirtchev@adacore.com>
1769 * exp_ch6.adb (Consequence_Error): Generate an
1770 implicit if statement.
1771 (Expand_Contract_Cases): Generate an implicit if statement.
1772 (Process_Contract_Cases): Do not expand Contract_Cases when no code
1775 2013-10-10 Robert Dewar <dewar@adacore.com>
1777 * sem_attr.adb (Address_Checks): New procedure.
1779 2013-10-10 Ed Schonberg <schonberg@adacore.com>
1781 * sinfo.ads, sinfo.adb: New Node Freeze_Generic_Entity, to trigger
1782 semantic actions at the proper point for entities that previously
1783 had no explicit freeze point.
1784 * freeze.adb (Freeze_Generic_Entities): generate new nodes to
1785 indicate the point at which semantic checks can be performed on
1786 entities declared in generic packages.
1787 * sem_ch13.ads, sem_ch13.adb: New procedure
1788 Analyze_Freeze_Generic_Entity.
1789 * exp_util.adb (Insert_Actions): Treat new node like Freeze_Entity.
1790 * sem.adb (Analyze): Call Analyze_Freeze_Generic_Entity.
1791 * sprint.adb (Sprint_Node): display Analyze_Freeze_Generic_Entity.
1792 * gcc-interface/trans.c: Ignore Analyze_Freeze_Generic_Entity.
1793 * gcc-interface/Make-lang.in: Update dependencies.
1795 2013-10-10 Robert Dewar <dewar@adacore.com>
1797 * sem_aggr.adb (Resolve_Array_Aggregate): Identify duplicated
1800 2013-10-10 Robert Dewar <dewar@adacore.com>
1802 * sem_ch9.adb (Analyze_Task_Body): Aspects are illegal
1803 (Analyze_Protected_Body): Aspects are illegal.
1805 2013-10-10 Robert Dewar <dewar@adacore.com>
1807 * sem_ch6.adb, sem_ch13.adb: Minor reformatting.
1808 * sem_case.adb (Check_Choices): Fix bad listing of missing
1809 values from predicated subtype case (Check_Choices): List
1811 * errout.adb (Set_Msg_Text): Process warning tags in VMS mode
1812 * erroutc.adb (Output_Msg_Text): Handle VMS warning tags
1813 * gnat_ugn.texi: Document /WARNINGS=TAG_WARNINGS for VMS
1814 * ug_words: Add entries for -gnatw.d and -gnatw.D
1815 * vms_data.ads: Add [NO]TAG_WARNINGS for -gnatw.D/-gnatw.d
1816 * lib-writ.ads: Documentation fixes
1818 2013-10-10 Robert Dewar <dewar@adacore.com>
1820 * a-wichha.adb, a-wichha.ads, a-zchhan.adb, a-zchhan.ads
1821 (Is_Other_Format): New name for Is_Other.
1822 (Is_Punctuation_Connector): New name for Is_Punctuation
1824 2013-10-10 Hristian Kirtchev <kirtchev@adacore.com>
1826 * aspects.adb: Add entries in table Canonical_Aspects for aspects
1827 Refined_Depends and Refined_Global.
1828 * aspects.ads: Add entries in tables Aspect_Id, Aspect_Argument,
1829 Aspect_Names, Aspect_Declay, Aspect_On_Body_Or_Stub_OK for
1830 aspects Refined_Depends and Refined_Global.
1831 * einfo.adb (Contract): Subprogram bodies are now valid owners
1833 (Set_Contract): Subprogram bodies are now valid
1834 owners of contracts.
1835 (Write_Field24_Name): Output the contract
1836 attribute for subprogram bodies.
1837 * exp_ch6.adb (Expand_Subprogram_Contract): New routine.
1838 * exp_ch6.ads (Expand_Subprogram_Contract): New routine.
1839 * par-prag.adb: Pragmas Refined_Depends and Refined_Global do
1840 not require any special processing by the parser.
1841 * sem_ch3.adb (Adjust_D): Renamed to Adjust_Decl.
1842 (Analyze_Declarations): Code reformatting. Analyze the contract
1843 of a subprogram body at the end of the declarative region.
1844 * sem_ch6.adb (Analyze_Generic_Subprogram_Body):
1845 Subprogram bodies can now have contracts. Use
1846 Expand_Subprogram_Contract to handle the various contract
1848 (Analyze_Subprogram_Body_Contract): New null routine.
1849 (Analyze_Subprogram_Body_Helper): Subprogram bodies can now have
1850 contracts. Use Expand_Subprogram_Contract to handle the various
1851 contract assertions.
1852 (Analyze_Subprogram_Contract): Add local
1853 variable Nam. Update the call to Analyze_PPC_In_Decl_Part. Capture
1854 the pragma name in Nam.
1855 (Process_PPCs): Removed.
1856 * sem_ch6.ads (Analyze_Subprogram_Body_Contract): New routine.
1857 (Analyze_Subprogram_Contract): Update the comment on usage.
1858 * sem_ch13.adb (Analyze_Aspect_Specifications): Add null
1859 implementations for aspects Refined_Depends and Refined_Global.
1860 (Check_Aspect_At_Freeze_Point): Aspects Refined_Depends and
1861 Refined_Global do not need to be checked at the freeze point.
1862 * sem_prag.adb: Add entries in table Sig_Flags
1863 for pragmas Refined_Depends and Refined_Global.
1864 (Analyze_Contract_Cases_In_Decl_Part): Add local
1865 variable Restore. Use Restore to pop the scope.
1866 (Analyze_Depends_In_Decl_Part): Add local variable Restore. Use
1867 Restore to pop the scope.
1868 (Analyze_Global_In_Decl_List): Add local variable Restore. Use Restore
1870 (Analyze_PPC_In_Decl_Part): Renamed to
1871 Analyze_Pre_Post_Condition_In_Decl_Part.
1873 Add null implementations for pragmas Refined_Depends and
1874 Refined_Global. Refined_Pre and Refined_Post are now
1875 handled by routine Analyze_Refined_Pre_Post_Condition
1877 (Analyze_Refined_Depends_In_Decl_Part): New
1879 (Analyze_Refined_Global_In_Decl_Part):
1881 (Analyze_Refined_Pre_Post):
1882 Renamed to Analyze_Refined_Pre_Post_Condition.
1883 (Analyze_Refined_Pre_Post_Condition): Analyze the boolean
1885 (Check_Precondition_Postcondition): Update the call
1886 to Analyze_PPC_In_Decl_Part.
1887 * sem_prag.ads: Add entries in table
1888 Pragma_On_Body_Or_Stub_OK for pragmas Refined_Depends
1890 (Analyze_PPC_In_Decl_Part): Renamed
1891 to Analyze_Pre_Post_Condition_In_Decl_Part. Update the
1893 (Analyze_Refined_Depends_In_Decl_Part): New routine.
1894 (Analyze_Refined_Global_In_Decl_Part): New routine.
1895 (Analyze_Test_Case_In_Decl_Part): Update the comment on usage.
1896 * sem_util.adb (Add_Contract_Item): Rename formal Item to Prag
1897 and update all occurrences. Subprogram body contracts can now
1898 contain pragmas Refined_Depends and Refined_Global.
1899 * sem_util.ads (Add_Contract_Item): Rename formal Item to
1900 Prag. Update the comment on usage.
1901 * sinfo.ads: Update the comment on structure and usage of
1903 * snames.ads-tmpl: Add new predefined names for Refined_Depends
1904 and Refined_Global. Add entries in table Pragma_Id for
1905 Refined_Depends and Refined_Global.
1907 2013-10-10 Robert Dewar <dewar@adacore.com>
1909 * types.ads: Minor reformatting.
1911 2013-10-10 Thomas Quinot <quinot@adacore.com>
1913 * s-taprop-posix.adb: Add missing comment.
1915 2013-10-10 Robert Dewar <dewar@adacore.com>
1917 * freeze.adb (Freeze_Record_Type): Move choice checking to
1918 Analyze_Freeze_Entity (Freeze_Record_Type): Make sure all choices
1920 * sem_case.adb (Check_Choices): Remove misguided attempt to
1921 freeze choices (this is now done in Freeze_Record_Type where
1923 (Check_Choices): Remove some analyze/resolve calls
1924 that are redundant since they are done in Analyze_Choices.
1925 * sem_ch13.adb (Analyze_Freeze_Entity): Do the error
1926 checking for choices in variant records here (moved here from
1927 Freeze.Freeze_Record_Type)
1929 2013-10-10 Thomas Quinot <quinot@adacore.com>
1931 * s-oscons-tmplt.c, s-taprop-posix.adb (CLOCK_REALTIME): Always define,
1932 possibly using a dummy placeholder value.
1933 (Compute_Deadline): For the case of an
1934 Absolute_Calendar deadline, if the target uses another clock
1935 than CLOCK_REALTIME as CLOCK_RT_Ada, compensate for possible
1938 2013-10-10 Ed Schonberg <schonberg@adacore.com>
1940 * sem_ch8.adb (Find_Expanded_Name): Handle properly a fully
1941 qualified reference to a generic child unit within itself,
1942 in an instantiation.
1944 2013-10-10 Pascal Obry <obry@adacore.com>
1946 * prj-conf.adb: Minor typo fixes in comment.
1948 2013-10-10 Thomas Quinot <quinot@adacore.com>
1950 * s-taprop-posix.adb (Compute_Deadline): New local subprogram,
1951 factors common code between Timed_Sleep and Timed_Delay.
1953 2013-10-10 Robert Dewar <dewar@adacore.com>
1955 * freeze.adb (Freeze_Record_Type): Don't replace others if
1956 expander inactive. This avoids clobbering the ASIS tree in
1959 2013-10-10 Robert Dewar <dewar@adacore.com>
1961 * sem_res.adb (Resolve_Op_Expon): Avoid crash testing for
1962 fixed-point case in preanalysis mode (error will be caught during
1965 2013-10-10 Robert Dewar <dewar@adacore.com>
1967 * gnat_rm.texi: Refined_Pre and Refined_Post are now allowed as
1968 assertion identifiers for pragma Assertion_Policy.
1969 * sem_prag.adb (Is_Valid_Assertion_Kind): Add Refined_Pre/Refined_Post
1970 * sem_ch13.adb: Minor reformatting.
1972 2013-10-10 Pascal Obry <obry@adacore.com>
1974 * prj-conf.adb: Code refactoring.
1976 2013-10-10 Hristian Kirtchev <kirtchev@adacore.com>
1978 * einfo.adb: Remove Integrity_Level from the node usage list.
1979 (Has_Option): Update the implementation to match
1980 the new terminology.
1981 (Has_Property): Renamed to Has_Option.
1982 (Integrity_Level): Removed.
1983 (Is_External_State): New routine.
1984 (Is_Input_Only_State): Use Has_Option to determine whether a state
1985 is Input_Only. (Is_Input_State): Renamed to Is_Input_Only_State.
1986 (Is_Output_Only_State): Use Has_Option to determine whether
1987 a state is Output_Only.
1988 (Is_Output_State): Renamed to
1989 Is_Output_Only_State.
1990 (Is_Volatile_State): Use Has_Option to determine whether a state is
1992 (Set_Integrity_Level): Removed.
1993 (Write_Field8): Remove the entry for Integrity_Level.
1994 * einfo.ads: Remove Integrity_Level along with its documentation
1995 and usage in nodes. Rename Is_Input_State to Is_Input_Only_State.
1996 Rename Is_Output_State to Is_Output_Only_State. Update the
1997 documentation of Is_Volatile_State. Update the node structure of
1999 (Integrity_Level): Removed along with pragma Inline.
2000 (Is_External_State): New routine.
2001 (Is_Input_State): Renamed to Is_Input_Only_State.
2002 (Is_Output_State): Renamed to Is_Output_Only_State.
2003 (Set_Integrity_Level): Removed along with pragma Inline.
2004 * sem_prag.adb (Analyze_Pragma): Update the checks regarding
2005 global items and abstract state modes. Update the implementation
2006 of pragma Abstract_State to reflect the new rules and terminology.
2007 * snames.ads-tmpl: Remove the predefined name for Integrity
2008 level. Add new predefined names for Input_Only, Non_Volatile,
2009 Output_Only and Part_Of.
2011 2013-10-10 Ed Schonberg <schonberg@adacore.com>
2013 * lib-xref.adb (Generate_Reference): Do not generate a reference
2014 within a _postcondition procedure: a proper source reference has
2015 already been generated when pre- analyzing the original aspect
2016 specification, and the use of a formal in a pre/postcondition
2017 should not count as a proper use in a subprogram body.
2019 2013-10-10 Robert Dewar <dewar@adacore.com>
2021 * sem_eval.adb (Why_Non_Static): Fix bomb for deferred constant
2024 2013-10-10 Hristian Kirtchev <kirtchev@adacore.com>
2026 * aspects.adb: Add an entry for Aspect_Refined_Post in table
2028 * aspects.ads: Add an entry for Aspect_Refined_Post in tables
2029 Aspect_Id, Aspect_Argument, Aspect_Names, Aspect_Delay,
2030 Aspect_On_Body_Or_Stub_OK. Update the comment on the use of
2031 table Aspect_On_Body_Or_Stub_OK.
2032 * par-prag.adb: Add pragma Refined_Post to the list of pragmas
2033 that do not require special processing by the parser.
2034 * sem_attr.adb (Analyze_Attribute): Add special analysis for
2035 attributes 'Old and 'Result when code generation is disabled and
2036 they appear in aspect/pragma Refined_Post.
2037 (In_Refined_Post): New routine.
2038 * sem_ch6.adb (Analyze_Expression_Function): Move various
2039 aspects and/or pragmas that apply to an expression function to the
2040 corresponding spec or body.
2041 (Collect_Body_Postconditions): New routine.
2042 (Process_PPCs): Use routine Collect_Body_Postconditions
2043 to gather all postcondition pragmas.
2044 * sem_ch10.adb (Analyze_Proper_Body): Use routine
2045 Relocate_Pragmas_To_Body to move all source pragmas that follow
2046 a body stub to the proper body.
2047 (Move_Stub_Pragmas_To_Body): Removed.
2048 * sem_ch13.adb (Analyze_Aspect_Specifications): Add processing
2049 for aspect Refined_Post.
2050 (Check_Aspect_At_Freeze_Point): Aspect
2051 Refined_Post does not need delayed processing at the freeze point.
2052 * sem_prag.adb: Add an entry for pragma Refined_Post in
2054 (Analyze_Pragma): Add processing for pragma
2055 Refined_Post. Update the processing of pragma Refined_Pre
2056 to use common routine Analyze_Refined_Pre_Post.
2057 (Analyze_Refined_Pre_Post): New routine.
2058 (Relocate_Pragmas_To_Body): New routine.
2059 * sem_prag.ads: Table Pragma_On_Stub_OK is now known as
2060 Pragma_On_Body_Or_Stub_OK. Update the comment on usage of
2061 table Pragma_On_Body_Or_Stub_OK.
2062 (Relocate_Pragmas_To_Body): New routine.
2063 * snames.ads-tmpl: Add new predefined name for Refined_Post. Add
2064 new Pragma_Id for Refined_Post.
2066 2013-10-10 Robert Dewar <dewar@adacore.com>
2068 * exp_ch3.adb (Expand_N_Variant_Part): Now null, expansion of
2069 last choice to others is moved to Freeze_Record_Type.
2070 * freeze.adb (Freeze_Record_Type): Expand last variant to others
2071 if necessary (moved here from Expand_N_Variant_Part
2073 2013-10-10 Robert Dewar <dewar@adacore.com>
2075 * lib-xref-spark_specific.adb, par-ch13.adb, sem_prag.adb, sem_prag.ads,
2076 sem_ch12.adb, sem_attr.adb, sem_ch6.adb, sem_ch13.adb, a-sequio.adb,
2077 s-atocou-builtin.adb: Minor reformatting.
2079 2013-10-10 Thomas Quinot <quinot@adacore.com>
2081 * s-oscons-tmplt.c (NEED_PTHREAD_CONDATTR_SETCLOCK): This
2082 constant needs to be output to s-oscons.h, as it is tested
2085 2013-10-10 Robert Dewar <dewar@adacore.com>
2087 * exp_ch3.adb (Expand_N_Variant_Part): Don't expand choices, too early
2088 * exp_ch5.adb (Expand_N_Case_Statement): Use new Has_SP_Choice
2089 flag to avoid expanding choices when not necessary.
2090 * exp_util.adb: Minor reformatting
2091 * freeze.adb (Freeze_Record_Type): Redo expansion of variants
2092 * sem_aggr.adb: Minor reformatting
2093 * sem_case.ads, sem_case.adb: Major rewrite, separating Analysis and
2094 Checking of choices.
2095 * sem_ch3.adb (Analyze_Variant_Part): Rewrite to call new
2097 * sem_ch4.adb (Analyze_Case_Expression): Call Analyze_Choices
2099 * sem_ch5.adb (Analyze_Case_Statement): Call Analyze_Choices
2101 * sem_util.adb: Minor reformatting
2102 * sinfo.ads, sinfo.adb (Has_SP_Choice): New flag.
2104 2013-10-10 Vincent Celier <celier@adacore.com>
2106 * mlib-prj.adb (Build_Library): Do not issue link dynamic
2107 libraries with an Rpath, if switch -R was used.
2109 2013-10-10 Tristan Gingold <gingold@adacore.com>
2111 * s-stalib.ads (Image_Index_Table_8, Image_Index_Table_16,
2112 Image_Index_Table_32): Remove as not used.
2113 * s-imgint.adb (Image_Integer): Call Set_Image_Integer and
2114 remove duplicated code.
2116 2013-10-10 Hristian Kirtchev <kirtchev@adacore.com>
2118 * sem_prag.adb (Analyze_Pragma): Provide a
2119 more precise error message when pragma Refined_Pre applies to
2120 an expression function that is not a completion.
2122 2013-10-10 Thomas Quinot <quinot@adacore.com>
2124 * sem_attr.adb (Analyse_Attribute, case
2125 Attribute_Scalar_Storage_Order): a 'Scalar_Storage_Order attribute
2126 reference for a generic type is permitted in GNAT runtime mode.
2127 * a-sequio.adb (Read, Write): Use the endianness of the actual
2128 type to encode length information written to the file.
2130 2013-10-10 Ed Schonberg <schonberg@adacore.com>
2132 * par-ch13.adb (Aspect_Specifications_Present)): In earlier than
2133 Ada2012 mode, assume that a legal aspect name following "with"
2134 keyword is an older gnat switch and not a misplaced with_clause.
2136 2013-10-10 Hristian Kirtchev <kirtchev@adacore.com>
2138 * aspects.adb: Add an entry for Aspect_Refined_Pre in
2139 table Canonical_Aspect.
2140 (Aspects_On_Body_OK): Renamed to
2141 Aspects_On_Body_Or_Stub_OK.
2142 (Aspects_On_Body_Or_Stub_OK):
2143 Update the query in table Aspect_On_Body_OK.
2144 * aspects.ads: Add an entry for Aspect_Refined_Pre in tables
2145 Aspect_Id, Aspect_Argument, Aspect_Names, Aspect_Delay,
2146 Aspect_On_Body_Or_Stub_OK. Table Aspect_On_Body_OK is now known as
2147 Aspect_On_Body_Or_Stub_OK. Add a section of aspect specifications
2148 that apply to body stubs.
2149 (Aspects_On_Body_OK): Renamed to Aspects_On_Body_Or_Stub_OK.
2150 (Aspects_On_Body_Or_Stub_OK): Update the comment on usage.
2151 * par-prag.adb: Add pragma Refined_Pre to the list of pragmas
2152 that do not require special processing by the parser.
2153 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Delay the
2154 analysis of aspect specifications that apply to a body stub
2155 until the proper body is analyzed.
2156 * sem_ch10.adb: Add with and use clause for Sem_Ch13.
2157 (Analyze_Package_Body_Stub): Set the corresponding spec of the stub.
2158 (Analyze_Proper_Body): Relocate all pragmas that apply
2159 to a subprogram body stub to the declarations of the proper
2160 body. Analyze the aspect specifications of the stub when the
2161 proper body is not present.
2162 (Analyze_Protected_Body_Stub): Set the corresponding spec of the stub.
2163 (Analyze_Task_Body_Stub): Set the corresponding spec of the stub.
2164 (Move_Stub_Pragmas_To_Body): New routine.
2165 * sem_ch13.adb (Analyze_Aspect_Specifications): Add processing
2166 for aspect Refined_Pre.
2167 (Check_Aspect_At_Freeze_Point): Aspect
2168 Refined_Pre does not need delayed processing at the freeze point.
2169 * sem_prag.adb: Remove with and use clause for Snames. Add
2170 an entry for Pragma_Refined_Pre in table Sig_Flags.
2171 (Analyze_Pragma): Add processing for pragma Refined_Pre.
2172 * sem_prag.ads: Add with and use clause for Snames. Add table
2174 * sinfo.adb (Corresponding_Spec_Of_Stub): New routine.
2175 (Set_Corresponding_Spec_Of_Stub): New routine.
2176 * sinfo.ads: Add new attribute Corresponding_Spec_Of_Stub
2177 along with comment on usage and occurrences in nodes.
2178 (Corresponding_Spec_Of_Stub): New routine along with pragma
2180 (Set_Corresponding_Spec_Of_Stub): New routine along
2182 * snames.ads-tmpl: Add new predefined name for Refined_Pre. Add
2183 new Pragma_Id for Refined_Pre.
2185 2013-10-10 Ed Schonberg <schonberg@adacore.com>
2187 * sem_ch12.adb (Analyze_Package_Instantiation,
2188 Analyze_Subprogram_Instantiation): Improve error message when
2189 name in instantiation does not designate a generic unit of the
2192 2013-10-10 Robert Dewar <dewar@adacore.com>
2194 * exp_ch3.adb (Expand_N_Variant_Part): Expand statically
2195 predicated subtype which appears in Discrete_Choices list.
2196 * exp_ch5.adb (Expand_N_Case_Statement): Expand statically
2197 predicated subtype which appears in Discrete_Choices list of
2198 case statement alternative.
2199 * exp_util.ads, exp_util.adb (Expand_Static_Predicates_In_Choices): New
2201 * sem_case.adb: Minor reformatting (Analyze_Choices): Don't
2202 expand out Discrete_Choices that are names of subtypes with
2203 static predicates. This is now done in the analyzer so that the
2204 -gnatct tree is properly formed for ASIS.
2205 * sem_case.ads (Generic_Choices_Processing): Does not apply
2206 to aggregates any more, so change doc accordingly, and remove
2207 unneeded Get_Choices argument.
2208 * sem_ch3.adb (Analyze_Variant_Part): Remove no
2209 longer used Get_Choices argument in instantiation of
2210 Generic_Choices_Processing.
2211 * sem_ch4.adb (Analyze_Case_Expression): Remove no
2212 longer used Get_Choices argument in instantiation of
2213 Generic_Choices_Processing.
2214 * sem_ch5.adb (Analyze_Case_Statement): Remove no
2215 longer used Get_Choices argument in instantiation of
2216 Generic_Choices_Processing.
2217 * sinfo.ads: For N_Variant_Part, and N_Case_Statement_Alternative,
2218 document that choices that are names of statically predicated
2219 subtypes are expanded in the code generation tree passed to the
2220 back end, but not in the ASIS tree generated for -gnatct.
2222 2013-10-10 Ed Schonberg <schonberg@adacore.com>
2224 * sem_ch7.adb: Revert previous change.
2226 2013-10-10 Gary Dismukes <dismukes@adacore.com>
2228 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): In the case where
2229 the Storage_Pool aspect is specified by an aspect clause and a
2230 renaming is used to capture the evaluation of the pool name,
2231 insert the renaming in front of the aspect's associated entity
2232 declaration rather than in front of the corresponding attribute
2233 definition (which hasn't been appended to the declaration
2236 2013-10-10 Ed Schonberg <schonberg@adacore.com>
2238 * sem_ch6.adb (Is_Interface_Conformant): The controlling type
2239 of the interface operation is obtained from the ultimate alias
2240 of the interface primitive parameter, because that may be in
2241 fact an implicit inherited operation whose signature involves
2242 the type extension and not the desired interface.
2244 2013-10-10 Ed Schonberg <schonberg@adacore.com>
2246 * par-ch13.adb (Aspect_Specifications_Present): In Ada 2012,
2247 recognize an aspect specification with a misspelled name if it
2248 is followed by a a comma or semicolon.
2250 2013-10-10 Vadim Godunko <godunko@adacore.com>
2252 * s-atocou.adb, s-atocou.ads, s-atocou-x86.adb, s-atocou-builtin.adb:
2253 Fix copyright notice.
2255 2013-10-10 Yannick Moy <moy@adacore.com>
2257 * lib-xref-spark_specific.adb (Enclosing_Subprogram_Or_Package): Get
2258 enclosing subprogram for precondition/postcondition/contract cases.
2260 2013-10-10 Robert Dewar <dewar@adacore.com>
2262 * gnat_rm.texi: Minor fix.
2264 2013-10-10 Robert Dewar <dewar@adacore.com>
2266 * sem_ch13.adb (Analyze_Attribute_Definition_Clause, case
2267 Address): Remove the Comes_From_Source test for the overlap
2270 2013-10-10 Robert Dewar <dewar@adacore.com>
2272 * sem_util.adb: Minor code reorganization (use Nkind_In).
2273 * sem_warn.adb: Minor code reorganization (optimization in
2274 Check_Unset_Reference).
2275 * exp_ch9.adb, exp_ch4.adb, sinfo.ads: Minor reformatting.
2277 2013-10-10 Ed Schonberg <schonberg@adacore.com>
2279 * sem_ch7.adb (Install_Parent_Private_Declarations): When
2280 instantiating a child unit, do not install private declaration of
2281 a non-generic ancestor of the generic that is also an ancestor
2282 of the current unit: its private part will be installed when
2283 private part of ancestor itself is analyzed.
2285 2013-10-10 Thomas Quinot <quinot@adacore.com>
2287 * freeze.adb (Check_Component_Storage_Order): Retrieve component
2288 aliased status from type entities directly instead of going back
2289 to original component definition.
2290 * sem_ch7.adb: Minor reformatting.
2292 2013-10-10 Robert Dewar <dewar@adacore.com>
2294 * sem_ch13.adb (Analyze_Aspect_Specifications): For Address
2295 attribute, consider it to be set in source, because of aliasing
2297 (Analyze_Attribute_Definition_Clause): For the
2298 purpose of warning on overlays, take into account the aspect case.
2300 2013-10-10 Robert Dewar <dewar@adacore.com>
2302 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads, a-cforse.ads,
2303 a-cofove.ads: Minor reformatting.
2305 2013-10-10 Arnaud Charlet <charlet@adacore.com>
2307 * gnat_ugn.texi: Remove obsolete mention to -laddr2line.
2309 2013-10-10 Ed Schonberg <schonberg@adacore.com>
2311 * exp_ch4.adb (Expand_N_Case_Expression): Indicate that the
2312 generated variable used as a target of the expression needs
2315 2013-10-10 Jose Ruiz <ruiz@adacore.com>
2317 * exp_util.adb (Corresponding_Runtime_Package): Remove the condition
2318 related to No_Dynamic_Attachment which was wrong. Protected types
2319 with interrupt handlers (when not using a restricted profile)
2320 are always treated as protected types with entries, regardless
2321 of the No_Dynamic_Attachment restriction.
2322 * exp_ch9.adb (Expand_N_Protected_Type_Declaration): Simplify the code
2323 using the result of Corresponding_Runtime_Package.
2324 (Install_Private_Data_Declarations): When having
2325 static handlers and a non restricted profile, we use the
2326 type Static_Interrupt_Protection always, so we removed an
2327 extra wrong condition looking at the No_Dynamic_Attachment
2328 restriction. Simplify the code using the result of
2329 Corresponding_Runtime_Package.
2330 (Make_Initialize_Protection): Simplify the code using
2331 the result of Corresponding_Runtime_Package.
2332 (Install_Private_Data_Declaration): The No_Dynamic_Attachment
2333 restriction has nothing to do with static handlers. Remove the extra
2334 erroneous condition that was creating the wrong data type.
2336 2013-10-10 Hristian Kirtchev <kirtchev@adacore.com>
2338 * sem_util.adb (Is_Object_Reference): Attribute
2339 'Old produces an object reference.
2340 * gnat_rm.texi: Define accessibility level of
2341 X'Update(...) result.
2343 2013-10-10 Yannick Moy <moy@adacore.com>
2345 * gnat_rm.texi, a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
2346 a-cforse.ads, a-cofove.ads: Update comment and doc of formal containers
2348 2013-10-10 Ed Schonberg <schonberg@adacore.com>
2350 * sem_ch13.adb (Analyze_Aspect_Specifications): For Pre/Post
2351 conditions that apply to a subprogram body, preserve the placement
2352 and order of the generated pragmas, which must appear before
2353 other declarations in the body.
2355 2013-10-10 Bob Duff <duff@adacore.com>
2357 * gnat_ugn.texi: Add gnat2xml doc.
2359 2013-10-10 Doug Rupp <rupp@adacore.com>
2361 * s-vxwork-arm.ads: Fix interface to FP_CONTEXT.
2363 2013-10-10 Ed Schonberg <schonberg@adacore.com>
2365 * sem_ch13.adb (Analyze_Aspect_Specification): An aspect Import
2366 on a variable need not have a convention specified, as long as
2367 the implicit convention of the object, obtained from its type,
2368 is Ada or Ada-related.
2370 2013-10-10 Robert Dewar <dewar@adacore.com>
2372 * cstand.adb (Standard_Unsigned_64): New internal type.
2373 * gnat_rm.texi: Update documentation on To_Address.
2374 * sem_attr.adb (Analyze_Attribute, case To_Address): Fix
2375 problem with out of range static values given as literals or
2377 * stand.ads (Standard_Unsigned_64): New internal type.
2378 * stand.adb: Minor reformatting.
2380 2013-10-10 Ed Schonberg <schonberg@adacore.com>
2382 * sem_ch4.adb (Analyze_Selected_Component,
2383 Has_Mode_Conformant_Spec): If selected component may be an
2384 indexing of a parameterless call to a protected function, and
2385 expansion is disabled, this is a valid candidate interpretation.
2387 2013-10-10 Arnaud Charlet <charlet@adacore.com>
2389 * gnat_ugn.texi: Minor editing.
2391 2013-10-10 Robert Dewar <dewar@adacore.com>
2393 * gnatlink.adb: Minor reformatting.
2395 2013-10-10 Yannick Moy <moy@adacore.com>
2397 * debug.adb: Free flag d.E and change doc for flag d.K.
2399 2013-10-10 Ed Schonberg <schonberg@adacore.com>
2401 * sem_prag.adb (Check_Precondition_Postcondition): If the
2402 pragma comes from an aspect spec, and the subprogram is a
2403 library unit, treat as a ppc in a declarative part in ASIS mode,
2404 so that expression in aspect is properly analyzed. In this case
2405 there is no later point at which the aspect specification would
2408 2013-10-10 Bob Duff <duff@adacore.com>
2410 * opt.ads: Minor comment fix.
2412 2013-10-10 Vadim Godunko <godunko@adacore.com>
2414 * a-coinho-shared.ads, a-coinho-shared.adb: New file.
2415 * s-atocou.ads: Add procedure to initialize counter.
2416 * s-atocou.adb: Likewise.
2417 * s-atocou-builtin.adb: Likewise.
2418 * s-atocou-x86.adb: Likewise.
2419 * gcc-interface/Makefile.in: Select special version of
2420 Indefinite_Holders package on platforms where atomic built-ins
2421 are supported. Update tools target pairs for PikeOS.
2423 2013-10-10 Robert Dewar <dewar@adacore.com>
2425 * sem_ch3.adb: Minor reformatting.
2427 2013-10-10 Robert Dewar <dewar@adacore.com>
2429 * sinput-c.adb (Load_File): Ensure Source_Align alignment.
2430 * sinput-d.adb (Create_Debug_Source): Ensure Source_Align alignment.
2431 * sinput-l.adb (Create_Instantiation_Source): Ensure Source_Align
2434 * sinput.ads, sinput.adb (Get_Source_File_Index): New optimized (single
2436 * types.ads (Source_Align): New definition.
2437 (Source_Buffer): Document new alignment requirement.
2439 2013-10-10 Robert Dewar <dewar@adacore.com>
2441 * sem_prag.adb (Analyze_Pragma, case Linker_Section): Allow
2444 2013-10-10 Robert Dewar <dewar@adacore.com>
2446 * gnat_rm.texi: Minor adjustment to doc for To_Address attribute.
2448 2013-10-10 Vadim Godunko <godunko@adacore.com>
2450 * s-stopoo.ads (Root_Storage_Pool): Add pragma
2451 Preelaborable_Initialization.
2453 2013-09-25 Tom Tromey <tromey@redhat.com>
2455 * gcc-interface/Makefile.in (OUTPUT_OPTION): Define as "-o $@".
2457 2013-09-18 Eric Botcazou <ebotcazou@adacore.com>
2460 * gcc-interface/trans.c (Attribute_to_gnu): Define GNAT_PREFIX local
2461 variable and use it throughout.
2462 <Attr_Length>: Note whether the prefix is the dereference of a pointer
2463 to unconstrained array and, in this case, capture the result for both
2464 Attr_First and Attr_Last.
2466 2013-09-18 Eric Botcazou <ebotcazou@adacore.com>
2468 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Abstract_State>: New.
2470 2013-09-18 Eric Botcazou <ebotcazou@adacore.com>
2472 * gcc-interface/trans.c (gigi): Remove dead code.
2474 2013-09-18 Eric Botcazou <ebotcazou@adacore.com>
2476 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Pop the stack of
2477 return variables for subprograms using the CICO mechanism.
2479 2013-09-13 Dominique Dhumieres <dominiq@lps.ens.fr>
2481 * gcc-interface/Makefile.in: Fix darwin Filter to match on $target_os,
2484 2013-09-11 Thomas Schwinge <thomas@codesourcery.com>
2485 Olivier Hainque <hainque@adacore.com>
2487 * gcc-interface/Makefile.in: Import target_cpu, target_vendor,
2488 target_os and their host_ counterparts. Remove host_canonical and
2489 target_cpu_default, unused. Remove local ad-hoc computations of
2490 "host", "targ", "arch", "osys" and "manu". Replace uses of these by
2491 uses of the now imported family, hence back to filters against
2492 canonical values. Remove filters on e500 for target_cpu, expected to
2493 be canonicalized into powerpc. Invert the logic filtering on 64bit
2494 sparc for VxWorks. Simplify the filtering logic for bareboard tools
2495 target pairs, now using straight elf/eabi filters on the target_os
2498 2013-09-10 Ed Schonberg <schonberg@adacore.com>
2500 * sem_ch3.adb (Replace_Anonymoous_Access_To_Protected_Subprogram): If
2501 the return type is itself an access to function, recurse to emit
2502 another anonymous type.
2503 * gcc-interface/Make-lang.in: Update dependencies.
2505 2013-09-10 Robert Dewar <dewar@adacore.com>
2507 * err_vars.ads (Warning_Doc_Switch): Ignored in VMS mode.
2508 * errout.adb (Warning_Doc_Switch): Ignored in VMS mode.
2509 * errout.ads (Warning_Doc_Switch): Ignored in VMS mode.
2510 * inline.ads (Warnings): New component in Pending_Body_Info.
2511 * sem_ch12.adb (Pending_Body_Info): Save and restore warnings
2512 at instantiation point.
2513 * warnsw.adb (Save_Warnings): New function (Restore_Warnings):
2514 New procedure Remove special handling of Warning_Doc_Switch,
2515 cleaner to handle the VMS case in errout, than to introduce
2516 undocumented oddities here.
2517 * warnsw.ads (Warning_Record) : New type.
2518 (Save_Warnings): New function.
2519 (Restore_Warnings): New procedure.
2521 2013-09-10 Robert Dewar <dewar@adacore.com>
2523 * sinput.adb (Check_For_BOM): Avoid reading past end of file.
2525 2013-09-10 Robert Dewar <dewar@adacore.com>
2527 * errout.adb (Error_Msg_Ada_2012_Feature): New procedure.
2528 * errout.ads (Error_Msg_Ada_2012_Feature): New procedure.
2529 * inline.ads: Save/Restore Ada_Version_Pragma.
2530 * opt.adb: Save/Restore Ada_Version_Pragma.
2531 * opt.ads (Ada_Version_Pragma): New variable.
2532 * par-ch11.adb, par-ch12.adb, par-ch13.adb, par-ch4.adb, par-ch5.adb,
2533 par-ch6.adb, par-ch8.adb, par-prag.adb: Use Error_Msg_Ada_2012_Feature.
2534 * prj.adb: Initialize Ada_Version_Pragma.
2535 * sem_attr.adb: Use Error_Msg_Ada_2012_Feature.
2536 * sem_ch12.adb, sem_ch8.adb: Save/restore Ada_Version_Pragma.
2537 * sem_prag.adb (Analyze_Pragma, cases Ada_xx): Set Ada_Version_Pragma.
2538 * switch-c.adb: Initialize Ada_Version_Pragma.
2539 * sem_ch12.adb: Minor reformatting.
2541 2013-09-10 Ed Schonberg <schonberg@adacore.com>
2543 * sem_ch3.adb (Process_Subtype): Discard constraint on access
2544 to class-wide type. Such constraints are not supported and are
2545 considered a language pathology.
2547 2013-09-10 Robert Dewar <dewar@adacore.com>
2549 * gnatbind.adb: Correct starting date in --version string.
2550 * gnatdll.adb: Use Check_Version_And_Help_G to implement --help
2552 * gnatkr.adb: Use Check_Version_And_Help_G to implement --help
2554 * gnatlink.adb: Correct starting date in --version string.
2555 * gnatls.adb: Correct starting date in --version string.
2556 * make.adb: Correct starting date in --version string.
2558 2013-09-10 Robert Dewar <dewar@adacore.com>
2560 * switch-c.adb: Minor reformatting.
2561 * atree.ads (Original_Nodes): Add documentation on ASIS usage.
2562 * sinfo.ads: Add section on ASIS mode (documentation only).
2564 2013-09-10 Robert Dewar <dewar@adacore.com>
2566 * sem_prag.adb (Analyze_Pragma, case Warnings): Don't allow
2567 REASON parameter in compiler units (bootstrap issues).
2569 2013-09-10 Robert Dewar <dewar@adacore.com>
2571 * gnat1drv.adb (Adjust_Global_Switches): Output warning if
2572 -gnateE specified for a target that does not support it.
2574 2013-09-10 Ed Schonberg <schonberg@adacore.com>
2576 * sem_prag.adb (Analyze_Pragma, case SPARK_Mode): Handle properly
2577 a subprogram body without previous spec.
2579 2013-09-10 Gary Dismukes <dismukes@adacore.com>
2581 * sem_ch4.adb: Minor typo fixes.
2583 2013-09-10 Hristian Kirtchev <kirtchev@adacore.com>
2585 * aspects.adb (Aspects_On_Body_OK): New routine.
2586 * aspects.ads: Modify type Aspect_Expression to include
2587 the Optional_XXX variants. Update the contents of
2588 table Aspect_Argument. Add table Aspect_On_Body_OK.
2589 (Aspects_On_Body_OK): New routine.
2590 * par-ch13.adb (Get_Aspect_Specifications): Account for optional
2591 names and expressions when parsing an aspect.
2592 * sem_ch6.adb: Add with and use clause for Aspects.
2593 (Analyze_Subprogram_Body_Helper): Do not emit an error when
2594 analyzing a body with aspects that can be applied simultaneously
2595 to both spec and body.
2596 * sem_ch13.adb (Analyze_Aspect_Specifications): Insert the
2597 corresponding pragma of an aspect that applies to a subprogram
2598 body in the declarative part.
2599 (Make_Aitem_Pragma): Do not generate a pragma with an empty argument
2602 2013-09-10 Robert Dewar <dewar@adacore.com>
2604 * switch-c.adb: Diagnose -gnatc given after -gnatRm.
2605 * gnat_ugn.texi: Add documentation for -gnatRm.
2606 * usage.adb: Minor reorganization (put style entries in proper
2607 order) Document -gnatRm switch.
2608 * sinfo.ads: Minor comment fix.
2610 2013-09-10 Sergey Rybin <rybin@adacore.com frybin>
2612 * tree_io.ads: Update ASIS_Version_Number.
2614 2013-09-10 Ed Schonberg <schonberg@adacore.com>
2616 * sem_ch3.adb (Access_Subprogram_Declaration): Check whether the
2617 designated type can appear in a parameterless call.
2618 * sem_ch4.adb (Analyze_Call): Do not insert an explicit dereference
2619 in the case of an indirect call through an access function that
2620 returns an array type.
2621 (Analyze_One_Call): Handle properly legal parameterless calls
2622 whose result is indexed, in constructs of the for F.all (I)
2623 * sem_ch6.ads (May_Need_Actuals): Make public, for use on access
2624 to subprogram types.
2625 * sem_res.adb (Resolve_Call): If the call is indirect, there is
2626 no entity to set on the name in the call.
2628 2013-09-10 Hristian Kirtchev <kirtchev@adacore.com>
2630 * aspects.adb: Add entries in the Has_Aspect_Specifications_Flag
2631 table for package body and body stubs.
2632 (Move_Or_Merge_Aspects): New routine.
2633 (Remove_Aspects): New routine.
2634 * aspects.ads (Move_Aspects): Update comment on usage.
2635 (Move_Or_Merge_Aspects): New routine.
2636 (Remove_Aspects): New routine.
2637 * par-ch3.adb: Update the grammar of private_type_declaration,
2638 private_extension_declaration, object_renaming_declaration,
2639 and exception_renaming_declaration.
2640 (P_Subprogram): Parse the
2641 aspect specifications that apply to a body stub.
2642 * par-ch6.adb: Update the grammar of subprogram_body_stub and
2643 generic_instantiation.
2644 * par-ch7.adb: Update the grammar of package_declaration,
2645 package_specification, package_body, package_renaming_declaration,
2647 (P_Package): Parse the aspect specifications
2648 that apply to a body, a body stub and package renaming.
2649 * par-ch9.adb: Update the grammar of entry_declaration,
2650 protected_body, protected_body_stub, task_body,
2652 (P_Protected): Add local variable
2653 Aspect_Sloc. Add local constant Dummy_Node. Parse the aspect
2654 specifications that apply to a protected body and a protected
2656 (P_Task): Add local variable Aspect_Sloc. Add local
2657 constant Dummy_Node. Parse the aspect specifications that apply
2658 to a task body and a task body stub.
2659 * par-ch12.adb: Update the grammar of
2660 generic_renaming_declaration.
2661 (P_Generic): Parse the aspect
2662 specifications that apply to a generic renaming.
2663 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Do not emit
2664 an error when analyzing aspects that apply to a body stub. Such
2665 aspects are relocated to the proper body.
2666 * sem_ch7.adb (Analyze_Package_Body_Helper): Analyze the aspect
2667 specifications that apply to a body.
2668 * sem_ch9.adb (Analyze_Protected_Body): Warn about user-defined
2669 aspects not being supported on protected bodies. Remove the
2670 aspect specifications. (Analyze_Single_Protected_Declaration):
2671 Analyze the aspects that apply to a single protected declaration.
2672 (Analyze_Task_Body): Warn about user-defined aspects not being
2673 supported on task bodies. Remove the aspect specifications.
2674 * sem_ch10.adb: Add with and use clause for Aspects.
2675 (Analyze_Package_Body_Stub): Propagate the aspect specifications
2676 from the stub to the proper body.
2677 * sem_ch13.adb (Analyze_Aspect_Specifications): Insert the
2678 corresponding pragma of an aspect that applies to a body in the
2679 declarations of the body.
2680 * sinfo.ads: Update the gramma of expression_function,
2681 private_type_declaration, private_extension_declaration,
2682 object_renaming_declaration, exception_renaming_declaration,
2683 package_renaming_declaration, subprogram_renaming_declaration,
2684 generic_renaming_declaration, entry_declaration,
2685 subprogram_body_stub, package_body_stub, task_body_stub,
2686 generic_subprogram_declaration.
2688 2013-09-10 Hristian Kirtchev <kirtchev@adacore.com>
2690 * sem_prag.adb (Analyze_Pragma): Add processing
2691 for aspect/pragma SPARK_Mode when it applies to a [library-level]
2692 subprogram or package [body].
2694 2013-09-10 Robert Dewar <dewar@adacore.com>
2696 * gnat_ugn.texi: Document that -gnatc and -gnatR cannot be
2698 * switch-c.adb (Scan_Front_End_Switches): Give error if both
2699 -gnatR and -gnatc given.
2701 2013-09-10 Robert Dewar <dewar@adacore.com>
2703 * g-table.ads, g-table.adb (For_Each): New generic procedure
2704 (Sort_Table): New generic procedure.
2706 2013-09-10 Thomas Quinot <quinot@adacore.com>
2708 * adaint.c (__gnat_is_executable_file_attr): Should be true
2709 for an executable regular file only only (not for a directory
2710 that has the executable permission).
2712 2013-09-10 Ed Schonberg <schonberg@adacore.com>
2714 * sem_res.adb: Further work on operator calls in ASIS.
2716 2013-09-10 Yannick Moy <moy@adacore.com>
2718 * sinfo.ads, sem_prag.ads, sem_ch13.adb: Minor correction and comment
2721 2013-09-10 Thomas Quinot <quinot@adacore.com>
2723 * aspects.ads, sem_ch13.adb: Minor reformatting.
2724 * adaint.c (__gnat_set_close_on_exec): Add comment documenting
2725 that this routine is shared between OS_Lib and Sockets.
2727 2013-09-10 Robert Dewar <dewar@adacore.com>
2729 * exp_prag.adb (Expand_Pragma_Check): Ignore pragma if Is_Ignored set.
2730 * sem_ch13.adb (Make_Aitem_Pragma): Set Is_Checked if needed.
2731 * sem_prag.adb (Check_Kind): Moved from spec (Analyze_Pragma):
2732 Make sure Is_Ignored/Is_Checked are set right (Analyze_Pragma,
2733 case Check): Ditto (Check_Applicable_Policy): Handle
2734 Statement_Assertion case Throughout, set and check the Is_Checked
2735 flag as appropriate.
2736 * sem_prag.ads (Check_Kind): Moved to body.
2737 * sinfo.ads, sinfo.adb (Is_Checked): New flag.
2739 2013-09-10 Robert Dewar <dewar@adacore.com>
2741 * aspects.ads (Delay_Type): New type (Aspect_Delay): New table.
2742 * einfo.adb (Has_Delayed_Rep_Aspects): New flag
2743 (May_Inherit_Delayed_Rep_Aspects): New flag (Rep_Clause): Removed
2744 (use Get_Attribute_Representation_Clause).
2745 * einfo.ads (Has_Delayed_Rep_Aspects): New flag
2746 (May_Inherit_Delayed_Rep_Aspects): New flag
2747 * freeze.adb: Minor reformatting
2748 * sem_ch13.adb (Analyze_Aspect_Speficifications): Redo
2749 handling of delayed evaluation, including optimizing some cases
2750 and avoiding delays.
2751 (Analyze_Aspects_At_Freeze_Point): Now
2752 handled inheriting delayed rep aspects for type derivation case.
2753 (Inherit_Delayed_Rep_Aspects): New procedure
2754 * sem_ch13.ads (Analyze_Aspects_At_Freeze_Point): Now handled
2755 inheriting delayed rep aspects for type derivation case.
2756 * sem_ch3.adb (Build_Derived_Type): Set
2757 May_Inherit_Derived_Rep_Aspects if parent type flag
2758 Has_Delayed_Rep_Aspects is set
2760 2013-09-10 Robert Dewar <dewar@adacore.com>
2762 * errout.adb (Finalize): Don't delete real errors with specific
2765 2013-09-10 Ed Schonberg <schonberg@adacore.com>
2767 * exp_ch9.adb (Expand_N_Timed_Entry_Call,
2768 Expand_N_Conditional_Entry_Call, Expand_N_Asynchronous_Select):
2769 Handle properly a trigger that is a call to a primitive operation
2770 of a type that implements a limited interface, if the type itself
2773 2013-09-10 Robert Dewar <dewar@adacore.com>
2775 * sem_ch3.adb, sinfo.ads, exp_ch9.adb, sem_prag.adb, sem_ch12.adb,
2776 exp_ch4.adb, sprint.adb: Minor reformatting.
2778 2013-09-10 Yannick Moy <moy@adacore.com>
2780 * sinfo.ads: Document splitting of pre/post in N_Contract description.
2782 2013-09-10 Ed Schonberg <schonberg@adacore.com>
2784 * exp_ch4.adb (Expand_N_Op_Multiply): If the operation is of the
2785 form X * 2 ** N and it has been marked Is_Power_Of_2_For_Shift,
2786 add a mod operation if the result type is a binary modular type.
2788 2013-09-10 Hristian Kirtchev <kirtchev@adacore.com>
2790 * sem_prag.adb (Check_Mode_Restriction_In_Enclosing_Context): Add local
2791 variable Context. Remove local variable Subp_Id. Start the
2792 context traversal from the current subprogram rather than the
2793 current scope. Update the scope traversal and error reporting.
2795 2013-09-10 Ed Schonberg <schonberg@adacore.com>
2797 * exp_ch9.adb (Expand_N_Timed_Entry_Call): New procedure
2798 Rewrite_Triggering_Statements, to encapsulate the statements that
2799 follow the trigger of the entry call. This procedure is needed
2800 when the trigger is a dispatching call, because the expansion
2801 requires several copies of those statements. The procedure is
2802 more efficient, and preserves non-local references when the
2803 construct is within an instance.
2805 2013-09-10 Ed Schonberg <schonberg@adacore.com>
2807 * sem_ch12.adb (Analyze_Package_Instantiation): If the
2808 instantiation is a compilation unit, analyze aspects before
2809 analyzing the package declaration for the instance.
2810 * sem_ch13.adb (Analyze_Aspect_Specifications): If the
2811 corresponding node is a package instantiation, insert generated
2812 pragmas at the head of visible declarations.
2813 * sem_prag.adb (Analyze_Pragma, case Preelaborate): In an instance
2814 do not ignore the pragma if it comes from an aspect specification
2815 in the instance, and not from the generic unit.
2816 * sprint.adb (Sprint_Node_Actual): For a package declaration that
2817 is an instantiation, print aspects after declaration.
2819 2013-09-10 Robert Dewar <dewar@adacore.com>
2821 * einfo.adb, sem_prag.adb, rtsfind.ads: Minor reformatting.
2823 2013-09-10 Hristian Kirtchev <kirtchev@adacore.com>
2825 * sem_prag.adb (Get_SPARK_Mode_Id): Handle the
2826 case where the pragma may appear without an argument.
2827 (Analyze_Global_List): Add expanded_name to the list of constructs
2828 that denote a single item.
2829 (Collect_Global_List): Add expanded_name to the list of constructs
2830 that denote a single item.
2832 2013-09-10 Hristian Kirtchev <kirtchev@adacore.com>
2834 * exp_ch4.adb (Apply_Accessibility_Check): Add local constant
2835 Pool_Id and local variables Fin_Call and Free_Stmt. Finalize
2836 and deallocate a heap-allocated class-wide object after it
2837 has been determined that it violates the accessibility rules.
2838 * rtsfind.ads: Add new RTU_Id for System.Memory. Add new RE_Id
2839 and entry in RE_Unit_Table for RE_Free.
2841 2013-09-01 Eric Botcazou <ebotcazou@adacore.com>
2842 Iain Sandoe <iain@codesourcery.com>
2845 * gcc-interface/Makefile.in (GCC_LINK_FLAGS): Add -static-libstdc++.
2846 (GCC_LINK): Use CXX instead of CC.
2847 * gcc-interface/Make-lang.in (CXX_LFLAGS): New.
2848 (ADA_TOOLS_FLAGS_TO_PASS): Pass CXX, and CXX_LFLAGS for native.
2850 2013-08-13 Eric Botcazou <ebotcazou@adacore.com>
2852 * gcc-interface/decl.c (gnat_to_gnu_entity): Do not bother about alias
2853 sets of derived types in ASIS mode.
2855 2013-08-13 Eric Botcazou <ebotcazou@adacore.com>
2857 * gcc-interface/decl.c (gnat_to_gnu_entity): Replace True with true.
2858 (is_cplusplus_method): Likewise, and False with false.
2859 (components_need_strict_alignment): Likewise.
2860 * gcc-interface/misc.c (gnat_init_gcc_fp): Likewise.
2861 * gcc-interface/trans.c (Loop_Statement_to_gnu): Likewise.
2862 (Handled_Sequence_Of_Statements_to_gnu): Likewise.
2863 (add_cleanup): Likewise.
2864 (Sloc_to_locus1): Likewise.
2865 (Sloc_to_locus): Likewise.
2866 (set_expr_location_from_node): Likewise.
2867 * gcc-interface/utils.c (potential_alignment_gap): Likewise.
2869 2013-08-13 Thomas Quinot <quinot@adacore.com>
2871 * gcc-interface/trans.c (set_end_locus_from_node): Clear column info
2872 for the end_locus of a block if it does not come from an End_Label.
2874 2013-08-13 Thomas Quinot <quinot@adacore.com>
2876 * gcc-interface/trans.c (Handled_Sequence_Of_Statements_to_gnu): If
2877 there is no End_Label, attach cleanup actions to the sloc of the HSS
2879 (Exception_Handler_to_gnu_zcx): Associate cleanup actions with the sloc
2880 of the handler itself.
2881 (add_cleanup): Clear column information in sloc of cleanup actions.
2882 (Sloc_to_locus1): New static function.
2883 (Sloc_to_locus): Call it.
2884 (set_expr_location_from_node1): New static function.
2885 (set_expr_location_from_node): Call it.
2887 2013-08-13 Eric Botcazou <ebotcazou@adacore.com>
2889 * gcc-interface/trans.c (Call_to_gnu): Deal with specific conditional
2890 expressions for misaligned actual parameters.
2892 2013-08-13 Eric Botcazou <ebotcazou@adacore.com>
2894 * gcc-interface/trans.c (can_equal_min_or_max_val_p): Be prepared for
2895 values outside of the range of the type.
2897 2013-08-13 Eric Botcazou <ebotcazou@adacore.com>
2899 * gcc-interface/utils2.c (build_atomic_load): Do a mere view-conversion
2900 to the original type before converting to the result type.
2901 (build_atomic_store): First do a conversion to the original type before
2902 view-converting to the effective type, but deal with a padded type
2905 2013-08-08 Eric Botcazou <ebotcazou@adacore.com>
2907 * gcc-interface/Makefile.in (TOOLS_LIBS): Pick C object files from the
2908 compiler build and use standard library variables.
2909 (../../vxaddr2line$(exeext): Do not depend on targext.o and adjust.
2910 (gnatmake-re): Do not depend on targext.o.
2911 (gnatlink-re): Do not depend on link.o and targext.o.
2912 (../../gnatmake$(exeext): Likewise.
2913 (../../gnatlink$(exeext): Likewise.
2915 2013-07-21 OndÃ…
\99ej BÃÂlka <neleai@seznam.cz>
2917 * gcc-interface/gigi.h: Fix typos.
2918 * gcc-interface/trans.c: Likewise.
2919 * gcc-interface/utils2.c: Likewise.
2920 * gnat_rm.texi: Likewise.
2921 * gnat_ugn.texi: Likewise.
2922 * raise-gcc.c: Likewise.
2923 * sigtramp-ppcvxw.c: Likewise.
2924 * sysdep.c: Likewise.
2925 * terminals.c: Likewise.
2927 2013-07-20 Eric Botcazou <ebotcazou@adacore.com>
2930 * gcc-interface/ada.h (CAT): Fix typo.
2932 2013-07-08 Hristian Kirtchev <kirtchev@adacore.com>
2934 * einfo.adb (Get_Pragma): Handle the retrieval of delayed
2935 pragmas stored in N_Contract nodes.
2936 * einfo.ads (Get_Pragma): Update the comment on usage.
2937 * sem_prag.adb (Check_Precondition_Postcondition): Retain a copy
2938 of the pragma when it applies to a body that acts as a spec. The
2939 copy is preanalyzed and chained on the contract of the body.
2941 2013-07-08 Robert Dewar <dewar@adacore.com>
2943 * rtsfind.adb: Minor comment fix.
2945 2013-07-08 Hristian Kirtchev <kirtchev@adacore.com>
2947 * sem_ch4.adb (Check_Ghost_Subprogram_Call): Do not check the placement
2948 of a Ghost function call when the enclosing context is being
2951 2013-07-08 Ed Schonberg <schonberg@adacore.com>
2953 * exp_ch6.adb (Expand_Inlined_Call, Process_Formals): If the
2954 expression in a return statement is a numeric literal, qualify
2955 it with the return type for proper resolution.
2957 2013-07-08 Robert Dewar <dewar@adacore.com>
2959 * sem.ads: Minor comment updates.
2960 * s-restri.ads, exp_ch6.adb, lib-load.ads, exp_ch3.adb, sem_ch10.adb:
2963 2013-07-08 Robert Dewar <dewar@adacore.com>
2965 * exp_attr.adb (Expand_N_Attribute_Reference): Add dummy entry
2966 for Restriction_Set.
2967 * gnat_rm.texi: Add missing menu entry for Attribute Ref Add
2968 documentation for attribute Restriction_Set.
2969 * lib-writ.adb (Write_With_Lines): Generate special W lines
2970 for Restriction_Set.
2971 * lib-writ.ads: Document special use of W lines for
2973 * lib.ads (Restriction_Set_Dependences): New table.
2974 * par-ch4.adb (Is_Parameterless_Attribute): Add Loop_Entry to
2975 list (Scan_Name_Extension_Apostrophe): Remove kludge test for
2976 Loop_Entry (Scan_Name_Extension_Apostrophe): Handle No_Dependence
2978 * restrict.adb (Check_SPARK_Restriction): Put in Alfa order
2979 (OK_No_Dependence_Unit_Name): New function.
2980 * restrict.ads (OK_No_Dependence_Unit_Name): New function.
2981 * rtsfind.adb: Minor reformatting Minor code reorganization.
2982 * sem_attr.adb (Analyze_Attribute): Add processing for
2984 * sem_prag.adb (Process_Restrictions_Or_Restriction_Warnings):
2985 Remove Check_Unit_Name and use new function
2986 OK_No_Dependence_Unit_Name instead.
2987 * sinfo.ads: Minor comment updates.
2988 * snames.ads-tmpl: Add entry for Restriction_Set attribute.
2990 2013-07-08 Hristian Kirtchev <kirtchev@adacore.com>
2992 * exp_ch4.adb (Apply_Accessibility_Check): Remove local constant
2993 Pool_Id and local variable Free_Stmt. Do not deallocate the faulty
2994 object as "free" is not available on all targets/profiles.
2996 2013-07-08 Robert Dewar <dewar@adacore.com>
2998 * sem_ch13.adb (Analyze_Aspect_Specifications): Handle
2999 Storage_Size aspect for task type in case discriminant is
3001 (Analyze_Attribute_Definition_Clause): Do not flag Storage_Size
3002 attribute definition clause as obsolescent if from aspect.
3004 2013-07-08 Robert Dewar <dewar@adacore.com>
3006 * gnat_rm.texi: Add documentation for Img returning a function.
3007 * par-prag.adb: Minor reformatting.
3008 * restrict.adb: Minor reformatting and code reorganization.
3010 2013-07-08 Ed Schonberg <schonberg@adacore.com>
3012 * sem_res.adb: add guard to ASIS transform.
3014 2013-07-08 Ed Schonberg <schonberg@adacore.com>
3016 * exp_ch9.adb (Expand_N_Asynchronous_Select): If the trigger
3017 of the asynchronous select is a dispatching call, transform the
3018 abortable part into a procedure, to avoid duplication of local
3019 loop variables that may appear within.
3021 2013-07-08 Vincent Celier <celier@adacore.com>
3023 * projects.texi: Update the documentation of suffixes in package
3026 2013-07-08 Ed Schonberg <schonberg@adacore.com>
3028 * sem_ch6.adb (Conforming_Types): Anonymous_access_to_subprograsm
3029 types are type conformant if the designated type of one is
3030 protected and the other is not. Convention only matters when
3031 checking subtype conformance.
3033 2013-07-08 Ed Schonberg <schonberg@adacore.com>
3035 * sem_res.adb (Make_Call_Into_Operator): In ASIS mode, propagate
3036 back the fully resolved operands to the original function call
3037 so that all semantic information remains available to ASIS.
3039 2013-07-08 Ed Schonberg <schonberg@adacore.com>
3041 * sem_ch4.adb: minor reformatting (remove obsolete comment).
3042 * sem_ch9.adb: improve error message on illegal trigger.
3044 2013-07-08 Robert Dewar <dewar@adacore.com>
3046 * sem_prag.adb: Minor reformatting.
3048 2013-07-08 Robert Dewar <dewar@adacore.com>
3050 * gnatcmd.adb: Minor reformatting.
3052 2013-07-08 Robert Dewar <dewar@adacore.com>
3054 * targparm.adb (Get_Target_Parameters): Recognize pragma
3055 Partition_Elaboration_Policy.
3057 2013-07-08 Robert Dewar <dewar@adacore.com>
3059 * gnat_ugn.texi: Minor update to mention partition elaboration policy.
3061 2013-07-08 Ed Schonberg <schonberg@adacore.com>
3063 * sem_ch4.adb (Comple_Object_Operation): Revert previous change.
3064 (Analyze_Indexed_Component_Form): In ASIS mode, if node has been
3065 transformed but not rewritten as a function call (as is the case
3066 in a generic), analyze it as such.
3068 2013-07-08 Thomas Quinot <quinot@adacore.com>
3070 * gnat_rm.texi: Minor rewording: add missing word "operators"
3071 in documentation for restriction No_Direct_Boolean_Operator.
3073 2013-07-08 Robert Dewar <dewar@adacore.com>
3075 * errout.adb (Set_Msg_Txt): No longer sets Is_Style_Msg,
3076 Is_Warning_Msg, or Is_Unconditional_Msg (all are set elsewhere
3078 * errout.ads: Insertions ! and !! no longer have to be at the
3079 end of the message, they can be anywhere in the message.
3080 * erroutc.adb (Test_Style_Warning_Serious_Unconditional_Msg):
3081 Replaces Test_Style_Warning_Serious_Msg
3082 * erroutc.ads (Has_Double_Exclam): New flag New comments for
3083 existing flags (Test_Style_Warning_Serious_Unconditional_Msg):
3084 Replaces Test_Style_Warning_Serious_Msg
3085 * errutil.adb (Test_Style_Warning_Serious_Unconditional_Msg):
3086 Replaces Test_Style_Warning_Serious_Msg
3088 2013-07-08 Robert Dewar <dewar@adacore.com>
3090 * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings):
3091 Recognize SPARK_05 as synonym for SPARK in restrictions pragma.
3092 * restrict.ads, restrict.adb (SPARK_Hides): Table moved to body, only
3094 * scng.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb, sem_ch8.adb,
3095 sem_res.adb, sem_util.adb: Use restriction SPARK_05 instead of SPARK.
3096 * snames.ads-tmpl (Name_No_Obsolescent_Features): New entry.
3098 2013-07-08 Vincent Celier <celier@adacore.com>
3100 * gnatcmd.adb (Check_Files): Use a response file for gnatls
3103 2013-07-08 Gary Dismukes <dismukes@adacore.com>
3105 * freeze.adb: Minor typo fixes.
3107 2013-07-08 Robert Dewar <dewar@adacore.com>
3109 * gnat_rm.texi: Document SPARK_05 (replaces SPARK) Document
3110 obsolete recognition of SPARK Document all other obsolete synonyms
3111 for old restrictions.
3112 * restrict.adb (Check_SPARK_Restriction): SPARK_05 replaces
3113 SPARK (Process_Restriction_Synonyms): Handle SPARK as synonym
3115 * restrict.ads: Restriction SPARK_05 replaces SPARK.
3116 * s-rident.ads: Replace restriction SPARK by SPARK_05 Add SPARK
3117 as synonym for SPARK_05.
3118 * sem_prag.adb: Minor reformatting.
3119 * snames.ads-tmpl: Add entries for Name_SPARK and Name_SPARK_05.
3121 2013-07-08 Robert Dewar <dewar@adacore.com>
3123 * sem_dim.adb: Minor error message change.
3124 * freeze.adb (Freeze_Entity, array type case): Extend handling
3125 of Implicit_Packing to handle multi-dimensional array case.
3126 * gnat_rm.texi: Update doc on Implicit_Packing.
3128 2013-07-08 Robert Dewar <dewar@adacore.com>
3130 * exp_ch4.adb: Minor reformatting.
3132 2013-07-08 Ed Schonberg <schonberg@adacore.com>
3134 * sem_ch4.adb (Complete_Object_Operation): In ASIS mode, if
3135 the parent node is a selected component and the analysis as a
3136 call is successful, set the type of the selector in the parent
3137 node for subsequent checks, because the rewriting of the node
3138 does not take place during pre-analysis.
3140 2013-07-08 Robert Dewar <dewar@adacore.com>
3142 * sem_ch8.adb, exp_ch3.adb: Minor reformatting.
3144 2013-07-08 Hristian Kirtchev <kirtchev@adacore.com>
3146 * exp_ch4.adb (Expand_N_Op_Eq): When comparing two
3147 Bounded_Strings, use the predefined equality function of the
3148 root Super_String type.
3150 2013-07-08 Hristian Kirtchev <kirtchev@adacore.com>
3152 * exp_ch4.adb (Create_Alternative): Removed.
3153 (Expand_N_If_Expression): Remove constant
3154 In_Case_Or_If_Expression. Add local variable
3155 Ptr_Typ. Inspect the "then" and "else" action lists
3156 for transient controlled objects and generate code to
3157 finalize them. (Is_Controlled_Function_Call): Removed.
3158 (Process_Action): Update the comment on usage. Update the call
3159 to Process_Transient_Object. There is no need to continue the
3160 traversal of the object itself.
3161 (Process_Actions): New routine.
3162 (Process_Transient_Object): Moved to the top level of Exp_Ch4. Add
3163 a new formal and update the related comment on usage.
3164 * exp_util.adb (Within_Case_Or_If_Expression): Start the search
3165 from the parent of the node.
3167 2013-07-08 Robert Dewar <dewar@adacore.com>
3169 * a-cusyqu.ads, a-cbprqu.ads, s-interr.ads, a-cuprqu.ads,
3170 a-cbsyqu.ads: Minor reformatting (proper formatting of overriding).
3172 2013-07-08 Ed Schonberg <schonberg@adacore.com>
3174 * sem_ch8.adb (Attribute_Renaming): Treat 'Img as an attribute
3175 that can be renamed as a function.
3177 2013-07-08 Thomas Quinot <quinot@adacore.com>
3179 * g-socket.ads: Document target dependency: FIONBIO may or may not
3180 be inherited from listening socket by accepted socket.
3182 2013-07-08 Hristian Kirtchev <kirtchev@adacore.com>
3184 * exp_ch4.adb (Apply_Accessibility_Check): Do not deallocate the object
3185 on targets that can't deallocate.
3187 2013-07-08 Hristian Kirtchev <kirtchev@adacore.com>
3189 * exp_ch3.adb (Freeze_Type): Generate a
3190 subpools-related accessibility check only on profiles that
3191 include the corresponding library unit.
3193 2013-07-08 Gary Dismukes <dismukes@adacore.com>
3195 * sem_ch8.adb: Minor typo fixes.
3197 2013-07-08 Javier Miranda <miranda@adacore.com>
3199 * sem_ch8.adb (Save_Scope_Stack): Adding documentation.
3200 (Restore_Scope_Stack): Remove the elements of the list when the
3201 visibility of each entity is restored.
3203 2013-07-08 Robert Dewar <dewar@adacore.com>
3205 * exp_ch9.adb, sem.ads, sem_util.adb: Minor reformatting.
3207 2013-07-08 Robert Dewar <dewar@adacore.com>
3209 * sem_ch8.adb, sem_ch8.ads: Minor reformatting.
3211 2013-07-08 Gary Dismukes <dismukes@adacore.com>
3213 * gnat_rm.texi: Minor reformatting and rewording for consistency.
3215 2013-07-08 Bob Duff <duff@adacore.com>
3217 * exp_ch3.adb (Build_Master): If Desig_Type is an incomplete
3218 view coming from a limited-with'ed package, use the nonlimited
3219 view in case it has tasks.
3221 2013-07-08 Javier Miranda <miranda@adacore.com>
3223 * sem_ch8.ad[sb] (Save_Scope_Stack): Modified to return the list
3224 of entities which have been temporarily removed from immediate
3226 (Restore_Scope_Stack): Modified to receive an
3227 additional parameter with the list of entities whose immediate
3228 visibility must be restored.
3229 * sem.adb (Do_Analyze): Use new version of
3230 Save_Scope_Stack/Restore_Scope_Stack
3231 * sem_ch12.adb (Inline_Instance_Body): Use new version of
3232 Save_Scope_Stack and Restore_Scope_Stack
3234 2013-07-08 Hristian Kirtchev <kirtchev@adacore.com>
3236 * sem_prag.adb (Analyze_Pragma): Remove
3237 variable Unit_Prag. Remove the check on duplicate mode for the
3238 configuration form of the pragma.
3239 (Redefinition_Error): Removed.
3241 2013-07-08 Robert Dewar <dewar@adacore.com>
3243 * lib.ads, gnat_rm.texi, einfo.ads, sem_ch13.adb: Minor reformatting
3246 2013-07-08 Ed Schonberg <schonberg@adacore.com>
3248 * sem_prag.adb (Analyze_PPC_In_Decl_Part): In ASIS mode,
3249 pre-analyze only the original expression attached to the source
3250 aspect, not the relocated expression of the pragma, to prevent
3251 malformed trees in ASIS mode.
3252 * sem_ch13.adb (Analyze_Aspect_Specifications): Revert previous
3253 patch: the expression in the aspect for pre/post must be relocated
3254 to the pragma for proper analysis.
3256 2013-07-05 Hristian Kirtchev <kirtchev@adacore.com>
3258 * aspects.adb: Add an entry for SPARK_Mode in table Canonical_Aspect.
3259 * aspects.ads: Add an entry for SPARK_Mode in tables Aspect_Id,
3260 Aspect_Argument, Aspect_Names.
3261 * atree.adb (Node32): New routine.
3262 (Set_Node32): New routine.
3263 * atree.ads (Node32): New routine.
3264 (Set_Node32): New routine.
3265 * einfo.adb: Node32 is now used as SPARK_Mode_Pragmas.
3266 (Set_SPARK_Mode_Pragmas): New routine.
3267 (SPARK_Mode_Pragmas): New routine.
3268 (Write_Field32_Name): Add and entry for SPARK_Modes.
3269 * einfo.ads: Add attribute SPARK_Mode_Pragmas along with usage
3270 in various entities.
3271 (Set_SPARK_Mode_Pragmas): New routine and
3273 (SPARK_Mode_Pragmas): New routine and pragma Inline.
3274 * gnat_rm.texi: Add sections explaining the syntax and semantics
3275 of aspect/pragma SPARK_Mode.
3276 * gnat_ugn.texi: Add pragma SPARK_Mode to the list of
3277 configuration pragmas.
3278 * lib.adb (Set_SPARK_Mode_Pragma): New routine.
3279 (SPARK_Mode_Pragma): New routine.
3280 * lib.ads: Alphabetize the comments on fields of record
3281 Unit_Record. Add new field SPARK_Mode_Pragma along with
3282 comment on its usage. Update the layout of record Unit_Record.
3283 (Set_SPARK_Mode_Pragma): New routine and pragma Inline.
3284 (SPARK_Mode_Pragma): New routine and pragma Inline.
3285 * lib-load.adb (Create_Dummy_Package_Unit): Initialize
3286 field SPARK_Mode_Pragma.
3287 (Load_Main_Source): Initialize field SPARK_Mode_Pragma.
3288 (Load_Unit): Initialize field SPARK_Mode_Pragma.
3289 * lib-writ.adb (Add_Preprocessing_Dependency): Initialize field
3291 (Ensure_System_Dependency): Initialize field SPARK_Mode_Pragma.
3292 * opt.ads: Alphabetize verification flags. Store the
3293 compilation-wide SPARK mode in variable Global_SPARK_Mode.
3294 * par-prag.adb: Pragma SPARK_Mode does not need special processing
3296 * sem_ch13.adb (Analyze_Aspect_Specifications): Convert aspect
3297 SPARK_Mode into a pragma.
3298 (Check_Aspect_At_Freeze_Point): Aspect SPARK_Mode does not need
3300 * sem_prag.adb: Add an entry for SPARK_Mode in table Sig_Flags.
3301 (Analyze_Pragma): Add processing for pragma SPARK_Mode.
3302 (Get_SPARK_Mode_Id): New routine.
3303 (Is_Elaboration_SPARK_Mode): New routine.
3304 (Is_Private_SPARK_Mode): New routine.
3305 * sem_prag.ads (Get_SPARK_Mode_Id): New routine.
3306 (Is_Elaboration_SPARK_Mode): New routine.
3307 (Is_Private_SPARK_Mode): New routine.
3308 * sinfo.ads: Update the comment on the usage of field Next_Pragma.
3309 * snames.ads-tmpl: Add new predefined name for SPARK_Mode and
3310 Auto. Add new pragma Id for SPARK_Mode.
3311 * types.ads: Add new type SPARK_Mode_Id.
3313 2013-07-05 Ed Schonberg <schonberg@adacore.com>
3315 * sem_ch13.adb (Analyze_Aspect_Specifications): For
3316 pre/postconditions copy the expression to the generated pragma,
3317 to avoid sharing between the original aspect and the pragma node,
3318 because in ASIS_Mode both will be independently analyzed.
3320 2013-07-05 Ed Schonberg <schonberg@adacore.com>
3322 * exp_ch3.adb (Build_Variant_Record_Equality): Add pairs of
3323 formals for each discriminant of an unchecked union.
3324 (Make_Eq_Case): Suprogram accepts a list of discriminants. Nested
3325 variants are supported. New helper function Corresponding_Formal.
3326 * exp_ch4.adb (Build_Equality_Call): For unchecked unions,
3327 loop through discriminants to create list of inferred values,
3328 and modify call to equality routine accordingly.
3330 2013-07-05 Claire Dross <dross@adacore.com>
3332 * a-cfdlli.ads, a-cfhama.ads, a-cfhase.ads, a-cforma.ads,
3333 a-cforse.ads, a-cofove.ads: Add preconditions when needed +
3334 container types are not tagged any more.
3336 2013-07-05 Thomas Quinot <quinot@adacore.com>
3338 * freeze.adb (Freeze_Entity): For an object with captured
3339 initialization statements, do not remove Init_Stmts from the
3340 enclosing list, as Freeze_All might rely on it to know where to
3343 2013-07-05 Robert Dewar <dewar@adacore.com>
3345 * exp_ch4.adb, a-cfdlli.ads, a-ngelfu.ads, s-bignum.adb: Minor
3348 2013-07-05 Hristian Kirtchev <kirtchev@adacore.com>
3350 * exp_ch4.adb (Expand_Composite_Equality): Use the full view
3351 when the base type is private.
3353 2013-07-05 Claire Dross <dross@adacore.com>
3355 * a-cfdlli.ads: Add preconditions when needed.
3357 2013-07-05 Robert Dewar <dewar@adacore.com>
3359 * sem_ch8.adb: Minor reformatting.
3361 2013-07-05 Ed Schonberg <schonberg@adacore.com>
3363 * sem_ch3.adb (Access_Subprogram_Declaration): Use
3364 Generate_Reference_To_Formals.
3365 * lib-xref.adb (Generate_Reference_To_Formals): In the case of
3366 access to subprograms, the formals are found in the designated
3369 2013-07-05 Robert Dewar <dewar@adacore.com>
3371 * gnat_ugn.texi: Document that comments can be lined up with
3372 previous non-blank line.
3373 * styleg.adb (Check_Comment): Allow indentation to match previous
3374 non-blank line (Same_Column_As_Previous_Line): New function
3376 2013-07-05 Robert Dewar <dewar@adacore.com>
3378 * gnat_rm.texi: Update doc on missing pragmas.
3379 * sem_ch12.adb: Minor comment additions.
3381 2013-07-05 Hristian Kirtchev <kirtchev@adacore.com>
3383 * sem_prag.adb (Analyze_Pragma): Ensure that
3384 Contract_Cases, Depends and Global are analyzed when they apply
3385 to a subprogram compilation unit. The pragmas are all added
3386 unconditionally to the construct's contract. This ensures that
3387 proof tools can locate the pragmas.
3389 2013-07-05 Ed Schonberg <schonberg@adacore.com>
3391 * sem_ch8.adb (Freeze_Actual_Profile): An instance within
3392 a generic unit does not freeze a generic private type of the
3393 enclosing generic. This rule must also apply to a type derived
3394 from a generic private type.
3396 2013-07-05 Arnaud Charlet <charlet@adacore.com>
3398 * gnat_rm.texi: Add missing documentation for pragmas.
3400 2013-07-05 Yannick Moy <moy@adacore.com>
3402 * sem_ch12.adb: Minor comment.
3404 2013-07-05 Robert Dewar <dewar@adacore.com>
3406 * gnat_rm.texi: Document that -gnatR and -gnatD cannot be used
3408 * switch-c.adb: Do not allow -gnatD and -gnatR to both be
3411 2013-07-05 Robert Dewar <dewar@adacore.com>
3413 * gnat_rm.texi: Add missing documentation for pragmas.
3414 * sem_ch8.adb: Minor reformatting.
3415 * gnat_ugn.texi: Document that -gnatR and -gnatD cannot be used
3418 2013-07-05 Yannick Moy <moy@adacore.com>
3420 * sem_ch12.ads, sem_ch12.adb (Need_Subprogram_Instance_Body): Force
3421 instance of subprogram body in SPARK mode, by testing Expander_Active
3422 (set in SPARK mode) instead of Full_Expander_Active (not set in
3424 * sem_ch8.adb: Minor reformatting.
3426 2013-07-05 Robert Dewar <dewar@adacore.com>
3428 * freeze.adb (Freeze_Entity): Remove test of obsolete flag
3429 Propagate_Exceptions, and associated useless code that did
3431 * gnat_rm.texi: Add documentation for obsolete pragma
3432 Propagate_Exceptions.
3433 * opt.ads (Propagate_Exceptions): Obsolete flag removed.
3434 * sem_prag.adb (Analyze_Pragma, case Propagate_Exceptions):
3435 Remove useless and obsolete setting of Propagate_Exceptions flag.
3437 2013-07-05 Robert Dewar <dewar@adacore.com>
3439 * gnat_rm.texi, sem_prag.adb: Minor comment/text fixes.
3441 2013-07-05 Robert Dewar <dewar@adacore.com>
3443 * gnat_rm.texi: Add missing doc for various pragmas.
3445 2013-07-05 Robert Dewar <dewar@adacore.com>
3447 * par_sco.adb, sem_ch12.adb, par-ch5.adb: Minor reformatting.
3448 * gnat_rm.texi: Document pragma Profile_Warnings.
3449 * restrict.ads, sem_prag.adb: Minor reformatting.
3451 2013-07-05 Ed Schonberg <schonberg@adacore.com>
3453 * sem_ch12.adb (Check_Formal_Package_Instance): Handle properly
3454 a formal subprogram that was defaulted in the formal package.
3456 2013-07-05 Thomas Quinot <quinot@adacore.com>
3458 * par_sco.adb (Traverse_Declarations_Or_Statements): Ignore
3459 N_Implicit_Label_Declaration nodes.
3461 2013-07-05 Robert Dewar <dewar@adacore.com>
3463 * a-cfhase.adb, sem_prag.adb, a-cfhama.adb: Minor reformatting.
3465 2013-07-05 Ed Schonberg <schonberg@adacore.com>
3467 * sem_ch12.adb (Copy_Generic_Node): Check that name in function
3468 call is a valid entity name before preserving entity in generic
3471 2013-07-05 Thomas Quinot <quinot@adacore.com>
3473 * par-ch5.adb: Minor reformatting.
3475 2013-07-05 Thomas Quinot <quinot@adacore.com>
3477 * sinfo.ads: Minor clarification to documentation for
3478 N_Implicit_Label_Declaration.
3480 2013-07-05 Hristian Kirtchev <kirtchev@adacore.com>
3482 * a-except-2005.adb, a-except.adb: Add constant Rmsg_17. Correct the
3483 values of all remaining constants.
3484 (Rcheck_35): New routine along with pragmas Export and No_Return.
3485 (Rcheck_PE_Aliased_Parameters): New routine along with pragmas
3486 Export and No_Return.
3487 (Rcheck_PE_All_Guards_Closed,
3488 Rcheck_PE_Bad_Predicated_Generic_Type,
3489 Rcheck_PE_Current_Task_In_Entry_Body,
3490 Rcheck_PE_Duplicated_Entry_Address, Rcheck_PE_Explicit_Raise,
3491 Rcheck_PE_Implicit_Return, Rcheck_PE_Misaligned_Address_Value,
3492 Rcheck_PE_Missing_Return, Rcheck_PE_Overlaid_Controlled_Object,
3493 Rcheck_PE_Potentially_Blocking_Operation
3494 Rcheck_PE_Stubbed_Subprogram_Called,
3495 Rcheck_PE_Unchecked_Union_Restriction,
3496 Rcheck_PE_Non_Transportable_Actual, Rcheck_SE_Empty_Storage_Pool,
3497 Rcheck_SE_Explicit_Raise, Rcheck_SE_Infinite_Recursion,
3498 Rcheck_SE_Object_Too_Large, Rcheck_PE_Finalize_Raised_Exception):
3499 Update the use of Rmsg_XX.
3500 (Rcheck_17, Rcheck_18, Rcheck_19,
3501 Rcheck_20, Rcheck_21, Rcheck_22, Rcheck_23, Rcheck_24, Rcheck_25,
3502 Rcheck_26, Rcheck_27, Rcheck_28, Rcheck_29, Rcheck_30, Rcheck_31,
3503 Rcheck_32, Rcheck_33, Rcheck_34, Rcheck_35): Update corresponding
3504 renamed subprograms.
3505 * checks.adb: Add with and use clause for Stringt.
3506 (Apply_Parameter_Aliasing_Checks): Make constant Loc visible in
3507 all subprograms of Apply_Parameter_Aliasing_Checks. Remove local
3508 variable Cond. Initialize Check at the start of the routine. Use
3509 routine Overlap_Check to construct a simple or a detailed run-time
3510 check. Update the creation of the simple check.
3511 (Overlap_Check): New routine.
3512 * exp_ch11.adb (Get_RT_Exception_Name): Add a value for
3513 PE_Aliased_Parameters.
3514 * types.ads: Add new enumeration literal
3515 PE_Aliased_Parameters. Update the corresponding integer values
3516 of all RT_Exception_Code literals.
3517 * types.h: Add new constant PE_Aliased_Parameters. Correct the
3518 values of all remaining constants.
3520 2013-07-05 Yannick Moy <moy@adacore.com>
3522 * gnat_rm.texi: Minor renaming of SPARK into SPARK 2005 in
3525 2013-07-05 Ed Schonberg <schonberg@adacore.com>
3527 * sem_prag.adb (Analyze_PPC_In_Decl_Part): For a class-wide
3528 condition, when replacing the name of a formal by a conversion
3529 to the class-wide type, exempt selector names that appear in
3530 parameter associations.
3532 2013-06-13 Eric Botcazou <ebotcazou@adacore.com>
3534 * gcc-interface/ada-tree.h (DECL_BY_DOUBLE_REF_P): Delete.
3535 * gcc-interface/gigi.h (annotate_object): Adjust prototype.
3536 (convert_vms_descriptor): Likewise.
3537 * gcc-interface/decl.c (gnat_to_gnu_param): Do not pass fat pointer
3538 types by double dereference.
3539 (annotate_object): Remove BY_DOUBLE_REF parameter and adjust.
3540 (gnat_to_gnu_entity): Adjust calls to annotate_object.
3541 * gcc-interface/trans.c (Identifier_to_gnu): Do not deal with double
3543 (Call_to_gnu): Likewise.
3544 (build_function_stub): Adjust call to convert_vms_descriptor.
3545 (Subprogram_Body_to_gnu): Adjust call to annotate_object.
3546 * gcc-interface/utils.c (convert_vms_descriptor): Remove BY_REF
3547 parameter and adjust.
3549 2013-05-30 Eric Botcazou <ebotcazou@adacore.com>
3551 * gcc-interface/Makefile.in (arm% androideabi): Robustify.
3553 2013-05-26 Eric Botcazou <ebotcazou@adacore.com>
3555 * gcc-interface/decl.c: (gnat_to_gnu_entity): In ASIS mode, do not
3556 check that access types have a set size.
3558 2013-05-26 Eric Botcazou <ebotcazou@adacore.com>
3560 * gcc-interface/decl.c (vinfo_t): New type and associated vector.
3561 (components_to_record): Change return type to bool.
3562 Lay out the variants in two passes. Do not force a specific layout for
3563 the variant part if the variants do not have a representation clause.
3564 Take the alignment of the variant part into account when laying out
3565 variants without rep clause in a record type with a partial rep clause.
3566 (create_rep_part): Do not set the position of the field.
3568 2013-05-26 Eric Botcazou <ebotcazou@adacore.com>
3570 * gcc-interface/trans.c (Attribute_to_gnu) <Attr_Last_Bit>: Add kludge
3571 to avoid generating an overflow for -1.
3573 2013-05-26 Eric Botcazou <ebotcazou@adacore.com>
3575 * gcc-interface/gigi.h (create_type_decl): Adjust prototype.
3576 (create_label_decl): Complete prototype.
3577 (process_attributes): Declare.
3578 * gcc-interface/decl.c (gnat_to_gnu_entity): Adjust multiple calls to
3579 create_type_decl throughout.
3580 <E_Enumeration_Type>: Do the layout of the type manually and call
3581 process_attributes on it. Reindent.
3582 <E_Enumeration_Subtype>: Minor tweak.
3583 <E_Floating_Point_Subtype>: Reindent.
3584 <E_Array_Subtype>: Call process_attributes on the array type built
3585 for a packed array type.
3586 <E_Record_Type>: Call process_attributes on the type.
3587 <E_Record_Subtype>: Likewise.
3588 <E_Access_Type>: Likewise.
3589 <E_Subprogram_Type>: Likewise.
3590 Likewise for all types at the end of the processing.
3591 * gcc-interface/utils.c (make_aligning_type): Adjust call to
3593 (maybe_pad_type): Likewise.
3594 (create_index_type): Likewise.
3595 (create_type_decl): Remove attr_list parameter and associated code.
3596 (create_var_decl_1): Call process_attributes on the variable.
3597 (process_attributes): Take a pointer to the object and add in_place
3598 and gnat_node parameters and adjust throughout.
3599 <ATTR_MACHINE_ATTRIBUTE>: Pass ATTR_FLAG_TYPE_IN_PLACE only on demand
3600 and set the input location.
3601 Zap the attribute list at the end.
3602 (create_subprog_decl): Call process_attributes on the subprogram.
3603 (build_unc_object_type): Adjust call to create_type_decl.
3604 (handle_vector_type_attribute): Remove dead code.
3606 2013-05-26 Eric Botcazou <ebotcazou@adacore.com>
3608 * gcc-interface/gigi.h (make_aligning_type): Adjust prototype.
3609 * gcc-interface/utils.c (make_aligning_type): Take GNAT_NODE parameter
3610 for the position of the associated TYPE_DECL.
3611 * gcc-interface/decl.c (gnat_to_gnu_entity): Adjust call to above.
3612 * gcc-interface/utils2.c (maybe_wrap_malloc): Likewise.
3614 2013-05-26 Eric Botcazou <ebotcazou@adacore.com>
3616 * gcc-interface/decl.c (gnat_to_gnu_entity): Do not prematurely
3617 elaborate the full view of a type with a freeze node.
3618 * gcc-interface/trans.c (process_type): Add explicit predicate.
3620 2013-05-26 Eric Botcazou <ebotcazou@adacore.com>
3622 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Always build the
3623 UNC variable for aliased objects with unconstrained nominal subtype.
3625 2013-05-24 Eric Botcazou <ebotcazou@adacore.com>
3627 * gcc-interface/gigi.h (gnat_init_gcc_fp): Declare.
3628 * gcc-interface/trans.c (gigi): Call it.
3629 * gcc-interface/misc.c (gnat_init_gcc_fp): New function.
3631 2013-05-24 Eric Botcazou <ebotcazou@adacore.com>
3633 * gcc-interface/gigi.h (enum inline_status_t): New type.
3634 (create_subprog_decl): Adjust prototype.
3635 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Procedure>: Adjust
3636 calls to create_subprog_decl.
3637 (get_minimal_subprog_decl): Likewise.
3638 * gcc-interface/trans.c (gigi): Likewise.
3639 (build_raise_check): Likewise.
3640 (establish_gnat_vms_condition_handler): Likewise.
3641 (Compilation_Unit_to_gnu): Likewise.
3642 (gnat_to_gnu): Likewise.
3643 * gcc-interface/utils.c (create_subprog_decl): Change inline_flag
3644 parameter to inline_status and implement for suppressed inlining.
3646 2013-05-24 Eric Botcazou <ebotcazou@adacore.com>
3648 * gcc-interface/ada-tree.h (LOOP_STMT_NO_UNROLL): New define.
3649 (LOOP_STMT_UNROLL): Likewise.
3650 (LOOP_STMT_NO_VECTOR): Likewise.
3651 (LOOP_STMT_VECTOR): Likewise.
3652 * gcc-interface/trans.c (struct loop_info_d): Replace label field
3654 (Pragma_to_gnu) <Pragma_Loop_Optimize>: New case.
3655 (Loop_Statement_to_gnu): Save the loop statement onto the stack
3656 instead of the label.
3657 (gnat_to_gnu) <N_Exit_Statement>: Retrieve the loop label.
3659 2013-05-24 Eric Botcazou <ebotcazou@adacore.com>
3661 * gcc-interface/trans.c: Include diagnostic.h and opts.h.
3662 (Pragma_to_gnu) <Pragma_Warnings>: New case.
3664 2013-05-24 Eric Botcazou <ebotcazou@adacore.com>
3666 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Record_Type>: Constify
3667 a handful of local variables.
3668 For a derived untagged type that renames discriminants, change the type
3669 of the stored discriminants to a subtype with the bounds of the type
3670 of the visible discriminants.
3671 (build_subst_list): Rename local variable.
3673 2013-05-16 Jason Merrill <jason@redhat.com>
3675 * gcc-interface/Make-lang.in (gnat1$(exeext)): Use link mutex.
3677 2013-05-13 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
3680 * gcc-interface/Makefile.in: Allow for amd64 solaris2.
3682 2013-05-07 Eric Botcazou <ebotcazou@adacore.com>
3685 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Subtype>: Use
3686 int_const_binop to shift bounds by 1 when they are integer constants.
3688 2013-04-25 Arnaud Charlet <charlet@adacore.com>
3690 * gcc-interface/Makefile.in (ADA_EXCLUDE_SRCS): Exclude s-init.ad{s,b}
3692 2013-04-25 Hristian Kirtchev <kirtchev@adacore.com>
3694 * checks.adb (Apply_Predicate_Check): Update the comment associated
3695 with the call to Check_Expression_Against_Static_Predicate.
3696 * sem_ch3.adb (Analyze_Object_Declaration): Update the comment
3697 associated with the call to Check_Expression_Against_Static_Predicate.
3698 * sem_util.adb (Check_Expression_Against_Static_Predicate):
3699 Broaden the check from a static expression to an expression with
3700 a known value at compile time.
3701 * sem_util.ads (Check_Expression_Against_Static_Predicate): Update
3704 2013-04-25 Thomas Quinot <quinot@adacore.com>
3706 * exp_attr.adb (Expand_N_Attribute_Reference, cases Position,
3707 First_Bit, and Last_Bit): Fix incorrect test in implementation of
3708 RM 2005 13.5.2(3/2).
3710 2013-04-25 Claire Dross <dross@adacore.com>
3712 * a-cfhase.adb, a-cfhase.ads, a-cforma.adb, a-cforma.ads, a-cfhama.adb,
3713 a-cfhama.ads, a-cforse.adb, a-cforse.ads, a-cofove.adb, a-cofove.ads
3714 (Query_Element): Removed.
3715 (Update_Element): Removed.
3716 (Insert): The version with no New_Item specified is removed.
3720 Every check of fields Busy and Lock has been removed.
3722 2013-04-25 Robert Dewar <dewar@adacore.com>
3724 * sem_prag.adb (Analyze_Pragma, case Contract_Cases): Remove
3725 call to S14_Pragma (Find_Related_Subprogram): Require proper
3726 placement in subprogram body (Find_Related_Subprogram): Detect
3727 duplicates for all cases (Find_Related_Subprogram): Handle case
3728 of spec nested inside body.
3730 2013-04-25 Arnaud Charlet <charlet@adacore.com>
3732 * par-prag.adb: Fix typo.
3734 2013-04-25 Hristian Kirtchev <kirtchev@adacore.com>
3736 * checks.adb (Apply_Predicate_Check): If the type has a static
3737 predicate and the expression is also static, check whether the
3738 expression satisfies the predicate.
3739 * sem_ch3.adb (Analyze_Object_Declaration): If the type has a
3740 static predicate and the expression is also static, see if the
3741 expression satisfies the predicate.
3742 * sem_util.adb: Alphabetize several routines.
3743 (Check_Expression_Against_Static_Predicate): New routine.
3744 * sem_util.ads (Check_Expression_Against_Static_Predicate): New routine.
3746 2013-04-25 Robert Dewar <dewar@adacore.com>
3748 * gnat_rm.texi: Document Reason argument for pragma Warnings.
3749 * par-prag.adb: Handle Reason parameter for pragma Warnings.
3750 * sem_prag.adb (Analyze_Pragma, case Warnings): Allow Reason argument.
3751 * snames.ads-tmpl (Name_Reason): New name entry.
3753 2013-04-25 Yannick Moy <moy@adacore.com>
3755 * exp_spark.adb (Expand_SPARK_N_In): Remove procedure.
3756 (Expand_SPARK): Remove special expansion for membership tests.
3758 2013-04-25 Hristian Kirtchev <kirtchev@adacore.com>
3760 * exp_ch3.adb (Expand_N_Object_Declaration): Update all places
3761 that should use constant Base_Typ. When building an invariant
3762 check, account for invariants coming from the base type. Prevent
3763 the creation of a junk invariant check when the related object
3764 is of an array type and it is initialized with an aggregate.
3765 * exp_util.adb (Make_Invariant_Call): Typ is now a variable. Use
3766 the base type to create an invariant call when the type of the
3767 expression is a composite subtype.
3769 2013-04-25 Vasiliy Fofanov <fofanov@adacore.com>
3771 * a-cborse.adb: Fix minor typo.
3773 2013-04-25 Ed Schonberg <schonberg@adacore.com>
3775 * sem_ch6.adb (Different_Generic_Profile): A spec and body
3776 match in an instance if a subtype declaration that renames a
3777 generic actual with the same name appears between spec and body.
3779 2013-04-25 Robert Dewar <dewar@adacore.com>
3781 * sem_util.adb: Minor reformatting.
3783 2013-04-25 Ed Schonberg <schonberg@adacore.com>
3785 * exp_aggr.adb (Expand_N_Aggregate): Use special circuitry to
3786 fold strings with a single others choice only if there are no
3787 expressions in the aggregate.
3789 2013-04-25 Arnaud Charlet <charlet@adacore.com>
3791 * gnat_ugn.texi: Update doc on Ada 2012 default mode.
3793 2013-04-25 Hristian Kirtchev <kirtchev@adacore.com>
3795 * exp_ch6.adb: Add with and use clause for Stringt.
3796 (Expand_Contract_Cases): Moved from sem_ch6. Add formal parameters
3797 Decls and Stmts along with comments on their usage.
3798 * exp_ch6.ads (Expand_Contract_Cases): Moved from sem_ch6.
3799 * sem_ch6.adb (Expand_Contract_Cases): Moved to exp_ch6.
3800 (Process_Contract_Cases): Update the call to Expand_Contract_Cases.
3802 2013-04-25 Ed Schonberg <schonberg@adacore.com>
3804 * gnat_rm.texi: Minor editing, to clarify use of dimension aspects.
3805 * sem_util.adb (Is_OK_Variable_For_Out_Formal): Reject an
3806 aggregate for a packed type, which may be converted into an
3807 unchecked conversion of an object.
3809 2013-04-25 Robert Dewar <dewar@adacore.com>
3811 * sem_prag.adb: Minor code reorganization (correct misspelling
3813 * sem_util.adb, aspects.ads, sem_ch6.adb: Minor reformatting.
3814 * gnat_rm.texi: Document impl-defined aspects.
3815 * sem_dim.adb, sem_dim.ads, gnat_ugn.texi, s-dimmks.ads: Minor
3818 2013-04-25 Hristian Kirtchev <kirtchev@adacore.com>
3820 * einfo.adb (Set_Abstract_States): The attribute now applies
3821 to generic packages.
3822 * sem_ch4.adb (Referenced): Moved to sem_util.
3823 * sem_ch7.adb (Unit_Requires_Body): A [generic] package with
3824 a non-null abstract state needs a body.
3825 * sem_prag.adb (Analyze_Depends_In_Decl_Part): Update the calls
3826 to Collect_Subprogram_Inputs_Outputs.
3827 (Analyze_Global_Item): Verify the proper usage of an item with mode
3828 In_Out or Output relative to the enclosing context.
3829 (Analyze_Pragma): Abstract_State can now be applied to a generic
3830 package. Do not reset the Analyzed flag for pragmas Depends and Global
3831 as this is not needed.
3832 (Appears_In): Moved to library level.
3833 (Check_Mode_Restiction_In_Enclosing_Context): New routine.
3834 (Collect_Subprogram_Inputs_Outputs): Moved to library level. Add
3835 formal parameters Subp_Id, Subp_Inputs, Subp_Outputs and Global
3836 seen along with comments on usage.
3837 * sem_util.ads, sem_util.adb (Referenced): New routine.
3839 2013-04-25 Hristian Kirtchev <kirtchev@adacore.com>
3841 * sem_ch6.adb (Expand_Contract_Cases): Generate
3842 detailed error messages only when switch -gnateE is in effect.
3844 2013-04-25 Yannick Moy <moy@adacore.com>
3846 * sem_attr.adb (Analyze_Attribute): Do not issue
3847 an error for a possibly misplaced 'Result or 'Old attribute when
3848 analyzing the aspect.
3850 2013-04-25 Robert Dewar <dewar@adacore.com>
3852 * sem_ch12.adb, sem_util.adb, sem_ch4.adb: Minor reformatting.
3854 2013-04-25 Hristian Kirtchev <kirtchev@adacore.com>
3856 * sem_ch4.adb (Analyze_Quantified_Expression):
3857 Add local variable Loop_Id. Verify that the loop variable
3858 is used within the condition of the quantified expression.
3859 (Referenced): New routine.
3861 2013-04-25 Hristian Kirtchev <kirtchev@adacore.com>
3863 * sem_case.adb (Analyze_Choices): Enhance the error message
3864 given on a bad use of subtype predicate.
3865 * sem_ch5.adb (Analyze_Loop_Parameter_Specification): Enhance
3866 the error message given on a bad use of subtype predicate.
3867 * sem_util.adb (Bad_Predicated_Subtype_Use): Add formal parameter
3868 Suggest_Static. Emit an extra error message advising how to
3869 remedy the bad use of the predicate if the context warrants it.
3870 * sem_util.ads (Bad_Predicated_Subtype_Use): Add formal parameter
3871 Suggest_Static along with a comment explaining its usage.
3873 2013-04-25 Ed Schonberg <schonberg@adacore.com>
3875 * sem_disp.adb (Check_Dispatching_Operation): Further refinement
3876 to checks for AI05-0125: the check for a hidden primitive that
3877 may be overridden by the new declaration only applies if the
3878 hidden operation is never declared. This is not the case if the
3879 operation is declared in a parent unit.
3881 2013-04-25 Robert Dewar <dewar@adacore.com>
3883 * debug.adb: Remove d.X and d.Y entries and documentation.
3884 * exp_ch4.adb (Expand_N_If_Expression): Remove special code used
3885 if expression with actions not available (now always available).
3886 (Expand_Short_Circuit_Operator): Same change.
3887 * gnat1drv.adb (Adjust_Global_Switches) Remove setting
3888 Use_Expression_With_Actions flag, since this is now obsolete.
3889 * opt.ads (Use_Expression_Actions): Removed (always True now).
3890 * sinfo.ads: Minor comment updates.
3892 2013-04-25 Ed Schonberg <schonberg@adacore.com>
3894 * sem_ch12.adb (Check_Generic_Actuals): If an actual is an array
3895 subtype whose base type is currently private, install full view
3896 when compiling instance body.
3898 2013-04-25 Ed Schonberg <schonberg@adacore.com>
3900 * sem_disp.adb (Check_Dispatching_Operation): Refine checks for
3901 AI05-0125: the check for a hidden primitive that may be overridden
3902 by the new declaration is only performed if the declaration comes
3903 from source, and it must carry an explicit overriding indicator.
3905 2013-04-25 Hristian Kirtchev <kirtchev@adacore.com>
3907 * einfo.adb (Abstract_States): The attribute now applies to
3909 * sem_ch3.adb (Analyze_Object_Declaration): Check whether an
3910 object declaration introduces an illegal hidden state.
3911 * sem_prag.adb (Analyze_Abstract_State): Check whether a state
3912 declaration introduces an illegal hidden state.
3913 * sem_util.ads, sem_util.adb (Check_No_Hidden_State): New routine.
3915 2013-04-25 Ed Schonberg <schonberg@adacore.com>
3917 * exp_ch6.adb (Is_Build_In_Place_Function_Call): The call may
3918 be to a protected function, in which case the name in the call
3919 is a selected component.
3921 2013-04-25 Hristian Kirtchev <kirtchev@adacore.com>
3923 * sem_ch4.adb (Analyze_Quantified_Expression):
3924 Warn on a suspicious use of quantifier "some" when "all" was meant.
3925 (No_Else_Or_Trivial_True): New routine.
3927 2013-04-25 Robert Dewar <dewar@adacore.com>
3929 * einfo.ads, einfo.adb: Put back with/use for Namet.
3930 (Get_Pragma): New name (wi new spec) for Find_Pragma.
3931 * sem_ch6.adb: Change name Find_Pragma to Get_Pragma with
3932 different interface.
3934 2013-04-25 Ed Schonberg <schonberg@adacore.com>
3936 * sem_ch3.adb (Is_Visible_Component): In an instance all
3937 components are visible.
3939 2013-04-25 Matthew Heaney <heaney@adacore.com>
3941 * a-rbtgbo.adb, a-crbtgo.adb (Generic_Equal): do not test for
3942 tampering when container empty.
3943 * a-crbtgk.adb (Ceiling, Find, Floor): ditto.
3944 (Generic_Conditional_Insert, Generic_Conditional_Insert_With_Hint):
3947 2013-04-25 Ed Schonberg <schonberg@adacore.com>
3949 * par-ch12.adb: Move aspects from package specification to
3950 generic package declaration.
3951 * sem_ch12.adb: Analyze aspect specifications before building
3952 and analyzing the generic copy, so that the generated pragmas
3953 are properly taken into account.
3954 * sem_ch13.adb: For compilation unit aspects that apply to a
3955 generic package declaration, insert corresponding pragmas ahead
3956 of visible declarations.
3957 * sprint.adb: Display properly the aspects of a generic type
3960 2013-04-25 Robert Dewar <dewar@adacore.com>
3962 * frontend.adb: Minor reformatting.
3964 2013-04-25 Ed Schonberg <schonberg@adacore.com>
3966 * einfo.ads: Extend documentation on use of Is_Private_Ancestor
3968 * sem_ch3.adb (Is_Visible_Component): Refine predicate for the
3969 case of untagged types derived from private types, to reject
3970 illegal selected components.
3972 2013-04-25 Gary Dismukes <dismukes@adacore.com>
3974 * sem_util.adb (Is_Dependent_Component_Of_Mutable_Object): Test
3975 for case of selecting from an unexpanded implicit dereference
3976 and do not make a recursive call on such a prefix.
3978 2013-04-25 Doug Rupp <rupp@adacore.com>
3980 * targparm.adb (VXF{_Str}): New tag for vaxfloat.
3981 (Get_Target_Parameters): Handle VXF tag.
3982 * targparm.ads (VAX_Float_On_Target): New boolean.
3983 * system-vms-ia64.ads (VAX_Float): New boolean.
3984 * frontend.adb (Frontend): Handle VAX float boolean.
3986 2013-04-25 Hristian Kirtchev <kirtchev@adacore.com>
3988 * einfo.ads, einfo.adb: Remove with and use clauses for Namet.
3989 (Find_Pragma): New routine.
3990 * sem_util.ads, sem_util.adb (Find_Pragma): Moved to einfo.
3992 2013-04-25 Hristian Kirtchev <kirtchev@adacore.com>
3994 * sem_ch13.adb (Add_Call): Do not capture the nature of the inherited
3996 (Add_Predicates): Save the static predicate for diagnostics and error
3998 (Process_PPCs): Remove local variables Dynamic_Predicate_Present and
3999 Static_Predicate_Present. Add local variable Static_Pred. Ensure that
4000 the expression of a static predicate is static.
4002 2013-04-25 Hristian Kirtchev <kirtchev@adacore.com>
4004 * einfo.adb (Is_Ghost_Subprogram): Remove useless code.
4006 2013-04-25 Robert Dewar <dewar@adacore.com>
4008 * gnat_rm.texi: Minor addition of index entry.
4010 2013-04-25 Hristian Kirtchev <kirtchev@adacore.com>
4012 * sem_ch6.adb (Check_Access_Invariants): Test whether an
4013 invariant procedure is empty before generating a call to it.
4014 (Has_Enabled_Predicate): New routine.
4015 (Has_Null_Body): New routine.
4016 (Process_PPCs): Test whether an invariant procedure is
4017 empty before generating a call to it. Test whether predicates are
4018 enabled for a particular type before generating a predicate call.
4019 * sem_util.ads, sem_util.adb (Find_Pragma): New routine.
4021 2013-04-25 Robert Dewar <dewar@adacore.com>
4023 * sem_ch7.adb, einfo.adb, repinfo.adb, snames.adb-tmpl,
4024 snames.ads-tmpl: Minor reformatting.
4026 2013-04-25 Thomas Quinot <quinot@adacore.com>
4028 * sem_ch7.adb: Minor reformatting.
4030 2013-04-25 Robert Dewar <dewar@adacore.com>
4032 * gnat_rm.texi: Minor fix to Loop_Variant doc (Loop_Entry allowed).
4033 * s-tarest.adb: Minor reformatting.
4035 2013-04-25 Hristian Kirtchev <kirtchev@adacore.com>
4037 * aspects.ads, aspects.adb: Remove aspect Ghost from all relevant
4039 * einfo.adb: Remove with and use clause for Aspects.
4040 (Is_Ghost_Function): Removed.
4041 (Is_Ghost_Entity): New routine.
4042 (Is_Ghost_Subprogram): New routine.
4043 * einfo.ads: Remove synthesized attribute Is_Ghost_Function
4044 along with its uses in entities. Add synthesized attributes
4045 Is_Ghost_Entity and Is_Ghost_Subprogram along with uses in related
4047 (Is_Ghost_Function): Removed.
4048 (Is_Ghost_Entity): New routine.
4049 (Is_Ghost_Subprogram): New routine.
4050 * par-prag.adb: Remove pragma Ghost from the processing machinery.
4051 * repinfo.adb (List_Mechanisms): Add a value for convention Ghost.
4052 * sem_attr.adb (Analyze_Access_Attribute): Update the check
4053 for ghost subprograms.
4054 * sem_ch4.adb (Analyze_Call): Update the check for calls
4055 to ghost subprograms.
4056 (Check_Ghost_Function_Call): Removed.
4057 (Check_Ghost_Subprogram_Call): New routine.
4058 * sem_ch6.adb (Check_Convention): Rewritten.
4059 (Check_Overriding_Indicator): Remove the check for overriding
4061 (Convention_Of): New routine.
4062 * sem_ch12.adb (Preanalyze_Actuals): Update the check for ghost
4063 generic actual subprograms.
4064 * sem_mech.adb (Set_Mechanisms): Add an entry for convention Ghost.
4065 * sem_prag.adb: Remove the value for pragma Ghost from
4067 (Analyze_Pragma): Remove the processing for pragma Ghost.
4068 (Process_Convention): Emit an error when a ghost
4069 subprogram attempts to override.
4070 (Set_Convention_From_Pragma): Emit an error when a ghost subprogram
4071 attempts to override.
4072 * sinfo.ads: Clarify the usage of field Label_Construct.
4073 * snames.adb-tmpl (Get_Convention_Id): Add an entry for
4074 predefined name Ghost.
4075 (Get_Convention_Name): Add an entry for convention Ghost.
4076 * snames.ads-tmpl: Move predefined name Ghost to the sublist
4077 denoting conventions. Add convention id Ghost. Remove pragma
4080 2013-04-25 Ed Schonberg <schonberg@adacore.com>
4082 * sem_ch7.adb (Swap_Private_Dependents): Do no recurse on child
4083 units if within a generic hierarchy.
4085 2013-04-24 Hristian Kirtchev <kirtchev@adacore.com>
4087 * exp_ch6.adb (Expand_Actuals): Add a predicate check on an
4088 actual the related type has a predicate function.
4089 * sem_ch3.adb (Constant_Redeclaration): Ensure that the related
4090 type has an invariant procedure before building a call to it.
4091 * sem_ch6.adb (Append_Enabled_Item): New routine.
4092 (Check_Access_Invariants): Use routine
4093 Append_Enabled_Item to chain onto the list of postconditions.
4094 (Contains_Enabled_Pragmas): Removed.
4095 (Expand_Contract_Cases): Use routine Append_Enabled_Item to chain onto
4096 the list of postconditions.
4097 (Invariants_Or_Predicates_Present): Removed.
4098 (Process_PPCs): Partially reimplemented.
4100 2013-04-24 Sergey Rybin <rybin@adacore.com frybin>
4102 * tree_io.ads: Update ASIS_Version_Number because of changes
4103 in the way how entities are chained in a scope by means of
4106 2013-04-24 Ed Schonberg <schonberg@adacore.com>
4108 * exp_ch13.adb (Expand_N_Attribute_Definition_Clause, case
4109 Storage_Size): If the clause is not from an aspect, insert
4110 assignment to size variable of task type at the point of the
4111 clause, not after the task definition, to prevent access before
4112 elaboration in the back-end.
4114 2013-04-24 Yannick Moy <moy@adacore.com>
4116 * sem_prag.adb (Sig_Flags): Set correct value for Pragma_Assume.
4118 2013-04-24 Yannick Moy <moy@adacore.com>
4120 * gnat_rm.texi: Document 'Loop_Entry.
4122 2013-04-24 Jose Ruiz <ruiz@adacore.com>
4124 * s-tassta.adb, s-tarest.adb (Task_Wrapper): Start looking for
4125 fall-back termination handlers from the parents, because they apply
4126 only to dependent tasks.
4127 * s-solita.adb (Task_Termination_Handler_T): Do not look for fall-back
4128 termination handlers because the environment task has no parent,
4129 and if it defines one of these handlers it does not apply to
4130 itself because they apply only to dependent tasks.
4132 2013-04-24 Robert Dewar <dewar@adacore.com>
4134 * sem_type.adb, exp_attr.adb, exp_ch4.adb: Minor reformatting.
4136 2013-04-24 Robert Dewar <dewar@adacore.com>
4138 * gnat_rm.texi: Document 'Update attribute.
4139 * sem_attr.adb (Analyze_Attribute, case Update): Remove call
4140 to S14_Attribute (S14_Attribute): removed.
4142 2013-04-24 Robert Dewar <dewar@adacore.com>
4144 * interfac.ads: Add size clauses for IEEE_Float_32/64
4146 2013-04-24 Claire Dross <dross@adacore.com>
4148 * gnat1drv.adb (Adjust_Global_Switches): Remove
4149 special assignment of Use_Expression_With_Actions for SPARK_Mode.
4151 2013-04-24 Hristian Kirtchev <kirtchev@adacore.com>
4153 * checks.adb (Apply_Predicate_Check): Check for the presence
4154 of the dynamic predicate aspect when trying to determine if the
4155 predicate of a type is non-static.
4156 * sem_ch5.adb (Analyze_Loop_Parameter_Specification): Check
4157 for the presence of the dynamic predicate aspect when trying to
4158 determine if the predicate of a type is non- static.
4159 * sem_ch13.adb (Add_Call): Capture the nature of the
4160 inherited ancestor predicate.
4161 (Build_Predicate_Functions): Update comments. Rewrite the checks on
4162 static predicate application. Complain about the form of a non-static
4163 expression only when the type is static.
4165 2013-04-24 Ed Schonberg <schonberg@adacore.com>
4167 * sem_prag.adb: Add guard to tree traversal.
4169 2013-04-24 Vincent Celier <celier@adacore.com>
4171 * clean.adb (Clean): Remove local variable Root_Environment,
4172 use Makeutl.Root_Environment instead.
4173 * gnatcmd.adb: Remove local variable Root_Environment, use
4174 Makeutl.Root_Environment instead.
4175 * make.adb (Gnatmake): Remove local variable Root_Environment,
4176 use Makeutl.Root_Environment instead.
4177 * prj-makr.adb: Remove local variable Root_Environment, use
4178 Makeutl.Root_Environment instead.
4180 2013-04-24 Hristian Kirtchev <kirtchev@adacore.com>
4182 * exp_attr.adb (Expand_Loop_Entry_Attribute): Clarify the
4183 extraction of the declarative part of the conditional block. Move
4184 the processing of simple infinite loops to the start of the
4185 expansion logic. Correct the check which determines whether the
4186 proper scope is installed in visibility.
4187 * sem_attr.adb (Analyze_Attribute): Add local variable Attr
4188 to keep track of the attribute in case the enclosing indexed
4189 component has to be rewritten. When searching for the enclosing
4190 loop, start from the proper attribute reference in case of a
4191 rewriting. Do not allow for 'Loop_Entry to appear in pragma
4192 Assert. Replace loop variable J with Index. Set the type of the
4194 * sem_ch5.adb (Check_Unreachable_Code): Detect a specialized
4195 block that services a loop statement subject to at least one
4196 'Loop_Entry attribute.
4198 2013-04-24 Ed Schonberg <schonberg@adacore.com>
4200 * sem_type.adb (Disambiguate): In Ada 2012 mode, when trying to
4201 resolve a fixed point operation, use first subtype to determine
4202 whether type and operator are declared in the same list of
4205 2013-04-24 Hristian Kirtchev <kirtchev@adacore.com>
4207 * par-ch6.adb (P_Subprogram): Detect an illegal
4208 placement of the aspect specification list in the context of
4209 expression functions.
4211 2013-04-24 Ed Schonberg <schonberg@adacore.com>
4213 * exp_ch4.adb (Expand_N_Allocator): If the designated object
4214 has tasks, and the pointer type is an itype that has no master
4215 id, create a master renaming in the current context, which can
4216 only be an init_proc.
4218 2013-04-24 Robert Dewar <dewar@adacore.com>
4220 * sem_ch3.adb, sem_ch7.adb: Minor reformatting.
4221 * gnat_rm.texi: Document pragma Loop_Invariant.
4222 * sem_attr.adb (Analyze_Attribute, case Loop_Entry): This is
4223 no longer an S14_Attribute.
4224 * sem_prag.adb (Analyze_Pragma, case Loop_Invariant): Combine
4225 processing with Assert, allow message parameter, remove call
4228 2013-04-24 Thomas Quinot <quinot@adacore.com>
4230 * exp_ch4.adb: Minor reformatting.
4232 2013-04-24 Ed Schonberg <schonberg@adacore.com>
4234 * sem_ch7.adb (Swap_Private_Dependents): New internal routine
4235 to Install_Private_Declarations, to make the installation of
4236 private dependents recursive in the presence of child units.
4237 * sem_ch3.adb (Build_Discriminated_Subtype): Initialize properly
4238 the Private_Dependents of a private subtype.
4240 2013-04-24 Hristian Kirtchev <kirtchev@adacore.com>
4242 * exp_attr.adb (Expand_Loop_Entry_Attribute): Update the
4243 retrieval of the block declarations.
4244 * par-ch4.adb (P_Name): Let the name parsing machinery create
4245 a sequence of nested indexed components for attribute Loop_Entry.
4246 * sem_attr.adb (Analyze_Attribute): Add local constant
4247 Context. Reimplement part of the analysis of attribute Loop_Entry.
4248 (Convert_To_Indexed_Component): Removed.
4249 * sem_ch4.adb (Analyze_Indexed_Component_Form): Do not analyze
4250 an indexed component after it has been rewritten into attribute
4253 2013-04-24 Yannick Moy <moy@adacore.com>
4255 * snames.ads-tmpl: Minor change to list
4256 Loop_(In)variant not in configuration pragma.
4257 * sem_ch3.adb (Analyze_Declarations): Do not look at the original node
4258 for analyzing the expressions in pre/postconditions.
4260 2013-04-24 Robert Dewar <dewar@adacore.com>
4262 * gnatcmd.adb, xref_lib.adb, gnatls.adb, sem_ch13.adb: Minor
4265 2013-04-24 Yannick Moy <moy@adacore.com>
4267 * sem_ch6.adb (Analyze_Generic_Subprogram_Body,
4268 Analyze_Subprogram_Body_Helper): Reset contract node to Empty
4269 before setting entity to E_Subprogram_Body.
4270 * sem_ch8.adb (Analyze_Subprogram_Renaming): Reset contract node to
4271 Empty before setting entity to E_Subprogram_Body.
4273 2013-04-24 Vincent Celier <celier@adacore.com>
4275 * gnat_ugn.texi: Document new gnatls switch -aPdir.
4276 * gnatcmd.adb: Pass switch -aP<dir> to gnatls.
4277 * gnatls.adb (Scan_Ls_Arg): Process new switch -aP<dir>. Issue
4278 a warning for unknown switches.
4279 (Usage): Add line for new switch -aPdir.
4281 2013-04-24 Ed Schonberg <schonberg@adacore.com>
4283 * sem_util.adb, sem_util.ads (Is_Limited_Class_Wide_Type): Return true
4284 if the type comes from a limited view, so that task attributes can be
4287 2013-04-24 Yannick Moy <moy@adacore.com>
4289 * checks.adb (Apply_Float_Conversion_Check): Do not apply checks if
4290 full expansion is not enabled.
4292 2013-04-24 Ed Schonberg <schonberg@adacore.com>
4294 * sem_ch6.adb (Create_Extra_Formals): In Ada 2012, create extra
4295 formals if the type does not yet have a completion, and thus
4296 has no underlying view.
4298 2013-04-24 Ed Schonberg <schonberg@adacore.com>
4300 * sem_ch13.adb (Analyze_Aspect_Specifications): Treat an aspect
4301 specification for Address as a reference, to suppress warnings
4302 on entities that may be read by an external device.
4304 2013-04-24 Sergey Rybin <rybin@adacore.com frybin>
4306 * gnat_ugn.texi: Add description of '--help' and '--version'
4307 options for ASIS tools: gnatelim, gnatmetric, gnatstub, gnatpp.
4309 2013-04-24 Arnaud Charlet <charlet@adacore.com>
4311 * gnat_rm.texi: Minor syntax fix.
4313 2013-04-24 Hristian Kirtchev <kirtchev@adacore.com>
4315 * exp_attr.adb (Expand_Loop_Entry_Attribute): Add extra comments on
4316 what and why is being analyzed. Remove the decoration of renamings as
4317 this simply falls out of the general analysis mechanism.
4319 2013-04-24 Hristian Kirtchev <kirtchev@adacore.com>
4321 * sem_res.adb (Explain_Redundancy): New routine.
4322 (Resolve_Equality_Op): Place the error concerning a redundant
4323 comparison to True at the "=". Try to explain the nature of the
4326 2013-04-24 Javier Miranda <miranda@adacore.com>
4329 * checks.adb, exp_ch6.adb (Install_Null_Excluding_Check): No
4330 check in interface thunks since it is performed at the caller
4332 (Expand_Simple_Function_Return): No accessibility check
4333 needed in thunks since the check is done by the target routine.
4335 2013-04-24 Vincent Celier <celier@adacore.com>
4337 * xref_lib.adb (Add_Entity): Use the canonical file names
4338 so that source file names with capital letters are found on
4339 platforms where file names are case insensitive.
4341 2013-04-24 Hristian Kirtchev <kirtchev@adacore.com>
4343 * par-ch4.adb (P_Name): Continue to parse the name extension when the
4344 construct is attribute Loop_Entry. Do not convert the attribute
4345 reference into an indexed component when there is at least one
4346 expression / range following 'Loop_Entry.
4348 2013-04-24 Hristian Kirtchev <kirtchev@adacore.com>
4350 * sem_ch6.adb (Contains_Enabled_Pragmas): New routine.
4351 (Process_PPCs): Generate procedure _Postconditions
4352 only when the context has invariants or predicates or enabled
4355 2013-04-24 Thomas Quinot <quinot@adacore.com>
4357 * g-socket.adb (Host_Entry): Introduce intermediate copy of
4358 memory location pointed to by Hostent_H_Addr, as it might not
4359 have sufficient alignment.
4361 2013-04-24 Yannick Moy <moy@adacore.com>
4363 * repinfo.adb (List_Rep_Info): Set the value of Unit_Casing before
4364 calling subprograms which may read it.
4366 2013-04-24 Hristian Kirtchev <kirtchev@adacore.com>
4368 * einfo.adb: Remove Loop_Entry_Attributes from the usage of
4369 nodes. Flag 260 is now used.
4370 (Has_Loop_Entry_Attributes): New routine.
4371 (Loop_Entry_Attributes): Removed.
4372 (Set_Has_Loop_Entry_Attributes): New routine.
4373 (Set_Loop_Entry_Attributes): Removed.
4374 (Write_Entity_Flags): Write out Flag 260.
4375 (Write_Field10_Name): Remove the output for Loop_Entry_Attributes.
4376 * einfo.ads: Remove attribute Loop_Entry_Attributes,
4377 its related comment and uses in nodes. Add new attribute
4378 Has_Loop_Entry_Attributes, related comment and uses in loop nodes.
4379 (Has_Loop_Entry_Attributes): New routine and pragma Inline.
4380 (Loop_Entry_Attributes): Removed along with pragma Inline.
4381 (Set_Has_Loop_Entry_Attributes): New routine and pragma Inline.
4382 (Set_Loop_Entry_Attributes): Removed along with pragma Inline.
4383 * exp_attr.adb (Expand_Loop_Entry_Attribute): New routine.
4384 (Expand_N_Attribute_Reference): Expand attribute 'Loop_Entry.
4385 * exp_ch5.adb: Remove with and use clause for Elists.
4386 (Expand_Loop_Entry_Attributes): Removed.
4387 (Expand_N_Loop_Statement): Add local variable Stmt. Rename local
4388 constant Isc to Scheme. When a loop is subject to attribute
4389 'Loop_Entry, retrieve the nested loop from the conditional
4390 block. Move the processing of controlled object at the end of
4392 * sem_attr.adb (Analyze_Attribute): Do not chain attribute
4393 'Loop_Entry to its related loop.
4394 * sem_ch5.adb (Analyze_Loop_Statement): Add local variable
4395 Stmt. When the iteration scheme mentions attribute 'Loop_Entry,
4396 the entire loop is rewritten into a block. Retrieve the nested
4397 loop in such cases to complete the analysis.
4398 * sem_util.ads, sem_util.adb (Find_Loop_In_Conditional_Block): New
4400 (Subject_To_Loop_Entry_Attributes): New routine.
4402 2013-04-24 Robert Dewar <dewar@adacore.com>
4404 * exp_prag.adb (Expand_Loop_Variant): Generate pragma Check
4405 (Loop_Variant, xxx) rather than Assert (xxx).
4406 * gnat_rm.texi: Document pragma Loop_Variant.
4407 * sem_prag.adb (Analyze_Pragma, case Loop_Variant): Remove call
4410 2013-04-24 Yannick Moy <moy@adacore.com>
4412 * adabkend.adb, ali-util.adb, ali.adb, debug.adb,
4413 errout.adb, errout.ads, erroutc.adb, exp_ch3.adb, exp_ch4.adb,
4414 exp_ch6.adb, exp_ch7.adb, exp_dbug.adb, exp_util.adb,
4415 expander.adb, freeze.adb, gnat1drv.adb, lib-writ.adb,
4416 lib-writ.ads, lib-xref.adb, lib-xref.ads, opt.adb, opt.ads,
4417 restrict.adb, sem_aggr.adb, sem_attr.adb, sem_ch3.adb,
4418 sem_ch4.adb, sem_ch5.adb, sem_ch6.adb, sem_eval.adb, sem_prag.adb,
4419 sem_res.adb, sem_util.adb: Everything with name
4420 'Alfa' renamed in 'SPARK'. Update comments.
4421 Renaming of units with name 'Alfa', renamed with 'SPARK' instead.
4422 * exp_alfa.adb: renamed exp_spark.adb.
4423 * exp_alfa.ads: renamed exp_spark.ads.
4424 * get_alfa.adb: renamed get_spark_xrefs.adb.
4425 * get_alfa.ads: renamed get_spark_xrefs.ads.
4426 * lib-xref-alfa.adb: renamed lib-xref-spark_specific.adb.
4427 * put_alfa.adb: renamed put_spark_xrefs.adb.
4428 * put_alfa.ads: renamed put_spark_xrefs.ads.
4429 * alfa.adb: renamed spark_xrefs.adb.
4430 * alfa.ads: renamed spark_xrefs.ads.
4431 * alfa_test.adb: renamed spark_xrefs_test.adb.
4432 * gcc-interface/Make-lang.in: Update dependencies.
4434 2013-04-24 Robert Dewar <dewar@adacore.com>
4436 * gnat_rm.texi: Document pragma Assume.
4437 * sem_prag.adb (Analyze_Pragma, case Assume): Now processed as
4438 part of Assert, and no longer requires -gnatd.F
4440 2013-04-24 Robert Dewar <dewar@adacore.com>
4442 * gnat_rm.texi: Document pragma Assert_And_Cut.
4443 * sem_prag.adb (Analyze_Pragma, case Assert_And_Cut): Remove
4446 2013-04-24 Ed Schonberg <schonberg@adacore.com>
4448 * sem_aux.adb: Add guard in Available_View.
4450 2013-04-24 Hristian Kirtchev <kirtchev@adacore.com>
4452 * sem_prag.adb (Analyze_Depends_In_Decl_Part): Use
4453 Find_Related_Subprogram to find the associated subprogram.
4454 (Analyze_Global_In_Decl_List): Use Find_Related_Subprogram
4455 to find the associated subprogram.
4456 (Analyze_Pragma): Use Find_Related_Subprogram to find the associated
4459 2013-04-24 Hristian Kirtchev <kirtchev@adacore.com>
4461 * exp_ch6.adb: Remove with and use clause for Sem_Prag.
4462 (Freeze_Subprogram): Call Analyze_Subprogram_Contract to analyze
4463 the contract of a subprogram.
4464 * sem_ch3.adb: Remove with and use clause for Sem_Prag.
4465 (Analyze_Declarations): Call Analyze_Subprogram_Contract to
4466 analyze the contract of a subprogram.
4467 * sem_ch6.adb (Analyze_Subprogram_Contract): New routine.
4468 (Check_Subprogram_Contract): Removed.
4469 * sem_ch6.ads (Analyze_Subprogram_Contract): New routine.
4470 (Check_Subprogram_Contract): Removed.
4471 (Expand_Contract_Cases): Add a guard against malformed contract cases.
4472 * sem_ch13.adb (Analyze_Aspect_Specifications): Call
4473 Decorate_Delayed_Aspect_And_Pragma to decorate aspects
4474 Contract_Cases, Depends and Global. Reimplement the analysis of
4475 aspect Contract_Cases.
4476 (Decorate_Delayed_Aspect_And_Pragma): New routine.
4477 * sem_prag.adb (Analyze_Contract_Cases_In_Decl_Part): New routine.
4478 (Analyze_CTC_In_Decl_Part): Removed.
4479 (Analyze_Pragma): Reimplement the analysis of pragma Contract_Cases.
4480 (Analyze_Test_Case_In_Decl_Part): New routine.
4481 (Find_Related_Subprogram): New routine.
4482 (Requires_Profile_Installation): Add new formal Prag. Update
4483 the logic to take into account the origin of the pragma.
4484 * sem_prag.ads (Analyze_Contract_Cases_In_Decl_Part): New routine.
4485 (Analyze_CTC_In_Decl_Part): Removed.
4486 (Analyze_Test_Case_In_Decl_Part): New routine.
4488 2013-04-24 Robert Dewar <dewar@adacore.com>
4490 * sem_prag.adb (Process_Convention): Move Stdcall tests to
4491 Set_Convention_From_Pragma so that they are applied to each
4492 entry of a homonym set.
4493 (Process_Convention): Don't try to set convention if already set.
4495 2013-04-24 Robert Dewar <dewar@adacore.com>
4497 * gnatbind.adb: Minor reformatting.
4499 2013-04-24 Vincent Celier <celier@adacore.com>
4501 * clean.adb (Gnatclean): Add the default project search
4502 directories in the project search path after scanning the
4503 switches on the command line.
4504 (Initialize): Do not put the default project search directories in the
4505 project search path.
4506 * gnatcmd.adb (GNATcmd): Add the default project search
4507 directories in the project search path after scanning the switches
4508 on the command line.
4509 * make.adb (Initialize): Add the default project search
4510 directories in the project search path after scanning the switches
4511 on the command line.
4513 2013-04-24 Yannick Moy <moy@adacore.com>
4515 * restrict.ads (Restriction_Warnings): Initialize with all False value.
4517 2013-04-24 Robert Dewar <dewar@adacore.com>
4519 * checks.ads, checks.adb (Predicate_Checks_Suppressed): New function.
4520 * exp_util.ads, exp_util.adb (Make_Predicate_Check): Check setting of
4522 * snames.ads-tmpl (Name_Predicate_Check): New check name.
4523 * types.ads (Predicate_Check): New definition.
4524 * gnat_rm.texi: Add documentation for Predicate_Check.
4526 2013-04-24 Ed Schonberg <schonberg@adacore.com>
4528 * exp_ch8.adb (Expand_N_Subprogram_Renaming_Declaration): If this
4529 is a renaming of predefined equality for an untagged record,
4530 add generated body to the freeze actions for the subprogram, to
4531 prevent freezing issues when the record has incomplete components.
4532 * exp_ch4.adb (Expand_Composite_Equality): If the type is a type
4533 without completion, return a predefined comparison instead of
4534 just False. This may happen when building the expression for
4535 record equality, when some component has a type whose completion
4536 has not been seen yet. The operation will be analyzed an expanded
4537 after the type has been frozen, at which point all component
4538 types will have been completed, or an error reported.
4540 2013-04-24 Ed Schonberg <schonberg@adacore.com>
4542 * sem_ch13.adb (Analyze_Aspect_Specifications): Do not delay
4543 analysis of a Convention aspect.
4545 2013-04-24 Eric Botcazou <ebotcazou@adacore.com>
4547 * fe.h (Machine_Overflows_On_Target): New macro and declaration.
4548 (Signed_Zeros_On_Target): Likewise.
4550 2013-04-24 Hristian Kirtchev <kirtchev@adacore.com>
4552 * exp_ch6.adb: Add with and use clause for Sem_Prag.
4553 (Freeze_Subprogram): Analyze all delayed aspects for a null
4554 procedure so that they are available when analyzing the
4555 internally-generated _Postconditions routine.
4556 * exp_ch13.adb: Remove with and use clause for Sem_Prag.
4557 (Expand_N_Freeze_Entity): Move the code that analyzes delayed
4558 aspects of null procedures to exp_ch6.Freeze_Subprogram.
4559 * sem_prag.adb (Analyze_Abstract_State): Update the check on
4560 volatile requirements.
4562 2013-04-24 Bob Duff <duff@adacore.com>
4564 * ali-util.ads (Source_Record): New component Stamp_File
4565 to record from whence the Stamp came.
4566 * ali-util.adb (Set_Source_Table): Set Stamp_File component.
4567 * bcheck.adb (Check_Consistency): Print additional information in
4569 * gnatbind.adb (Gnatbind): Print additional information in
4572 2013-04-24 Robert Dewar <dewar@adacore.com>
4574 * exp_ch13.adb, sem_prag.adb: Update comments.
4575 * sem_ch3.adb, exp_ch9.adb, g-socket.adb, sem_ch13.adb: Minor
4578 2013-04-24 Doug Rupp <rupp@adacore.com>
4580 * vms_data.ads (/{NO}INHIBIT-EXEC): Document new default behavior.
4582 2013-04-24 Yannick Moy <moy@adacore.com>
4584 * sinfo.ads: Minor correction of typo.
4586 2013-04-24 Ed Schonberg <schonberg@adacore.com>
4588 * sem_ch3.adb: Create packed array only when expander is
4591 2013-04-24 Hristian Kirtchev <kirtchev@adacore.com>
4593 * sem_prag.adb (Analyze_Depends_In_Decl_Part): Install the formals only
4594 when the context warrants it.
4595 (Analyze_Global_In_Decl_List): Install the formals only when
4596 the context warrants it.
4597 (Requires_Profile_Installation): New routine.
4599 2013-04-24 Ed Schonberg <schonberg@adacore.com>
4601 * exp_ch6.adb (Expand_N_Simple_Return_Statement): When the return
4602 type is a discriminated private type that does not require use
4603 of the secondary stack, a constrained subtype of the underlying
4604 type is created to convey the proper object size to the backend.
4605 If the return type is originally a private type, the return
4606 expression is wrapped in an unchecked_conversion. If the return
4607 expression is used subsequently in a call to the postcondition
4608 function, this conversion must be undone to prevent a spurious
4609 error on the analysis of that call.
4611 2013-04-23 Kai Tietz <ktietz@redhat.com>
4614 * raise-gcc.c (__SEH__): Additional check that SjLj isn't active.
4616 2013-04-23 Eric Botcazou <ebotcazou@adacore.com>
4617 Pascal Obry <obry@adacore.com>
4619 * gcc-interface/Makefile.in (targ): Fix target name check.
4620 (../../gnatmake$(exeext)): Add '+' for LTO.
4621 (../../gnatlink$(exeext)): Likewise.
4623 2013-04-23 Hristian Kirtchev <kirtchev@adacore.com>
4625 * exp_ch9.adb (Build_PPC_Wrapper): Correct the traversal of
4626 pre- and post-conditions.
4627 (Expand_N_Task_Type_Declaration):
4628 Use the correct attribute to check for pre- and post-conditions.
4629 * exp_ch13.adb (Expand_N_Freeze_Entity): Correct the traversal of
4630 pre- and post-conditions. Analyze delayed classification items.
4631 * freeze.adb (Freeze_Entity): Use the correct attribute to
4632 check for pre- and post- conditions.
4633 * sem_ch3.adb (Analyze_Declarations): Correct the traversal
4634 of pre- and post-conditions as well as contract- and
4635 test-cases. Analyze delayed pragmas Depends and Global.
4636 * sem_ch6.adb (Check_Subprogram_Contract): Use the correct
4637 attribute to check for pre- and post-conditions, as well as
4638 contract-cases and test-cases. (List_Inherited_Pre_Post_Aspects):
4639 Correct the traversal of pre- and post- conditions.
4640 (Process_Contract_Cases): Update the comment on usage. Correct
4641 the traversal of contract-cases.
4642 (Process_Post_Conditions): Update the comment on usage. Correct the
4643 traversal of pre- and post-conditions.
4644 (Process_PPCs): Correct the traversal of pre- and post-conditions.
4645 (Spec_Postconditions): Use the correct
4646 attribute to check for pre- and post- conditions, as well as
4647 contract-cases and test-cases.
4648 * sem_ch13.adb (Analyze_Aspect_Specifications): Reimplement the
4649 actions related to aspects Depends and Global. Code refactoring
4650 for pre- and post-conditions.
4651 (Insert_Delayed_Pragma): New routine.
4652 * sem_prag.adb (Add_Item): New routine.
4653 (Analyze_Depends_In_Decl_Part): New routine.
4654 (Analyze_Global_In_Decl_Part): New routine.
4655 (Analyze_Pragma): Reimplement the actions related to aspects Depends and
4656 Global. Verify that a body acts as a spec for pragma Contract_Cases.
4657 (Chain_PPC): Use Add_Contract_Item to chain a pragma.
4658 (Chain_CTC): Correct the traversal of contract-
4659 and test-cases. Use Add_Contract_Item to chain a pragma.
4660 (Chain_Contract_Cases): Correct the traversal of contract-
4661 and test-cases. Use Add_Contract_Item to chain a pragma.
4662 (Check_Precondition_Postcondition): Update the comment on usage.
4663 (Check_Test_Case): Update the comment on usage.
4664 * sem_prag.ads (Analyze_Depends_In_Decl_Part): New routine.
4665 (Analyze_Global_In_Decl_Part): New routine.
4666 * sem_util.ads, sem_util.adb (Add_Contract_Item): New routine.
4667 * sinfo.adb (Classifications): New routine.
4668 (Contract_Test_Cases): New routine.
4669 (Pre_Post_Conditions): New routine.
4670 (Set_Classifications): New routine.
4671 (Set_Contract_Test_Cases): New routine.
4672 (Set_Pre_Post_Conditions): New routine.
4673 (Set_Spec_CTC_List): Removed.
4674 (Set_Spec_PPC_List): Removed.
4675 (Spec_CTC_List): Removed.
4676 (Spec_PPC_List): Removed.
4677 * sinfo.ads: Update the structure of N_Contruct along with all
4679 (Classifications): New routine and pragma Inline.
4680 (Contract_Test_Cases): New routine and pragma Inline.
4681 (Pre_Post_Conditions): New routine and pragma Inline.
4682 (Set_Classifications): New routine and pragma Inline.
4683 (Set_Contract_Test_Cases): New routine and pragma Inline.
4684 (Set_Pre_Post_Conditions): New routine and pragma Inline.
4685 (Set_Spec_CTC_List): Removed.
4686 (Set_Spec_PPC_List): Removed.
4687 (Spec_CTC_List): Removed.
4688 (Spec_PPC_List): Removed.
4690 2013-04-23 Doug Rupp <rupp@adacore.com>
4692 * init.c (GNAT$STOP) [VMS]: Bump sigargs[0] count by 2
4693 to account for LIB$STOP not having the chance to add the PC and
4696 2013-04-23 Robert Dewar <dewar@adacore.com>
4698 * sem_ch13.adb: Minor code reorganization (remove some redundant
4700 * sem_ch3.adb, sem_prag.adb: Minor reformatting.
4702 2013-04-23 Yannick Moy <moy@adacore.com>
4704 * einfo.ads: Minor typo fix.
4705 * sem_ch13.adb (Build_Predicate_Functions): Reject cases where
4706 Static_Predicate is applied to a non-scalar or non-static type.
4707 * sem_prag.adb: Minor typo fix.
4709 2013-04-23 Doug Rupp <rupp@adacore.com>
4711 * init.c (GNAT$STOP) [VMS]: New function.
4713 2013-04-23 Ed Schonberg <schonberg@adacore.com>
4715 * sem_ch3.adb: Add exp_pakd to context.
4716 (Constrain_Component_Type): If the component of the parent is
4717 packed, and the record subtype being built is already frozen,
4718 as is the case for an itype, the component type itself will not
4719 be frozen, and the packed array type for it must be constructed
4722 2013-04-23 Thomas Quinot <quinot@adacore.com>
4724 * g-socket.adb, g-socket.ads (Set_Close_On_Exec): New subprogram.
4726 2013-04-23 Yannick Moy <moy@adacore.com>
4728 * err_vars.ads (Error_Msg_Qual_Level): Set variable to zero
4730 * opt.ads (Multiple_Unit_Index): Set variable to zero at declaration.
4731 * sem_util.adb (NCT_Table_Entries): Set variable to zero at declaration.
4732 * set_targ.ads (Num_FPT_Modes): Set variable to zero at declaration.
4733 * stylesw.adb (Save_Style_Check_Options): Protect testing the
4734 value of Style_Check_Comments_Spacing by a previous test that
4735 Style_Check_Comments is True.
4737 2013-04-23 Thomas Quinot <quinot@adacore.com>
4739 * sem_prag.adb, sem_prag.ads (Effective_Name): Rename to
4740 Original_Name, and move declaration to package body as this
4741 subprogram is not used from outside. Also clarify documentation.
4743 2013-04-23 Ed Schonberg <schonberg@adacore.com>
4745 * exp_ch6.adb (Expand_N_Subprogram_Body): When compiling with
4746 initialize_scalars, disable predicate checks on the generated
4747 assignment to an out scalar parameter.
4749 2013-04-23 Gary Dismukes <dismukes@adacore.com>
4751 * sem_ch4.adb (Analyze_Allocator): Remove error
4752 check for "constrained in partial view" constraints entirely.
4754 2013-04-23 Robert Dewar <dewar@adacore.com>
4756 * einfo.ads, sem_prag.ads: Minor reformatting.
4757 * errout.ads: Comment update.
4759 2013-04-23 Yannick Moy <moy@adacore.com>
4761 * exp_ch5.adb: Minor typo.
4763 2013-04-23 Thomas Quinot <quinot@adacore.com>
4765 * gnat_ugn.texi: Fix typo.
4767 2013-04-23 Ed Schonberg <schonberg@adacore.com>
4769 * einfo.ads: Minor documentation clarification.
4771 2013-04-23 Bob Duff <duff@adacore.com>
4773 * types.ads: Fix incorrect comment.
4775 2013-04-23 Ed Schonberg <schonberg@adacore.com>
4777 * sem_aux.adb sem_aux.ads (Effectively_has_Constrained_Partial_View):
4778 Rename subprogram as Object_Type_Has_Constrained_Partial_View, better
4779 description of purpose.
4780 * checks.adb (Apply_Discriminant_Check): Use above renaming.
4781 * sem_ch4.adb (Analyze_Allocator): Check Has_Constrained_Partial_View
4782 of the base type, rather than using the Object_Type predicate.
4783 * sem_attr.adb (Analyze_Attribute, case 'Access): Use above renaming.
4784 * sem_util.adb (Is_Dependent_Component_Of_Mutable_Object): ditto.
4785 * exp_attr.adb (Expand_N_Attribute_Reference, case 'Constrained): Ditto.
4786 * exp_ch4.adb (Expand_N_Allocator): Ditto.
4788 2013-04-23 Robert Dewar <dewar@adacore.com>
4790 * exp_prag.adb (Expand_Pragma_Check): Check for Assert rather
4792 * sem_prag.adb (Is_Valid_Assertion_Kind): Moved to spec
4793 (Effective_Name): New function (Analyze_Pragma, case Check):
4794 Disallow [Statement_]Assertions (Check_Kind): Implement
4795 Statement_Assertions (Check_Applicable_Policy): Use Effective_Name
4796 (Is_Valid_Assertion_Kind): Allow Statement_Assertions.
4797 * sem_prag.ads (Is_Valid_Assertion_Kind): Moved here from body
4798 (Effective_Name): New function.
4799 * sem_res.adb: Minor reformatting.
4800 * snames.ads-tmpl (Name_Statement_Assertions): New entry.
4801 * gnat_rm.texi: Add documentation of new assertion kind
4802 Statement_Assertions.
4804 2013-04-23 Robert Dewar <dewar@adacore.com>
4806 * sinfo.ads, einfo.adb, sem_res.adb, exp_ch6.adb, aspects.adb: Minor
4807 reformatting and code clean up.
4809 2013-04-23 Vincent Celier <celier@adacore.com>
4811 * prj-part.ads, prj-conf.ads: Minor comment updates.
4813 2013-04-23 Ed Schonberg <schonberg@adacore.com>
4815 * einfo.adb (Predicate_Function): For a private type, retrieve
4816 predicate function from full view.
4817 * aspects.adb (Find_Aspect): Ditto.
4818 * exp_ch6.adb (Expand_Actuals): If the formal is class-wide and
4819 the actual is a definite type, apply predicate check after call.
4820 * sem_res.adb: Do not apply a predicate check before the call to
4821 a generated Init_Proc.
4823 2013-04-23 Robert Dewar <dewar@adacore.com>
4825 * sem_ch13.adb (Analyze_Aspect_Specifications): Significant
4826 rewrite to make sure Is_Ignore is properly captured when aspect
4828 * sem_ch6.adb: Minor reformatting.
4829 * sem_prag.adb (Analyze_Pragma): Do not test policy at time of
4830 pragma for the case of a pragma coming from an aspect (already
4831 tested when we analyzed the aspect).
4833 2013-04-23 Vincent Celier <celier@adacore.com>
4835 * prj-conf.adb (Parse_Project_And_Apply_Config): New
4836 Boolean parameter Implicit_Project, defaulted to False. Call
4837 Prj.Part.Parse with Implicit_Project.
4838 * prj-conf.ads (Parse_Project_And_Apply_Config): New Boolean
4839 parameter Implicit_Project, defaulted to False.
4840 * prj-part.adb (Parse_Single_Project): New Boolean parameter
4841 Implicit_Project, defaulted to False. When Implicit_Project is
4842 True, change the Directory of the project node to the Current_Dir.
4843 * prj-part.ads (Parse): New Boolean parameter, defaulted to False
4845 2013-04-23 Robert Dewar <dewar@adacore.com>
4847 * exp_util.adb: Minor reformatting.
4849 2013-04-23 Robert Dewar <dewar@adacore.com>
4851 * xoscons.adb: Minor reformatting.
4853 2013-04-23 Hristian Kirtchev <kirtchev@adacore.com>
4855 * sem_prag.adb (Check_Mode): Ensure that a
4856 self-referential output appears in both input and output lists of
4857 the subprogram as categorized by aspect Global.
4858 (Check_Usage): Rename formal parameters to better illustrate their
4859 function. Update all uses of the said formals.
4861 2013-04-23 Thomas Quinot <quinot@adacore.com>
4863 * exp_util.adb, exp_util.ads (Fully_Qualified_Name_String): New
4864 parameter Append_NUL to make NUL-termination optional.
4865 * exp_dist.adb: Consistently use the above throughout instead of
4866 Get_Library_Unit_Name_String.
4868 2013-04-23 Robert Dewar <dewar@adacore.com>
4870 * sem_util.adb, sem_res.adb, prj-tree.adb, prj-tree.ads: Minor
4873 2013-04-23 Pascal Obry <obry@adacore.com>
4875 * xoscons.adb: Remove unused use clause, minor code clean-up.
4877 2013-04-23 Ed Schonberg <schonberg@adacore.com>
4879 * sem_util.ads, sem_util.adb: Code cleanup for Is_Expression_Function
4880 (can apply to any scope entity).
4881 * sem_res.adb (Resolve_Call): If the call is within another
4882 expression function it does not constitute a freeze point.
4884 2013-04-23 Yannick Moy <moy@adacore.com>
4886 * exp_ch6.adb (Expand_Actuals): Test that Subp
4887 is overloadable before testing if it's an inherited operation.
4889 2013-04-23 Robert Dewar <dewar@adacore.com>
4891 * a-envvar.adb, a-envvar.ads, exp_util.adb, sem_ch12.adb: Minor
4894 2013-04-23 Ed Schonberg <schonberg@adacore.com>
4896 * sem_ch3.adb (Analyze_Object_Declarations): Undo previous patch.
4897 * exp_util.adb (Expand_Subtype_From_Expr): If the expression
4898 is a source entity and the declaration is for an aliased
4899 unconstrained array, create a new subtype so that the flag
4900 Is_Constr_Subt_For_UN_Aliased does not pollute other entities.
4902 2013-04-23 Hristian Kirtchev <kirtchev@adacore.com>
4904 * aspects.adb: Move tables Base_Aspect and Inherited_Aspect
4905 from the spec to the body.
4906 (Find_Aspect): Update the call to Get_Aspect_Id.
4907 (Get_Aspect_Id): New version that takes an aspect specification.
4908 * aspects.ads: Reorganize all aspect related tables.
4909 (Get_Aspect_Id): New version that takes an aspect specification.
4910 * par_sco.adb (Traverse_Aspects): Update the call to Get_Aspect_Id.
4911 * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration): Update
4912 the call to Get_Aspect_Id.
4913 * sem_ch13.adb (Analyze_Aspect_At_Freeze_Point): Update the
4914 call to Get_Aspect_Id. (Analyze_Aspect_Specifications): Update
4915 the call to Get_Aspect_Id. Update the call to Impl_Defined_Aspect.
4917 2013-04-23 Robert Dewar <dewar@adacore.com>
4919 * sem_prag.adb (Fix_Error): Rewrite to do more accurate job
4920 of getting proper name in the case where pragma comes from
4922 * sem_ch3.adb, sinfo.ads, par-ch6.adb, exp_ch6.adb: Minor reformatting.
4924 2013-04-23 Yannick Moy <moy@adacore.com>
4926 * sem_ch6.adb (Process_PPCs): Do not filter postconditions based on
4929 2013-04-23 Thomas Quinot <quinot@adacore.com>
4931 * par_sco.adb (Traverse_Aux_Decls): Minor code reorganization.
4933 2013-04-23 Doug Rupp <rupp@adacore.com>
4935 * init.c: Move facility macros outside IN_RTS.
4937 2013-04-23 Thomas Quinot <quinot@adacore.com>
4939 * freeze.adb (Freeze_Entity): For the case of a bit-packed
4940 array time that is known at compile time to have more that
4941 Integer'Last+1 elements, issue an error, since such arrays are
4944 2013-04-23 Hristian Kirtchev <kirtchev@adacore.com>
4946 * sem_prag.adb (Analyze_Dependency_Clause): Update all calls to
4947 Analyze_Input_Output.
4948 (Analyze_Input_List): Update all calls to Analyze_Input_Output.
4949 (Analyze_Input_Output): Add formal parameter Self_Ref along with
4950 comment on its usage. Update all calls to Analyze_Input_Output.
4951 (Analyze_Pragma): Add new local variable Self_Ref to capture
4952 the presence of a self-referential dependency clause. Update
4953 all calls to Analyze_Input_Output.
4954 (Check_Mode): Add formal parameter Self_Ref along with comment on its
4955 usage. Verify the legality of a self-referential output.
4957 2013-04-23 Ed Schonberg <schonberg@adacore.com>
4959 * exp_ch6.adb: Add predicate checks on by-copy parameter.
4961 2013-04-23 Vincent Celier <celier@adacore.com>
4963 * a-envvar.adb, a-envvar.ads (Value): New.
4965 2013-04-22 Yannick Moy <moy@adacore.com>
4967 * exp_prag.adb (Expand_Pragma_Loop_Variant): Rewrite pragma as
4968 null statement if ignored.
4969 * sem_ch6.adb (Expand_Contract_Cases): Do nothing if pragma is ignored.
4970 * sem_prag.adb (Analyze_Pragma): Keep analyzing ignored pragmas.
4972 2013-04-22 Hristian Kirtchev <kirtchev@adacore.com>
4974 * sem_prag.adb (Analyze_Contract_Case): New routine.
4975 (Analyze_Pragma): Aspect/pragma Contract_Cases can
4976 now be associated with a library level subprogram.
4977 Add circuitry to detect illegal uses of aspect/pragma Contract_Cases
4978 in a subprogram body.
4979 (Chain_Contract_Cases): Rename formal parameter Subp_Decl to
4980 Subp_Id. Remove local constant Subp. The entity of the subprogram
4981 is now obtained via the formal paramter.
4983 2013-04-22 Ed Schonberg <schonberg@adacore.com>
4985 * sem_ch3.adb (Analyze_Object_Declaration): Do not set
4986 Is_Constr_Subt_For_Unc_Aliased on the subtype of the expression,
4987 if the expression is a source entity.
4989 2013-04-22 Yannick Moy <moy@adacore.com>
4991 * exp_prag.adb, sinfo.ads, sem_prag.ads: Minor correction of typos in
4993 * sem_ch6.adb (Expand_Contract_Cases): Add location to message.
4995 2013-04-22 Thomas Quinot <quinot@adacore.com>
4997 * sem_prag.adb (Fix_Error): For a pragma rewritten from another
4998 pragma, fix up error message to include original pragma name.
4999 * par_sco.adb: Minor reformatting.
5001 2013-04-22 Robert Dewar <dewar@adacore.com>
5003 * sem_prag.adb, sem_util.adb, sem_util.ads, sem_res.adb, exp_ch6.adb,
5004 sem_ch6.adb, opt.ads: Minor reformatting.
5006 2013-04-22 Pascal Obry <obry@adacore.com>
5008 * gnat_ugn.texi, prj-nmsc.adb, projects.texi: Add check for
5009 Library_Standalone and Library_Kind.
5011 2013-04-22 Ed Schonberg <schonberg@adacore.com>
5013 * exp_ch6.adb (Expand_Actuals): If the call is to an
5014 inherited operation and the actual is a by-reference type with
5015 predicates, add predicate call to post-call actions.
5016 * sem_util.adb (Is_Inherited_Operation_For_Type): Fix coding
5017 error: a type declaration has a defining identifier, not an Etype.
5018 * sem_res.adb: Restore code removed because of above error.
5020 2013-04-22 Doug Rupp <rupp@adacore.com>
5022 * init.c (__gnat_handle_vms_condition): Also match C$_SIGINT.
5024 2013-04-22 Yannick Moy <moy@adacore.com>
5026 * gnat_rm.texi, exp_util.adb, sem_prag.adb, sem_prag.ads, par-ch2.adb,
5027 opt.ads, sem_ch13.adb: Minor correction of typos in comments/doc.
5029 2013-04-22 Vincent Celier <celier@adacore.com>
5031 * prj-nmsc.adb (Check_Library_Attributes): Set Library_Dir to
5032 No_Path_Information only when Directories_Must_Exist_In_Projects
5034 (Get_Directories): Set Object_Directory
5035 or Exec_Directory to No_Path_Information only when
5036 Directories_Must_Exist_In_Projects is False.
5038 2013-04-22 Yannick Moy <moy@adacore.com>
5040 * par-prag.adb, sem_attr.adb, sem_ch6.adb, sem_prag.adb, sem_warn.adb,
5041 snames.ads-tmpl, sinfo.ads, sem_util.ads: Remove all references to
5042 Pragma_Contract_Case and Name_Contract_Case.
5044 2013-04-22 Yannick Moy <moy@adacore.com>
5046 * aspects.ads, aspects.adb, sem_ch13.adb: Removal of references to
5048 * gnat_ugn.texi, gnat_rm.texi Description of Contract_Case replaced by
5049 description of Contract_Cases.
5051 2013-04-12 Robert Dewar <dewar@adacore.com>
5053 * makeutl.adb, prj-nmsc.adb: Minor reformatting.
5055 2013-04-12 Robert Dewar <dewar@adacore.com>
5057 * exp_util.adb (Make_Invariant_Call): Use Check_Kind instead
5059 * gnat_rm.texi (Check_Policy): Update documentation for new
5060 Check_Policy syntax.
5061 * sem_prag.adb (Check_Kind): Replaces Check_Enabled
5062 (Analyze_Pragma, case Check_Policy): Rework to accomodate new
5063 syntax (like Assertion_Policy).
5064 * sem_prag.ads (Check_Kind): Replaces Check_Enabled.
5066 2013-04-12 Doug Rupp <rupp@adacore.com>
5068 * init.c (SS$_CONTROLC, SS$_CONTINUE) [VMS]: New macros.
5069 (__gnat_handle_vms_condition) [VMS]: Dispatch on the Crtl/C user
5070 handler if installed.
5071 * ctrl_c.c (__gnat_install_int_handler)
5072 [VMS]: Install a dummy sigaction handler to trigger the real
5073 user handler dispatch in init.c/__gnat_handle_vms_condition.
5074 (__gnat_uninstall_int_handler) [VMS]: Likewise.
5076 2013-04-12 Vincent Celier <celier@adacore.com>
5078 * clean.adb (Parse_Cmd_Line): Set Directories_Must_Exist_In_Projects
5079 to False if switch is specified.
5080 * makeutl.adb (Initialize_Source_Record): Do not look for the
5081 object file if there is no object directory.
5082 * opt.ads (Directories_Must_Exist_In_Projects): New Boolean
5083 variable, defaulted to True.
5084 * prj-nmsc.adb (Check_Library_Attributes): Do not fail if library
5085 directory does not exist when Directories_Must_Exist_In_Projects is
5087 (Get_Directories): Do not fail when the object or the exec directory
5088 do not exist when Directories_Must_Exist_In_Projects is False.
5090 2013-04-12 Robert Dewar <dewar@adacore.com>
5092 * namet.adb, namet.ads: Minor addition (7 arg version of Nam_In).
5093 * exp_prag.adb, sem_ch3.adb, sem_intr.adb, sem_type.adb, exp_util.adb,
5094 sem_aux.adb, exp_ch9.adb, sem_ch7.adb, sem_ch10.adb, sem_prag.adb,
5095 par-ch2.adb, tbuild.adb, rtsfind.adb, freeze.adb, sem_util.adb,
5096 sem_res.adb, sem_attr.adb, exp_ch2.adb, prj-makr.adb, sem_elab.adb,
5097 exp_ch4.adb, sem_ch4.adb, sem_mech.adb, sem_ch6.adb, par-prag.adb,
5098 prj-nmsc.adb, exp_disp.adb, sem_ch8.adb, sem_warn.adb, par-util.adb,
5099 sem_eval.adb, exp_intr.adb, sem_ch13.adb, exp_cg.adb, lib-xref.adb,
5100 sem_disp.adb, exp_ch3.adb: Minor code reorganization (use Nam_In).
5102 2013-04-12 Doug Rupp <rupp@adacore.com>
5104 * init.c: Don't clobber condition code on VMS.
5106 2013-04-12 Robert Dewar <dewar@adacore.com>
5108 * exp_aggr.adb: Minor reformatting.
5109 * namet.ads, namet.adb (Nam_In): New functions.
5111 2013-04-12 Robert Dewar <dewar@adacore.com>
5113 * einfo.adb (Has_Dynamic_Predicate_Aspect): New flag.
5114 (Has_Static_Predicate_Aspect): New flag.
5115 * einfo.ads (Has_Dynamic_Predicate_Aspect): New flag.
5116 (Has_Static_Predicate_Aspect): New flag.
5117 * exp_ch9.adb: Minor reformatting.
5118 * exp_util.adb (Make_Invariant_Call): Check_Enabled now handles
5120 * gnat1drv.adb: Remove setting of Debug_Pragmas_Enabled,
5121 since this switch is gone and control of Debug is done with
5123 * gnat_rm.texi: Update documentation for Assertion_Policy and
5124 Check_Policy pragmas.
5125 * opt.adb (Debug_Pragmas_Disabled[_Config]): Removed
5126 (Debug_Pragmas_Enabled[_Config]): Removed Since debug now
5127 controlled by Assertion_Enabled.
5128 * opt.ads (Debug_Pragmas_Disabled[_Config]): Removed
5129 (Debug_Pragmas_Enabled[_Config]): Removed Since debug now
5130 controlled by Assertion_Enabled.
5131 * par-ch2.adb (Scan_Pragma_Argument_Association): Allow new
5133 * sem_attr.adb: Minor reformatting.
5134 * sem_ch13.adb (Analyze_Aspect_Specification): Disable aspect
5135 if DISABLE policy applies.
5136 * sem_ch6.adb (Grab_PPC): Check original name of aspect for
5137 aspect from pragma (Process_PPCs): Properly check assertion policy.
5138 * sem_prag.adb (Check_Enabled): Rewritten for new Assertion_Policy
5139 (Check_Appicable_Policy): New procedure.
5140 (Is_Valid_Assertion_Kind): New function.
5141 (Rewrite_Assertion_Kind): New procedure.
5142 (Analyze_Pragma): Handle case of disabled assertion pragma.
5143 (Analyze_Pragma, case Assertion_Policy): Rewritten for Ada 2012.
5144 (Analyze_Pragma, case Check): Deal with 'Class possibilities.
5145 (Analyze_Pragma, case Check_Policy): Deal with 'Class possibilities.
5146 (Analyze_Pragma, case Contract_Class): New handling of ignored pragma.
5147 (Analyze_Pragma, case Debug): New control with Assertion_Policy.
5148 (Analyze_Pragma, case Debug_Policy): Now consistent with
5150 (Analyze_Pragma, case Loop_Invariant): New handling of ignored
5152 (Analyze_Pragma, case Loop_Variant): New handling of ignored pragma.
5153 (Analyze_Pragma, case Precondition): Use proper name for Check pragma.
5154 (Analyze_Pragma, case Check_Enabled): Rewritten for new policy stuff.
5155 * sem_prag.ads (Check_Enabled): Rewritten for new
5156 Assertion_Policy stuff.
5157 (Check_Appicable_Policy): New procedure.
5158 * sinfo.adb (Is_Disabled): New flag.
5159 (Is_Ignored): New flag.
5160 * sinfo.ads (Is_Disabled): New flag.
5161 (Is_Ignored): New flag.
5162 (N_Pragma_Argument_Association): New 'Class forms.
5163 * snames.ads-tmpl: New names Name_uPre, Name_uPost,
5164 Name_uType_Invariant, Name_uInvariant.
5165 * switch-c.adb: Remove setting of Debug_Pragmas_Enabled for -gnata.
5166 * tree_io.ads (ASIS_Version_Number): Updated (remove
5167 read write of obsolete flags Debug_Pragmas_Disabled and
5168 Debug_Pragmas_Enabled.
5170 2013-04-12 Ed Schonberg <schonberg@adacore.com>
5172 * exp_aggr.adb (Get_Explicit_Discriminant_Value): Subsidiary
5173 of Build_Record_Aggr_Code, used to retrieve explicit values
5174 for inherited discriminants in an extension aggregate, when the
5175 ancestor type is unconstrained.
5177 2013-04-12 Ed Schonberg <schonberg@adacore.com>
5179 * sem_attr.adb (Check_Stream_Attribute): If restriction
5180 No_Default_Stream_Attributes is active, it is illegal to use a
5181 predefined elementary type stream attribute either by itself,
5182 or more importantly as part of the attribute subprogram for a
5183 composite type. However, if the broader restriction No_Streams
5184 is active, then stream operations are not generated, and there
5187 2013-04-12 Robert Dewar <dewar@adacore.com>
5189 * gnatbind.adb: Minor reformatting.
5191 2013-04-12 Bob Duff <duff@adacore.com>
5193 * sem_attr.adb (Analyze_Access_Attribute): Treat P'Access like a
5194 call only in the static elaboration model.
5196 2013-04-12 Hristian Kirtchev <kirtchev@adacore.com>
5198 * sem_prag.adb (Analyze_Input_List): Detect an illegal dependency
5199 clause where both input and output lists are null.
5200 (Analyze_Pragma): Update the grammar of pragma Depends.
5202 2013-04-12 Vincent Celier <celier@adacore.com>
5204 * gnatbind.adb (No_Restriction_List): Exclude restrictions that
5205 take a parameter value, not a count.
5206 * prj.ads, prj.adb (Remove_All_Restricted_Languages): New procedure.
5207 * projects.texi: Complete documentation of attribute Roots.
5209 2013-04-12 Thomas Quinot <quinot@adacore.com>
5211 * exp_ch3.adb, exp_util.ads, checks.adb, freeze.adb, sem_attr.adb,
5212 sem_ch3.adb: Minor reformatting.
5213 * exp_ch4.adb (Size_In_Storage_Elements): Minor documentation
5214 improvement: note that the computation is pessimistic for bit
5216 * gnat_rm.texi (Range_Length): Fix minor error in description
5219 2013-04-12 Hristian Kirtchev <kirtchev@adacore.com>
5221 * aspects.adb (Find_Aspect): New routine.
5222 (Find_Value_Of_Aspect): New routine.
5223 (Has_Aspect): Reimplemented.
5224 * aspects.ads (Find_Aspect): New routine.
5225 (Find_Value_Of_Aspect): New routine, previously known as Find_Aspect.
5226 * exp_ch5.adb (Expand_Iterator_Loop): Update the call to Find_Aspect.
5227 * exp_util.adb (Is_Iterated_Container): Update the call to Find_Aspect.
5228 * sem_ch4.adb (Try_Container_Indexing): Update calls to Find_Aspect.
5229 * sem_ch5.adb (Analyze_Iterator_Specification): Update
5230 the call to Find_Aspect. Use function Has_Aspect for better
5232 (Preanalyze_Range): Use function Has_Aspect for better readability.
5233 * sem_ch13.adb (Check_One_Function): Update the call to Find_Aspect.
5234 * sem_prag.adb (Analyze_Pragma): There is no longer need to
5235 look at the parent to extract the corresponding pragma for
5238 2013-04-12 Robert Dewar <dewar@adacore.com>
5240 * checks.adb, sem_elab.adb, repinfo.adb, sem_ch4.adb, restrict.adb,
5241 restrict.ads: Minor reformatting.
5243 2013-04-12 Ed Schonberg <schonberg@adacore.com>
5245 * lib-xref.adb: Retrieve original name of classwide type if any.
5247 2013-04-12 Thomas Quinot <quinot@adacore.com>
5249 * exp_ch11.ads: Minor reformatting.
5251 2013-04-12 Hristian Kirtchev <kirtchev@adacore.com>
5253 * aspects.adb: Alphabetize subprogram bodies in this unit. Add
5254 an entry for Aspect_Ghost in the table of canonical aspects.
5255 (Has_Aspect): New routine.
5256 * aspects.ads: Add Aspect_Ghost to all relevant
5257 tables. Alphabetize subprograms in this unit.
5258 (Has_Aspect): New routine.
5259 * einfo.adb: Add with and use clauses for Aspects.
5260 (Is_Ghost_Function): New routine.
5261 * einfo.ads: Add new synthesized attribute Is_Ghost_Function and
5262 update the structure of the related nodes.
5263 (Is_Ghost_Function): New routine.
5264 * exp_ch4.adb (Find_Enclosing_Context): Use routine
5265 Is_Body_Or_Package_Declaration to terminate a search.
5266 (Is_Body_Or_Unit): Removed.
5267 * exp_util.adb (Within_Case_Or_If_Expression): Use routine
5268 Is_Body_Or_Package_Declaration to terminate a search.
5269 * par-prag.adb: Add pragma Ghost to the list of pragmas that do
5270 not need special processing by the parser.
5271 * sem_attr.adb (Analyze_Access_Attribute): Detect an
5272 illegal use of 'Access where the prefix is a ghost function.
5273 (Analyze_Attribute): Use routine Is_Body_Or_Package_Declaration
5274 to terminate a search. (Check_References_In_Prefix): Use routine
5275 Is_Body_Or_Package_Declaration to terminate a search.
5276 * sem_ch4.adb (Analyze_Call): Mark a function when it appears
5277 inside an assertion expression. Verify the legality of a call
5278 to a ghost function.
5279 (Check_Ghost_Function_Call): New routine.
5280 * sem_ch6.adb (Analyze_Function_Call): Code reformatting. Move
5281 the setting of attribute In_Assertion_Expression to Analyze_Call.
5282 (Check_Overriding_Indicator): Detect an illegal attempt to
5283 override a function with a ghost function.
5284 * sem_ch12.adb (Preanalyze_Actuals): Detect an illegal use of
5285 a ghost function as a generic actual.
5286 * sem_elab.adb (Check_Internal_Call_Continue): Update the call
5288 * sem_prag.adb: Add an entry for pragma Ghost in the table
5289 of significant arguments.
5290 (Analyze_Pragma): Do not analyze
5291 an "others" case guard. Add processing for pragma Ghost. Use
5292 Preanalyze_Assert_Expression when analyzing the expression of
5293 pragmas Loop_Invariant and Loop_Variant.
5294 * sem_util.adb (Get_Subprogram_Entity): Reimplemented.
5295 (Is_Body_Or_Package_Declaration): New routine.
5296 * sem_util.ads: Alphabetize subprotrams in this unit.
5297 (Is_Body_Or_Package_Declaration): New routine.
5298 * sinfo.adb (In_Assertion): Rename to In_Assertion_Expression.
5299 (Set_In_Assertion): Rename to Set_In_Assertion_Expression.
5300 * sinfo.ads: Rename flag In_Assertion to In_Assertion_Expression
5301 to better reflect its use. Update all places that mention the flag.
5302 (In_Assertion): Rename to In_Assertion_Expression. Update
5303 related pragma Inline. (Set_In_Assertion): Rename to
5304 Set_In_Assertion_Expression. Update related pragma Inline.
5305 * snames.ads-tmpl: Add new predefined name Ghost. Add new pragma
5308 2013-04-12 Arnaud Charlet <charlet@adacore.com>
5310 * sem_prag.adb (Set_Imported): Do not generate error for multiple
5311 Import in CodePeer mode.
5312 * s-rident.ads: Fix minor typo.
5314 2013-04-12 Ed Schonberg <schonberg@adacore.com>
5316 * checks.adb (Insert_Valid_Check): Do not insert validity check
5317 in the body of the generated predicate function, to prevent
5320 2013-04-12 Ed Schonberg <schonberg@adacore.com>
5322 * s-rident.ads: Add various missing Ada 2012 restrictions:
5323 No_Access_Parameter_Allocators, No_Coextensions,
5324 No_Use_Of_Attribute, No_Use_Of_Pragma.
5325 * snames.ads-tmpl: Add corresponding names.
5326 * restrict.ads restrict.adb: Subprograms and data structures to
5327 handle aspects No_Use_Of_Attribute and No_Use_Of_Pragma.
5328 * sem_ch4.adb: Correct name of restrictions is
5329 No_Standard_Allocators_After_Elaboration.
5330 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Check
5331 violation of restriction No_Use_Of_Attribute.
5332 * sem_prag.adb (Process_Restrictions_Or_Restriction_Warnings):
5333 Set restrictions No_Use_Of_Pragma and No_Use_Of_Attribute.
5334 (Analyze_Pragma): Check violation of restriction No_Use_Of_Pragma.
5335 * sem_res.adb: Check restrictions No_Access_Parameter_Allocators
5336 and No_Coextensions.
5337 * bcheck.adb: Correct name of restrictions is
5338 No_Standard_Allocators_After_Elaboration.
5339 * gnatbind.adb: Correct name of restrictions is
5340 No_Standard_Allocators_After_Elaboration.
5342 2013-04-12 Hristian Kirtchev <kirtchev@adacore.com>
5344 * sem_prag.adb (Analyze_Pragma, (Check_Mode_Restriction_In_Function):
5345 Correct error message format.
5347 2013-04-12 Robert Dewar <dewar@adacore.com>
5349 * sem_attr.adb: Minor reformatting.
5351 2013-04-12 Ed Schonberg <schonberg@adacore.com>
5353 * sem_elab.adb (Within_Elaborate_All): Do not examine a context
5354 item that has not been analyzed, because the unit may have errors,
5355 or the context item may come from a proper unit inserted at the
5356 point of a stub and not analyzed yet.
5358 2013-04-12 Thomas Quinot <quinot@adacore.com>
5360 * gnat1drv.adb, repinfo.adb, repinfo.ads (Repinfo.List_Array_Info,
5361 List_Record_Info): Also include scalar storage order information in
5364 2013-04-12 Yannick Moy <moy@adacore.com>
5366 * sem_ch6.adb (Process_Contract_Cases): Update code to apply to
5367 Contract_Cases instead of Contract_Case pragma.
5369 2013-04-12 Robert Dewar <dewar@adacore.com>
5371 * a-cfdlli.ads, g-socket.adb, s-fileio.adb: Minor reformatting.
5373 2013-04-12 Yannick Moy <moy@adacore.com>
5375 * sem_attr.adb (Analyze_Attribute): Update analyse of
5376 Attribute_Old and Attribute_Result so they are allowed in the
5377 right-hand-side of an association in a Contract_Cases pragma.
5378 * sem_prag.adb (Analyze_CTC_In_Decl_Part): Add pre-analysis of
5379 the expressions in a Contract_Cases pragma.
5381 2013-04-12 Robert Dewar <dewar@adacore.com>
5383 * sem.ads, opt.ads: Minor comment edits.
5384 * sem_warn.adb, sem_ch6.adb: Minor reformatting.
5386 2013-04-12 Claire Dross <dross@adacore.com>
5388 * a-cfdlli.adb a-cfdlli.ads (List, Not_No_Element, Iterate,
5389 Reverse_Iterate, Query_Element, Update_Element, Read, Write): Removed,
5390 not suitable for formal analysis.
5392 2013-04-12 Ed Schonberg <schonberg@adacore.com>
5394 * sem_prag.adb (Analyze_Abstract_State): Use Defining entity
5395 to locate package entity, which may be a child unit.
5397 2013-04-12 Thomas Quinot <quinot@adacore.com>
5399 * g-socket.adb, g-socket.ads (Connect_Socket, version with timeout): If
5400 the specified timeout is 0, do not attempt to determine whether the
5401 connection succeeded.
5403 2013-04-12 Doug Rupp <rupp@adacore.com>
5405 * s-fileio.adb (Form_RMS Context_Key): Fix some thinkos.
5407 2013-04-12 Doug Rupp <rupp@adacore.com>
5409 * s-fileio.adb: Minor reformatting.
5411 2013-04-12 Ed Schonberg <schonberg@adacore.com>
5413 * sem_warn.adb (Check_Infinite_Loop_Warning): Do not warn if
5414 the last statement in the analyzed loop is an unconditional
5417 2013-04-12 Robert Dewar <dewar@adacore.com>
5419 * opt.ads (Style_Check_Main): New switch.
5420 * sem.adb (Semantics): Set Style_Check flag properly for new
5421 unit to be analyzed.
5422 * sem_ch10.adb (Analyze_With_Clause): Don't reset Style_Check,
5423 the proper setting of this flag is now part of the Semantics
5425 * switch-c.adb (Scan_Front_End_Switches): Set Style_Check_Main
5426 for -gnatg and -gnaty
5428 2013-04-12 Doug Rupp <rupp@adacore.com>
5430 * s-crtl.ads (fopen, freopen): Add vms_form parameter
5431 * i-cstrea.ads (fopen, freopen): Likewise.
5432 * adaint.h (__gnat_fopen, __gnat_freopen): Likewise.
5433 * adaint.c (__gnat_fopen, __gnat_freopen): Likewise.
5434 [VMS]: Split out RMS keys and call CRTL function appropriately.
5435 * s-fileio.adb (Form_VMS_RMS_Keys, Form_RMS_Context_Key): New
5437 (Open, Reset): Call Form_VMS_RMS_Keys. Call fopen,freopen with
5439 * gnat_rm.texi: Document implemented RMS keys.
5441 2013-04-12 Hristian Kirtchev <kirtchev@adacore.com>
5443 * sem_ch13.adb (Analyze_Aspect_Specifications):
5444 Insert the corresponding pragma for aspect Abstract_State at
5445 the top of the visible declarations of the related package.
5446 Previously this was only done when the package is a compilation
5449 2013-04-12 Arnaud Charlet <charlet@adacore.com>
5451 * gnat_ugn.texi: Further menu clean ups.
5452 * sem_prag.adb, opt.ads: Minor reformatting.
5453 * sem_util.ads: Minor comment fix.
5455 2013-04-12 Hristian Kirtchev <kirtchev@adacore.com>
5457 * sem_ch13.adb (Analyze_Aspect_Specifications): Aspect
5458 Depends is now a delayed aspect. The delay is required
5459 due to the interplay between aspects Depends and Global.
5460 (Check_Aspect_At_Freeze_Point): Add an entry for aspect Depends.
5461 * sem_prag.adb: Reformat various error messages.
5462 (Add_Item): New subsidiary routine.
5463 (Analyze_Pragma): Add new variables
5464 Global_Seen, Result_Seen, Subp_Inputs and Subp_Outputs. The
5465 analysis of pragma Depends now has the capability to check
5466 the proper mode and usage of subprogram inputs and outputs.
5467 (Appears_In): New routine.
5468 (Check_Function_Return): New routine.
5469 (Check_Mode): New routine.
5470 (Check_Usage): New routine.
5471 (Collect_Subprogram_Inputs_Outputs): New routine.
5473 2013-04-12 Bob Duff <duff@adacore.com>
5475 * par-ch7.adb (P_Package): Initialize Sloc in the newly-pushed scope
5478 2013-04-12 Robert Dewar <dewar@adacore.com>
5480 * switch-c.adb: Minor fix to wording of error message for
5483 2013-04-12 Robert Dewar <dewar@adacore.com>
5485 * impunit.adb: Add s-multip and s-mudido to list of impl defined
5487 * gnat_rm.texi: Add documentation for
5488 System.Multiprocessors[.Dispatching_Domains].
5490 2013-04-12 Ben Brosgol <brosgol@adacore.com>
5492 * gnat_ugn.texi: Completion of menu cleanups.
5494 2013-04-12 Arnaud Charlet <charlet@adacore.com>
5496 * sem_prag.adb (Diagnose_Multiple_Pragmas): Relax the rules
5497 in Relaxed_RM_Semantics.
5499 2013-04-12 Arnaud Charlet <charlet@adacore.com>
5501 * set_targ.adb (elab code): Add support for non gcc back-ends
5502 where save_argv is null.
5504 2013-04-12 Robert Dewar <dewar@adacore.com>
5506 * gnat1drv.adb (Gnat1drv): Test Target_Dependent_Info_Write_Name.
5507 * opt.ads (Target_Dependent_Info_Read): Add _Name, now an access
5508 type (Target_Dependent_Info_Write): Add _Name, now an access type.
5509 * set_targ.adb (Write_Target_Dependent_Values): Use name
5510 from -gnatet switch stored in Target_Dependent_Info_Write_Name
5511 (Read_Target_Dependent_Values): Use name from -gnateT switch
5512 stored in Target_Dependent_Info_Read_Name.
5513 * switch-c.adb: New form of -gnatet and -gnateT switches.
5514 * usage.adb: New form of -gnatet and -gnateT switches with
5517 2013-04-11 Eric Botcazou <ebotcazou@adacore.com>
5519 * gcc-interface/decl.c (elaborate_expression_1): Skip only constant
5520 arithmetics when looking for a read-only variable in the expression.
5522 2013-04-11 Javier Miranda <miranda@adacore.com>
5524 * check.ads, exp_ch6.adb (Install_Null_Excluding_Check): No check in
5525 interface thunks since it is performed at the caller side.
5526 (Expand_Simple_Function_Return): No accessibility check needed in thunks
5527 since the check is done by the target routine.
5529 2013-04-11 Ed Schonberg <schonberg@adacore.com>
5531 * sem_prag.adb (Analyze_Pragma, case Priority): pre-analyze
5532 expression with type Any_Priority.
5533 * exp_ch9.adb (Initialize_Protection): Check that the value
5534 of the priority expression is within the bounds of the proper
5537 2013-04-11 Robert Dewar <dewar@adacore.com>
5539 * sem_prag.adb, prj-env.adb: Minor reformatting.
5541 2013-04-11 Ben Brosgol <brosgol@adacore.com>
5543 * gnat_ugn.texi: Clean ups.
5545 2013-04-11 Yannick Moy <moy@adacore.com>
5547 * set_targ.adb: Minor comment update.
5549 2013-04-11 Pascal Obry <obry@adacore.com>
5551 * gnat_ugn.texi: Remove obsolete comment about DLL calling
5554 2013-04-11 Javier Miranda <miranda@adacore.com>
5556 * exp_ch6.adb (Expand_Call): For the call to the target primitive
5557 of an interface thunks do not compute the extra actuals; just
5558 propagate the extra actuals received by the thunk.
5559 * exp_disp.adb (Expand_Interface_Thunk): Decorate new attribute
5561 * sem_ch6.adb (Create_Extra_Formals): Do not generate extra
5562 formals in interface thunks whose target primitive has no extra
5565 2013-04-11 Hristian Kirtchev <kirtchev@adacore.com>
5567 * sem_prag.adb (Analyze_Pragma): Detect
5568 a renaming by looking at the Renamed_Object attribute.
5569 (Is_Renaming): Removed.
5571 2013-04-11 Vincent Celier <celier@adacore.com>
5573 * prj-env.adb (Initialize_Default_Project_Path): Take
5574 into account a project path file, specified by environment
5575 variable GPR_PROJECT_PATH_FILE, before taking into account
5577 * projects.texi: Add documentation for GPR_PROJECT_PATH_FILE
5579 2013-04-11 Ed Schonberg <schonberg@adacore.com>
5581 * a-cdlili.adb, a-cdlili.ads, a-cihama.adb, a-cihama.ads, a-coinve.adb,
5582 a-coinve.ads, a-ciorse.adb, a-ciorse.ads, a-coorma.adb, a-coorma.ads,
5583 a-cfdlli.adb, a-cfdlli.ads, a-cborma.adb, a-cborma.ads, a-cidlli.adb,
5584 a-cidlli.ads, a-ciormu.adb, a-ciormu.ads, a-cihase.adb, a-cihase.ads,
5585 a-cohama.adb, a-cohama.ads, a-coorse.adb, a-coorse.ads, a-cbhama.adb,
5586 a-cbhama.ads, a-cborse.adb, a-cborse.ads, a-ciorma.adb, a-cobove.adb,
5587 a-ciorma.ads, a-cobove.ads, a-coormu.adb, a-coormu.ads, a-cohase.adb,
5588 a-cohase.ads, a-cbdlli.adb, a-cbdlli.ads, a-cbhase.adb, a-cbhase.ads:
5589 Move Iterator operations from body to private part of spec.
5591 2013-04-11 Eric Botcazou <ebotcazou@adacore.com>
5593 * ttypes.ads, get_targ.ads: More minor rewording of comments.
5595 2013-04-11 Johannes Kanig <kanig@adacore.com>
5597 * debug.adb: Document use of switch -gnatd.Z.
5599 2013-04-11 Hristian Kirtchev <kirtchev@adacore.com>
5601 * sem_prag.adb (Analyze_Pragma): Both pragma Depends and Global can now
5602 support renamings of entire objects. Legal renamings are replaced by
5603 the object they rename.
5604 (Is_Renaming): New routine.
5606 2013-04-11 Yannick Moy <moy@adacore.com>
5608 * set_targ.adb, opt.ads: Minor changes in comments.
5610 2013-04-11 Ben Brosgol <brosgol@adacore.com>
5612 * gnat_ugn.texi: Minor clean ups.
5614 2013-04-11 Robert Dewar <dewar@adacore.com>
5616 * nlists.ads, nlists.adb, treepr.adb, treepr.ads: Move debugging
5617 function p from Nlists to Treepr.
5619 2013-04-11 Ed Schonberg <schonberg@adacore.com>
5621 * sem_disp.adb (Check_Dispatching_Context): If the context is
5622 a contract for a null procedure defer error reporting until
5623 postcondition body is created.
5624 * exp_ch13.adb (Expand_N_Freeze_Entity): If the entity is a
5625 null procedure, complete the analysis of its contracts so that
5626 calls within classwide conditions are properly rewritten as
5629 2013-04-11 Thomas Quinot <quinot@adacore.com>
5631 * sem_ch10.adb, sem_ch12.adb: Minor reformatting.
5633 2013-04-11 Robert Dewar <dewar@adacore.com>
5635 * exp_attr.adb, sem_res.adb, sem_attr.adb: Minor reformatting.
5637 2013-04-11 Robert Dewar <dewar@adacore.com>
5639 * atree.adb, atree.ads (Node31): New function.
5640 (Set_Node31): New procedure.
5642 2013-04-11 Robert Dewar <dewar@adacore.com>
5644 * errout.ads: Minor typo correction.
5646 2013-04-11 Javier Miranda <miranda@adacore.com>
5648 * einfo.ad[sb] (Thunk_Entity/Set_Thunk_Entity): New attribute.
5650 2013-04-11 Robert Dewar <dewar@adacore.com>
5652 * back_end.adb (Register_Back_End_Types): Moved to Get_Targ
5653 * back_end.ads (C_String): Moved to Get_Targ
5654 (Register_Type_Proc): Moved to Get_Targ (Register_Back_End_Types):
5656 * cstand.adb (Register_Float_Type): New interface
5657 (Create_Back_End_Float_Types): Use entries in FPT_Mode_Table.
5658 * get_targ.adb (Register_Back_End_Types): Moved here from
5660 * get_targ.ads (C_String): Moved here from Back_End
5661 (Register_Type_Proc): Moved here from Back_End
5662 (Register_Back_End_Types): here from Back_End.
5663 * gnat1drv.adb (GGnat11drv): Add call to
5664 Write_Target_Dependent_Values;
5665 * lib-writ.ads, lib-writ.adb (Write_ALI): Remove section writing
5666 obsolete target dependent info.
5667 * opt.ads (Generate_Target_Dependent_Info):
5668 Removed (Target_Dependent_Info_Read): New flag
5669 (Target_Dependent_Info_Write): New flag
5670 * output.adb: Minor comment change
5671 * s-os_lib.ads: Minor reformatting
5672 * set_targ.ads, set_targ.adb: Minor reformatting.
5673 * switch-c.adb (Scan_Switches.First_Ptr): New variable
5674 (Scan_Front_End_Switches): Check -gnatd.b, -gnateT come first
5675 (Scan_Front_End_Switches): Handle -gnatet, -gnateT
5676 * ttypes.ads: Remove documentation section on target dependent
5677 info in ali file Remove four letter codes, no longer used Instead
5678 of using Get_Targ.Get_xxx, we use Set_Targ.xxx
5679 * usage.adb: Add usage lines for -gnatet/-gnateT
5680 * gcc-interface/Make-lang.in: Update dependencies.
5682 2013-04-11 Thomas Quinot <quinot@adacore.com>
5684 * sem_ch4.adb: Update documentation.
5685 * sinfo.ads (N_Expression_With_Actions): Ditto.
5687 2013-04-11 Hristian Kirtchev <kirtchev@adacore.com>
5689 * sem_ch13.adb (Analyze_Aspect_Specifications):
5690 Add a guard to prevent the double insertion of the same aspect
5691 into a rep item list. This previously led to a circularity.
5693 2013-04-11 Ed Schonberg <schonberg@adacore.com>
5695 * sem_attr.adb (Eval_Attribute, case 'Access): Reject attribute
5696 reference if the prefix is the dereference of an anonymous access
5698 * exp_attr.adb (Expand_N_Attribute_Reference, Access_Cases): Handle
5699 properly a reference to the current instance of a protected type
5700 from within a protected subprogram.
5701 * sem_res.adb (Find_Unique_Access_Type): Treat
5702 Attribute_Access_Type like Allocator_Type when resolving an
5705 2013-04-11 Arnaud Charlet <charlet@adacore.com>
5707 * xgnatugn.adb: Remove obsolete comments.
5709 2013-04-11 Robert Dewar <dewar@adacore.com>
5711 * back_end.ads, back_end.adb: Minor reformatting.
5712 * set_targ.ads, set_targ.adb: New files.
5714 2013-04-11 Hristian Kirtchev <kirtchev@adacore.com>
5716 * sem_case.adb (Check_Against_Predicate): New routine.
5717 (Check_Choices): When the type covered by the list of choices
5718 is a static subtype with a static predicate, check all choices
5719 agains the predicate.
5720 (Issue_Msg): All versions removed.
5721 (Missing_Choice): New routines.
5722 * sem_ch4.adb: Code and comment reformatting.
5723 (Analyze_Case_Expression): Do not check the choices when the case
5724 expression is being preanalyzed and the type of the expression
5725 is a subtype with a static predicate.
5726 (Has_Static_Predicate): New routine.
5727 * sem_ch13.adb: Code and comment reformatting. (Build_Range):
5728 Always build a range even if the low and hi bounds denote the
5729 same value. This is needed by the machinery in Check_Choices.
5730 (Build_Static_Predicate): Always build a range even if the low and
5731 hi bounds denote the same value. This is needed by the machinery
5734 2013-04-11 Robert Dewar <dewar@adacore.com>
5736 * einfo.ads, sem_util.adb, exp_ch6.adb, xgnatugn.adb: Minor
5739 2013-04-11 Doug Rupp <rupp@adacore.com>
5741 * gnatlink.adb: Fold program basename to lower case on VMS for
5744 2013-04-11 Matthew Heaney <heaney@adacore.com>
5746 * a-rbtgbo.adb (Generic_Equal): Initialize Result variable before
5749 2013-04-11 Arnaud Charlet <charlet@adacore.com>
5751 * xgnatugn.adb: Remove dead code (handling of @ifset/@ifclear).
5753 2013-04-11 Arnaud Charlet <charlet@adacore.com>
5755 * gnat_ugn.texi: Remove some use of ifset in menus. Not strictly
5756 needed, and seems to confuse some versions of makeinfo.
5758 2013-04-11 Javier Miranda <miranda@adacore.com>
5760 * einfo.adb (Is_Thunk): Remove assertion.
5761 (Set_Is_Thunk): Add assertion.
5762 * einfo.ads (Is_Thunk): Complete documentation.
5763 * exp_ch11.adb (Expand_N_Handled_Sequence_Of_Statements): Code cleanup.
5764 * exp_ch3.ad[sb] (Is_Variable_Size_Array): Moved to sem_util
5765 (Is_Variable_Size_Record): Moved to sem_util
5766 * exp_ch6.adb (Expand_Call): Code cleanup.
5767 (Expand_N_Extended_Return_Statement): Code cleanup.
5768 (Expand_Simple_Function_Return): Code cleanup.
5769 * exp_disp.adb Remove dependency on exp_ch3
5770 (Expand_Interface_Thunk): Add minimum decoration needed to set
5772 * sem_ch3.ad[sb] (Is_Constant_Bound): moved to sem_util
5773 * sem_util.ad[sb] (Is_Constant_Bound): Moved from
5774 sem_ch3 (Is_Variable_Size_Array): Moved from exp_ch3
5775 (Is_Variable_Size_Record): Moved from exp_ch3
5777 2013-04-11 Javier Miranda <miranda@adacore.com>
5779 * exp_ch11.adb (Expand_N_Handled_Sequence_Of_Statements): Do
5780 not add cleanup actions in thunks associated with interface types.
5781 * exp_ch3.ad[sb] (Is_Variable_Size_Record): Move declaration to
5783 * exp_ch4.adb (Tagged_Conversion): Update call to
5784 Expand_Interface_Conversion since the parameter Is_Static is no
5786 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Adding
5787 assertion to ensure that interface thunks are never handled by
5789 (Expand_N_Simple_Function_Return): Do not rewrite this statement
5790 as an extended return statement in interface thunks, and do not
5791 perform copy in the secondary stack if the return statement is
5793 * exp_disp.adb (Expand_Dispatching_Call): No longer displace
5794 the pointer to the returned object in functions returning interface
5796 (Expand_Interface_Thunk): For functions returning interface types
5797 displace the pointer to the returned object.
5798 (Expand_Interface_Conversion): Remove formal
5799 Is_Static since this subprogram can now evaluate it locally.
5800 * sem_ch3.adb (Add_Internal_Interface_Entities): For functions
5801 propagate the type returned by the covered interface primitive to
5802 the internal interface entity. Needed by the thunk to generate
5803 the code which displaces "this" to reference the corresponding
5804 secondary dispatch table.
5805 * sem_disp.adb (Propagate_Tag): Update call to
5806 Expand_Interface_Conversion since the parameter Is_Static is no
5808 * sem_res.adb (Resolve_Type_Conversion): Update calls to
5809 Expand_Interface_Conversion since the parameter Is_Static is no
5810 longer needed plus code cleanup.
5812 2013-04-11 Eric Botcazou <ebotcazou@adacore.com>
5814 * init.c (RETURN_ADDR_OFFSET): Delete as unused.
5816 2013-04-11 Robert Dewar <dewar@adacore.com>
5818 * a-crbtgk.adb, a-ciorse.adb, a-crbtgo.adb, a-coorse.adb, a-rbtgbo.adb,
5819 a-cborse.adb, a-rbtgso.adb, exp_ch3.adb: Minor reformatting.
5821 2013-04-11 Yannick Moy <moy@adacore.com>
5823 * exp_ch4.adb (Expand_N_Selected_Component): Do not expand
5824 discriminant check for Unchecked_Union.
5825 * sem_res.adb (Resolve_Selected_Component): Set flag
5826 Do_Discriminant_Check even when expansion is not performed.
5827 * sinfo.ads (Do_Discriminant_Check): Update documentation for the case
5830 2013-04-11 Thomas Quinot <quinot@adacore.com>
5832 * sem_ch13.adb (Same_Representation): Two types with different scalar
5833 storage order never have the same representation.
5835 2013-04-11 Arnaud Charlet <charlet@adacore.com>
5837 * xgnatugn.adb (Push_Conditional): Simplify handling,
5838 no longer need to keep track of "excluding" sections.
5839 (Currently_Excluding): Removed.
5840 (Process_Source_File):
5841 Set unw/vms flag so that texinfo can do the whole handling of
5842 @ifset/@ifclear sections. Fix handling of nested @ifset/@ifclear
5844 * gnat_ugn.texi: Add a section on performing unassisted install
5847 2013-04-11 Johannes Kanig <kanig@adacore.com>
5849 * debug.adb: Document usage of -gnatd.Q switch.
5851 2013-04-11 Matthew Heaney <heaney@adacore.com>
5853 * a-crbtgk.adb (Ceiling, Find, Floor): Adjust locks
5854 before element comparisons.
5855 (Generic_Conditional_Insert, Generic_Conditional_Insert_With_Hint):
5857 * a-crbtgo.adb, a-rbtgbo.adb (Generic_Equal): Adjust locks before
5858 element comparisons.
5859 * a-rbtgso.adb (Difference, Intersection): Adjust locks
5860 before element comparisons.
5861 (Is_Subset, Overlap): Ditto
5862 (Symmetric_Difference, Union): Ditto
5863 * a-btgbso.adb (Set_Difference, Set_Intersection): Adjust locks
5864 before element comparisons.
5865 (Set_Subset, Set_Overlap): Ditto
5866 (Set_Symmetric_Difference, Set_Union): Ditto
5867 * a-coorse.adb, a-ciorse.adb, a-cborse.adb
5868 (Update_Element_Preserving_Key): Adjust locks before element
5869 comparisons (Replace_Element): Ditto
5871 2013-04-11 Pascal Obry <obry@adacore.com>
5873 * prj-attr.adb, projects.texi, snames.ads-tmpl: Remove Build_Slaves
5876 2013-04-11 Ed Schonberg <schonberg@adacore.com>
5878 * exp_ch3.adb (Build_Equivalent_Aggregate): Subsidiary of
5879 Expand_N_Object_Declaration, used to construct an aggregate
5880 with static components whenever possible, so that objects of a
5881 discriminated type can be initialized without calling the init.
5884 2013-04-11 Vincent Celier <celier@adacore.com>
5886 * prj-makr.adb (Process_Directory): On VMS, always delete,
5887 then recreate the temporary file with Create_Output_Text_File,
5888 otherwise the output redirection does not work properly.
5890 2013-04-11 Eric Botcazou <ebotcazou@adacore.com>
5892 * urealp.ads: Fix minor typo.
5894 2013-04-11 Fabien Chouteau <chouteau@adacore.com>
5896 * cio.c (mktemp): Don't use tmpnam function from the
5897 system on VxWorks in kernel mode.
5899 2013-04-11 Vincent Celier <celier@adacore.com>
5901 * make.adb (Compile): Clarify the error message reported
5902 when gnatmake refuses to compile a runtime source.
5903 (Start_Compile_If_Possible): Ditto.
5905 2013-04-11 Vincent Celier <celier@adacore.com>
5907 * gnat_ugn.texi: Add documentation about -gnatc and gnatmake.
5909 2013-04-11 Vincent Celier <celier@adacore.com>
5911 * switch-c.adb: Document internal switches.
5912 * usage.adb: Remove lines for internal switches: -gnatea, -gnateO,
5913 -gnatez and -gnateO.
5915 2013-04-11 Ed Schonberg <schonberg@adacore.com>
5917 * par-ch6.adb (P_Subprogram): Attach aspects to subprogram stub.
5918 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Allow aspects on
5920 * sem_ch13.adb (Analyze_Aspect_Specifications): Analyze generated
5921 pre/post pragmas at once before analyzing the proper body.
5922 * sem_prag.adb (Chain_PPC): Handle pragma that comes from an
5923 aspect on a subprogram stub.
5924 * aspects.adb: Aspect specifications can appear on a
5925 subprogram_Body_Stub.
5927 2013-04-11 Vincent Celier <celier@adacore.com>
5929 * gnatname.adb: Minor comment fix.
5931 2013-04-11 Vincent Celier <celier@adacore.com>
5933 * prj-makr.adb (Process_Directory): Create a new temporary
5934 file for each invocation of the compiler, in directory pointed
5935 by environment variable TMPDIR if it exists.
5937 2013-04-11 Arnaud Charlet <charlet@adacore.com>
5939 * gnat_ugn.texi: Minor editing/clean ups.
5941 2013-04-11 Ed Schonberg <schonberg@adacore.com>
5943 * sem_ch6.adb (Analyze_Null_Procedure): New subprogram, mostly
5944 extracted from Analyze_Subprogram_Declaration, to handle null
5945 procedure declarations that in ada 2012 can be completions of
5946 previous declarations.
5948 2013-04-11 Hristian Kirtchev <kirtchev@adacore.com>
5950 * sem_prag.adb (Entity_Of): Moved to Exp_Util.
5951 * exp_util.ads, exp_util.adb (Entity_Of): New routine.
5953 2013-04-11 Robert Dewar <dewar@adacore.com>
5955 * g-spipat.ads: Minor comment fix.
5957 2013-04-11 Robert Dewar <dewar@adacore.com>
5959 * sem_prag.adb, sem_util.adb, sem_res.adb, exp_ch4.adb: Minor
5962 2013-04-11 Thomas Quinot <quinot@adacore.com>
5964 * exp_util.ads (Fully_Qualified_Name_String): Document that the
5965 constructed literal is the entity name in all upper case.
5967 2013-04-11 Thomas Quinot <quinot@adacore.com>
5969 * sem_util.adb (Set_Entity_With_Style_Check): Fix logic of
5970 check for implementation defined identifiers.
5972 2013-04-11 Yannick Moy <moy@adacore.com>
5974 * checks.adb (Apply_Type_Conversion_Checks): Add an explanation
5975 of why range check and length are put on different nodes.
5976 * exp_ch4.adb (Apply_Type_Conversion_Checks): Remove check marks
5977 when doing their expansion.
5979 2013-04-11 Ed Schonberg <schonberg@adacore.com>
5981 * sem_util.ads, sem_util.adb (Get_Incomplete_View_Of_Ancestor):
5982 New function to implement the notion introduced in RM 7.3.1
5983 (5.2/3): in a child unit, a derived type is within the derivation
5984 class of an ancestor declared in a parent unit, even if there
5985 is an intermediate derivation that does not see the full view
5987 * sem_res.adb (Valid_Conversion): if all else fails, examine if an
5988 incomplete view of an ancestor makes a numeric conversion legal.
5990 2013-04-11 Ed Schonberg <schonberg@adacore.com>
5992 * sem_ch6.adb: in Ada2012 operators can only have in
5995 2013-04-11 Vincent Celier <celier@adacore.com>
5997 * makeutl.adb (Create_Binder_Mapping_File): Do not put into
5998 the mapping file ALI files of sources that have been replaced.
6000 2013-04-11 Vincent Celier <celier@adacore.com>
6002 * projects.texi: Add subsection Duplicate Sources in Projects.
6004 2013-04-11 Vincent Celier <celier@adacore.com>
6006 * gnat_ugn.texi: Add documentation for gnatmake switch -droot_dir/**
6008 2013-04-11 Arnaud Charlet <charlet@adacore.com>
6010 * init.c (__gnat_install_handler): Only set up an alternate
6011 stack when installing a signal handler for SIGSEGV.
6013 2013-04-11 Thomas Quinot <quinot@adacore.com>
6015 * g-socket.adb (Connect_Socket, timeout version): Call
6016 underlying connect operation directly, not through the 2-argument
6017 Connect_Socket thick binding, in order to avoid raising a junk
6018 exception for the EINPROGRESS return.
6020 2013-04-11 Robert Dewar <dewar@adacore.com>
6022 * a-cdlili.adb: Minor addition of pragma Warnings (Off).
6024 2013-04-11 Robert Dewar <dewar@adacore.com>
6026 * hostparm.ads: Minor reformatting.
6028 2013-04-11 Hristian Kirtchev <kirtchev@adacore.com>
6030 * aspects.ads, aspects.adb: Add Aspect_Depends to all the relevant
6032 * elists.ads, elists.adb (Contains): New routine.
6033 * par-prag.adb: Pragma Depends does not need any special treatment
6035 * sem_ch13.adb (Analyze_Aspect_Specifications):
6036 Transform aspect Depends into a corresponding pragma.
6037 (Check_Aspect_At_Freeze_Point): Aspect Depends does not need
6038 inspection at its freeze point.
6039 * sem_prag.adb (Analyze_Pragma): Perform analysis and
6040 normalization of pragma Depends. Remove the use of function
6041 Is_Duplicate_Item. Use End_Scope to uninstalle the formal
6042 parameters of a subprogram. Add a value for pragma Depends in
6044 (Is_Duplicate_Item): Removed.
6045 * snames.ads-tmpl: Add predefined name for Depends as well as
6046 a pragma identifier.
6048 2013-04-11 Arnaud Charlet <charlet@adacore.com>
6050 * gnat1drv.adb: Minor code clean up.
6052 2013-04-11 Arnaud Charlet <charlet@adacore.com>
6054 * debug.adb, sem_ch13.adb (Analyze_Enumeration_Representation_Clause):
6055 Ignore enumeration rep clauses by default in CodePeer mode, unless
6056 -gnatd.I is specified.
6058 2013-04-11 Ed Schonberg <schonberg@adacore.com>
6060 * sem_util.adb (Safe_To_Capture_Value): If the node belongs to
6061 an expression that has been attached to the else_actions of an
6062 if-expression, the capture is not safe.
6064 2013-04-11 Yannick Moy <moy@adacore.com>
6066 * checks.adb (Apply_Type_Conversion_Checks): Put check mark on type
6067 conversion for arrays.
6069 2013-04-11 Robert Dewar <dewar@adacore.com>
6071 * a-cdlili.adb, a-cidlli.adb, a-cbdlli.adb: Minor reformatting.
6073 2013-04-11 Johannes Kanig <kanig@adacore.com>
6075 * adabkend.adb: Minor comment addition.
6077 2013-04-11 Matthew Heaney <heaney@adacore.com>
6079 * a-cdlili.adb, a-cidlli.adb, a-cbdlli.adb ("="): Increment
6080 lock counts before entering loop.
6082 (Is_Sorted, Merge, Sort): Ditto.
6083 (Reverse_Find): Ditto.
6084 (Splice_Internal): Internal operation to refactor splicing logic.
6085 (Splice): Some logic moved into Splice_Internal.
6087 2013-04-11 Johannes Kanig <kanig@adacore.com>
6089 * adabkend.adb (Scan_Compiler_Arguments): Do not call
6090 Set_Output_Object_File_Name in Alfa_Mode
6091 * gnat1drv.adb (Adjust_Global_Switches): Take Alfa_Mode into account.
6092 * opt.ads: Fix documentation.
6094 2013-04-11 Robert Dewar <dewar@adacore.com>
6096 * sem_res.adb: Minor code reorganization and comment fixes.
6097 * sem_type.adb: Minor reformatting.
6099 2013-04-11 Hristian Kirtchev <kirtchev@adacore.com>
6101 * exp_ch4.adb (Process_Transient_Object): Add new
6102 local variable Fin_Call. Remove and explain ??? comment. Use the
6103 Actions of logical operators "and then" and "or else" to insert
6104 the generated finalization call.
6106 2013-04-11 Eric Botcazou <ebotcazou@adacore.com>
6108 * gnat_rm.texi: Fix typo.
6110 2013-04-11 Ed Schonberg <schonberg@adacore.com>
6112 * sem_res.adb: Minor reformatting.
6114 2013-04-11 Robert Dewar <dewar@adacore.com>
6116 * atree.h: Add declarations for Flag255-Flag289 Fix declaration
6117 of Field30 (was wrong, but no effect, since not yet referenced by
6118 back end) Add declarations for Field31-Field35 Add declarations
6120 * einfo.ads, einfo.adb (Has_Invariants): No longer applies to
6122 (Has_Predicates): No longer applies to functions.
6123 (Is_Predicate_Function): New flag.
6124 (Is_Predicate_Function_M): New flag.
6125 (Is_Invariant_Procedure): New flag.
6126 (Predicate_Function_M): New function.
6127 (Set_Predicate_Function_M): New procedure.
6128 * exp_ch11.adb (Expand_N_Raise_Expression): Take care of special
6129 case of appearing in predicate used for membership test.
6130 * exp_ch3.adb (Insert_Component_Invariant_Checks): Set
6131 Is_Invariant_Procedure flag.
6132 * exp_ch4.adb (Expand_Op_In): Call special predicate function
6133 that takes care of raise_expression nodes in the predicate.
6134 * exp_util.ads, exp_util.adb (Make_Predicate_Call): Add argument Mem for
6136 * sem_ch13.adb (Build_Predicate_Functions): New name for
6137 Build_Predicate_Function. Major rewrite to take care of raise
6138 expression in predicate for membership tests.
6139 * sem_res.adb (Resolve_Actuals): Include both predicate functions
6140 in defense against infinite predicate function loops.
6141 * sinfo.ads, sinfo.adb (Convert_To_Return_False): New flag.
6143 2013-04-11 Robert Dewar <dewar@adacore.com>
6145 * sem_prag.adb: Minor reformatting.
6147 2013-04-11 Ed Schonberg <schonberg@adacore.com>
6149 * lib-xref.adb: Generate reference for component of anonymous
6152 2013-04-11 Robert Dewar <dewar@adacore.com>
6154 * stand.ads: Minor reformatting.
6156 2013-04-11 Matthew Heaney <heaney@adacore.com>
6158 * a-convec.adb, a-coinve.adb, a-cobove.adb ("="): Increment lock
6159 counts before entering loop.
6160 (Find, Find_Index): Ditto.
6161 (Is_Sorted, Merge, Sort): Ditto.
6162 (Reverse_Find, Reverse_Find_Index): Ditto.
6164 2013-04-11 Robert Dewar <dewar@adacore.com>
6166 * exp_ch11.ads, exp_ch11.adb (Expand_N_Raise_Expression): New procedure.
6167 * exp_util.adb (Insert_Actions): Add entry for N_Raise_Expression.
6168 * expander.adb: Add call to Expand_N_Raise_Expression.
6169 * par-ch11.adb (P_Raise_Expression): New procedure.
6170 * par-ch4.adb (P_Relation): Handle Raise_Expression.
6171 * par.adb (P_Raise_Expression): New procedure.
6172 * sem.adb: Add handling for N_Raise_Expression.
6173 * sem_ch11.ads, sem_ch11.adb (Analyze_Raise_Expression): New procedure.
6174 * sem_res.adb (Resolve): Add handling for N_Raise_Expression.
6175 * sinfo.ads, sinfo.adb (N_Raise_Expression): New node.
6176 * sprint.adb (Sprint_Node_Actual): Add handling for N_Raise_Expression.
6177 * stand.ads (Any_Type): Document use with N_Raise_Expression.
6179 2013-04-11 Vincent Celier <celier@adacore.com>
6181 * gnat_ugn.texi: Remove section "The Development Environments"
6182 now that all predefined attributes are documented, including
6183 those in package IDE.
6185 2013-04-11 Ed Schonberg <schonberg@adacore.com>
6187 * sem_ch6.adb: Preserve parent link in copy of expression.
6189 2013-04-11 Vincent Celier <celier@adacore.com>
6191 * projects.texi: Complete rewrite of the subsection Attributes
6192 in section "Project file Reference".
6194 2013-04-11 Robert Dewar <dewar@adacore.com>
6196 * exp_ch4.adb: Minor reformatting.
6198 2013-04-11 Robert Dewar <dewar@adacore.com>
6200 * exp_ch4.adb (Expand_Concatenate): Remove wrapping in
6201 expression-with-actions node. No longer needed given fix to
6202 sem_prag and caused loss of some useful warnings.
6203 * sem.ads: Minor reformatting.
6204 * sem_prag.adb (Check_Disabled): Removed, to be replaced by not
6205 Check_Enabled. These two routines were curiously incompatible
6207 (Analyze_Pragma, case Check): Make sure we do
6208 not expand the string argument if the check is disabled. Avoid
6209 use of Check_Disabled, which resulted in missing analysis in
6211 * sem_prag.ads (Check_Disabled): Removed, to be replaced by not
6212 Check_Enabled. These two routines were curiously incompatible
6215 2013-04-11 Hristian Kirtchev <kirtchev@adacore.com>
6217 * exp_ch4.adb (Process_Transient_Object): Use
6218 an unchecked conversion when associating a transient controlled
6219 object with its "hook".
6221 2013-04-11 Ed Schonberg <schonberg@adacore.com>
6223 * sem_prag.adb (Analyze_Pragma, case
6224 Preelaborable_Initialization): The pragma is legal if it comes
6225 from an aspect on the private view of the type, even though its
6226 analysis point takes place later at the freeze point.
6228 2013-04-11 Robert Dewar <dewar@adacore.com>
6230 * sem_ch6.adb: Minor reformatting.
6232 2013-04-11 Yannick Moy <moy@adacore.com>
6234 * ali-util.adb (Read_Withed_ALIs): Do not consider it an error to
6235 read ALI files with No_Object=True in Alfa mode.
6236 * gnat1drv.adb: Set appropriately Back_End_Mode in Alfa mode, whether
6237 this is during frame condition generation of translation to Why.
6239 2013-04-11 Robert Dewar <dewar@adacore.com>
6241 * exp_ch4.adb: Minor code reorganization
6242 * types.ads: Minor reformatting.
6244 2013-04-11 Johannes Kanig <kanig@adacore.com>
6246 * opt.ads New global boolean Frame_Condition_Mode to avoid
6247 referring to command line switch.
6248 * gnat1drv.adb (Gnat1drv) set frame condition mode when -gnatd.G
6249 is present, and disable Code generation in that case. Disable
6250 ALI file generation when switch is *not* present.
6252 2013-04-11 Ed Schonberg <schonberg@adacore.com>
6254 * sem_ch6.adb (Analyze_Expression_Function): Perform the
6255 pre-analysis on a copy of the expression, to prevent downstream
6256 visbility issues involving operators and instantiations.
6258 2013-04-11 Johannes Kanig <kanig@adacore.com>
6260 * debug.adb: Reservation and documentation for -gnatd.G switch.
6261 * gnat1drv.adb (Adjust_Global_Switches) Take into account -gnatd.G
6262 switch, and set ALI file generation accordingly.
6264 2013-04-11 Robert Dewar <dewar@adacore.com>
6266 * exp_ch4.adb, exp_dist.adb: Minor reformatting.
6267 * gnat_rm.texi, gnat_ugn.texi: -020 Add documentation clarifying that
6268 check names introduced with pragma Check_Name are suppressed by -gnatp.
6270 2013-04-11 Vincent Celier <celier@adacore.com>
6272 * gnat_ugn.texi, projects.texi: Move chapter "Tools Supporting Project
6273 Files" from projects.texi to gnat_ugn.texi.
6275 2013-04-11 Arnaud Charlet <charlet@adacore.com>
6277 * gcc-interface/Make-lang.in: Update dependencies.
6279 2013-04-11 Yannick Moy <moy@adacore.com>
6281 * gnat1drv.adb (Adjust_Global_Switches): Allow missing body in Alfa
6284 2013-04-11 Hristian Kirtchev <kirtchev@adacore.com>
6286 * exp_ch4.adb (Expand_N_Allocator): Detect the
6287 allocation of an anonymous controlled object where the type of
6288 the context is named. Use the pool and finalization master of
6289 the named access type to allocate the object.
6291 2013-04-11 Vincent Celier <celier@adacore.com>
6293 * gnat_ugn.texi: Remove most mentions of gprbuild.
6294 * projects.texi: Remove all mentions of asociative array
6297 2013-04-11 Robert Dewar <dewar@adacore.com>
6299 * sem_prag.adb, sem_attr.adb, gnat1drv.adb, prj-makr.adb,
6300 opt.ads, sem_ch13.adb: Minor reformatting.
6301 * debug.adb: Minor comment fix (remove junk .I doc).
6303 2013-04-11 Thomas Quinot <quinot@adacore.com>
6305 * rtsfind.ads, exp_dist.adb, exp_dist.ads (Rtsfind.PCS_Version, case
6306 PolyORB): Bump to 6.
6307 (Exp_Dist.PolyORB_Support): Replace TC_Build with
6310 2013-04-11 Arnaud Charlet <charlet@adacore.com>
6312 * debug.adb, sem_prag.adb, par-ch2.adb, sem_attr.adb, gnat1drv.adb,
6313 exp_disp.adb, opt.ads, sem_ch13.adb (Relaxed_RM_Semantics): New flag.
6314 Enable this flag in CodePeer mode, and also via -gnatd.M.
6315 Replace some uses of CodePeer_Mode by Relaxed_RM_Semantics.
6317 2013-04-11 Ed Schonberg <schonberg@adacore.com>
6319 * sem_ch8.adb (Check_Constrained_Object): If a subtype is created
6320 from the renamed object in an object renaming declaration with
6321 an unconstrained nominal subtype, freeze the created subtype at
6322 once, to prevent order of elaboration issues in the backend.
6324 2013-04-11 Arnaud Charlet <charlet@adacore.com>
6326 * exp_aggr.adb (Aggr_Size_OK): Refine setting of Max_Aggr_Size
6327 in particular in CodePeer mode.
6329 2013-04-11 Vincent Celier <celier@adacore.com>
6331 * gnat_ugn.texi: Add documentation for backup copies of project
6334 2013-04-11 Tristan Gingold <gingold@adacore.com>
6336 * gnat_rm.texi: Add Detect_BLocking in the ravenscar profile
6339 2013-04-11 Vincent Celier <celier@adacore.com>
6341 * gnatname.adb (Scan_Args): Recognize new switch --no-backup
6342 (Usage): Add line for --no-backup.
6343 * opt.ads (No_Backup): New Boolean variable, initialized to False.
6344 (Ada_Version_Default): Switch to Ada 2012 by default.
6345 * prj-makr.adb (Initialize): Create a backup for an existing
6346 project file if gnatname is not invoked with --no-backup.
6348 2013-04-11 Thomas Quinot <quinot@adacore.com>
6350 * exp_ch4.adb: Minor code improvement: replace various calls to
6351 Make_If_Statement in expansion with Make_Implicit_If_Statement.
6353 2013-04-11 Eric Botcazou <ebotcazou@adacore.com>
6355 * ali.adb: Fix minor typo.
6357 2013-04-11 Thomas Quinot <quinot@adacore.com>
6359 * exp_ch4.adb (Find_Enclosing_Context): Add missing case of
6360 N_Procedure_Call_Statement.
6362 2013-04-11 Robert Dewar <dewar@adacore.com>
6364 * debug.adb: Minor comment fix.
6366 2013-04-11 Johannes Kanig <kanig@adacore.com>
6368 * debug.adb: Remove comment for -gnatd.G.
6370 2013-04-11 Thomas Quinot <quinot@adacore.com>
6372 * exp_ch4.adb (Expand_Record_Equality.Suitable_Element):
6373 Remove recursive routine, replace with...
6374 (Expand_Record_Equality.Element_To_Compare): New subroutine,
6375 implement iterative search for next element to compare.
6376 Add explanatory comment in the tagged case.
6378 2013-04-11 Ed Schonberg <schonberg@adacore.com>
6380 * sem_ch5.adb: remove spurious warning from non-empty loop.
6381 * sem_ch8.adb (Enclosing_Instance): Make public to other routines
6382 in the package, in order to suppress redundant semantic checks
6383 on subprogram renamings in nested instantiations.
6385 2013-04-11 Robert Dewar <dewar@adacore.com>
6387 * errout.ads: Minor reformatting.
6388 * sem_eval.adb (Why_Not_Static): Now issues continuation messages
6389 (Why_Not_Static): Test for aggregates behind string literals.
6390 * sem_eval.ads (Why_Not_Static): Now issues continuation messages.
6392 2013-04-11 Robert Dewar <dewar@adacore.com>
6394 * exp_ch4.adb (Expand_Concatenation): Wrap expansion in
6395 Expressions_With_Actions.
6397 2013-04-11 Ed Schonberg <schonberg@adacore.com>
6399 * sem_ch6.adb (Base_Types_Match): For an actual type in an
6400 instance, the base type may itself be a subtype, so find true
6401 base type to determine compatibility.
6403 2013-04-11 Robert Dewar <dewar@adacore.com>
6405 * s-osprim-mingw.adb, sem_ch3.adb, sem_prag.adb, sem_util.adb.
6406 makeutl.adb, sem_ch8.adb: Minor reformatting.
6408 2013-04-11 Vincent Celier <celier@adacore.com>
6410 * gnat_ugn.texi: Minor fixes for VMS.
6411 * ug_words: Minor addition: -gnato? => /OVERFLOW_CHECKS=?.
6413 2013-04-11 Robert Dewar <dewar@adacore.com>
6415 * usage.adb (Usage): Minor edit to -gnatW message
6417 2013-04-11 Robert Dewar <dewar@adacore.com>
6419 * exp_aggr.adb (Expand_N_Aggregate): Add circuit for handling
6420 others for string literal case. Also add big ??? comment about
6421 this new code, which should be redundant, but is not.
6422 * sem_eval.adb (Eval_Concatenation): Handle non-static case
6423 properly (Eval_String_Literal): Handle non-static literal properly
6425 2013-03-20 Tobias Burnus <burnus@net-b.de>
6427 * i-fortra.ads: Update comment, add Ada 2012's optional
6428 Star and Kind data types for enhanced interoperability.
6430 2013-03-16 Eric Botcazou <ebotcazou@adacore.com>
6432 * gnatvsn.ads (Library_Version): Bump to 4.9.
6434 2013-03-08 Cesar Strauss <cestrauss@gmail.com>
6437 * seh_init.c (Raise_From_Signal_Handler): Declare as no-return.
6438 (__gnat_SEH_error_handler): Likewise. Remove final return.
6440 2013-03-06 Eric Botcazou <ebotcazou@adacore.com>
6442 * gcc-interface/trans.c (Attribute_to_gnu): Abort instead of erroring
6443 out for an unimplemented attribute.
6445 2013-03-06 Eric Botcazou <ebotcazou@adacore.com>
6447 * gcc-interface/decl.c (gnat_to_gnu_field): Remove the wrapper around
6448 a misaligned integral type if a size is specified for the field.
6450 2013-03-06 Eric Botcazou <ebotcazou@adacore.com>
6452 * gcc-interface/trans.c (Raise_Error_to_gnu) <CE_Index_Check_Failed>:
6453 Record the unpadded type of the index type on the RCI stack.
6455 2013-03-06 Eric Botcazou <ebotcazou@adacore.com>
6457 * gcc-interface/trans.c (emit_range_check): Assert that the range type
6458 is a numerical type and remove useless local variables.
6460 2013-02-25 Eric Botcazou <ebotcazou@adacore.com>
6462 * gcc-interface/ada-tree.h: Back out change accidentally committed.
6464 2013-02-21 Jakub Jelinek <jakub@redhat.com>
6467 * gnat-style.texi (@title): Remove @hfill.
6468 * projects.texi: Avoid line wrapping inside of @pxref or @xref.
6470 2013-02-14 Rainer Emrich <rainer@emrich-ebersheim.de>
6473 * tracebak.c: Cast from pointer via FARPROC.
6475 2013-02-07 Simon Wright <simon@pushface.org>
6478 * init.c (__darwin_major_version): New function for x86-64/Darwin.
6479 (__gnat_adjust_context_for_raise) [Darwin]: Disable the workaround
6480 on Darwin 12 and above.
6482 2013-02-06 Rainer Emrich <rainer@emrich-ebersheim.de>
6485 * adaint.c (__gnat_check_OWNER_ACL): Cast from pointer via
6486 SECURITY_DESCRIPTOR *
6487 (__gnat_set_OWNER_ACL): Cast from DWORD to ACCESS_MODE
6488 (__gnat_portable_spawn): Fix cast to char* const*
6489 (add_handle): Cast from pointer via void **
6490 (add_handle): Cast from pointer via int *
6491 (__gnat_locate_exec_on_path): Cast from pointer via TCHAR *
6492 (__gnat_locate_exec_on_path): Cast from pointer via char *
6493 * initialize.c (append_arg): Cast from pointer via LPWSTR
6494 (__gnat_initialize): Cast from pointer via LPWSTR
6495 * seh_init.c (__gnat_map_SEH): Cast from pointer via FARPROC
6497 2013-02-06 Hristian Kirtchev <kirtchev@adacore.com>
6499 * gcc-interface/Make-lang.in: Enable System.Stack_Checking.Operations
6500 target pairs on VxWorks 5 only.
6502 2013-02-06 Arnaud Charlet <charlet@adacore.com>
6504 * gcc-interface/Make-lang.in: Update dependencies.
6506 2013-02-06 Vincent Celier <celier@adacore.com>
6508 * prj-proc.adb (Process_Aggregated_Projects): Use a new project
6509 node tree for each project tree rooted at an aggregated project.
6511 2013-02-06 Hristian Kirtchev <kirtchev@adacore.com>
6513 * sem_util.adb (Is_Interface_Conversion): New routine.
6514 (Object_Access_Level): Detect an interface conversion
6515 that has been rewritten into a different construct. Use the
6516 original form of the conversion to find the access level of
6519 2013-02-06 Eric Botcazou <ebotcazou@adacore.com>
6521 * einfo.ads (Has_Pragma_No_Inline): New flag using Flag201.
6522 (Has_Pragma_No_Inline): Declare and mark as inline.
6523 (Set_Has_Pragma_No_Inline): Likewise.
6524 * einfo.adb (Has_Pragma_No_Inline): New function.
6525 (Set_Has_Pragma_No_Inline): New procedure.
6526 (Write_Entity_Flags): Handle Has_Pragma_No_Inline.
6527 * snames.ads-tmpl (Name_No_Inline): New pragma-related name.
6528 (Pragma_Id): Add Pragma_No_Inline value.
6529 * par-prag.adb (Prag): Handle Pragma_Inline.
6530 * sem_prag.adb (Inline_Status): New enumeration type.
6531 (Process_Inline): Change Active parameter
6532 to Inline_Status and add support for suppressed inlining.
6533 (Analyze_Pragma) <Pragma_Inline>: Adjust to above change.
6534 <Pragma_Inline_Always>: Likewise.
6535 <Pragma_No_Inline>: Implement new pragma No_Inline.
6536 (Sig_Flags): Add Pragma_No_Inline.
6537 * gnat_rm.texi (Implementation Defined Pragmas): Add No_Inline.
6538 * gnat_ugn.texi (Switches for gcc): Mention Pragma No_Inline.
6540 2013-02-06 Pascal Obry <obry@adacore.com>
6542 * s-osprim-mingw.adb (Clock): Make sure we copy all data locally
6543 to avoid interleaved modifications that could happen from another
6544 task calling Get_Base_Data.
6545 (Get_Base_Data): Make it a critical section. Avoid updating if another
6546 task has already done it.
6548 2013-02-06 Eric Botcazou <ebotcazou@adacore.com>
6550 * sem_prag.adb: Minor reformatting.
6552 2013-02-06 Pascal Obry <obry@adacore.com>
6554 * s-tasloc.ads: Set System.Task_Lock to preelaborate.
6556 2013-02-06 Eric Botcazou <ebotcazou@adacore.com>
6558 * snames.ads-tmpl (Name_Loop_Optimize, Name_No_Unroll,
6559 Name_Unroll, Name_No_Vector, Name_Vector): New pragma-related
6561 (Pragma_Id): Add Pragma_Loop_Optimize value.
6562 * par-prag.adb (Prag): Handle Pragma_Loop_Optimize.
6563 * sem_prag.adb (Check_Loop_Invariant_Variant_Placement): Rename to...
6564 (Check_Loop_Pragma_Placement): ...this.
6566 <Pragma_Loop_Invariant>: Adjust to above renaming.
6567 <Loop_Variant>: Likewise.
6568 <Pragma_Loop_Optimize>: Implement new pragma Loop_Optimize.
6569 (Sig_Flags): Add Pragma_Loop_Optimize.
6570 * gnat_rm.texi (Implementation Defined Pragmas): Add Loop_Optimize.
6571 * gnat_ugn.texi (Vectorization of loops): Mention Loop_Optimize.
6573 2013-02-06 Robert Dewar <dewar@adacore.com>
6575 * osint.ads: Minor fix of typo.
6577 2013-02-06 Sergey Rybin <rybin@adacore.com frybin>
6579 * gnat_ugn.texi: gnatmetric: update the documentation of
6580 complexity metrics for Ada 2012.
6582 2013-02-06 Javier Miranda <miranda@adacore.com>
6584 * exp_disp.adb (Make_Secondary_DT): Code cleanup:
6585 remove useless initialization.
6587 2013-02-06 Ed Schonberg <schonberg@adacore.com>
6589 * sem_ch3.adb (Build_Discriminant_Constraints): Do not
6590 generate overflow checks on a discriminant expression if the
6591 discriminant constraint is applied to a private type that has
6592 a full view, because the check will be applied when the full
6593 view is elaborated. Removing the redundant check is not just
6594 an optimization, but it prevents spurious assembler errors,
6595 because of the way the backend generates names for expressions
6596 that require overflow checking.
6598 2013-02-06 Pascal Obry <obry@adacore.com>
6600 * s-osprim-mingw.adb: Removes workaround for an old GNU/Linker
6601 limitation on Windows.
6611 (Clock): Use variable corresponding to access.
6612 (Get_Base_Time): Likewise.
6613 (Monotonic_Clock): Likewise.
6615 2013-02-06 Vincent Celier <celier@adacore.com>
6617 * make.adb (Gnatmake): When gnatmake is called with a project
6618 file, do not invoke gnatbind with -I-.
6619 * makeutl.adb (Create_Binder_Mapping_File): Rewrite function. Get
6620 the infos from all the sources.
6622 2013-02-06 Ed Schonberg <schonberg@adacore.com>
6624 * snames.ads-tmpl: Add Name_Overriding_Renamings and pragma
6625 Overriding_Renamings.
6626 * par-prag.adb: Recognize pragma Overriding_Renamings.
6627 * opt.ads (Overriding_Renamings): flag to control compatibility
6628 mode with Rational compiler, replaces Rational_Profile flag.
6629 * sem_ch8.adb (Analyze_Subprogram_Renaming): When
6630 Overriding_Renamings is enabled, accept renaming declarations
6631 where the new subprogram renames and overrides a locally inherited
6632 operation. Improve error message for some illegal renamings.
6633 * sem_prag.adb (Analyze_Pragma): Add case for Overriding_Renamings.
6634 (Set_Rational_Profile): The Rational_Profile enables
6635 Overriding_Renamings, Implicit_Packing, and Use_Vads_Size.
6637 2013-02-06 Ed Schonberg <schonberg@adacore.com>
6639 * sem_util.adb: Set parent of copied aggregate component, to
6640 prevent infinite loop.
6642 2013-02-06 Robert Dewar <dewar@adacore.com>
6644 * sem_ch3.adb, sem_ch10.adb: Minor reformatting.
6645 * exp_disp.adb: Minor comment update.
6646 * comperr.ads, osint.ads, rtsfind.adb, sem_prag.adb: Minor addition of
6649 2013-02-06 Thomas Quinot <quinot@adacore.com>
6651 * targparm.ads, sem_ch13.adb (Support_Nondefault_SSO): New target
6652 parameter, defaulted to False for now, indicates targets where
6653 non-default scalar storage order may be specified.
6655 2013-02-06 Thomas Quinot <quinot@adacore.com>
6657 * sprint.adb (Write_Itype): Treat E_Record_Subtype_With_Private
6658 same as E_Record_Subtype. Display E_Class_Wide_Subtype as
6661 2013-02-06 Hristian Kirtchev <kirtchev@adacore.com>
6663 * sem_ch3.adb (Complete_Private_Subtype): Inherit the
6664 Has_Unknown_Discriminants from the full view of the base type.
6666 2013-02-06 Tristan Gingold <gingold@adacore.com>
6668 * raise-gcc.c: Remove useless includes (sys/stat.h, adaint.h)
6669 Enclosing debugging functions within #ifndef inhibit_libc to
6670 support builds without full C headers.
6672 2013-02-06 Thomas Quinot <quinot@adacore.com>
6674 * gnat_rm.texi: Add a minimal example of Scalar_Storage_Order.
6676 2013-02-06 Hristian Kirtchev <kirtchev@adacore.com>
6678 * sem_ch10.adb (Install_Limited_Withed_Unit): Add a missing
6679 check to detect a parent-child relationship between two units in
6680 order to correctly bypass the installation of a limited view. In
6681 other words, the comment on the intended usage of the check was
6682 correct, but the code itself did not reflect the behavior.
6684 2013-02-06 Javier Miranda <miranda@adacore.com>
6686 * exp_ch5.adb (Expand_N_Assignment_Statement): Do not generate the
6687 runtime check on assignment to tagged types if compiling with checks
6690 2013-02-06 Robert Dewar <dewar@adacore.com>
6692 * exp_util.adb, checks.adb, sem_ch12.adb, sem_res.adb, prj-conf.adb,
6693 s-os_lib.adb: Minor reformatting
6695 2013-02-06 Vincent Celier <celier@adacore.com>
6697 * ug_words: Add -gnateY = /IGNORE_STYLE_CHECKS_PRAGMAS.
6699 2013-02-06 Ed Schonberg <schonberg@adacore.com>
6701 * snames.ads-tmpl: Add Name_Rational and pragma Rational.
6702 * par-prag.adb: Recognize pragma Rational.
6703 * opt.ads (Rational_Profile): flag to control compatibility mode
6704 with Rational compiler.
6705 * sem_ch8.adb (Analyze_Subprogram_Renaming): When Rational profile
6706 is enable, accept renaming declarations where the new subprogram
6707 and the renamed entity have the same name.
6708 * sem_prag.adb (analyze_pragma): Add pragma Rational, and recognize
6709 Rational as a profile.
6711 2013-02-06 Hristian Kirtchev <kirtchev@adacore.com>
6713 * exp_ch5.adb (Expand_Loop_Entry_Attributes): When
6714 dealing with a for loop that iterates over a subtype indication
6715 with a range, use the low and high bounds of the subtype.
6717 2013-02-06 Nicolas Roche <roche@adacore.com>
6719 * s-os_lib.adb (Normalize_Arguments): Arguments containing tabs should
6722 2013-02-06 Vincent Celier <celier@adacore.com>
6724 * prj-conf.adb (Process_Project_And_Apply_Config): New variable
6725 Conf_Project. New recursive procedure Check_Project to find a non
6726 aggregate project and put its Project_Id in Conf_Project. Fails if
6727 no such project can be found.
6728 (Get_Or_Create_Configuration_File): New parameter Conf_Project.
6729 (Do_Autoconf): Use project directory of project Conf_Project to store
6730 the generated configuration project file.
6731 * prj-conf.ads (Get_Or_Create_Configuration_File): New parameter
6734 2013-02-06 Javier Miranda <miranda@adacore.com>
6736 * sem_res.adb (Resolve_Actuals): Generate a read
6737 reference for out-mode parameters in the cases specified by
6740 2013-02-06 Hristian Kirtchev <kirtchev@adacore.com>
6742 * sem_attr.adb (Resolve_Attribute): Do not resolve the prefix of
6743 Loop_Entry, instead wait until the attribute has been expanded. The
6744 delay ensures that any generated checks or temporaries are inserted
6745 before the relocated prefix.
6747 2013-02-06 Ed Schonberg <schonberg@adacore.com>
6749 * sem_ch12.adb: Code clean up.
6751 2013-02-06 Ed Schonberg <schonberg@adacore.com>
6753 * checks.adb (Apply_Discriminant_Check): Look for discriminant
6754 constraint in full view of private type when needed.
6755 * sem_ch12.adb (Validate_Array_Type_Instance): Specialize
6756 previous patch to components types that are private and without
6759 2013-02-06 Hristian Kirtchev <kirtchev@adacore.com>
6761 * exp_ch4.adb (Find_Enclosing_Context): Recognize
6762 a simple return statement as one of the cases that require special
6763 processing with respect to temporary controlled function results.
6764 (Process_Transient_Object): Do attempt to finalize a temporary
6765 controlled function result when the associated context is
6766 a simple return statement. Instead, leave this task to the
6767 general finalization mechanism.
6769 2013-02-06 Thomas Quinot <quinot@adacore.com>
6771 * einfo.ads: Minor reformatting.
6772 (Status_Flag_Or_Transient_Decl): Add ??? comment.
6774 2013-02-06 Hristian Kirtchev <kirtchev@adacore.com>
6776 * exp_ch4.adb (Expand_N_Expression_With_Actions): Rewritten. This
6777 routine should be able to properly detect controlled transient
6778 objects in its actions and generate the appropriate finalization
6780 * exp_ch6.adb (Enclosing_Context): Removed.
6781 (Expand_Ctrl_Function_Call): Remove local subprogram and
6782 constant. Use routine Within_Case_Or_If_Expression to determine
6783 whether the lifetime of the function result must be extended to
6784 match that of the context.
6785 * exp_util.ads, exp_util.adb (Within_Case_Or_If_Expression): New
6788 2013-02-06 Ed Schonberg <schonberg@adacore.com>
6790 * sem_ch12.adb (Validate_Array_Type_Instance): Extend check
6791 for subtype matching of component type of formal array type,
6792 to avoid spurious error when component type is a separate actual
6793 in the instance, and there may be a discrepancy between private
6794 and full view of component type.
6796 2013-02-06 Robert Dewar <dewar@adacore.com>
6798 * s-dim.ads, clean.adb: Minor reformatting.
6800 2013-02-06 Javier Miranda <miranda@adacore.com>
6802 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Undo previous patch.
6803 (Can_Split_Unconstrained_Function): Only split the inlined function if
6804 the compiler generates the code of its body.
6806 2013-02-06 Robert Dewar <dewar@adacore.com>
6808 * exp_prag.adb, sem_ch3.adb, exp_attr.adb, sem_prag.adb, sem_ch6.adb,
6809 exp_intr.adb, exp_dist.adb, sem_ch13.adb: Internal clean up for
6812 2013-02-06 Robert Dewar <dewar@adacore.com>
6814 * gnat_rm.texi: Minor text updates for pragma Warning.
6816 2013-02-06 Geert Bosch <bosch@adacore.com>
6818 * s-multip.adb (Number_Of_CPUs): Short-circuit in case of
6821 2013-02-06 Vincent Celier <celier@adacore.com>
6823 * clean.adb (Delete): On VMS use host notation to delete all files.
6825 2013-02-06 Robert Dewar <dewar@adacore.com>
6827 * sem_prag.adb, sem_ch6.adb, prj-conf.adb, erroutc.adb: Minor
6830 2013-02-06 Gary Dismukes <dismukes@adacore.com>
6832 * sem_ch6.adb (Check_For_Primitive_Subprogram): Test for
6833 the special case of a user-defined equality that overrides
6834 the predefined equality of a nonderived type declared in a
6836 * sem_util.adb (Collect_Primitive_Operations): Add test for
6837 Is_Primitive when looping over the subprograms following a type,
6838 to catch the case of primitives such as a user-defined equality,
6839 which otherwise won't be found when the type is not a derived
6840 type and is declared in a declarative part.
6842 2013-02-06 Vincent Celier <celier@adacore.com>
6844 * prj-conf.adb (Check_Target): Always return True when Target
6845 is empty (Get_Or_Create_Configuration_File.Get_Project_Target):
6846 New procedure to get the value of attribute Target in the main
6848 (Get_Or_Create_Configuration_File.Do_Autoconf): No
6849 need to get the value of attribute Target in the main project.
6850 (Get_Or_Create_Configuration_File): Call Get_Project_Target and
6851 use the target fom this call.
6853 2013-02-06 Eric Botcazou <ebotcazou@adacore.com>
6855 * erroutc.adb (Validate_Specific_Warning): Do not issue the
6856 warning about an ineffective Pragma Warnings for -Wxxx warnings.
6857 * sem_prag.adb (Analyze_Pragma) <Warnings>: Accept -Wxxx warnings.
6858 * gnat_rm.texi (Pragma Warnings): Document coordination with
6859 warnings of the GCC back-end.
6861 2013-02-06 Javier Miranda <miranda@adacore.com>
6863 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Do not build the body
6864 of an inlined function if we do not generate code for the function.
6866 2013-02-06 Pascal Obry <obry@adacore.com>
6868 * s-os_lib.adb (Locate_Exec_On_Path): Call Normalize_Pathname
6869 with Resolve_Links set to False.
6871 2013-02-03 Eric Botcazou <ebotcazou@adacore.com>
6873 * gcc-interface/decl.c: Include diagnostic-core.h.
6874 (gnat_to_gnu_entity) <E_Array_Type>: Sorry if Reverse_Storage_Order
6875 is set on the entity.
6876 <E_Record_Type>: Likewise.
6877 * gcc-interface/Make-lang.in (ada/decl.o): Add $(DIAGNOSTIC_CORE_H).
6879 2013-01-29 Ben Brosgol <brosgol@adacore.com>
6881 * gnat_rm.texi: Fixed typos. Minor edits.
6883 2013-01-29 Bob Duff <duff@adacore.com>
6885 * a-convec.adb: Minor reformatting.
6887 2013-01-29 Pascal Obry <obry@adacore.com>
6889 * tempdir.adb, tempdir.ads (Use_Temp_Dir): Set wether to use the temp
6892 2013-01-29 Ed Schonberg <schonberg@adacore.com>
6894 * exp_ch5.adb (Expand_Iterator_Loop_Over_Array): Preserve loop
6895 identifier only if it comes from source.
6896 (Expand_N_Loop_Statement): If the domain of iteration is an
6897 enumeration type with a representation clause, remove from
6898 visibility the loop identifier before rewriting the loop as a
6899 block with a declaration for said identifier.
6900 * sem_util.adb (Remove_Homonym): Handle properly the default case.
6902 2013-01-29 Vincent Celier <celier@adacore.com>
6904 * prj-proc.adb: Minor comment spelling fix.
6906 2013-01-29 Pascal Obry <obry@adacore.com>
6908 * prj-proc.adb (Process_Expression_Variable_Decl): Prepend
6909 Project_Path to current environment.
6911 2013-01-29 Thomas Quinot <quinot@adacore.com>
6913 * sprint.adb (Sprint_Node_Actual): Output freeze nodes for
6914 itypes even if Dump_Freeze_Null is not set.
6916 2013-01-29 Robert Dewar <dewar@adacore.com>
6918 * sem_util.adb: Minor reformatting.
6919 * s-rident.ads: Minor comment fixes.
6921 2013-01-29 Pascal Obry <obry@adacore.com>
6923 * prj-env.ads, prj-env.adb (Add_Directories): Add parameter to
6924 control if the path is prepended or appended.
6926 2013-01-29 Ed Schonberg <schonberg@adacore.com>
6928 * sem_ch6.adb (Analyze_Expression_Function): An expression
6929 function declaration is not a subprogram declaration, and thus
6930 cannot appear in a protected definition.
6932 2013-01-29 Hristian Kirtchev <kirtchev@adacore.com>
6934 * exp_util.adb (Insert_Actions): When new
6935 actions come from the expression of the expression with actions,
6936 then they must be added to the list of existing actions.
6938 2013-01-29 Eric Botcazou <ebotcazou@adacore.com>
6940 * sem_ch3.adb (Analyze_Subtype_Declaration) <Private_Kind>: For
6941 the subtype of a constrained private type with discriminants
6942 that has got a full view, show that the completion is a clone
6945 2013-01-29 Javier Miranda <miranda@adacore.com>
6947 * errout.ads, errout.adb (Get_Ignore_Errors): New subprogram.
6948 * opt.ads (Warn_On_Overlap): Update documentation.
6949 * sem_aggr.adb (Resolve_Aggregate, Resolve_Extension_Aggregate):
6950 Check function writable actuals.
6951 * sem_ch3.adb (Build_Derived_Record_Type,
6952 Record_Type_Declaration): Check function writable actuals.
6953 * sem_ch4.adb (Analyze_Range): Check function writable actuals.
6954 * sem_ch5.adb (Analyze_Assignment): Remove code of the initial
6955 implementation of AI05-0144.
6956 * sem_ch6.adb (Analyze_Function_Return,
6957 (Analyze_Procedure_Call.Analyze_Call_And_Resolve): Remove code
6958 of the initial implementation of AI05-0144.
6959 * sem_res.adb (Resolve): Remove code of the initial implementation.
6960 (Resolve_Actuals): Call Check_Function_Writable_Actuals and remove call
6961 of the initial implementation.
6962 (Resolve_Arithmetic_Op, Resolve_Logical_Op,
6963 Resolve_Membership_Op): Check function writable actuals.
6964 * sem_util.ad[sb] (Actuals_In_Call): Removed
6965 (Check_Order_Dependence): Removed (Save_Actual): Removed
6966 (Check_Function_Writable_Actuals): New subprogram.
6967 * usage.adb (Usage): Update documentation.
6968 * warnsw.adb (Set_Warning_Switch): Enable warn_on_overlap when
6969 setting all warnings.
6971 2013-01-29 Robert Dewar <dewar@adacore.com>
6973 * a-calend-vms.adb: Minor comment fix.
6975 2013-01-29 Robert Dewar <dewar@adacore.com>
6977 * mlib-utl.adb, gnatlink.adb: Avoid reference to ASCII.Back_Slash
6978 because of casing issues.
6979 * sem_util.ads: Minor comment fix.
6980 * style.adb (Check_Identifier): Set proper casing for entities
6982 * styleg.adb: Minor comment improvement.
6983 * stylesw.ads (Style_Check_Standard): Fix bad comments.
6985 2013-01-29 Hristian Kirtchev <kirtchev@adacore.com>
6987 * sem_prag.adb: Add the grammar for pragmas Abstract_State and Global.
6988 (Analyze_Pragma): Push the scope of the related subprogram and install
6989 its formals once before starting the analysis of the [moded] global
6992 2013-01-29 Pascal Obry <obry@adacore.com>
6994 * prj-proc.adb (Process_Expression_Variable_Decl): Always handle
6995 relative paths in Project_Path as relative to the aggregate
6996 project location. Note that this was what was documented.
6998 2013-01-29 Vincent Celier <celier@adacore.com>
7000 * gnatcmd.adb: For "gnat stub -P ...", do not check the naming
7001 scheme for Ada, when Ada is not a language for the project.
7003 2013-01-29 Ed Schonberg <schonberg@adacore.com>
7005 * sem_ch3.adb (Analyze_Subtype_Declaration): Inherit
7006 Is_Generic_Actual_Type flag in a nested instance.
7007 * sem_ch12.adb (Restore_Private_Views): Preserve
7008 Is_Generic_Actual_Type flag if actual is a Generic_Actual_Type
7009 of an enclosing instance.
7010 * sem_util.adb (Corresponding_Generic_Type): Handle generic actual
7011 which is an actual of an enclosing instance.
7012 * sem_type.adb (Real_Actual): If a generic_actual_type is the
7013 formal of an enclosing generic and thus renames the corresponding
7014 actual, use the actual of the enclosing instance to resolve
7015 spurious ambiguities in instantiations when two formals are
7016 instantiated with the same actual.
7018 2013-01-29 Robert Dewar <dewar@adacore.com>
7020 * gnat_rm.texi: Document all Ada 2005 and Ada 2012 pragmas as
7021 being available as implementation-defined pragmas in earlier
7024 2013-01-29 Vincent Celier <celier@adacore.com>
7026 * clean.adb (Delete): On VMS, delete all versions of the file.
7028 2013-01-29 Robert Dewar <dewar@adacore.com>
7030 * par-ch6.adb (No_Constraint_Maybe_Expr_Func): New procedure.
7031 * par-util.adb (No_Constraint): Undo special handling, moved
7034 2013-01-29 Robert Dewar <dewar@adacore.com>
7036 * aspects.ads: Aspect Warnings is implementation defined Add
7037 some other missing entries to impl-defined list Mark Warnings
7038 as GNAT pragma in main list.
7039 * sem_ch8.adb: Process aspects for all cases of renaming
7042 2013-01-29 Robert Dewar <dewar@adacore.com>
7044 * sem_ch6.adb (Analyze_Function_Call): Set In_Assertion flag.
7045 * sem_elab.adb (Check_Internal_Call_Continue): Do not issue
7046 warnings about possible elaboration error if call is within
7048 * sinfo.ads, sinfo.adb (In_Assertion): New flag in N_Function_Call node.
7050 2013-01-29 Robert Dewar <dewar@adacore.com>
7052 * a-calend-vms.adb, g-eacodu-vms.adb, g-trasym-vms-alpha.adb,
7053 * s-auxdec-vms-ia64.adb, s-mastop-vms.adb, s-osprim-vms.adb,
7054 s-tasdeb-vms.adb: Replace pragma Interface by pragma Import.
7056 2013-01-29 Robert Dewar <dewar@adacore.com>
7058 * opt.ads (Ignore_Style_Checks_Pragmas): New flag.
7059 * par-prag.adb (Par, case Style_Checks): Recognize
7060 Ignore_Style_Checks_Pragmas.
7061 * sem_prag.adb (Analyze_Pragma, case Style_Checks): Recognize
7062 Ignore_Style_Checks_Pragmas.
7063 * switch-c.adb: Recognize -gnateY switch.
7064 * usage.adb: Add documentation for "-gnateY".
7065 * vms_data.ads: Add IGNORE_STYLE_CHECKS_PRAGMAS (-gnateY).
7067 2013-01-29 Vincent Celier <celier@adacore.com>
7069 * clean.adb (Clean_Executables): Add Sid component when calling
7071 * make.adb: When inserting in the Queue, add the Source_Id
7072 (Sid) when it is known (Start_Compile_If_Possible): When the
7073 Source_Id is known (Sid), get the path name of the ALI file
7074 (Full_Lib_File) from it, to avoid finding old ALI files in other
7076 * makeutl.ads (Source_Info): New Source_Id component Sid in
7077 Format_Gnatmake variant.
7079 2013-01-29 Robert Dewar <dewar@adacore.com>
7081 * gnat_ugn.texi: Document -gnateY.
7083 2013-01-29 Doug Rupp <rupp@adacore.com>
7085 * s-osinte-vms.ads, s-taprop-vms.adb, system-vms_64.ads,
7086 system-vms-ia64.ads: Replace pragma Interface by pragma Import.
7088 2013-01-29 Robert Dewar <dewar@adacore.com>
7090 * atree.ads, atree.adb (Node30): New function.
7091 (Set_Node30): New procedure.
7092 (Num_Extension_Nodes): Change to 5 (activate new fields/flags).
7093 * atree.h: Add macros for Field30 and Node30.
7094 * einfo.ads, einfo.adb: Move some fields to avoid duplexing.
7095 * treepr.adb (Print_Entity_Information): Print fields 30-35.
7097 2013-01-29 Robert Dewar <dewar@adacore.com>
7099 * sem_prag.adb (Analyze_Pragma, case Interface): Consider to
7100 be a violation of No_Obsolescent_Features even in Ada 95. Also
7101 generates a warning in -gnatwj mode.
7102 (Analyze_Pragma, case Interface_Name): Generates a warning in -gnatwj
7104 * gnat_ugn.texi: Additional documentation on -gnatwj and pragma
7107 2013-01-29 Vincent Celier <celier@adacore.com>
7109 * snames.ads-tmpl: Add new standard name Trailing_Switches.
7111 2013-01-29 Ed Schonberg <schonberg@adacore.com>
7113 * sem_disp.adb (Check_Controlling_Type): If a designated type T
7114 of an anonymous access type is a limited view of a tagged type,
7115 it can be a controlling type only if the subprogram is in the
7118 2013-01-29 Vincent Celier <celier@adacore.com>
7120 * gnatcmd.adb: Use the project where the config pragmas file is
7121 declared to get its path.
7123 2013-01-29 Vincent Celier <celier@adacore.com>
7125 * prj-attr.adb: New attribute Linker'Trailing_Switches.
7127 2013-01-22 Eric Botcazou <ebotcazou@adacore.com>
7129 * gcc-interface/trans.c (gnat_to_gnu) <N_Expression_With_Actions>: Do
7130 not translate the Etype of the node before translating the Actions.
7132 2013-01-22 Eric Botcazou <ebotcazou@adacore.com>
7134 * gcc-interface/trans.c (Pragma_to_gnu) <Name_Space>: Use optimize_size
7135 instead of optimize and adjust warning message.
7136 (Compilation_Unit_to_gnu): Process pragmas preceding the unit.
7138 2013-01-22 Tristan Gingold <gingold@adacore.com>
7140 * gcc-interface/gigi.h (ADT_unhandled_except_decl,
7141 ADT_unhandled_others_decl): New.
7142 (unhandled_others_decl, unhandled_except_decl): Define.
7143 * gcc-interface/trans.c: Include common/common-target.h.
7144 (gigi): Initialize them.
7145 (Subprogram_Body_to_gnu): On SEH targets, wrap the body of the main
7146 function in a try/catch clause.
7148 2013-01-11 Eric Botcazou <ebotcazou@adacore.com>
7150 * gcc-interface/Make-lang.in (COMMON_ADAFLAGS): Remove -gnata.
7151 (CHECKING_ADAFLAGS): New.
7152 (ALL_ADAFLAGS): Include CHECKING_ADAFLAGS.
7154 2013-01-10 Eric Botcazou <ebotcazou@adacore.com>
7156 * gcc-interface/config-lang.in (boot_language_boot_flags): Delete.
7157 * gcc-interface/Make-lang.in (BOOT_ADAFLAGS): Likewise.
7159 2013-01-07 Eric Botcazou <ebotcazou@adacore.com>
7161 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Record_Type>: Adjust
7162 comment about type extension with discriminants.
7163 <E_Record_Subtype>: Remove useless test and reorder conditions.
7164 (elaborate_entity) <E_Record_Subtype>: Likewise.
7166 2013-01-07 Richard Biener <rguenther@suse.de>
7169 * gcc-interface/Make-lang.in (ada.install-common): Always apply
7170 program_transform_name.
7172 2013-01-06 Eric Botcazou <ebotcazou@adacore.com>
7174 * gnatvsn.ads (Current_Year): Bump to 2013.
7176 2013-01-06 Olivier Hainque <hainque@adacore.com>
7178 * gcc-interface/decl.c (gnat_to_gnu_field): Emit a specialized
7179 diagnostic for component size mismatch wrt volatile requirements.
7180 Add a gcc_unreachable() at the end of the checks for size. Split
7181 the check on volatile for positions into one check on atomic and
7182 a subsequent one on volatile.
7184 2013-01-06 Eric Botcazou <ebotcazou@adacore.com>
7186 * gcc-interface/decl.c (elaborate_entity) <E_Record_Type>: Delete.
7188 2013-01-06 Eric Botcazou <ebotcazou@adacore.com>
7190 * gcc-interface/decl.c (gnat_to_gnu_entity) <discrete_type>: Do not
7191 pack the field of the record type made for a misaligned type.
7193 2013-01-06 Eric Botcazou <ebotcazou@adacore.com>
7195 * gcc-interface/decl.c (annotate_value) <COMPONENT_REF>: Be prepared
7196 for discriminants inherited from parent record types.
7198 2013-01-04 Robert Dewar <dewar@adacore.com>
7200 * warnsw.adb: Minor fixes to -gnatw.d handling.
7202 2013-01-04 Robert Dewar <dewar@adacore.com>
7204 * einfo.adb, atree.adb: Enlarge entities to make 63 more flags, 6 more
7207 2013-01-04 Joel Brobecker <brobecker@adacore.com>
7209 * gnat_ugn.texi: Fix typo.
7211 2013-01-04 Robert Dewar <dewar@adacore.com>
7213 * gnat_rm.texi: Document alignment choice for subtypes.
7215 2013-01-04 Robert Dewar <dewar@adacore.com>
7217 * validsw.ads: Minor fix to comment.
7219 2013-01-04 Doug Rupp <rupp@adacore.com>
7221 * Makefile.rtl (GNATRTL_NONTASKING_OBJS,
7222 GNATRTL_ALTIVEC_OBJS): Factor g-al* objects.
7223 * gcc-interface/Makefile.in (ADA_EXCLUDE_SRCS): Add g-al* sources.
7224 (GNATRTL_ALTIVEC_OBJS): Override to null for VMS.
7225 Rename leon vxworks toolchain as leon-wrs-vxworks.
7226 * gcc-interface/Make-lang.in: Update dependencies
7228 2013-01-04 Pascal Obry <obry@adacore.com>
7230 * prj.ads (For_Each_Source): Add Locally_Removed parameter.
7231 (Source_Iterator): Add Locally_Removed field.
7232 * prj.adb (For_Each_Source): Ignore Locally_Removed files if needed.
7235 2013-01-04 Robert Dewar <dewar@adacore.com>
7237 * exp_attr.adb: Minor reformatting.
7239 2013-01-04 Robert Dewar <dewar@adacore.com>
7241 * checks.adb (Insert_Valid_Check): Fix handling of renamed
7242 packed array element.
7243 * exp_ch4.adb (Expand_Concatenate): Fix some missing parent
7244 fields in generated code.
7245 * exp_util.adb (Side_Effect_Free): Improve detection of cases
7248 2013-01-04 Robert Dewar <dewar@adacore.com>
7250 * sinfo.ads: Clean up order of N_xxx subtypes
7252 2013-01-04 Vincent Celier <celier@adacore.com>
7254 * prj-conf.adb (Check_Target): Allow --autoconf= with no target.
7256 2013-01-04 Robert Dewar <dewar@adacore.com>
7258 * types.ads, prj-conf.adb, par-tchk.adb: Minor reformatting.
7260 2013-01-04 Robert Dewar <dewar@adacore.com>
7262 * par-ch6.adb (P_Subprogram): Better handling of missing IS
7263 after expression function.
7264 * par-util.adb (No_Constraint): Improve handling to avoid bad warnings.
7266 2013-01-04 Robert Dewar <dewar@adacore.com>
7268 * exp_util.ads, exp_util.adb (Insert_Actions): In expression with
7269 actions case, new actions are appended to the sequence rather than
7272 2013-01-04 Robert Dewar <dewar@adacore.com>
7274 * gnat_ugn.texi: Document -gnatw.d/w.D (does no apply in VMS mode).
7275 * usage.adb: Add lines for -gnatw.d/w.D switches.
7276 * warnsw.adb: Minor fixes (some missing cases of setting
7277 Warning_Doc_Switch). Reject -gnatw.d and -gnatw.D in VMS mode.
7279 2013-01-04 Robert Dewar <dewar@adacore.com>
7281 * exp_util.adb (Remove_Side_Effects): Make sure scope suppress
7282 is restored on exit.
7284 2013-01-04 Robert Dewar <dewar@adacore.com>
7286 * usage.adb: Document -gnateF (check overflow for predefined Float).
7288 2013-01-04 Robert Dewar <dewar@adacore.com>
7290 * sem_res.adb (Resolve_Type_Conversion): Remove incorrect
7291 prevention of call to Apply_Type_Conversion_Checks, which resulted
7292 in missing check flags in formal mode.
7294 2013-01-04 Vincent Celier <celier@adacore.com>
7296 * makeutl.ads (Db_Switch_Args): New table used by gprbuild.
7297 * prj-conf.adb (Check_Builder_Switches): Check for switches
7298 --config= (Get_Db_Switches): New procedure to get the --db
7299 switches so that they are used when invoking gprconfig in
7301 (Do_Autoconf): When invoking gprconfig, use the --db switches, if any.
7303 2013-01-04 Pascal Obry <obry@adacore.com>
7305 * prj-nmsc.adb: Minor reformatting.
7307 2013-01-04 Vincent Celier <celier@adacore.com>
7309 * makeutl.ads (Root_Environment): New variable, moved rom
7310 gprbuild (Load_Standard_Base): New Boolean variable, moved
7312 * prj-conf.adb (Check_Builder_Switches): New procedure to check
7313 for switch --RTS in package Builder. If a runtime specified
7314 by --RTS is a relative path name, but not a base name, then
7315 find the path on the Project Search Path.
7316 (Do_Autoconf): Call Check_Builder_Switches.
7317 (Locate_Runtime): New procedure, moved from gprbuild, to get the
7318 absolute paths of runtimes when they are not specified as a base name.
7319 * prj-conf.ads (Locate_Runtime): New procedure, moved from gprbuild.
7321 2013-01-04 Ed Schonberg <schonberg@adacore.com>
7323 * sem_ch3.adb (Build_Private_Derived_Type): Set
7324 Has_Private_Ancestor on type derived from an untagged private
7325 type whose full view has discriminants
7326 * sem_aggr.adb (Resolve_Record_Aggregate): Reject non-extension
7327 aggregate for untagged record type with private ancestor.
7329 2013-01-04 Thomas Quinot <quinot@adacore.com>
7331 * sem_elab.adb, sem_ch3.adb: Minor reformatting.
7333 2013-01-04 Robert Dewar <dewar@adacore.com>
7335 * table.adb: Minor reformatting.
7337 2013-01-04 Ed Schonberg <schonberg@adacore.com>
7339 * sem_ch10.adb (Check_Redundant_Withs): A with_clause that does
7340 not come from source does not generate a warning for redundant
7343 2013-01-04 Hristian Kirtchev <kirtchev@adacore.com>
7345 * aspects.adb, aspects.ads: Add Aspect_Global to all relevant tables.
7346 * par-prag.adb: Add pragma Global to the list of pragmas that
7347 do not need special processing by the parser.
7348 * sem_ch13.adb (Analyze_Aspect_Specifications): Convert aspect
7349 Global into a pragma without any form of legality checks. The
7350 work is done by Analyze_Pragma. The aspect and pragma are both
7351 marked as needing delayed processing. Insert the corresponding
7352 pragma of aspect Abstract_State in the visible declarations of the
7354 (Check_Aspect_At_Freeze_Point): Aspect Global
7355 does not need processing even though it is marked as delayed.
7356 Alphabetize the list on aspect names.
7357 * sem_prag.adb: Add a value for pragma Global in table Sig_Flags.
7358 (Analyze_Pragma): Add ??? comment about the grammar of pragma
7359 Abstract_State. Move the error location from the pragma to the
7360 state to improve the quality of error placement. Add legality
7361 checks for pragma Global.
7362 * snames.ads-tmpl Add the following specially recognized names
7364 2013-01-04 Eric Botcazou <ebotcazou@adacore.com>
7366 * sem_ch3.adb: Fix minor typo.
7368 2013-01-04 Ed Schonberg <schonberg@adacore.com>
7370 * par-ch13.adb (Aspect_Specifications_Present): In Strict mode,
7371 accept an aspect name followed by a comma, indicating a defaulted
7374 2013-01-04 Joel Brobecker <brobecker@adacore.com>
7376 * gnat_ugn.texi: Document procedure to codesign GDB on Darwin.
7377 Update doc on gnattest --separates switch.
7379 2013-01-04 Thomas Quinot <quinot@adacore.com>
7381 * s-chepoo.ads: Minor reformatting.
7383 2013-01-04 Arnaud Charlet <charlet@adacore.com>
7385 * usage.adb: Remove mention of -gnatN in usage.
7387 2013-01-04 Robert Dewar <dewar@adacore.com>
7389 * exp_prag.adb, gnatcmd.adb, exp_util.adb, table.adb, sem_prag.adb,
7390 freeze.adb, sem_ch4.adb, sem_warn.adb, opt.ads, exp_aggr.adb,
7391 prj-conf.adb, sem_ch13.adb: Minor reformatting.
7393 2013-01-04 Thomas Quinot <quinot@adacore.com>
7395 * sinfo.ads: Minor documentation update.
7397 2013-01-04 Thomas Quinot <quinot@adacore.com>
7399 * sem_ch3.adb, einfo.adb (Analyze_Object_Declaration): Do not set Ekind
7400 before resolving initialization expression.
7402 2013-01-04 Hristian Kirtchev <kirtchev@adacore.com>
7404 * checks.adb (Generate_Index_Checks): Delay the generation of
7405 the check for an indexed component where the prefix mentions
7406 Loop_Entry until the attribute has been properly expanded.
7407 * exp_ch5.adb (Expand_Loop_Entry_Attributes): Perform minor
7408 decoration of the constant that captures the value of Loop_Entry's
7409 prefix at the entry point into a loop. Generate index checks
7410 for an attribute reference that has been transformed into an
7413 2013-01-04 Thomas Quinot <quinot@adacore.com>
7415 * exp_prag.adb, exp_util.adb, exp_util.ads, freeze.adb, exp_aggr.adb,
7416 sem_ch13.adb (Exp_Aggr.Collect_Initialization_Statements): Nothing to
7417 do if Obj is already frozen.
7418 (Exp_Util.Find_Init_Call): Rename to...
7419 (Exp_Util.Remove_Init_Call): New subprogram, renamed from
7420 Find_Init_Call. Remove the initialization call from the enclosing
7421 list if found, and if it is from an Initialization_Statements
7422 attribute, reset it.
7423 (Exp_Util.Append_Freeze_Action): Minor code reorganization.
7424 (Exp_Util.Append_Freeze_Actions): Ensure a freeze node has been
7425 allocated (as is already done in Append_Freeze_Action).
7426 (Freeze.Freeze_Entity): For an object with captured
7427 Initialization_Statements and non-delayed freezeing, unwrap the
7428 initialization statements and insert and them directly in the
7430 (Sem_Ch13.Check_Address_Clause): For an object
7431 with Initialization_Statements and an address clause, unwrap the
7432 initialization statements when moving them to the freeze actions.
7434 2013-01-03 Pascal Obry <obry@adacore.com>
7436 * prj-attr.adb, projects.texi, snames.ads-tmpl: Add package remote and
7437 corresponding attibutes.
7439 2013-01-03 Thomas Quinot <quinot@adacore.com>
7441 * exp_aggr.adb: Minor comment improvement.
7443 2013-01-03 Hristian Kirtchev <kirtchev@adacore.com>
7445 * aspects.adb, aspects.ads: Add Aspect_Abstract_State to all the
7447 * einfo.ads, einfo.adb: Add Integrity_Level and Refined_State to
7448 the description of fields (Abstract_States): New routine.
7449 (Integrity_Level): New routine.
7450 (Has_Property): New routine.
7451 (Is_Input_State): New routine.
7452 (Is_Null_State): New routine.
7453 (Is_Output_State): New routine.
7454 (Is_Volatile_State): New routine.
7455 (Refined_State): New routine.
7456 (Set_Abstract_States): New routine.
7457 (Set_Integrity_Level): New routine.
7458 (Set_Refined_State): New routine.
7459 (Write_Field8_Name): Add proper output for E_Abstract_State.
7460 (Write_Field9_Name): Add proper output for E_Abstract_State.
7461 (Write_Field25_Name): Add proper output for E_Package.
7462 * lib-xref.ads: Add new letter for an abstract state.
7463 * par-prag.adb: Add pragma Abstract_State to the list of pragma
7464 that do not need special processing by the parser.
7465 * sem_ch13.adb (Analyze_Aspect_Specifications): Convert
7466 aspect Abstract_State into a pragma without any form
7467 of legality checks. The work is done by Analyze_Pragma.
7468 (Check_Aspect_At_Freeze_Point): Aspect Abstract_State does not
7469 require delayed analysis.
7470 * sem_prag.adb: Add a value for pragma Abstract_State in table
7472 (Analyze_Pragma): Add legality checks for pragma
7473 Abstract_State. Analysis of individual states introduces a state
7474 abstraction entity into the visibility chain.
7475 * snames.ads-tmpl: Add new names for abstract state and
7476 integrity. Add new pragma id for abstract state.
7478 2013-01-03 Bob Duff <duff@adacore.com>
7480 * table.adb (Reallocate): Calculate new Length in
7481 Long_Integer to avoid overflow.
7483 2013-01-03 Thomas Quinot <quinot@adacore.com>
7485 * sem_ch3.adb, sinfo.ads, freeze.adb, sem_ch4.adb, exp_aggr.adb
7486 (Sem_Ch3.Analyze_Object_Declaration): Set Ekind early so that
7487 it is set properly when expanding the initialization expression.
7488 (Freeze.Check_Address_Clause): Transfer initialization expression
7489 to an assignment in the freeze actions, so that the object is
7490 initialized only after being elaborated by GIGI.
7491 (Sinfo (comments), Sem_Ch4.Analyze_Expression_With_Actions): Allow
7492 a Null_Statement as the expression in an Expression_With_Actions.
7493 (Exp_Aggr.Collect_Initialization_Statements): New subprogram
7494 shared by expansion of record and array aggregates, used to
7495 capture statements for an aggregate used to initalize an object
7496 into an Expression_With_Actions (which acts as a container for
7498 (Exp_Aggr.Convert_Aggr_In_Obj_Decl): Use the above to
7499 capture initialization statements, instead of the previously
7500 existing loop which left freeze nodes out of the capturing
7501 construct (causing out of order elaboration crashes in GIGI).
7502 (Exp_Aggr.Expand_Array_Aggregate): Use the above to capture
7503 initialization statements (this was previously not done for
7504 arrays). Also do not unconditionally prevent in place expansion
7505 for an object with address clause.
7507 2013-01-03 Thomas Quinot <quinot@adacore.com>
7509 * gnat_rm.texi, freeze.adb (Check_Component_Storage_Order): Check that
7510 a record extension has the same scalar storage order as the parent type.
7512 2013-01-03 Thomas Quinot <quinot@adacore.com>
7514 * exp_ch4.adb: Add comment.
7516 2013-01-03 Vincent Celier <celier@adacore.com>
7518 * prj.adb: Minor spelling error correction in comment.
7520 2013-01-03 Vincent Celier <celier@adacore.com>
7522 * gnatcmd.adb (GNATCmd): If a single main has been specified
7523 as an absolute path, use its simple file name to find specific
7524 switches, instead of the absolute path.
7526 2013-01-03 Javier Miranda <miranda@adacore.com>
7528 * sem_warn.adb (Warn_On_Overlapping_Actuals): For overlapping
7529 parameters that are record types or array types generate warnings
7530 only compiling under -gnatw.i
7531 * opt.ads (Extensions_Allowed): Restore previous documentation.
7533 2013-01-03 Vincent Celier <celier@adacore.com>
7535 * prj-conf.adb (Do_Autoconf): If Target is specified in the
7536 main project, but not on the command line, use the Target in
7537 the project to invoke gprconfig in auto-configuration.
7538 * makeutl.ads (Default_Config_Name): New constant String.
7540 2013-01-03 Arnaud Charlet <charlet@adacore.com>
7542 * usage.adb: Minor: fix typo in usage.
7544 2013-01-03 Thomas Quinot <quinot@adacore.com>
7546 * sem_ch13.adb (Analyze_Record_Representation_Clause): Reject
7547 an illegal component clause for an inherited component in a
7550 2013-01-03 Emmanuel Briot <briot@adacore.com>
7552 * xref_lib.adb (Parse_Identifier_Info): Fix handling of arrays, which
7553 have information in the ALI file for both the index and the component
7556 2013-01-03 Emmanuel Briot <briot@adacore.com>
7558 * projects.texi: Fix error in documenting the project path
7559 computed for an aggregate project.
7561 2013-01-03 Javier Miranda <miranda@adacore.com>
7563 * sem_warn.adb (Warn_On_Overlapping_Actuals): Adding documentation
7564 plus restricting the functionality of this routine to cover the
7565 cases described in the Ada 2012 reference manual. The previous
7566 extended support is now available under -gnatX.
7567 * s-tassta.adb (Finalize_Global_Tasks): Addition of a dummy
7568 variable to call Timed_Sleep. Required to avoid warning on
7569 overlapping out-mode actuals.
7570 * opt.ads (Extensions_Allowed): Update documentation.
7572 2013-01-03 Tristan Gingold <gingold@adacore.com>
7574 * s-arit64.ads: Use Multiply_With_Ovflo_Check as __gnat_mulv64.
7576 * gcc-interface/Makefile.in: Remove reference to arit64.c.
7578 2013-01-03 Thomas Quinot <quinot@adacore.com>
7580 * checks.adb, checks.ads (Apply_Address_Clause_Check): The check must
7581 be generated at the start of the freeze actions for the entity, not
7582 before (or after) the freeze node.
7584 2013-01-03 Thomas Quinot <quinot@adacore.com>
7586 * exp_aggr.adb (Exp_Aggr.Convert_Aggregate_In_Obj_Decl):
7587 Reorganize code to capture initialization statements in a block,
7588 so that freeze nodes are excluded from the captured block.
7590 2013-01-03 Thomas Quinot <quinot@adacore.com>
7592 * exp_ch11.adb: Minor reformatting.
7594 2013-01-03 Thomas Quinot <quinot@adacore.com>
7596 * exp_util.adb, einfo.adb, einfo.ads, freeze.adb, exp_aggr.adb,
7597 sem_ch13.adb (Einfo.Initialization_Statements,
7598 Einfo.Set_Initialization_Statements): New entity attribute
7600 (Exp_Util.Find_Init_Call): Handle case of an object initialized
7601 by an aggregate converted to a block of assignment statements.
7602 (Freeze.Check_Address_Clause): Do not clear Has_Delayed_Freeze
7603 even for objects that require a constant address, because the
7604 address expression might involve entities that have yet to be
7605 elaborated at the point of the object declaration.
7606 (Exp_Aggr.Convert_Aggregate_In_Obj_Decl): For a type that does
7607 not require a transient scope, capture the assignment statements
7608 in a block so that they can be moved down after elaboration of
7609 an address clause if needed.
7610 (Sem_Ch13.Check_Constant_Address_Clause.Check_Expr_Constants,
7611 case N_Unchecked_Conversion): Do not replace operand subtype with
7612 its base type as this violates a GIGI invariant if the operand
7613 is an identifier (in which case the etype of the identifier
7614 is expected to be equal to that of the denoted entity).
7616 2013-01-03 Javier Miranda <miranda@adacore.com>
7618 * sem_util.ads, sem_util.adb (Denotes_Same_Object): Extend the
7619 functionality of this routine to cover cases described in the Ada 2012
7622 2013-01-03 Ed Schonberg <schonberg@adacore.com>
7624 * sem_elab.adb (Set_Elaboration_Constraint): Handle properly
7625 a 'Access attribute reference when the subprogram is called
7628 2013-01-03 Arnaud Charlet <charlet@adacore.com>
7630 * s-tpobop.adb (PO_Do_Or_Queue): Refine assertion, since a
7631 select statement may be called from a controlled (e.g. Initialize)
7632 operation and have abort always deferred.
7634 2013-01-03 Robert Dewar <dewar@adacore.com>
7636 * sem_ch8.adb, einfo.ads, einfo.adb: Minor code reorganization.
7638 2013-01-03 Javier Miranda <miranda@adacore.com>
7640 * exp_ch3.adb (Make_Controlling_Function_Wrappers): Exclude
7641 internal entities associated with interfaces and add minimum
7642 decoration to the defining entity of the generated wrapper to
7643 allow overriding interface primitives.
7644 * sem_disp.ads (Override_Dispatching_Operation): Addition of a
7645 new formal (Is_Wrapper).
7646 * sem_disp.adb (Override_Dispatching_Operation): When overriding
7647 interface primitives the new formal helps identifying that the
7648 new operation is not fully decorated.
7650 2013-01-03 Thomas Quinot <quinot@adacore.com>
7652 * sem_ch7.adb, sem_ch10.adb, einfo.adb, einfo.ads, sem_ch12.adb,
7653 rtsfind.adb, sem_elab.adb, sem_ch4.adb, sem_ch8.adb
7654 (Einfo.Is_Visible_Child_Unit, Einfo.Set_Is_Visible_Child_Unit):
7655 Rename to Is_Visible_Lib_Unit, Set_Is_Visible_Lib_Unit, and
7656 update spec accordingly (now also applies to root library units).
7657 (Sem_Ch10.Analyze_Subunit.Analyze_Subunit_Context): Toggle above flag
7658 on root library units, not only child units.
7659 (Sem_Ch10.Install[_Limited]_Withed_Unit): Same.
7660 (Sem_Ch10.Remove_Unit_From_Visibility): Reset Is_Visible_Lib_Unit
7661 even for root library units.
7662 (Sem_Ch8.Find_Expanded_Name): A selected component form whose prefix is
7663 Standard is an expanded name for a root library unit.
7665 2013-01-03 Thomas Quinot <quinot@adacore.com>
7667 * exp_ch3.adb: Minor reformatting.
7669 2013-01-03 Olivier Hainque <hainque@adacore.com>
7671 * tracebak.c: Reinstate changes to support ppc-lynx178.
7673 2013-01-03 Ed Schonberg <schonberg@adacore.com>
7675 * atree.ads: Minor reformatting and documentation enhancement.
7677 2013-01-03 Ed Schonberg <schonberg@adacore.com>
7679 * exp_ch3.adb (Expand_N_Object_Declaration): If the object has
7680 a class-wide type and a renaming declaration is created for it,
7681 preserve entity chain, which already contains generated internal
7682 types. This ensures that freezing actions are properly generated
7683 for all objects declared subsequently in the same scope, and
7684 that debugging information is generated for them.
7685 * sem_util.adb, sem_util.ads (we): New debugging routine, to
7686 display entity chain of a given scope.
7688 2013-01-03 Robert Dewar <dewar@adacore.com>
7690 * exp_intr.adb: Minor reformatting.
7692 2013-01-03 Robert Dewar <dewar@adacore.com>
7694 * einfo.adb: Minor reformatting.
7696 2013-01-03 Pascal Obry <obry@adacore.com>
7698 * adaint.c, adaint.h (__gnat_get_module_name): Removed.
7699 (__gnat_is_module_name_supported): Removed.
7700 * s-win32.ads: Add some needed definitions.
7701 * g-trasym.ads: Update comments.
7703 2013-01-03 Robert Dewar <dewar@adacore.com>
7705 * layout.adb (Set_Composite_Alignment): Fix problems of
7706 interactions with Optimize_Alignment set to Space.
7708 2013-01-03 Thomas Quinot <quinot@adacore.com>
7710 * exp_disp.adb: Minor reformatting.
7712 2013-01-02 Richard Biener <rguenther@suse.de>
7715 * gcc-interface/Makefile.in: Add $(GMPINC) to includes.
7717 2013-01-02 Thomas Quinot <quinot@adacore.com>
7719 * exp_intr.adb (Expand_Dispatching_Constructor_Call): Remove
7720 side effects from Tag_Arg early, doing it too late may cause a
7721 crash due to inconsistent Parent link.
7722 * sem_ch8.adb, einfo.ads: Minor reformatting.
7724 2013-01-02 Robert Dewar <dewar@adacore.com>
7726 * einfo.ads, einfo.adb (Has_Independent_Components): New flag.
7727 * freeze.adb (Size_Known): We do not know the size of a packed
7728 record if it has atomic components, by reference type components,
7729 or independent components.
7730 * sem_prag.adb (Analyze_Pragma, case Independent_Components): Set new
7731 flag Has_Independent_Components.
7733 2013-01-02 Yannick Moy <moy@adacore.com>
7735 * opt.ads (Warn_On_Suspicious_Contract): Set to True by default.
7736 * usage.adb (Usage): Update usage message.
7738 2013-01-02 Pascal Obry <obry@adacore.com>
7740 * adaint.c (__gnat_is_module_name_supported): New constant.
7742 2013-01-02 Ed Schonberg <schonberg@adacore.com>
7744 * sem_attr.adb (Check_Array_Type): Reject an attribute reference on an
7745 array whose component type does not have a completion.
7747 2013-01-02 Geert Bosch <bosch@adacore.com>
7749 * a-nllcef.ads, a-nlcefu.ads, a-nscefu.ads: Make Pure.
7751 2013-01-02 Robert Dewar <dewar@adacore.com>
7753 * par_sco.adb: Minor reformatting.
7755 2013-01-02 Javier Miranda <miranda@adacore.com>
7757 * sem_aggr.adb (Resolve_Array_Aggregate): Remove dead code.
7759 2013-01-02 Olivier Hainque <hainque@adacore.com>
7761 * a-exctra.ads (Get_PC): New function.
7763 2013-01-02 Thomas Quinot <quinot@adacore.com>
7765 * sem_ch8.adb: Minor reformatting.
7767 2013-01-02 Thomas Quinot <quinot@adacore.com>
7769 * sem_ch7.adb: Minor reformatting.
7771 2013-01-02 Thomas Quinot <quinot@adacore.com>
7773 * freeze.adb (Check_Component_Storage_Order): Do not crash on
7776 2013-01-02 Robert Dewar <dewar@adacore.com>
7778 * gnat1drv.adb, targparm.adb, targparm.ads: Minor name change: add
7779 On_Target to Atomic_Sync_Default.
7781 2013-01-02 Robert Dewar <dewar@adacore.com>
7783 * sem_warn.adb (Warn_On_Known_Condition): Suppress warning for
7784 comparison of attribute result with constant
7785 * a-ststio.adb, s-direio.adb, s-rannum.adb: Remove unnecessary pragma
7786 Warnings (Off, "..");
7788 2013-01-02 Yannick Moy <moy@adacore.com>
7790 * sem_prag.ads: Minor correction of comment.
7792 2013-01-02 Thomas Quinot <quinot@adacore.com>
7794 * par_sco.adb (Traverse_Package_Declaration): The first
7795 declaration in a nested package is dominated by the preceding
7796 declaration in the enclosing scope.
7798 2013-01-02 Pascal Obry <obry@adacore.com>
7800 * adaint.c, adaint.h (__gnat_get_module_name): Return the actual
7801 module containing a given address.
7803 2013-01-02 Thomas Quinot <quinot@adacore.com>
7805 * sem_ch3.adb: Minor reformatting.
7807 2013-01-02 Pascal Obry <obry@adacore.com>
7809 * cstreams.c (__gnat_ftell64): New routine. Use _ftelli64 on
7810 Win64 and default to ftell on other platforms.
7811 (__gnat_fsek64): Likewise.
7812 * i-cstrea.ads: Add fssek64 and ftell64 specs.
7813 * s-crtl.ads: Likewise.
7814 * a-ststio.adb, s-direio.adb (Size): Use 64 bits version when required.
7815 (Set_Position): Likewise.
7817 2013-01-02 Thomas Quinot <quinot@adacore.com>
7819 * par_sco.adb: Generate X SCOs for default expressions in
7820 subprogram body stubs. Do not generate any SCO for package,
7821 task, or protected body stubs.
7823 2013-01-02 Ed Schonberg <schonberg@adacore.com>
7825 * sem_ch3.adb: Further improvement to ASIS mode for anonymous
7826 access to protected subprograms.
7828 2013-01-02 Robert Dewar <dewar@adacore.com>
7830 * par_sco.adb, vms_data.ads: Minor reformatting.
7832 2013-01-02 Thomas Quinot <quinot@adacore.com>
7834 * par_sco.adb (Traverse_Declarations_Or_Statement): Function
7835 form, returning value of Current_Dominant upon exit, for chaining
7837 (Traverse_Declarations_Or_Statement.Traverse_One, case
7838 N_Block_Statement): First statement is dominated by last declaration.
7839 (Traverse_Subprogram_Or_Task_Body): Ditto.
7840 (Traverse_Package_Declaration): First private
7841 declaration is dominated by last visible declaration.
7842 (Traverse_Sync_Definition): Ditto.
7844 2013-01-02 Thomas Quinot <quinot@adacore.com>
7846 * gnat_rm.texi: Restrict the requirement for Scalar_Storage_Order
7847 matching Bit_Order to record types only, since array types do not
7850 2013-01-02 Vincent Celier <celier@adacore.com>
7852 * gnat_ugn.texi: Remove documentation of -gnateO, which is an
7854 * usage.adb: Indicate that -gnateO is an internal switch.
7856 2013-01-02 Thomas Quinot <quinot@adacore.com>
7858 * par_sco.adb: Add SCO generation for task types and single
7860 * get_scos.adb: When adding an instance table entry for a
7861 non-nested instantiation, make sure the Enclosing_Instance is
7864 2013-01-02 Hristian Kirtchev <kirtchev@adacore.com>
7866 * sem_attr.adb (Analyze_Attribute): Skip the special _Parent
7867 scope generated for subprogram inlining purposes while trying
7868 to locate the enclosing function.
7869 * sem_prag.adb (Analyze_Pragma): Preanalyze the boolean
7870 expression of pragma Postcondition when the pragma comes from
7871 source and appears inside a subprogram body.
7873 2013-01-02 Thomas Quinot <quinot@adacore.com>
7875 * switch-c.adb, fe.h, back_end.adb: Enable generation of instantiation
7876 information in debug info unconditionally when using -fdump-scos,
7877 instead of relying on a separate command line switch -fdebug-instances.
7878 * gcc-interface/Make-lang.in: Update dependencies.
7880 2013-01-02 Ed Schonberg <schonberg@adacore.com>
7882 * sem_ch12.adb: Additional refinement of predicate.
7884 2013-01-02 Vincent Celier <celier@adacore.com>
7886 * vms_data.ads: Remove incorrect spaces at end of descriptions
7887 of qualifiers for single switch.
7889 2013-01-02 Ben Brosgol <brosgol@adacore.com>
7891 * gnat_rm.texi: Minor edits / wordsmithing in section on pragma
7892 Check_Float_Overflow.
7894 2013-01-02 Thomas Quinot <quinot@adacore.com>
7896 * sprint.adb (Sprint_Node_Actual): Do not add extra parens for
7897 a conditional expression (CASE or IF expression) that already
7898 has parens. Also omit ELSE keyword for an IF expression without
7901 2013-01-02 Thomas Quinot <quinot@adacore.com>
7903 * gnat1drv.adb (Adjust_Global_Switches): Adjust back-end
7904 flag_debug_instances here, after front-end switches have been
7907 2013-01-02 Vincent Celier <celier@adacore.com>
7909 * usage.adb: Minor reformatting.
7911 2013-01-02 Arnaud Charlet <charlet@adacore.com>
7913 * opt.ads: Fix typo.
7915 2013-01-02 Thomas Quinot <quinot@adacore.com>
7917 * par_sco.adb: Generate P decision SCOs for SPARK pragmas
7918 Assume and Loop_Invariant.
7920 2013-01-02 Robert Dewar <dewar@adacore.com>
7922 * vms_data.ads: Add entry for Float_Check_Valid (-gnateF).
7923 * ug_words: Add entry for Float_Check_Overflow.
7924 * usage.adb: Minor reformatting.
7925 * gnat_ugn.texi: Add documentation for -gnateF (Check_Float_Overflow).
7927 2013-01-02 Vincent Celier <celier@adacore.com>
7929 * gnat_ugn.texi: Add documentation for switches -gnateA, -gnated,
7930 -gnateO=, -gnatet and -gnateV.
7931 * ug_words: Add qualifiers equivalent to -gnateA, -gnated,
7932 -gnatet and -gnateV.
7933 * usage.adb: Add lines for -gnatea, -gnateO and -gnatez.
7934 * vms_data.ads: Add new compiler qualifiers /ALIASING_CHECK
7935 (-gnateA), /DISABLE_ATOMIC_SYNCHRONIZATION (-gnated),
7936 /PARAMETER_VALIDITY_CHECK (-gnateV) and /TARGET_DEPENDENT_INFO
7939 2013-01-02 Robert Dewar <dewar@adacore.com>
7941 * checks.adb (Apply_Scalar_Range_Check): Implement Check_Float_Overflow.
7942 * opt.ads, opt.adb: Handle flags Check_Float_Overflow[_Config].
7943 * par-prag.adb: Add dummy entry for pragma Check_Float_Overflow.
7944 * sem_prag.adb: Implement pragma Check_Float_Overflow.
7945 * snames.ads-tmpl: Add entries for pragma Check_Float_Overflow.
7946 * switch-c.adb: Recognize -gnateF switch.
7947 * tree_io.ads: Update ASIS version number.
7948 * gnat_rm.texi: Add documentation of pragma Check_Float_Overflow.
7950 2013-01-02 Robert Dewar <dewar@adacore.com>
7952 * checks.adb, exp_ch4.adb, exp_ch6.adb, exp_ch7.adb, exp_ch9.adb,
7953 exp_disp.adb, exp_dist.adb, exp_intr.adb, exp_prag.adb, exp_util.adb,
7954 freeze.adb, gnat1drv.adb, inline.adb, layout.adb, lib-xref.adb,
7955 par-ch10.adb, par-labl.adb, par-load.adb, par-util.adb, restrict.adb,
7956 sem_ch13.adb, sem_ch4.adb, sem_ch6.adb, sem_dim.adb, sem_elab.adb,
7957 sem_res.adb, sem_warn.adb, sinput-l.adb: Add tags to warning messages.
7958 * sem_ch6.ads, warnsw.ads, opt.ads: Minor comment updates.
7960 2013-01-02 Robert Dewar <dewar@adacore.com>
7962 * err_vars.ads: Minor comment fix.
7964 2013-01-02 Ed Schonberg <schonberg@adacore.com>
7966 * sem_ch12.adb: Refine predicate.
7968 2013-01-02 Robert Dewar <dewar@adacore.com>
7970 * errout.ads: Minor comment fixes.
7971 * opt.ads: Minor comment additions.
7972 * exp_aggr.adb: Add tags to warning messages
7973 * exp_ch11.adb, exp_ch3.adb, exp_ch4.adb, exp_util.adb, sem_aggr.adb,
7974 sem_attr.adb, sem_case.adb, sem_cat.adb, sem_ch3.adb, sem_ch4.adb,
7975 sem_ch5.adb, sem_disp.adb, sem_dist.adb, sem_elab.adb, sem_eval.adb,
7976 sem_intr.adb, sem_mech.adb, sem_prag.adb, sem_res.adb, sem_util.adb,
7977 sem_warn.adb: Add tags to warning messages
7979 2013-01-02 Doug Rupp <rupp@adacore.com>
7981 * init.c [VMS] Remove subtest on reason mask for ACCVIO that is a C_E.
7983 2013-01-02 Ed Schonberg <schonberg@adacore.com>
7985 * sem_ch12.adb: Recover source name for renamed packagea.
7987 2013-01-02 Robert Dewar <dewar@adacore.com>
7989 * errout.adb (Set_Msg_Insertion_Warning): Correct typo causing
7990 tests to fail if insertion sequence is at end of message string.
7991 * opt.ads: Minor comment fixes and additions.
7992 * sem_ch7.adb, sem_ch8.adb, sem_ch9.adb, sem_ch10.adb, sem_ch11.adb,
7993 sem_ch12.adb, sem_ch13.adb: Add tags to warning messages.
7994 * sem_ch6.ads, sem_ch6.adb (Cannot_Inline): Deal with warning message
7995 tags. Add tags to warning messages.
7997 2013-01-02 Robert Dewar <dewar@adacore.com>
7999 * err_vars.ads (Warning_Doc_Switch): New flag.
8000 * errout.adb (Error_Msg_Internal): Implement new warning flag
8001 doc tag stuff (Set_Msg_Insertion_Warning): New procedure.
8002 * errout.ads: Document new insertion sequences ?? ?x? ?.x?
8003 * erroutc.adb (Output_Msg_Text): Handle ?? and ?x? warning doc
8005 * erroutc.ads (Warning_Msg_Char): New variable.
8006 (Warn_Chr): New field in error message object.
8007 * errutil.adb (Error_Msg): Set Warn_Chr in error message object.
8008 * sem_ch13.adb: Minor reformatting.
8009 * warnsw.adb: Add handling for -gnatw.d and -gnatw.D
8010 (Warning_Doc_Switch).
8011 * warnsw.ads: Add handling of -gnatw.d/.D switches (warning
8014 2013-01-02 Robert Dewar <dewar@adacore.com>
8016 * opt.ads: Minor reformatting.
8018 2013-01-02 Doug Rupp <rupp@adacore.com>
8020 * init.c: Reorganize VMS section.
8021 (scan_condtions): New function for scanning condition tables.
8022 (__gnat_handle_vms_condtion): Use actual exception name for imported
8023 exceptions vice IMPORTED_EXCEPTION.
8024 Move condition table scanning into separate function. Move formerly
8025 special handled conditions to system condition table. Use SYS$PUTMSG
8026 output to fill exception message field for formally special handled
8027 condtions, in particular HPARITH to provide more clues about cause and
8028 location then raised from the translated image.
8030 2013-01-02 Thomas Quinot <quinot@adacore.com>
8032 * sem_ch13.adb (Analyze_Aspect_Specifications): For a Pre/Post
8033 aspect that applies to a library subprogram, prepend corresponding
8034 pragma to the Pragmas_After list, in order for split AND THEN
8035 sections to be processed in the expected order.
8037 2013-01-02 Thomas Quinot <quinot@adacore.com>
8039 * exp_prag.adb (Expand_Pragma_Check): The statements generated
8040 for the pragma must have the sloc of the pragma, not the
8041 sloc of the condition, otherwise this creates anomalies in the
8042 generated debug information that confuse coverage analysis tools.
8044 2013-01-02 Thomas Quinot <quinot@adacore.com>
8046 * sem_ch13.adb: Minor reformatting.
8048 2013-01-02 Arnaud Charlet <charlet@adacore.com>
8050 * g-excact.ads (Core_Dump): Clarify that this subprogram does
8051 not dump cores under Windows.
8053 2013-01-02 Ed Schonberg <schonberg@adacore.com>
8055 * sem_ch8.adb (Analyze_Primitive_Renamed_Operation): The prefixed
8056 view of a subprogram has convention Intrnnsic, and a renaming
8057 of a prefixed view cannot be the prefix of an Access attribute.
8059 2013-01-02 Robert Dewar <dewar@adacore.com>
8061 * restrict.adb: Minor reformatting.
8063 2013-01-02 Thomas Quinot <quinot@adacore.com>
8065 * exp_prag.adb: Minor reformatting.
8067 2013-01-02 Ed Schonberg <schonberg@adacore.com>
8069 * sem_ch12.adb (Get_Associated_Node): If the node is an
8070 identifier that denotes an unconstrained array in an object
8071 declaration, it is rewritten as the name of an anonymous
8072 subtype whose bounds are given by the initial expression in the
8073 declaration. When checking whether that identifier is global
8074 reference, use the original node, not the local generated subtype.
8076 2013-01-02 Olivier Hainque <hainque@adacore.com>
8078 * tracebak.c: Revert previous change, incomplete.
8080 2013-01-02 Ed Schonberg <schonberg@adacore.com>
8082 * sem_ch13.adb (Analyze_Aspect_Specifications): If the aspect
8083 appears on a subprogram body that acts as a spec, place the
8084 corresponding pragma in the declarations of the body, so that
8085 e.g. pre/postcondition checks can be generated appropriately.
8087 2013-01-02 Robert Dewar <dewar@adacore.com>
8089 * sem_ch3.adb: Minor reformatting and code reorganization.
8091 2013-01-02 Vincent Celier <celier@adacore.com>
8093 * switch-m.adb (Normalize_Compiler_Switches): Record the
8094 complete switch -fstack-check=specific instead of its shorter
8095 alias -fstack-check.
8097 2013-01-02 Ed Schonberg <schonberg@adacore.com>
8099 * sem_ch3.adb (Derive_Subprogram): Enforce RM 6.3.1 (8):
8100 if the derived type is a tagged generic formal type with
8101 unknown discriminants, the inherited operation has convention
8102 Intrinsic. As such, the 'Access attribute cannot be applied to it.
8104 2013-01-02 Thomas Quinot <quinot@adacore.com>
8106 * sem_attr.adb: Minor reformatting.
8108 2013-01-02 Thomas Quinot <quinot@adacore.com>
8110 * par_sco.adb: Add SCO generation for S of protected types and
8111 single protected object declarations.
8113 2013-01-02 Robert Dewar <dewar@adacore.com>
8115 * sem_eval.adb, osint.ads: Minor reformatting.
8117 2013-01-02 Hristian Kirtchev <kirtchev@adacore.com>
8119 * sem_prag.adb (Analyze_Pragma): Check the legality of pragma Assume.
8121 2013-01-02 Thomas Quinot <quinot@adacore.com>
8123 * sem_eval.adb (Compile_Time_Compare): For static operands, we
8124 can perform a compile time comparison even if in preanalysis mode.
8126 2013-01-02 Thomas Quinot <quinot@adacore.com>
8128 * par_sco.adb (SCO_Record): Always use
8129 Traverse_Declarations_Or_Statements to process the library level
8130 declaration, so that SCOs are properly generated for its aspects.
8132 2013-01-02 Thomas Quinot <quinot@adacore.com>
8134 * scos.ads (In_Decision): Add missing entry for 'a'.
8135 * sem_prag.adb (Analyze_Pragma, case pragma Check): Omit
8136 call to Set_SCO_Pragma_Enabled for Invariant and Predicate.
8137 * sem_ch13.adb: Minor comment update.
8139 Copyright (C) 2013 Free Software Foundation, Inc.
8141 Copying and distribution of this file, with or without modification,
8142 are permitted in any medium without royalty provided the copyright
8143 notice and this notice are preserved.