1 2013-11-23 Eric Botcazou <ebotcazou@adacore.com>
3 * gcc-interface/trans.c (Loop_Statement_to_gnu): Set TREE_SIDE_EFFECTS
4 on the conditional expression directly.
6 2013-11-22 Andrew MacLeod <amacleod@redhat.com>
8 * gcc-interface/trans.c: Add required include files from gimple.h.
10 2013-11-22 David Malcolm <dmalcolm@redhat.com>
12 * gcc-interface/utils2.c (build_call_raise): Remove use of
14 (build_call_raise_range): Likewise.
15 (build_call_raise_column): Likewise.
17 2013-11-20 Kenneth Zadeck <zadeck@naturalbridge.com>
18 Mike Stump <mikestump@comcast.net>
19 Richard Sandiford <rdsandiford@googlemail.com>
21 * gcc-interface/cuintp.c (UI_From_gnu): Use tree_to_shwi.
22 * gcc-interface/decl.c (gnat_to_gnu_entity): Use tree_to_uhwi.
23 * gcc-interface/utils.c (make_packable_type): Likewise.
25 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
27 * gcc-interface/cuintp.c (UI_From_gnu): Use tree_to_shwi rather than
30 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
32 * gcc-interface/decl.c, gcc-interface/utils.c, gcc-interface/utils2.c:
33 Replace tree_low_cst (..., 1) with tree_to_uhwi throughout.
35 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
37 * gcc-interface/cuintp.c: Update comments to refer to
38 tree_fits_shwi_p rather than host_integerp.
39 * gcc-interface/decl.c (gnat_to_gnu_entity): Use tree_fits_uhwi_p
40 rather than host_integerp.
41 * gcc-interface/utils.c (rest_of_record_type_compilation): Likewise.
43 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
45 * gcc-interface/decl.c, gcc-interface/misc.c, gcc-interface/utils.c:
46 Replace host_integerp (..., 1) with tree_fits_uhwi_p throughout.
48 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
50 * gcc-interface/cuintp.c: Replace host_integerp (..., 0) with
51 tree_fits_shwi_p throughout.
53 2013-11-18 Eric Botcazou <ebotcazou@adacore.com>
55 * gcc-interface/trans.c (TARGET_ABI_OPEN_VMS): Delete as redundant.
57 2013-11-18 Eric Botcazou <ebotcazou@adacore.com>
59 * gcc-interface/trans.c (Call_to_gnu): For an Out parameter passed by
60 copy and that don't need to be copied in, only evaluate its address.
62 2013-11-18 Eric Botcazou <ebotcazou@adacore.com>
64 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Deal with an
65 error mark as renamed object in type annotating mode.
67 2013-11-15 H.J. Lu <hongjiu.lu@intel.com>
70 * s-linux-x32.ads: New file.
71 * s-osprim-x32.adb: Likewise.
72 * s-linux.ads (time_t): New type.
73 * s-linux-alpha.ads (time_t): Likewise.
74 * s-linux-hppa.ads (time_t): Likewise.
75 * s-linux-mipsel.ads (time_t): Likewise.
76 * s-linux-sparc.ads (time_t): Likewise.
77 * s-osinte-linux.ads (time_t): Mark it private. Replace long
78 with System.Linux.time_t.
79 (timespec): Replace long with time_t.
80 * s-osinte-posix.adb (To_Timespec): Likewise.
81 * s-taprop-linux.adb (timeval): Replace C.long with
82 System.OS_Interface.time_t.
83 * gcc-interface/Makefile.in (LIBGNAT_TARGET_PAIRS): Replace
84 s-linux.ads with s-linux-x32.ads, s-osprim-posix.adb with
85 s-osprim-x32.adb for x32.
87 2013-11-14 H.J. Lu <hongjiu.lu@intel.com>
89 * gcc-interface/trans.c: Include gimple.h and pointer-set.h.
91 2013-11-14 Diego Novillo <dnovillo@google.com>
93 * gcc-interface/decl.c: Include stringpool.h
95 * gcc-interface/misc.c: Include stor-layout.h
97 * gcc-interface/trans.c: Include stringpool.h
101 * gcc-interface/utils.c: Include stringpool.h
102 Include stor-layout.h
105 * gcc-interface/utils2.c: Include stringpool.h
106 Include stor-layout.h
110 2013-11-12 Andrew MacLeod <amacleod@redhat.com>
112 * gcc-interface/trans.c: Include gimplify.h.
114 2013-11-11 Tristan Gingold <gingold@adacore.com>
115 Eric Botcazou <ebotcazou@adacore.com>
117 * gcc-interface/utils2.c (gnat_build_constructor): Also set the flag
118 CONSTRUCTOR_NO_CLEARING on the constructor.
120 2013-10-30 Sharad Singhai <singhai@google.com>
122 * gnat_ugn.texi: Remove option description for PR middle-end/58134.
124 2013-10-29 David Malcolm <dmalcolm@redhat.com>
126 * gcc-interface/trans.c (finalize_nrv): Update for conversion of
127 symtab types to a true class hierarchy.
128 * gcc-interface/utils.c (gnat_write_global_declarations): Likewise.
130 2013-10-28 Trevor Saunders <tsaunders@mozilla.com>
132 * gcc-interface/decl.c (components_to_record): Adjust stack vector.
134 2013-10-24 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
136 * gcc-interface/Make-lang.in (ADA_DEPS): Fix quoting.
138 2013-10-19 Thomas Quinot <quinot@adacore.com>
140 * gcc-interface/Makefile.in: Use canonical absolute path to refer to
141 the top source directory and to the libgcc subidrectories.
143 2013-10-19 Eric Botcazou <ebotcazou@adacore.com>
145 * gcc-interface/utils.c (scale_by_factor_of): New function.
146 (rest_of_record_type_compilation): Use scale_by_factor_of in order to
147 scale the original offset for both rounding cases; in the second case,
148 take into accout the addend to compute the alignment. Tidy up.
150 2013-10-19 Eric Botcazou <ebotcazou@adacore.com>
152 * gcc-interface/cuintp.c: Remove useless include directives.
153 (build_cst_from_int): Use standard predicate.
154 (UI_To_gnu): Simplify.
155 (UI_From_gnu): Fix formatting.
156 * gcc-interface/trans.c (post_error): Likewise.
157 (post_error_ne): Likewise.
159 2013-10-19 Eric Botcazou <ebotcazou@adacore.com>
161 * gcc-interface/utils.c (gnat_set_type_context): New function.
162 (gnat_pushdecl): Use it to set the context of the type.
164 2013-10-17 Hristian Kirtchev <kirtchev@adacore.com>
166 * sem_prag.adb (Check_Dependency_Clause):
167 Recognize the scenario where successful clause matching has
168 depleted the available refinement items and the clause to match
169 technically refines to null => null.
171 2013-10-17 Tristan Gingold <gingold@adacore.com>
173 * exp_prag.adb (Expand_Pragma_Import_Or_Interface): Specify
174 External_Name instead of Link_Name for the RTTI declaration.
176 2013-10-17 Robert Dewar <dewar@adacore.com>
178 * sem_prag.adb (Record_Possible_Body_Reference): Fix test for
180 (Add_Constituent): Merged into Check_Refined_Global_Item.
181 (Check_Matching_Constituent): A constituent that has the proper Part_Of
182 option and comes from a private child or a sibling is now collected.
183 (Check_Matching_Modes): Merged into Check_Refined_Global_Item.
184 (Check_Refined_Global_Item): Code cleanup.
185 (Collect_Constituent): New routine.
186 (Inconsistent_Mode_Error): Moved out from Check_Matching_Modes.
188 2013-10-17 Ed Schonberg <schonberg@adacore.com>
190 * freeze.adb (Check_Current_Instance, Process): Add RM reference
191 and mention immutably limited types, when the current instance
192 is illegal in Ada 2012.
194 2013-10-17 Ed Schonberg <schonberg@adacore.com>
196 * sem_warn.adb (Check_Unused_Withs): If the main unit is a
197 subunit, apply the check to the units mentioned in its context
198 only. This provides additional warnings on with_clauses that
201 2013-10-17 Hristian Kirtchev <kirtchev@adacore.com>
203 * sem_ch3.adb (Analyze_Declarations): Emit an
204 error message concerning state refinement when the spec defines at
205 least one non-null abstract state and the body's SPARK mode is On.
206 (Requires_State_Refinement): New routine.
208 2013-10-17 Robert Dewar <dewar@adacore.com>
210 * sem_ch7.ads: Comment fixes.
212 2013-10-17 Robert Dewar <dewar@adacore.com>
214 * sem_ch7.adb (Analyze_Package_Specification): Remove circuit
215 for ensuring that a package spec requires a body for some other
216 reason than that it contains the declaration of an abstract state.
218 2013-10-17 Tristan Gingold <gingold@adacore.com>
220 * exp_ch11.adb (Expand_N_Raise_Expression): Fix call of
221 Possible_Local_Raise.
223 2013-10-17 Thomas Quinot <quinot@adacore.com>
225 * exp_pakd.adb (Expand_Bit_Packed_Element_Set): Unchecked
226 conversion of Or_Rhs to Etype of New_Rhs is required only when
227 the latter is the result of a byte swap operation.
229 2013-10-17 Thomas Quinot <quinot@adacore.com>
231 * exp_dist.adb (Build_To_Any_Function): For a type with opaque
232 representation that is not transmitted as an unconstrained value,
233 use 'Write, not 'Output, to generate the opaque representation.
235 2013-10-17 Yannick Moy <moy@adacore.com>
237 * sem_res.adb (Resolve_Short_Circuit): Only
238 generate expression-with-action when full expansion is set.
240 2013-10-17 Yannick Moy <moy@adacore.com>
242 * debug.adb Remove obsolete comment.
244 2013-10-17 Thomas Quinot <quinot@adacore.com>
246 * exp_ch4.adb (Process_Transient_Object.Find_Enclosing_Contexts):
247 Avoid late insertion when expanding an expression with action
248 nested within a transient block; Do not inconditionally generate
249 a finalization call if the generated object is from a specific
250 branch of a conditional expression.
252 2013-10-17 Pascal Obry <obry@adacore.com>
254 * g-arrspl.adb: Ensure Finalize call is idempotent.
255 * g-arrspl.adb (Finalize): Makes the call idempotent.
257 2013-10-17 Hristian Kirtchev <kirtchev@adacore.com>
259 * sem_prag.adb (Is_Matching_Input): Account
260 for the case where a state with a null refinement appears as
261 the last input of a refinement clause.
263 2013-10-17 Robert Dewar <dewar@adacore.com>
265 * sem_aux.ads, sem_aux.adb: Minor reformatting.
267 2013-10-17 Hristian Kirtchev <kirtchev@adacore.com>
269 * aspects.adb, aspects.ads, sem_prag.ads: Remove all entries
270 for Refined_Pre from the various tables.
271 * par-prag.adb: Remove the entry for Refined_Pre from the list
272 of pragmas not needing special processing by the parser.
273 * sem_ch13.adb (Analyze_Aspect_Specifications):
274 Remove the processing for aspect Refined_Pre.
275 (Check_Aspect_At_Freeze_Point): Remove the entry for aspect
277 * sem_prag.adb (Analyze_Pragma): Refined_Pre is no longer a
278 valid assertion kind. Remove the analysis of pragma Refined_Pre.
279 (Analyze_Refined_Pragma): Update the comment on usage.
280 (Find_Related_Subprogram_Or_Body): Update the comment on
281 usage. Pragma Refined_Pre is no longer processed by this routine.
282 (Is_Valid_Assertion_Kind): Refined_Pre is no longer a valid
284 * snames.ads-tmpl: Remove predefined name Refined_Pre. Remove
285 the pragma id for Refined_Pre.
287 2013-10-17 Hristian Kirtchev <kirtchev@adacore.com>
289 * exp_util.adb, exp_util.ads (Entity_Of): Moved to Sem_Util.
290 * sem_prag.adb (Analyze_Global_In_Decl_List): Mark a null
291 item list as being analyzed.
292 (Analyze_Global_List): Mark a
293 null global list and multiple global items as being analyzed.
294 (Analyze_Input_Item): Check the unit that defines the input
295 variable or state, not the reference to it.
296 * sem_util.ads, sem_util.adb (Entity_Of): Moved from Exp_Util. Ensure
297 that the input has an entity.
299 2013-10-17 Thomas Quinot <quinot@adacore.com>
301 * exp_util.adb (Get_Current_Value_Condition,
302 Set_Current_Value_Condition): Handle the case of expressions
303 with actions * exp_util.adb (Insert_Actions): Handle the case
304 of an expression with actions whose Actions list is empty.
305 * exp_util.adb (Remove_Side_Effects.Side_Effect_Free): An
306 expression with actions that has no Actions and whose Expression
307 is side effect free is itself side effect free.
308 * exp_util.adb (Remove_Side_Effects): Do not set an incorrect etype on
309 temporary 'R' (Def_Id), which is in general an access to Exp_Type, not
311 * sem_res.adb (Resolve): For an expression with
312 actions, resolve the expression early. * sem_res.adb
313 (Resolve_Expression_With_Actions): Rewrite an expression with
314 actions whose value is compile time known and which has no
315 actions into just its expression, so that its constant value is
316 available downstream.
317 * sem_res.adb (Resolve_Short_Circuit):
318 Wrap the left operand in an expression with actions to contain
319 any required finalization actions.
320 * exp_ch4.adb (Expand_Expression_With_Actions): For an
321 expression with actions returning a Boolean expression, ensure
322 any finalization action is kept within the Actions list.
323 * sem_warn.adb (Check_References, Check_Unset_Reference): add
324 missing circuitry to handle expressions with actions.
325 * checks.adb (Ensure_Valid): For an expression with actions,
326 insert the validity check on the Expression.
327 * sem_ch13.adb (Build_Static_Predicate.Get_RList): An expression
328 with actions that has a non-empty Actions list is not static. An
329 expression with actions that has an empty Actions list has the
330 static ranges of its Expression.
331 * sem_util.adb (Has_No_Obvious_Side_Effects): An expression with
332 actions with an empty Actions list has no obvious side effects
333 if its Expression itsekf has no obvious side effects.
335 2013-10-17 Ed Schonberg <schonberg@adacore.com>
337 * sem_aux.ads, sem_aux.adb (Is_Immutably_Limited_Type): Make
338 predicate compatible with Ada 2012 definition
339 (Is_Limited_View): New name for previous version of
340 Is_Immutably_Limited_Type. Predicate is true for an untagged
341 record type with a limited component.
342 * exp_ch7.adb, exp_ch6.adb, exp_ch4.adb, exp_ch3.adb, exp_aggr.adb,
343 sem_util.adb, sem_res.adb, sem_prag.adb, sem_attr.adb, sem_ch8.adb,
344 sem_ch6.adb, sem_ch3.adb, exp_util.adb: Use Is_Limited_View
345 * freeze.adb Use Is_Immutably_Limited_Type to check the legality
346 of references to the current instance, Is_Limited_View otherwise.
348 2013-10-17 Hristian Kirtchev <kirtchev@adacore.com>
350 * sem_ch13.adb (Analyze_Aspect_Specifications): Flag aspect
351 Refined_Pre as not supported.
352 * sem_prag.adb (Analyze_Pragma): Ignore pragma Refined_Pre.
354 2013-10-17 Ed Schonberg <schonberg@adacore.com>
356 * sem_ch12.adb (Validated_Access_Subprogram_Instance): According
357 to AI05-288, actuals for access_to_subprograms must be subtype
358 conformant with the generic formal. Previous to AI05-288
359 only mode conformance was required, but the AI is a binding
360 interpretation that applies to previous versions of the language,
362 2013-10-17 Robert Dewar <dewar@adacore.com>
364 * gnat_ugn.texi: Minor text correction.
365 * ug_words: Add entry for -gnateu /IGNORE_UNRECOGNIZED.
366 * vms_data.ads: Add /IGNORE_UNRECOGNIZED for -gnateu.
368 2013-10-17 Tristan Gingold <gingold@adacore.com>
370 * impunit.adb (Non_Imp_File_Names_95): Add g-cppexc.
372 2013-10-17 Hristian Kirtchev <kirtchev@adacore.com>
374 * sem_prag.adb (Analyze_Constituent): Move the check
375 concerning option Part_Of to routine Check_Matching_Constituent.
376 (Check_Matching_Constituent): Verify that an abstract state
377 that acts as a constituent has the proper Part_Of option in
378 its aspect/pragma Abstract_State. Account for the case when a
379 constituent comes from a private child or private sibling.
380 * sem_util.ads, sem_util.adb (Is_Child_Or_Sibling): New routine.
382 2013-10-17 Tristan Gingold <gingold@adacore.com>
384 * g-cppexc.adb, g-cppexc.ads: New files.
385 * gcc-interface/Makefile.in: Add g-cppexc when building zcx runtimes.
387 2013-10-17 Thomas Quinot <quinot@adacore.com>
389 * exp_ch7.adb: Minor reformatting.
391 2013-10-17 Ed Schonberg <schonberg@adacore.com>
393 * sem_dim.adb (Process_Minus, Process_Divide): Label dimension
394 expression with standard operator and type, for pretty-printing
397 2013-10-17 Bob Duff <duff@adacore.com>
399 * gnat_ugn.texi: Document --pp-new and --pp-old switches.
401 2013-10-17 Hristian Kirtchev <kirtchev@adacore.com>
403 * einfo.adb: Flag 159 is now known as From_Limited_With. Replace
404 all references to attribute From_With_Type with From_Limited_With.
405 (From_With_Type): Renamed to From_Limited_With.
406 (Set_From_With_Type): Renamd to Set_From_Limited_With.
407 * einfo.ads: Remove attribute From_With_Type and occurrences in
408 nodes. Add attribute From_Limited_With along with occurrences
410 (From_With_Type): Renamed to From_Limited_With along with pragma Inline.
411 (Set_From_With_Type): Renamed to
412 Set_From_Limited_With along with pragma Inline.
413 * sem_ch7.adb, sem_ch8.adb, sem_ch12.adb, sem_ch13.adb, sem_disp.adb,
414 sem_res.adb, sem_type.adb, sem_util.adb, sem_warn.adb,
415 exp_attr.adb, exp_disp.adb, freeze.adb, itypes.adb, layout.adb,
416 lib-writ.adb, rtsfind.adb, sem_attr.adb, sem_aux.adb, sem_ch3.adb,
417 sem_ch4.adb: Replace all references to attribute From_With_Type
418 with From_Limited_With.
419 * sem_ch6.adb: Replace all references to attribute From_With_Type
420 with From_Limited_With.
421 (Designates_From_With_Type): Renamed to Designates_From_Limited_With.
422 (Process_Formals): Update the call to Designates_From_With_Type.
423 * sem_ch10.adb: Replace all references to attribute From_With_Type
424 with From_Limited_With.
425 (Build_Limited_Views): Reimplemented.
426 * gcc-interface/decl.c Replace all references to attribute
427 From_With_Type with From_Limited_With.
428 (finalize_from_with_types): Renamed to finalize_from_limited_with.
429 * gcc-interface/gigi.h (finalize_from_with_types): Renamed to
430 finalize_from_limited_with.
431 * gcc-interface/trans.c: Replace all references to attribute
432 From_With_Type with From_Limited_With.
433 (Compilation_Unit_to_gnu): Update the call to finalize_from_with_types.
435 2013-10-17 Pascal Obry <obry@adacore.com>
437 * projects.texi: Update VCS_Kind documentation.
439 2013-10-17 Matthew Heaney <heaney@adacore.com>
441 * a-convec.adb, a-coinve.adb, a-cobove.adb (Insert, Insert_Space):
442 Inspect value range before converting type.
444 2013-10-17 Hristian Kirtchev <kirtchev@adacore.com>
446 * sem_prag.adb (Analyze_Pragma): Flag the use of pragma Refined_Pre as
449 2013-10-17 Vincent Celier <celier@adacore.com>
451 * gnat_ugn.texi: Remove VMS conversion of -gnatet and -gnateT,
452 now that they are both in ug_words.
453 * ug_words: Update qualifier for -gnatet Add qualifier for -gnateT
454 * vms_data.ads: Update qualifier for -gnatet Add qualifier
456 * projects.texi: Continue to update the project documentation
459 2013-10-17 Robert Dewar <dewar@adacore.com>
461 * einfo.ads, einfo.adb (Has_Body_References): New flag.
462 (Body_References): New field.
463 * sem_prag.adb (Record_Possible_Body_Reference): New procedure
464 (Analyze_Input_Output): Call Record_Possible_Body_Reference
465 (Analyze_Global_Item): Call Record_Possible_Body_Reference
466 (Analyze_Refinement_Clause): Output messages if illegal global refs.
468 2013-10-17 Thomas Quinot <quinot@adacore.com>
470 * freeze.adb (Check_Component_Storage_Order): Reject a record or
471 array type that does not have an explicit Scalar_Storage_Order
472 attribute definition if a component of the record, or the
473 elements of the array, have one.
474 * gnat_rm.texi (attribute Scalar_Storage_Order): Document the above
477 2013-10-17 Vincent Celier <celier@adacore.com>
479 * gnat_ugn.texi: Add examples of switches -gnateD, including
480 one where the value is a string.
481 * projects.texi: Do not convert switches in project files to
484 2013-10-17 Robert Dewar <dewar@adacore.com>
486 * sem_prag.adb (Report_Extra_Clauses): Don't complain about
487 refinements with null input since null should be considered to
490 2013-10-17 Robert Dewar <dewar@adacore.com>
492 * gnat_ugn.texi: Document -gnatw.y/-gnatw.Y.
493 * opt.ads (List_Body_Required_Info): New flag.
494 * prep.adb: Minor reformatting.
495 * sem_ch7.adb (Unit_Requires_Body_Info): New
496 procedure (Analyze_Package_Specification): Add call to
497 Unit_Requires_Body_Info.
498 * ug_words: Add entries for -gnatw.y and -gnatw.Y.
499 * usage.adb: Add line for new warning switch -gnatw.y/.Y.
500 * vms_data.ads: Add entry for [NO_]WHY_SPEC_NEEDS_BODY warning
502 * warnsw.ads, warnsw.adb: Implement new warning switch -gnatw.y/.Y.
504 2013-10-17 Yannick Moy <moy@adacore.com>
506 * sem_ch8.adb (Find_Direct_Name): Keep track of assignments for
507 renamings in SPARK mode.
509 2013-10-17 Yannick Moy <moy@adacore.com>
511 * exp_spark.adb (Expand_SPARK): Remove special case for NOT IN
513 * sinfo.ads: Add special comment section to describe SPARK mode
515 * exp_spark.ads: Remove comments, moved to sinfo.ads.
517 2013-10-17 Yannick Moy <moy@adacore.com>
519 * exp_ch3.adb (Expand_Freeze_Class_Wide_Type,
520 Expand_Freeze_Class_Wide_Type, Expand_Freeze_Class_Wide_Type):
521 Remove useless special cases.
522 * exp_ch4.adb (Expand_Allocator_Expression, Expand_N_Allocator,
523 Expand_N_Op_Expon): Remove useless special cases.
524 * exp_ch6.adb (Is_Build_In_Place_Function_Call): Disable build-in-place
525 in SPARK mode by testing Full_Expander_Active instead of
527 (Make_Build_In_Place_Call_In_Allocator): Remove useless special case.
528 * exp_util.adb (Build_Allocate_Deallocate_Proc): Remove
529 useless special case.
530 * sem_eval.adb (Compile_Time_Known_Value): Remove special handling of
533 2013-10-17 Yannick Moy <moy@adacore.com>
535 * gnat_ugn.texi: Document -gnateT and target file format.
537 2013-10-17 Vincent Celier <celier@adacore.com>
539 * prep.adb (Check_Command_Line_Symbol_Definition): Is_A_String is
540 always False, even when the value starts and ends with double quotes.
542 2013-10-17 Tristan Gingold <gingold@adacore.com>
544 * a-exexpr-gcc.adb: Synchronize declarations of other/all others.
546 2013-10-17 Thomas Quinot <quinot@adacore.com>
548 * exp_pakd.adb: Add missing guard protecting Reverse_Storage_Order
550 * sem_res.adb: Minor code cleanup: use named parameter association
551 (not positional) for Boolean parameter Sec_Stack in calls to
552 Establish_Transient_Scope.
554 2013-10-15 Thomas Quinot <quinot@adacore.com>
556 * exp_pakd.adb (Expand_Packed_Element_Set,
557 Expand_Packed_Element_Reference): Adjust for the case of packed
558 arrays of reverse-storage-order types.
560 2013-10-15 Robert Dewar <dewar@adacore.com>
562 * sem_prag.adb: Minor reformatting.
564 2013-10-15 Ed Schonberg <schonberg@adacore.com>
566 * sem_attr.adb (Analyze_Attribute_Specification, case
567 To_Address): If the expression is an identifier, do not modify
568 its type; it will be converted when necessary, and the type of
569 the expression must remain consistent with that of the entity
570 for back-end consistency.
572 2013-10-15 Robert Dewar <dewar@adacore.com>
574 * sem_ch7.adb (Unit_Requires_Body): Add flag
575 Ignore_Abstract_State (Analyze_Package_Specification): Enforce
576 rule requiring Elaborate_Body if a non-null abstract state is
577 specified for a library-level package.
578 * sem_ch7.ads (Unit_Requires_Body): Add flag Ignore_Abstract_State.
580 2013-10-15 Hristian Kirtchev <kirtchev@adacore.com>
582 * sem_prag.adb (Analyze_Constituent): When
583 a state acts as a constituent of another state, ensure that
584 the said state has a Part_Of dependency in its corresponding
585 aspect/pragma Abstract_State.
587 2013-10-15 Robert Dewar <dewar@adacore.com>
589 * par-ch4.adb (P_If_expression): Handle redundant ELSE cleanly.
591 2013-10-15 Thomas Quinot <quinot@adacore.com>
593 * atree.ads (New_Copy, Relocate_Node): Improve documentation
594 (note that these subprograms reset Is_Overloaded).
596 2013-10-15 Thomas Quinot <quinot@adacore.com>
598 * checks.adb (Check_Needed): Handle the case where the test in
599 the left operand of the short circuit is wrapped in a qualified
600 expression, type conversion, or expression with actions.
602 2013-10-15 Thomas Quinot <quinot@adacore.com>
604 * sem_type.adb, sem_type.ads (Save_Interps): Also propagate
605 Is_Overloaded to New_N, for consistency.
607 2013-10-15 Ed Schonberg <schonberg@adacore.com>
609 * a-tienau.adb (Put): Use file parameter to query values of
610 current column and line length.
612 2013-10-15 Robert Dewar <dewar@adacore.com>
614 * sem_prag.adb, exp_ch11.adb, a-except-2005.adb, a-except-2005.ads:
617 2013-10-15 Eric Botcazou <ebotcazou@adacore.com>
619 * targparm.ads: Fix minor typo in comment.
621 2013-10-15 Ed Schonberg <schonberg@adacore.com>
623 * lib-xref.adb: handle full views that are derived from private
625 * sem_util.adb (Build_Elaboration_Entity): Do nothing in ASIS
626 mode: the elaboration entity is not in the source, and plays no
627 role in semantic analysis. Minor reformatting.
629 2013-10-15 Tristan Gingold <gingold@adacore.com>
631 * adaint.c (__gnat_get_executable_load_address): Remove AIX
634 2013-10-15 Ed Schonberg <schonberg@adacore.com>
636 * exp_aggr.adb (Aggr_Size_OK): Refine criteria to better handle
637 large static aggregates with static record components, to avoid
638 generating a large number of asignments. Conversely, improve
639 handling of aggregates initialized by a single association,
640 which are most efficiently implemented with a loop.
642 2013-10-15 Hristian Kirtchev <kirtchev@adacore.com>
644 * sem_prag.adb (Analyze_Input_Item): Emit an
645 error when the input item comes from the related package.
647 2013-10-15 Arnaud Charlet <charlet@adacore.com>
649 * exp_ch11.adb (Expand_Exception_Handlers): Restrict previous
652 2013-10-14 Tristan Gingold <gingold@adacore.com>
654 * gcc-interface/gigi.h (standard_datatypes): Add
655 ADT_set_exception_parameter_decl
656 (set_exception_parameter_decl): New macro.
657 * gcc-interface/trans.c (gigi): Initialize set_exception_parameter_decl.
658 (Exception_Handler_to_gnu_zcx): Initialize the choice parameter.
659 * gcc-interface/trans.c: Synchronize declarations of other/all others
660 between gigi and the runtime.
662 2013-10-14 Robert Dewar <dewar@adacore.com>
664 * exp_attr.adb (Find_Stream_Subprogram): Optimize
665 Storage_Array stream handling.
666 (Find_Stream_Subprogram): Optimize Stream_Element_Array stream handling
667 * rtsfind.ads: Add entry for Stream_Element_Array Add
668 entries for RE_Storage_Array subprograms Add entries for
669 RE_Stream_Element_Array subprograms
670 * s-ststop.ads, s-ststop.adb: Add processing for System.Storage_Array.
671 Add processing for Ada.Stream_Element_Array.
673 2013-10-14 Tristan Gingold <gingold@adacore.com>
675 * a-except-2005.ads, a-except-2005.adb:
676 (Get_Exception_Machine_Occurrence): New function.
677 * raise-gcc.c (__gnat_unwind_exception_size): New constant.
679 2013-10-14 Robert Dewar <dewar@adacore.com>
681 * sem_res.adb: Minor fix to error message text.
682 * errout.ads, erroutc.ads: Minor reformatting.
683 * s-ststop.ads, s-stratt.ads: Clean up documentation of block IO
685 * s-stratt-xdr.adb: Minor comment update.
687 2013-10-14 Robert Dewar <dewar@adacore.com>
689 * sem_aux.adb, sem_aux.ads, sem_prag.adb: Minor reformatting.
691 2013-10-14 Ed Schonberg <schonberg@adacore.com>
693 * sem_res.adb (Resolve_Actuals): Add error message for a
694 subprogram with an in-out parameter when used in a predicate,
695 to clarify subsequent error at the point of call.
697 2013-10-14 Hristian Kirtchev <kirtchev@adacore.com>
699 * sem_prag.adb (Is_Matching_Input): Consume a matching null input.
701 2013-10-14 Robert Dewar <dewar@adacore.com>
703 * freeze.adb (Freeze_Record): Don't give warning about packed
704 and foreign convention.
706 2013-10-14 Ed Schonberg <schonberg@adacore.com>
708 * sem_aux.adb, sem_aux.ads (Package_Specification): New function, to
709 replace the less efficient idiom Specification.
710 (Unit_Declaration_Node (Pack_Id)), which handles library units and
712 * sem_ch3.adb, sem_ch10.adb, sem_prag.adb, sem_ch12.adb, sem_ch6.adb,
713 exp_disp.adb, sem_cat.adb, exp_dist.adb: Use Package_Specification.
715 2013-10-14 Hristian Kirtchev <kirtchev@adacore.com>
717 * exp_attr.adb (Expand_Update_Attribute): Update the call to
718 Process_Range_Update.
719 (Process_Range_Update): Add new formal parameter Typ and associated
720 comment on usage. Add local constant Index_Typ. Add a type conversion
721 as part of the indexed component to ensure that the loop variable
722 corresponds to the index type.
724 2013-10-14 Tristan Gingold <gingold@adacore.com>
726 * a-exexpr-gcc.adb: Adjust comment.
727 (Others_Value, All_Others_Value,
728 Unhandled_Others_Value): Declare as Character to slightly reduce
731 2013-10-14 Robert Dewar <dewar@adacore.com>
733 * freeze.adb (Size_Known): Size is not known for packed record
734 with aliased components
736 2013-10-14 Robert Dewar <dewar@adacore.com>
738 * sem_ch3.adb: Minor fix to error message.
739 * a-exexpr-gcc.adb, sem_util.adb, sem_case.adb, exp_ch11.adb: Minor
742 2013-10-14 Arnaud Charlet <charlet@adacore.com>
744 * exp_ch11.adb: Fix typo.
746 2013-10-14 Thomas Quinot <quinot@adacore.com>
748 * exp_util.ads: Minor reformatting.
750 2013-10-14 Ed Schonberg <schonberg@adacore.com>
752 * sem_ch3.adb (Build_Derived_Record_Type): Reject full views
753 with no explicit discriminant constraints, when the parents of
754 the partial view and the full view are constrained subtypes with
755 different constraints.
757 2013-10-14 Robert Dewar <dewar@adacore.com>
759 * freeze.adb (Freeze_Array_Type): New procedure, abstracts out
760 this code from Freeze.
761 (Freeze_Array_Type): Detect pragma Pack overriding foreign convention
762 (Freeze_Record_Type): Ditto.
764 2013-10-14 Hristian Kirtchev <kirtchev@adacore.com>
766 * sem_prag.adb (Analyze_Dependency_Clause): Add new local variable
767 Non_Null_Output_Seen. Update the call to Analyze_Input_Output.
768 (Analyze_Input_Item): Streamline the detection mechanism of null and
770 (Analyze_Input_List): Add new local variable
771 Non_Null_Input_Seen. Update all calls to Analyze_Input_Output.
772 (Analyze_Input_Output): Add new formal parameter Non_Null_Seen
773 and update the related comment on usage. Update the
774 recursive call to itself. Attribute 'Result is now treated
775 as a non-null item. Detect mixes of null and non-null items.
776 (Analyze_Initialization_Item): Streamline the detection mechanism
777 of null and non-null items.
779 2013-10-14 Vincent Celier <celier@adacore.com>
781 * projects.texi: Add documentation for the new project level
782 attribute Library_Rpath_Options.
784 2013-10-14 Tristan Gingold <gingold@adacore.com>
786 * a-exexpr-gcc.adb (Set_Exception_Parameter): New procedure.
787 (Set_Foreign_Occurrence): New procedure, extracted from
789 * exp_ch11.adb (Expand_Exception_Handlers): Do not expand choice
790 parameter in case of zcx.
791 * sem_ch11.adb (Analyze_Exception_Handlers): Need debug info
792 for the choice parameter.
793 * raise-gcc.c: Add comments.
795 2013-10-14 Hristian Kirtchev <kirtchev@adacore.com>
797 * aspects.adb: Add an entry in table Canonical_Aspect for
799 * aspects.ads: Add entries in tables Aspect_Id, Aspect_Argument,
800 Aspect_Names and Aspect_Delay for Initial_Condition.
801 * einfo.adb (Get_Pragma): Include pragma Initial_Condition to
802 categorization pragmas.
803 * einfo.ads (Get_Pragma): Update comment on usage.
804 * exp_ch7.adb (Expand_N_Package_Body): Add a runtime check to
805 verify the assertion introduced by pragma Initial_Condition.
806 (Expand_N_Package_Declaration): Add a runtime check to
807 verify the assertion introduced by pragma Initial_Condition.
808 (Expand_Pragma_Initial_Condition): New routine.
809 * par-prag: Include pragma Initial_Condition to the list of
810 pragmas that do not require special processing by the parser.
811 * sem_ch3.adb (Analyze_Declarations): Analyze pragma
812 Initial_Condition at the end of the visible declarations.
813 * sem_ch13.adb (Analyze_Aspect_Specifications): Add processing
814 for aspect Initial_Condition.
815 (Check_Aspect_At_Freeze_Point):
816 Aspect Initial_Condition does not need inspection at freezing.
817 * sem_prag.adb (Analyze_Initial_Condition_In_Decl_Part):
819 (Analyze_Pragma): Update all calls
820 to Check_Declaration_Order. Add processing for pragma
821 Initial_Condition. Initial_Condition is now a valid assertion
822 kind. Add an entry in table Sig_Flags for Initial_Condition.
823 (Check_Declaration_Order): Reimplemented to handle arbitrary
825 (Is_Valid_Assertion_Kind): Add an entry for
827 * sem_pag.ads (Analyze_Initial_Condition_In_Decl_Part):
829 * sem_util.adb (Add_Contract_Item): Pragma Initial_Condition
830 can now be associated with a package spec.
831 * sem_util.ads (Add_Contract_Item): Update comment on usage.
832 * sinfo.ads: Update the documentation of node N_Contract
833 * snames.ads-tmpl: Add new predefined name Initial_Condition. Add
834 new pragma id for Initial_Condition.
836 2013-10-14 Thomas Quinot <quinot@adacore.com>
838 * exp_pakd.adb: Minor reformatting.
840 2013-10-14 Robert Dewar <dewar@adacore.com>
842 * exp_prag.adb: Minor reformatting.
844 2013-10-14 Ed Schonberg <schonberg@adacore.com>
846 * sem_case.adb (Check_Against_Predicate): Handle properly an
847 others clause in various cases.
849 2013-10-14 Hristian Kirtchev <kirtchev@adacore.com>
851 * sem_prag.adb (Check_Matching_Constituent): Do
852 not inspect the hidden states if there are no hidden states. This
853 case arises when the constituents are states coming from a
856 2013-10-14 Doug Rupp <rupp@adacore.com>
858 * init.c [ARMEL and VxWorks] (__gnat_map_signal): Re-arm guard
859 page by clearing VALID bit vice setting page protection.
861 2013-10-14 Arnaud Charlet <charlet@adacore.com>
863 * gnat_rm.texi, adaint.c: Fix typo.
865 2013-10-14 Ed Schonberg <schonberg@adacore.com>
867 * sem_util.adb (Is_Variable, In_Protected_Function): In the
868 body of a protected function, the protected object itself is a
869 constant (not just its components).
871 2013-10-14 Vincent Celier <celier@adacore.com>
873 * snames.ads-tmpl: Add new standard name Library_Rpath_Options.
875 2013-10-14 Tristan Gingold <gingold@adacore.com>
877 * sem_prag.adb (Process_Import_Or_Interface): Allow importing
878 of exception using convention Cpp.
879 * exp_prag.adb (Expand_Pragma_Import_Or_Interface): Expand cpp
881 * raise-gcc.c (is_handled_by): Filter C++ exception occurrences.
882 * gnat_rm.texi: Document how to import C++ exceptions.
884 2013-10-14 Jose Ruiz <ruiz@adacore.com>
886 * sem_ch13.adb (Sem_Ch13.Analyze_Aspect_Specification): For
887 Priority and CPU aspects, when checking, issue a warning only
888 if it is obviously not a main program.
890 2013-10-14 Tristan Gingold <gingold@adacore.com>
892 * adaint.c: Fix condition for AIX. Minor reformatting.
894 2013-10-14 Robert Dewar <dewar@adacore.com>
896 * sem_ch3.adb, sem_prag.adb, prj.ads: Minor reformatting.
898 2013-10-14 Hristian Kirtchev <kirtchev@adacore.com>
900 * sem_prag.adb (Analyze_Depends_In_Decl_Part):
901 Rename Outputs_Seen to All_Outputs_Seen and update all occurrences
903 (Analyze_Input_Output): Add an item to
904 All_Inputs_Seen when it is an input or a self-referential output.
905 (Check_Mode): Comment reformatting.
906 (Analyze_Abstract_State): Remove the restriction that an Export state
907 must also have mode Input_Only or Output_Only.
909 2013-10-14 Hristian Kirtchev <kirtchev@adacore.com>
911 * einfo.adb: Flag 263 is now known as Has_Visible_Refinement.
912 (Has_Non_Null_Refinement): New routine.
913 (Has_Null_Refinement): The routine is now synthesized.
914 (Has_Visible_Refinement): New routine.
915 (Set_Has_Visible_Refinement): New routine.
916 (Write_Entity_Flags): Remove the output for
917 Has_Null_Refinement. Add output for Has_Visible_Refinement.
918 * einfo.ads: Update the occurrences of Has_Non_Null_Refinement,
919 Has_Null_Refinement and Has_Visible_Refinement in entities.
920 (Has_Non_Null_Refinement): New synthesized attribute.
921 (Has_Null_Refinement): This attribute is now synthesized.
922 (Has_Visible_Refinement): New routine with corresponding
924 (Set_Has_Visible_Refinement): New routine with corresponding pragma
926 * sem_ch3.adb (Analyze_Declarations): Add new local
927 variable In_Package_Body. Remove state refinements from
928 visibility at the end of the package body declarations.
929 (Remove_Visible_Refinements): New routine.
930 * sem_prag.adb (Analyze_Constituent): Collect a null
931 constituent and mark the state as having visible refinement.
932 (Analyze_Global_Item): Use attribute Has_Visible_Refinement to
933 detect a state with visible refinement.
934 (Analyze_Input_Output): Use attribute Has_Visible_Refinement to detect
935 a state with visible refinement.
936 (Check_Dependency_Clause): Use attribute Has_Non_Null_Refinement rather
937 than checking the contents of list Refinement_Constituents.
938 (Check_In_Out_States): Use attribute Has_Non_Null_Refinement rather
939 than checking the contents of list Refinement_Constituents.
940 (Check_Input_States): Use attribute Has_Non_Null_Refinement rather
941 than checking the contents of list Refinement_Constituents.
942 (Check_Matching_Constituent): Mark a state as having visible refinement.
943 (Check_Output_States): Use attribute Has_Non_Null_Refinement rather than
944 checking the contents of list Refinement_Constituents.
945 (Check_Refined_Global_Item): Use attribute Has_Visible_Refinement
946 to detect a state with visible refinement.
947 (Is_Matching_Input): Use attribute Has_Non_Null_Refinement rather than
948 checking the contents of list Refinement_Constituents.
949 * sem_util.adb (Is_Refined_State): Use attribute
950 Has_Visible_Refinement to detect a state with visible refinement.
952 2013-10-14 Hristian Kirtchev <kirtchev@adacore.com>
954 * sem_prag.adb (Check_Mode): Do not emit an
955 error when inspecting a self referencial output item of an
958 2013-10-14 Tristan Gingold <gingold@adacore.com>
960 * exp_prag.adb (Expand_Pragma_Import_Export_Exception): Fix
961 target type for code of VMS imported exception.
962 * init.c: Replace Exception_Code by void *.
963 * s-vmexta.adb (Hash, Base_Code_In): Adjust code after changing
964 the type of Exception_Code.
966 2013-10-14 Vincent Celier <celier@adacore.com>
968 * prj.ads: Minor comment updates.
969 * prj-attr.adb: New attribute Library_Rpath_Options.
971 2013-10-14 Robert Dewar <dewar@adacore.com>
973 * gnat_rm.texi: Library_Level attribute now applies to an
975 * sem_attr.adb (Analyze_Attribute, case Library_Level): Prefix
976 is now an entity name.
978 2013-10-14 Jose Ruiz <ruiz@adacore.com>
980 * sem_ch13.adb (Analyze_Aspect_Specification): For
981 Priority and CPU aspects in subprograms, the expression in the
982 aspect is analyzed and exported.
984 2013-10-14 Robert Dewar <dewar@adacore.com>
986 * s-valuti.adb, prep.adb, scng.adb, errout.adb: Minor reformatting.
988 2013-10-14 Eric Botcazou <ebotcazou@adacore.com>
990 * adaint.c: Further disable __gnat_get_executable_load_address
993 2013-10-14 Vincent Celier <celier@adacore.com>
995 * gnat_ugn.texi: Add documentation for comparing symbols to
996 integers in preprocessing expressions.
998 2013-10-14 Jose Ruiz <ruiz@adacore.com>
1000 * sem_prag.adb (Analyze_Aspect_Specification): For
1001 Priority and CPU aspects in subprograms, the expression in the
1002 aspect is analyzed and exported.
1003 (Analyze_Pragma): When having a Priority pragma in the
1004 main subprogram, load a unit that will force the initialization
1005 of the tasking run time, which is needed for setting the required
1008 2013-10-14 Vincent Celier <celier@adacore.com>
1010 * prj-nmsc.adb (Check_Interfaces): Put in Other_Interfaces all
1011 non Ada interface files.
1012 * prj.ads (Project_Data): New component Other_Interfaces.
1014 2013-10-14 Arnaud Charlet <charlet@adacore.com>
1016 * gcc-interface/Makefile.in: Target pairs clean ups.
1018 2013-10-14 Vincent Celier <celier@adacore.com>
1020 * errout.adb (Write_Error_Summary): Do not output the number
1021 of lines when Main_Source_File is unknown.
1022 (Output_Messages): Do not write the header when Main_Source_File is
1025 2013-10-14 Vincent Celier <celier@adacore.com>
1027 * prep.adb (Expression): Accept terms of the form 'symbol <relop>
1028 integer", where relop is =, <, <=, > or >=.
1029 (Parse_Def_File): Accept literal integer values.
1030 * gcc-interface/Make-lang.in: Add s-valint.o, s-valuns.o and
1031 s-valuti.o to the compiler object files.
1033 2013-10-14 Robert Dewar <dewar@adacore.com>
1035 * exp_prag.adb, exp_ch11.adb, s-exctab.adb: Minor reformatting.
1036 * usage.adb: Add line for -gnateu switch.
1038 2013-10-14 Vincent Celier <celier@adacore.com>
1040 * lib-writ.ads: Add comments to indicate that a path name in
1041 D lines may be quoted if the path name includes directories
1044 2013-10-14 Robert Dewar <dewar@adacore.com>
1046 * debug.adb: Document -gnatd.E.
1047 * gnat1drv.adb (Adjust_Global_Switches): Set Error_To_Warning
1049 * opt.ads (Error_To_Warning): New switch.
1050 * osint.adb: Minor reformatting.
1051 * sem_warn.adb (Warn_On_Overlapping_Actuals): Overlap is error
1052 in some cases in Ada 2012 mode (unless Error_To_Warning) is set.
1053 * sem_warn.ads (Warn_On_Overlapping_Actuals): Document error
1056 2013-10-14 Tristan Gingold <gingold@adacore.com>
1058 * cstand.adb: Add a comment for Standard_Exception_Type.
1060 2013-10-14 Ed Schonberg <schonberg@adacore.com>
1062 * exp_ch4.adb (Process_Transient_Object): If a transient scope
1063 has already been created, use the corresponding Node_To_Be_Wrapped
1064 as the insertion point for the controlled actions.
1066 2013-10-14 Tristan Gingold <gingold@adacore.com>
1068 * cstand.adb (Create_Standard): Change Import_Code component
1069 of Standard_Exception_Type to Foreign_Data. Its type is now
1070 Standard_A_Char (access to character).
1071 * exp_prag.adb (Expand_Pragma_Import_Export_Exception): Adjust
1072 definition of Code to match the type of Foreign_Data.
1073 * s-stalib.ads (Exception_Data): Replace Import_Code by Foreign_Data
1074 Change the definition of standard predefined exceptions.
1075 (Exception_Code): Remove.
1076 * raise.h (Exception_Code): Remove (Exception_Data): Replace
1077 Import_Code field by Foreign_Data.
1078 * rtsfind.ads (RE_Exception_Code): Remove
1079 (RE_Import_Address): Add.
1080 * a-exexpr-gcc.adb (Import_Code_For): Replaced by Foreign_Data_For.
1081 * exp_ch11.adb (Expand_N_Exception_Declaration): Associate null
1082 to Foreign_Data component.
1083 * raise-gcc.c (Import_Code_For): Replaced by Foreign_Data_For.
1084 (is_handled_by): Add comments. Use replaced function. Change
1085 condition so that an Ada occurrence is never handled by
1087 * s-exctab.adb (Internal_Exception): Associate Null_Address to
1088 Foreign_Data component.
1089 * s-vmexta.adb, s-vmexta.ads (Exception_Code): Declare Replace
1090 SSL.Exception_Code by Exception_Code.
1092 2013-10-14 Robert Dewar <dewar@adacore.com>
1094 * gnat_ugn.texi: Document -gnateu switch.
1095 * opt.ads (Ignore_Unrecognized_VWY_Switches): New switch.
1096 * stylesw.adb: Ignore unrecognized switch if
1097 Ignore_Unrecognized_VWY_Switches set.
1098 * switch-c.adb: Implement -gnateu (sets
1099 Ignore_Unrecognized_VWY_Switches).
1100 * validsw.adb: Ignore unrecognized switch if
1101 Ignore_Unrecognized_VWY_Switches set.
1102 * warnsw.adb: Ignore unrecognized switch if
1103 Ignore_Unrecognized_VWY_Switches set.
1105 2013-10-14 Robert Dewar <dewar@adacore.com>
1107 * exp_prag.adb, sem_prag.adb, a-exexda.adb, s-vmexta.ads: Minor
1110 2013-10-14 Vincent Celier <celier@adacore.com>
1112 * ali.adb (Get_File_Name): New Boolean parameter May_Be_Quoted,
1113 defaulted to False. Calls Get_Name with May_Be_Quoted.
1114 (Get_Name): New Boolean parameter May_Be_Quoted, defaulted to
1115 False. If May_Be_Quoted is True and first non blank charater is
1116 '"', unquote the name.
1117 (Scan_ALI): For the file/path name on the D line, call Get_File_Name
1118 with May_Be_Quoted = True, as it may have been quoted.
1119 * lib-util.adb, lib-util.ads (Write_Info_Name_May_Be_Quoted): New
1120 procedure to write file/path names that may contain spaces and if they
1122 * lib-writ.adb (Write_ALI): Use new procedure
1123 Write_Info_Name_May_Be_Quoted to write file/path names on D lines.
1125 2013-10-14 Hristian Kirtchev <kirtchev@adacore.com>
1127 * sem_prag.adb (Analyze_Depends_In_Decl_Part,
1128 Analyze_Global_In_Decl_Part,
1129 Analyze_Pre_Post_Condition_In_Decl_Part): Install the subprogram
1130 and its formals only when it is not already installed.
1131 * sem_util.adb (Is_Refined_State): A state is refined when it
1132 has a non-empty list of constituents.
1134 2013-10-14 Tristan Gingold <gingold@adacore.com>
1136 * adaint.c: Disable __gnat_get_executable_load_address for linux.
1137 * exp_prag.adb: Add comment in Expand_Pragma_Import_Export_Exception.
1139 2013-10-14 Tristan Gingold <gingold@adacore.com>
1141 * s-vmexta.ads: Add comments.
1143 2013-10-14 Hristian Kirtchev <kirtchev@adacore.com>
1145 * sem_ch6.adb (Analyze_Subprogram_Body_Contract): Add processing
1146 for pragma Refined_State.
1147 * sem_ch13.adb (Analyze_Aspect_Specifications): Add processing
1148 for aspect Refined_Depends.
1149 * sem_prag.adb (Analyze_Contract_Cases_In_Decl_Part):
1150 Use Find_Related_Subprogram_Or_Body to find the related
1151 context. Use the current scope when determining whether to
1152 ensure proper visibility.
1153 (Analyze_Depends_In_Decl_Part):
1154 Add local variable Spec_Id. Update the comment on usage of
1155 Subp_Id. Use Find_Related_Subprogram_Or_Body to find the
1156 related context. Extract the corresponding spec of the body
1157 (if any). Use the current scope when determining when to
1158 ensure proper visibility.
1159 (Analyze_Global_In_Decl_Part):
1160 Add local variable Spec_Id. Update the comment on usage of
1161 Subp_Id. Use Find_Related_Subprogram_Or_Body to find the
1162 related context. Extract the corresponding spec of the body
1163 (if any). Use the current scope when determining when to
1164 ensure proper visibility.
1165 (Analyze_Global_Item): Use the
1166 entity of the subprogram spec when performing formal parameter
1167 checks. Perform state-related checks.
1168 (Analyze_Input_Output):
1169 Use Is_Attribute_Result to detect 'Result. Query the
1170 entity of a subprogram spec when verifying the prefix of
1171 'Result. Perform state-related checks. (Analyze_Pragma):
1172 Merge the analysis of Refined_Depends and Refined_Global.
1173 (Analyze_Refined_Depends_In_Decl_Part): Provide implemenation.
1174 (Analyze_Refined_Global_In_Decl_Part): Move state-related checks
1175 to the body of Analyze_Global_In_Decl_Part. Rename local constant
1176 List to Items. (Analyze_Refined_Pragma): Remove circuitry to
1177 find the proper context, use Find_Related_Subprogram_Or_Body
1179 (Check_Function_Return): Query the entity of
1180 the subprogram spec when verifying the use of 'Result.
1181 (Check_In_Out_States, Check_Input_States, Check_Output_States):
1182 Avoid using Has_Null_Refinement to detect a state with
1183 a non-null refinement, use the Refinement_Constituents
1185 (Check_Matching_Constituent): Remove initialization code.
1186 (Check_Mode_Restriction_In_Function): Use the entity of the subprogram
1187 spec when verifying mode usage in functions.
1188 (Collect_Global_Items): New routine.
1189 (Collect_Subprogram_Inputs_Outputs): Add local
1190 variable Spec_Id. Add circuitry for bodies-as-specs. Use
1191 pragma Refined_Global when collecting for a body.
1192 (Create_Or_Modify_Clause): Use the location of the
1193 clause. Rename local variable Clause to New_Clause to avoid
1194 confusion and update all occurrences. Use Is_Attribute_Result
1196 (Find_Related_Subprogram): Removed.
1197 (Find_Related_Subprogram_Or_Body): New routine.
1198 (Is_Part_Of): Move routine to top level.
1199 (Normalize_Clause): Update the
1200 comment on usage. The routine can now normalize a clause with
1201 multiple outputs by splitting it.
1202 (Collect_Global_Items):
1203 Rename local constant List to Items. Remove the check for
1205 (Requires_Profile_Installation): Removed.
1206 (Split_Multiple_Outputs): New routine.
1207 * sem_prag.ads: Update the comments on usage of various
1208 pragma-related analysis routines.
1209 * sem_util.adb (Contains_Refined_State): The routine can now
1210 process pragma [Refined_]Depends.
1211 (Has_Refined_State): Removed.
1212 (Has_State_In_Dependency): New routine.
1213 (Has_State_In_Global): New routine.
1214 (Is_Attribute_Result): New routine.
1215 * sem_util.ads (Is_Attribute_Result): New routine.
1217 2013-10-14 Emmanuel Briot <briot@adacore.com>
1219 * s-regpat.adb (Compile): Fix finalization of the automaton
1220 when its size was automatically computed to be exactly 1000 bytes.
1222 2013-10-14 Ed Schonberg <schonberg@adacore.com>
1224 * sem_ch3.adb (Complete_Private_Subtype): If the full view of
1225 the base type is constrained, the full view of the subtype is
1226 known to be constrained as well.
1228 2013-10-14 Vincent Celier <celier@adacore.com>
1230 * projects.texi: Add documentation for new attributes of package
1231 Clean: Artifacts_In_Object_Dir and Artifacts_In_Exec_Dir.
1233 2013-10-14 Tristan Gingold <gingold@adacore.com>
1235 * adaint.c, adaint.h (__gnat_get_executable_load_address):
1237 * a-exexda.adb (Append_Info_Basic_Exception_Traceback): Add
1238 executable load address (Basic_Exception_Tback_Maxlength): Adjust.
1240 2013-10-14 Vincent Celier <celier@adacore.com>
1242 * prj-attr.adb: New attributes in package Clean:
1243 Artifacts_In_Exec_Dir, Artifacts_In_Object_Dir.
1244 * prj-nmsc.adb (Process_Clean (Attributes)): New
1245 procedure to process attributes Artifacts_In_Exec_Dir and
1246 Artifacts_In_Object_Dir in package Clean.
1247 * prj.ads (Project_Configuration): New components
1248 Artifacts_In_Exec_Dir and Artifacts_In_Object_Dir.
1249 * snames.ads-tmpl: New standard names Artifacts_In_Exec_Dir and
1250 Artifacts_In_Object_Dir used only by gprclean.
1252 2013-10-14 Robert Dewar <dewar@adacore.com>
1254 * exp_attr.adb (Expand_N_Attribute_Reference): Add error
1255 entry for Library_Level attribute (which should not survive
1257 * gnat_rm.texi: Document attribute Library_Level
1258 * sem_attr.adb (Analyze_Attribute, case Library_Level): Implement
1259 this new attribute (Set_Boolean_Result): Replaces Set_Result
1260 (Check_Standard_Prefix): Document that Check_E0 is called
1261 (Check_System_Prefix): New procedure
1262 * snames.ads-tmpl: Add entry for Library_Level attribute
1264 2013-10-14 Robert Dewar <dewar@adacore.com>
1266 * exp_ch6.adb, sinfo.ads: Minor reformatting.
1267 * checks.adb (Overlap_Check): Use identifier casing in messages.
1269 2013-10-14 Robert Dewar <dewar@adacore.com>
1271 * einfo.ads, einfo.adb (Default_Aspect_Component_Value): Is on base type
1273 * exp_aggr.adb (Expand_Array_Aggregate): Handle proper
1274 initialization of <> component.
1275 * exp_ch3.adb, exp_tss.adb: Minor reformatting
1276 * sem_ch13.adb (Default_Aspect_Component_Value, Default_Aspect_Value):
1277 Is on base type only.
1278 * sinfo.ads: Minor comment revision.
1280 2013-10-14 Robert Dewar <dewar@adacore.com>
1282 * g-decstr.adb (Decode_Wide_Wide_Character): Fix failure
1283 to detect invalid sequences where longer than necessary
1284 sequences are used for encoding.
1285 (Validate_Wide_Character):
1286 Call Decode_Wide_Character to get the above validations.
1287 (Validate_Wide_Wide_Character): Same fix
1288 * g-decstr.ads: Add documentation making it clear that the UTF-8
1289 implementation here recognizes all valid UTF-8 sequences, rather
1290 than the well-formed subset corresponding to characters defined
1292 (Next_Wide_Character): Remove comment about this
1293 being more efficient than Decode_Wide_Character (because this
1294 no longer the case).
1295 (Prev_Wide_Character): Add note that valid encoding is assumed.
1297 2013-10-14 Robert Dewar <dewar@adacore.com>
1299 * a-wichha.adb (Character_Set_Version): New function.
1300 * a-wichha.ads: Remove comments for pragma Pure (final RM has
1302 (Character_Set_Version): New function.
1303 * gnat_rm.texi: Update doc.
1305 2013-10-14 Hristian Kirtchev <kirtchev@adacore.com>
1307 * einfo.adb: Flag263 is now known as Has_Null_Refinement.
1308 (Has_Null_Refinement): New routine.
1309 (Set_Has_Null_Refinement): New routine.
1310 (Write_Entity_Flags): Output the status of flag
1311 Has_Null_Refinement.
1312 * einfo.ads: Add new flag Has_Null_Refinement along with
1313 comment on usage and update all nodes subject to the flag.
1314 (Has_Null_Refinement): New routine along with pragma Inline.
1315 (Set_Has_Null_Refinement): New rouitine along with pragma Inline.
1316 * sem_prag.adb (Analyze_Constituent): Mark a state as having
1317 a null refinement when the sole constituent is "null".
1318 (Analyze_Global_List): Handle null input/output items.
1319 (Analyze_Refined_Global_In_Decl_Part): Add local variable
1320 Has_Null_State. Add logic to handle combinations of states
1321 with null refinements and null global lists and/or items.
1322 (Check_In_Out_States, Check_Input_States, Check_Output_States):
1323 Use attribute Has_Null_Refinement to detect states with
1325 (Check_Refined_Global_List): Handle null input/output items.
1326 (Process_Global_Item): Handle states with null refinements.
1327 (Process_Global_List): Handle null input/output items.
1329 2013-10-14 Robert Dewar <dewar@adacore.com>
1331 * freeze.adb (Freeze_Entity): Reset Is_True_Constant for
1333 * gnat_ugn.texi: Update doc on aliased variables and constants.
1335 2013-10-14 Ed Schonberg <schonberg@adacore.com>
1337 * exp_pakd.adb (Expand_Packed_Element_Reference): If the
1338 reference is an actual in a call, the prefix has not been fully
1339 expanded, to account for the additional expansion for parameter
1340 passing. the prefix itself is a packed reference as well,
1341 recurse to complete the transformation of the prefix.
1343 2013-10-14 Eric Botcazou <ebotcazou@adacore.com>
1345 * exp_dbug.adb (Debug_Renaming_Declaration): Do not
1346 materialize the entity when the renamed object contains an
1347 N_Explicit_Dereference.
1348 * sem_ch8.adb (Analyze_Object_Renaming):
1349 If the renaming comes from source and the renamed object is a
1350 dereference, mark the prefix as needing debug information.
1352 2013-10-14 Doug Rupp <rupp@adacore.com>
1354 * system-vxworks-arm.ads (Stack_Check_Probes, Stack_Check_Limits):
1355 Enable Stack Probes, Disable Stack Limit Checking.
1356 * init.c [VxWorks] (__gnat_inum_to_ivec): Caste return value.
1357 (__gnat_map_signal): Fix signature.
1358 (__gnat_error_handler): Make
1359 static, fix signature, remove prototype, fix prototype warning.
1360 [ARMEL and VxWorks6] (__gnat_map_signal): Check and re-arm guard
1361 page for storage_error.
1362 * exp_pakd.adb: Minor reformatting.
1364 2013-10-14 Hristian Kirtchev <kirtchev@adacore.com>
1366 * sem_prag.adb (Analyze_Global_In_Decl_Part): Remove local
1367 variable Contract_Seen. Add local variable Proof_Seen.
1368 (Analyze_Global_List): Remove the processing for mode
1369 Contract_In. Add support for mode Proof_In.
1370 (Analyze_Pragma): Update the grammar of pragmas Global and
1372 * snames.ads-tmpl: Remove predefined name Contract_In. Add
1373 predefined name Proof_In.
1375 2013-10-14 Robert Dewar <dewar@adacore.com>
1377 * exp_prag.adb (Expand_Pragma_Check): Generate proper string
1379 * gnat_rm.texi: Add documentation for pragmas
1380 Type_Invariant[_Class]
1381 * par-prag.adb: Add entries for pragmas Type_Invariant[_Class]
1382 * sem_ch13.adb: Minor reformatting
1383 * sem_prag.adb: Implement pragmas Type_Invariant[_Class]
1384 * snames.ads-tmpl: Add entries for pragmas Type_Invariant[_Class]
1386 2013-10-14 Johannes Kanig <kanig@adacore.com>
1388 * debug.adb: Release now unused debug switches that were only
1389 relevant for gnat2why backend, not the frontend
1390 * frontend.adb (Frontend) Do not stop when -gnatd.H is present,
1393 2013-10-14 Hristian Kirtchev <kirtchev@adacore.com>
1395 * sem_prag.adb (Analyze_Global_Item): Allow
1396 references to enclosing formal parameters.
1398 2013-10-14 Thomas Quinot <quinot@adacore.com>
1400 * einfo.adb (Equivalent_Type): Add missing case
1401 E_Access_Subprogram_Type in guard (for remote access to
1402 subprograms) * sem_ch8.adb (Find_Direct_Name, Find_Expanded_Name):
1403 Add missing guards to account for the presence of RAS types
1404 that have already been replaced with the corresponding fat
1407 2013-10-14 Hristian Kirtchev <kirtchev@adacore.com>
1409 * aspects.adb: Add an entry in table Canonical_Aspect for
1411 * aspects.ads: Add entries in tables Aspect_Id, Aspect_Argument,
1412 Aspect_Names and Aspect_Delay for Initializes.
1413 * atree.ads, atree.adb (Ekind_In): New seven argument versions of the
1415 * einfo.adb: Remove Refined_State_Pragma from the list of node
1416 usage. Finalizer is now at position 28.
1418 and package bodies now have a contract.
1420 the assertion and node usage.
1421 (Get_Pragma): Update the Is_CDG
1422 flag to include Abstract_State, Initializes and Refined_State.
1423 (Refined_State_Pragma): Removed.
1424 (Set_Contract): Package and
1425 package bodies now have a contract.
1426 (Set_Finalizer): Update the
1427 assertion and node usage.
1428 (Set_Refined_State_Pragma): Removed.
1429 (Write_Field8_Name): Remove the output for Refined_State_Pragma.
1430 (Write_Field24_Name): Remove the output for Finalizer. Package
1431 and package bodies now have a contract.
1432 (Write_Field28_Name):
1433 Add output for Finalizer.
1434 * einfo.ads: Update the documentation and usage in entities
1435 of attribute Contract. Update the node position and usage in
1436 entities of attribute Finalizer. Remove the documentation
1437 and usage in entities for attribute Refined_State_Pragma.
1438 (Refined_State_Pragma): Removed along with pragma Inline.
1439 (Set_Refined_State_Pragma): Removed along with pragma Inline.
1440 * par-prag.adb: Add Initializes to the pragmas that do not
1441 require special processing by the parser.
1442 * sem_ch3.adb (Analyze_Declarations): Add local variable
1443 Prag. Update the retrieval of pragma Refined_State. Analyze
1444 aspect/pragma Initializes at the end of the visible declarations
1445 of the related package.
1446 * sem_ch6.adb (Analyze_Subprogram_Body_Contract):
1447 Add local variables Ref_Depends and Ref_Global. Analyze
1448 pragmas Refined_Global and Refined_Depends in that order.
1449 (Analyze_Subprogram_Contract): Add local variables Depends and
1450 Global. Analyze pragmas Global and Depends in that order.
1451 * sem_ch7.adb (Analyze_Package_Body_Helper): Package
1452 bodies now have a contract. Move the analysis of the aspect
1453 specifications after the defining entity has been decorated.
1454 (Analyze_Package_Declaration): Packages now have a contract. Move
1455 the analysis of the aspect specifications after the defining
1456 entity has been decorated.
1457 * sem_ch12.adb (Analyze_Generic_Package_Declaration): Packages
1459 * sem_ch13.adb (Analyze_Pragma): Code cleanup for aspect
1460 Abstract_State. Add processing for aspect Initializes.
1461 (Check_Aspect_At_Freeze_Point): Add an entry for Initializes.
1462 * sem_prag.adb: Use Get_Pragma_Arg to extract the expression
1463 of a pragma argument. Add an entry in table Sig_Flags for
1465 (Analyze_Initializes_In_Decl_Part): New routine.
1466 (Analyze_Pragma): Check the declaration order of pragmas
1467 Abstract_State and Initializes. Abstract_State is now part of
1468 the package contract. Analyze pragma Initializes. Check for
1469 duplicate Refined_State pragma. Refined_State is now part of
1470 the package contract.
1471 (Check_Declaration_Order): New routine.
1472 (Check_Test_Case): Alphabetized.
1473 * sem_prag.ads (Analyze_Initializes_In_Decl_Part): New routine.
1474 * sem_util.adb (Add_Contract_Item): Rename formal Subp_Id
1475 to Id. This routine can now support contracts on packages and
1477 * sem_util.ads (Add_Contract_Item): Rename formal Subp_Id to
1478 Id. Update comment on usage.
1479 * sinfo.ads: Update the usage of N_Contract nodes.
1480 * snames.ads-tmpl: Add predefined name Initializes. Add new
1481 pragma id for Initializes.
1483 2013-10-13 Nicolas Roche <roche@adacore.com>
1484 Eric Botcazou <ebotcazou@adacore.com>
1486 * gcc-interface/Make-lang.in (ada/%.o): Replace individual rules with
1487 generic rule and add $(POSTCOMPILE).
1489 (.adb.o): Add @$(ADA_DEPS).
1491 (ada/a-except.o): Likewise.
1492 (ada/s-excdeb.): Likewise.
1493 (ada/s-assert.o): Likewise.
1494 (ada/a-tags.o): Likewise.
1495 (ada_generated_files): New variable.
1496 Use them as dependency order for GNAT1_ADA_OBJS and GNATBIND_OBJS.
1497 (ADA_DEPFILES): New variable.
1501 2013-10-13 Eric Botcazou <ebotcazou@adacore.com>
1503 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Force all local
1504 variables with aggregate types in memory if not optimizing.
1506 2013-10-13 Hristian Kirtchev <kirtchev@adacore.com>
1508 * sem_prag.adb (Check_Mode): Do
1509 not emit an error when we are looking at inputs and
1510 the item is an unconstrained or tagged out parameter.
1511 (Check_Mode_Restriction_In_Enclosing_Context): Use Get_Pragma
1512 to find whether the context is subject to aspect/pragma Global.
1513 (Collect_Subprogram_Inputs_Outputs): Unconstrained or tagged
1514 out parameters are now considered inputs. Use Get_Pragma to
1515 find wheher the subprogram is subject to aspect/pragma Global.
1516 (Is_Unconstrained_Or_Tagged_Item): New routine.
1518 2013-10-13 Thomas Quinot <quinot@adacore.com>
1520 * einfo.ads: Minor reformatting.
1521 * gcc-interface/Make-lang.in: Update dependencies.
1523 2013-10-13 Robert Dewar <dewar@adacore.com>
1525 * gnat_rm.texi: Add documentation for pragmas Pre[_Class]
1527 * par-ch2.adb (Skip_Pragma_Semicolon): Handle extra semicolon nicely.
1528 * par-prag.adb: Add entries for pragmas Pre[_Class] and
1530 * sem_prag.adb: Add handling of pragmas Pre[_Class] and
1532 * sem_util.adb (Original_Aspect_Name): Moved here from
1533 Sem_Prag.Original_Name, and modified to handle pragmas
1534 Pre/Post/Pre_Class/Post_Class.
1535 * sem_util.ads (Original_Aspect_Name): Moved here from
1536 Sem_Prag.Original_Name.
1537 * snames.ads-tmpl: Add entries for pragmas Pre[_Class] and
1540 2013-10-13 Robert Dewar <dewar@adacore.com>
1542 * einfo.adb, sem_ch6.adb: Minor reformatting.
1544 2013-10-13 Hristian Kirtchev <kirtchev@adacore.com>
1546 * einfo.adb: Add node/list usage for Refined_State
1547 and Refinement_Constituents.
1548 (Get_Pragma): Update the
1549 initialization of Is_CDG to include Refined_Global and
1550 Refined_Depends. Rename constant Delayed to In_Contract and update
1551 all of its occurrences.
1552 (Is_Non_Volatile_State): New routine.
1553 (Is_Volatile_State): Removed.
1554 (Refined_State): New routine.
1555 (Refinement_Constituents): New routine.
1556 (Set_Refined_State): New routine.
1557 (Set_Refinement_Constituents): New routine.
1558 (Write_Field8_Name): Add output for Refinement_Constituents.
1559 (Write_Field10_Name): Add output for Refined_State.
1560 * einfo.ads: Add new synthesized attribute Is_Non_Volatile_State.
1561 Remove synthesized attribute Is_Volatile_State. Add new
1562 attributes Refined_State and Refinement_Constituents along with
1564 (Get_Pragma): Update the comment on usage.
1565 (Is_Non_Volatile_State): New routine.
1566 (Is_Volatile_State): Removed.
1567 (Refined_State): New routine and pragma Inline.
1568 (Refinement_Constituents): New routine and pragma Inline.
1569 (Set_Refined_State): New routine and pragma Inline.
1570 (Set_Refinement_Constituents): New routine and pragma Inline.
1571 * elists.ads, elists.adb (Clone): Removed.
1572 (New_Copy_Elist): New routine.
1573 (Remove): New routine.
1574 * sem_ch3.adb (Analyze_Declarations): Use Defining_Entity
1575 to get the entity of the subprogram [body].
1576 (Analyze_Object_Declaration): Add initialization for
1578 * sem_ch6.adb (Analyze_Subprogram_Body_Contract): Add processing
1579 for Refined_Global and Refined_Depends. Emit an error when
1580 the body requires Refined_Global, but the aspect/pragma is
1582 * sem_ch6.ads (Analyze_Subprogram_Body_Contract): Change
1583 procedure signature and add comment on usage.
1584 * sem_ch13.adb (Analyze_Aspect_Specifications): Add processing
1585 for aspect Refined_Global.
1586 * sem_prag.adb (Analyze_Abstract_State): Add initialization
1587 of attributes Refined_State and Refinement_Constituents.
1588 (Analyze_Depends_In_Decl_Part, Analyze_Global_In_Decl_Part,
1589 Analyze_Contract_Cases_In_Decl_Part): Remove local
1591 (Analyze_Pragma): Add processing for pragma
1592 Refined_Global. The analysis of Refined_Post and Refined_Pre
1593 has been merged. Update an error message in the processing of
1594 pragma Refined_State.
1595 (Analyze_Refined_Global_In_Decl_Part): Provide implementation.
1596 (Analyze_Refined_Pragma): New routine.
1597 (Analyze_Refined_Pre_Post_Condition): Removed.
1598 (Analyze_Refined_State_In_Decl_Part): Update the call to Clone.
1599 (Analyze_Refinement_Clause): Make State_Id visible to all
1601 (Check_Matching_Constituent): Establish
1602 a relation between a refined state and its constituent.
1603 (Collect_Hidden_States_In_Decls): Remove ??? comment. Look at
1604 the entity of the object declaration to establish its kind.
1605 * sem_util.adb: Alphabetize with and use clauses.
1606 (Contains_Refined_State): New routine.
1607 * sem_util.ads (Contains_Refined_State): New routine.
1609 2013-10-13 Thomas Quinot <quinot@adacore.com>
1611 * scos.ads: Minor documentation clarification.
1613 2013-10-13 Thomas Quinot <quinot@adacore.com>
1615 * s-oscons-tmplt.c (CLOCK_RT_Ada): Set to CLOCK_MONOTONIC when
1616 building on AIX 5.3 or later, and to CLOCK_REALTIME on older
1618 * init.c (pthread_condattr_setclock): Remove now useless weak symbol.
1619 * thread.c(__gnat_pthread_condattr_setup): Remove bogus AIX 5.2
1621 * s-osinte-aix.ads(clock_id_t): Fix C mapping (this is a 64-bit
1623 (clock_gettime): Import from C runtime library.
1624 * s-osinte-aix.adb (clock_gettime): Remove bogus emulation body,
1625 this routine is provided by the system in current supported
1628 2013-10-13 Robert Dewar <dewar@adacore.com>
1630 * sem_ch3.adb: Minor reformatting.
1632 2013-10-13 Ed Schonberg <schonberg@adacore.com>
1634 * freeze.adb (Freeze_Entity): For a function whose return type
1635 is incomplete, do not replace the type with the full view if the
1636 type is a limited view. In that case the full view appears in a
1637 different unit, and the back-end will retrieve it at the proper
1640 2013-10-13 Yannick Moy <moy@adacore.com>
1642 * exp_spark.adb (Expand_SPARK_Call): Do not introduce temporaries for
1645 2013-10-13 Ed Schonberg <schonberg@adacore.com>
1647 * sem_ch3.adb: in Ada 2012 access_to_function types can have
1649 (Derived_Type_Declaration): SPARK restriction
1650 must be flagged on the original node, since it may have been
1651 written as a subtype declaration.
1652 (Analyze_Subtype_Declaration): Do not enter name of
1653 entity in declaration if it is the current entity, because it may
1654 have been inserted in a previous analysis and it appears in the
1655 else_part of an if-statement that is rewritten during expansion.
1657 2013-10-13 Yannick Moy <moy@adacore.com>
1659 * exp_spark.adb (Expand_SPARK_N_Attribute_Reference): Remove procedure.
1660 (Expand_SPARK): Remove call to Expand_SPARK_N_Attribute_Reference and
1661 Expand_SPARK_N_Simple_Return_Statement.
1662 (Expand_SPARK_N_Simple_Return_Statement,
1663 Expand_SPARK_Simple_Function_Return): Remove procedures.
1665 2013-10-13 Vincent Celier <celier@adacore.com>
1667 * gnat_ugn.texi: Minor editing.
1669 2013-10-13 Ed Schonberg <schonberg@adacore.com>
1671 * sem_ch3.adb (Check_Abstract_Overriding): If a synchronized
1672 operation implements an interface primitive, mark the operation
1673 as referenced, to prevent usually spurious messages about unused
1674 entities: such operations are called in dispatching select
1675 statements that are not visible to the compiler.
1677 2013-10-13 Eric Botcazou <ebotcazou@adacore.com>
1679 * gcc-interface/decl.c (gnat_to_gnu_param): Remove obsolete comment.
1681 2013-10-11 Jakub Jelinek <jakub@redhat.com>
1683 * gcc-interface/utils.c (DEF_FUNCTION_TYPE_8): Define.
1685 2013-10-10 Robert Dewar <dewar@adacore.com>
1687 * par-ch6.adb (Check_Junk_Semicolon_Before_Return): Remove
1690 2013-10-10 Javier Miranda <miranda@adacore.com>
1692 * sem_ch13.adb (Freeze_Entity_Checks): Avoid
1693 loosing errors on CPP entities in -gnatc mode.
1695 2013-10-10 Robert Dewar <dewar@adacore.com>
1697 * sem_ch5.adb (Analyze_If_Statement): Only diagnose redundant
1700 2013-10-10 Robert Dewar <dewar@adacore.com>
1702 * restrict.adb (Check_SPARK_Restriction): Refine test (don't
1703 automatically go to the original node).
1704 * sem_ch11.adb (Analyze_Raise_Statement): Only raise
1705 statements that come from source violate SPARK restrictions.
1706 (Analyze_Raise_xxx_Error): Same fix.
1707 * sem_ch3.adb (Analyze_Object_Declaration): Check OK SPARK
1708 initialization on original node, not on possibly rewritten
1710 * sem_ch4.adb (Analyze_If_Expression): Only if expressions that
1711 come from source violate SPARK mode restrictions.
1713 2013-10-10 Robert Dewar <dewar@adacore.com>
1715 * gnat_ugn.texi: Fix confusing documentation for -gnatyM.
1717 2013-10-10 Yannick Moy <moy@adacore.com>
1719 * errout.adb (Compilation_Errors): In formal verification mode,
1720 always return False.
1722 2013-10-10 Hristian Kirtchev <kirtchev@adacore.com>
1724 * sem_prag.adb (Collect_Hidden_States_In_Decls): Only consider source
1725 non-constant objects.
1727 2013-10-10 Hristian Kirtchev <kirtchev@adacore.com>
1729 * aspects.adb: Add an entry in table Canonical_Aspect for
1731 * aspects.ads: Add entries in tables Aspect_Id, Aspect_Argument,
1732 Aspect_Names and Aspect_Delay for Refined_State.
1733 * einfo.adb: Add with and use clauses for Elists.
1734 Remove Refined_State from the list of node usage.
1735 Add Refined_State_Pragma to the list of node usage.
1736 (Has_Null_Abstract_State): New routine.
1737 (Refined_State): Removed.
1738 (Refined_State_Pragma): New routine.
1739 (Set_Refined_State): Removed.
1740 (Set_Refined_State_Pragma): New routine.
1741 (Write_Field8_Name): Add output for Refined_State_Pragma.
1742 (Write_Field9_Name): Remove the output for Refined_State.
1743 * einfo.ads: Add new synthesized attribute Has_Null_Abstract_State
1744 along with usage in nodes. Remove attribute Refined_State along
1745 with usage in nodes. Add new attribute Refined_State_Pragma along
1746 with usage in nodes.
1747 (Has_Null_Abstract_State): New routine.
1748 (Refined_State): Removed.
1749 (Refined_State_Pragma): New routine.
1750 (Set_Refined_State): Removed.
1751 (Set_Refined_State_Pragma): New routine.
1752 * elists.adb (Clone): New routine.
1753 * elists.ads (Clone): New routine.
1754 * par-prag.adb: Add Refined_State to the pragmas that do not
1755 require special processing by the parser.
1756 * sem_ch3.adb: Add with and use clause for Sem_Prag.
1757 (Analyze_Declarations): Add local variables Body_Id, Context and
1758 Spec_Id. Add processing for delayed aspect/pragma Refined_State.
1759 * sem_ch13.adb (Analyze_Aspect_Specifications): Update the
1760 handling of aspect Abstract_State. Add processing for aspect
1761 Refined_State. Remove the bizzare insertion policy for aspect
1763 (Check_Aspect_At_Freeze_Point): Add an entry for Refined_State.
1764 * sem_prag.adb: Add an entry to table Sig_Flags
1765 for pragma Refined_State.
1766 (Add_Item): Update the
1767 comment on usage. The inserted items need not be unique.
1768 (Analyze_Contract_Cases_In_Decl_Part): Rename variable Restore to
1769 Restore_Scope and update all its occurrences.
1771 Update the handling of pragma Abstract_State. Add processing for
1772 pragma Refined_State.
1773 (Analyze_Pre_Post_Condition_In_Decl_Part):
1774 Rename variable Restore to Restore_Scope and update all its
1776 (Analyze_Refined_State_In_Decl_Part): New routine.
1777 * sem_prag.ads (Analyze_Refined_State_In_Decl_Part): New routine.
1778 * snames.ads-tmpl: Add new predefined name for Refined_State. Add
1779 new Pragma_Id for Refined_State.
1781 2013-10-10 Ed Schonberg <schonberg@adacore.com>
1783 * sem_ch10.adb (Install_Limited_Withed_Unit): handle properly the
1784 case of a record declaration in a limited view, when the record
1785 contains a self-referential component of an anonymous access type.
1787 2013-10-10 Thomas Quinot <quinot@adacore.com>
1789 * exp_ch4.adb (Process_Transient_Object): For any context other
1790 than a simple return statement, insert the finalization action
1791 after the context, not as an action on the context (which will
1792 get evaluated before it).
1794 2013-10-10 Hristian Kirtchev <kirtchev@adacore.com>
1796 * einfo.adb (Write_Field19_Name): Correct the
1797 string name of attribute Default_Aspect_Value.
1799 2013-10-10 Ed Schonberg <schonberg@adacore.com>
1801 * sem_type.adb (Interface_Present_In_Ancestor): The progenitor
1802 in a type declaration may be an interface subtype.
1804 2013-10-10 Robert Dewar <dewar@adacore.com>
1806 * sinfo.ads (Do_Range_Check): Add special note on handling of
1807 range checks for Succ and Pred.
1809 2013-10-10 Robert Dewar <dewar@adacore.com>
1811 * erroutc.adb (Output_Msg_Text): Remove VMS special handling.
1813 2013-10-10 Robert Dewar <dewar@adacore.com>
1815 * a-chahan.ads, a-chahan.adb (Is_Line_Terminator): New function
1816 (Is_Mark): New function.
1817 (Is_Other_Format): New function.
1818 (Is_Punctuation_Connector): New function.
1819 (Is_Space): New function.
1821 2013-10-10 Robert Dewar <dewar@adacore.com>
1823 * sem_aggr.adb (Resolve_Array_Aggregate): Redo duplicate/missing
1824 choice circuit. Was not quite right in some cases, which showed
1825 up in ACATS test B43201C.
1826 * sem_attr.adb (Address_Checks): Make sure name is set right
1827 for some messages issued.
1828 * mlib-prj.adb: Minor code reorganization.
1829 * gnat_ugn.texi: Remove special VMS doc for tagging of warning msgs.
1830 * exp_ch9.adb: Minor reformatting.
1832 2013-10-10 Tristan Gingold <gingold@adacore.com>
1834 * lib-writ.adb (Write_Unit_Information): Adjust previous patch.
1836 2013-10-10 Robert Dewar <dewar@adacore.com>
1838 * sem_ch5.adb (Analyze_If_Statement): Warn on redundant if
1840 * sem_util.ads, sem_util.adb (Has_No_Obvious_Side_Effects): New
1843 2013-10-10 Ed Schonberg <schonberg@adacore.com>
1845 * exp_ch9.adb (Expand_N_Timed_Entry_Call): Simplify expansion
1846 for the case of a dispatching trigger: there is no need to
1847 duplicate the code or create a subprogram to encapsulate the
1848 triggering statements. This allows exit statements in the
1849 triggering statements, that refer to enclosing loops.
1851 2013-10-10 Robert Dewar <dewar@adacore.com>
1853 * freeze.adb: Minor reformatting.
1854 * sem_ch13.adb (Freeze_Entity_Checks): New procedure
1855 (Analyze_Freeze_Entity): Call Freeze_Entity_Checks
1856 (Analyze_Freeze_Generic_Entity): Call Freeze_Entity_Checks.
1857 * sinfo.ads: Add syntax for sprint for Freeze_Generic_Entity.
1858 * sprint.ads: Add syntax for freeze generic entity node.
1860 2013-10-10 Robert Dewar <dewar@adacore.com>
1862 * einfo.adb, einfo.ads: Minor comment updates.
1864 2013-10-10 Robert Dewar <dewar@adacore.com>
1866 * lib-writ.adb (Write_Unit_Information): Fatal error if linker
1867 options are detected in a predefined generic unit.
1869 2013-10-10 Thomas Quinot <quinot@adacore.com>
1871 * s-oscons-tmplt.c (CLOCK_REALTIME): Always define, possibly using
1872 a dummy placeholder value.
1873 (NEED_PTHREAD_CONDATTR_SETCLOCK): Remove, not needed anymore.
1874 * thread.c: Adjust #if test accordingly.
1876 2013-10-10 Hristian Kirtchev <kirtchev@adacore.com>
1878 * exp_ch6.adb (Consequence_Error): Generate an
1879 implicit if statement.
1880 (Expand_Contract_Cases): Generate an implicit if statement.
1881 (Process_Contract_Cases): Do not expand Contract_Cases when no code
1884 2013-10-10 Robert Dewar <dewar@adacore.com>
1886 * sem_attr.adb (Address_Checks): New procedure.
1888 2013-10-10 Ed Schonberg <schonberg@adacore.com>
1890 * sinfo.ads, sinfo.adb: New Node Freeze_Generic_Entity, to trigger
1891 semantic actions at the proper point for entities that previously
1892 had no explicit freeze point.
1893 * freeze.adb (Freeze_Generic_Entities): generate new nodes to
1894 indicate the point at which semantic checks can be performed on
1895 entities declared in generic packages.
1896 * sem_ch13.ads, sem_ch13.adb: New procedure
1897 Analyze_Freeze_Generic_Entity.
1898 * exp_util.adb (Insert_Actions): Treat new node like Freeze_Entity.
1899 * sem.adb (Analyze): Call Analyze_Freeze_Generic_Entity.
1900 * sprint.adb (Sprint_Node): display Analyze_Freeze_Generic_Entity.
1901 * gcc-interface/trans.c: Ignore Analyze_Freeze_Generic_Entity.
1902 * gcc-interface/Make-lang.in: Update dependencies.
1904 2013-10-10 Robert Dewar <dewar@adacore.com>
1906 * sem_aggr.adb (Resolve_Array_Aggregate): Identify duplicated
1909 2013-10-10 Robert Dewar <dewar@adacore.com>
1911 * sem_ch9.adb (Analyze_Task_Body): Aspects are illegal
1912 (Analyze_Protected_Body): Aspects are illegal.
1914 2013-10-10 Robert Dewar <dewar@adacore.com>
1916 * sem_ch6.adb, sem_ch13.adb: Minor reformatting.
1917 * sem_case.adb (Check_Choices): Fix bad listing of missing
1918 values from predicated subtype case (Check_Choices): List
1920 * errout.adb (Set_Msg_Text): Process warning tags in VMS mode
1921 * erroutc.adb (Output_Msg_Text): Handle VMS warning tags
1922 * gnat_ugn.texi: Document /WARNINGS=TAG_WARNINGS for VMS
1923 * ug_words: Add entries for -gnatw.d and -gnatw.D
1924 * vms_data.ads: Add [NO]TAG_WARNINGS for -gnatw.D/-gnatw.d
1925 * lib-writ.ads: Documentation fixes
1927 2013-10-10 Robert Dewar <dewar@adacore.com>
1929 * a-wichha.adb, a-wichha.ads, a-zchhan.adb, a-zchhan.ads
1930 (Is_Other_Format): New name for Is_Other.
1931 (Is_Punctuation_Connector): New name for Is_Punctuation
1933 2013-10-10 Hristian Kirtchev <kirtchev@adacore.com>
1935 * aspects.adb: Add entries in table Canonical_Aspects for aspects
1936 Refined_Depends and Refined_Global.
1937 * aspects.ads: Add entries in tables Aspect_Id, Aspect_Argument,
1938 Aspect_Names, Aspect_Declay, Aspect_On_Body_Or_Stub_OK for
1939 aspects Refined_Depends and Refined_Global.
1940 * einfo.adb (Contract): Subprogram bodies are now valid owners
1942 (Set_Contract): Subprogram bodies are now valid
1943 owners of contracts.
1944 (Write_Field24_Name): Output the contract
1945 attribute for subprogram bodies.
1946 * exp_ch6.adb (Expand_Subprogram_Contract): New routine.
1947 * exp_ch6.ads (Expand_Subprogram_Contract): New routine.
1948 * par-prag.adb: Pragmas Refined_Depends and Refined_Global do
1949 not require any special processing by the parser.
1950 * sem_ch3.adb (Adjust_D): Renamed to Adjust_Decl.
1951 (Analyze_Declarations): Code reformatting. Analyze the contract
1952 of a subprogram body at the end of the declarative region.
1953 * sem_ch6.adb (Analyze_Generic_Subprogram_Body):
1954 Subprogram bodies can now have contracts. Use
1955 Expand_Subprogram_Contract to handle the various contract
1957 (Analyze_Subprogram_Body_Contract): New null routine.
1958 (Analyze_Subprogram_Body_Helper): Subprogram bodies can now have
1959 contracts. Use Expand_Subprogram_Contract to handle the various
1960 contract assertions.
1961 (Analyze_Subprogram_Contract): Add local
1962 variable Nam. Update the call to Analyze_PPC_In_Decl_Part. Capture
1963 the pragma name in Nam.
1964 (Process_PPCs): Removed.
1965 * sem_ch6.ads (Analyze_Subprogram_Body_Contract): New routine.
1966 (Analyze_Subprogram_Contract): Update the comment on usage.
1967 * sem_ch13.adb (Analyze_Aspect_Specifications): Add null
1968 implementations for aspects Refined_Depends and Refined_Global.
1969 (Check_Aspect_At_Freeze_Point): Aspects Refined_Depends and
1970 Refined_Global do not need to be checked at the freeze point.
1971 * sem_prag.adb: Add entries in table Sig_Flags
1972 for pragmas Refined_Depends and Refined_Global.
1973 (Analyze_Contract_Cases_In_Decl_Part): Add local
1974 variable Restore. Use Restore to pop the scope.
1975 (Analyze_Depends_In_Decl_Part): Add local variable Restore. Use
1976 Restore to pop the scope.
1977 (Analyze_Global_In_Decl_List): Add local variable Restore. Use Restore
1979 (Analyze_PPC_In_Decl_Part): Renamed to
1980 Analyze_Pre_Post_Condition_In_Decl_Part.
1982 Add null implementations for pragmas Refined_Depends and
1983 Refined_Global. Refined_Pre and Refined_Post are now
1984 handled by routine Analyze_Refined_Pre_Post_Condition
1986 (Analyze_Refined_Depends_In_Decl_Part): New
1988 (Analyze_Refined_Global_In_Decl_Part):
1990 (Analyze_Refined_Pre_Post):
1991 Renamed to Analyze_Refined_Pre_Post_Condition.
1992 (Analyze_Refined_Pre_Post_Condition): Analyze the boolean
1994 (Check_Precondition_Postcondition): Update the call
1995 to Analyze_PPC_In_Decl_Part.
1996 * sem_prag.ads: Add entries in table
1997 Pragma_On_Body_Or_Stub_OK for pragmas Refined_Depends
1999 (Analyze_PPC_In_Decl_Part): Renamed
2000 to Analyze_Pre_Post_Condition_In_Decl_Part. Update the
2002 (Analyze_Refined_Depends_In_Decl_Part): New routine.
2003 (Analyze_Refined_Global_In_Decl_Part): New routine.
2004 (Analyze_Test_Case_In_Decl_Part): Update the comment on usage.
2005 * sem_util.adb (Add_Contract_Item): Rename formal Item to Prag
2006 and update all occurrences. Subprogram body contracts can now
2007 contain pragmas Refined_Depends and Refined_Global.
2008 * sem_util.ads (Add_Contract_Item): Rename formal Item to
2009 Prag. Update the comment on usage.
2010 * sinfo.ads: Update the comment on structure and usage of
2012 * snames.ads-tmpl: Add new predefined names for Refined_Depends
2013 and Refined_Global. Add entries in table Pragma_Id for
2014 Refined_Depends and Refined_Global.
2016 2013-10-10 Robert Dewar <dewar@adacore.com>
2018 * types.ads: Minor reformatting.
2020 2013-10-10 Thomas Quinot <quinot@adacore.com>
2022 * s-taprop-posix.adb: Add missing comment.
2024 2013-10-10 Robert Dewar <dewar@adacore.com>
2026 * freeze.adb (Freeze_Record_Type): Move choice checking to
2027 Analyze_Freeze_Entity (Freeze_Record_Type): Make sure all choices
2029 * sem_case.adb (Check_Choices): Remove misguided attempt to
2030 freeze choices (this is now done in Freeze_Record_Type where
2032 (Check_Choices): Remove some analyze/resolve calls
2033 that are redundant since they are done in Analyze_Choices.
2034 * sem_ch13.adb (Analyze_Freeze_Entity): Do the error
2035 checking for choices in variant records here (moved here from
2036 Freeze.Freeze_Record_Type)
2038 2013-10-10 Thomas Quinot <quinot@adacore.com>
2040 * s-oscons-tmplt.c, s-taprop-posix.adb (CLOCK_REALTIME): Always define,
2041 possibly using a dummy placeholder value.
2042 (Compute_Deadline): For the case of an
2043 Absolute_Calendar deadline, if the target uses another clock
2044 than CLOCK_REALTIME as CLOCK_RT_Ada, compensate for possible
2047 2013-10-10 Ed Schonberg <schonberg@adacore.com>
2049 * sem_ch8.adb (Find_Expanded_Name): Handle properly a fully
2050 qualified reference to a generic child unit within itself,
2051 in an instantiation.
2053 2013-10-10 Pascal Obry <obry@adacore.com>
2055 * prj-conf.adb: Minor typo fixes in comment.
2057 2013-10-10 Thomas Quinot <quinot@adacore.com>
2059 * s-taprop-posix.adb (Compute_Deadline): New local subprogram,
2060 factors common code between Timed_Sleep and Timed_Delay.
2062 2013-10-10 Robert Dewar <dewar@adacore.com>
2064 * freeze.adb (Freeze_Record_Type): Don't replace others if
2065 expander inactive. This avoids clobbering the ASIS tree in
2068 2013-10-10 Robert Dewar <dewar@adacore.com>
2070 * sem_res.adb (Resolve_Op_Expon): Avoid crash testing for
2071 fixed-point case in preanalysis mode (error will be caught during
2074 2013-10-10 Robert Dewar <dewar@adacore.com>
2076 * gnat_rm.texi: Refined_Pre and Refined_Post are now allowed as
2077 assertion identifiers for pragma Assertion_Policy.
2078 * sem_prag.adb (Is_Valid_Assertion_Kind): Add Refined_Pre/Refined_Post
2079 * sem_ch13.adb: Minor reformatting.
2081 2013-10-10 Pascal Obry <obry@adacore.com>
2083 * prj-conf.adb: Code refactoring.
2085 2013-10-10 Hristian Kirtchev <kirtchev@adacore.com>
2087 * einfo.adb: Remove Integrity_Level from the node usage list.
2088 (Has_Option): Update the implementation to match
2089 the new terminology.
2090 (Has_Property): Renamed to Has_Option.
2091 (Integrity_Level): Removed.
2092 (Is_External_State): New routine.
2093 (Is_Input_Only_State): Use Has_Option to determine whether a state
2094 is Input_Only. (Is_Input_State): Renamed to Is_Input_Only_State.
2095 (Is_Output_Only_State): Use Has_Option to determine whether
2096 a state is Output_Only.
2097 (Is_Output_State): Renamed to
2098 Is_Output_Only_State.
2099 (Is_Volatile_State): Use Has_Option to determine whether a state is
2101 (Set_Integrity_Level): Removed.
2102 (Write_Field8): Remove the entry for Integrity_Level.
2103 * einfo.ads: Remove Integrity_Level along with its documentation
2104 and usage in nodes. Rename Is_Input_State to Is_Input_Only_State.
2105 Rename Is_Output_State to Is_Output_Only_State. Update the
2106 documentation of Is_Volatile_State. Update the node structure of
2108 (Integrity_Level): Removed along with pragma Inline.
2109 (Is_External_State): New routine.
2110 (Is_Input_State): Renamed to Is_Input_Only_State.
2111 (Is_Output_State): Renamed to Is_Output_Only_State.
2112 (Set_Integrity_Level): Removed along with pragma Inline.
2113 * sem_prag.adb (Analyze_Pragma): Update the checks regarding
2114 global items and abstract state modes. Update the implementation
2115 of pragma Abstract_State to reflect the new rules and terminology.
2116 * snames.ads-tmpl: Remove the predefined name for Integrity
2117 level. Add new predefined names for Input_Only, Non_Volatile,
2118 Output_Only and Part_Of.
2120 2013-10-10 Ed Schonberg <schonberg@adacore.com>
2122 * lib-xref.adb (Generate_Reference): Do not generate a reference
2123 within a _postcondition procedure: a proper source reference has
2124 already been generated when pre- analyzing the original aspect
2125 specification, and the use of a formal in a pre/postcondition
2126 should not count as a proper use in a subprogram body.
2128 2013-10-10 Robert Dewar <dewar@adacore.com>
2130 * sem_eval.adb (Why_Non_Static): Fix bomb for deferred constant
2133 2013-10-10 Hristian Kirtchev <kirtchev@adacore.com>
2135 * aspects.adb: Add an entry for Aspect_Refined_Post in table
2137 * aspects.ads: Add an entry for Aspect_Refined_Post in tables
2138 Aspect_Id, Aspect_Argument, Aspect_Names, Aspect_Delay,
2139 Aspect_On_Body_Or_Stub_OK. Update the comment on the use of
2140 table Aspect_On_Body_Or_Stub_OK.
2141 * par-prag.adb: Add pragma Refined_Post to the list of pragmas
2142 that do not require special processing by the parser.
2143 * sem_attr.adb (Analyze_Attribute): Add special analysis for
2144 attributes 'Old and 'Result when code generation is disabled and
2145 they appear in aspect/pragma Refined_Post.
2146 (In_Refined_Post): New routine.
2147 * sem_ch6.adb (Analyze_Expression_Function): Move various
2148 aspects and/or pragmas that apply to an expression function to the
2149 corresponding spec or body.
2150 (Collect_Body_Postconditions): New routine.
2151 (Process_PPCs): Use routine Collect_Body_Postconditions
2152 to gather all postcondition pragmas.
2153 * sem_ch10.adb (Analyze_Proper_Body): Use routine
2154 Relocate_Pragmas_To_Body to move all source pragmas that follow
2155 a body stub to the proper body.
2156 (Move_Stub_Pragmas_To_Body): Removed.
2157 * sem_ch13.adb (Analyze_Aspect_Specifications): Add processing
2158 for aspect Refined_Post.
2159 (Check_Aspect_At_Freeze_Point): Aspect
2160 Refined_Post does not need delayed processing at the freeze point.
2161 * sem_prag.adb: Add an entry for pragma Refined_Post in
2163 (Analyze_Pragma): Add processing for pragma
2164 Refined_Post. Update the processing of pragma Refined_Pre
2165 to use common routine Analyze_Refined_Pre_Post.
2166 (Analyze_Refined_Pre_Post): New routine.
2167 (Relocate_Pragmas_To_Body): New routine.
2168 * sem_prag.ads: Table Pragma_On_Stub_OK is now known as
2169 Pragma_On_Body_Or_Stub_OK. Update the comment on usage of
2170 table Pragma_On_Body_Or_Stub_OK.
2171 (Relocate_Pragmas_To_Body): New routine.
2172 * snames.ads-tmpl: Add new predefined name for Refined_Post. Add
2173 new Pragma_Id for Refined_Post.
2175 2013-10-10 Robert Dewar <dewar@adacore.com>
2177 * exp_ch3.adb (Expand_N_Variant_Part): Now null, expansion of
2178 last choice to others is moved to Freeze_Record_Type.
2179 * freeze.adb (Freeze_Record_Type): Expand last variant to others
2180 if necessary (moved here from Expand_N_Variant_Part
2182 2013-10-10 Robert Dewar <dewar@adacore.com>
2184 * lib-xref-spark_specific.adb, par-ch13.adb, sem_prag.adb, sem_prag.ads,
2185 sem_ch12.adb, sem_attr.adb, sem_ch6.adb, sem_ch13.adb, a-sequio.adb,
2186 s-atocou-builtin.adb: Minor reformatting.
2188 2013-10-10 Thomas Quinot <quinot@adacore.com>
2190 * s-oscons-tmplt.c (NEED_PTHREAD_CONDATTR_SETCLOCK): This
2191 constant needs to be output to s-oscons.h, as it is tested
2194 2013-10-10 Robert Dewar <dewar@adacore.com>
2196 * exp_ch3.adb (Expand_N_Variant_Part): Don't expand choices, too early
2197 * exp_ch5.adb (Expand_N_Case_Statement): Use new Has_SP_Choice
2198 flag to avoid expanding choices when not necessary.
2199 * exp_util.adb: Minor reformatting
2200 * freeze.adb (Freeze_Record_Type): Redo expansion of variants
2201 * sem_aggr.adb: Minor reformatting
2202 * sem_case.ads, sem_case.adb: Major rewrite, separating Analysis and
2203 Checking of choices.
2204 * sem_ch3.adb (Analyze_Variant_Part): Rewrite to call new
2206 * sem_ch4.adb (Analyze_Case_Expression): Call Analyze_Choices
2208 * sem_ch5.adb (Analyze_Case_Statement): Call Analyze_Choices
2210 * sem_util.adb: Minor reformatting
2211 * sinfo.ads, sinfo.adb (Has_SP_Choice): New flag.
2213 2013-10-10 Vincent Celier <celier@adacore.com>
2215 * mlib-prj.adb (Build_Library): Do not issue link dynamic
2216 libraries with an Rpath, if switch -R was used.
2218 2013-10-10 Tristan Gingold <gingold@adacore.com>
2220 * s-stalib.ads (Image_Index_Table_8, Image_Index_Table_16,
2221 Image_Index_Table_32): Remove as not used.
2222 * s-imgint.adb (Image_Integer): Call Set_Image_Integer and
2223 remove duplicated code.
2225 2013-10-10 Hristian Kirtchev <kirtchev@adacore.com>
2227 * sem_prag.adb (Analyze_Pragma): Provide a
2228 more precise error message when pragma Refined_Pre applies to
2229 an expression function that is not a completion.
2231 2013-10-10 Thomas Quinot <quinot@adacore.com>
2233 * sem_attr.adb (Analyse_Attribute, case
2234 Attribute_Scalar_Storage_Order): a 'Scalar_Storage_Order attribute
2235 reference for a generic type is permitted in GNAT runtime mode.
2236 * a-sequio.adb (Read, Write): Use the endianness of the actual
2237 type to encode length information written to the file.
2239 2013-10-10 Ed Schonberg <schonberg@adacore.com>
2241 * par-ch13.adb (Aspect_Specifications_Present)): In earlier than
2242 Ada2012 mode, assume that a legal aspect name following "with"
2243 keyword is an older gnat switch and not a misplaced with_clause.
2245 2013-10-10 Hristian Kirtchev <kirtchev@adacore.com>
2247 * aspects.adb: Add an entry for Aspect_Refined_Pre in
2248 table Canonical_Aspect.
2249 (Aspects_On_Body_OK): Renamed to
2250 Aspects_On_Body_Or_Stub_OK.
2251 (Aspects_On_Body_Or_Stub_OK):
2252 Update the query in table Aspect_On_Body_OK.
2253 * aspects.ads: Add an entry for Aspect_Refined_Pre in tables
2254 Aspect_Id, Aspect_Argument, Aspect_Names, Aspect_Delay,
2255 Aspect_On_Body_Or_Stub_OK. Table Aspect_On_Body_OK is now known as
2256 Aspect_On_Body_Or_Stub_OK. Add a section of aspect specifications
2257 that apply to body stubs.
2258 (Aspects_On_Body_OK): Renamed to Aspects_On_Body_Or_Stub_OK.
2259 (Aspects_On_Body_Or_Stub_OK): Update the comment on usage.
2260 * par-prag.adb: Add pragma Refined_Pre to the list of pragmas
2261 that do not require special processing by the parser.
2262 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Delay the
2263 analysis of aspect specifications that apply to a body stub
2264 until the proper body is analyzed.
2265 * sem_ch10.adb: Add with and use clause for Sem_Ch13.
2266 (Analyze_Package_Body_Stub): Set the corresponding spec of the stub.
2267 (Analyze_Proper_Body): Relocate all pragmas that apply
2268 to a subprogram body stub to the declarations of the proper
2269 body. Analyze the aspect specifications of the stub when the
2270 proper body is not present.
2271 (Analyze_Protected_Body_Stub): Set the corresponding spec of the stub.
2272 (Analyze_Task_Body_Stub): Set the corresponding spec of the stub.
2273 (Move_Stub_Pragmas_To_Body): New routine.
2274 * sem_ch13.adb (Analyze_Aspect_Specifications): Add processing
2275 for aspect Refined_Pre.
2276 (Check_Aspect_At_Freeze_Point): Aspect
2277 Refined_Pre does not need delayed processing at the freeze point.
2278 * sem_prag.adb: Remove with and use clause for Snames. Add
2279 an entry for Pragma_Refined_Pre in table Sig_Flags.
2280 (Analyze_Pragma): Add processing for pragma Refined_Pre.
2281 * sem_prag.ads: Add with and use clause for Snames. Add table
2283 * sinfo.adb (Corresponding_Spec_Of_Stub): New routine.
2284 (Set_Corresponding_Spec_Of_Stub): New routine.
2285 * sinfo.ads: Add new attribute Corresponding_Spec_Of_Stub
2286 along with comment on usage and occurrences in nodes.
2287 (Corresponding_Spec_Of_Stub): New routine along with pragma
2289 (Set_Corresponding_Spec_Of_Stub): New routine along
2291 * snames.ads-tmpl: Add new predefined name for Refined_Pre. Add
2292 new Pragma_Id for Refined_Pre.
2294 2013-10-10 Ed Schonberg <schonberg@adacore.com>
2296 * sem_ch12.adb (Analyze_Package_Instantiation,
2297 Analyze_Subprogram_Instantiation): Improve error message when
2298 name in instantiation does not designate a generic unit of the
2301 2013-10-10 Robert Dewar <dewar@adacore.com>
2303 * exp_ch3.adb (Expand_N_Variant_Part): Expand statically
2304 predicated subtype which appears in Discrete_Choices list.
2305 * exp_ch5.adb (Expand_N_Case_Statement): Expand statically
2306 predicated subtype which appears in Discrete_Choices list of
2307 case statement alternative.
2308 * exp_util.ads, exp_util.adb (Expand_Static_Predicates_In_Choices): New
2310 * sem_case.adb: Minor reformatting (Analyze_Choices): Don't
2311 expand out Discrete_Choices that are names of subtypes with
2312 static predicates. This is now done in the analyzer so that the
2313 -gnatct tree is properly formed for ASIS.
2314 * sem_case.ads (Generic_Choices_Processing): Does not apply
2315 to aggregates any more, so change doc accordingly, and remove
2316 unneeded Get_Choices argument.
2317 * sem_ch3.adb (Analyze_Variant_Part): Remove no
2318 longer used Get_Choices argument in instantiation of
2319 Generic_Choices_Processing.
2320 * sem_ch4.adb (Analyze_Case_Expression): Remove no
2321 longer used Get_Choices argument in instantiation of
2322 Generic_Choices_Processing.
2323 * sem_ch5.adb (Analyze_Case_Statement): Remove no
2324 longer used Get_Choices argument in instantiation of
2325 Generic_Choices_Processing.
2326 * sinfo.ads: For N_Variant_Part, and N_Case_Statement_Alternative,
2327 document that choices that are names of statically predicated
2328 subtypes are expanded in the code generation tree passed to the
2329 back end, but not in the ASIS tree generated for -gnatct.
2331 2013-10-10 Ed Schonberg <schonberg@adacore.com>
2333 * sem_ch7.adb: Revert previous change.
2335 2013-10-10 Gary Dismukes <dismukes@adacore.com>
2337 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): In the case where
2338 the Storage_Pool aspect is specified by an aspect clause and a
2339 renaming is used to capture the evaluation of the pool name,
2340 insert the renaming in front of the aspect's associated entity
2341 declaration rather than in front of the corresponding attribute
2342 definition (which hasn't been appended to the declaration
2345 2013-10-10 Ed Schonberg <schonberg@adacore.com>
2347 * sem_ch6.adb (Is_Interface_Conformant): The controlling type
2348 of the interface operation is obtained from the ultimate alias
2349 of the interface primitive parameter, because that may be in
2350 fact an implicit inherited operation whose signature involves
2351 the type extension and not the desired interface.
2353 2013-10-10 Ed Schonberg <schonberg@adacore.com>
2355 * par-ch13.adb (Aspect_Specifications_Present): In Ada 2012,
2356 recognize an aspect specification with a misspelled name if it
2357 is followed by a a comma or semicolon.
2359 2013-10-10 Vadim Godunko <godunko@adacore.com>
2361 * s-atocou.adb, s-atocou.ads, s-atocou-x86.adb, s-atocou-builtin.adb:
2362 Fix copyright notice.
2364 2013-10-10 Yannick Moy <moy@adacore.com>
2366 * lib-xref-spark_specific.adb (Enclosing_Subprogram_Or_Package): Get
2367 enclosing subprogram for precondition/postcondition/contract cases.
2369 2013-10-10 Robert Dewar <dewar@adacore.com>
2371 * gnat_rm.texi: Minor fix.
2373 2013-10-10 Robert Dewar <dewar@adacore.com>
2375 * sem_ch13.adb (Analyze_Attribute_Definition_Clause, case
2376 Address): Remove the Comes_From_Source test for the overlap
2379 2013-10-10 Robert Dewar <dewar@adacore.com>
2381 * sem_util.adb: Minor code reorganization (use Nkind_In).
2382 * sem_warn.adb: Minor code reorganization (optimization in
2383 Check_Unset_Reference).
2384 * exp_ch9.adb, exp_ch4.adb, sinfo.ads: Minor reformatting.
2386 2013-10-10 Ed Schonberg <schonberg@adacore.com>
2388 * sem_ch7.adb (Install_Parent_Private_Declarations): When
2389 instantiating a child unit, do not install private declaration of
2390 a non-generic ancestor of the generic that is also an ancestor
2391 of the current unit: its private part will be installed when
2392 private part of ancestor itself is analyzed.
2394 2013-10-10 Thomas Quinot <quinot@adacore.com>
2396 * freeze.adb (Check_Component_Storage_Order): Retrieve component
2397 aliased status from type entities directly instead of going back
2398 to original component definition.
2399 * sem_ch7.adb: Minor reformatting.
2401 2013-10-10 Robert Dewar <dewar@adacore.com>
2403 * sem_ch13.adb (Analyze_Aspect_Specifications): For Address
2404 attribute, consider it to be set in source, because of aliasing
2406 (Analyze_Attribute_Definition_Clause): For the
2407 purpose of warning on overlays, take into account the aspect case.
2409 2013-10-10 Robert Dewar <dewar@adacore.com>
2411 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads, a-cforse.ads,
2412 a-cofove.ads: Minor reformatting.
2414 2013-10-10 Arnaud Charlet <charlet@adacore.com>
2416 * gnat_ugn.texi: Remove obsolete mention to -laddr2line.
2418 2013-10-10 Ed Schonberg <schonberg@adacore.com>
2420 * exp_ch4.adb (Expand_N_Case_Expression): Indicate that the
2421 generated variable used as a target of the expression needs
2424 2013-10-10 Jose Ruiz <ruiz@adacore.com>
2426 * exp_util.adb (Corresponding_Runtime_Package): Remove the condition
2427 related to No_Dynamic_Attachment which was wrong. Protected types
2428 with interrupt handlers (when not using a restricted profile)
2429 are always treated as protected types with entries, regardless
2430 of the No_Dynamic_Attachment restriction.
2431 * exp_ch9.adb (Expand_N_Protected_Type_Declaration): Simplify the code
2432 using the result of Corresponding_Runtime_Package.
2433 (Install_Private_Data_Declarations): When having
2434 static handlers and a non restricted profile, we use the
2435 type Static_Interrupt_Protection always, so we removed an
2436 extra wrong condition looking at the No_Dynamic_Attachment
2437 restriction. Simplify the code using the result of
2438 Corresponding_Runtime_Package.
2439 (Make_Initialize_Protection): Simplify the code using
2440 the result of Corresponding_Runtime_Package.
2441 (Install_Private_Data_Declaration): The No_Dynamic_Attachment
2442 restriction has nothing to do with static handlers. Remove the extra
2443 erroneous condition that was creating the wrong data type.
2445 2013-10-10 Hristian Kirtchev <kirtchev@adacore.com>
2447 * sem_util.adb (Is_Object_Reference): Attribute
2448 'Old produces an object reference.
2449 * gnat_rm.texi: Define accessibility level of
2450 X'Update(...) result.
2452 2013-10-10 Yannick Moy <moy@adacore.com>
2454 * gnat_rm.texi, a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
2455 a-cforse.ads, a-cofove.ads: Update comment and doc of formal containers
2457 2013-10-10 Ed Schonberg <schonberg@adacore.com>
2459 * sem_ch13.adb (Analyze_Aspect_Specifications): For Pre/Post
2460 conditions that apply to a subprogram body, preserve the placement
2461 and order of the generated pragmas, which must appear before
2462 other declarations in the body.
2464 2013-10-10 Bob Duff <duff@adacore.com>
2466 * gnat_ugn.texi: Add gnat2xml doc.
2468 2013-10-10 Doug Rupp <rupp@adacore.com>
2470 * s-vxwork-arm.ads: Fix interface to FP_CONTEXT.
2472 2013-10-10 Ed Schonberg <schonberg@adacore.com>
2474 * sem_ch13.adb (Analyze_Aspect_Specification): An aspect Import
2475 on a variable need not have a convention specified, as long as
2476 the implicit convention of the object, obtained from its type,
2477 is Ada or Ada-related.
2479 2013-10-10 Robert Dewar <dewar@adacore.com>
2481 * cstand.adb (Standard_Unsigned_64): New internal type.
2482 * gnat_rm.texi: Update documentation on To_Address.
2483 * sem_attr.adb (Analyze_Attribute, case To_Address): Fix
2484 problem with out of range static values given as literals or
2486 * stand.ads (Standard_Unsigned_64): New internal type.
2487 * stand.adb: Minor reformatting.
2489 2013-10-10 Ed Schonberg <schonberg@adacore.com>
2491 * sem_ch4.adb (Analyze_Selected_Component,
2492 Has_Mode_Conformant_Spec): If selected component may be an
2493 indexing of a parameterless call to a protected function, and
2494 expansion is disabled, this is a valid candidate interpretation.
2496 2013-10-10 Arnaud Charlet <charlet@adacore.com>
2498 * gnat_ugn.texi: Minor editing.
2500 2013-10-10 Robert Dewar <dewar@adacore.com>
2502 * gnatlink.adb: Minor reformatting.
2504 2013-10-10 Yannick Moy <moy@adacore.com>
2506 * debug.adb: Free flag d.E and change doc for flag d.K.
2508 2013-10-10 Ed Schonberg <schonberg@adacore.com>
2510 * sem_prag.adb (Check_Precondition_Postcondition): If the
2511 pragma comes from an aspect spec, and the subprogram is a
2512 library unit, treat as a ppc in a declarative part in ASIS mode,
2513 so that expression in aspect is properly analyzed. In this case
2514 there is no later point at which the aspect specification would
2517 2013-10-10 Bob Duff <duff@adacore.com>
2519 * opt.ads: Minor comment fix.
2521 2013-10-10 Vadim Godunko <godunko@adacore.com>
2523 * a-coinho-shared.ads, a-coinho-shared.adb: New file.
2524 * s-atocou.ads: Add procedure to initialize counter.
2525 * s-atocou.adb: Likewise.
2526 * s-atocou-builtin.adb: Likewise.
2527 * s-atocou-x86.adb: Likewise.
2528 * gcc-interface/Makefile.in: Select special version of
2529 Indefinite_Holders package on platforms where atomic built-ins
2530 are supported. Update tools target pairs for PikeOS.
2532 2013-10-10 Robert Dewar <dewar@adacore.com>
2534 * sem_ch3.adb: Minor reformatting.
2536 2013-10-10 Robert Dewar <dewar@adacore.com>
2538 * sinput-c.adb (Load_File): Ensure Source_Align alignment.
2539 * sinput-d.adb (Create_Debug_Source): Ensure Source_Align alignment.
2540 * sinput-l.adb (Create_Instantiation_Source): Ensure Source_Align
2543 * sinput.ads, sinput.adb (Get_Source_File_Index): New optimized (single
2545 * types.ads (Source_Align): New definition.
2546 (Source_Buffer): Document new alignment requirement.
2548 2013-10-10 Robert Dewar <dewar@adacore.com>
2550 * sem_prag.adb (Analyze_Pragma, case Linker_Section): Allow
2553 2013-10-10 Robert Dewar <dewar@adacore.com>
2555 * gnat_rm.texi: Minor adjustment to doc for To_Address attribute.
2557 2013-10-10 Vadim Godunko <godunko@adacore.com>
2559 * s-stopoo.ads (Root_Storage_Pool): Add pragma
2560 Preelaborable_Initialization.
2562 2013-09-25 Tom Tromey <tromey@redhat.com>
2564 * gcc-interface/Makefile.in (OUTPUT_OPTION): Define as "-o $@".
2566 2013-09-18 Eric Botcazou <ebotcazou@adacore.com>
2569 * gcc-interface/trans.c (Attribute_to_gnu): Define GNAT_PREFIX local
2570 variable and use it throughout.
2571 <Attr_Length>: Note whether the prefix is the dereference of a pointer
2572 to unconstrained array and, in this case, capture the result for both
2573 Attr_First and Attr_Last.
2575 2013-09-18 Eric Botcazou <ebotcazou@adacore.com>
2577 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Abstract_State>: New.
2579 2013-09-18 Eric Botcazou <ebotcazou@adacore.com>
2581 * gcc-interface/trans.c (gigi): Remove dead code.
2583 2013-09-18 Eric Botcazou <ebotcazou@adacore.com>
2585 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Pop the stack of
2586 return variables for subprograms using the CICO mechanism.
2588 2013-09-13 Dominique Dhumieres <dominiq@lps.ens.fr>
2590 * gcc-interface/Makefile.in: Fix darwin Filter to match on $target_os,
2593 2013-09-11 Thomas Schwinge <thomas@codesourcery.com>
2594 Olivier Hainque <hainque@adacore.com>
2596 * gcc-interface/Makefile.in: Import target_cpu, target_vendor,
2597 target_os and their host_ counterparts. Remove host_canonical and
2598 target_cpu_default, unused. Remove local ad-hoc computations of
2599 "host", "targ", "arch", "osys" and "manu". Replace uses of these by
2600 uses of the now imported family, hence back to filters against
2601 canonical values. Remove filters on e500 for target_cpu, expected to
2602 be canonicalized into powerpc. Invert the logic filtering on 64bit
2603 sparc for VxWorks. Simplify the filtering logic for bareboard tools
2604 target pairs, now using straight elf/eabi filters on the target_os
2607 2013-09-10 Ed Schonberg <schonberg@adacore.com>
2609 * sem_ch3.adb (Replace_Anonymoous_Access_To_Protected_Subprogram): If
2610 the return type is itself an access to function, recurse to emit
2611 another anonymous type.
2612 * gcc-interface/Make-lang.in: Update dependencies.
2614 2013-09-10 Robert Dewar <dewar@adacore.com>
2616 * err_vars.ads (Warning_Doc_Switch): Ignored in VMS mode.
2617 * errout.adb (Warning_Doc_Switch): Ignored in VMS mode.
2618 * errout.ads (Warning_Doc_Switch): Ignored in VMS mode.
2619 * inline.ads (Warnings): New component in Pending_Body_Info.
2620 * sem_ch12.adb (Pending_Body_Info): Save and restore warnings
2621 at instantiation point.
2622 * warnsw.adb (Save_Warnings): New function (Restore_Warnings):
2623 New procedure Remove special handling of Warning_Doc_Switch,
2624 cleaner to handle the VMS case in errout, than to introduce
2625 undocumented oddities here.
2626 * warnsw.ads (Warning_Record) : New type.
2627 (Save_Warnings): New function.
2628 (Restore_Warnings): New procedure.
2630 2013-09-10 Robert Dewar <dewar@adacore.com>
2632 * sinput.adb (Check_For_BOM): Avoid reading past end of file.
2634 2013-09-10 Robert Dewar <dewar@adacore.com>
2636 * errout.adb (Error_Msg_Ada_2012_Feature): New procedure.
2637 * errout.ads (Error_Msg_Ada_2012_Feature): New procedure.
2638 * inline.ads: Save/Restore Ada_Version_Pragma.
2639 * opt.adb: Save/Restore Ada_Version_Pragma.
2640 * opt.ads (Ada_Version_Pragma): New variable.
2641 * par-ch11.adb, par-ch12.adb, par-ch13.adb, par-ch4.adb, par-ch5.adb,
2642 par-ch6.adb, par-ch8.adb, par-prag.adb: Use Error_Msg_Ada_2012_Feature.
2643 * prj.adb: Initialize Ada_Version_Pragma.
2644 * sem_attr.adb: Use Error_Msg_Ada_2012_Feature.
2645 * sem_ch12.adb, sem_ch8.adb: Save/restore Ada_Version_Pragma.
2646 * sem_prag.adb (Analyze_Pragma, cases Ada_xx): Set Ada_Version_Pragma.
2647 * switch-c.adb: Initialize Ada_Version_Pragma.
2648 * sem_ch12.adb: Minor reformatting.
2650 2013-09-10 Ed Schonberg <schonberg@adacore.com>
2652 * sem_ch3.adb (Process_Subtype): Discard constraint on access
2653 to class-wide type. Such constraints are not supported and are
2654 considered a language pathology.
2656 2013-09-10 Robert Dewar <dewar@adacore.com>
2658 * gnatbind.adb: Correct starting date in --version string.
2659 * gnatdll.adb: Use Check_Version_And_Help_G to implement --help
2661 * gnatkr.adb: Use Check_Version_And_Help_G to implement --help
2663 * gnatlink.adb: Correct starting date in --version string.
2664 * gnatls.adb: Correct starting date in --version string.
2665 * make.adb: Correct starting date in --version string.
2667 2013-09-10 Robert Dewar <dewar@adacore.com>
2669 * switch-c.adb: Minor reformatting.
2670 * atree.ads (Original_Nodes): Add documentation on ASIS usage.
2671 * sinfo.ads: Add section on ASIS mode (documentation only).
2673 2013-09-10 Robert Dewar <dewar@adacore.com>
2675 * sem_prag.adb (Analyze_Pragma, case Warnings): Don't allow
2676 REASON parameter in compiler units (bootstrap issues).
2678 2013-09-10 Robert Dewar <dewar@adacore.com>
2680 * gnat1drv.adb (Adjust_Global_Switches): Output warning if
2681 -gnateE specified for a target that does not support it.
2683 2013-09-10 Ed Schonberg <schonberg@adacore.com>
2685 * sem_prag.adb (Analyze_Pragma, case SPARK_Mode): Handle properly
2686 a subprogram body without previous spec.
2688 2013-09-10 Gary Dismukes <dismukes@adacore.com>
2690 * sem_ch4.adb: Minor typo fixes.
2692 2013-09-10 Hristian Kirtchev <kirtchev@adacore.com>
2694 * aspects.adb (Aspects_On_Body_OK): New routine.
2695 * aspects.ads: Modify type Aspect_Expression to include
2696 the Optional_XXX variants. Update the contents of
2697 table Aspect_Argument. Add table Aspect_On_Body_OK.
2698 (Aspects_On_Body_OK): New routine.
2699 * par-ch13.adb (Get_Aspect_Specifications): Account for optional
2700 names and expressions when parsing an aspect.
2701 * sem_ch6.adb: Add with and use clause for Aspects.
2702 (Analyze_Subprogram_Body_Helper): Do not emit an error when
2703 analyzing a body with aspects that can be applied simultaneously
2704 to both spec and body.
2705 * sem_ch13.adb (Analyze_Aspect_Specifications): Insert the
2706 corresponding pragma of an aspect that applies to a subprogram
2707 body in the declarative part.
2708 (Make_Aitem_Pragma): Do not generate a pragma with an empty argument
2711 2013-09-10 Robert Dewar <dewar@adacore.com>
2713 * switch-c.adb: Diagnose -gnatc given after -gnatRm.
2714 * gnat_ugn.texi: Add documentation for -gnatRm.
2715 * usage.adb: Minor reorganization (put style entries in proper
2716 order) Document -gnatRm switch.
2717 * sinfo.ads: Minor comment fix.
2719 2013-09-10 Sergey Rybin <rybin@adacore.com frybin>
2721 * tree_io.ads: Update ASIS_Version_Number.
2723 2013-09-10 Ed Schonberg <schonberg@adacore.com>
2725 * sem_ch3.adb (Access_Subprogram_Declaration): Check whether the
2726 designated type can appear in a parameterless call.
2727 * sem_ch4.adb (Analyze_Call): Do not insert an explicit dereference
2728 in the case of an indirect call through an access function that
2729 returns an array type.
2730 (Analyze_One_Call): Handle properly legal parameterless calls
2731 whose result is indexed, in constructs of the for F.all (I)
2732 * sem_ch6.ads (May_Need_Actuals): Make public, for use on access
2733 to subprogram types.
2734 * sem_res.adb (Resolve_Call): If the call is indirect, there is
2735 no entity to set on the name in the call.
2737 2013-09-10 Hristian Kirtchev <kirtchev@adacore.com>
2739 * aspects.adb: Add entries in the Has_Aspect_Specifications_Flag
2740 table for package body and body stubs.
2741 (Move_Or_Merge_Aspects): New routine.
2742 (Remove_Aspects): New routine.
2743 * aspects.ads (Move_Aspects): Update comment on usage.
2744 (Move_Or_Merge_Aspects): New routine.
2745 (Remove_Aspects): New routine.
2746 * par-ch3.adb: Update the grammar of private_type_declaration,
2747 private_extension_declaration, object_renaming_declaration,
2748 and exception_renaming_declaration.
2749 (P_Subprogram): Parse the
2750 aspect specifications that apply to a body stub.
2751 * par-ch6.adb: Update the grammar of subprogram_body_stub and
2752 generic_instantiation.
2753 * par-ch7.adb: Update the grammar of package_declaration,
2754 package_specification, package_body, package_renaming_declaration,
2756 (P_Package): Parse the aspect specifications
2757 that apply to a body, a body stub and package renaming.
2758 * par-ch9.adb: Update the grammar of entry_declaration,
2759 protected_body, protected_body_stub, task_body,
2761 (P_Protected): Add local variable
2762 Aspect_Sloc. Add local constant Dummy_Node. Parse the aspect
2763 specifications that apply to a protected body and a protected
2765 (P_Task): Add local variable Aspect_Sloc. Add local
2766 constant Dummy_Node. Parse the aspect specifications that apply
2767 to a task body and a task body stub.
2768 * par-ch12.adb: Update the grammar of
2769 generic_renaming_declaration.
2770 (P_Generic): Parse the aspect
2771 specifications that apply to a generic renaming.
2772 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Do not emit
2773 an error when analyzing aspects that apply to a body stub. Such
2774 aspects are relocated to the proper body.
2775 * sem_ch7.adb (Analyze_Package_Body_Helper): Analyze the aspect
2776 specifications that apply to a body.
2777 * sem_ch9.adb (Analyze_Protected_Body): Warn about user-defined
2778 aspects not being supported on protected bodies. Remove the
2779 aspect specifications. (Analyze_Single_Protected_Declaration):
2780 Analyze the aspects that apply to a single protected declaration.
2781 (Analyze_Task_Body): Warn about user-defined aspects not being
2782 supported on task bodies. Remove the aspect specifications.
2783 * sem_ch10.adb: Add with and use clause for Aspects.
2784 (Analyze_Package_Body_Stub): Propagate the aspect specifications
2785 from the stub to the proper body.
2786 * sem_ch13.adb (Analyze_Aspect_Specifications): Insert the
2787 corresponding pragma of an aspect that applies to a body in the
2788 declarations of the body.
2789 * sinfo.ads: Update the gramma of expression_function,
2790 private_type_declaration, private_extension_declaration,
2791 object_renaming_declaration, exception_renaming_declaration,
2792 package_renaming_declaration, subprogram_renaming_declaration,
2793 generic_renaming_declaration, entry_declaration,
2794 subprogram_body_stub, package_body_stub, task_body_stub,
2795 generic_subprogram_declaration.
2797 2013-09-10 Hristian Kirtchev <kirtchev@adacore.com>
2799 * sem_prag.adb (Analyze_Pragma): Add processing
2800 for aspect/pragma SPARK_Mode when it applies to a [library-level]
2801 subprogram or package [body].
2803 2013-09-10 Robert Dewar <dewar@adacore.com>
2805 * gnat_ugn.texi: Document that -gnatc and -gnatR cannot be
2807 * switch-c.adb (Scan_Front_End_Switches): Give error if both
2808 -gnatR and -gnatc given.
2810 2013-09-10 Robert Dewar <dewar@adacore.com>
2812 * g-table.ads, g-table.adb (For_Each): New generic procedure
2813 (Sort_Table): New generic procedure.
2815 2013-09-10 Thomas Quinot <quinot@adacore.com>
2817 * adaint.c (__gnat_is_executable_file_attr): Should be true
2818 for an executable regular file only only (not for a directory
2819 that has the executable permission).
2821 2013-09-10 Ed Schonberg <schonberg@adacore.com>
2823 * sem_res.adb: Further work on operator calls in ASIS.
2825 2013-09-10 Yannick Moy <moy@adacore.com>
2827 * sinfo.ads, sem_prag.ads, sem_ch13.adb: Minor correction and comment
2830 2013-09-10 Thomas Quinot <quinot@adacore.com>
2832 * aspects.ads, sem_ch13.adb: Minor reformatting.
2833 * adaint.c (__gnat_set_close_on_exec): Add comment documenting
2834 that this routine is shared between OS_Lib and Sockets.
2836 2013-09-10 Robert Dewar <dewar@adacore.com>
2838 * exp_prag.adb (Expand_Pragma_Check): Ignore pragma if Is_Ignored set.
2839 * sem_ch13.adb (Make_Aitem_Pragma): Set Is_Checked if needed.
2840 * sem_prag.adb (Check_Kind): Moved from spec (Analyze_Pragma):
2841 Make sure Is_Ignored/Is_Checked are set right (Analyze_Pragma,
2842 case Check): Ditto (Check_Applicable_Policy): Handle
2843 Statement_Assertion case Throughout, set and check the Is_Checked
2844 flag as appropriate.
2845 * sem_prag.ads (Check_Kind): Moved to body.
2846 * sinfo.ads, sinfo.adb (Is_Checked): New flag.
2848 2013-09-10 Robert Dewar <dewar@adacore.com>
2850 * aspects.ads (Delay_Type): New type (Aspect_Delay): New table.
2851 * einfo.adb (Has_Delayed_Rep_Aspects): New flag
2852 (May_Inherit_Delayed_Rep_Aspects): New flag (Rep_Clause): Removed
2853 (use Get_Attribute_Representation_Clause).
2854 * einfo.ads (Has_Delayed_Rep_Aspects): New flag
2855 (May_Inherit_Delayed_Rep_Aspects): New flag
2856 * freeze.adb: Minor reformatting
2857 * sem_ch13.adb (Analyze_Aspect_Speficifications): Redo
2858 handling of delayed evaluation, including optimizing some cases
2859 and avoiding delays.
2860 (Analyze_Aspects_At_Freeze_Point): Now
2861 handled inheriting delayed rep aspects for type derivation case.
2862 (Inherit_Delayed_Rep_Aspects): New procedure
2863 * sem_ch13.ads (Analyze_Aspects_At_Freeze_Point): Now handled
2864 inheriting delayed rep aspects for type derivation case.
2865 * sem_ch3.adb (Build_Derived_Type): Set
2866 May_Inherit_Derived_Rep_Aspects if parent type flag
2867 Has_Delayed_Rep_Aspects is set
2869 2013-09-10 Robert Dewar <dewar@adacore.com>
2871 * errout.adb (Finalize): Don't delete real errors with specific
2874 2013-09-10 Ed Schonberg <schonberg@adacore.com>
2876 * exp_ch9.adb (Expand_N_Timed_Entry_Call,
2877 Expand_N_Conditional_Entry_Call, Expand_N_Asynchronous_Select):
2878 Handle properly a trigger that is a call to a primitive operation
2879 of a type that implements a limited interface, if the type itself
2882 2013-09-10 Robert Dewar <dewar@adacore.com>
2884 * sem_ch3.adb, sinfo.ads, exp_ch9.adb, sem_prag.adb, sem_ch12.adb,
2885 exp_ch4.adb, sprint.adb: Minor reformatting.
2887 2013-09-10 Yannick Moy <moy@adacore.com>
2889 * sinfo.ads: Document splitting of pre/post in N_Contract description.
2891 2013-09-10 Ed Schonberg <schonberg@adacore.com>
2893 * exp_ch4.adb (Expand_N_Op_Multiply): If the operation is of the
2894 form X * 2 ** N and it has been marked Is_Power_Of_2_For_Shift,
2895 add a mod operation if the result type is a binary modular type.
2897 2013-09-10 Hristian Kirtchev <kirtchev@adacore.com>
2899 * sem_prag.adb (Check_Mode_Restriction_In_Enclosing_Context): Add local
2900 variable Context. Remove local variable Subp_Id. Start the
2901 context traversal from the current subprogram rather than the
2902 current scope. Update the scope traversal and error reporting.
2904 2013-09-10 Ed Schonberg <schonberg@adacore.com>
2906 * exp_ch9.adb (Expand_N_Timed_Entry_Call): New procedure
2907 Rewrite_Triggering_Statements, to encapsulate the statements that
2908 follow the trigger of the entry call. This procedure is needed
2909 when the trigger is a dispatching call, because the expansion
2910 requires several copies of those statements. The procedure is
2911 more efficient, and preserves non-local references when the
2912 construct is within an instance.
2914 2013-09-10 Ed Schonberg <schonberg@adacore.com>
2916 * sem_ch12.adb (Analyze_Package_Instantiation): If the
2917 instantiation is a compilation unit, analyze aspects before
2918 analyzing the package declaration for the instance.
2919 * sem_ch13.adb (Analyze_Aspect_Specifications): If the
2920 corresponding node is a package instantiation, insert generated
2921 pragmas at the head of visible declarations.
2922 * sem_prag.adb (Analyze_Pragma, case Preelaborate): In an instance
2923 do not ignore the pragma if it comes from an aspect specification
2924 in the instance, and not from the generic unit.
2925 * sprint.adb (Sprint_Node_Actual): For a package declaration that
2926 is an instantiation, print aspects after declaration.
2928 2013-09-10 Robert Dewar <dewar@adacore.com>
2930 * einfo.adb, sem_prag.adb, rtsfind.ads: Minor reformatting.
2932 2013-09-10 Hristian Kirtchev <kirtchev@adacore.com>
2934 * sem_prag.adb (Get_SPARK_Mode_Id): Handle the
2935 case where the pragma may appear without an argument.
2936 (Analyze_Global_List): Add expanded_name to the list of constructs
2937 that denote a single item.
2938 (Collect_Global_List): Add expanded_name to the list of constructs
2939 that denote a single item.
2941 2013-09-10 Hristian Kirtchev <kirtchev@adacore.com>
2943 * exp_ch4.adb (Apply_Accessibility_Check): Add local constant
2944 Pool_Id and local variables Fin_Call and Free_Stmt. Finalize
2945 and deallocate a heap-allocated class-wide object after it
2946 has been determined that it violates the accessibility rules.
2947 * rtsfind.ads: Add new RTU_Id for System.Memory. Add new RE_Id
2948 and entry in RE_Unit_Table for RE_Free.
2950 2013-09-01 Eric Botcazou <ebotcazou@adacore.com>
2951 Iain Sandoe <iain@codesourcery.com>
2954 * gcc-interface/Makefile.in (GCC_LINK_FLAGS): Add -static-libstdc++.
2955 (GCC_LINK): Use CXX instead of CC.
2956 * gcc-interface/Make-lang.in (CXX_LFLAGS): New.
2957 (ADA_TOOLS_FLAGS_TO_PASS): Pass CXX, and CXX_LFLAGS for native.
2959 2013-08-13 Eric Botcazou <ebotcazou@adacore.com>
2961 * gcc-interface/decl.c (gnat_to_gnu_entity): Do not bother about alias
2962 sets of derived types in ASIS mode.
2964 2013-08-13 Eric Botcazou <ebotcazou@adacore.com>
2966 * gcc-interface/decl.c (gnat_to_gnu_entity): Replace True with true.
2967 (is_cplusplus_method): Likewise, and False with false.
2968 (components_need_strict_alignment): Likewise.
2969 * gcc-interface/misc.c (gnat_init_gcc_fp): Likewise.
2970 * gcc-interface/trans.c (Loop_Statement_to_gnu): Likewise.
2971 (Handled_Sequence_Of_Statements_to_gnu): Likewise.
2972 (add_cleanup): Likewise.
2973 (Sloc_to_locus1): Likewise.
2974 (Sloc_to_locus): Likewise.
2975 (set_expr_location_from_node): Likewise.
2976 * gcc-interface/utils.c (potential_alignment_gap): Likewise.
2978 2013-08-13 Thomas Quinot <quinot@adacore.com>
2980 * gcc-interface/trans.c (set_end_locus_from_node): Clear column info
2981 for the end_locus of a block if it does not come from an End_Label.
2983 2013-08-13 Thomas Quinot <quinot@adacore.com>
2985 * gcc-interface/trans.c (Handled_Sequence_Of_Statements_to_gnu): If
2986 there is no End_Label, attach cleanup actions to the sloc of the HSS
2988 (Exception_Handler_to_gnu_zcx): Associate cleanup actions with the sloc
2989 of the handler itself.
2990 (add_cleanup): Clear column information in sloc of cleanup actions.
2991 (Sloc_to_locus1): New static function.
2992 (Sloc_to_locus): Call it.
2993 (set_expr_location_from_node1): New static function.
2994 (set_expr_location_from_node): Call it.
2996 2013-08-13 Eric Botcazou <ebotcazou@adacore.com>
2998 * gcc-interface/trans.c (Call_to_gnu): Deal with specific conditional
2999 expressions for misaligned actual parameters.
3001 2013-08-13 Eric Botcazou <ebotcazou@adacore.com>
3003 * gcc-interface/trans.c (can_equal_min_or_max_val_p): Be prepared for
3004 values outside of the range of the type.
3006 2013-08-13 Eric Botcazou <ebotcazou@adacore.com>
3008 * gcc-interface/utils2.c (build_atomic_load): Do a mere view-conversion
3009 to the original type before converting to the result type.
3010 (build_atomic_store): First do a conversion to the original type before
3011 view-converting to the effective type, but deal with a padded type
3014 2013-08-08 Eric Botcazou <ebotcazou@adacore.com>
3016 * gcc-interface/Makefile.in (TOOLS_LIBS): Pick C object files from the
3017 compiler build and use standard library variables.
3018 (../../vxaddr2line$(exeext): Do not depend on targext.o and adjust.
3019 (gnatmake-re): Do not depend on targext.o.
3020 (gnatlink-re): Do not depend on link.o and targext.o.
3021 (../../gnatmake$(exeext): Likewise.
3022 (../../gnatlink$(exeext): Likewise.
3024 2013-07-21 OndÃ…
\99ej BÃÂlka <neleai@seznam.cz>
3026 * gcc-interface/gigi.h: Fix typos.
3027 * gcc-interface/trans.c: Likewise.
3028 * gcc-interface/utils2.c: Likewise.
3029 * gnat_rm.texi: Likewise.
3030 * gnat_ugn.texi: Likewise.
3031 * raise-gcc.c: Likewise.
3032 * sigtramp-ppcvxw.c: Likewise.
3033 * sysdep.c: Likewise.
3034 * terminals.c: Likewise.
3036 2013-07-20 Eric Botcazou <ebotcazou@adacore.com>
3039 * gcc-interface/ada.h (CAT): Fix typo.
3041 2013-07-08 Hristian Kirtchev <kirtchev@adacore.com>
3043 * einfo.adb (Get_Pragma): Handle the retrieval of delayed
3044 pragmas stored in N_Contract nodes.
3045 * einfo.ads (Get_Pragma): Update the comment on usage.
3046 * sem_prag.adb (Check_Precondition_Postcondition): Retain a copy
3047 of the pragma when it applies to a body that acts as a spec. The
3048 copy is preanalyzed and chained on the contract of the body.
3050 2013-07-08 Robert Dewar <dewar@adacore.com>
3052 * rtsfind.adb: Minor comment fix.
3054 2013-07-08 Hristian Kirtchev <kirtchev@adacore.com>
3056 * sem_ch4.adb (Check_Ghost_Subprogram_Call): Do not check the placement
3057 of a Ghost function call when the enclosing context is being
3060 2013-07-08 Ed Schonberg <schonberg@adacore.com>
3062 * exp_ch6.adb (Expand_Inlined_Call, Process_Formals): If the
3063 expression in a return statement is a numeric literal, qualify
3064 it with the return type for proper resolution.
3066 2013-07-08 Robert Dewar <dewar@adacore.com>
3068 * sem.ads: Minor comment updates.
3069 * s-restri.ads, exp_ch6.adb, lib-load.ads, exp_ch3.adb, sem_ch10.adb:
3072 2013-07-08 Robert Dewar <dewar@adacore.com>
3074 * exp_attr.adb (Expand_N_Attribute_Reference): Add dummy entry
3075 for Restriction_Set.
3076 * gnat_rm.texi: Add missing menu entry for Attribute Ref Add
3077 documentation for attribute Restriction_Set.
3078 * lib-writ.adb (Write_With_Lines): Generate special W lines
3079 for Restriction_Set.
3080 * lib-writ.ads: Document special use of W lines for
3082 * lib.ads (Restriction_Set_Dependences): New table.
3083 * par-ch4.adb (Is_Parameterless_Attribute): Add Loop_Entry to
3084 list (Scan_Name_Extension_Apostrophe): Remove kludge test for
3085 Loop_Entry (Scan_Name_Extension_Apostrophe): Handle No_Dependence
3087 * restrict.adb (Check_SPARK_Restriction): Put in Alfa order
3088 (OK_No_Dependence_Unit_Name): New function.
3089 * restrict.ads (OK_No_Dependence_Unit_Name): New function.
3090 * rtsfind.adb: Minor reformatting Minor code reorganization.
3091 * sem_attr.adb (Analyze_Attribute): Add processing for
3093 * sem_prag.adb (Process_Restrictions_Or_Restriction_Warnings):
3094 Remove Check_Unit_Name and use new function
3095 OK_No_Dependence_Unit_Name instead.
3096 * sinfo.ads: Minor comment updates.
3097 * snames.ads-tmpl: Add entry for Restriction_Set attribute.
3099 2013-07-08 Hristian Kirtchev <kirtchev@adacore.com>
3101 * exp_ch4.adb (Apply_Accessibility_Check): Remove local constant
3102 Pool_Id and local variable Free_Stmt. Do not deallocate the faulty
3103 object as "free" is not available on all targets/profiles.
3105 2013-07-08 Robert Dewar <dewar@adacore.com>
3107 * sem_ch13.adb (Analyze_Aspect_Specifications): Handle
3108 Storage_Size aspect for task type in case discriminant is
3110 (Analyze_Attribute_Definition_Clause): Do not flag Storage_Size
3111 attribute definition clause as obsolescent if from aspect.
3113 2013-07-08 Robert Dewar <dewar@adacore.com>
3115 * gnat_rm.texi: Add documentation for Img returning a function.
3116 * par-prag.adb: Minor reformatting.
3117 * restrict.adb: Minor reformatting and code reorganization.
3119 2013-07-08 Ed Schonberg <schonberg@adacore.com>
3121 * sem_res.adb: add guard to ASIS transform.
3123 2013-07-08 Ed Schonberg <schonberg@adacore.com>
3125 * exp_ch9.adb (Expand_N_Asynchronous_Select): If the trigger
3126 of the asynchronous select is a dispatching call, transform the
3127 abortable part into a procedure, to avoid duplication of local
3128 loop variables that may appear within.
3130 2013-07-08 Vincent Celier <celier@adacore.com>
3132 * projects.texi: Update the documentation of suffixes in package
3135 2013-07-08 Ed Schonberg <schonberg@adacore.com>
3137 * sem_ch6.adb (Conforming_Types): Anonymous_access_to_subprograsm
3138 types are type conformant if the designated type of one is
3139 protected and the other is not. Convention only matters when
3140 checking subtype conformance.
3142 2013-07-08 Ed Schonberg <schonberg@adacore.com>
3144 * sem_res.adb (Make_Call_Into_Operator): In ASIS mode, propagate
3145 back the fully resolved operands to the original function call
3146 so that all semantic information remains available to ASIS.
3148 2013-07-08 Ed Schonberg <schonberg@adacore.com>
3150 * sem_ch4.adb: minor reformatting (remove obsolete comment).
3151 * sem_ch9.adb: improve error message on illegal trigger.
3153 2013-07-08 Robert Dewar <dewar@adacore.com>
3155 * sem_prag.adb: Minor reformatting.
3157 2013-07-08 Robert Dewar <dewar@adacore.com>
3159 * gnatcmd.adb: Minor reformatting.
3161 2013-07-08 Robert Dewar <dewar@adacore.com>
3163 * targparm.adb (Get_Target_Parameters): Recognize pragma
3164 Partition_Elaboration_Policy.
3166 2013-07-08 Robert Dewar <dewar@adacore.com>
3168 * gnat_ugn.texi: Minor update to mention partition elaboration policy.
3170 2013-07-08 Ed Schonberg <schonberg@adacore.com>
3172 * sem_ch4.adb (Comple_Object_Operation): Revert previous change.
3173 (Analyze_Indexed_Component_Form): In ASIS mode, if node has been
3174 transformed but not rewritten as a function call (as is the case
3175 in a generic), analyze it as such.
3177 2013-07-08 Thomas Quinot <quinot@adacore.com>
3179 * gnat_rm.texi: Minor rewording: add missing word "operators"
3180 in documentation for restriction No_Direct_Boolean_Operator.
3182 2013-07-08 Robert Dewar <dewar@adacore.com>
3184 * errout.adb (Set_Msg_Txt): No longer sets Is_Style_Msg,
3185 Is_Warning_Msg, or Is_Unconditional_Msg (all are set elsewhere
3187 * errout.ads: Insertions ! and !! no longer have to be at the
3188 end of the message, they can be anywhere in the message.
3189 * erroutc.adb (Test_Style_Warning_Serious_Unconditional_Msg):
3190 Replaces Test_Style_Warning_Serious_Msg
3191 * erroutc.ads (Has_Double_Exclam): New flag New comments for
3192 existing flags (Test_Style_Warning_Serious_Unconditional_Msg):
3193 Replaces Test_Style_Warning_Serious_Msg
3194 * errutil.adb (Test_Style_Warning_Serious_Unconditional_Msg):
3195 Replaces Test_Style_Warning_Serious_Msg
3197 2013-07-08 Robert Dewar <dewar@adacore.com>
3199 * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings):
3200 Recognize SPARK_05 as synonym for SPARK in restrictions pragma.
3201 * restrict.ads, restrict.adb (SPARK_Hides): Table moved to body, only
3203 * scng.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb, sem_ch8.adb,
3204 sem_res.adb, sem_util.adb: Use restriction SPARK_05 instead of SPARK.
3205 * snames.ads-tmpl (Name_No_Obsolescent_Features): New entry.
3207 2013-07-08 Vincent Celier <celier@adacore.com>
3209 * gnatcmd.adb (Check_Files): Use a response file for gnatls
3212 2013-07-08 Gary Dismukes <dismukes@adacore.com>
3214 * freeze.adb: Minor typo fixes.
3216 2013-07-08 Robert Dewar <dewar@adacore.com>
3218 * gnat_rm.texi: Document SPARK_05 (replaces SPARK) Document
3219 obsolete recognition of SPARK Document all other obsolete synonyms
3220 for old restrictions.
3221 * restrict.adb (Check_SPARK_Restriction): SPARK_05 replaces
3222 SPARK (Process_Restriction_Synonyms): Handle SPARK as synonym
3224 * restrict.ads: Restriction SPARK_05 replaces SPARK.
3225 * s-rident.ads: Replace restriction SPARK by SPARK_05 Add SPARK
3226 as synonym for SPARK_05.
3227 * sem_prag.adb: Minor reformatting.
3228 * snames.ads-tmpl: Add entries for Name_SPARK and Name_SPARK_05.
3230 2013-07-08 Robert Dewar <dewar@adacore.com>
3232 * sem_dim.adb: Minor error message change.
3233 * freeze.adb (Freeze_Entity, array type case): Extend handling
3234 of Implicit_Packing to handle multi-dimensional array case.
3235 * gnat_rm.texi: Update doc on Implicit_Packing.
3237 2013-07-08 Robert Dewar <dewar@adacore.com>
3239 * exp_ch4.adb: Minor reformatting.
3241 2013-07-08 Ed Schonberg <schonberg@adacore.com>
3243 * sem_ch4.adb (Complete_Object_Operation): In ASIS mode, if
3244 the parent node is a selected component and the analysis as a
3245 call is successful, set the type of the selector in the parent
3246 node for subsequent checks, because the rewriting of the node
3247 does not take place during pre-analysis.
3249 2013-07-08 Robert Dewar <dewar@adacore.com>
3251 * sem_ch8.adb, exp_ch3.adb: Minor reformatting.
3253 2013-07-08 Hristian Kirtchev <kirtchev@adacore.com>
3255 * exp_ch4.adb (Expand_N_Op_Eq): When comparing two
3256 Bounded_Strings, use the predefined equality function of the
3257 root Super_String type.
3259 2013-07-08 Hristian Kirtchev <kirtchev@adacore.com>
3261 * exp_ch4.adb (Create_Alternative): Removed.
3262 (Expand_N_If_Expression): Remove constant
3263 In_Case_Or_If_Expression. Add local variable
3264 Ptr_Typ. Inspect the "then" and "else" action lists
3265 for transient controlled objects and generate code to
3266 finalize them. (Is_Controlled_Function_Call): Removed.
3267 (Process_Action): Update the comment on usage. Update the call
3268 to Process_Transient_Object. There is no need to continue the
3269 traversal of the object itself.
3270 (Process_Actions): New routine.
3271 (Process_Transient_Object): Moved to the top level of Exp_Ch4. Add
3272 a new formal and update the related comment on usage.
3273 * exp_util.adb (Within_Case_Or_If_Expression): Start the search
3274 from the parent of the node.
3276 2013-07-08 Robert Dewar <dewar@adacore.com>
3278 * a-cusyqu.ads, a-cbprqu.ads, s-interr.ads, a-cuprqu.ads,
3279 a-cbsyqu.ads: Minor reformatting (proper formatting of overriding).
3281 2013-07-08 Ed Schonberg <schonberg@adacore.com>
3283 * sem_ch8.adb (Attribute_Renaming): Treat 'Img as an attribute
3284 that can be renamed as a function.
3286 2013-07-08 Thomas Quinot <quinot@adacore.com>
3288 * g-socket.ads: Document target dependency: FIONBIO may or may not
3289 be inherited from listening socket by accepted socket.
3291 2013-07-08 Hristian Kirtchev <kirtchev@adacore.com>
3293 * exp_ch4.adb (Apply_Accessibility_Check): Do not deallocate the object
3294 on targets that can't deallocate.
3296 2013-07-08 Hristian Kirtchev <kirtchev@adacore.com>
3298 * exp_ch3.adb (Freeze_Type): Generate a
3299 subpools-related accessibility check only on profiles that
3300 include the corresponding library unit.
3302 2013-07-08 Gary Dismukes <dismukes@adacore.com>
3304 * sem_ch8.adb: Minor typo fixes.
3306 2013-07-08 Javier Miranda <miranda@adacore.com>
3308 * sem_ch8.adb (Save_Scope_Stack): Adding documentation.
3309 (Restore_Scope_Stack): Remove the elements of the list when the
3310 visibility of each entity is restored.
3312 2013-07-08 Robert Dewar <dewar@adacore.com>
3314 * exp_ch9.adb, sem.ads, sem_util.adb: Minor reformatting.
3316 2013-07-08 Robert Dewar <dewar@adacore.com>
3318 * sem_ch8.adb, sem_ch8.ads: Minor reformatting.
3320 2013-07-08 Gary Dismukes <dismukes@adacore.com>
3322 * gnat_rm.texi: Minor reformatting and rewording for consistency.
3324 2013-07-08 Bob Duff <duff@adacore.com>
3326 * exp_ch3.adb (Build_Master): If Desig_Type is an incomplete
3327 view coming from a limited-with'ed package, use the nonlimited
3328 view in case it has tasks.
3330 2013-07-08 Javier Miranda <miranda@adacore.com>
3332 * sem_ch8.ad[sb] (Save_Scope_Stack): Modified to return the list
3333 of entities which have been temporarily removed from immediate
3335 (Restore_Scope_Stack): Modified to receive an
3336 additional parameter with the list of entities whose immediate
3337 visibility must be restored.
3338 * sem.adb (Do_Analyze): Use new version of
3339 Save_Scope_Stack/Restore_Scope_Stack
3340 * sem_ch12.adb (Inline_Instance_Body): Use new version of
3341 Save_Scope_Stack and Restore_Scope_Stack
3343 2013-07-08 Hristian Kirtchev <kirtchev@adacore.com>
3345 * sem_prag.adb (Analyze_Pragma): Remove
3346 variable Unit_Prag. Remove the check on duplicate mode for the
3347 configuration form of the pragma.
3348 (Redefinition_Error): Removed.
3350 2013-07-08 Robert Dewar <dewar@adacore.com>
3352 * lib.ads, gnat_rm.texi, einfo.ads, sem_ch13.adb: Minor reformatting
3355 2013-07-08 Ed Schonberg <schonberg@adacore.com>
3357 * sem_prag.adb (Analyze_PPC_In_Decl_Part): In ASIS mode,
3358 pre-analyze only the original expression attached to the source
3359 aspect, not the relocated expression of the pragma, to prevent
3360 malformed trees in ASIS mode.
3361 * sem_ch13.adb (Analyze_Aspect_Specifications): Revert previous
3362 patch: the expression in the aspect for pre/post must be relocated
3363 to the pragma for proper analysis.
3365 2013-07-05 Hristian Kirtchev <kirtchev@adacore.com>
3367 * aspects.adb: Add an entry for SPARK_Mode in table Canonical_Aspect.
3368 * aspects.ads: Add an entry for SPARK_Mode in tables Aspect_Id,
3369 Aspect_Argument, Aspect_Names.
3370 * atree.adb (Node32): New routine.
3371 (Set_Node32): New routine.
3372 * atree.ads (Node32): New routine.
3373 (Set_Node32): New routine.
3374 * einfo.adb: Node32 is now used as SPARK_Mode_Pragmas.
3375 (Set_SPARK_Mode_Pragmas): New routine.
3376 (SPARK_Mode_Pragmas): New routine.
3377 (Write_Field32_Name): Add and entry for SPARK_Modes.
3378 * einfo.ads: Add attribute SPARK_Mode_Pragmas along with usage
3379 in various entities.
3380 (Set_SPARK_Mode_Pragmas): New routine and
3382 (SPARK_Mode_Pragmas): New routine and pragma Inline.
3383 * gnat_rm.texi: Add sections explaining the syntax and semantics
3384 of aspect/pragma SPARK_Mode.
3385 * gnat_ugn.texi: Add pragma SPARK_Mode to the list of
3386 configuration pragmas.
3387 * lib.adb (Set_SPARK_Mode_Pragma): New routine.
3388 (SPARK_Mode_Pragma): New routine.
3389 * lib.ads: Alphabetize the comments on fields of record
3390 Unit_Record. Add new field SPARK_Mode_Pragma along with
3391 comment on its usage. Update the layout of record Unit_Record.
3392 (Set_SPARK_Mode_Pragma): New routine and pragma Inline.
3393 (SPARK_Mode_Pragma): New routine and pragma Inline.
3394 * lib-load.adb (Create_Dummy_Package_Unit): Initialize
3395 field SPARK_Mode_Pragma.
3396 (Load_Main_Source): Initialize field SPARK_Mode_Pragma.
3397 (Load_Unit): Initialize field SPARK_Mode_Pragma.
3398 * lib-writ.adb (Add_Preprocessing_Dependency): Initialize field
3400 (Ensure_System_Dependency): Initialize field SPARK_Mode_Pragma.
3401 * opt.ads: Alphabetize verification flags. Store the
3402 compilation-wide SPARK mode in variable Global_SPARK_Mode.
3403 * par-prag.adb: Pragma SPARK_Mode does not need special processing
3405 * sem_ch13.adb (Analyze_Aspect_Specifications): Convert aspect
3406 SPARK_Mode into a pragma.
3407 (Check_Aspect_At_Freeze_Point): Aspect SPARK_Mode does not need
3409 * sem_prag.adb: Add an entry for SPARK_Mode in table Sig_Flags.
3410 (Analyze_Pragma): Add processing for pragma SPARK_Mode.
3411 (Get_SPARK_Mode_Id): New routine.
3412 (Is_Elaboration_SPARK_Mode): New routine.
3413 (Is_Private_SPARK_Mode): New routine.
3414 * sem_prag.ads (Get_SPARK_Mode_Id): New routine.
3415 (Is_Elaboration_SPARK_Mode): New routine.
3416 (Is_Private_SPARK_Mode): New routine.
3417 * sinfo.ads: Update the comment on the usage of field Next_Pragma.
3418 * snames.ads-tmpl: Add new predefined name for SPARK_Mode and
3419 Auto. Add new pragma Id for SPARK_Mode.
3420 * types.ads: Add new type SPARK_Mode_Id.
3422 2013-07-05 Ed Schonberg <schonberg@adacore.com>
3424 * sem_ch13.adb (Analyze_Aspect_Specifications): For
3425 pre/postconditions copy the expression to the generated pragma,
3426 to avoid sharing between the original aspect and the pragma node,
3427 because in ASIS_Mode both will be independently analyzed.
3429 2013-07-05 Ed Schonberg <schonberg@adacore.com>
3431 * exp_ch3.adb (Build_Variant_Record_Equality): Add pairs of
3432 formals for each discriminant of an unchecked union.
3433 (Make_Eq_Case): Suprogram accepts a list of discriminants. Nested
3434 variants are supported. New helper function Corresponding_Formal.
3435 * exp_ch4.adb (Build_Equality_Call): For unchecked unions,
3436 loop through discriminants to create list of inferred values,
3437 and modify call to equality routine accordingly.
3439 2013-07-05 Claire Dross <dross@adacore.com>
3441 * a-cfdlli.ads, a-cfhama.ads, a-cfhase.ads, a-cforma.ads,
3442 a-cforse.ads, a-cofove.ads: Add preconditions when needed +
3443 container types are not tagged any more.
3445 2013-07-05 Thomas Quinot <quinot@adacore.com>
3447 * freeze.adb (Freeze_Entity): For an object with captured
3448 initialization statements, do not remove Init_Stmts from the
3449 enclosing list, as Freeze_All might rely on it to know where to
3452 2013-07-05 Robert Dewar <dewar@adacore.com>
3454 * exp_ch4.adb, a-cfdlli.ads, a-ngelfu.ads, s-bignum.adb: Minor
3457 2013-07-05 Hristian Kirtchev <kirtchev@adacore.com>
3459 * exp_ch4.adb (Expand_Composite_Equality): Use the full view
3460 when the base type is private.
3462 2013-07-05 Claire Dross <dross@adacore.com>
3464 * a-cfdlli.ads: Add preconditions when needed.
3466 2013-07-05 Robert Dewar <dewar@adacore.com>
3468 * sem_ch8.adb: Minor reformatting.
3470 2013-07-05 Ed Schonberg <schonberg@adacore.com>
3472 * sem_ch3.adb (Access_Subprogram_Declaration): Use
3473 Generate_Reference_To_Formals.
3474 * lib-xref.adb (Generate_Reference_To_Formals): In the case of
3475 access to subprograms, the formals are found in the designated
3478 2013-07-05 Robert Dewar <dewar@adacore.com>
3480 * gnat_ugn.texi: Document that comments can be lined up with
3481 previous non-blank line.
3482 * styleg.adb (Check_Comment): Allow indentation to match previous
3483 non-blank line (Same_Column_As_Previous_Line): New function
3485 2013-07-05 Robert Dewar <dewar@adacore.com>
3487 * gnat_rm.texi: Update doc on missing pragmas.
3488 * sem_ch12.adb: Minor comment additions.
3490 2013-07-05 Hristian Kirtchev <kirtchev@adacore.com>
3492 * sem_prag.adb (Analyze_Pragma): Ensure that
3493 Contract_Cases, Depends and Global are analyzed when they apply
3494 to a subprogram compilation unit. The pragmas are all added
3495 unconditionally to the construct's contract. This ensures that
3496 proof tools can locate the pragmas.
3498 2013-07-05 Ed Schonberg <schonberg@adacore.com>
3500 * sem_ch8.adb (Freeze_Actual_Profile): An instance within
3501 a generic unit does not freeze a generic private type of the
3502 enclosing generic. This rule must also apply to a type derived
3503 from a generic private type.
3505 2013-07-05 Arnaud Charlet <charlet@adacore.com>
3507 * gnat_rm.texi: Add missing documentation for pragmas.
3509 2013-07-05 Yannick Moy <moy@adacore.com>
3511 * sem_ch12.adb: Minor comment.
3513 2013-07-05 Robert Dewar <dewar@adacore.com>
3515 * gnat_rm.texi: Document that -gnatR and -gnatD cannot be used
3517 * switch-c.adb: Do not allow -gnatD and -gnatR to both be
3520 2013-07-05 Robert Dewar <dewar@adacore.com>
3522 * gnat_rm.texi: Add missing documentation for pragmas.
3523 * sem_ch8.adb: Minor reformatting.
3524 * gnat_ugn.texi: Document that -gnatR and -gnatD cannot be used
3527 2013-07-05 Yannick Moy <moy@adacore.com>
3529 * sem_ch12.ads, sem_ch12.adb (Need_Subprogram_Instance_Body): Force
3530 instance of subprogram body in SPARK mode, by testing Expander_Active
3531 (set in SPARK mode) instead of Full_Expander_Active (not set in
3533 * sem_ch8.adb: Minor reformatting.
3535 2013-07-05 Robert Dewar <dewar@adacore.com>
3537 * freeze.adb (Freeze_Entity): Remove test of obsolete flag
3538 Propagate_Exceptions, and associated useless code that did
3540 * gnat_rm.texi: Add documentation for obsolete pragma
3541 Propagate_Exceptions.
3542 * opt.ads (Propagate_Exceptions): Obsolete flag removed.
3543 * sem_prag.adb (Analyze_Pragma, case Propagate_Exceptions):
3544 Remove useless and obsolete setting of Propagate_Exceptions flag.
3546 2013-07-05 Robert Dewar <dewar@adacore.com>
3548 * gnat_rm.texi, sem_prag.adb: Minor comment/text fixes.
3550 2013-07-05 Robert Dewar <dewar@adacore.com>
3552 * gnat_rm.texi: Add missing doc for various pragmas.
3554 2013-07-05 Robert Dewar <dewar@adacore.com>
3556 * par_sco.adb, sem_ch12.adb, par-ch5.adb: Minor reformatting.
3557 * gnat_rm.texi: Document pragma Profile_Warnings.
3558 * restrict.ads, sem_prag.adb: Minor reformatting.
3560 2013-07-05 Ed Schonberg <schonberg@adacore.com>
3562 * sem_ch12.adb (Check_Formal_Package_Instance): Handle properly
3563 a formal subprogram that was defaulted in the formal package.
3565 2013-07-05 Thomas Quinot <quinot@adacore.com>
3567 * par_sco.adb (Traverse_Declarations_Or_Statements): Ignore
3568 N_Implicit_Label_Declaration nodes.
3570 2013-07-05 Robert Dewar <dewar@adacore.com>
3572 * a-cfhase.adb, sem_prag.adb, a-cfhama.adb: Minor reformatting.
3574 2013-07-05 Ed Schonberg <schonberg@adacore.com>
3576 * sem_ch12.adb (Copy_Generic_Node): Check that name in function
3577 call is a valid entity name before preserving entity in generic
3580 2013-07-05 Thomas Quinot <quinot@adacore.com>
3582 * par-ch5.adb: Minor reformatting.
3584 2013-07-05 Thomas Quinot <quinot@adacore.com>
3586 * sinfo.ads: Minor clarification to documentation for
3587 N_Implicit_Label_Declaration.
3589 2013-07-05 Hristian Kirtchev <kirtchev@adacore.com>
3591 * a-except-2005.adb, a-except.adb: Add constant Rmsg_17. Correct the
3592 values of all remaining constants.
3593 (Rcheck_35): New routine along with pragmas Export and No_Return.
3594 (Rcheck_PE_Aliased_Parameters): New routine along with pragmas
3595 Export and No_Return.
3596 (Rcheck_PE_All_Guards_Closed,
3597 Rcheck_PE_Bad_Predicated_Generic_Type,
3598 Rcheck_PE_Current_Task_In_Entry_Body,
3599 Rcheck_PE_Duplicated_Entry_Address, Rcheck_PE_Explicit_Raise,
3600 Rcheck_PE_Implicit_Return, Rcheck_PE_Misaligned_Address_Value,
3601 Rcheck_PE_Missing_Return, Rcheck_PE_Overlaid_Controlled_Object,
3602 Rcheck_PE_Potentially_Blocking_Operation
3603 Rcheck_PE_Stubbed_Subprogram_Called,
3604 Rcheck_PE_Unchecked_Union_Restriction,
3605 Rcheck_PE_Non_Transportable_Actual, Rcheck_SE_Empty_Storage_Pool,
3606 Rcheck_SE_Explicit_Raise, Rcheck_SE_Infinite_Recursion,
3607 Rcheck_SE_Object_Too_Large, Rcheck_PE_Finalize_Raised_Exception):
3608 Update the use of Rmsg_XX.
3609 (Rcheck_17, Rcheck_18, Rcheck_19,
3610 Rcheck_20, Rcheck_21, Rcheck_22, Rcheck_23, Rcheck_24, Rcheck_25,
3611 Rcheck_26, Rcheck_27, Rcheck_28, Rcheck_29, Rcheck_30, Rcheck_31,
3612 Rcheck_32, Rcheck_33, Rcheck_34, Rcheck_35): Update corresponding
3613 renamed subprograms.
3614 * checks.adb: Add with and use clause for Stringt.
3615 (Apply_Parameter_Aliasing_Checks): Make constant Loc visible in
3616 all subprograms of Apply_Parameter_Aliasing_Checks. Remove local
3617 variable Cond. Initialize Check at the start of the routine. Use
3618 routine Overlap_Check to construct a simple or a detailed run-time
3619 check. Update the creation of the simple check.
3620 (Overlap_Check): New routine.
3621 * exp_ch11.adb (Get_RT_Exception_Name): Add a value for
3622 PE_Aliased_Parameters.
3623 * types.ads: Add new enumeration literal
3624 PE_Aliased_Parameters. Update the corresponding integer values
3625 of all RT_Exception_Code literals.
3626 * types.h: Add new constant PE_Aliased_Parameters. Correct the
3627 values of all remaining constants.
3629 2013-07-05 Yannick Moy <moy@adacore.com>
3631 * gnat_rm.texi: Minor renaming of SPARK into SPARK 2005 in
3634 2013-07-05 Ed Schonberg <schonberg@adacore.com>
3636 * sem_prag.adb (Analyze_PPC_In_Decl_Part): For a class-wide
3637 condition, when replacing the name of a formal by a conversion
3638 to the class-wide type, exempt selector names that appear in
3639 parameter associations.
3641 2013-06-13 Eric Botcazou <ebotcazou@adacore.com>
3643 * gcc-interface/ada-tree.h (DECL_BY_DOUBLE_REF_P): Delete.
3644 * gcc-interface/gigi.h (annotate_object): Adjust prototype.
3645 (convert_vms_descriptor): Likewise.
3646 * gcc-interface/decl.c (gnat_to_gnu_param): Do not pass fat pointer
3647 types by double dereference.
3648 (annotate_object): Remove BY_DOUBLE_REF parameter and adjust.
3649 (gnat_to_gnu_entity): Adjust calls to annotate_object.
3650 * gcc-interface/trans.c (Identifier_to_gnu): Do not deal with double
3652 (Call_to_gnu): Likewise.
3653 (build_function_stub): Adjust call to convert_vms_descriptor.
3654 (Subprogram_Body_to_gnu): Adjust call to annotate_object.
3655 * gcc-interface/utils.c (convert_vms_descriptor): Remove BY_REF
3656 parameter and adjust.
3658 2013-05-30 Eric Botcazou <ebotcazou@adacore.com>
3660 * gcc-interface/Makefile.in (arm% androideabi): Robustify.
3662 2013-05-26 Eric Botcazou <ebotcazou@adacore.com>
3664 * gcc-interface/decl.c: (gnat_to_gnu_entity): In ASIS mode, do not
3665 check that access types have a set size.
3667 2013-05-26 Eric Botcazou <ebotcazou@adacore.com>
3669 * gcc-interface/decl.c (vinfo_t): New type and associated vector.
3670 (components_to_record): Change return type to bool.
3671 Lay out the variants in two passes. Do not force a specific layout for
3672 the variant part if the variants do not have a representation clause.
3673 Take the alignment of the variant part into account when laying out
3674 variants without rep clause in a record type with a partial rep clause.
3675 (create_rep_part): Do not set the position of the field.
3677 2013-05-26 Eric Botcazou <ebotcazou@adacore.com>
3679 * gcc-interface/trans.c (Attribute_to_gnu) <Attr_Last_Bit>: Add kludge
3680 to avoid generating an overflow for -1.
3682 2013-05-26 Eric Botcazou <ebotcazou@adacore.com>
3684 * gcc-interface/gigi.h (create_type_decl): Adjust prototype.
3685 (create_label_decl): Complete prototype.
3686 (process_attributes): Declare.
3687 * gcc-interface/decl.c (gnat_to_gnu_entity): Adjust multiple calls to
3688 create_type_decl throughout.
3689 <E_Enumeration_Type>: Do the layout of the type manually and call
3690 process_attributes on it. Reindent.
3691 <E_Enumeration_Subtype>: Minor tweak.
3692 <E_Floating_Point_Subtype>: Reindent.
3693 <E_Array_Subtype>: Call process_attributes on the array type built
3694 for a packed array type.
3695 <E_Record_Type>: Call process_attributes on the type.
3696 <E_Record_Subtype>: Likewise.
3697 <E_Access_Type>: Likewise.
3698 <E_Subprogram_Type>: Likewise.
3699 Likewise for all types at the end of the processing.
3700 * gcc-interface/utils.c (make_aligning_type): Adjust call to
3702 (maybe_pad_type): Likewise.
3703 (create_index_type): Likewise.
3704 (create_type_decl): Remove attr_list parameter and associated code.
3705 (create_var_decl_1): Call process_attributes on the variable.
3706 (process_attributes): Take a pointer to the object and add in_place
3707 and gnat_node parameters and adjust throughout.
3708 <ATTR_MACHINE_ATTRIBUTE>: Pass ATTR_FLAG_TYPE_IN_PLACE only on demand
3709 and set the input location.
3710 Zap the attribute list at the end.
3711 (create_subprog_decl): Call process_attributes on the subprogram.
3712 (build_unc_object_type): Adjust call to create_type_decl.
3713 (handle_vector_type_attribute): Remove dead code.
3715 2013-05-26 Eric Botcazou <ebotcazou@adacore.com>
3717 * gcc-interface/gigi.h (make_aligning_type): Adjust prototype.
3718 * gcc-interface/utils.c (make_aligning_type): Take GNAT_NODE parameter
3719 for the position of the associated TYPE_DECL.
3720 * gcc-interface/decl.c (gnat_to_gnu_entity): Adjust call to above.
3721 * gcc-interface/utils2.c (maybe_wrap_malloc): Likewise.
3723 2013-05-26 Eric Botcazou <ebotcazou@adacore.com>
3725 * gcc-interface/decl.c (gnat_to_gnu_entity): Do not prematurely
3726 elaborate the full view of a type with a freeze node.
3727 * gcc-interface/trans.c (process_type): Add explicit predicate.
3729 2013-05-26 Eric Botcazou <ebotcazou@adacore.com>
3731 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Always build the
3732 UNC variable for aliased objects with unconstrained nominal subtype.
3734 2013-05-24 Eric Botcazou <ebotcazou@adacore.com>
3736 * gcc-interface/gigi.h (gnat_init_gcc_fp): Declare.
3737 * gcc-interface/trans.c (gigi): Call it.
3738 * gcc-interface/misc.c (gnat_init_gcc_fp): New function.
3740 2013-05-24 Eric Botcazou <ebotcazou@adacore.com>
3742 * gcc-interface/gigi.h (enum inline_status_t): New type.
3743 (create_subprog_decl): Adjust prototype.
3744 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Procedure>: Adjust
3745 calls to create_subprog_decl.
3746 (get_minimal_subprog_decl): Likewise.
3747 * gcc-interface/trans.c (gigi): Likewise.
3748 (build_raise_check): Likewise.
3749 (establish_gnat_vms_condition_handler): Likewise.
3750 (Compilation_Unit_to_gnu): Likewise.
3751 (gnat_to_gnu): Likewise.
3752 * gcc-interface/utils.c (create_subprog_decl): Change inline_flag
3753 parameter to inline_status and implement for suppressed inlining.
3755 2013-05-24 Eric Botcazou <ebotcazou@adacore.com>
3757 * gcc-interface/ada-tree.h (LOOP_STMT_NO_UNROLL): New define.
3758 (LOOP_STMT_UNROLL): Likewise.
3759 (LOOP_STMT_NO_VECTOR): Likewise.
3760 (LOOP_STMT_VECTOR): Likewise.
3761 * gcc-interface/trans.c (struct loop_info_d): Replace label field
3763 (Pragma_to_gnu) <Pragma_Loop_Optimize>: New case.
3764 (Loop_Statement_to_gnu): Save the loop statement onto the stack
3765 instead of the label.
3766 (gnat_to_gnu) <N_Exit_Statement>: Retrieve the loop label.
3768 2013-05-24 Eric Botcazou <ebotcazou@adacore.com>
3770 * gcc-interface/trans.c: Include diagnostic.h and opts.h.
3771 (Pragma_to_gnu) <Pragma_Warnings>: New case.
3773 2013-05-24 Eric Botcazou <ebotcazou@adacore.com>
3775 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Record_Type>: Constify
3776 a handful of local variables.
3777 For a derived untagged type that renames discriminants, change the type
3778 of the stored discriminants to a subtype with the bounds of the type
3779 of the visible discriminants.
3780 (build_subst_list): Rename local variable.
3782 2013-05-16 Jason Merrill <jason@redhat.com>
3784 * gcc-interface/Make-lang.in (gnat1$(exeext)): Use link mutex.
3786 2013-05-13 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
3789 * gcc-interface/Makefile.in: Allow for amd64 solaris2.
3791 2013-05-07 Eric Botcazou <ebotcazou@adacore.com>
3794 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Subtype>: Use
3795 int_const_binop to shift bounds by 1 when they are integer constants.
3797 2013-04-25 Arnaud Charlet <charlet@adacore.com>
3799 * gcc-interface/Makefile.in (ADA_EXCLUDE_SRCS): Exclude s-init.ad{s,b}
3801 2013-04-25 Hristian Kirtchev <kirtchev@adacore.com>
3803 * checks.adb (Apply_Predicate_Check): Update the comment associated
3804 with the call to Check_Expression_Against_Static_Predicate.
3805 * sem_ch3.adb (Analyze_Object_Declaration): Update the comment
3806 associated with the call to Check_Expression_Against_Static_Predicate.
3807 * sem_util.adb (Check_Expression_Against_Static_Predicate):
3808 Broaden the check from a static expression to an expression with
3809 a known value at compile time.
3810 * sem_util.ads (Check_Expression_Against_Static_Predicate): Update
3813 2013-04-25 Thomas Quinot <quinot@adacore.com>
3815 * exp_attr.adb (Expand_N_Attribute_Reference, cases Position,
3816 First_Bit, and Last_Bit): Fix incorrect test in implementation of
3817 RM 2005 13.5.2(3/2).
3819 2013-04-25 Claire Dross <dross@adacore.com>
3821 * a-cfhase.adb, a-cfhase.ads, a-cforma.adb, a-cforma.ads, a-cfhama.adb,
3822 a-cfhama.ads, a-cforse.adb, a-cforse.ads, a-cofove.adb, a-cofove.ads
3823 (Query_Element): Removed.
3824 (Update_Element): Removed.
3825 (Insert): The version with no New_Item specified is removed.
3829 Every check of fields Busy and Lock has been removed.
3831 2013-04-25 Robert Dewar <dewar@adacore.com>
3833 * sem_prag.adb (Analyze_Pragma, case Contract_Cases): Remove
3834 call to S14_Pragma (Find_Related_Subprogram): Require proper
3835 placement in subprogram body (Find_Related_Subprogram): Detect
3836 duplicates for all cases (Find_Related_Subprogram): Handle case
3837 of spec nested inside body.
3839 2013-04-25 Arnaud Charlet <charlet@adacore.com>
3841 * par-prag.adb: Fix typo.
3843 2013-04-25 Hristian Kirtchev <kirtchev@adacore.com>
3845 * checks.adb (Apply_Predicate_Check): If the type has a static
3846 predicate and the expression is also static, check whether the
3847 expression satisfies the predicate.
3848 * sem_ch3.adb (Analyze_Object_Declaration): If the type has a
3849 static predicate and the expression is also static, see if the
3850 expression satisfies the predicate.
3851 * sem_util.adb: Alphabetize several routines.
3852 (Check_Expression_Against_Static_Predicate): New routine.
3853 * sem_util.ads (Check_Expression_Against_Static_Predicate): New routine.
3855 2013-04-25 Robert Dewar <dewar@adacore.com>
3857 * gnat_rm.texi: Document Reason argument for pragma Warnings.
3858 * par-prag.adb: Handle Reason parameter for pragma Warnings.
3859 * sem_prag.adb (Analyze_Pragma, case Warnings): Allow Reason argument.
3860 * snames.ads-tmpl (Name_Reason): New name entry.
3862 2013-04-25 Yannick Moy <moy@adacore.com>
3864 * exp_spark.adb (Expand_SPARK_N_In): Remove procedure.
3865 (Expand_SPARK): Remove special expansion for membership tests.
3867 2013-04-25 Hristian Kirtchev <kirtchev@adacore.com>
3869 * exp_ch3.adb (Expand_N_Object_Declaration): Update all places
3870 that should use constant Base_Typ. When building an invariant
3871 check, account for invariants coming from the base type. Prevent
3872 the creation of a junk invariant check when the related object
3873 is of an array type and it is initialized with an aggregate.
3874 * exp_util.adb (Make_Invariant_Call): Typ is now a variable. Use
3875 the base type to create an invariant call when the type of the
3876 expression is a composite subtype.
3878 2013-04-25 Vasiliy Fofanov <fofanov@adacore.com>
3880 * a-cborse.adb: Fix minor typo.
3882 2013-04-25 Ed Schonberg <schonberg@adacore.com>
3884 * sem_ch6.adb (Different_Generic_Profile): A spec and body
3885 match in an instance if a subtype declaration that renames a
3886 generic actual with the same name appears between spec and body.
3888 2013-04-25 Robert Dewar <dewar@adacore.com>
3890 * sem_util.adb: Minor reformatting.
3892 2013-04-25 Ed Schonberg <schonberg@adacore.com>
3894 * exp_aggr.adb (Expand_N_Aggregate): Use special circuitry to
3895 fold strings with a single others choice only if there are no
3896 expressions in the aggregate.
3898 2013-04-25 Arnaud Charlet <charlet@adacore.com>
3900 * gnat_ugn.texi: Update doc on Ada 2012 default mode.
3902 2013-04-25 Hristian Kirtchev <kirtchev@adacore.com>
3904 * exp_ch6.adb: Add with and use clause for Stringt.
3905 (Expand_Contract_Cases): Moved from sem_ch6. Add formal parameters
3906 Decls and Stmts along with comments on their usage.
3907 * exp_ch6.ads (Expand_Contract_Cases): Moved from sem_ch6.
3908 * sem_ch6.adb (Expand_Contract_Cases): Moved to exp_ch6.
3909 (Process_Contract_Cases): Update the call to Expand_Contract_Cases.
3911 2013-04-25 Ed Schonberg <schonberg@adacore.com>
3913 * gnat_rm.texi: Minor editing, to clarify use of dimension aspects.
3914 * sem_util.adb (Is_OK_Variable_For_Out_Formal): Reject an
3915 aggregate for a packed type, which may be converted into an
3916 unchecked conversion of an object.
3918 2013-04-25 Robert Dewar <dewar@adacore.com>
3920 * sem_prag.adb: Minor code reorganization (correct misspelling
3922 * sem_util.adb, aspects.ads, sem_ch6.adb: Minor reformatting.
3923 * gnat_rm.texi: Document impl-defined aspects.
3924 * sem_dim.adb, sem_dim.ads, gnat_ugn.texi, s-dimmks.ads: Minor
3927 2013-04-25 Hristian Kirtchev <kirtchev@adacore.com>
3929 * einfo.adb (Set_Abstract_States): The attribute now applies
3930 to generic packages.
3931 * sem_ch4.adb (Referenced): Moved to sem_util.
3932 * sem_ch7.adb (Unit_Requires_Body): A [generic] package with
3933 a non-null abstract state needs a body.
3934 * sem_prag.adb (Analyze_Depends_In_Decl_Part): Update the calls
3935 to Collect_Subprogram_Inputs_Outputs.
3936 (Analyze_Global_Item): Verify the proper usage of an item with mode
3937 In_Out or Output relative to the enclosing context.
3938 (Analyze_Pragma): Abstract_State can now be applied to a generic
3939 package. Do not reset the Analyzed flag for pragmas Depends and Global
3940 as this is not needed.
3941 (Appears_In): Moved to library level.
3942 (Check_Mode_Restiction_In_Enclosing_Context): New routine.
3943 (Collect_Subprogram_Inputs_Outputs): Moved to library level. Add
3944 formal parameters Subp_Id, Subp_Inputs, Subp_Outputs and Global
3945 seen along with comments on usage.
3946 * sem_util.ads, sem_util.adb (Referenced): New routine.
3948 2013-04-25 Hristian Kirtchev <kirtchev@adacore.com>
3950 * sem_ch6.adb (Expand_Contract_Cases): Generate
3951 detailed error messages only when switch -gnateE is in effect.
3953 2013-04-25 Yannick Moy <moy@adacore.com>
3955 * sem_attr.adb (Analyze_Attribute): Do not issue
3956 an error for a possibly misplaced 'Result or 'Old attribute when
3957 analyzing the aspect.
3959 2013-04-25 Robert Dewar <dewar@adacore.com>
3961 * sem_ch12.adb, sem_util.adb, sem_ch4.adb: Minor reformatting.
3963 2013-04-25 Hristian Kirtchev <kirtchev@adacore.com>
3965 * sem_ch4.adb (Analyze_Quantified_Expression):
3966 Add local variable Loop_Id. Verify that the loop variable
3967 is used within the condition of the quantified expression.
3968 (Referenced): New routine.
3970 2013-04-25 Hristian Kirtchev <kirtchev@adacore.com>
3972 * sem_case.adb (Analyze_Choices): Enhance the error message
3973 given on a bad use of subtype predicate.
3974 * sem_ch5.adb (Analyze_Loop_Parameter_Specification): Enhance
3975 the error message given on a bad use of subtype predicate.
3976 * sem_util.adb (Bad_Predicated_Subtype_Use): Add formal parameter
3977 Suggest_Static. Emit an extra error message advising how to
3978 remedy the bad use of the predicate if the context warrants it.
3979 * sem_util.ads (Bad_Predicated_Subtype_Use): Add formal parameter
3980 Suggest_Static along with a comment explaining its usage.
3982 2013-04-25 Ed Schonberg <schonberg@adacore.com>
3984 * sem_disp.adb (Check_Dispatching_Operation): Further refinement
3985 to checks for AI05-0125: the check for a hidden primitive that
3986 may be overridden by the new declaration only applies if the
3987 hidden operation is never declared. This is not the case if the
3988 operation is declared in a parent unit.
3990 2013-04-25 Robert Dewar <dewar@adacore.com>
3992 * debug.adb: Remove d.X and d.Y entries and documentation.
3993 * exp_ch4.adb (Expand_N_If_Expression): Remove special code used
3994 if expression with actions not available (now always available).
3995 (Expand_Short_Circuit_Operator): Same change.
3996 * gnat1drv.adb (Adjust_Global_Switches) Remove setting
3997 Use_Expression_With_Actions flag, since this is now obsolete.
3998 * opt.ads (Use_Expression_Actions): Removed (always True now).
3999 * sinfo.ads: Minor comment updates.
4001 2013-04-25 Ed Schonberg <schonberg@adacore.com>
4003 * sem_ch12.adb (Check_Generic_Actuals): If an actual is an array
4004 subtype whose base type is currently private, install full view
4005 when compiling instance body.
4007 2013-04-25 Ed Schonberg <schonberg@adacore.com>
4009 * sem_disp.adb (Check_Dispatching_Operation): Refine checks for
4010 AI05-0125: the check for a hidden primitive that may be overridden
4011 by the new declaration is only performed if the declaration comes
4012 from source, and it must carry an explicit overriding indicator.
4014 2013-04-25 Hristian Kirtchev <kirtchev@adacore.com>
4016 * einfo.adb (Abstract_States): The attribute now applies to
4018 * sem_ch3.adb (Analyze_Object_Declaration): Check whether an
4019 object declaration introduces an illegal hidden state.
4020 * sem_prag.adb (Analyze_Abstract_State): Check whether a state
4021 declaration introduces an illegal hidden state.
4022 * sem_util.ads, sem_util.adb (Check_No_Hidden_State): New routine.
4024 2013-04-25 Ed Schonberg <schonberg@adacore.com>
4026 * exp_ch6.adb (Is_Build_In_Place_Function_Call): The call may
4027 be to a protected function, in which case the name in the call
4028 is a selected component.
4030 2013-04-25 Hristian Kirtchev <kirtchev@adacore.com>
4032 * sem_ch4.adb (Analyze_Quantified_Expression):
4033 Warn on a suspicious use of quantifier "some" when "all" was meant.
4034 (No_Else_Or_Trivial_True): New routine.
4036 2013-04-25 Robert Dewar <dewar@adacore.com>
4038 * einfo.ads, einfo.adb: Put back with/use for Namet.
4039 (Get_Pragma): New name (wi new spec) for Find_Pragma.
4040 * sem_ch6.adb: Change name Find_Pragma to Get_Pragma with
4041 different interface.
4043 2013-04-25 Ed Schonberg <schonberg@adacore.com>
4045 * sem_ch3.adb (Is_Visible_Component): In an instance all
4046 components are visible.
4048 2013-04-25 Matthew Heaney <heaney@adacore.com>
4050 * a-rbtgbo.adb, a-crbtgo.adb (Generic_Equal): do not test for
4051 tampering when container empty.
4052 * a-crbtgk.adb (Ceiling, Find, Floor): ditto.
4053 (Generic_Conditional_Insert, Generic_Conditional_Insert_With_Hint):
4056 2013-04-25 Ed Schonberg <schonberg@adacore.com>
4058 * par-ch12.adb: Move aspects from package specification to
4059 generic package declaration.
4060 * sem_ch12.adb: Analyze aspect specifications before building
4061 and analyzing the generic copy, so that the generated pragmas
4062 are properly taken into account.
4063 * sem_ch13.adb: For compilation unit aspects that apply to a
4064 generic package declaration, insert corresponding pragmas ahead
4065 of visible declarations.
4066 * sprint.adb: Display properly the aspects of a generic type
4069 2013-04-25 Robert Dewar <dewar@adacore.com>
4071 * frontend.adb: Minor reformatting.
4073 2013-04-25 Ed Schonberg <schonberg@adacore.com>
4075 * einfo.ads: Extend documentation on use of Is_Private_Ancestor
4077 * sem_ch3.adb (Is_Visible_Component): Refine predicate for the
4078 case of untagged types derived from private types, to reject
4079 illegal selected components.
4081 2013-04-25 Gary Dismukes <dismukes@adacore.com>
4083 * sem_util.adb (Is_Dependent_Component_Of_Mutable_Object): Test
4084 for case of selecting from an unexpanded implicit dereference
4085 and do not make a recursive call on such a prefix.
4087 2013-04-25 Doug Rupp <rupp@adacore.com>
4089 * targparm.adb (VXF{_Str}): New tag for vaxfloat.
4090 (Get_Target_Parameters): Handle VXF tag.
4091 * targparm.ads (VAX_Float_On_Target): New boolean.
4092 * system-vms-ia64.ads (VAX_Float): New boolean.
4093 * frontend.adb (Frontend): Handle VAX float boolean.
4095 2013-04-25 Hristian Kirtchev <kirtchev@adacore.com>
4097 * einfo.ads, einfo.adb: Remove with and use clauses for Namet.
4098 (Find_Pragma): New routine.
4099 * sem_util.ads, sem_util.adb (Find_Pragma): Moved to einfo.
4101 2013-04-25 Hristian Kirtchev <kirtchev@adacore.com>
4103 * sem_ch13.adb (Add_Call): Do not capture the nature of the inherited
4105 (Add_Predicates): Save the static predicate for diagnostics and error
4107 (Process_PPCs): Remove local variables Dynamic_Predicate_Present and
4108 Static_Predicate_Present. Add local variable Static_Pred. Ensure that
4109 the expression of a static predicate is static.
4111 2013-04-25 Hristian Kirtchev <kirtchev@adacore.com>
4113 * einfo.adb (Is_Ghost_Subprogram): Remove useless code.
4115 2013-04-25 Robert Dewar <dewar@adacore.com>
4117 * gnat_rm.texi: Minor addition of index entry.
4119 2013-04-25 Hristian Kirtchev <kirtchev@adacore.com>
4121 * sem_ch6.adb (Check_Access_Invariants): Test whether an
4122 invariant procedure is empty before generating a call to it.
4123 (Has_Enabled_Predicate): New routine.
4124 (Has_Null_Body): New routine.
4125 (Process_PPCs): Test whether an invariant procedure is
4126 empty before generating a call to it. Test whether predicates are
4127 enabled for a particular type before generating a predicate call.
4128 * sem_util.ads, sem_util.adb (Find_Pragma): New routine.
4130 2013-04-25 Robert Dewar <dewar@adacore.com>
4132 * sem_ch7.adb, einfo.adb, repinfo.adb, snames.adb-tmpl,
4133 snames.ads-tmpl: Minor reformatting.
4135 2013-04-25 Thomas Quinot <quinot@adacore.com>
4137 * sem_ch7.adb: Minor reformatting.
4139 2013-04-25 Robert Dewar <dewar@adacore.com>
4141 * gnat_rm.texi: Minor fix to Loop_Variant doc (Loop_Entry allowed).
4142 * s-tarest.adb: Minor reformatting.
4144 2013-04-25 Hristian Kirtchev <kirtchev@adacore.com>
4146 * aspects.ads, aspects.adb: Remove aspect Ghost from all relevant
4148 * einfo.adb: Remove with and use clause for Aspects.
4149 (Is_Ghost_Function): Removed.
4150 (Is_Ghost_Entity): New routine.
4151 (Is_Ghost_Subprogram): New routine.
4152 * einfo.ads: Remove synthesized attribute Is_Ghost_Function
4153 along with its uses in entities. Add synthesized attributes
4154 Is_Ghost_Entity and Is_Ghost_Subprogram along with uses in related
4156 (Is_Ghost_Function): Removed.
4157 (Is_Ghost_Entity): New routine.
4158 (Is_Ghost_Subprogram): New routine.
4159 * par-prag.adb: Remove pragma Ghost from the processing machinery.
4160 * repinfo.adb (List_Mechanisms): Add a value for convention Ghost.
4161 * sem_attr.adb (Analyze_Access_Attribute): Update the check
4162 for ghost subprograms.
4163 * sem_ch4.adb (Analyze_Call): Update the check for calls
4164 to ghost subprograms.
4165 (Check_Ghost_Function_Call): Removed.
4166 (Check_Ghost_Subprogram_Call): New routine.
4167 * sem_ch6.adb (Check_Convention): Rewritten.
4168 (Check_Overriding_Indicator): Remove the check for overriding
4170 (Convention_Of): New routine.
4171 * sem_ch12.adb (Preanalyze_Actuals): Update the check for ghost
4172 generic actual subprograms.
4173 * sem_mech.adb (Set_Mechanisms): Add an entry for convention Ghost.
4174 * sem_prag.adb: Remove the value for pragma Ghost from
4176 (Analyze_Pragma): Remove the processing for pragma Ghost.
4177 (Process_Convention): Emit an error when a ghost
4178 subprogram attempts to override.
4179 (Set_Convention_From_Pragma): Emit an error when a ghost subprogram
4180 attempts to override.
4181 * sinfo.ads: Clarify the usage of field Label_Construct.
4182 * snames.adb-tmpl (Get_Convention_Id): Add an entry for
4183 predefined name Ghost.
4184 (Get_Convention_Name): Add an entry for convention Ghost.
4185 * snames.ads-tmpl: Move predefined name Ghost to the sublist
4186 denoting conventions. Add convention id Ghost. Remove pragma
4189 2013-04-25 Ed Schonberg <schonberg@adacore.com>
4191 * sem_ch7.adb (Swap_Private_Dependents): Do no recurse on child
4192 units if within a generic hierarchy.
4194 2013-04-24 Hristian Kirtchev <kirtchev@adacore.com>
4196 * exp_ch6.adb (Expand_Actuals): Add a predicate check on an
4197 actual the related type has a predicate function.
4198 * sem_ch3.adb (Constant_Redeclaration): Ensure that the related
4199 type has an invariant procedure before building a call to it.
4200 * sem_ch6.adb (Append_Enabled_Item): New routine.
4201 (Check_Access_Invariants): Use routine
4202 Append_Enabled_Item to chain onto the list of postconditions.
4203 (Contains_Enabled_Pragmas): Removed.
4204 (Expand_Contract_Cases): Use routine Append_Enabled_Item to chain onto
4205 the list of postconditions.
4206 (Invariants_Or_Predicates_Present): Removed.
4207 (Process_PPCs): Partially reimplemented.
4209 2013-04-24 Sergey Rybin <rybin@adacore.com frybin>
4211 * tree_io.ads: Update ASIS_Version_Number because of changes
4212 in the way how entities are chained in a scope by means of
4215 2013-04-24 Ed Schonberg <schonberg@adacore.com>
4217 * exp_ch13.adb (Expand_N_Attribute_Definition_Clause, case
4218 Storage_Size): If the clause is not from an aspect, insert
4219 assignment to size variable of task type at the point of the
4220 clause, not after the task definition, to prevent access before
4221 elaboration in the back-end.
4223 2013-04-24 Yannick Moy <moy@adacore.com>
4225 * sem_prag.adb (Sig_Flags): Set correct value for Pragma_Assume.
4227 2013-04-24 Yannick Moy <moy@adacore.com>
4229 * gnat_rm.texi: Document 'Loop_Entry.
4231 2013-04-24 Jose Ruiz <ruiz@adacore.com>
4233 * s-tassta.adb, s-tarest.adb (Task_Wrapper): Start looking for
4234 fall-back termination handlers from the parents, because they apply
4235 only to dependent tasks.
4236 * s-solita.adb (Task_Termination_Handler_T): Do not look for fall-back
4237 termination handlers because the environment task has no parent,
4238 and if it defines one of these handlers it does not apply to
4239 itself because they apply only to dependent tasks.
4241 2013-04-24 Robert Dewar <dewar@adacore.com>
4243 * sem_type.adb, exp_attr.adb, exp_ch4.adb: Minor reformatting.
4245 2013-04-24 Robert Dewar <dewar@adacore.com>
4247 * gnat_rm.texi: Document 'Update attribute.
4248 * sem_attr.adb (Analyze_Attribute, case Update): Remove call
4249 to S14_Attribute (S14_Attribute): removed.
4251 2013-04-24 Robert Dewar <dewar@adacore.com>
4253 * interfac.ads: Add size clauses for IEEE_Float_32/64
4255 2013-04-24 Claire Dross <dross@adacore.com>
4257 * gnat1drv.adb (Adjust_Global_Switches): Remove
4258 special assignment of Use_Expression_With_Actions for SPARK_Mode.
4260 2013-04-24 Hristian Kirtchev <kirtchev@adacore.com>
4262 * checks.adb (Apply_Predicate_Check): Check for the presence
4263 of the dynamic predicate aspect when trying to determine if the
4264 predicate of a type is non-static.
4265 * sem_ch5.adb (Analyze_Loop_Parameter_Specification): Check
4266 for the presence of the dynamic predicate aspect when trying to
4267 determine if the predicate of a type is non- static.
4268 * sem_ch13.adb (Add_Call): Capture the nature of the
4269 inherited ancestor predicate.
4270 (Build_Predicate_Functions): Update comments. Rewrite the checks on
4271 static predicate application. Complain about the form of a non-static
4272 expression only when the type is static.
4274 2013-04-24 Ed Schonberg <schonberg@adacore.com>
4276 * sem_prag.adb: Add guard to tree traversal.
4278 2013-04-24 Vincent Celier <celier@adacore.com>
4280 * clean.adb (Clean): Remove local variable Root_Environment,
4281 use Makeutl.Root_Environment instead.
4282 * gnatcmd.adb: Remove local variable Root_Environment, use
4283 Makeutl.Root_Environment instead.
4284 * make.adb (Gnatmake): Remove local variable Root_Environment,
4285 use Makeutl.Root_Environment instead.
4286 * prj-makr.adb: Remove local variable Root_Environment, use
4287 Makeutl.Root_Environment instead.
4289 2013-04-24 Hristian Kirtchev <kirtchev@adacore.com>
4291 * exp_attr.adb (Expand_Loop_Entry_Attribute): Clarify the
4292 extraction of the declarative part of the conditional block. Move
4293 the processing of simple infinite loops to the start of the
4294 expansion logic. Correct the check which determines whether the
4295 proper scope is installed in visibility.
4296 * sem_attr.adb (Analyze_Attribute): Add local variable Attr
4297 to keep track of the attribute in case the enclosing indexed
4298 component has to be rewritten. When searching for the enclosing
4299 loop, start from the proper attribute reference in case of a
4300 rewriting. Do not allow for 'Loop_Entry to appear in pragma
4301 Assert. Replace loop variable J with Index. Set the type of the
4303 * sem_ch5.adb (Check_Unreachable_Code): Detect a specialized
4304 block that services a loop statement subject to at least one
4305 'Loop_Entry attribute.
4307 2013-04-24 Ed Schonberg <schonberg@adacore.com>
4309 * sem_type.adb (Disambiguate): In Ada 2012 mode, when trying to
4310 resolve a fixed point operation, use first subtype to determine
4311 whether type and operator are declared in the same list of
4314 2013-04-24 Hristian Kirtchev <kirtchev@adacore.com>
4316 * par-ch6.adb (P_Subprogram): Detect an illegal
4317 placement of the aspect specification list in the context of
4318 expression functions.
4320 2013-04-24 Ed Schonberg <schonberg@adacore.com>
4322 * exp_ch4.adb (Expand_N_Allocator): If the designated object
4323 has tasks, and the pointer type is an itype that has no master
4324 id, create a master renaming in the current context, which can
4325 only be an init_proc.
4327 2013-04-24 Robert Dewar <dewar@adacore.com>
4329 * sem_ch3.adb, sem_ch7.adb: Minor reformatting.
4330 * gnat_rm.texi: Document pragma Loop_Invariant.
4331 * sem_attr.adb (Analyze_Attribute, case Loop_Entry): This is
4332 no longer an S14_Attribute.
4333 * sem_prag.adb (Analyze_Pragma, case Loop_Invariant): Combine
4334 processing with Assert, allow message parameter, remove call
4337 2013-04-24 Thomas Quinot <quinot@adacore.com>
4339 * exp_ch4.adb: Minor reformatting.
4341 2013-04-24 Ed Schonberg <schonberg@adacore.com>
4343 * sem_ch7.adb (Swap_Private_Dependents): New internal routine
4344 to Install_Private_Declarations, to make the installation of
4345 private dependents recursive in the presence of child units.
4346 * sem_ch3.adb (Build_Discriminated_Subtype): Initialize properly
4347 the Private_Dependents of a private subtype.
4349 2013-04-24 Hristian Kirtchev <kirtchev@adacore.com>
4351 * exp_attr.adb (Expand_Loop_Entry_Attribute): Update the
4352 retrieval of the block declarations.
4353 * par-ch4.adb (P_Name): Let the name parsing machinery create
4354 a sequence of nested indexed components for attribute Loop_Entry.
4355 * sem_attr.adb (Analyze_Attribute): Add local constant
4356 Context. Reimplement part of the analysis of attribute Loop_Entry.
4357 (Convert_To_Indexed_Component): Removed.
4358 * sem_ch4.adb (Analyze_Indexed_Component_Form): Do not analyze
4359 an indexed component after it has been rewritten into attribute
4362 2013-04-24 Yannick Moy <moy@adacore.com>
4364 * snames.ads-tmpl: Minor change to list
4365 Loop_(In)variant not in configuration pragma.
4366 * sem_ch3.adb (Analyze_Declarations): Do not look at the original node
4367 for analyzing the expressions in pre/postconditions.
4369 2013-04-24 Robert Dewar <dewar@adacore.com>
4371 * gnatcmd.adb, xref_lib.adb, gnatls.adb, sem_ch13.adb: Minor
4374 2013-04-24 Yannick Moy <moy@adacore.com>
4376 * sem_ch6.adb (Analyze_Generic_Subprogram_Body,
4377 Analyze_Subprogram_Body_Helper): Reset contract node to Empty
4378 before setting entity to E_Subprogram_Body.
4379 * sem_ch8.adb (Analyze_Subprogram_Renaming): Reset contract node to
4380 Empty before setting entity to E_Subprogram_Body.
4382 2013-04-24 Vincent Celier <celier@adacore.com>
4384 * gnat_ugn.texi: Document new gnatls switch -aPdir.
4385 * gnatcmd.adb: Pass switch -aP<dir> to gnatls.
4386 * gnatls.adb (Scan_Ls_Arg): Process new switch -aP<dir>. Issue
4387 a warning for unknown switches.
4388 (Usage): Add line for new switch -aPdir.
4390 2013-04-24 Ed Schonberg <schonberg@adacore.com>
4392 * sem_util.adb, sem_util.ads (Is_Limited_Class_Wide_Type): Return true
4393 if the type comes from a limited view, so that task attributes can be
4396 2013-04-24 Yannick Moy <moy@adacore.com>
4398 * checks.adb (Apply_Float_Conversion_Check): Do not apply checks if
4399 full expansion is not enabled.
4401 2013-04-24 Ed Schonberg <schonberg@adacore.com>
4403 * sem_ch6.adb (Create_Extra_Formals): In Ada 2012, create extra
4404 formals if the type does not yet have a completion, and thus
4405 has no underlying view.
4407 2013-04-24 Ed Schonberg <schonberg@adacore.com>
4409 * sem_ch13.adb (Analyze_Aspect_Specifications): Treat an aspect
4410 specification for Address as a reference, to suppress warnings
4411 on entities that may be read by an external device.
4413 2013-04-24 Sergey Rybin <rybin@adacore.com frybin>
4415 * gnat_ugn.texi: Add description of '--help' and '--version'
4416 options for ASIS tools: gnatelim, gnatmetric, gnatstub, gnatpp.
4418 2013-04-24 Arnaud Charlet <charlet@adacore.com>
4420 * gnat_rm.texi: Minor syntax fix.
4422 2013-04-24 Hristian Kirtchev <kirtchev@adacore.com>
4424 * exp_attr.adb (Expand_Loop_Entry_Attribute): Add extra comments on
4425 what and why is being analyzed. Remove the decoration of renamings as
4426 this simply falls out of the general analysis mechanism.
4428 2013-04-24 Hristian Kirtchev <kirtchev@adacore.com>
4430 * sem_res.adb (Explain_Redundancy): New routine.
4431 (Resolve_Equality_Op): Place the error concerning a redundant
4432 comparison to True at the "=". Try to explain the nature of the
4435 2013-04-24 Javier Miranda <miranda@adacore.com>
4438 * checks.adb, exp_ch6.adb (Install_Null_Excluding_Check): No
4439 check in interface thunks since it is performed at the caller
4441 (Expand_Simple_Function_Return): No accessibility check
4442 needed in thunks since the check is done by the target routine.
4444 2013-04-24 Vincent Celier <celier@adacore.com>
4446 * xref_lib.adb (Add_Entity): Use the canonical file names
4447 so that source file names with capital letters are found on
4448 platforms where file names are case insensitive.
4450 2013-04-24 Hristian Kirtchev <kirtchev@adacore.com>
4452 * par-ch4.adb (P_Name): Continue to parse the name extension when the
4453 construct is attribute Loop_Entry. Do not convert the attribute
4454 reference into an indexed component when there is at least one
4455 expression / range following 'Loop_Entry.
4457 2013-04-24 Hristian Kirtchev <kirtchev@adacore.com>
4459 * sem_ch6.adb (Contains_Enabled_Pragmas): New routine.
4460 (Process_PPCs): Generate procedure _Postconditions
4461 only when the context has invariants or predicates or enabled
4464 2013-04-24 Thomas Quinot <quinot@adacore.com>
4466 * g-socket.adb (Host_Entry): Introduce intermediate copy of
4467 memory location pointed to by Hostent_H_Addr, as it might not
4468 have sufficient alignment.
4470 2013-04-24 Yannick Moy <moy@adacore.com>
4472 * repinfo.adb (List_Rep_Info): Set the value of Unit_Casing before
4473 calling subprograms which may read it.
4475 2013-04-24 Hristian Kirtchev <kirtchev@adacore.com>
4477 * einfo.adb: Remove Loop_Entry_Attributes from the usage of
4478 nodes. Flag 260 is now used.
4479 (Has_Loop_Entry_Attributes): New routine.
4480 (Loop_Entry_Attributes): Removed.
4481 (Set_Has_Loop_Entry_Attributes): New routine.
4482 (Set_Loop_Entry_Attributes): Removed.
4483 (Write_Entity_Flags): Write out Flag 260.
4484 (Write_Field10_Name): Remove the output for Loop_Entry_Attributes.
4485 * einfo.ads: Remove attribute Loop_Entry_Attributes,
4486 its related comment and uses in nodes. Add new attribute
4487 Has_Loop_Entry_Attributes, related comment and uses in loop nodes.
4488 (Has_Loop_Entry_Attributes): New routine and pragma Inline.
4489 (Loop_Entry_Attributes): Removed along with pragma Inline.
4490 (Set_Has_Loop_Entry_Attributes): New routine and pragma Inline.
4491 (Set_Loop_Entry_Attributes): Removed along with pragma Inline.
4492 * exp_attr.adb (Expand_Loop_Entry_Attribute): New routine.
4493 (Expand_N_Attribute_Reference): Expand attribute 'Loop_Entry.
4494 * exp_ch5.adb: Remove with and use clause for Elists.
4495 (Expand_Loop_Entry_Attributes): Removed.
4496 (Expand_N_Loop_Statement): Add local variable Stmt. Rename local
4497 constant Isc to Scheme. When a loop is subject to attribute
4498 'Loop_Entry, retrieve the nested loop from the conditional
4499 block. Move the processing of controlled object at the end of
4501 * sem_attr.adb (Analyze_Attribute): Do not chain attribute
4502 'Loop_Entry to its related loop.
4503 * sem_ch5.adb (Analyze_Loop_Statement): Add local variable
4504 Stmt. When the iteration scheme mentions attribute 'Loop_Entry,
4505 the entire loop is rewritten into a block. Retrieve the nested
4506 loop in such cases to complete the analysis.
4507 * sem_util.ads, sem_util.adb (Find_Loop_In_Conditional_Block): New
4509 (Subject_To_Loop_Entry_Attributes): New routine.
4511 2013-04-24 Robert Dewar <dewar@adacore.com>
4513 * exp_prag.adb (Expand_Loop_Variant): Generate pragma Check
4514 (Loop_Variant, xxx) rather than Assert (xxx).
4515 * gnat_rm.texi: Document pragma Loop_Variant.
4516 * sem_prag.adb (Analyze_Pragma, case Loop_Variant): Remove call
4519 2013-04-24 Yannick Moy <moy@adacore.com>
4521 * adabkend.adb, ali-util.adb, ali.adb, debug.adb,
4522 errout.adb, errout.ads, erroutc.adb, exp_ch3.adb, exp_ch4.adb,
4523 exp_ch6.adb, exp_ch7.adb, exp_dbug.adb, exp_util.adb,
4524 expander.adb, freeze.adb, gnat1drv.adb, lib-writ.adb,
4525 lib-writ.ads, lib-xref.adb, lib-xref.ads, opt.adb, opt.ads,
4526 restrict.adb, sem_aggr.adb, sem_attr.adb, sem_ch3.adb,
4527 sem_ch4.adb, sem_ch5.adb, sem_ch6.adb, sem_eval.adb, sem_prag.adb,
4528 sem_res.adb, sem_util.adb: Everything with name
4529 'Alfa' renamed in 'SPARK'. Update comments.
4530 Renaming of units with name 'Alfa', renamed with 'SPARK' instead.
4531 * exp_alfa.adb: renamed exp_spark.adb.
4532 * exp_alfa.ads: renamed exp_spark.ads.
4533 * get_alfa.adb: renamed get_spark_xrefs.adb.
4534 * get_alfa.ads: renamed get_spark_xrefs.ads.
4535 * lib-xref-alfa.adb: renamed lib-xref-spark_specific.adb.
4536 * put_alfa.adb: renamed put_spark_xrefs.adb.
4537 * put_alfa.ads: renamed put_spark_xrefs.ads.
4538 * alfa.adb: renamed spark_xrefs.adb.
4539 * alfa.ads: renamed spark_xrefs.ads.
4540 * alfa_test.adb: renamed spark_xrefs_test.adb.
4541 * gcc-interface/Make-lang.in: Update dependencies.
4543 2013-04-24 Robert Dewar <dewar@adacore.com>
4545 * gnat_rm.texi: Document pragma Assume.
4546 * sem_prag.adb (Analyze_Pragma, case Assume): Now processed as
4547 part of Assert, and no longer requires -gnatd.F
4549 2013-04-24 Robert Dewar <dewar@adacore.com>
4551 * gnat_rm.texi: Document pragma Assert_And_Cut.
4552 * sem_prag.adb (Analyze_Pragma, case Assert_And_Cut): Remove
4555 2013-04-24 Ed Schonberg <schonberg@adacore.com>
4557 * sem_aux.adb: Add guard in Available_View.
4559 2013-04-24 Hristian Kirtchev <kirtchev@adacore.com>
4561 * sem_prag.adb (Analyze_Depends_In_Decl_Part): Use
4562 Find_Related_Subprogram to find the associated subprogram.
4563 (Analyze_Global_In_Decl_List): Use Find_Related_Subprogram
4564 to find the associated subprogram.
4565 (Analyze_Pragma): Use Find_Related_Subprogram to find the associated
4568 2013-04-24 Hristian Kirtchev <kirtchev@adacore.com>
4570 * exp_ch6.adb: Remove with and use clause for Sem_Prag.
4571 (Freeze_Subprogram): Call Analyze_Subprogram_Contract to analyze
4572 the contract of a subprogram.
4573 * sem_ch3.adb: Remove with and use clause for Sem_Prag.
4574 (Analyze_Declarations): Call Analyze_Subprogram_Contract to
4575 analyze the contract of a subprogram.
4576 * sem_ch6.adb (Analyze_Subprogram_Contract): New routine.
4577 (Check_Subprogram_Contract): Removed.
4578 * sem_ch6.ads (Analyze_Subprogram_Contract): New routine.
4579 (Check_Subprogram_Contract): Removed.
4580 (Expand_Contract_Cases): Add a guard against malformed contract cases.
4581 * sem_ch13.adb (Analyze_Aspect_Specifications): Call
4582 Decorate_Delayed_Aspect_And_Pragma to decorate aspects
4583 Contract_Cases, Depends and Global. Reimplement the analysis of
4584 aspect Contract_Cases.
4585 (Decorate_Delayed_Aspect_And_Pragma): New routine.
4586 * sem_prag.adb (Analyze_Contract_Cases_In_Decl_Part): New routine.
4587 (Analyze_CTC_In_Decl_Part): Removed.
4588 (Analyze_Pragma): Reimplement the analysis of pragma Contract_Cases.
4589 (Analyze_Test_Case_In_Decl_Part): New routine.
4590 (Find_Related_Subprogram): New routine.
4591 (Requires_Profile_Installation): Add new formal Prag. Update
4592 the logic to take into account the origin of the pragma.
4593 * sem_prag.ads (Analyze_Contract_Cases_In_Decl_Part): New routine.
4594 (Analyze_CTC_In_Decl_Part): Removed.
4595 (Analyze_Test_Case_In_Decl_Part): New routine.
4597 2013-04-24 Robert Dewar <dewar@adacore.com>
4599 * sem_prag.adb (Process_Convention): Move Stdcall tests to
4600 Set_Convention_From_Pragma so that they are applied to each
4601 entry of a homonym set.
4602 (Process_Convention): Don't try to set convention if already set.
4604 2013-04-24 Robert Dewar <dewar@adacore.com>
4606 * gnatbind.adb: Minor reformatting.
4608 2013-04-24 Vincent Celier <celier@adacore.com>
4610 * clean.adb (Gnatclean): Add the default project search
4611 directories in the project search path after scanning the
4612 switches on the command line.
4613 (Initialize): Do not put the default project search directories in the
4614 project search path.
4615 * gnatcmd.adb (GNATcmd): Add the default project search
4616 directories in the project search path after scanning the switches
4617 on the command line.
4618 * make.adb (Initialize): Add the default project search
4619 directories in the project search path after scanning the switches
4620 on the command line.
4622 2013-04-24 Yannick Moy <moy@adacore.com>
4624 * restrict.ads (Restriction_Warnings): Initialize with all False value.
4626 2013-04-24 Robert Dewar <dewar@adacore.com>
4628 * checks.ads, checks.adb (Predicate_Checks_Suppressed): New function.
4629 * exp_util.ads, exp_util.adb (Make_Predicate_Check): Check setting of
4631 * snames.ads-tmpl (Name_Predicate_Check): New check name.
4632 * types.ads (Predicate_Check): New definition.
4633 * gnat_rm.texi: Add documentation for Predicate_Check.
4635 2013-04-24 Ed Schonberg <schonberg@adacore.com>
4637 * exp_ch8.adb (Expand_N_Subprogram_Renaming_Declaration): If this
4638 is a renaming of predefined equality for an untagged record,
4639 add generated body to the freeze actions for the subprogram, to
4640 prevent freezing issues when the record has incomplete components.
4641 * exp_ch4.adb (Expand_Composite_Equality): If the type is a type
4642 without completion, return a predefined comparison instead of
4643 just False. This may happen when building the expression for
4644 record equality, when some component has a type whose completion
4645 has not been seen yet. The operation will be analyzed an expanded
4646 after the type has been frozen, at which point all component
4647 types will have been completed, or an error reported.
4649 2013-04-24 Ed Schonberg <schonberg@adacore.com>
4651 * sem_ch13.adb (Analyze_Aspect_Specifications): Do not delay
4652 analysis of a Convention aspect.
4654 2013-04-24 Eric Botcazou <ebotcazou@adacore.com>
4656 * fe.h (Machine_Overflows_On_Target): New macro and declaration.
4657 (Signed_Zeros_On_Target): Likewise.
4659 2013-04-24 Hristian Kirtchev <kirtchev@adacore.com>
4661 * exp_ch6.adb: Add with and use clause for Sem_Prag.
4662 (Freeze_Subprogram): Analyze all delayed aspects for a null
4663 procedure so that they are available when analyzing the
4664 internally-generated _Postconditions routine.
4665 * exp_ch13.adb: Remove with and use clause for Sem_Prag.
4666 (Expand_N_Freeze_Entity): Move the code that analyzes delayed
4667 aspects of null procedures to exp_ch6.Freeze_Subprogram.
4668 * sem_prag.adb (Analyze_Abstract_State): Update the check on
4669 volatile requirements.
4671 2013-04-24 Bob Duff <duff@adacore.com>
4673 * ali-util.ads (Source_Record): New component Stamp_File
4674 to record from whence the Stamp came.
4675 * ali-util.adb (Set_Source_Table): Set Stamp_File component.
4676 * bcheck.adb (Check_Consistency): Print additional information in
4678 * gnatbind.adb (Gnatbind): Print additional information in
4681 2013-04-24 Robert Dewar <dewar@adacore.com>
4683 * exp_ch13.adb, sem_prag.adb: Update comments.
4684 * sem_ch3.adb, exp_ch9.adb, g-socket.adb, sem_ch13.adb: Minor
4687 2013-04-24 Doug Rupp <rupp@adacore.com>
4689 * vms_data.ads (/{NO}INHIBIT-EXEC): Document new default behavior.
4691 2013-04-24 Yannick Moy <moy@adacore.com>
4693 * sinfo.ads: Minor correction of typo.
4695 2013-04-24 Ed Schonberg <schonberg@adacore.com>
4697 * sem_ch3.adb: Create packed array only when expander is
4700 2013-04-24 Hristian Kirtchev <kirtchev@adacore.com>
4702 * sem_prag.adb (Analyze_Depends_In_Decl_Part): Install the formals only
4703 when the context warrants it.
4704 (Analyze_Global_In_Decl_List): Install the formals only when
4705 the context warrants it.
4706 (Requires_Profile_Installation): New routine.
4708 2013-04-24 Ed Schonberg <schonberg@adacore.com>
4710 * exp_ch6.adb (Expand_N_Simple_Return_Statement): When the return
4711 type is a discriminated private type that does not require use
4712 of the secondary stack, a constrained subtype of the underlying
4713 type is created to convey the proper object size to the backend.
4714 If the return type is originally a private type, the return
4715 expression is wrapped in an unchecked_conversion. If the return
4716 expression is used subsequently in a call to the postcondition
4717 function, this conversion must be undone to prevent a spurious
4718 error on the analysis of that call.
4720 2013-04-23 Kai Tietz <ktietz@redhat.com>
4723 * raise-gcc.c (__SEH__): Additional check that SjLj isn't active.
4725 2013-04-23 Eric Botcazou <ebotcazou@adacore.com>
4726 Pascal Obry <obry@adacore.com>
4728 * gcc-interface/Makefile.in (targ): Fix target name check.
4729 (../../gnatmake$(exeext)): Add '+' for LTO.
4730 (../../gnatlink$(exeext)): Likewise.
4732 2013-04-23 Hristian Kirtchev <kirtchev@adacore.com>
4734 * exp_ch9.adb (Build_PPC_Wrapper): Correct the traversal of
4735 pre- and post-conditions.
4736 (Expand_N_Task_Type_Declaration):
4737 Use the correct attribute to check for pre- and post-conditions.
4738 * exp_ch13.adb (Expand_N_Freeze_Entity): Correct the traversal of
4739 pre- and post-conditions. Analyze delayed classification items.
4740 * freeze.adb (Freeze_Entity): Use the correct attribute to
4741 check for pre- and post- conditions.
4742 * sem_ch3.adb (Analyze_Declarations): Correct the traversal
4743 of pre- and post-conditions as well as contract- and
4744 test-cases. Analyze delayed pragmas Depends and Global.
4745 * sem_ch6.adb (Check_Subprogram_Contract): Use the correct
4746 attribute to check for pre- and post-conditions, as well as
4747 contract-cases and test-cases. (List_Inherited_Pre_Post_Aspects):
4748 Correct the traversal of pre- and post- conditions.
4749 (Process_Contract_Cases): Update the comment on usage. Correct
4750 the traversal of contract-cases.
4751 (Process_Post_Conditions): Update the comment on usage. Correct the
4752 traversal of pre- and post-conditions.
4753 (Process_PPCs): Correct the traversal of pre- and post-conditions.
4754 (Spec_Postconditions): Use the correct
4755 attribute to check for pre- and post- conditions, as well as
4756 contract-cases and test-cases.
4757 * sem_ch13.adb (Analyze_Aspect_Specifications): Reimplement the
4758 actions related to aspects Depends and Global. Code refactoring
4759 for pre- and post-conditions.
4760 (Insert_Delayed_Pragma): New routine.
4761 * sem_prag.adb (Add_Item): New routine.
4762 (Analyze_Depends_In_Decl_Part): New routine.
4763 (Analyze_Global_In_Decl_Part): New routine.
4764 (Analyze_Pragma): Reimplement the actions related to aspects Depends and
4765 Global. Verify that a body acts as a spec for pragma Contract_Cases.
4766 (Chain_PPC): Use Add_Contract_Item to chain a pragma.
4767 (Chain_CTC): Correct the traversal of contract-
4768 and test-cases. Use Add_Contract_Item to chain a pragma.
4769 (Chain_Contract_Cases): Correct the traversal of contract-
4770 and test-cases. Use Add_Contract_Item to chain a pragma.
4771 (Check_Precondition_Postcondition): Update the comment on usage.
4772 (Check_Test_Case): Update the comment on usage.
4773 * sem_prag.ads (Analyze_Depends_In_Decl_Part): New routine.
4774 (Analyze_Global_In_Decl_Part): New routine.
4775 * sem_util.ads, sem_util.adb (Add_Contract_Item): New routine.
4776 * sinfo.adb (Classifications): New routine.
4777 (Contract_Test_Cases): New routine.
4778 (Pre_Post_Conditions): New routine.
4779 (Set_Classifications): New routine.
4780 (Set_Contract_Test_Cases): New routine.
4781 (Set_Pre_Post_Conditions): New routine.
4782 (Set_Spec_CTC_List): Removed.
4783 (Set_Spec_PPC_List): Removed.
4784 (Spec_CTC_List): Removed.
4785 (Spec_PPC_List): Removed.
4786 * sinfo.ads: Update the structure of N_Contruct along with all
4788 (Classifications): New routine and pragma Inline.
4789 (Contract_Test_Cases): New routine and pragma Inline.
4790 (Pre_Post_Conditions): New routine and pragma Inline.
4791 (Set_Classifications): New routine and pragma Inline.
4792 (Set_Contract_Test_Cases): New routine and pragma Inline.
4793 (Set_Pre_Post_Conditions): New routine and pragma Inline.
4794 (Set_Spec_CTC_List): Removed.
4795 (Set_Spec_PPC_List): Removed.
4796 (Spec_CTC_List): Removed.
4797 (Spec_PPC_List): Removed.
4799 2013-04-23 Doug Rupp <rupp@adacore.com>
4801 * init.c (GNAT$STOP) [VMS]: Bump sigargs[0] count by 2
4802 to account for LIB$STOP not having the chance to add the PC and
4805 2013-04-23 Robert Dewar <dewar@adacore.com>
4807 * sem_ch13.adb: Minor code reorganization (remove some redundant
4809 * sem_ch3.adb, sem_prag.adb: Minor reformatting.
4811 2013-04-23 Yannick Moy <moy@adacore.com>
4813 * einfo.ads: Minor typo fix.
4814 * sem_ch13.adb (Build_Predicate_Functions): Reject cases where
4815 Static_Predicate is applied to a non-scalar or non-static type.
4816 * sem_prag.adb: Minor typo fix.
4818 2013-04-23 Doug Rupp <rupp@adacore.com>
4820 * init.c (GNAT$STOP) [VMS]: New function.
4822 2013-04-23 Ed Schonberg <schonberg@adacore.com>
4824 * sem_ch3.adb: Add exp_pakd to context.
4825 (Constrain_Component_Type): If the component of the parent is
4826 packed, and the record subtype being built is already frozen,
4827 as is the case for an itype, the component type itself will not
4828 be frozen, and the packed array type for it must be constructed
4831 2013-04-23 Thomas Quinot <quinot@adacore.com>
4833 * g-socket.adb, g-socket.ads (Set_Close_On_Exec): New subprogram.
4835 2013-04-23 Yannick Moy <moy@adacore.com>
4837 * err_vars.ads (Error_Msg_Qual_Level): Set variable to zero
4839 * opt.ads (Multiple_Unit_Index): Set variable to zero at declaration.
4840 * sem_util.adb (NCT_Table_Entries): Set variable to zero at declaration.
4841 * set_targ.ads (Num_FPT_Modes): Set variable to zero at declaration.
4842 * stylesw.adb (Save_Style_Check_Options): Protect testing the
4843 value of Style_Check_Comments_Spacing by a previous test that
4844 Style_Check_Comments is True.
4846 2013-04-23 Thomas Quinot <quinot@adacore.com>
4848 * sem_prag.adb, sem_prag.ads (Effective_Name): Rename to
4849 Original_Name, and move declaration to package body as this
4850 subprogram is not used from outside. Also clarify documentation.
4852 2013-04-23 Ed Schonberg <schonberg@adacore.com>
4854 * exp_ch6.adb (Expand_N_Subprogram_Body): When compiling with
4855 initialize_scalars, disable predicate checks on the generated
4856 assignment to an out scalar parameter.
4858 2013-04-23 Gary Dismukes <dismukes@adacore.com>
4860 * sem_ch4.adb (Analyze_Allocator): Remove error
4861 check for "constrained in partial view" constraints entirely.
4863 2013-04-23 Robert Dewar <dewar@adacore.com>
4865 * einfo.ads, sem_prag.ads: Minor reformatting.
4866 * errout.ads: Comment update.
4868 2013-04-23 Yannick Moy <moy@adacore.com>
4870 * exp_ch5.adb: Minor typo.
4872 2013-04-23 Thomas Quinot <quinot@adacore.com>
4874 * gnat_ugn.texi: Fix typo.
4876 2013-04-23 Ed Schonberg <schonberg@adacore.com>
4878 * einfo.ads: Minor documentation clarification.
4880 2013-04-23 Bob Duff <duff@adacore.com>
4882 * types.ads: Fix incorrect comment.
4884 2013-04-23 Ed Schonberg <schonberg@adacore.com>
4886 * sem_aux.adb sem_aux.ads (Effectively_has_Constrained_Partial_View):
4887 Rename subprogram as Object_Type_Has_Constrained_Partial_View, better
4888 description of purpose.
4889 * checks.adb (Apply_Discriminant_Check): Use above renaming.
4890 * sem_ch4.adb (Analyze_Allocator): Check Has_Constrained_Partial_View
4891 of the base type, rather than using the Object_Type predicate.
4892 * sem_attr.adb (Analyze_Attribute, case 'Access): Use above renaming.
4893 * sem_util.adb (Is_Dependent_Component_Of_Mutable_Object): ditto.
4894 * exp_attr.adb (Expand_N_Attribute_Reference, case 'Constrained): Ditto.
4895 * exp_ch4.adb (Expand_N_Allocator): Ditto.
4897 2013-04-23 Robert Dewar <dewar@adacore.com>
4899 * exp_prag.adb (Expand_Pragma_Check): Check for Assert rather
4901 * sem_prag.adb (Is_Valid_Assertion_Kind): Moved to spec
4902 (Effective_Name): New function (Analyze_Pragma, case Check):
4903 Disallow [Statement_]Assertions (Check_Kind): Implement
4904 Statement_Assertions (Check_Applicable_Policy): Use Effective_Name
4905 (Is_Valid_Assertion_Kind): Allow Statement_Assertions.
4906 * sem_prag.ads (Is_Valid_Assertion_Kind): Moved here from body
4907 (Effective_Name): New function.
4908 * sem_res.adb: Minor reformatting.
4909 * snames.ads-tmpl (Name_Statement_Assertions): New entry.
4910 * gnat_rm.texi: Add documentation of new assertion kind
4911 Statement_Assertions.
4913 2013-04-23 Robert Dewar <dewar@adacore.com>
4915 * sinfo.ads, einfo.adb, sem_res.adb, exp_ch6.adb, aspects.adb: Minor
4916 reformatting and code clean up.
4918 2013-04-23 Vincent Celier <celier@adacore.com>
4920 * prj-part.ads, prj-conf.ads: Minor comment updates.
4922 2013-04-23 Ed Schonberg <schonberg@adacore.com>
4924 * einfo.adb (Predicate_Function): For a private type, retrieve
4925 predicate function from full view.
4926 * aspects.adb (Find_Aspect): Ditto.
4927 * exp_ch6.adb (Expand_Actuals): If the formal is class-wide and
4928 the actual is a definite type, apply predicate check after call.
4929 * sem_res.adb: Do not apply a predicate check before the call to
4930 a generated Init_Proc.
4932 2013-04-23 Robert Dewar <dewar@adacore.com>
4934 * sem_ch13.adb (Analyze_Aspect_Specifications): Significant
4935 rewrite to make sure Is_Ignore is properly captured when aspect
4937 * sem_ch6.adb: Minor reformatting.
4938 * sem_prag.adb (Analyze_Pragma): Do not test policy at time of
4939 pragma for the case of a pragma coming from an aspect (already
4940 tested when we analyzed the aspect).
4942 2013-04-23 Vincent Celier <celier@adacore.com>
4944 * prj-conf.adb (Parse_Project_And_Apply_Config): New
4945 Boolean parameter Implicit_Project, defaulted to False. Call
4946 Prj.Part.Parse with Implicit_Project.
4947 * prj-conf.ads (Parse_Project_And_Apply_Config): New Boolean
4948 parameter Implicit_Project, defaulted to False.
4949 * prj-part.adb (Parse_Single_Project): New Boolean parameter
4950 Implicit_Project, defaulted to False. When Implicit_Project is
4951 True, change the Directory of the project node to the Current_Dir.
4952 * prj-part.ads (Parse): New Boolean parameter, defaulted to False
4954 2013-04-23 Robert Dewar <dewar@adacore.com>
4956 * exp_util.adb: Minor reformatting.
4958 2013-04-23 Robert Dewar <dewar@adacore.com>
4960 * xoscons.adb: Minor reformatting.
4962 2013-04-23 Hristian Kirtchev <kirtchev@adacore.com>
4964 * sem_prag.adb (Check_Mode): Ensure that a
4965 self-referential output appears in both input and output lists of
4966 the subprogram as categorized by aspect Global.
4967 (Check_Usage): Rename formal parameters to better illustrate their
4968 function. Update all uses of the said formals.
4970 2013-04-23 Thomas Quinot <quinot@adacore.com>
4972 * exp_util.adb, exp_util.ads (Fully_Qualified_Name_String): New
4973 parameter Append_NUL to make NUL-termination optional.
4974 * exp_dist.adb: Consistently use the above throughout instead of
4975 Get_Library_Unit_Name_String.
4977 2013-04-23 Robert Dewar <dewar@adacore.com>
4979 * sem_util.adb, sem_res.adb, prj-tree.adb, prj-tree.ads: Minor
4982 2013-04-23 Pascal Obry <obry@adacore.com>
4984 * xoscons.adb: Remove unused use clause, minor code clean-up.
4986 2013-04-23 Ed Schonberg <schonberg@adacore.com>
4988 * sem_util.ads, sem_util.adb: Code cleanup for Is_Expression_Function
4989 (can apply to any scope entity).
4990 * sem_res.adb (Resolve_Call): If the call is within another
4991 expression function it does not constitute a freeze point.
4993 2013-04-23 Yannick Moy <moy@adacore.com>
4995 * exp_ch6.adb (Expand_Actuals): Test that Subp
4996 is overloadable before testing if it's an inherited operation.
4998 2013-04-23 Robert Dewar <dewar@adacore.com>
5000 * a-envvar.adb, a-envvar.ads, exp_util.adb, sem_ch12.adb: Minor
5003 2013-04-23 Ed Schonberg <schonberg@adacore.com>
5005 * sem_ch3.adb (Analyze_Object_Declarations): Undo previous patch.
5006 * exp_util.adb (Expand_Subtype_From_Expr): If the expression
5007 is a source entity and the declaration is for an aliased
5008 unconstrained array, create a new subtype so that the flag
5009 Is_Constr_Subt_For_UN_Aliased does not pollute other entities.
5011 2013-04-23 Hristian Kirtchev <kirtchev@adacore.com>
5013 * aspects.adb: Move tables Base_Aspect and Inherited_Aspect
5014 from the spec to the body.
5015 (Find_Aspect): Update the call to Get_Aspect_Id.
5016 (Get_Aspect_Id): New version that takes an aspect specification.
5017 * aspects.ads: Reorganize all aspect related tables.
5018 (Get_Aspect_Id): New version that takes an aspect specification.
5019 * par_sco.adb (Traverse_Aspects): Update the call to Get_Aspect_Id.
5020 * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration): Update
5021 the call to Get_Aspect_Id.
5022 * sem_ch13.adb (Analyze_Aspect_At_Freeze_Point): Update the
5023 call to Get_Aspect_Id. (Analyze_Aspect_Specifications): Update
5024 the call to Get_Aspect_Id. Update the call to Impl_Defined_Aspect.
5026 2013-04-23 Robert Dewar <dewar@adacore.com>
5028 * sem_prag.adb (Fix_Error): Rewrite to do more accurate job
5029 of getting proper name in the case where pragma comes from
5031 * sem_ch3.adb, sinfo.ads, par-ch6.adb, exp_ch6.adb: Minor reformatting.
5033 2013-04-23 Yannick Moy <moy@adacore.com>
5035 * sem_ch6.adb (Process_PPCs): Do not filter postconditions based on
5038 2013-04-23 Thomas Quinot <quinot@adacore.com>
5040 * par_sco.adb (Traverse_Aux_Decls): Minor code reorganization.
5042 2013-04-23 Doug Rupp <rupp@adacore.com>
5044 * init.c: Move facility macros outside IN_RTS.
5046 2013-04-23 Thomas Quinot <quinot@adacore.com>
5048 * freeze.adb (Freeze_Entity): For the case of a bit-packed
5049 array time that is known at compile time to have more that
5050 Integer'Last+1 elements, issue an error, since such arrays are
5053 2013-04-23 Hristian Kirtchev <kirtchev@adacore.com>
5055 * sem_prag.adb (Analyze_Dependency_Clause): Update all calls to
5056 Analyze_Input_Output.
5057 (Analyze_Input_List): Update all calls to Analyze_Input_Output.
5058 (Analyze_Input_Output): Add formal parameter Self_Ref along with
5059 comment on its usage. Update all calls to Analyze_Input_Output.
5060 (Analyze_Pragma): Add new local variable Self_Ref to capture
5061 the presence of a self-referential dependency clause. Update
5062 all calls to Analyze_Input_Output.
5063 (Check_Mode): Add formal parameter Self_Ref along with comment on its
5064 usage. Verify the legality of a self-referential output.
5066 2013-04-23 Ed Schonberg <schonberg@adacore.com>
5068 * exp_ch6.adb: Add predicate checks on by-copy parameter.
5070 2013-04-23 Vincent Celier <celier@adacore.com>
5072 * a-envvar.adb, a-envvar.ads (Value): New.
5074 2013-04-22 Yannick Moy <moy@adacore.com>
5076 * exp_prag.adb (Expand_Pragma_Loop_Variant): Rewrite pragma as
5077 null statement if ignored.
5078 * sem_ch6.adb (Expand_Contract_Cases): Do nothing if pragma is ignored.
5079 * sem_prag.adb (Analyze_Pragma): Keep analyzing ignored pragmas.
5081 2013-04-22 Hristian Kirtchev <kirtchev@adacore.com>
5083 * sem_prag.adb (Analyze_Contract_Case): New routine.
5084 (Analyze_Pragma): Aspect/pragma Contract_Cases can
5085 now be associated with a library level subprogram.
5086 Add circuitry to detect illegal uses of aspect/pragma Contract_Cases
5087 in a subprogram body.
5088 (Chain_Contract_Cases): Rename formal parameter Subp_Decl to
5089 Subp_Id. Remove local constant Subp. The entity of the subprogram
5090 is now obtained via the formal paramter.
5092 2013-04-22 Ed Schonberg <schonberg@adacore.com>
5094 * sem_ch3.adb (Analyze_Object_Declaration): Do not set
5095 Is_Constr_Subt_For_Unc_Aliased on the subtype of the expression,
5096 if the expression is a source entity.
5098 2013-04-22 Yannick Moy <moy@adacore.com>
5100 * exp_prag.adb, sinfo.ads, sem_prag.ads: Minor correction of typos in
5102 * sem_ch6.adb (Expand_Contract_Cases): Add location to message.
5104 2013-04-22 Thomas Quinot <quinot@adacore.com>
5106 * sem_prag.adb (Fix_Error): For a pragma rewritten from another
5107 pragma, fix up error message to include original pragma name.
5108 * par_sco.adb: Minor reformatting.
5110 2013-04-22 Robert Dewar <dewar@adacore.com>
5112 * sem_prag.adb, sem_util.adb, sem_util.ads, sem_res.adb, exp_ch6.adb,
5113 sem_ch6.adb, opt.ads: Minor reformatting.
5115 2013-04-22 Pascal Obry <obry@adacore.com>
5117 * gnat_ugn.texi, prj-nmsc.adb, projects.texi: Add check for
5118 Library_Standalone and Library_Kind.
5120 2013-04-22 Ed Schonberg <schonberg@adacore.com>
5122 * exp_ch6.adb (Expand_Actuals): If the call is to an
5123 inherited operation and the actual is a by-reference type with
5124 predicates, add predicate call to post-call actions.
5125 * sem_util.adb (Is_Inherited_Operation_For_Type): Fix coding
5126 error: a type declaration has a defining identifier, not an Etype.
5127 * sem_res.adb: Restore code removed because of above error.
5129 2013-04-22 Doug Rupp <rupp@adacore.com>
5131 * init.c (__gnat_handle_vms_condition): Also match C$_SIGINT.
5133 2013-04-22 Yannick Moy <moy@adacore.com>
5135 * gnat_rm.texi, exp_util.adb, sem_prag.adb, sem_prag.ads, par-ch2.adb,
5136 opt.ads, sem_ch13.adb: Minor correction of typos in comments/doc.
5138 2013-04-22 Vincent Celier <celier@adacore.com>
5140 * prj-nmsc.adb (Check_Library_Attributes): Set Library_Dir to
5141 No_Path_Information only when Directories_Must_Exist_In_Projects
5143 (Get_Directories): Set Object_Directory
5144 or Exec_Directory to No_Path_Information only when
5145 Directories_Must_Exist_In_Projects is False.
5147 2013-04-22 Yannick Moy <moy@adacore.com>
5149 * par-prag.adb, sem_attr.adb, sem_ch6.adb, sem_prag.adb, sem_warn.adb,
5150 snames.ads-tmpl, sinfo.ads, sem_util.ads: Remove all references to
5151 Pragma_Contract_Case and Name_Contract_Case.
5153 2013-04-22 Yannick Moy <moy@adacore.com>
5155 * aspects.ads, aspects.adb, sem_ch13.adb: Removal of references to
5157 * gnat_ugn.texi, gnat_rm.texi Description of Contract_Case replaced by
5158 description of Contract_Cases.
5160 2013-04-12 Robert Dewar <dewar@adacore.com>
5162 * makeutl.adb, prj-nmsc.adb: Minor reformatting.
5164 2013-04-12 Robert Dewar <dewar@adacore.com>
5166 * exp_util.adb (Make_Invariant_Call): Use Check_Kind instead
5168 * gnat_rm.texi (Check_Policy): Update documentation for new
5169 Check_Policy syntax.
5170 * sem_prag.adb (Check_Kind): Replaces Check_Enabled
5171 (Analyze_Pragma, case Check_Policy): Rework to accomodate new
5172 syntax (like Assertion_Policy).
5173 * sem_prag.ads (Check_Kind): Replaces Check_Enabled.
5175 2013-04-12 Doug Rupp <rupp@adacore.com>
5177 * init.c (SS$_CONTROLC, SS$_CONTINUE) [VMS]: New macros.
5178 (__gnat_handle_vms_condition) [VMS]: Dispatch on the Crtl/C user
5179 handler if installed.
5180 * ctrl_c.c (__gnat_install_int_handler)
5181 [VMS]: Install a dummy sigaction handler to trigger the real
5182 user handler dispatch in init.c/__gnat_handle_vms_condition.
5183 (__gnat_uninstall_int_handler) [VMS]: Likewise.
5185 2013-04-12 Vincent Celier <celier@adacore.com>
5187 * clean.adb (Parse_Cmd_Line): Set Directories_Must_Exist_In_Projects
5188 to False if switch is specified.
5189 * makeutl.adb (Initialize_Source_Record): Do not look for the
5190 object file if there is no object directory.
5191 * opt.ads (Directories_Must_Exist_In_Projects): New Boolean
5192 variable, defaulted to True.
5193 * prj-nmsc.adb (Check_Library_Attributes): Do not fail if library
5194 directory does not exist when Directories_Must_Exist_In_Projects is
5196 (Get_Directories): Do not fail when the object or the exec directory
5197 do not exist when Directories_Must_Exist_In_Projects is False.
5199 2013-04-12 Robert Dewar <dewar@adacore.com>
5201 * namet.adb, namet.ads: Minor addition (7 arg version of Nam_In).
5202 * exp_prag.adb, sem_ch3.adb, sem_intr.adb, sem_type.adb, exp_util.adb,
5203 sem_aux.adb, exp_ch9.adb, sem_ch7.adb, sem_ch10.adb, sem_prag.adb,
5204 par-ch2.adb, tbuild.adb, rtsfind.adb, freeze.adb, sem_util.adb,
5205 sem_res.adb, sem_attr.adb, exp_ch2.adb, prj-makr.adb, sem_elab.adb,
5206 exp_ch4.adb, sem_ch4.adb, sem_mech.adb, sem_ch6.adb, par-prag.adb,
5207 prj-nmsc.adb, exp_disp.adb, sem_ch8.adb, sem_warn.adb, par-util.adb,
5208 sem_eval.adb, exp_intr.adb, sem_ch13.adb, exp_cg.adb, lib-xref.adb,
5209 sem_disp.adb, exp_ch3.adb: Minor code reorganization (use Nam_In).
5211 2013-04-12 Doug Rupp <rupp@adacore.com>
5213 * init.c: Don't clobber condition code on VMS.
5215 2013-04-12 Robert Dewar <dewar@adacore.com>
5217 * exp_aggr.adb: Minor reformatting.
5218 * namet.ads, namet.adb (Nam_In): New functions.
5220 2013-04-12 Robert Dewar <dewar@adacore.com>
5222 * einfo.adb (Has_Dynamic_Predicate_Aspect): New flag.
5223 (Has_Static_Predicate_Aspect): New flag.
5224 * einfo.ads (Has_Dynamic_Predicate_Aspect): New flag.
5225 (Has_Static_Predicate_Aspect): New flag.
5226 * exp_ch9.adb: Minor reformatting.
5227 * exp_util.adb (Make_Invariant_Call): Check_Enabled now handles
5229 * gnat1drv.adb: Remove setting of Debug_Pragmas_Enabled,
5230 since this switch is gone and control of Debug is done with
5232 * gnat_rm.texi: Update documentation for Assertion_Policy and
5233 Check_Policy pragmas.
5234 * opt.adb (Debug_Pragmas_Disabled[_Config]): Removed
5235 (Debug_Pragmas_Enabled[_Config]): Removed Since debug now
5236 controlled by Assertion_Enabled.
5237 * opt.ads (Debug_Pragmas_Disabled[_Config]): Removed
5238 (Debug_Pragmas_Enabled[_Config]): Removed Since debug now
5239 controlled by Assertion_Enabled.
5240 * par-ch2.adb (Scan_Pragma_Argument_Association): Allow new
5242 * sem_attr.adb: Minor reformatting.
5243 * sem_ch13.adb (Analyze_Aspect_Specification): Disable aspect
5244 if DISABLE policy applies.
5245 * sem_ch6.adb (Grab_PPC): Check original name of aspect for
5246 aspect from pragma (Process_PPCs): Properly check assertion policy.
5247 * sem_prag.adb (Check_Enabled): Rewritten for new Assertion_Policy
5248 (Check_Appicable_Policy): New procedure.
5249 (Is_Valid_Assertion_Kind): New function.
5250 (Rewrite_Assertion_Kind): New procedure.
5251 (Analyze_Pragma): Handle case of disabled assertion pragma.
5252 (Analyze_Pragma, case Assertion_Policy): Rewritten for Ada 2012.
5253 (Analyze_Pragma, case Check): Deal with 'Class possibilities.
5254 (Analyze_Pragma, case Check_Policy): Deal with 'Class possibilities.
5255 (Analyze_Pragma, case Contract_Class): New handling of ignored pragma.
5256 (Analyze_Pragma, case Debug): New control with Assertion_Policy.
5257 (Analyze_Pragma, case Debug_Policy): Now consistent with
5259 (Analyze_Pragma, case Loop_Invariant): New handling of ignored
5261 (Analyze_Pragma, case Loop_Variant): New handling of ignored pragma.
5262 (Analyze_Pragma, case Precondition): Use proper name for Check pragma.
5263 (Analyze_Pragma, case Check_Enabled): Rewritten for new policy stuff.
5264 * sem_prag.ads (Check_Enabled): Rewritten for new
5265 Assertion_Policy stuff.
5266 (Check_Appicable_Policy): New procedure.
5267 * sinfo.adb (Is_Disabled): New flag.
5268 (Is_Ignored): New flag.
5269 * sinfo.ads (Is_Disabled): New flag.
5270 (Is_Ignored): New flag.
5271 (N_Pragma_Argument_Association): New 'Class forms.
5272 * snames.ads-tmpl: New names Name_uPre, Name_uPost,
5273 Name_uType_Invariant, Name_uInvariant.
5274 * switch-c.adb: Remove setting of Debug_Pragmas_Enabled for -gnata.
5275 * tree_io.ads (ASIS_Version_Number): Updated (remove
5276 read write of obsolete flags Debug_Pragmas_Disabled and
5277 Debug_Pragmas_Enabled.
5279 2013-04-12 Ed Schonberg <schonberg@adacore.com>
5281 * exp_aggr.adb (Get_Explicit_Discriminant_Value): Subsidiary
5282 of Build_Record_Aggr_Code, used to retrieve explicit values
5283 for inherited discriminants in an extension aggregate, when the
5284 ancestor type is unconstrained.
5286 2013-04-12 Ed Schonberg <schonberg@adacore.com>
5288 * sem_attr.adb (Check_Stream_Attribute): If restriction
5289 No_Default_Stream_Attributes is active, it is illegal to use a
5290 predefined elementary type stream attribute either by itself,
5291 or more importantly as part of the attribute subprogram for a
5292 composite type. However, if the broader restriction No_Streams
5293 is active, then stream operations are not generated, and there
5296 2013-04-12 Robert Dewar <dewar@adacore.com>
5298 * gnatbind.adb: Minor reformatting.
5300 2013-04-12 Bob Duff <duff@adacore.com>
5302 * sem_attr.adb (Analyze_Access_Attribute): Treat P'Access like a
5303 call only in the static elaboration model.
5305 2013-04-12 Hristian Kirtchev <kirtchev@adacore.com>
5307 * sem_prag.adb (Analyze_Input_List): Detect an illegal dependency
5308 clause where both input and output lists are null.
5309 (Analyze_Pragma): Update the grammar of pragma Depends.
5311 2013-04-12 Vincent Celier <celier@adacore.com>
5313 * gnatbind.adb (No_Restriction_List): Exclude restrictions that
5314 take a parameter value, not a count.
5315 * prj.ads, prj.adb (Remove_All_Restricted_Languages): New procedure.
5316 * projects.texi: Complete documentation of attribute Roots.
5318 2013-04-12 Thomas Quinot <quinot@adacore.com>
5320 * exp_ch3.adb, exp_util.ads, checks.adb, freeze.adb, sem_attr.adb,
5321 sem_ch3.adb: Minor reformatting.
5322 * exp_ch4.adb (Size_In_Storage_Elements): Minor documentation
5323 improvement: note that the computation is pessimistic for bit
5325 * gnat_rm.texi (Range_Length): Fix minor error in description
5328 2013-04-12 Hristian Kirtchev <kirtchev@adacore.com>
5330 * aspects.adb (Find_Aspect): New routine.
5331 (Find_Value_Of_Aspect): New routine.
5332 (Has_Aspect): Reimplemented.
5333 * aspects.ads (Find_Aspect): New routine.
5334 (Find_Value_Of_Aspect): New routine, previously known as Find_Aspect.
5335 * exp_ch5.adb (Expand_Iterator_Loop): Update the call to Find_Aspect.
5336 * exp_util.adb (Is_Iterated_Container): Update the call to Find_Aspect.
5337 * sem_ch4.adb (Try_Container_Indexing): Update calls to Find_Aspect.
5338 * sem_ch5.adb (Analyze_Iterator_Specification): Update
5339 the call to Find_Aspect. Use function Has_Aspect for better
5341 (Preanalyze_Range): Use function Has_Aspect for better readability.
5342 * sem_ch13.adb (Check_One_Function): Update the call to Find_Aspect.
5343 * sem_prag.adb (Analyze_Pragma): There is no longer need to
5344 look at the parent to extract the corresponding pragma for
5347 2013-04-12 Robert Dewar <dewar@adacore.com>
5349 * checks.adb, sem_elab.adb, repinfo.adb, sem_ch4.adb, restrict.adb,
5350 restrict.ads: Minor reformatting.
5352 2013-04-12 Ed Schonberg <schonberg@adacore.com>
5354 * lib-xref.adb: Retrieve original name of classwide type if any.
5356 2013-04-12 Thomas Quinot <quinot@adacore.com>
5358 * exp_ch11.ads: Minor reformatting.
5360 2013-04-12 Hristian Kirtchev <kirtchev@adacore.com>
5362 * aspects.adb: Alphabetize subprogram bodies in this unit. Add
5363 an entry for Aspect_Ghost in the table of canonical aspects.
5364 (Has_Aspect): New routine.
5365 * aspects.ads: Add Aspect_Ghost to all relevant
5366 tables. Alphabetize subprograms in this unit.
5367 (Has_Aspect): New routine.
5368 * einfo.adb: Add with and use clauses for Aspects.
5369 (Is_Ghost_Function): New routine.
5370 * einfo.ads: Add new synthesized attribute Is_Ghost_Function and
5371 update the structure of the related nodes.
5372 (Is_Ghost_Function): New routine.
5373 * exp_ch4.adb (Find_Enclosing_Context): Use routine
5374 Is_Body_Or_Package_Declaration to terminate a search.
5375 (Is_Body_Or_Unit): Removed.
5376 * exp_util.adb (Within_Case_Or_If_Expression): Use routine
5377 Is_Body_Or_Package_Declaration to terminate a search.
5378 * par-prag.adb: Add pragma Ghost to the list of pragmas that do
5379 not need special processing by the parser.
5380 * sem_attr.adb (Analyze_Access_Attribute): Detect an
5381 illegal use of 'Access where the prefix is a ghost function.
5382 (Analyze_Attribute): Use routine Is_Body_Or_Package_Declaration
5383 to terminate a search. (Check_References_In_Prefix): Use routine
5384 Is_Body_Or_Package_Declaration to terminate a search.
5385 * sem_ch4.adb (Analyze_Call): Mark a function when it appears
5386 inside an assertion expression. Verify the legality of a call
5387 to a ghost function.
5388 (Check_Ghost_Function_Call): New routine.
5389 * sem_ch6.adb (Analyze_Function_Call): Code reformatting. Move
5390 the setting of attribute In_Assertion_Expression to Analyze_Call.
5391 (Check_Overriding_Indicator): Detect an illegal attempt to
5392 override a function with a ghost function.
5393 * sem_ch12.adb (Preanalyze_Actuals): Detect an illegal use of
5394 a ghost function as a generic actual.
5395 * sem_elab.adb (Check_Internal_Call_Continue): Update the call
5397 * sem_prag.adb: Add an entry for pragma Ghost in the table
5398 of significant arguments.
5399 (Analyze_Pragma): Do not analyze
5400 an "others" case guard. Add processing for pragma Ghost. Use
5401 Preanalyze_Assert_Expression when analyzing the expression of
5402 pragmas Loop_Invariant and Loop_Variant.
5403 * sem_util.adb (Get_Subprogram_Entity): Reimplemented.
5404 (Is_Body_Or_Package_Declaration): New routine.
5405 * sem_util.ads: Alphabetize subprotrams in this unit.
5406 (Is_Body_Or_Package_Declaration): New routine.
5407 * sinfo.adb (In_Assertion): Rename to In_Assertion_Expression.
5408 (Set_In_Assertion): Rename to Set_In_Assertion_Expression.
5409 * sinfo.ads: Rename flag In_Assertion to In_Assertion_Expression
5410 to better reflect its use. Update all places that mention the flag.
5411 (In_Assertion): Rename to In_Assertion_Expression. Update
5412 related pragma Inline. (Set_In_Assertion): Rename to
5413 Set_In_Assertion_Expression. Update related pragma Inline.
5414 * snames.ads-tmpl: Add new predefined name Ghost. Add new pragma
5417 2013-04-12 Arnaud Charlet <charlet@adacore.com>
5419 * sem_prag.adb (Set_Imported): Do not generate error for multiple
5420 Import in CodePeer mode.
5421 * s-rident.ads: Fix minor typo.
5423 2013-04-12 Ed Schonberg <schonberg@adacore.com>
5425 * checks.adb (Insert_Valid_Check): Do not insert validity check
5426 in the body of the generated predicate function, to prevent
5429 2013-04-12 Ed Schonberg <schonberg@adacore.com>
5431 * s-rident.ads: Add various missing Ada 2012 restrictions:
5432 No_Access_Parameter_Allocators, No_Coextensions,
5433 No_Use_Of_Attribute, No_Use_Of_Pragma.
5434 * snames.ads-tmpl: Add corresponding names.
5435 * restrict.ads restrict.adb: Subprograms and data structures to
5436 handle aspects No_Use_Of_Attribute and No_Use_Of_Pragma.
5437 * sem_ch4.adb: Correct name of restrictions is
5438 No_Standard_Allocators_After_Elaboration.
5439 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Check
5440 violation of restriction No_Use_Of_Attribute.
5441 * sem_prag.adb (Process_Restrictions_Or_Restriction_Warnings):
5442 Set restrictions No_Use_Of_Pragma and No_Use_Of_Attribute.
5443 (Analyze_Pragma): Check violation of restriction No_Use_Of_Pragma.
5444 * sem_res.adb: Check restrictions No_Access_Parameter_Allocators
5445 and No_Coextensions.
5446 * bcheck.adb: Correct name of restrictions is
5447 No_Standard_Allocators_After_Elaboration.
5448 * gnatbind.adb: Correct name of restrictions is
5449 No_Standard_Allocators_After_Elaboration.
5451 2013-04-12 Hristian Kirtchev <kirtchev@adacore.com>
5453 * sem_prag.adb (Analyze_Pragma, (Check_Mode_Restriction_In_Function):
5454 Correct error message format.
5456 2013-04-12 Robert Dewar <dewar@adacore.com>
5458 * sem_attr.adb: Minor reformatting.
5460 2013-04-12 Ed Schonberg <schonberg@adacore.com>
5462 * sem_elab.adb (Within_Elaborate_All): Do not examine a context
5463 item that has not been analyzed, because the unit may have errors,
5464 or the context item may come from a proper unit inserted at the
5465 point of a stub and not analyzed yet.
5467 2013-04-12 Thomas Quinot <quinot@adacore.com>
5469 * gnat1drv.adb, repinfo.adb, repinfo.ads (Repinfo.List_Array_Info,
5470 List_Record_Info): Also include scalar storage order information in
5473 2013-04-12 Yannick Moy <moy@adacore.com>
5475 * sem_ch6.adb (Process_Contract_Cases): Update code to apply to
5476 Contract_Cases instead of Contract_Case pragma.
5478 2013-04-12 Robert Dewar <dewar@adacore.com>
5480 * a-cfdlli.ads, g-socket.adb, s-fileio.adb: Minor reformatting.
5482 2013-04-12 Yannick Moy <moy@adacore.com>
5484 * sem_attr.adb (Analyze_Attribute): Update analyse of
5485 Attribute_Old and Attribute_Result so they are allowed in the
5486 right-hand-side of an association in a Contract_Cases pragma.
5487 * sem_prag.adb (Analyze_CTC_In_Decl_Part): Add pre-analysis of
5488 the expressions in a Contract_Cases pragma.
5490 2013-04-12 Robert Dewar <dewar@adacore.com>
5492 * sem.ads, opt.ads: Minor comment edits.
5493 * sem_warn.adb, sem_ch6.adb: Minor reformatting.
5495 2013-04-12 Claire Dross <dross@adacore.com>
5497 * a-cfdlli.adb a-cfdlli.ads (List, Not_No_Element, Iterate,
5498 Reverse_Iterate, Query_Element, Update_Element, Read, Write): Removed,
5499 not suitable for formal analysis.
5501 2013-04-12 Ed Schonberg <schonberg@adacore.com>
5503 * sem_prag.adb (Analyze_Abstract_State): Use Defining entity
5504 to locate package entity, which may be a child unit.
5506 2013-04-12 Thomas Quinot <quinot@adacore.com>
5508 * g-socket.adb, g-socket.ads (Connect_Socket, version with timeout): If
5509 the specified timeout is 0, do not attempt to determine whether the
5510 connection succeeded.
5512 2013-04-12 Doug Rupp <rupp@adacore.com>
5514 * s-fileio.adb (Form_RMS Context_Key): Fix some thinkos.
5516 2013-04-12 Doug Rupp <rupp@adacore.com>
5518 * s-fileio.adb: Minor reformatting.
5520 2013-04-12 Ed Schonberg <schonberg@adacore.com>
5522 * sem_warn.adb (Check_Infinite_Loop_Warning): Do not warn if
5523 the last statement in the analyzed loop is an unconditional
5526 2013-04-12 Robert Dewar <dewar@adacore.com>
5528 * opt.ads (Style_Check_Main): New switch.
5529 * sem.adb (Semantics): Set Style_Check flag properly for new
5530 unit to be analyzed.
5531 * sem_ch10.adb (Analyze_With_Clause): Don't reset Style_Check,
5532 the proper setting of this flag is now part of the Semantics
5534 * switch-c.adb (Scan_Front_End_Switches): Set Style_Check_Main
5535 for -gnatg and -gnaty
5537 2013-04-12 Doug Rupp <rupp@adacore.com>
5539 * s-crtl.ads (fopen, freopen): Add vms_form parameter
5540 * i-cstrea.ads (fopen, freopen): Likewise.
5541 * adaint.h (__gnat_fopen, __gnat_freopen): Likewise.
5542 * adaint.c (__gnat_fopen, __gnat_freopen): Likewise.
5543 [VMS]: Split out RMS keys and call CRTL function appropriately.
5544 * s-fileio.adb (Form_VMS_RMS_Keys, Form_RMS_Context_Key): New
5546 (Open, Reset): Call Form_VMS_RMS_Keys. Call fopen,freopen with
5548 * gnat_rm.texi: Document implemented RMS keys.
5550 2013-04-12 Hristian Kirtchev <kirtchev@adacore.com>
5552 * sem_ch13.adb (Analyze_Aspect_Specifications):
5553 Insert the corresponding pragma for aspect Abstract_State at
5554 the top of the visible declarations of the related package.
5555 Previously this was only done when the package is a compilation
5558 2013-04-12 Arnaud Charlet <charlet@adacore.com>
5560 * gnat_ugn.texi: Further menu clean ups.
5561 * sem_prag.adb, opt.ads: Minor reformatting.
5562 * sem_util.ads: Minor comment fix.
5564 2013-04-12 Hristian Kirtchev <kirtchev@adacore.com>
5566 * sem_ch13.adb (Analyze_Aspect_Specifications): Aspect
5567 Depends is now a delayed aspect. The delay is required
5568 due to the interplay between aspects Depends and Global.
5569 (Check_Aspect_At_Freeze_Point): Add an entry for aspect Depends.
5570 * sem_prag.adb: Reformat various error messages.
5571 (Add_Item): New subsidiary routine.
5572 (Analyze_Pragma): Add new variables
5573 Global_Seen, Result_Seen, Subp_Inputs and Subp_Outputs. The
5574 analysis of pragma Depends now has the capability to check
5575 the proper mode and usage of subprogram inputs and outputs.
5576 (Appears_In): New routine.
5577 (Check_Function_Return): New routine.
5578 (Check_Mode): New routine.
5579 (Check_Usage): New routine.
5580 (Collect_Subprogram_Inputs_Outputs): New routine.
5582 2013-04-12 Bob Duff <duff@adacore.com>
5584 * par-ch7.adb (P_Package): Initialize Sloc in the newly-pushed scope
5587 2013-04-12 Robert Dewar <dewar@adacore.com>
5589 * switch-c.adb: Minor fix to wording of error message for
5592 2013-04-12 Robert Dewar <dewar@adacore.com>
5594 * impunit.adb: Add s-multip and s-mudido to list of impl defined
5596 * gnat_rm.texi: Add documentation for
5597 System.Multiprocessors[.Dispatching_Domains].
5599 2013-04-12 Ben Brosgol <brosgol@adacore.com>
5601 * gnat_ugn.texi: Completion of menu cleanups.
5603 2013-04-12 Arnaud Charlet <charlet@adacore.com>
5605 * sem_prag.adb (Diagnose_Multiple_Pragmas): Relax the rules
5606 in Relaxed_RM_Semantics.
5608 2013-04-12 Arnaud Charlet <charlet@adacore.com>
5610 * set_targ.adb (elab code): Add support for non gcc back-ends
5611 where save_argv is null.
5613 2013-04-12 Robert Dewar <dewar@adacore.com>
5615 * gnat1drv.adb (Gnat1drv): Test Target_Dependent_Info_Write_Name.
5616 * opt.ads (Target_Dependent_Info_Read): Add _Name, now an access
5617 type (Target_Dependent_Info_Write): Add _Name, now an access type.
5618 * set_targ.adb (Write_Target_Dependent_Values): Use name
5619 from -gnatet switch stored in Target_Dependent_Info_Write_Name
5620 (Read_Target_Dependent_Values): Use name from -gnateT switch
5621 stored in Target_Dependent_Info_Read_Name.
5622 * switch-c.adb: New form of -gnatet and -gnateT switches.
5623 * usage.adb: New form of -gnatet and -gnateT switches with
5626 2013-04-11 Eric Botcazou <ebotcazou@adacore.com>
5628 * gcc-interface/decl.c (elaborate_expression_1): Skip only constant
5629 arithmetics when looking for a read-only variable in the expression.
5631 2013-04-11 Javier Miranda <miranda@adacore.com>
5633 * check.ads, exp_ch6.adb (Install_Null_Excluding_Check): No check in
5634 interface thunks since it is performed at the caller side.
5635 (Expand_Simple_Function_Return): No accessibility check needed in thunks
5636 since the check is done by the target routine.
5638 2013-04-11 Ed Schonberg <schonberg@adacore.com>
5640 * sem_prag.adb (Analyze_Pragma, case Priority): pre-analyze
5641 expression with type Any_Priority.
5642 * exp_ch9.adb (Initialize_Protection): Check that the value
5643 of the priority expression is within the bounds of the proper
5646 2013-04-11 Robert Dewar <dewar@adacore.com>
5648 * sem_prag.adb, prj-env.adb: Minor reformatting.
5650 2013-04-11 Ben Brosgol <brosgol@adacore.com>
5652 * gnat_ugn.texi: Clean ups.
5654 2013-04-11 Yannick Moy <moy@adacore.com>
5656 * set_targ.adb: Minor comment update.
5658 2013-04-11 Pascal Obry <obry@adacore.com>
5660 * gnat_ugn.texi: Remove obsolete comment about DLL calling
5663 2013-04-11 Javier Miranda <miranda@adacore.com>
5665 * exp_ch6.adb (Expand_Call): For the call to the target primitive
5666 of an interface thunks do not compute the extra actuals; just
5667 propagate the extra actuals received by the thunk.
5668 * exp_disp.adb (Expand_Interface_Thunk): Decorate new attribute
5670 * sem_ch6.adb (Create_Extra_Formals): Do not generate extra
5671 formals in interface thunks whose target primitive has no extra
5674 2013-04-11 Hristian Kirtchev <kirtchev@adacore.com>
5676 * sem_prag.adb (Analyze_Pragma): Detect
5677 a renaming by looking at the Renamed_Object attribute.
5678 (Is_Renaming): Removed.
5680 2013-04-11 Vincent Celier <celier@adacore.com>
5682 * prj-env.adb (Initialize_Default_Project_Path): Take
5683 into account a project path file, specified by environment
5684 variable GPR_PROJECT_PATH_FILE, before taking into account
5686 * projects.texi: Add documentation for GPR_PROJECT_PATH_FILE
5688 2013-04-11 Ed Schonberg <schonberg@adacore.com>
5690 * a-cdlili.adb, a-cdlili.ads, a-cihama.adb, a-cihama.ads, a-coinve.adb,
5691 a-coinve.ads, a-ciorse.adb, a-ciorse.ads, a-coorma.adb, a-coorma.ads,
5692 a-cfdlli.adb, a-cfdlli.ads, a-cborma.adb, a-cborma.ads, a-cidlli.adb,
5693 a-cidlli.ads, a-ciormu.adb, a-ciormu.ads, a-cihase.adb, a-cihase.ads,
5694 a-cohama.adb, a-cohama.ads, a-coorse.adb, a-coorse.ads, a-cbhama.adb,
5695 a-cbhama.ads, a-cborse.adb, a-cborse.ads, a-ciorma.adb, a-cobove.adb,
5696 a-ciorma.ads, a-cobove.ads, a-coormu.adb, a-coormu.ads, a-cohase.adb,
5697 a-cohase.ads, a-cbdlli.adb, a-cbdlli.ads, a-cbhase.adb, a-cbhase.ads:
5698 Move Iterator operations from body to private part of spec.
5700 2013-04-11 Eric Botcazou <ebotcazou@adacore.com>
5702 * ttypes.ads, get_targ.ads: More minor rewording of comments.
5704 2013-04-11 Johannes Kanig <kanig@adacore.com>
5706 * debug.adb: Document use of switch -gnatd.Z.
5708 2013-04-11 Hristian Kirtchev <kirtchev@adacore.com>
5710 * sem_prag.adb (Analyze_Pragma): Both pragma Depends and Global can now
5711 support renamings of entire objects. Legal renamings are replaced by
5712 the object they rename.
5713 (Is_Renaming): New routine.
5715 2013-04-11 Yannick Moy <moy@adacore.com>
5717 * set_targ.adb, opt.ads: Minor changes in comments.
5719 2013-04-11 Ben Brosgol <brosgol@adacore.com>
5721 * gnat_ugn.texi: Minor clean ups.
5723 2013-04-11 Robert Dewar <dewar@adacore.com>
5725 * nlists.ads, nlists.adb, treepr.adb, treepr.ads: Move debugging
5726 function p from Nlists to Treepr.
5728 2013-04-11 Ed Schonberg <schonberg@adacore.com>
5730 * sem_disp.adb (Check_Dispatching_Context): If the context is
5731 a contract for a null procedure defer error reporting until
5732 postcondition body is created.
5733 * exp_ch13.adb (Expand_N_Freeze_Entity): If the entity is a
5734 null procedure, complete the analysis of its contracts so that
5735 calls within classwide conditions are properly rewritten as
5738 2013-04-11 Thomas Quinot <quinot@adacore.com>
5740 * sem_ch10.adb, sem_ch12.adb: Minor reformatting.
5742 2013-04-11 Robert Dewar <dewar@adacore.com>
5744 * exp_attr.adb, sem_res.adb, sem_attr.adb: Minor reformatting.
5746 2013-04-11 Robert Dewar <dewar@adacore.com>
5748 * atree.adb, atree.ads (Node31): New function.
5749 (Set_Node31): New procedure.
5751 2013-04-11 Robert Dewar <dewar@adacore.com>
5753 * errout.ads: Minor typo correction.
5755 2013-04-11 Javier Miranda <miranda@adacore.com>
5757 * einfo.ad[sb] (Thunk_Entity/Set_Thunk_Entity): New attribute.
5759 2013-04-11 Robert Dewar <dewar@adacore.com>
5761 * back_end.adb (Register_Back_End_Types): Moved to Get_Targ
5762 * back_end.ads (C_String): Moved to Get_Targ
5763 (Register_Type_Proc): Moved to Get_Targ (Register_Back_End_Types):
5765 * cstand.adb (Register_Float_Type): New interface
5766 (Create_Back_End_Float_Types): Use entries in FPT_Mode_Table.
5767 * get_targ.adb (Register_Back_End_Types): Moved here from
5769 * get_targ.ads (C_String): Moved here from Back_End
5770 (Register_Type_Proc): Moved here from Back_End
5771 (Register_Back_End_Types): here from Back_End.
5772 * gnat1drv.adb (GGnat11drv): Add call to
5773 Write_Target_Dependent_Values;
5774 * lib-writ.ads, lib-writ.adb (Write_ALI): Remove section writing
5775 obsolete target dependent info.
5776 * opt.ads (Generate_Target_Dependent_Info):
5777 Removed (Target_Dependent_Info_Read): New flag
5778 (Target_Dependent_Info_Write): New flag
5779 * output.adb: Minor comment change
5780 * s-os_lib.ads: Minor reformatting
5781 * set_targ.ads, set_targ.adb: Minor reformatting.
5782 * switch-c.adb (Scan_Switches.First_Ptr): New variable
5783 (Scan_Front_End_Switches): Check -gnatd.b, -gnateT come first
5784 (Scan_Front_End_Switches): Handle -gnatet, -gnateT
5785 * ttypes.ads: Remove documentation section on target dependent
5786 info in ali file Remove four letter codes, no longer used Instead
5787 of using Get_Targ.Get_xxx, we use Set_Targ.xxx
5788 * usage.adb: Add usage lines for -gnatet/-gnateT
5789 * gcc-interface/Make-lang.in: Update dependencies.
5791 2013-04-11 Thomas Quinot <quinot@adacore.com>
5793 * sem_ch4.adb: Update documentation.
5794 * sinfo.ads (N_Expression_With_Actions): Ditto.
5796 2013-04-11 Hristian Kirtchev <kirtchev@adacore.com>
5798 * sem_ch13.adb (Analyze_Aspect_Specifications):
5799 Add a guard to prevent the double insertion of the same aspect
5800 into a rep item list. This previously led to a circularity.
5802 2013-04-11 Ed Schonberg <schonberg@adacore.com>
5804 * sem_attr.adb (Eval_Attribute, case 'Access): Reject attribute
5805 reference if the prefix is the dereference of an anonymous access
5807 * exp_attr.adb (Expand_N_Attribute_Reference, Access_Cases): Handle
5808 properly a reference to the current instance of a protected type
5809 from within a protected subprogram.
5810 * sem_res.adb (Find_Unique_Access_Type): Treat
5811 Attribute_Access_Type like Allocator_Type when resolving an
5814 2013-04-11 Arnaud Charlet <charlet@adacore.com>
5816 * xgnatugn.adb: Remove obsolete comments.
5818 2013-04-11 Robert Dewar <dewar@adacore.com>
5820 * back_end.ads, back_end.adb: Minor reformatting.
5821 * set_targ.ads, set_targ.adb: New files.
5823 2013-04-11 Hristian Kirtchev <kirtchev@adacore.com>
5825 * sem_case.adb (Check_Against_Predicate): New routine.
5826 (Check_Choices): When the type covered by the list of choices
5827 is a static subtype with a static predicate, check all choices
5828 agains the predicate.
5829 (Issue_Msg): All versions removed.
5830 (Missing_Choice): New routines.
5831 * sem_ch4.adb: Code and comment reformatting.
5832 (Analyze_Case_Expression): Do not check the choices when the case
5833 expression is being preanalyzed and the type of the expression
5834 is a subtype with a static predicate.
5835 (Has_Static_Predicate): New routine.
5836 * sem_ch13.adb: Code and comment reformatting. (Build_Range):
5837 Always build a range even if the low and hi bounds denote the
5838 same value. This is needed by the machinery in Check_Choices.
5839 (Build_Static_Predicate): Always build a range even if the low and
5840 hi bounds denote the same value. This is needed by the machinery
5843 2013-04-11 Robert Dewar <dewar@adacore.com>
5845 * einfo.ads, sem_util.adb, exp_ch6.adb, xgnatugn.adb: Minor
5848 2013-04-11 Doug Rupp <rupp@adacore.com>
5850 * gnatlink.adb: Fold program basename to lower case on VMS for
5853 2013-04-11 Matthew Heaney <heaney@adacore.com>
5855 * a-rbtgbo.adb (Generic_Equal): Initialize Result variable before
5858 2013-04-11 Arnaud Charlet <charlet@adacore.com>
5860 * xgnatugn.adb: Remove dead code (handling of @ifset/@ifclear).
5862 2013-04-11 Arnaud Charlet <charlet@adacore.com>
5864 * gnat_ugn.texi: Remove some use of ifset in menus. Not strictly
5865 needed, and seems to confuse some versions of makeinfo.
5867 2013-04-11 Javier Miranda <miranda@adacore.com>
5869 * einfo.adb (Is_Thunk): Remove assertion.
5870 (Set_Is_Thunk): Add assertion.
5871 * einfo.ads (Is_Thunk): Complete documentation.
5872 * exp_ch11.adb (Expand_N_Handled_Sequence_Of_Statements): Code cleanup.
5873 * exp_ch3.ad[sb] (Is_Variable_Size_Array): Moved to sem_util
5874 (Is_Variable_Size_Record): Moved to sem_util
5875 * exp_ch6.adb (Expand_Call): Code cleanup.
5876 (Expand_N_Extended_Return_Statement): Code cleanup.
5877 (Expand_Simple_Function_Return): Code cleanup.
5878 * exp_disp.adb Remove dependency on exp_ch3
5879 (Expand_Interface_Thunk): Add minimum decoration needed to set
5881 * sem_ch3.ad[sb] (Is_Constant_Bound): moved to sem_util
5882 * sem_util.ad[sb] (Is_Constant_Bound): Moved from
5883 sem_ch3 (Is_Variable_Size_Array): Moved from exp_ch3
5884 (Is_Variable_Size_Record): Moved from exp_ch3
5886 2013-04-11 Javier Miranda <miranda@adacore.com>
5888 * exp_ch11.adb (Expand_N_Handled_Sequence_Of_Statements): Do
5889 not add cleanup actions in thunks associated with interface types.
5890 * exp_ch3.ad[sb] (Is_Variable_Size_Record): Move declaration to
5892 * exp_ch4.adb (Tagged_Conversion): Update call to
5893 Expand_Interface_Conversion since the parameter Is_Static is no
5895 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Adding
5896 assertion to ensure that interface thunks are never handled by
5898 (Expand_N_Simple_Function_Return): Do not rewrite this statement
5899 as an extended return statement in interface thunks, and do not
5900 perform copy in the secondary stack if the return statement is
5902 * exp_disp.adb (Expand_Dispatching_Call): No longer displace
5903 the pointer to the returned object in functions returning interface
5905 (Expand_Interface_Thunk): For functions returning interface types
5906 displace the pointer to the returned object.
5907 (Expand_Interface_Conversion): Remove formal
5908 Is_Static since this subprogram can now evaluate it locally.
5909 * sem_ch3.adb (Add_Internal_Interface_Entities): For functions
5910 propagate the type returned by the covered interface primitive to
5911 the internal interface entity. Needed by the thunk to generate
5912 the code which displaces "this" to reference the corresponding
5913 secondary dispatch table.
5914 * sem_disp.adb (Propagate_Tag): Update call to
5915 Expand_Interface_Conversion since the parameter Is_Static is no
5917 * sem_res.adb (Resolve_Type_Conversion): Update calls to
5918 Expand_Interface_Conversion since the parameter Is_Static is no
5919 longer needed plus code cleanup.
5921 2013-04-11 Eric Botcazou <ebotcazou@adacore.com>
5923 * init.c (RETURN_ADDR_OFFSET): Delete as unused.
5925 2013-04-11 Robert Dewar <dewar@adacore.com>
5927 * a-crbtgk.adb, a-ciorse.adb, a-crbtgo.adb, a-coorse.adb, a-rbtgbo.adb,
5928 a-cborse.adb, a-rbtgso.adb, exp_ch3.adb: Minor reformatting.
5930 2013-04-11 Yannick Moy <moy@adacore.com>
5932 * exp_ch4.adb (Expand_N_Selected_Component): Do not expand
5933 discriminant check for Unchecked_Union.
5934 * sem_res.adb (Resolve_Selected_Component): Set flag
5935 Do_Discriminant_Check even when expansion is not performed.
5936 * sinfo.ads (Do_Discriminant_Check): Update documentation for the case
5939 2013-04-11 Thomas Quinot <quinot@adacore.com>
5941 * sem_ch13.adb (Same_Representation): Two types with different scalar
5942 storage order never have the same representation.
5944 2013-04-11 Arnaud Charlet <charlet@adacore.com>
5946 * xgnatugn.adb (Push_Conditional): Simplify handling,
5947 no longer need to keep track of "excluding" sections.
5948 (Currently_Excluding): Removed.
5949 (Process_Source_File):
5950 Set unw/vms flag so that texinfo can do the whole handling of
5951 @ifset/@ifclear sections. Fix handling of nested @ifset/@ifclear
5953 * gnat_ugn.texi: Add a section on performing unassisted install
5956 2013-04-11 Johannes Kanig <kanig@adacore.com>
5958 * debug.adb: Document usage of -gnatd.Q switch.
5960 2013-04-11 Matthew Heaney <heaney@adacore.com>
5962 * a-crbtgk.adb (Ceiling, Find, Floor): Adjust locks
5963 before element comparisons.
5964 (Generic_Conditional_Insert, Generic_Conditional_Insert_With_Hint):
5966 * a-crbtgo.adb, a-rbtgbo.adb (Generic_Equal): Adjust locks before
5967 element comparisons.
5968 * a-rbtgso.adb (Difference, Intersection): Adjust locks
5969 before element comparisons.
5970 (Is_Subset, Overlap): Ditto
5971 (Symmetric_Difference, Union): Ditto
5972 * a-btgbso.adb (Set_Difference, Set_Intersection): Adjust locks
5973 before element comparisons.
5974 (Set_Subset, Set_Overlap): Ditto
5975 (Set_Symmetric_Difference, Set_Union): Ditto
5976 * a-coorse.adb, a-ciorse.adb, a-cborse.adb
5977 (Update_Element_Preserving_Key): Adjust locks before element
5978 comparisons (Replace_Element): Ditto
5980 2013-04-11 Pascal Obry <obry@adacore.com>
5982 * prj-attr.adb, projects.texi, snames.ads-tmpl: Remove Build_Slaves
5985 2013-04-11 Ed Schonberg <schonberg@adacore.com>
5987 * exp_ch3.adb (Build_Equivalent_Aggregate): Subsidiary of
5988 Expand_N_Object_Declaration, used to construct an aggregate
5989 with static components whenever possible, so that objects of a
5990 discriminated type can be initialized without calling the init.
5993 2013-04-11 Vincent Celier <celier@adacore.com>
5995 * prj-makr.adb (Process_Directory): On VMS, always delete,
5996 then recreate the temporary file with Create_Output_Text_File,
5997 otherwise the output redirection does not work properly.
5999 2013-04-11 Eric Botcazou <ebotcazou@adacore.com>
6001 * urealp.ads: Fix minor typo.
6003 2013-04-11 Fabien Chouteau <chouteau@adacore.com>
6005 * cio.c (mktemp): Don't use tmpnam function from the
6006 system on VxWorks in kernel mode.
6008 2013-04-11 Vincent Celier <celier@adacore.com>
6010 * make.adb (Compile): Clarify the error message reported
6011 when gnatmake refuses to compile a runtime source.
6012 (Start_Compile_If_Possible): Ditto.
6014 2013-04-11 Vincent Celier <celier@adacore.com>
6016 * gnat_ugn.texi: Add documentation about -gnatc and gnatmake.
6018 2013-04-11 Vincent Celier <celier@adacore.com>
6020 * switch-c.adb: Document internal switches.
6021 * usage.adb: Remove lines for internal switches: -gnatea, -gnateO,
6022 -gnatez and -gnateO.
6024 2013-04-11 Ed Schonberg <schonberg@adacore.com>
6026 * par-ch6.adb (P_Subprogram): Attach aspects to subprogram stub.
6027 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Allow aspects on
6029 * sem_ch13.adb (Analyze_Aspect_Specifications): Analyze generated
6030 pre/post pragmas at once before analyzing the proper body.
6031 * sem_prag.adb (Chain_PPC): Handle pragma that comes from an
6032 aspect on a subprogram stub.
6033 * aspects.adb: Aspect specifications can appear on a
6034 subprogram_Body_Stub.
6036 2013-04-11 Vincent Celier <celier@adacore.com>
6038 * gnatname.adb: Minor comment fix.
6040 2013-04-11 Vincent Celier <celier@adacore.com>
6042 * prj-makr.adb (Process_Directory): Create a new temporary
6043 file for each invocation of the compiler, in directory pointed
6044 by environment variable TMPDIR if it exists.
6046 2013-04-11 Arnaud Charlet <charlet@adacore.com>
6048 * gnat_ugn.texi: Minor editing/clean ups.
6050 2013-04-11 Ed Schonberg <schonberg@adacore.com>
6052 * sem_ch6.adb (Analyze_Null_Procedure): New subprogram, mostly
6053 extracted from Analyze_Subprogram_Declaration, to handle null
6054 procedure declarations that in ada 2012 can be completions of
6055 previous declarations.
6057 2013-04-11 Hristian Kirtchev <kirtchev@adacore.com>
6059 * sem_prag.adb (Entity_Of): Moved to Exp_Util.
6060 * exp_util.ads, exp_util.adb (Entity_Of): New routine.
6062 2013-04-11 Robert Dewar <dewar@adacore.com>
6064 * g-spipat.ads: Minor comment fix.
6066 2013-04-11 Robert Dewar <dewar@adacore.com>
6068 * sem_prag.adb, sem_util.adb, sem_res.adb, exp_ch4.adb: Minor
6071 2013-04-11 Thomas Quinot <quinot@adacore.com>
6073 * exp_util.ads (Fully_Qualified_Name_String): Document that the
6074 constructed literal is the entity name in all upper case.
6076 2013-04-11 Thomas Quinot <quinot@adacore.com>
6078 * sem_util.adb (Set_Entity_With_Style_Check): Fix logic of
6079 check for implementation defined identifiers.
6081 2013-04-11 Yannick Moy <moy@adacore.com>
6083 * checks.adb (Apply_Type_Conversion_Checks): Add an explanation
6084 of why range check and length are put on different nodes.
6085 * exp_ch4.adb (Apply_Type_Conversion_Checks): Remove check marks
6086 when doing their expansion.
6088 2013-04-11 Ed Schonberg <schonberg@adacore.com>
6090 * sem_util.ads, sem_util.adb (Get_Incomplete_View_Of_Ancestor):
6091 New function to implement the notion introduced in RM 7.3.1
6092 (5.2/3): in a child unit, a derived type is within the derivation
6093 class of an ancestor declared in a parent unit, even if there
6094 is an intermediate derivation that does not see the full view
6096 * sem_res.adb (Valid_Conversion): if all else fails, examine if an
6097 incomplete view of an ancestor makes a numeric conversion legal.
6099 2013-04-11 Ed Schonberg <schonberg@adacore.com>
6101 * sem_ch6.adb: in Ada2012 operators can only have in
6104 2013-04-11 Vincent Celier <celier@adacore.com>
6106 * makeutl.adb (Create_Binder_Mapping_File): Do not put into
6107 the mapping file ALI files of sources that have been replaced.
6109 2013-04-11 Vincent Celier <celier@adacore.com>
6111 * projects.texi: Add subsection Duplicate Sources in Projects.
6113 2013-04-11 Vincent Celier <celier@adacore.com>
6115 * gnat_ugn.texi: Add documentation for gnatmake switch -droot_dir/**
6117 2013-04-11 Arnaud Charlet <charlet@adacore.com>
6119 * init.c (__gnat_install_handler): Only set up an alternate
6120 stack when installing a signal handler for SIGSEGV.
6122 2013-04-11 Thomas Quinot <quinot@adacore.com>
6124 * g-socket.adb (Connect_Socket, timeout version): Call
6125 underlying connect operation directly, not through the 2-argument
6126 Connect_Socket thick binding, in order to avoid raising a junk
6127 exception for the EINPROGRESS return.
6129 2013-04-11 Robert Dewar <dewar@adacore.com>
6131 * a-cdlili.adb: Minor addition of pragma Warnings (Off).
6133 2013-04-11 Robert Dewar <dewar@adacore.com>
6135 * hostparm.ads: Minor reformatting.
6137 2013-04-11 Hristian Kirtchev <kirtchev@adacore.com>
6139 * aspects.ads, aspects.adb: Add Aspect_Depends to all the relevant
6141 * elists.ads, elists.adb (Contains): New routine.
6142 * par-prag.adb: Pragma Depends does not need any special treatment
6144 * sem_ch13.adb (Analyze_Aspect_Specifications):
6145 Transform aspect Depends into a corresponding pragma.
6146 (Check_Aspect_At_Freeze_Point): Aspect Depends does not need
6147 inspection at its freeze point.
6148 * sem_prag.adb (Analyze_Pragma): Perform analysis and
6149 normalization of pragma Depends. Remove the use of function
6150 Is_Duplicate_Item. Use End_Scope to uninstalle the formal
6151 parameters of a subprogram. Add a value for pragma Depends in
6153 (Is_Duplicate_Item): Removed.
6154 * snames.ads-tmpl: Add predefined name for Depends as well as
6155 a pragma identifier.
6157 2013-04-11 Arnaud Charlet <charlet@adacore.com>
6159 * gnat1drv.adb: Minor code clean up.
6161 2013-04-11 Arnaud Charlet <charlet@adacore.com>
6163 * debug.adb, sem_ch13.adb (Analyze_Enumeration_Representation_Clause):
6164 Ignore enumeration rep clauses by default in CodePeer mode, unless
6165 -gnatd.I is specified.
6167 2013-04-11 Ed Schonberg <schonberg@adacore.com>
6169 * sem_util.adb (Safe_To_Capture_Value): If the node belongs to
6170 an expression that has been attached to the else_actions of an
6171 if-expression, the capture is not safe.
6173 2013-04-11 Yannick Moy <moy@adacore.com>
6175 * checks.adb (Apply_Type_Conversion_Checks): Put check mark on type
6176 conversion for arrays.
6178 2013-04-11 Robert Dewar <dewar@adacore.com>
6180 * a-cdlili.adb, a-cidlli.adb, a-cbdlli.adb: Minor reformatting.
6182 2013-04-11 Johannes Kanig <kanig@adacore.com>
6184 * adabkend.adb: Minor comment addition.
6186 2013-04-11 Matthew Heaney <heaney@adacore.com>
6188 * a-cdlili.adb, a-cidlli.adb, a-cbdlli.adb ("="): Increment
6189 lock counts before entering loop.
6191 (Is_Sorted, Merge, Sort): Ditto.
6192 (Reverse_Find): Ditto.
6193 (Splice_Internal): Internal operation to refactor splicing logic.
6194 (Splice): Some logic moved into Splice_Internal.
6196 2013-04-11 Johannes Kanig <kanig@adacore.com>
6198 * adabkend.adb (Scan_Compiler_Arguments): Do not call
6199 Set_Output_Object_File_Name in Alfa_Mode
6200 * gnat1drv.adb (Adjust_Global_Switches): Take Alfa_Mode into account.
6201 * opt.ads: Fix documentation.
6203 2013-04-11 Robert Dewar <dewar@adacore.com>
6205 * sem_res.adb: Minor code reorganization and comment fixes.
6206 * sem_type.adb: Minor reformatting.
6208 2013-04-11 Hristian Kirtchev <kirtchev@adacore.com>
6210 * exp_ch4.adb (Process_Transient_Object): Add new
6211 local variable Fin_Call. Remove and explain ??? comment. Use the
6212 Actions of logical operators "and then" and "or else" to insert
6213 the generated finalization call.
6215 2013-04-11 Eric Botcazou <ebotcazou@adacore.com>
6217 * gnat_rm.texi: Fix typo.
6219 2013-04-11 Ed Schonberg <schonberg@adacore.com>
6221 * sem_res.adb: Minor reformatting.
6223 2013-04-11 Robert Dewar <dewar@adacore.com>
6225 * atree.h: Add declarations for Flag255-Flag289 Fix declaration
6226 of Field30 (was wrong, but no effect, since not yet referenced by
6227 back end) Add declarations for Field31-Field35 Add declarations
6229 * einfo.ads, einfo.adb (Has_Invariants): No longer applies to
6231 (Has_Predicates): No longer applies to functions.
6232 (Is_Predicate_Function): New flag.
6233 (Is_Predicate_Function_M): New flag.
6234 (Is_Invariant_Procedure): New flag.
6235 (Predicate_Function_M): New function.
6236 (Set_Predicate_Function_M): New procedure.
6237 * exp_ch11.adb (Expand_N_Raise_Expression): Take care of special
6238 case of appearing in predicate used for membership test.
6239 * exp_ch3.adb (Insert_Component_Invariant_Checks): Set
6240 Is_Invariant_Procedure flag.
6241 * exp_ch4.adb (Expand_Op_In): Call special predicate function
6242 that takes care of raise_expression nodes in the predicate.
6243 * exp_util.ads, exp_util.adb (Make_Predicate_Call): Add argument Mem for
6245 * sem_ch13.adb (Build_Predicate_Functions): New name for
6246 Build_Predicate_Function. Major rewrite to take care of raise
6247 expression in predicate for membership tests.
6248 * sem_res.adb (Resolve_Actuals): Include both predicate functions
6249 in defense against infinite predicate function loops.
6250 * sinfo.ads, sinfo.adb (Convert_To_Return_False): New flag.
6252 2013-04-11 Robert Dewar <dewar@adacore.com>
6254 * sem_prag.adb: Minor reformatting.
6256 2013-04-11 Ed Schonberg <schonberg@adacore.com>
6258 * lib-xref.adb: Generate reference for component of anonymous
6261 2013-04-11 Robert Dewar <dewar@adacore.com>
6263 * stand.ads: Minor reformatting.
6265 2013-04-11 Matthew Heaney <heaney@adacore.com>
6267 * a-convec.adb, a-coinve.adb, a-cobove.adb ("="): Increment lock
6268 counts before entering loop.
6269 (Find, Find_Index): Ditto.
6270 (Is_Sorted, Merge, Sort): Ditto.
6271 (Reverse_Find, Reverse_Find_Index): Ditto.
6273 2013-04-11 Robert Dewar <dewar@adacore.com>
6275 * exp_ch11.ads, exp_ch11.adb (Expand_N_Raise_Expression): New procedure.
6276 * exp_util.adb (Insert_Actions): Add entry for N_Raise_Expression.
6277 * expander.adb: Add call to Expand_N_Raise_Expression.
6278 * par-ch11.adb (P_Raise_Expression): New procedure.
6279 * par-ch4.adb (P_Relation): Handle Raise_Expression.
6280 * par.adb (P_Raise_Expression): New procedure.
6281 * sem.adb: Add handling for N_Raise_Expression.
6282 * sem_ch11.ads, sem_ch11.adb (Analyze_Raise_Expression): New procedure.
6283 * sem_res.adb (Resolve): Add handling for N_Raise_Expression.
6284 * sinfo.ads, sinfo.adb (N_Raise_Expression): New node.
6285 * sprint.adb (Sprint_Node_Actual): Add handling for N_Raise_Expression.
6286 * stand.ads (Any_Type): Document use with N_Raise_Expression.
6288 2013-04-11 Vincent Celier <celier@adacore.com>
6290 * gnat_ugn.texi: Remove section "The Development Environments"
6291 now that all predefined attributes are documented, including
6292 those in package IDE.
6294 2013-04-11 Ed Schonberg <schonberg@adacore.com>
6296 * sem_ch6.adb: Preserve parent link in copy of expression.
6298 2013-04-11 Vincent Celier <celier@adacore.com>
6300 * projects.texi: Complete rewrite of the subsection Attributes
6301 in section "Project file Reference".
6303 2013-04-11 Robert Dewar <dewar@adacore.com>
6305 * exp_ch4.adb: Minor reformatting.
6307 2013-04-11 Robert Dewar <dewar@adacore.com>
6309 * exp_ch4.adb (Expand_Concatenate): Remove wrapping in
6310 expression-with-actions node. No longer needed given fix to
6311 sem_prag and caused loss of some useful warnings.
6312 * sem.ads: Minor reformatting.
6313 * sem_prag.adb (Check_Disabled): Removed, to be replaced by not
6314 Check_Enabled. These two routines were curiously incompatible
6316 (Analyze_Pragma, case Check): Make sure we do
6317 not expand the string argument if the check is disabled. Avoid
6318 use of Check_Disabled, which resulted in missing analysis in
6320 * sem_prag.ads (Check_Disabled): Removed, to be replaced by not
6321 Check_Enabled. These two routines were curiously incompatible
6324 2013-04-11 Hristian Kirtchev <kirtchev@adacore.com>
6326 * exp_ch4.adb (Process_Transient_Object): Use
6327 an unchecked conversion when associating a transient controlled
6328 object with its "hook".
6330 2013-04-11 Ed Schonberg <schonberg@adacore.com>
6332 * sem_prag.adb (Analyze_Pragma, case
6333 Preelaborable_Initialization): The pragma is legal if it comes
6334 from an aspect on the private view of the type, even though its
6335 analysis point takes place later at the freeze point.
6337 2013-04-11 Robert Dewar <dewar@adacore.com>
6339 * sem_ch6.adb: Minor reformatting.
6341 2013-04-11 Yannick Moy <moy@adacore.com>
6343 * ali-util.adb (Read_Withed_ALIs): Do not consider it an error to
6344 read ALI files with No_Object=True in Alfa mode.
6345 * gnat1drv.adb: Set appropriately Back_End_Mode in Alfa mode, whether
6346 this is during frame condition generation of translation to Why.
6348 2013-04-11 Robert Dewar <dewar@adacore.com>
6350 * exp_ch4.adb: Minor code reorganization
6351 * types.ads: Minor reformatting.
6353 2013-04-11 Johannes Kanig <kanig@adacore.com>
6355 * opt.ads New global boolean Frame_Condition_Mode to avoid
6356 referring to command line switch.
6357 * gnat1drv.adb (Gnat1drv) set frame condition mode when -gnatd.G
6358 is present, and disable Code generation in that case. Disable
6359 ALI file generation when switch is *not* present.
6361 2013-04-11 Ed Schonberg <schonberg@adacore.com>
6363 * sem_ch6.adb (Analyze_Expression_Function): Perform the
6364 pre-analysis on a copy of the expression, to prevent downstream
6365 visbility issues involving operators and instantiations.
6367 2013-04-11 Johannes Kanig <kanig@adacore.com>
6369 * debug.adb: Reservation and documentation for -gnatd.G switch.
6370 * gnat1drv.adb (Adjust_Global_Switches) Take into account -gnatd.G
6371 switch, and set ALI file generation accordingly.
6373 2013-04-11 Robert Dewar <dewar@adacore.com>
6375 * exp_ch4.adb, exp_dist.adb: Minor reformatting.
6376 * gnat_rm.texi, gnat_ugn.texi: -020 Add documentation clarifying that
6377 check names introduced with pragma Check_Name are suppressed by -gnatp.
6379 2013-04-11 Vincent Celier <celier@adacore.com>
6381 * gnat_ugn.texi, projects.texi: Move chapter "Tools Supporting Project
6382 Files" from projects.texi to gnat_ugn.texi.
6384 2013-04-11 Arnaud Charlet <charlet@adacore.com>
6386 * gcc-interface/Make-lang.in: Update dependencies.
6388 2013-04-11 Yannick Moy <moy@adacore.com>
6390 * gnat1drv.adb (Adjust_Global_Switches): Allow missing body in Alfa
6393 2013-04-11 Hristian Kirtchev <kirtchev@adacore.com>
6395 * exp_ch4.adb (Expand_N_Allocator): Detect the
6396 allocation of an anonymous controlled object where the type of
6397 the context is named. Use the pool and finalization master of
6398 the named access type to allocate the object.
6400 2013-04-11 Vincent Celier <celier@adacore.com>
6402 * gnat_ugn.texi: Remove most mentions of gprbuild.
6403 * projects.texi: Remove all mentions of asociative array
6406 2013-04-11 Robert Dewar <dewar@adacore.com>
6408 * sem_prag.adb, sem_attr.adb, gnat1drv.adb, prj-makr.adb,
6409 opt.ads, sem_ch13.adb: Minor reformatting.
6410 * debug.adb: Minor comment fix (remove junk .I doc).
6412 2013-04-11 Thomas Quinot <quinot@adacore.com>
6414 * rtsfind.ads, exp_dist.adb, exp_dist.ads (Rtsfind.PCS_Version, case
6415 PolyORB): Bump to 6.
6416 (Exp_Dist.PolyORB_Support): Replace TC_Build with
6419 2013-04-11 Arnaud Charlet <charlet@adacore.com>
6421 * debug.adb, sem_prag.adb, par-ch2.adb, sem_attr.adb, gnat1drv.adb,
6422 exp_disp.adb, opt.ads, sem_ch13.adb (Relaxed_RM_Semantics): New flag.
6423 Enable this flag in CodePeer mode, and also via -gnatd.M.
6424 Replace some uses of CodePeer_Mode by Relaxed_RM_Semantics.
6426 2013-04-11 Ed Schonberg <schonberg@adacore.com>
6428 * sem_ch8.adb (Check_Constrained_Object): If a subtype is created
6429 from the renamed object in an object renaming declaration with
6430 an unconstrained nominal subtype, freeze the created subtype at
6431 once, to prevent order of elaboration issues in the backend.
6433 2013-04-11 Arnaud Charlet <charlet@adacore.com>
6435 * exp_aggr.adb (Aggr_Size_OK): Refine setting of Max_Aggr_Size
6436 in particular in CodePeer mode.
6438 2013-04-11 Vincent Celier <celier@adacore.com>
6440 * gnat_ugn.texi: Add documentation for backup copies of project
6443 2013-04-11 Tristan Gingold <gingold@adacore.com>
6445 * gnat_rm.texi: Add Detect_BLocking in the ravenscar profile
6448 2013-04-11 Vincent Celier <celier@adacore.com>
6450 * gnatname.adb (Scan_Args): Recognize new switch --no-backup
6451 (Usage): Add line for --no-backup.
6452 * opt.ads (No_Backup): New Boolean variable, initialized to False.
6453 (Ada_Version_Default): Switch to Ada 2012 by default.
6454 * prj-makr.adb (Initialize): Create a backup for an existing
6455 project file if gnatname is not invoked with --no-backup.
6457 2013-04-11 Thomas Quinot <quinot@adacore.com>
6459 * exp_ch4.adb: Minor code improvement: replace various calls to
6460 Make_If_Statement in expansion with Make_Implicit_If_Statement.
6462 2013-04-11 Eric Botcazou <ebotcazou@adacore.com>
6464 * ali.adb: Fix minor typo.
6466 2013-04-11 Thomas Quinot <quinot@adacore.com>
6468 * exp_ch4.adb (Find_Enclosing_Context): Add missing case of
6469 N_Procedure_Call_Statement.
6471 2013-04-11 Robert Dewar <dewar@adacore.com>
6473 * debug.adb: Minor comment fix.
6475 2013-04-11 Johannes Kanig <kanig@adacore.com>
6477 * debug.adb: Remove comment for -gnatd.G.
6479 2013-04-11 Thomas Quinot <quinot@adacore.com>
6481 * exp_ch4.adb (Expand_Record_Equality.Suitable_Element):
6482 Remove recursive routine, replace with...
6483 (Expand_Record_Equality.Element_To_Compare): New subroutine,
6484 implement iterative search for next element to compare.
6485 Add explanatory comment in the tagged case.
6487 2013-04-11 Ed Schonberg <schonberg@adacore.com>
6489 * sem_ch5.adb: remove spurious warning from non-empty loop.
6490 * sem_ch8.adb (Enclosing_Instance): Make public to other routines
6491 in the package, in order to suppress redundant semantic checks
6492 on subprogram renamings in nested instantiations.
6494 2013-04-11 Robert Dewar <dewar@adacore.com>
6496 * errout.ads: Minor reformatting.
6497 * sem_eval.adb (Why_Not_Static): Now issues continuation messages
6498 (Why_Not_Static): Test for aggregates behind string literals.
6499 * sem_eval.ads (Why_Not_Static): Now issues continuation messages.
6501 2013-04-11 Robert Dewar <dewar@adacore.com>
6503 * exp_ch4.adb (Expand_Concatenation): Wrap expansion in
6504 Expressions_With_Actions.
6506 2013-04-11 Ed Schonberg <schonberg@adacore.com>
6508 * sem_ch6.adb (Base_Types_Match): For an actual type in an
6509 instance, the base type may itself be a subtype, so find true
6510 base type to determine compatibility.
6512 2013-04-11 Robert Dewar <dewar@adacore.com>
6514 * s-osprim-mingw.adb, sem_ch3.adb, sem_prag.adb, sem_util.adb.
6515 makeutl.adb, sem_ch8.adb: Minor reformatting.
6517 2013-04-11 Vincent Celier <celier@adacore.com>
6519 * gnat_ugn.texi: Minor fixes for VMS.
6520 * ug_words: Minor addition: -gnato? => /OVERFLOW_CHECKS=?.
6522 2013-04-11 Robert Dewar <dewar@adacore.com>
6524 * usage.adb (Usage): Minor edit to -gnatW message
6526 2013-04-11 Robert Dewar <dewar@adacore.com>
6528 * exp_aggr.adb (Expand_N_Aggregate): Add circuit for handling
6529 others for string literal case. Also add big ??? comment about
6530 this new code, which should be redundant, but is not.
6531 * sem_eval.adb (Eval_Concatenation): Handle non-static case
6532 properly (Eval_String_Literal): Handle non-static literal properly
6534 2013-03-20 Tobias Burnus <burnus@net-b.de>
6536 * i-fortra.ads: Update comment, add Ada 2012's optional
6537 Star and Kind data types for enhanced interoperability.
6539 2013-03-16 Eric Botcazou <ebotcazou@adacore.com>
6541 * gnatvsn.ads (Library_Version): Bump to 4.9.
6543 2013-03-08 Cesar Strauss <cestrauss@gmail.com>
6546 * seh_init.c (Raise_From_Signal_Handler): Declare as no-return.
6547 (__gnat_SEH_error_handler): Likewise. Remove final return.
6549 2013-03-06 Eric Botcazou <ebotcazou@adacore.com>
6551 * gcc-interface/trans.c (Attribute_to_gnu): Abort instead of erroring
6552 out for an unimplemented attribute.
6554 2013-03-06 Eric Botcazou <ebotcazou@adacore.com>
6556 * gcc-interface/decl.c (gnat_to_gnu_field): Remove the wrapper around
6557 a misaligned integral type if a size is specified for the field.
6559 2013-03-06 Eric Botcazou <ebotcazou@adacore.com>
6561 * gcc-interface/trans.c (Raise_Error_to_gnu) <CE_Index_Check_Failed>:
6562 Record the unpadded type of the index type on the RCI stack.
6564 2013-03-06 Eric Botcazou <ebotcazou@adacore.com>
6566 * gcc-interface/trans.c (emit_range_check): Assert that the range type
6567 is a numerical type and remove useless local variables.
6569 2013-02-25 Eric Botcazou <ebotcazou@adacore.com>
6571 * gcc-interface/ada-tree.h: Back out change accidentally committed.
6573 2013-02-21 Jakub Jelinek <jakub@redhat.com>
6576 * gnat-style.texi (@title): Remove @hfill.
6577 * projects.texi: Avoid line wrapping inside of @pxref or @xref.
6579 2013-02-14 Rainer Emrich <rainer@emrich-ebersheim.de>
6582 * tracebak.c: Cast from pointer via FARPROC.
6584 2013-02-07 Simon Wright <simon@pushface.org>
6587 * init.c (__darwin_major_version): New function for x86-64/Darwin.
6588 (__gnat_adjust_context_for_raise) [Darwin]: Disable the workaround
6589 on Darwin 12 and above.
6591 2013-02-06 Rainer Emrich <rainer@emrich-ebersheim.de>
6594 * adaint.c (__gnat_check_OWNER_ACL): Cast from pointer via
6595 SECURITY_DESCRIPTOR *
6596 (__gnat_set_OWNER_ACL): Cast from DWORD to ACCESS_MODE
6597 (__gnat_portable_spawn): Fix cast to char* const*
6598 (add_handle): Cast from pointer via void **
6599 (add_handle): Cast from pointer via int *
6600 (__gnat_locate_exec_on_path): Cast from pointer via TCHAR *
6601 (__gnat_locate_exec_on_path): Cast from pointer via char *
6602 * initialize.c (append_arg): Cast from pointer via LPWSTR
6603 (__gnat_initialize): Cast from pointer via LPWSTR
6604 * seh_init.c (__gnat_map_SEH): Cast from pointer via FARPROC
6606 2013-02-06 Hristian Kirtchev <kirtchev@adacore.com>
6608 * gcc-interface/Make-lang.in: Enable System.Stack_Checking.Operations
6609 target pairs on VxWorks 5 only.
6611 2013-02-06 Arnaud Charlet <charlet@adacore.com>
6613 * gcc-interface/Make-lang.in: Update dependencies.
6615 2013-02-06 Vincent Celier <celier@adacore.com>
6617 * prj-proc.adb (Process_Aggregated_Projects): Use a new project
6618 node tree for each project tree rooted at an aggregated project.
6620 2013-02-06 Hristian Kirtchev <kirtchev@adacore.com>
6622 * sem_util.adb (Is_Interface_Conversion): New routine.
6623 (Object_Access_Level): Detect an interface conversion
6624 that has been rewritten into a different construct. Use the
6625 original form of the conversion to find the access level of
6628 2013-02-06 Eric Botcazou <ebotcazou@adacore.com>
6630 * einfo.ads (Has_Pragma_No_Inline): New flag using Flag201.
6631 (Has_Pragma_No_Inline): Declare and mark as inline.
6632 (Set_Has_Pragma_No_Inline): Likewise.
6633 * einfo.adb (Has_Pragma_No_Inline): New function.
6634 (Set_Has_Pragma_No_Inline): New procedure.
6635 (Write_Entity_Flags): Handle Has_Pragma_No_Inline.
6636 * snames.ads-tmpl (Name_No_Inline): New pragma-related name.
6637 (Pragma_Id): Add Pragma_No_Inline value.
6638 * par-prag.adb (Prag): Handle Pragma_Inline.
6639 * sem_prag.adb (Inline_Status): New enumeration type.
6640 (Process_Inline): Change Active parameter
6641 to Inline_Status and add support for suppressed inlining.
6642 (Analyze_Pragma) <Pragma_Inline>: Adjust to above change.
6643 <Pragma_Inline_Always>: Likewise.
6644 <Pragma_No_Inline>: Implement new pragma No_Inline.
6645 (Sig_Flags): Add Pragma_No_Inline.
6646 * gnat_rm.texi (Implementation Defined Pragmas): Add No_Inline.
6647 * gnat_ugn.texi (Switches for gcc): Mention Pragma No_Inline.
6649 2013-02-06 Pascal Obry <obry@adacore.com>
6651 * s-osprim-mingw.adb (Clock): Make sure we copy all data locally
6652 to avoid interleaved modifications that could happen from another
6653 task calling Get_Base_Data.
6654 (Get_Base_Data): Make it a critical section. Avoid updating if another
6655 task has already done it.
6657 2013-02-06 Eric Botcazou <ebotcazou@adacore.com>
6659 * sem_prag.adb: Minor reformatting.
6661 2013-02-06 Pascal Obry <obry@adacore.com>
6663 * s-tasloc.ads: Set System.Task_Lock to preelaborate.
6665 2013-02-06 Eric Botcazou <ebotcazou@adacore.com>
6667 * snames.ads-tmpl (Name_Loop_Optimize, Name_No_Unroll,
6668 Name_Unroll, Name_No_Vector, Name_Vector): New pragma-related
6670 (Pragma_Id): Add Pragma_Loop_Optimize value.
6671 * par-prag.adb (Prag): Handle Pragma_Loop_Optimize.
6672 * sem_prag.adb (Check_Loop_Invariant_Variant_Placement): Rename to...
6673 (Check_Loop_Pragma_Placement): ...this.
6675 <Pragma_Loop_Invariant>: Adjust to above renaming.
6676 <Loop_Variant>: Likewise.
6677 <Pragma_Loop_Optimize>: Implement new pragma Loop_Optimize.
6678 (Sig_Flags): Add Pragma_Loop_Optimize.
6679 * gnat_rm.texi (Implementation Defined Pragmas): Add Loop_Optimize.
6680 * gnat_ugn.texi (Vectorization of loops): Mention Loop_Optimize.
6682 2013-02-06 Robert Dewar <dewar@adacore.com>
6684 * osint.ads: Minor fix of typo.
6686 2013-02-06 Sergey Rybin <rybin@adacore.com frybin>
6688 * gnat_ugn.texi: gnatmetric: update the documentation of
6689 complexity metrics for Ada 2012.
6691 2013-02-06 Javier Miranda <miranda@adacore.com>
6693 * exp_disp.adb (Make_Secondary_DT): Code cleanup:
6694 remove useless initialization.
6696 2013-02-06 Ed Schonberg <schonberg@adacore.com>
6698 * sem_ch3.adb (Build_Discriminant_Constraints): Do not
6699 generate overflow checks on a discriminant expression if the
6700 discriminant constraint is applied to a private type that has
6701 a full view, because the check will be applied when the full
6702 view is elaborated. Removing the redundant check is not just
6703 an optimization, but it prevents spurious assembler errors,
6704 because of the way the backend generates names for expressions
6705 that require overflow checking.
6707 2013-02-06 Pascal Obry <obry@adacore.com>
6709 * s-osprim-mingw.adb: Removes workaround for an old GNU/Linker
6710 limitation on Windows.
6720 (Clock): Use variable corresponding to access.
6721 (Get_Base_Time): Likewise.
6722 (Monotonic_Clock): Likewise.
6724 2013-02-06 Vincent Celier <celier@adacore.com>
6726 * make.adb (Gnatmake): When gnatmake is called with a project
6727 file, do not invoke gnatbind with -I-.
6728 * makeutl.adb (Create_Binder_Mapping_File): Rewrite function. Get
6729 the infos from all the sources.
6731 2013-02-06 Ed Schonberg <schonberg@adacore.com>
6733 * snames.ads-tmpl: Add Name_Overriding_Renamings and pragma
6734 Overriding_Renamings.
6735 * par-prag.adb: Recognize pragma Overriding_Renamings.
6736 * opt.ads (Overriding_Renamings): flag to control compatibility
6737 mode with Rational compiler, replaces Rational_Profile flag.
6738 * sem_ch8.adb (Analyze_Subprogram_Renaming): When
6739 Overriding_Renamings is enabled, accept renaming declarations
6740 where the new subprogram renames and overrides a locally inherited
6741 operation. Improve error message for some illegal renamings.
6742 * sem_prag.adb (Analyze_Pragma): Add case for Overriding_Renamings.
6743 (Set_Rational_Profile): The Rational_Profile enables
6744 Overriding_Renamings, Implicit_Packing, and Use_Vads_Size.
6746 2013-02-06 Ed Schonberg <schonberg@adacore.com>
6748 * sem_util.adb: Set parent of copied aggregate component, to
6749 prevent infinite loop.
6751 2013-02-06 Robert Dewar <dewar@adacore.com>
6753 * sem_ch3.adb, sem_ch10.adb: Minor reformatting.
6754 * exp_disp.adb: Minor comment update.
6755 * comperr.ads, osint.ads, rtsfind.adb, sem_prag.adb: Minor addition of
6758 2013-02-06 Thomas Quinot <quinot@adacore.com>
6760 * targparm.ads, sem_ch13.adb (Support_Nondefault_SSO): New target
6761 parameter, defaulted to False for now, indicates targets where
6762 non-default scalar storage order may be specified.
6764 2013-02-06 Thomas Quinot <quinot@adacore.com>
6766 * sprint.adb (Write_Itype): Treat E_Record_Subtype_With_Private
6767 same as E_Record_Subtype. Display E_Class_Wide_Subtype as
6770 2013-02-06 Hristian Kirtchev <kirtchev@adacore.com>
6772 * sem_ch3.adb (Complete_Private_Subtype): Inherit the
6773 Has_Unknown_Discriminants from the full view of the base type.
6775 2013-02-06 Tristan Gingold <gingold@adacore.com>
6777 * raise-gcc.c: Remove useless includes (sys/stat.h, adaint.h)
6778 Enclosing debugging functions within #ifndef inhibit_libc to
6779 support builds without full C headers.
6781 2013-02-06 Thomas Quinot <quinot@adacore.com>
6783 * gnat_rm.texi: Add a minimal example of Scalar_Storage_Order.
6785 2013-02-06 Hristian Kirtchev <kirtchev@adacore.com>
6787 * sem_ch10.adb (Install_Limited_Withed_Unit): Add a missing
6788 check to detect a parent-child relationship between two units in
6789 order to correctly bypass the installation of a limited view. In
6790 other words, the comment on the intended usage of the check was
6791 correct, but the code itself did not reflect the behavior.
6793 2013-02-06 Javier Miranda <miranda@adacore.com>
6795 * exp_ch5.adb (Expand_N_Assignment_Statement): Do not generate the
6796 runtime check on assignment to tagged types if compiling with checks
6799 2013-02-06 Robert Dewar <dewar@adacore.com>
6801 * exp_util.adb, checks.adb, sem_ch12.adb, sem_res.adb, prj-conf.adb,
6802 s-os_lib.adb: Minor reformatting
6804 2013-02-06 Vincent Celier <celier@adacore.com>
6806 * ug_words: Add -gnateY = /IGNORE_STYLE_CHECKS_PRAGMAS.
6808 2013-02-06 Ed Schonberg <schonberg@adacore.com>
6810 * snames.ads-tmpl: Add Name_Rational and pragma Rational.
6811 * par-prag.adb: Recognize pragma Rational.
6812 * opt.ads (Rational_Profile): flag to control compatibility mode
6813 with Rational compiler.
6814 * sem_ch8.adb (Analyze_Subprogram_Renaming): When Rational profile
6815 is enable, accept renaming declarations where the new subprogram
6816 and the renamed entity have the same name.
6817 * sem_prag.adb (analyze_pragma): Add pragma Rational, and recognize
6818 Rational as a profile.
6820 2013-02-06 Hristian Kirtchev <kirtchev@adacore.com>
6822 * exp_ch5.adb (Expand_Loop_Entry_Attributes): When
6823 dealing with a for loop that iterates over a subtype indication
6824 with a range, use the low and high bounds of the subtype.
6826 2013-02-06 Nicolas Roche <roche@adacore.com>
6828 * s-os_lib.adb (Normalize_Arguments): Arguments containing tabs should
6831 2013-02-06 Vincent Celier <celier@adacore.com>
6833 * prj-conf.adb (Process_Project_And_Apply_Config): New variable
6834 Conf_Project. New recursive procedure Check_Project to find a non
6835 aggregate project and put its Project_Id in Conf_Project. Fails if
6836 no such project can be found.
6837 (Get_Or_Create_Configuration_File): New parameter Conf_Project.
6838 (Do_Autoconf): Use project directory of project Conf_Project to store
6839 the generated configuration project file.
6840 * prj-conf.ads (Get_Or_Create_Configuration_File): New parameter
6843 2013-02-06 Javier Miranda <miranda@adacore.com>
6845 * sem_res.adb (Resolve_Actuals): Generate a read
6846 reference for out-mode parameters in the cases specified by
6849 2013-02-06 Hristian Kirtchev <kirtchev@adacore.com>
6851 * sem_attr.adb (Resolve_Attribute): Do not resolve the prefix of
6852 Loop_Entry, instead wait until the attribute has been expanded. The
6853 delay ensures that any generated checks or temporaries are inserted
6854 before the relocated prefix.
6856 2013-02-06 Ed Schonberg <schonberg@adacore.com>
6858 * sem_ch12.adb: Code clean up.
6860 2013-02-06 Ed Schonberg <schonberg@adacore.com>
6862 * checks.adb (Apply_Discriminant_Check): Look for discriminant
6863 constraint in full view of private type when needed.
6864 * sem_ch12.adb (Validate_Array_Type_Instance): Specialize
6865 previous patch to components types that are private and without
6868 2013-02-06 Hristian Kirtchev <kirtchev@adacore.com>
6870 * exp_ch4.adb (Find_Enclosing_Context): Recognize
6871 a simple return statement as one of the cases that require special
6872 processing with respect to temporary controlled function results.
6873 (Process_Transient_Object): Do attempt to finalize a temporary
6874 controlled function result when the associated context is
6875 a simple return statement. Instead, leave this task to the
6876 general finalization mechanism.
6878 2013-02-06 Thomas Quinot <quinot@adacore.com>
6880 * einfo.ads: Minor reformatting.
6881 (Status_Flag_Or_Transient_Decl): Add ??? comment.
6883 2013-02-06 Hristian Kirtchev <kirtchev@adacore.com>
6885 * exp_ch4.adb (Expand_N_Expression_With_Actions): Rewritten. This
6886 routine should be able to properly detect controlled transient
6887 objects in its actions and generate the appropriate finalization
6889 * exp_ch6.adb (Enclosing_Context): Removed.
6890 (Expand_Ctrl_Function_Call): Remove local subprogram and
6891 constant. Use routine Within_Case_Or_If_Expression to determine
6892 whether the lifetime of the function result must be extended to
6893 match that of the context.
6894 * exp_util.ads, exp_util.adb (Within_Case_Or_If_Expression): New
6897 2013-02-06 Ed Schonberg <schonberg@adacore.com>
6899 * sem_ch12.adb (Validate_Array_Type_Instance): Extend check
6900 for subtype matching of component type of formal array type,
6901 to avoid spurious error when component type is a separate actual
6902 in the instance, and there may be a discrepancy between private
6903 and full view of component type.
6905 2013-02-06 Robert Dewar <dewar@adacore.com>
6907 * s-dim.ads, clean.adb: Minor reformatting.
6909 2013-02-06 Javier Miranda <miranda@adacore.com>
6911 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Undo previous patch.
6912 (Can_Split_Unconstrained_Function): Only split the inlined function if
6913 the compiler generates the code of its body.
6915 2013-02-06 Robert Dewar <dewar@adacore.com>
6917 * exp_prag.adb, sem_ch3.adb, exp_attr.adb, sem_prag.adb, sem_ch6.adb,
6918 exp_intr.adb, exp_dist.adb, sem_ch13.adb: Internal clean up for
6921 2013-02-06 Robert Dewar <dewar@adacore.com>
6923 * gnat_rm.texi: Minor text updates for pragma Warning.
6925 2013-02-06 Geert Bosch <bosch@adacore.com>
6927 * s-multip.adb (Number_Of_CPUs): Short-circuit in case of
6930 2013-02-06 Vincent Celier <celier@adacore.com>
6932 * clean.adb (Delete): On VMS use host notation to delete all files.
6934 2013-02-06 Robert Dewar <dewar@adacore.com>
6936 * sem_prag.adb, sem_ch6.adb, prj-conf.adb, erroutc.adb: Minor
6939 2013-02-06 Gary Dismukes <dismukes@adacore.com>
6941 * sem_ch6.adb (Check_For_Primitive_Subprogram): Test for
6942 the special case of a user-defined equality that overrides
6943 the predefined equality of a nonderived type declared in a
6945 * sem_util.adb (Collect_Primitive_Operations): Add test for
6946 Is_Primitive when looping over the subprograms following a type,
6947 to catch the case of primitives such as a user-defined equality,
6948 which otherwise won't be found when the type is not a derived
6949 type and is declared in a declarative part.
6951 2013-02-06 Vincent Celier <celier@adacore.com>
6953 * prj-conf.adb (Check_Target): Always return True when Target
6954 is empty (Get_Or_Create_Configuration_File.Get_Project_Target):
6955 New procedure to get the value of attribute Target in the main
6957 (Get_Or_Create_Configuration_File.Do_Autoconf): No
6958 need to get the value of attribute Target in the main project.
6959 (Get_Or_Create_Configuration_File): Call Get_Project_Target and
6960 use the target fom this call.
6962 2013-02-06 Eric Botcazou <ebotcazou@adacore.com>
6964 * erroutc.adb (Validate_Specific_Warning): Do not issue the
6965 warning about an ineffective Pragma Warnings for -Wxxx warnings.
6966 * sem_prag.adb (Analyze_Pragma) <Warnings>: Accept -Wxxx warnings.
6967 * gnat_rm.texi (Pragma Warnings): Document coordination with
6968 warnings of the GCC back-end.
6970 2013-02-06 Javier Miranda <miranda@adacore.com>
6972 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Do not build the body
6973 of an inlined function if we do not generate code for the function.
6975 2013-02-06 Pascal Obry <obry@adacore.com>
6977 * s-os_lib.adb (Locate_Exec_On_Path): Call Normalize_Pathname
6978 with Resolve_Links set to False.
6980 2013-02-03 Eric Botcazou <ebotcazou@adacore.com>
6982 * gcc-interface/decl.c: Include diagnostic-core.h.
6983 (gnat_to_gnu_entity) <E_Array_Type>: Sorry if Reverse_Storage_Order
6984 is set on the entity.
6985 <E_Record_Type>: Likewise.
6986 * gcc-interface/Make-lang.in (ada/decl.o): Add $(DIAGNOSTIC_CORE_H).
6988 2013-01-29 Ben Brosgol <brosgol@adacore.com>
6990 * gnat_rm.texi: Fixed typos. Minor edits.
6992 2013-01-29 Bob Duff <duff@adacore.com>
6994 * a-convec.adb: Minor reformatting.
6996 2013-01-29 Pascal Obry <obry@adacore.com>
6998 * tempdir.adb, tempdir.ads (Use_Temp_Dir): Set wether to use the temp
7001 2013-01-29 Ed Schonberg <schonberg@adacore.com>
7003 * exp_ch5.adb (Expand_Iterator_Loop_Over_Array): Preserve loop
7004 identifier only if it comes from source.
7005 (Expand_N_Loop_Statement): If the domain of iteration is an
7006 enumeration type with a representation clause, remove from
7007 visibility the loop identifier before rewriting the loop as a
7008 block with a declaration for said identifier.
7009 * sem_util.adb (Remove_Homonym): Handle properly the default case.
7011 2013-01-29 Vincent Celier <celier@adacore.com>
7013 * prj-proc.adb: Minor comment spelling fix.
7015 2013-01-29 Pascal Obry <obry@adacore.com>
7017 * prj-proc.adb (Process_Expression_Variable_Decl): Prepend
7018 Project_Path to current environment.
7020 2013-01-29 Thomas Quinot <quinot@adacore.com>
7022 * sprint.adb (Sprint_Node_Actual): Output freeze nodes for
7023 itypes even if Dump_Freeze_Null is not set.
7025 2013-01-29 Robert Dewar <dewar@adacore.com>
7027 * sem_util.adb: Minor reformatting.
7028 * s-rident.ads: Minor comment fixes.
7030 2013-01-29 Pascal Obry <obry@adacore.com>
7032 * prj-env.ads, prj-env.adb (Add_Directories): Add parameter to
7033 control if the path is prepended or appended.
7035 2013-01-29 Ed Schonberg <schonberg@adacore.com>
7037 * sem_ch6.adb (Analyze_Expression_Function): An expression
7038 function declaration is not a subprogram declaration, and thus
7039 cannot appear in a protected definition.
7041 2013-01-29 Hristian Kirtchev <kirtchev@adacore.com>
7043 * exp_util.adb (Insert_Actions): When new
7044 actions come from the expression of the expression with actions,
7045 then they must be added to the list of existing actions.
7047 2013-01-29 Eric Botcazou <ebotcazou@adacore.com>
7049 * sem_ch3.adb (Analyze_Subtype_Declaration) <Private_Kind>: For
7050 the subtype of a constrained private type with discriminants
7051 that has got a full view, show that the completion is a clone
7054 2013-01-29 Javier Miranda <miranda@adacore.com>
7056 * errout.ads, errout.adb (Get_Ignore_Errors): New subprogram.
7057 * opt.ads (Warn_On_Overlap): Update documentation.
7058 * sem_aggr.adb (Resolve_Aggregate, Resolve_Extension_Aggregate):
7059 Check function writable actuals.
7060 * sem_ch3.adb (Build_Derived_Record_Type,
7061 Record_Type_Declaration): Check function writable actuals.
7062 * sem_ch4.adb (Analyze_Range): Check function writable actuals.
7063 * sem_ch5.adb (Analyze_Assignment): Remove code of the initial
7064 implementation of AI05-0144.
7065 * sem_ch6.adb (Analyze_Function_Return,
7066 (Analyze_Procedure_Call.Analyze_Call_And_Resolve): Remove code
7067 of the initial implementation of AI05-0144.
7068 * sem_res.adb (Resolve): Remove code of the initial implementation.
7069 (Resolve_Actuals): Call Check_Function_Writable_Actuals and remove call
7070 of the initial implementation.
7071 (Resolve_Arithmetic_Op, Resolve_Logical_Op,
7072 Resolve_Membership_Op): Check function writable actuals.
7073 * sem_util.ad[sb] (Actuals_In_Call): Removed
7074 (Check_Order_Dependence): Removed (Save_Actual): Removed
7075 (Check_Function_Writable_Actuals): New subprogram.
7076 * usage.adb (Usage): Update documentation.
7077 * warnsw.adb (Set_Warning_Switch): Enable warn_on_overlap when
7078 setting all warnings.
7080 2013-01-29 Robert Dewar <dewar@adacore.com>
7082 * a-calend-vms.adb: Minor comment fix.
7084 2013-01-29 Robert Dewar <dewar@adacore.com>
7086 * mlib-utl.adb, gnatlink.adb: Avoid reference to ASCII.Back_Slash
7087 because of casing issues.
7088 * sem_util.ads: Minor comment fix.
7089 * style.adb (Check_Identifier): Set proper casing for entities
7091 * styleg.adb: Minor comment improvement.
7092 * stylesw.ads (Style_Check_Standard): Fix bad comments.
7094 2013-01-29 Hristian Kirtchev <kirtchev@adacore.com>
7096 * sem_prag.adb: Add the grammar for pragmas Abstract_State and Global.
7097 (Analyze_Pragma): Push the scope of the related subprogram and install
7098 its formals once before starting the analysis of the [moded] global
7101 2013-01-29 Pascal Obry <obry@adacore.com>
7103 * prj-proc.adb (Process_Expression_Variable_Decl): Always handle
7104 relative paths in Project_Path as relative to the aggregate
7105 project location. Note that this was what was documented.
7107 2013-01-29 Vincent Celier <celier@adacore.com>
7109 * gnatcmd.adb: For "gnat stub -P ...", do not check the naming
7110 scheme for Ada, when Ada is not a language for the project.
7112 2013-01-29 Ed Schonberg <schonberg@adacore.com>
7114 * sem_ch3.adb (Analyze_Subtype_Declaration): Inherit
7115 Is_Generic_Actual_Type flag in a nested instance.
7116 * sem_ch12.adb (Restore_Private_Views): Preserve
7117 Is_Generic_Actual_Type flag if actual is a Generic_Actual_Type
7118 of an enclosing instance.
7119 * sem_util.adb (Corresponding_Generic_Type): Handle generic actual
7120 which is an actual of an enclosing instance.
7121 * sem_type.adb (Real_Actual): If a generic_actual_type is the
7122 formal of an enclosing generic and thus renames the corresponding
7123 actual, use the actual of the enclosing instance to resolve
7124 spurious ambiguities in instantiations when two formals are
7125 instantiated with the same actual.
7127 2013-01-29 Robert Dewar <dewar@adacore.com>
7129 * gnat_rm.texi: Document all Ada 2005 and Ada 2012 pragmas as
7130 being available as implementation-defined pragmas in earlier
7133 2013-01-29 Vincent Celier <celier@adacore.com>
7135 * clean.adb (Delete): On VMS, delete all versions of the file.
7137 2013-01-29 Robert Dewar <dewar@adacore.com>
7139 * par-ch6.adb (No_Constraint_Maybe_Expr_Func): New procedure.
7140 * par-util.adb (No_Constraint): Undo special handling, moved
7143 2013-01-29 Robert Dewar <dewar@adacore.com>
7145 * aspects.ads: Aspect Warnings is implementation defined Add
7146 some other missing entries to impl-defined list Mark Warnings
7147 as GNAT pragma in main list.
7148 * sem_ch8.adb: Process aspects for all cases of renaming
7151 2013-01-29 Robert Dewar <dewar@adacore.com>
7153 * sem_ch6.adb (Analyze_Function_Call): Set In_Assertion flag.
7154 * sem_elab.adb (Check_Internal_Call_Continue): Do not issue
7155 warnings about possible elaboration error if call is within
7157 * sinfo.ads, sinfo.adb (In_Assertion): New flag in N_Function_Call node.
7159 2013-01-29 Robert Dewar <dewar@adacore.com>
7161 * a-calend-vms.adb, g-eacodu-vms.adb, g-trasym-vms-alpha.adb,
7162 * s-auxdec-vms-ia64.adb, s-mastop-vms.adb, s-osprim-vms.adb,
7163 s-tasdeb-vms.adb: Replace pragma Interface by pragma Import.
7165 2013-01-29 Robert Dewar <dewar@adacore.com>
7167 * opt.ads (Ignore_Style_Checks_Pragmas): New flag.
7168 * par-prag.adb (Par, case Style_Checks): Recognize
7169 Ignore_Style_Checks_Pragmas.
7170 * sem_prag.adb (Analyze_Pragma, case Style_Checks): Recognize
7171 Ignore_Style_Checks_Pragmas.
7172 * switch-c.adb: Recognize -gnateY switch.
7173 * usage.adb: Add documentation for "-gnateY".
7174 * vms_data.ads: Add IGNORE_STYLE_CHECKS_PRAGMAS (-gnateY).
7176 2013-01-29 Vincent Celier <celier@adacore.com>
7178 * clean.adb (Clean_Executables): Add Sid component when calling
7180 * make.adb: When inserting in the Queue, add the Source_Id
7181 (Sid) when it is known (Start_Compile_If_Possible): When the
7182 Source_Id is known (Sid), get the path name of the ALI file
7183 (Full_Lib_File) from it, to avoid finding old ALI files in other
7185 * makeutl.ads (Source_Info): New Source_Id component Sid in
7186 Format_Gnatmake variant.
7188 2013-01-29 Robert Dewar <dewar@adacore.com>
7190 * gnat_ugn.texi: Document -gnateY.
7192 2013-01-29 Doug Rupp <rupp@adacore.com>
7194 * s-osinte-vms.ads, s-taprop-vms.adb, system-vms_64.ads,
7195 system-vms-ia64.ads: Replace pragma Interface by pragma Import.
7197 2013-01-29 Robert Dewar <dewar@adacore.com>
7199 * atree.ads, atree.adb (Node30): New function.
7200 (Set_Node30): New procedure.
7201 (Num_Extension_Nodes): Change to 5 (activate new fields/flags).
7202 * atree.h: Add macros for Field30 and Node30.
7203 * einfo.ads, einfo.adb: Move some fields to avoid duplexing.
7204 * treepr.adb (Print_Entity_Information): Print fields 30-35.
7206 2013-01-29 Robert Dewar <dewar@adacore.com>
7208 * sem_prag.adb (Analyze_Pragma, case Interface): Consider to
7209 be a violation of No_Obsolescent_Features even in Ada 95. Also
7210 generates a warning in -gnatwj mode.
7211 (Analyze_Pragma, case Interface_Name): Generates a warning in -gnatwj
7213 * gnat_ugn.texi: Additional documentation on -gnatwj and pragma
7216 2013-01-29 Vincent Celier <celier@adacore.com>
7218 * snames.ads-tmpl: Add new standard name Trailing_Switches.
7220 2013-01-29 Ed Schonberg <schonberg@adacore.com>
7222 * sem_disp.adb (Check_Controlling_Type): If a designated type T
7223 of an anonymous access type is a limited view of a tagged type,
7224 it can be a controlling type only if the subprogram is in the
7227 2013-01-29 Vincent Celier <celier@adacore.com>
7229 * gnatcmd.adb: Use the project where the config pragmas file is
7230 declared to get its path.
7232 2013-01-29 Vincent Celier <celier@adacore.com>
7234 * prj-attr.adb: New attribute Linker'Trailing_Switches.
7236 2013-01-22 Eric Botcazou <ebotcazou@adacore.com>
7238 * gcc-interface/trans.c (gnat_to_gnu) <N_Expression_With_Actions>: Do
7239 not translate the Etype of the node before translating the Actions.
7241 2013-01-22 Eric Botcazou <ebotcazou@adacore.com>
7243 * gcc-interface/trans.c (Pragma_to_gnu) <Name_Space>: Use optimize_size
7244 instead of optimize and adjust warning message.
7245 (Compilation_Unit_to_gnu): Process pragmas preceding the unit.
7247 2013-01-22 Tristan Gingold <gingold@adacore.com>
7249 * gcc-interface/gigi.h (ADT_unhandled_except_decl,
7250 ADT_unhandled_others_decl): New.
7251 (unhandled_others_decl, unhandled_except_decl): Define.
7252 * gcc-interface/trans.c: Include common/common-target.h.
7253 (gigi): Initialize them.
7254 (Subprogram_Body_to_gnu): On SEH targets, wrap the body of the main
7255 function in a try/catch clause.
7257 2013-01-11 Eric Botcazou <ebotcazou@adacore.com>
7259 * gcc-interface/Make-lang.in (COMMON_ADAFLAGS): Remove -gnata.
7260 (CHECKING_ADAFLAGS): New.
7261 (ALL_ADAFLAGS): Include CHECKING_ADAFLAGS.
7263 2013-01-10 Eric Botcazou <ebotcazou@adacore.com>
7265 * gcc-interface/config-lang.in (boot_language_boot_flags): Delete.
7266 * gcc-interface/Make-lang.in (BOOT_ADAFLAGS): Likewise.
7268 2013-01-07 Eric Botcazou <ebotcazou@adacore.com>
7270 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Record_Type>: Adjust
7271 comment about type extension with discriminants.
7272 <E_Record_Subtype>: Remove useless test and reorder conditions.
7273 (elaborate_entity) <E_Record_Subtype>: Likewise.
7275 2013-01-07 Richard Biener <rguenther@suse.de>
7278 * gcc-interface/Make-lang.in (ada.install-common): Always apply
7279 program_transform_name.
7281 2013-01-06 Eric Botcazou <ebotcazou@adacore.com>
7283 * gnatvsn.ads (Current_Year): Bump to 2013.
7285 2013-01-06 Olivier Hainque <hainque@adacore.com>
7287 * gcc-interface/decl.c (gnat_to_gnu_field): Emit a specialized
7288 diagnostic for component size mismatch wrt volatile requirements.
7289 Add a gcc_unreachable() at the end of the checks for size. Split
7290 the check on volatile for positions into one check on atomic and
7291 a subsequent one on volatile.
7293 2013-01-06 Eric Botcazou <ebotcazou@adacore.com>
7295 * gcc-interface/decl.c (elaborate_entity) <E_Record_Type>: Delete.
7297 2013-01-06 Eric Botcazou <ebotcazou@adacore.com>
7299 * gcc-interface/decl.c (gnat_to_gnu_entity) <discrete_type>: Do not
7300 pack the field of the record type made for a misaligned type.
7302 2013-01-06 Eric Botcazou <ebotcazou@adacore.com>
7304 * gcc-interface/decl.c (annotate_value) <COMPONENT_REF>: Be prepared
7305 for discriminants inherited from parent record types.
7307 2013-01-04 Robert Dewar <dewar@adacore.com>
7309 * warnsw.adb: Minor fixes to -gnatw.d handling.
7311 2013-01-04 Robert Dewar <dewar@adacore.com>
7313 * einfo.adb, atree.adb: Enlarge entities to make 63 more flags, 6 more
7316 2013-01-04 Joel Brobecker <brobecker@adacore.com>
7318 * gnat_ugn.texi: Fix typo.
7320 2013-01-04 Robert Dewar <dewar@adacore.com>
7322 * gnat_rm.texi: Document alignment choice for subtypes.
7324 2013-01-04 Robert Dewar <dewar@adacore.com>
7326 * validsw.ads: Minor fix to comment.
7328 2013-01-04 Doug Rupp <rupp@adacore.com>
7330 * Makefile.rtl (GNATRTL_NONTASKING_OBJS,
7331 GNATRTL_ALTIVEC_OBJS): Factor g-al* objects.
7332 * gcc-interface/Makefile.in (ADA_EXCLUDE_SRCS): Add g-al* sources.
7333 (GNATRTL_ALTIVEC_OBJS): Override to null for VMS.
7334 Rename leon vxworks toolchain as leon-wrs-vxworks.
7335 * gcc-interface/Make-lang.in: Update dependencies
7337 2013-01-04 Pascal Obry <obry@adacore.com>
7339 * prj.ads (For_Each_Source): Add Locally_Removed parameter.
7340 (Source_Iterator): Add Locally_Removed field.
7341 * prj.adb (For_Each_Source): Ignore Locally_Removed files if needed.
7344 2013-01-04 Robert Dewar <dewar@adacore.com>
7346 * exp_attr.adb: Minor reformatting.
7348 2013-01-04 Robert Dewar <dewar@adacore.com>
7350 * checks.adb (Insert_Valid_Check): Fix handling of renamed
7351 packed array element.
7352 * exp_ch4.adb (Expand_Concatenate): Fix some missing parent
7353 fields in generated code.
7354 * exp_util.adb (Side_Effect_Free): Improve detection of cases
7357 2013-01-04 Robert Dewar <dewar@adacore.com>
7359 * sinfo.ads: Clean up order of N_xxx subtypes
7361 2013-01-04 Vincent Celier <celier@adacore.com>
7363 * prj-conf.adb (Check_Target): Allow --autoconf= with no target.
7365 2013-01-04 Robert Dewar <dewar@adacore.com>
7367 * types.ads, prj-conf.adb, par-tchk.adb: Minor reformatting.
7369 2013-01-04 Robert Dewar <dewar@adacore.com>
7371 * par-ch6.adb (P_Subprogram): Better handling of missing IS
7372 after expression function.
7373 * par-util.adb (No_Constraint): Improve handling to avoid bad warnings.
7375 2013-01-04 Robert Dewar <dewar@adacore.com>
7377 * exp_util.ads, exp_util.adb (Insert_Actions): In expression with
7378 actions case, new actions are appended to the sequence rather than
7381 2013-01-04 Robert Dewar <dewar@adacore.com>
7383 * gnat_ugn.texi: Document -gnatw.d/w.D (does no apply in VMS mode).
7384 * usage.adb: Add lines for -gnatw.d/w.D switches.
7385 * warnsw.adb: Minor fixes (some missing cases of setting
7386 Warning_Doc_Switch). Reject -gnatw.d and -gnatw.D in VMS mode.
7388 2013-01-04 Robert Dewar <dewar@adacore.com>
7390 * exp_util.adb (Remove_Side_Effects): Make sure scope suppress
7391 is restored on exit.
7393 2013-01-04 Robert Dewar <dewar@adacore.com>
7395 * usage.adb: Document -gnateF (check overflow for predefined Float).
7397 2013-01-04 Robert Dewar <dewar@adacore.com>
7399 * sem_res.adb (Resolve_Type_Conversion): Remove incorrect
7400 prevention of call to Apply_Type_Conversion_Checks, which resulted
7401 in missing check flags in formal mode.
7403 2013-01-04 Vincent Celier <celier@adacore.com>
7405 * makeutl.ads (Db_Switch_Args): New table used by gprbuild.
7406 * prj-conf.adb (Check_Builder_Switches): Check for switches
7407 --config= (Get_Db_Switches): New procedure to get the --db
7408 switches so that they are used when invoking gprconfig in
7410 (Do_Autoconf): When invoking gprconfig, use the --db switches, if any.
7412 2013-01-04 Pascal Obry <obry@adacore.com>
7414 * prj-nmsc.adb: Minor reformatting.
7416 2013-01-04 Vincent Celier <celier@adacore.com>
7418 * makeutl.ads (Root_Environment): New variable, moved rom
7419 gprbuild (Load_Standard_Base): New Boolean variable, moved
7421 * prj-conf.adb (Check_Builder_Switches): New procedure to check
7422 for switch --RTS in package Builder. If a runtime specified
7423 by --RTS is a relative path name, but not a base name, then
7424 find the path on the Project Search Path.
7425 (Do_Autoconf): Call Check_Builder_Switches.
7426 (Locate_Runtime): New procedure, moved from gprbuild, to get the
7427 absolute paths of runtimes when they are not specified as a base name.
7428 * prj-conf.ads (Locate_Runtime): New procedure, moved from gprbuild.
7430 2013-01-04 Ed Schonberg <schonberg@adacore.com>
7432 * sem_ch3.adb (Build_Private_Derived_Type): Set
7433 Has_Private_Ancestor on type derived from an untagged private
7434 type whose full view has discriminants
7435 * sem_aggr.adb (Resolve_Record_Aggregate): Reject non-extension
7436 aggregate for untagged record type with private ancestor.
7438 2013-01-04 Thomas Quinot <quinot@adacore.com>
7440 * sem_elab.adb, sem_ch3.adb: Minor reformatting.
7442 2013-01-04 Robert Dewar <dewar@adacore.com>
7444 * table.adb: Minor reformatting.
7446 2013-01-04 Ed Schonberg <schonberg@adacore.com>
7448 * sem_ch10.adb (Check_Redundant_Withs): A with_clause that does
7449 not come from source does not generate a warning for redundant
7452 2013-01-04 Hristian Kirtchev <kirtchev@adacore.com>
7454 * aspects.adb, aspects.ads: Add Aspect_Global to all relevant tables.
7455 * par-prag.adb: Add pragma Global to the list of pragmas that
7456 do not need special processing by the parser.
7457 * sem_ch13.adb (Analyze_Aspect_Specifications): Convert aspect
7458 Global into a pragma without any form of legality checks. The
7459 work is done by Analyze_Pragma. The aspect and pragma are both
7460 marked as needing delayed processing. Insert the corresponding
7461 pragma of aspect Abstract_State in the visible declarations of the
7463 (Check_Aspect_At_Freeze_Point): Aspect Global
7464 does not need processing even though it is marked as delayed.
7465 Alphabetize the list on aspect names.
7466 * sem_prag.adb: Add a value for pragma Global in table Sig_Flags.
7467 (Analyze_Pragma): Add ??? comment about the grammar of pragma
7468 Abstract_State. Move the error location from the pragma to the
7469 state to improve the quality of error placement. Add legality
7470 checks for pragma Global.
7471 * snames.ads-tmpl Add the following specially recognized names
7473 2013-01-04 Eric Botcazou <ebotcazou@adacore.com>
7475 * sem_ch3.adb: Fix minor typo.
7477 2013-01-04 Ed Schonberg <schonberg@adacore.com>
7479 * par-ch13.adb (Aspect_Specifications_Present): In Strict mode,
7480 accept an aspect name followed by a comma, indicating a defaulted
7483 2013-01-04 Joel Brobecker <brobecker@adacore.com>
7485 * gnat_ugn.texi: Document procedure to codesign GDB on Darwin.
7486 Update doc on gnattest --separates switch.
7488 2013-01-04 Thomas Quinot <quinot@adacore.com>
7490 * s-chepoo.ads: Minor reformatting.
7492 2013-01-04 Arnaud Charlet <charlet@adacore.com>
7494 * usage.adb: Remove mention of -gnatN in usage.
7496 2013-01-04 Robert Dewar <dewar@adacore.com>
7498 * exp_prag.adb, gnatcmd.adb, exp_util.adb, table.adb, sem_prag.adb,
7499 freeze.adb, sem_ch4.adb, sem_warn.adb, opt.ads, exp_aggr.adb,
7500 prj-conf.adb, sem_ch13.adb: Minor reformatting.
7502 2013-01-04 Thomas Quinot <quinot@adacore.com>
7504 * sinfo.ads: Minor documentation update.
7506 2013-01-04 Thomas Quinot <quinot@adacore.com>
7508 * sem_ch3.adb, einfo.adb (Analyze_Object_Declaration): Do not set Ekind
7509 before resolving initialization expression.
7511 2013-01-04 Hristian Kirtchev <kirtchev@adacore.com>
7513 * checks.adb (Generate_Index_Checks): Delay the generation of
7514 the check for an indexed component where the prefix mentions
7515 Loop_Entry until the attribute has been properly expanded.
7516 * exp_ch5.adb (Expand_Loop_Entry_Attributes): Perform minor
7517 decoration of the constant that captures the value of Loop_Entry's
7518 prefix at the entry point into a loop. Generate index checks
7519 for an attribute reference that has been transformed into an
7522 2013-01-04 Thomas Quinot <quinot@adacore.com>
7524 * exp_prag.adb, exp_util.adb, exp_util.ads, freeze.adb, exp_aggr.adb,
7525 sem_ch13.adb (Exp_Aggr.Collect_Initialization_Statements): Nothing to
7526 do if Obj is already frozen.
7527 (Exp_Util.Find_Init_Call): Rename to...
7528 (Exp_Util.Remove_Init_Call): New subprogram, renamed from
7529 Find_Init_Call. Remove the initialization call from the enclosing
7530 list if found, and if it is from an Initialization_Statements
7531 attribute, reset it.
7532 (Exp_Util.Append_Freeze_Action): Minor code reorganization.
7533 (Exp_Util.Append_Freeze_Actions): Ensure a freeze node has been
7534 allocated (as is already done in Append_Freeze_Action).
7535 (Freeze.Freeze_Entity): For an object with captured
7536 Initialization_Statements and non-delayed freezeing, unwrap the
7537 initialization statements and insert and them directly in the
7539 (Sem_Ch13.Check_Address_Clause): For an object
7540 with Initialization_Statements and an address clause, unwrap the
7541 initialization statements when moving them to the freeze actions.
7543 2013-01-03 Pascal Obry <obry@adacore.com>
7545 * prj-attr.adb, projects.texi, snames.ads-tmpl: Add package remote and
7546 corresponding attibutes.
7548 2013-01-03 Thomas Quinot <quinot@adacore.com>
7550 * exp_aggr.adb: Minor comment improvement.
7552 2013-01-03 Hristian Kirtchev <kirtchev@adacore.com>
7554 * aspects.adb, aspects.ads: Add Aspect_Abstract_State to all the
7556 * einfo.ads, einfo.adb: Add Integrity_Level and Refined_State to
7557 the description of fields (Abstract_States): New routine.
7558 (Integrity_Level): New routine.
7559 (Has_Property): New routine.
7560 (Is_Input_State): New routine.
7561 (Is_Null_State): New routine.
7562 (Is_Output_State): New routine.
7563 (Is_Volatile_State): New routine.
7564 (Refined_State): New routine.
7565 (Set_Abstract_States): New routine.
7566 (Set_Integrity_Level): New routine.
7567 (Set_Refined_State): New routine.
7568 (Write_Field8_Name): Add proper output for E_Abstract_State.
7569 (Write_Field9_Name): Add proper output for E_Abstract_State.
7570 (Write_Field25_Name): Add proper output for E_Package.
7571 * lib-xref.ads: Add new letter for an abstract state.
7572 * par-prag.adb: Add pragma Abstract_State to the list of pragma
7573 that do not need special processing by the parser.
7574 * sem_ch13.adb (Analyze_Aspect_Specifications): Convert
7575 aspect Abstract_State into a pragma without any form
7576 of legality checks. The work is done by Analyze_Pragma.
7577 (Check_Aspect_At_Freeze_Point): Aspect Abstract_State does not
7578 require delayed analysis.
7579 * sem_prag.adb: Add a value for pragma Abstract_State in table
7581 (Analyze_Pragma): Add legality checks for pragma
7582 Abstract_State. Analysis of individual states introduces a state
7583 abstraction entity into the visibility chain.
7584 * snames.ads-tmpl: Add new names for abstract state and
7585 integrity. Add new pragma id for abstract state.
7587 2013-01-03 Bob Duff <duff@adacore.com>
7589 * table.adb (Reallocate): Calculate new Length in
7590 Long_Integer to avoid overflow.
7592 2013-01-03 Thomas Quinot <quinot@adacore.com>
7594 * sem_ch3.adb, sinfo.ads, freeze.adb, sem_ch4.adb, exp_aggr.adb
7595 (Sem_Ch3.Analyze_Object_Declaration): Set Ekind early so that
7596 it is set properly when expanding the initialization expression.
7597 (Freeze.Check_Address_Clause): Transfer initialization expression
7598 to an assignment in the freeze actions, so that the object is
7599 initialized only after being elaborated by GIGI.
7600 (Sinfo (comments), Sem_Ch4.Analyze_Expression_With_Actions): Allow
7601 a Null_Statement as the expression in an Expression_With_Actions.
7602 (Exp_Aggr.Collect_Initialization_Statements): New subprogram
7603 shared by expansion of record and array aggregates, used to
7604 capture statements for an aggregate used to initalize an object
7605 into an Expression_With_Actions (which acts as a container for
7607 (Exp_Aggr.Convert_Aggr_In_Obj_Decl): Use the above to
7608 capture initialization statements, instead of the previously
7609 existing loop which left freeze nodes out of the capturing
7610 construct (causing out of order elaboration crashes in GIGI).
7611 (Exp_Aggr.Expand_Array_Aggregate): Use the above to capture
7612 initialization statements (this was previously not done for
7613 arrays). Also do not unconditionally prevent in place expansion
7614 for an object with address clause.
7616 2013-01-03 Thomas Quinot <quinot@adacore.com>
7618 * gnat_rm.texi, freeze.adb (Check_Component_Storage_Order): Check that
7619 a record extension has the same scalar storage order as the parent type.
7621 2013-01-03 Thomas Quinot <quinot@adacore.com>
7623 * exp_ch4.adb: Add comment.
7625 2013-01-03 Vincent Celier <celier@adacore.com>
7627 * prj.adb: Minor spelling error correction in comment.
7629 2013-01-03 Vincent Celier <celier@adacore.com>
7631 * gnatcmd.adb (GNATCmd): If a single main has been specified
7632 as an absolute path, use its simple file name to find specific
7633 switches, instead of the absolute path.
7635 2013-01-03 Javier Miranda <miranda@adacore.com>
7637 * sem_warn.adb (Warn_On_Overlapping_Actuals): For overlapping
7638 parameters that are record types or array types generate warnings
7639 only compiling under -gnatw.i
7640 * opt.ads (Extensions_Allowed): Restore previous documentation.
7642 2013-01-03 Vincent Celier <celier@adacore.com>
7644 * prj-conf.adb (Do_Autoconf): If Target is specified in the
7645 main project, but not on the command line, use the Target in
7646 the project to invoke gprconfig in auto-configuration.
7647 * makeutl.ads (Default_Config_Name): New constant String.
7649 2013-01-03 Arnaud Charlet <charlet@adacore.com>
7651 * usage.adb: Minor: fix typo in usage.
7653 2013-01-03 Thomas Quinot <quinot@adacore.com>
7655 * sem_ch13.adb (Analyze_Record_Representation_Clause): Reject
7656 an illegal component clause for an inherited component in a
7659 2013-01-03 Emmanuel Briot <briot@adacore.com>
7661 * xref_lib.adb (Parse_Identifier_Info): Fix handling of arrays, which
7662 have information in the ALI file for both the index and the component
7665 2013-01-03 Emmanuel Briot <briot@adacore.com>
7667 * projects.texi: Fix error in documenting the project path
7668 computed for an aggregate project.
7670 2013-01-03 Javier Miranda <miranda@adacore.com>
7672 * sem_warn.adb (Warn_On_Overlapping_Actuals): Adding documentation
7673 plus restricting the functionality of this routine to cover the
7674 cases described in the Ada 2012 reference manual. The previous
7675 extended support is now available under -gnatX.
7676 * s-tassta.adb (Finalize_Global_Tasks): Addition of a dummy
7677 variable to call Timed_Sleep. Required to avoid warning on
7678 overlapping out-mode actuals.
7679 * opt.ads (Extensions_Allowed): Update documentation.
7681 2013-01-03 Tristan Gingold <gingold@adacore.com>
7683 * s-arit64.ads: Use Multiply_With_Ovflo_Check as __gnat_mulv64.
7685 * gcc-interface/Makefile.in: Remove reference to arit64.c.
7687 2013-01-03 Thomas Quinot <quinot@adacore.com>
7689 * checks.adb, checks.ads (Apply_Address_Clause_Check): The check must
7690 be generated at the start of the freeze actions for the entity, not
7691 before (or after) the freeze node.
7693 2013-01-03 Thomas Quinot <quinot@adacore.com>
7695 * exp_aggr.adb (Exp_Aggr.Convert_Aggregate_In_Obj_Decl):
7696 Reorganize code to capture initialization statements in a block,
7697 so that freeze nodes are excluded from the captured block.
7699 2013-01-03 Thomas Quinot <quinot@adacore.com>
7701 * exp_ch11.adb: Minor reformatting.
7703 2013-01-03 Thomas Quinot <quinot@adacore.com>
7705 * exp_util.adb, einfo.adb, einfo.ads, freeze.adb, exp_aggr.adb,
7706 sem_ch13.adb (Einfo.Initialization_Statements,
7707 Einfo.Set_Initialization_Statements): New entity attribute
7709 (Exp_Util.Find_Init_Call): Handle case of an object initialized
7710 by an aggregate converted to a block of assignment statements.
7711 (Freeze.Check_Address_Clause): Do not clear Has_Delayed_Freeze
7712 even for objects that require a constant address, because the
7713 address expression might involve entities that have yet to be
7714 elaborated at the point of the object declaration.
7715 (Exp_Aggr.Convert_Aggregate_In_Obj_Decl): For a type that does
7716 not require a transient scope, capture the assignment statements
7717 in a block so that they can be moved down after elaboration of
7718 an address clause if needed.
7719 (Sem_Ch13.Check_Constant_Address_Clause.Check_Expr_Constants,
7720 case N_Unchecked_Conversion): Do not replace operand subtype with
7721 its base type as this violates a GIGI invariant if the operand
7722 is an identifier (in which case the etype of the identifier
7723 is expected to be equal to that of the denoted entity).
7725 2013-01-03 Javier Miranda <miranda@adacore.com>
7727 * sem_util.ads, sem_util.adb (Denotes_Same_Object): Extend the
7728 functionality of this routine to cover cases described in the Ada 2012
7731 2013-01-03 Ed Schonberg <schonberg@adacore.com>
7733 * sem_elab.adb (Set_Elaboration_Constraint): Handle properly
7734 a 'Access attribute reference when the subprogram is called
7737 2013-01-03 Arnaud Charlet <charlet@adacore.com>
7739 * s-tpobop.adb (PO_Do_Or_Queue): Refine assertion, since a
7740 select statement may be called from a controlled (e.g. Initialize)
7741 operation and have abort always deferred.
7743 2013-01-03 Robert Dewar <dewar@adacore.com>
7745 * sem_ch8.adb, einfo.ads, einfo.adb: Minor code reorganization.
7747 2013-01-03 Javier Miranda <miranda@adacore.com>
7749 * exp_ch3.adb (Make_Controlling_Function_Wrappers): Exclude
7750 internal entities associated with interfaces and add minimum
7751 decoration to the defining entity of the generated wrapper to
7752 allow overriding interface primitives.
7753 * sem_disp.ads (Override_Dispatching_Operation): Addition of a
7754 new formal (Is_Wrapper).
7755 * sem_disp.adb (Override_Dispatching_Operation): When overriding
7756 interface primitives the new formal helps identifying that the
7757 new operation is not fully decorated.
7759 2013-01-03 Thomas Quinot <quinot@adacore.com>
7761 * sem_ch7.adb, sem_ch10.adb, einfo.adb, einfo.ads, sem_ch12.adb,
7762 rtsfind.adb, sem_elab.adb, sem_ch4.adb, sem_ch8.adb
7763 (Einfo.Is_Visible_Child_Unit, Einfo.Set_Is_Visible_Child_Unit):
7764 Rename to Is_Visible_Lib_Unit, Set_Is_Visible_Lib_Unit, and
7765 update spec accordingly (now also applies to root library units).
7766 (Sem_Ch10.Analyze_Subunit.Analyze_Subunit_Context): Toggle above flag
7767 on root library units, not only child units.
7768 (Sem_Ch10.Install[_Limited]_Withed_Unit): Same.
7769 (Sem_Ch10.Remove_Unit_From_Visibility): Reset Is_Visible_Lib_Unit
7770 even for root library units.
7771 (Sem_Ch8.Find_Expanded_Name): A selected component form whose prefix is
7772 Standard is an expanded name for a root library unit.
7774 2013-01-03 Thomas Quinot <quinot@adacore.com>
7776 * exp_ch3.adb: Minor reformatting.
7778 2013-01-03 Olivier Hainque <hainque@adacore.com>
7780 * tracebak.c: Reinstate changes to support ppc-lynx178.
7782 2013-01-03 Ed Schonberg <schonberg@adacore.com>
7784 * atree.ads: Minor reformatting and documentation enhancement.
7786 2013-01-03 Ed Schonberg <schonberg@adacore.com>
7788 * exp_ch3.adb (Expand_N_Object_Declaration): If the object has
7789 a class-wide type and a renaming declaration is created for it,
7790 preserve entity chain, which already contains generated internal
7791 types. This ensures that freezing actions are properly generated
7792 for all objects declared subsequently in the same scope, and
7793 that debugging information is generated for them.
7794 * sem_util.adb, sem_util.ads (we): New debugging routine, to
7795 display entity chain of a given scope.
7797 2013-01-03 Robert Dewar <dewar@adacore.com>
7799 * exp_intr.adb: Minor reformatting.
7801 2013-01-03 Robert Dewar <dewar@adacore.com>
7803 * einfo.adb: Minor reformatting.
7805 2013-01-03 Pascal Obry <obry@adacore.com>
7807 * adaint.c, adaint.h (__gnat_get_module_name): Removed.
7808 (__gnat_is_module_name_supported): Removed.
7809 * s-win32.ads: Add some needed definitions.
7810 * g-trasym.ads: Update comments.
7812 2013-01-03 Robert Dewar <dewar@adacore.com>
7814 * layout.adb (Set_Composite_Alignment): Fix problems of
7815 interactions with Optimize_Alignment set to Space.
7817 2013-01-03 Thomas Quinot <quinot@adacore.com>
7819 * exp_disp.adb: Minor reformatting.
7821 2013-01-02 Richard Biener <rguenther@suse.de>
7824 * gcc-interface/Makefile.in: Add $(GMPINC) to includes.
7826 2013-01-02 Thomas Quinot <quinot@adacore.com>
7828 * exp_intr.adb (Expand_Dispatching_Constructor_Call): Remove
7829 side effects from Tag_Arg early, doing it too late may cause a
7830 crash due to inconsistent Parent link.
7831 * sem_ch8.adb, einfo.ads: Minor reformatting.
7833 2013-01-02 Robert Dewar <dewar@adacore.com>
7835 * einfo.ads, einfo.adb (Has_Independent_Components): New flag.
7836 * freeze.adb (Size_Known): We do not know the size of a packed
7837 record if it has atomic components, by reference type components,
7838 or independent components.
7839 * sem_prag.adb (Analyze_Pragma, case Independent_Components): Set new
7840 flag Has_Independent_Components.
7842 2013-01-02 Yannick Moy <moy@adacore.com>
7844 * opt.ads (Warn_On_Suspicious_Contract): Set to True by default.
7845 * usage.adb (Usage): Update usage message.
7847 2013-01-02 Pascal Obry <obry@adacore.com>
7849 * adaint.c (__gnat_is_module_name_supported): New constant.
7851 2013-01-02 Ed Schonberg <schonberg@adacore.com>
7853 * sem_attr.adb (Check_Array_Type): Reject an attribute reference on an
7854 array whose component type does not have a completion.
7856 2013-01-02 Geert Bosch <bosch@adacore.com>
7858 * a-nllcef.ads, a-nlcefu.ads, a-nscefu.ads: Make Pure.
7860 2013-01-02 Robert Dewar <dewar@adacore.com>
7862 * par_sco.adb: Minor reformatting.
7864 2013-01-02 Javier Miranda <miranda@adacore.com>
7866 * sem_aggr.adb (Resolve_Array_Aggregate): Remove dead code.
7868 2013-01-02 Olivier Hainque <hainque@adacore.com>
7870 * a-exctra.ads (Get_PC): New function.
7872 2013-01-02 Thomas Quinot <quinot@adacore.com>
7874 * sem_ch8.adb: Minor reformatting.
7876 2013-01-02 Thomas Quinot <quinot@adacore.com>
7878 * sem_ch7.adb: Minor reformatting.
7880 2013-01-02 Thomas Quinot <quinot@adacore.com>
7882 * freeze.adb (Check_Component_Storage_Order): Do not crash on
7885 2013-01-02 Robert Dewar <dewar@adacore.com>
7887 * gnat1drv.adb, targparm.adb, targparm.ads: Minor name change: add
7888 On_Target to Atomic_Sync_Default.
7890 2013-01-02 Robert Dewar <dewar@adacore.com>
7892 * sem_warn.adb (Warn_On_Known_Condition): Suppress warning for
7893 comparison of attribute result with constant
7894 * a-ststio.adb, s-direio.adb, s-rannum.adb: Remove unnecessary pragma
7895 Warnings (Off, "..");
7897 2013-01-02 Yannick Moy <moy@adacore.com>
7899 * sem_prag.ads: Minor correction of comment.
7901 2013-01-02 Thomas Quinot <quinot@adacore.com>
7903 * par_sco.adb (Traverse_Package_Declaration): The first
7904 declaration in a nested package is dominated by the preceding
7905 declaration in the enclosing scope.
7907 2013-01-02 Pascal Obry <obry@adacore.com>
7909 * adaint.c, adaint.h (__gnat_get_module_name): Return the actual
7910 module containing a given address.
7912 2013-01-02 Thomas Quinot <quinot@adacore.com>
7914 * sem_ch3.adb: Minor reformatting.
7916 2013-01-02 Pascal Obry <obry@adacore.com>
7918 * cstreams.c (__gnat_ftell64): New routine. Use _ftelli64 on
7919 Win64 and default to ftell on other platforms.
7920 (__gnat_fsek64): Likewise.
7921 * i-cstrea.ads: Add fssek64 and ftell64 specs.
7922 * s-crtl.ads: Likewise.
7923 * a-ststio.adb, s-direio.adb (Size): Use 64 bits version when required.
7924 (Set_Position): Likewise.
7926 2013-01-02 Thomas Quinot <quinot@adacore.com>
7928 * par_sco.adb: Generate X SCOs for default expressions in
7929 subprogram body stubs. Do not generate any SCO for package,
7930 task, or protected body stubs.
7932 2013-01-02 Ed Schonberg <schonberg@adacore.com>
7934 * sem_ch3.adb: Further improvement to ASIS mode for anonymous
7935 access to protected subprograms.
7937 2013-01-02 Robert Dewar <dewar@adacore.com>
7939 * par_sco.adb, vms_data.ads: Minor reformatting.
7941 2013-01-02 Thomas Quinot <quinot@adacore.com>
7943 * par_sco.adb (Traverse_Declarations_Or_Statement): Function
7944 form, returning value of Current_Dominant upon exit, for chaining
7946 (Traverse_Declarations_Or_Statement.Traverse_One, case
7947 N_Block_Statement): First statement is dominated by last declaration.
7948 (Traverse_Subprogram_Or_Task_Body): Ditto.
7949 (Traverse_Package_Declaration): First private
7950 declaration is dominated by last visible declaration.
7951 (Traverse_Sync_Definition): Ditto.
7953 2013-01-02 Thomas Quinot <quinot@adacore.com>
7955 * gnat_rm.texi: Restrict the requirement for Scalar_Storage_Order
7956 matching Bit_Order to record types only, since array types do not
7959 2013-01-02 Vincent Celier <celier@adacore.com>
7961 * gnat_ugn.texi: Remove documentation of -gnateO, which is an
7963 * usage.adb: Indicate that -gnateO is an internal switch.
7965 2013-01-02 Thomas Quinot <quinot@adacore.com>
7967 * par_sco.adb: Add SCO generation for task types and single
7969 * get_scos.adb: When adding an instance table entry for a
7970 non-nested instantiation, make sure the Enclosing_Instance is
7973 2013-01-02 Hristian Kirtchev <kirtchev@adacore.com>
7975 * sem_attr.adb (Analyze_Attribute): Skip the special _Parent
7976 scope generated for subprogram inlining purposes while trying
7977 to locate the enclosing function.
7978 * sem_prag.adb (Analyze_Pragma): Preanalyze the boolean
7979 expression of pragma Postcondition when the pragma comes from
7980 source and appears inside a subprogram body.
7982 2013-01-02 Thomas Quinot <quinot@adacore.com>
7984 * switch-c.adb, fe.h, back_end.adb: Enable generation of instantiation
7985 information in debug info unconditionally when using -fdump-scos,
7986 instead of relying on a separate command line switch -fdebug-instances.
7987 * gcc-interface/Make-lang.in: Update dependencies.
7989 2013-01-02 Ed Schonberg <schonberg@adacore.com>
7991 * sem_ch12.adb: Additional refinement of predicate.
7993 2013-01-02 Vincent Celier <celier@adacore.com>
7995 * vms_data.ads: Remove incorrect spaces at end of descriptions
7996 of qualifiers for single switch.
7998 2013-01-02 Ben Brosgol <brosgol@adacore.com>
8000 * gnat_rm.texi: Minor edits / wordsmithing in section on pragma
8001 Check_Float_Overflow.
8003 2013-01-02 Thomas Quinot <quinot@adacore.com>
8005 * sprint.adb (Sprint_Node_Actual): Do not add extra parens for
8006 a conditional expression (CASE or IF expression) that already
8007 has parens. Also omit ELSE keyword for an IF expression without
8010 2013-01-02 Thomas Quinot <quinot@adacore.com>
8012 * gnat1drv.adb (Adjust_Global_Switches): Adjust back-end
8013 flag_debug_instances here, after front-end switches have been
8016 2013-01-02 Vincent Celier <celier@adacore.com>
8018 * usage.adb: Minor reformatting.
8020 2013-01-02 Arnaud Charlet <charlet@adacore.com>
8022 * opt.ads: Fix typo.
8024 2013-01-02 Thomas Quinot <quinot@adacore.com>
8026 * par_sco.adb: Generate P decision SCOs for SPARK pragmas
8027 Assume and Loop_Invariant.
8029 2013-01-02 Robert Dewar <dewar@adacore.com>
8031 * vms_data.ads: Add entry for Float_Check_Valid (-gnateF).
8032 * ug_words: Add entry for Float_Check_Overflow.
8033 * usage.adb: Minor reformatting.
8034 * gnat_ugn.texi: Add documentation for -gnateF (Check_Float_Overflow).
8036 2013-01-02 Vincent Celier <celier@adacore.com>
8038 * gnat_ugn.texi: Add documentation for switches -gnateA, -gnated,
8039 -gnateO=, -gnatet and -gnateV.
8040 * ug_words: Add qualifiers equivalent to -gnateA, -gnated,
8041 -gnatet and -gnateV.
8042 * usage.adb: Add lines for -gnatea, -gnateO and -gnatez.
8043 * vms_data.ads: Add new compiler qualifiers /ALIASING_CHECK
8044 (-gnateA), /DISABLE_ATOMIC_SYNCHRONIZATION (-gnated),
8045 /PARAMETER_VALIDITY_CHECK (-gnateV) and /TARGET_DEPENDENT_INFO
8048 2013-01-02 Robert Dewar <dewar@adacore.com>
8050 * checks.adb (Apply_Scalar_Range_Check): Implement Check_Float_Overflow.
8051 * opt.ads, opt.adb: Handle flags Check_Float_Overflow[_Config].
8052 * par-prag.adb: Add dummy entry for pragma Check_Float_Overflow.
8053 * sem_prag.adb: Implement pragma Check_Float_Overflow.
8054 * snames.ads-tmpl: Add entries for pragma Check_Float_Overflow.
8055 * switch-c.adb: Recognize -gnateF switch.
8056 * tree_io.ads: Update ASIS version number.
8057 * gnat_rm.texi: Add documentation of pragma Check_Float_Overflow.
8059 2013-01-02 Robert Dewar <dewar@adacore.com>
8061 * checks.adb, exp_ch4.adb, exp_ch6.adb, exp_ch7.adb, exp_ch9.adb,
8062 exp_disp.adb, exp_dist.adb, exp_intr.adb, exp_prag.adb, exp_util.adb,
8063 freeze.adb, gnat1drv.adb, inline.adb, layout.adb, lib-xref.adb,
8064 par-ch10.adb, par-labl.adb, par-load.adb, par-util.adb, restrict.adb,
8065 sem_ch13.adb, sem_ch4.adb, sem_ch6.adb, sem_dim.adb, sem_elab.adb,
8066 sem_res.adb, sem_warn.adb, sinput-l.adb: Add tags to warning messages.
8067 * sem_ch6.ads, warnsw.ads, opt.ads: Minor comment updates.
8069 2013-01-02 Robert Dewar <dewar@adacore.com>
8071 * err_vars.ads: Minor comment fix.
8073 2013-01-02 Ed Schonberg <schonberg@adacore.com>
8075 * sem_ch12.adb: Refine predicate.
8077 2013-01-02 Robert Dewar <dewar@adacore.com>
8079 * errout.ads: Minor comment fixes.
8080 * opt.ads: Minor comment additions.
8081 * exp_aggr.adb: Add tags to warning messages
8082 * exp_ch11.adb, exp_ch3.adb, exp_ch4.adb, exp_util.adb, sem_aggr.adb,
8083 sem_attr.adb, sem_case.adb, sem_cat.adb, sem_ch3.adb, sem_ch4.adb,
8084 sem_ch5.adb, sem_disp.adb, sem_dist.adb, sem_elab.adb, sem_eval.adb,
8085 sem_intr.adb, sem_mech.adb, sem_prag.adb, sem_res.adb, sem_util.adb,
8086 sem_warn.adb: Add tags to warning messages
8088 2013-01-02 Doug Rupp <rupp@adacore.com>
8090 * init.c [VMS] Remove subtest on reason mask for ACCVIO that is a C_E.
8092 2013-01-02 Ed Schonberg <schonberg@adacore.com>
8094 * sem_ch12.adb: Recover source name for renamed packagea.
8096 2013-01-02 Robert Dewar <dewar@adacore.com>
8098 * errout.adb (Set_Msg_Insertion_Warning): Correct typo causing
8099 tests to fail if insertion sequence is at end of message string.
8100 * opt.ads: Minor comment fixes and additions.
8101 * sem_ch7.adb, sem_ch8.adb, sem_ch9.adb, sem_ch10.adb, sem_ch11.adb,
8102 sem_ch12.adb, sem_ch13.adb: Add tags to warning messages.
8103 * sem_ch6.ads, sem_ch6.adb (Cannot_Inline): Deal with warning message
8104 tags. Add tags to warning messages.
8106 2013-01-02 Robert Dewar <dewar@adacore.com>
8108 * err_vars.ads (Warning_Doc_Switch): New flag.
8109 * errout.adb (Error_Msg_Internal): Implement new warning flag
8110 doc tag stuff (Set_Msg_Insertion_Warning): New procedure.
8111 * errout.ads: Document new insertion sequences ?? ?x? ?.x?
8112 * erroutc.adb (Output_Msg_Text): Handle ?? and ?x? warning doc
8114 * erroutc.ads (Warning_Msg_Char): New variable.
8115 (Warn_Chr): New field in error message object.
8116 * errutil.adb (Error_Msg): Set Warn_Chr in error message object.
8117 * sem_ch13.adb: Minor reformatting.
8118 * warnsw.adb: Add handling for -gnatw.d and -gnatw.D
8119 (Warning_Doc_Switch).
8120 * warnsw.ads: Add handling of -gnatw.d/.D switches (warning
8123 2013-01-02 Robert Dewar <dewar@adacore.com>
8125 * opt.ads: Minor reformatting.
8127 2013-01-02 Doug Rupp <rupp@adacore.com>
8129 * init.c: Reorganize VMS section.
8130 (scan_condtions): New function for scanning condition tables.
8131 (__gnat_handle_vms_condtion): Use actual exception name for imported
8132 exceptions vice IMPORTED_EXCEPTION.
8133 Move condition table scanning into separate function. Move formerly
8134 special handled conditions to system condition table. Use SYS$PUTMSG
8135 output to fill exception message field for formally special handled
8136 condtions, in particular HPARITH to provide more clues about cause and
8137 location then raised from the translated image.
8139 2013-01-02 Thomas Quinot <quinot@adacore.com>
8141 * sem_ch13.adb (Analyze_Aspect_Specifications): For a Pre/Post
8142 aspect that applies to a library subprogram, prepend corresponding
8143 pragma to the Pragmas_After list, in order for split AND THEN
8144 sections to be processed in the expected order.
8146 2013-01-02 Thomas Quinot <quinot@adacore.com>
8148 * exp_prag.adb (Expand_Pragma_Check): The statements generated
8149 for the pragma must have the sloc of the pragma, not the
8150 sloc of the condition, otherwise this creates anomalies in the
8151 generated debug information that confuse coverage analysis tools.
8153 2013-01-02 Thomas Quinot <quinot@adacore.com>
8155 * sem_ch13.adb: Minor reformatting.
8157 2013-01-02 Arnaud Charlet <charlet@adacore.com>
8159 * g-excact.ads (Core_Dump): Clarify that this subprogram does
8160 not dump cores under Windows.
8162 2013-01-02 Ed Schonberg <schonberg@adacore.com>
8164 * sem_ch8.adb (Analyze_Primitive_Renamed_Operation): The prefixed
8165 view of a subprogram has convention Intrnnsic, and a renaming
8166 of a prefixed view cannot be the prefix of an Access attribute.
8168 2013-01-02 Robert Dewar <dewar@adacore.com>
8170 * restrict.adb: Minor reformatting.
8172 2013-01-02 Thomas Quinot <quinot@adacore.com>
8174 * exp_prag.adb: Minor reformatting.
8176 2013-01-02 Ed Schonberg <schonberg@adacore.com>
8178 * sem_ch12.adb (Get_Associated_Node): If the node is an
8179 identifier that denotes an unconstrained array in an object
8180 declaration, it is rewritten as the name of an anonymous
8181 subtype whose bounds are given by the initial expression in the
8182 declaration. When checking whether that identifier is global
8183 reference, use the original node, not the local generated subtype.
8185 2013-01-02 Olivier Hainque <hainque@adacore.com>
8187 * tracebak.c: Revert previous change, incomplete.
8189 2013-01-02 Ed Schonberg <schonberg@adacore.com>
8191 * sem_ch13.adb (Analyze_Aspect_Specifications): If the aspect
8192 appears on a subprogram body that acts as a spec, place the
8193 corresponding pragma in the declarations of the body, so that
8194 e.g. pre/postcondition checks can be generated appropriately.
8196 2013-01-02 Robert Dewar <dewar@adacore.com>
8198 * sem_ch3.adb: Minor reformatting and code reorganization.
8200 2013-01-02 Vincent Celier <celier@adacore.com>
8202 * switch-m.adb (Normalize_Compiler_Switches): Record the
8203 complete switch -fstack-check=specific instead of its shorter
8204 alias -fstack-check.
8206 2013-01-02 Ed Schonberg <schonberg@adacore.com>
8208 * sem_ch3.adb (Derive_Subprogram): Enforce RM 6.3.1 (8):
8209 if the derived type is a tagged generic formal type with
8210 unknown discriminants, the inherited operation has convention
8211 Intrinsic. As such, the 'Access attribute cannot be applied to it.
8213 2013-01-02 Thomas Quinot <quinot@adacore.com>
8215 * sem_attr.adb: Minor reformatting.
8217 2013-01-02 Thomas Quinot <quinot@adacore.com>
8219 * par_sco.adb: Add SCO generation for S of protected types and
8220 single protected object declarations.
8222 2013-01-02 Robert Dewar <dewar@adacore.com>
8224 * sem_eval.adb, osint.ads: Minor reformatting.
8226 2013-01-02 Hristian Kirtchev <kirtchev@adacore.com>
8228 * sem_prag.adb (Analyze_Pragma): Check the legality of pragma Assume.
8230 2013-01-02 Thomas Quinot <quinot@adacore.com>
8232 * sem_eval.adb (Compile_Time_Compare): For static operands, we
8233 can perform a compile time comparison even if in preanalysis mode.
8235 2013-01-02 Thomas Quinot <quinot@adacore.com>
8237 * par_sco.adb (SCO_Record): Always use
8238 Traverse_Declarations_Or_Statements to process the library level
8239 declaration, so that SCOs are properly generated for its aspects.
8241 2013-01-02 Thomas Quinot <quinot@adacore.com>
8243 * scos.ads (In_Decision): Add missing entry for 'a'.
8244 * sem_prag.adb (Analyze_Pragma, case pragma Check): Omit
8245 call to Set_SCO_Pragma_Enabled for Invariant and Predicate.
8246 * sem_ch13.adb: Minor comment update.
8248 Copyright (C) 2013 Free Software Foundation, Inc.
8250 Copying and distribution of this file, with or without modification,
8251 are permitted in any medium without royalty provided the copyright
8252 notice and this notice are preserved.