1 2013-11-29 Eric Botcazou <ebotcazou@adacore.com>
5 * s-osinte-hpux.ads (timespec): Change type of tv_nsec field to time_t.
6 * s-osinte-kfreebsd-gnu.ads (timespec): Likewise.
7 * s-osinte-solaris-posix.ads (timespec): Likewise.
9 2013-11-23 Eric Botcazou <ebotcazou@adacore.com>
11 * gcc-interface/trans.c (Loop_Statement_to_gnu): Set TREE_SIDE_EFFECTS
12 on the conditional expression directly.
14 2013-11-22 Andrew MacLeod <amacleod@redhat.com>
16 * gcc-interface/trans.c: Add required include files from gimple.h.
18 2013-11-22 David Malcolm <dmalcolm@redhat.com>
20 * gcc-interface/utils2.c (build_call_raise): Remove use of
22 (build_call_raise_range): Likewise.
23 (build_call_raise_column): Likewise.
25 2013-11-20 Kenneth Zadeck <zadeck@naturalbridge.com>
26 Mike Stump <mikestump@comcast.net>
27 Richard Sandiford <rdsandiford@googlemail.com>
29 * gcc-interface/cuintp.c (UI_From_gnu): Use tree_to_shwi.
30 * gcc-interface/decl.c (gnat_to_gnu_entity): Use tree_to_uhwi.
31 * gcc-interface/utils.c (make_packable_type): Likewise.
33 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
35 * gcc-interface/cuintp.c (UI_From_gnu): Use tree_to_shwi rather than
38 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
40 * gcc-interface/decl.c, gcc-interface/utils.c, gcc-interface/utils2.c:
41 Replace tree_low_cst (..., 1) with tree_to_uhwi throughout.
43 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
45 * gcc-interface/cuintp.c: Update comments to refer to
46 tree_fits_shwi_p rather than host_integerp.
47 * gcc-interface/decl.c (gnat_to_gnu_entity): Use tree_fits_uhwi_p
48 rather than host_integerp.
49 * gcc-interface/utils.c (rest_of_record_type_compilation): Likewise.
51 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
53 * gcc-interface/decl.c, gcc-interface/misc.c, gcc-interface/utils.c:
54 Replace host_integerp (..., 1) with tree_fits_uhwi_p throughout.
56 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
58 * gcc-interface/cuintp.c: Replace host_integerp (..., 0) with
59 tree_fits_shwi_p throughout.
61 2013-11-18 Eric Botcazou <ebotcazou@adacore.com>
63 * gcc-interface/trans.c (TARGET_ABI_OPEN_VMS): Delete as redundant.
65 2013-11-18 Eric Botcazou <ebotcazou@adacore.com>
67 * gcc-interface/trans.c (Call_to_gnu): For an Out parameter passed by
68 copy and that don't need to be copied in, only evaluate its address.
70 2013-11-18 Eric Botcazou <ebotcazou@adacore.com>
72 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Deal with an
73 error mark as renamed object in type annotating mode.
75 2013-11-15 H.J. Lu <hongjiu.lu@intel.com>
78 * s-linux-x32.ads: New file.
79 * s-osprim-x32.adb: Likewise.
80 * s-linux.ads (time_t): New type.
81 * s-linux-alpha.ads (time_t): Likewise.
82 * s-linux-hppa.ads (time_t): Likewise.
83 * s-linux-mipsel.ads (time_t): Likewise.
84 * s-linux-sparc.ads (time_t): Likewise.
85 * s-osinte-linux.ads (time_t): Mark it private. Replace long
86 with System.Linux.time_t.
87 (timespec): Replace long with time_t.
88 * s-osinte-posix.adb (To_Timespec): Likewise.
89 * s-taprop-linux.adb (timeval): Replace C.long with
90 System.OS_Interface.time_t.
91 * gcc-interface/Makefile.in (LIBGNAT_TARGET_PAIRS): Replace
92 s-linux.ads with s-linux-x32.ads, s-osprim-posix.adb with
93 s-osprim-x32.adb for x32.
95 2013-11-14 H.J. Lu <hongjiu.lu@intel.com>
97 * gcc-interface/trans.c: Include gimple.h and pointer-set.h.
99 2013-11-14 Diego Novillo <dnovillo@google.com>
101 * gcc-interface/decl.c: Include stringpool.h
102 Include stor-layout.h
103 * gcc-interface/misc.c: Include stor-layout.h
105 * gcc-interface/trans.c: Include stringpool.h
106 Include stor-layout.h
109 * gcc-interface/utils.c: Include stringpool.h
110 Include stor-layout.h
113 * gcc-interface/utils2.c: Include stringpool.h
114 Include stor-layout.h
118 2013-11-12 Andrew MacLeod <amacleod@redhat.com>
120 * gcc-interface/trans.c: Include gimplify.h.
122 2013-11-11 Tristan Gingold <gingold@adacore.com>
123 Eric Botcazou <ebotcazou@adacore.com>
125 * gcc-interface/utils2.c (gnat_build_constructor): Also set the flag
126 CONSTRUCTOR_NO_CLEARING on the constructor.
128 2013-10-30 Sharad Singhai <singhai@google.com>
130 * gnat_ugn.texi: Remove option description for PR middle-end/58134.
132 2013-10-29 David Malcolm <dmalcolm@redhat.com>
134 * gcc-interface/trans.c (finalize_nrv): Update for conversion of
135 symtab types to a true class hierarchy.
136 * gcc-interface/utils.c (gnat_write_global_declarations): Likewise.
138 2013-10-28 Trevor Saunders <tsaunders@mozilla.com>
140 * gcc-interface/decl.c (components_to_record): Adjust stack vector.
142 2013-10-24 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
144 * gcc-interface/Make-lang.in (ADA_DEPS): Fix quoting.
146 2013-10-19 Thomas Quinot <quinot@adacore.com>
148 * gcc-interface/Makefile.in: Use canonical absolute path to refer to
149 the top source directory and to the libgcc subidrectories.
151 2013-10-19 Eric Botcazou <ebotcazou@adacore.com>
153 * gcc-interface/utils.c (scale_by_factor_of): New function.
154 (rest_of_record_type_compilation): Use scale_by_factor_of in order to
155 scale the original offset for both rounding cases; in the second case,
156 take into accout the addend to compute the alignment. Tidy up.
158 2013-10-19 Eric Botcazou <ebotcazou@adacore.com>
160 * gcc-interface/cuintp.c: Remove useless include directives.
161 (build_cst_from_int): Use standard predicate.
162 (UI_To_gnu): Simplify.
163 (UI_From_gnu): Fix formatting.
164 * gcc-interface/trans.c (post_error): Likewise.
165 (post_error_ne): Likewise.
167 2013-10-19 Eric Botcazou <ebotcazou@adacore.com>
169 * gcc-interface/utils.c (gnat_set_type_context): New function.
170 (gnat_pushdecl): Use it to set the context of the type.
172 2013-10-17 Hristian Kirtchev <kirtchev@adacore.com>
174 * sem_prag.adb (Check_Dependency_Clause):
175 Recognize the scenario where successful clause matching has
176 depleted the available refinement items and the clause to match
177 technically refines to null => null.
179 2013-10-17 Tristan Gingold <gingold@adacore.com>
181 * exp_prag.adb (Expand_Pragma_Import_Or_Interface): Specify
182 External_Name instead of Link_Name for the RTTI declaration.
184 2013-10-17 Robert Dewar <dewar@adacore.com>
186 * sem_prag.adb (Record_Possible_Body_Reference): Fix test for
188 (Add_Constituent): Merged into Check_Refined_Global_Item.
189 (Check_Matching_Constituent): A constituent that has the proper Part_Of
190 option and comes from a private child or a sibling is now collected.
191 (Check_Matching_Modes): Merged into Check_Refined_Global_Item.
192 (Check_Refined_Global_Item): Code cleanup.
193 (Collect_Constituent): New routine.
194 (Inconsistent_Mode_Error): Moved out from Check_Matching_Modes.
196 2013-10-17 Ed Schonberg <schonberg@adacore.com>
198 * freeze.adb (Check_Current_Instance, Process): Add RM reference
199 and mention immutably limited types, when the current instance
200 is illegal in Ada 2012.
202 2013-10-17 Ed Schonberg <schonberg@adacore.com>
204 * sem_warn.adb (Check_Unused_Withs): If the main unit is a
205 subunit, apply the check to the units mentioned in its context
206 only. This provides additional warnings on with_clauses that
209 2013-10-17 Hristian Kirtchev <kirtchev@adacore.com>
211 * sem_ch3.adb (Analyze_Declarations): Emit an
212 error message concerning state refinement when the spec defines at
213 least one non-null abstract state and the body's SPARK mode is On.
214 (Requires_State_Refinement): New routine.
216 2013-10-17 Robert Dewar <dewar@adacore.com>
218 * sem_ch7.ads: Comment fixes.
220 2013-10-17 Robert Dewar <dewar@adacore.com>
222 * sem_ch7.adb (Analyze_Package_Specification): Remove circuit
223 for ensuring that a package spec requires a body for some other
224 reason than that it contains the declaration of an abstract state.
226 2013-10-17 Tristan Gingold <gingold@adacore.com>
228 * exp_ch11.adb (Expand_N_Raise_Expression): Fix call of
229 Possible_Local_Raise.
231 2013-10-17 Thomas Quinot <quinot@adacore.com>
233 * exp_pakd.adb (Expand_Bit_Packed_Element_Set): Unchecked
234 conversion of Or_Rhs to Etype of New_Rhs is required only when
235 the latter is the result of a byte swap operation.
237 2013-10-17 Thomas Quinot <quinot@adacore.com>
239 * exp_dist.adb (Build_To_Any_Function): For a type with opaque
240 representation that is not transmitted as an unconstrained value,
241 use 'Write, not 'Output, to generate the opaque representation.
243 2013-10-17 Yannick Moy <moy@adacore.com>
245 * sem_res.adb (Resolve_Short_Circuit): Only
246 generate expression-with-action when full expansion is set.
248 2013-10-17 Yannick Moy <moy@adacore.com>
250 * debug.adb Remove obsolete comment.
252 2013-10-17 Thomas Quinot <quinot@adacore.com>
254 * exp_ch4.adb (Process_Transient_Object.Find_Enclosing_Contexts):
255 Avoid late insertion when expanding an expression with action
256 nested within a transient block; Do not inconditionally generate
257 a finalization call if the generated object is from a specific
258 branch of a conditional expression.
260 2013-10-17 Pascal Obry <obry@adacore.com>
262 * g-arrspl.adb: Ensure Finalize call is idempotent.
263 * g-arrspl.adb (Finalize): Makes the call idempotent.
265 2013-10-17 Hristian Kirtchev <kirtchev@adacore.com>
267 * sem_prag.adb (Is_Matching_Input): Account
268 for the case where a state with a null refinement appears as
269 the last input of a refinement clause.
271 2013-10-17 Robert Dewar <dewar@adacore.com>
273 * sem_aux.ads, sem_aux.adb: Minor reformatting.
275 2013-10-17 Hristian Kirtchev <kirtchev@adacore.com>
277 * aspects.adb, aspects.ads, sem_prag.ads: Remove all entries
278 for Refined_Pre from the various tables.
279 * par-prag.adb: Remove the entry for Refined_Pre from the list
280 of pragmas not needing special processing by the parser.
281 * sem_ch13.adb (Analyze_Aspect_Specifications):
282 Remove the processing for aspect Refined_Pre.
283 (Check_Aspect_At_Freeze_Point): Remove the entry for aspect
285 * sem_prag.adb (Analyze_Pragma): Refined_Pre is no longer a
286 valid assertion kind. Remove the analysis of pragma Refined_Pre.
287 (Analyze_Refined_Pragma): Update the comment on usage.
288 (Find_Related_Subprogram_Or_Body): Update the comment on
289 usage. Pragma Refined_Pre is no longer processed by this routine.
290 (Is_Valid_Assertion_Kind): Refined_Pre is no longer a valid
292 * snames.ads-tmpl: Remove predefined name Refined_Pre. Remove
293 the pragma id for Refined_Pre.
295 2013-10-17 Hristian Kirtchev <kirtchev@adacore.com>
297 * exp_util.adb, exp_util.ads (Entity_Of): Moved to Sem_Util.
298 * sem_prag.adb (Analyze_Global_In_Decl_List): Mark a null
299 item list as being analyzed.
300 (Analyze_Global_List): Mark a
301 null global list and multiple global items as being analyzed.
302 (Analyze_Input_Item): Check the unit that defines the input
303 variable or state, not the reference to it.
304 * sem_util.ads, sem_util.adb (Entity_Of): Moved from Exp_Util. Ensure
305 that the input has an entity.
307 2013-10-17 Thomas Quinot <quinot@adacore.com>
309 * exp_util.adb (Get_Current_Value_Condition,
310 Set_Current_Value_Condition): Handle the case of expressions
311 with actions * exp_util.adb (Insert_Actions): Handle the case
312 of an expression with actions whose Actions list is empty.
313 * exp_util.adb (Remove_Side_Effects.Side_Effect_Free): An
314 expression with actions that has no Actions and whose Expression
315 is side effect free is itself side effect free.
316 * exp_util.adb (Remove_Side_Effects): Do not set an incorrect etype on
317 temporary 'R' (Def_Id), which is in general an access to Exp_Type, not
319 * sem_res.adb (Resolve): For an expression with
320 actions, resolve the expression early. * sem_res.adb
321 (Resolve_Expression_With_Actions): Rewrite an expression with
322 actions whose value is compile time known and which has no
323 actions into just its expression, so that its constant value is
324 available downstream.
325 * sem_res.adb (Resolve_Short_Circuit):
326 Wrap the left operand in an expression with actions to contain
327 any required finalization actions.
328 * exp_ch4.adb (Expand_Expression_With_Actions): For an
329 expression with actions returning a Boolean expression, ensure
330 any finalization action is kept within the Actions list.
331 * sem_warn.adb (Check_References, Check_Unset_Reference): add
332 missing circuitry to handle expressions with actions.
333 * checks.adb (Ensure_Valid): For an expression with actions,
334 insert the validity check on the Expression.
335 * sem_ch13.adb (Build_Static_Predicate.Get_RList): An expression
336 with actions that has a non-empty Actions list is not static. An
337 expression with actions that has an empty Actions list has the
338 static ranges of its Expression.
339 * sem_util.adb (Has_No_Obvious_Side_Effects): An expression with
340 actions with an empty Actions list has no obvious side effects
341 if its Expression itsekf has no obvious side effects.
343 2013-10-17 Ed Schonberg <schonberg@adacore.com>
345 * sem_aux.ads, sem_aux.adb (Is_Immutably_Limited_Type): Make
346 predicate compatible with Ada 2012 definition
347 (Is_Limited_View): New name for previous version of
348 Is_Immutably_Limited_Type. Predicate is true for an untagged
349 record type with a limited component.
350 * exp_ch7.adb, exp_ch6.adb, exp_ch4.adb, exp_ch3.adb, exp_aggr.adb,
351 sem_util.adb, sem_res.adb, sem_prag.adb, sem_attr.adb, sem_ch8.adb,
352 sem_ch6.adb, sem_ch3.adb, exp_util.adb: Use Is_Limited_View
353 * freeze.adb Use Is_Immutably_Limited_Type to check the legality
354 of references to the current instance, Is_Limited_View otherwise.
356 2013-10-17 Hristian Kirtchev <kirtchev@adacore.com>
358 * sem_ch13.adb (Analyze_Aspect_Specifications): Flag aspect
359 Refined_Pre as not supported.
360 * sem_prag.adb (Analyze_Pragma): Ignore pragma Refined_Pre.
362 2013-10-17 Ed Schonberg <schonberg@adacore.com>
364 * sem_ch12.adb (Validated_Access_Subprogram_Instance): According
365 to AI05-288, actuals for access_to_subprograms must be subtype
366 conformant with the generic formal. Previous to AI05-288
367 only mode conformance was required, but the AI is a binding
368 interpretation that applies to previous versions of the language,
370 2013-10-17 Robert Dewar <dewar@adacore.com>
372 * gnat_ugn.texi: Minor text correction.
373 * ug_words: Add entry for -gnateu /IGNORE_UNRECOGNIZED.
374 * vms_data.ads: Add /IGNORE_UNRECOGNIZED for -gnateu.
376 2013-10-17 Tristan Gingold <gingold@adacore.com>
378 * impunit.adb (Non_Imp_File_Names_95): Add g-cppexc.
380 2013-10-17 Hristian Kirtchev <kirtchev@adacore.com>
382 * sem_prag.adb (Analyze_Constituent): Move the check
383 concerning option Part_Of to routine Check_Matching_Constituent.
384 (Check_Matching_Constituent): Verify that an abstract state
385 that acts as a constituent has the proper Part_Of option in
386 its aspect/pragma Abstract_State. Account for the case when a
387 constituent comes from a private child or private sibling.
388 * sem_util.ads, sem_util.adb (Is_Child_Or_Sibling): New routine.
390 2013-10-17 Tristan Gingold <gingold@adacore.com>
392 * g-cppexc.adb, g-cppexc.ads: New files.
393 * gcc-interface/Makefile.in: Add g-cppexc when building zcx runtimes.
395 2013-10-17 Thomas Quinot <quinot@adacore.com>
397 * exp_ch7.adb: Minor reformatting.
399 2013-10-17 Ed Schonberg <schonberg@adacore.com>
401 * sem_dim.adb (Process_Minus, Process_Divide): Label dimension
402 expression with standard operator and type, for pretty-printing
405 2013-10-17 Bob Duff <duff@adacore.com>
407 * gnat_ugn.texi: Document --pp-new and --pp-old switches.
409 2013-10-17 Hristian Kirtchev <kirtchev@adacore.com>
411 * einfo.adb: Flag 159 is now known as From_Limited_With. Replace
412 all references to attribute From_With_Type with From_Limited_With.
413 (From_With_Type): Renamed to From_Limited_With.
414 (Set_From_With_Type): Renamd to Set_From_Limited_With.
415 * einfo.ads: Remove attribute From_With_Type and occurrences in
416 nodes. Add attribute From_Limited_With along with occurrences
418 (From_With_Type): Renamed to From_Limited_With along with pragma Inline.
419 (Set_From_With_Type): Renamed to
420 Set_From_Limited_With along with pragma Inline.
421 * sem_ch7.adb, sem_ch8.adb, sem_ch12.adb, sem_ch13.adb, sem_disp.adb,
422 sem_res.adb, sem_type.adb, sem_util.adb, sem_warn.adb,
423 exp_attr.adb, exp_disp.adb, freeze.adb, itypes.adb, layout.adb,
424 lib-writ.adb, rtsfind.adb, sem_attr.adb, sem_aux.adb, sem_ch3.adb,
425 sem_ch4.adb: Replace all references to attribute From_With_Type
426 with From_Limited_With.
427 * sem_ch6.adb: Replace all references to attribute From_With_Type
428 with From_Limited_With.
429 (Designates_From_With_Type): Renamed to Designates_From_Limited_With.
430 (Process_Formals): Update the call to Designates_From_With_Type.
431 * sem_ch10.adb: Replace all references to attribute From_With_Type
432 with From_Limited_With.
433 (Build_Limited_Views): Reimplemented.
434 * gcc-interface/decl.c Replace all references to attribute
435 From_With_Type with From_Limited_With.
436 (finalize_from_with_types): Renamed to finalize_from_limited_with.
437 * gcc-interface/gigi.h (finalize_from_with_types): Renamed to
438 finalize_from_limited_with.
439 * gcc-interface/trans.c: Replace all references to attribute
440 From_With_Type with From_Limited_With.
441 (Compilation_Unit_to_gnu): Update the call to finalize_from_with_types.
443 2013-10-17 Pascal Obry <obry@adacore.com>
445 * projects.texi: Update VCS_Kind documentation.
447 2013-10-17 Matthew Heaney <heaney@adacore.com>
449 * a-convec.adb, a-coinve.adb, a-cobove.adb (Insert, Insert_Space):
450 Inspect value range before converting type.
452 2013-10-17 Hristian Kirtchev <kirtchev@adacore.com>
454 * sem_prag.adb (Analyze_Pragma): Flag the use of pragma Refined_Pre as
457 2013-10-17 Vincent Celier <celier@adacore.com>
459 * gnat_ugn.texi: Remove VMS conversion of -gnatet and -gnateT,
460 now that they are both in ug_words.
461 * ug_words: Update qualifier for -gnatet Add qualifier for -gnateT
462 * vms_data.ads: Update qualifier for -gnatet Add qualifier
464 * projects.texi: Continue to update the project documentation
467 2013-10-17 Robert Dewar <dewar@adacore.com>
469 * einfo.ads, einfo.adb (Has_Body_References): New flag.
470 (Body_References): New field.
471 * sem_prag.adb (Record_Possible_Body_Reference): New procedure
472 (Analyze_Input_Output): Call Record_Possible_Body_Reference
473 (Analyze_Global_Item): Call Record_Possible_Body_Reference
474 (Analyze_Refinement_Clause): Output messages if illegal global refs.
476 2013-10-17 Thomas Quinot <quinot@adacore.com>
478 * freeze.adb (Check_Component_Storage_Order): Reject a record or
479 array type that does not have an explicit Scalar_Storage_Order
480 attribute definition if a component of the record, or the
481 elements of the array, have one.
482 * gnat_rm.texi (attribute Scalar_Storage_Order): Document the above
485 2013-10-17 Vincent Celier <celier@adacore.com>
487 * gnat_ugn.texi: Add examples of switches -gnateD, including
488 one where the value is a string.
489 * projects.texi: Do not convert switches in project files to
492 2013-10-17 Robert Dewar <dewar@adacore.com>
494 * sem_prag.adb (Report_Extra_Clauses): Don't complain about
495 refinements with null input since null should be considered to
498 2013-10-17 Robert Dewar <dewar@adacore.com>
500 * gnat_ugn.texi: Document -gnatw.y/-gnatw.Y.
501 * opt.ads (List_Body_Required_Info): New flag.
502 * prep.adb: Minor reformatting.
503 * sem_ch7.adb (Unit_Requires_Body_Info): New
504 procedure (Analyze_Package_Specification): Add call to
505 Unit_Requires_Body_Info.
506 * ug_words: Add entries for -gnatw.y and -gnatw.Y.
507 * usage.adb: Add line for new warning switch -gnatw.y/.Y.
508 * vms_data.ads: Add entry for [NO_]WHY_SPEC_NEEDS_BODY warning
510 * warnsw.ads, warnsw.adb: Implement new warning switch -gnatw.y/.Y.
512 2013-10-17 Yannick Moy <moy@adacore.com>
514 * sem_ch8.adb (Find_Direct_Name): Keep track of assignments for
515 renamings in SPARK mode.
517 2013-10-17 Yannick Moy <moy@adacore.com>
519 * exp_spark.adb (Expand_SPARK): Remove special case for NOT IN
521 * sinfo.ads: Add special comment section to describe SPARK mode
523 * exp_spark.ads: Remove comments, moved to sinfo.ads.
525 2013-10-17 Yannick Moy <moy@adacore.com>
527 * exp_ch3.adb (Expand_Freeze_Class_Wide_Type,
528 Expand_Freeze_Class_Wide_Type, Expand_Freeze_Class_Wide_Type):
529 Remove useless special cases.
530 * exp_ch4.adb (Expand_Allocator_Expression, Expand_N_Allocator,
531 Expand_N_Op_Expon): Remove useless special cases.
532 * exp_ch6.adb (Is_Build_In_Place_Function_Call): Disable build-in-place
533 in SPARK mode by testing Full_Expander_Active instead of
535 (Make_Build_In_Place_Call_In_Allocator): Remove useless special case.
536 * exp_util.adb (Build_Allocate_Deallocate_Proc): Remove
537 useless special case.
538 * sem_eval.adb (Compile_Time_Known_Value): Remove special handling of
541 2013-10-17 Yannick Moy <moy@adacore.com>
543 * gnat_ugn.texi: Document -gnateT and target file format.
545 2013-10-17 Vincent Celier <celier@adacore.com>
547 * prep.adb (Check_Command_Line_Symbol_Definition): Is_A_String is
548 always False, even when the value starts and ends with double quotes.
550 2013-10-17 Tristan Gingold <gingold@adacore.com>
552 * a-exexpr-gcc.adb: Synchronize declarations of other/all others.
554 2013-10-17 Thomas Quinot <quinot@adacore.com>
556 * exp_pakd.adb: Add missing guard protecting Reverse_Storage_Order
558 * sem_res.adb: Minor code cleanup: use named parameter association
559 (not positional) for Boolean parameter Sec_Stack in calls to
560 Establish_Transient_Scope.
562 2013-10-15 Thomas Quinot <quinot@adacore.com>
564 * exp_pakd.adb (Expand_Packed_Element_Set,
565 Expand_Packed_Element_Reference): Adjust for the case of packed
566 arrays of reverse-storage-order types.
568 2013-10-15 Robert Dewar <dewar@adacore.com>
570 * sem_prag.adb: Minor reformatting.
572 2013-10-15 Ed Schonberg <schonberg@adacore.com>
574 * sem_attr.adb (Analyze_Attribute_Specification, case
575 To_Address): If the expression is an identifier, do not modify
576 its type; it will be converted when necessary, and the type of
577 the expression must remain consistent with that of the entity
578 for back-end consistency.
580 2013-10-15 Robert Dewar <dewar@adacore.com>
582 * sem_ch7.adb (Unit_Requires_Body): Add flag
583 Ignore_Abstract_State (Analyze_Package_Specification): Enforce
584 rule requiring Elaborate_Body if a non-null abstract state is
585 specified for a library-level package.
586 * sem_ch7.ads (Unit_Requires_Body): Add flag Ignore_Abstract_State.
588 2013-10-15 Hristian Kirtchev <kirtchev@adacore.com>
590 * sem_prag.adb (Analyze_Constituent): When
591 a state acts as a constituent of another state, ensure that
592 the said state has a Part_Of dependency in its corresponding
593 aspect/pragma Abstract_State.
595 2013-10-15 Robert Dewar <dewar@adacore.com>
597 * par-ch4.adb (P_If_expression): Handle redundant ELSE cleanly.
599 2013-10-15 Thomas Quinot <quinot@adacore.com>
601 * atree.ads (New_Copy, Relocate_Node): Improve documentation
602 (note that these subprograms reset Is_Overloaded).
604 2013-10-15 Thomas Quinot <quinot@adacore.com>
606 * checks.adb (Check_Needed): Handle the case where the test in
607 the left operand of the short circuit is wrapped in a qualified
608 expression, type conversion, or expression with actions.
610 2013-10-15 Thomas Quinot <quinot@adacore.com>
612 * sem_type.adb, sem_type.ads (Save_Interps): Also propagate
613 Is_Overloaded to New_N, for consistency.
615 2013-10-15 Ed Schonberg <schonberg@adacore.com>
617 * a-tienau.adb (Put): Use file parameter to query values of
618 current column and line length.
620 2013-10-15 Robert Dewar <dewar@adacore.com>
622 * sem_prag.adb, exp_ch11.adb, a-except-2005.adb, a-except-2005.ads:
625 2013-10-15 Eric Botcazou <ebotcazou@adacore.com>
627 * targparm.ads: Fix minor typo in comment.
629 2013-10-15 Ed Schonberg <schonberg@adacore.com>
631 * lib-xref.adb: handle full views that are derived from private
633 * sem_util.adb (Build_Elaboration_Entity): Do nothing in ASIS
634 mode: the elaboration entity is not in the source, and plays no
635 role in semantic analysis. Minor reformatting.
637 2013-10-15 Tristan Gingold <gingold@adacore.com>
639 * adaint.c (__gnat_get_executable_load_address): Remove AIX
642 2013-10-15 Ed Schonberg <schonberg@adacore.com>
644 * exp_aggr.adb (Aggr_Size_OK): Refine criteria to better handle
645 large static aggregates with static record components, to avoid
646 generating a large number of asignments. Conversely, improve
647 handling of aggregates initialized by a single association,
648 which are most efficiently implemented with a loop.
650 2013-10-15 Hristian Kirtchev <kirtchev@adacore.com>
652 * sem_prag.adb (Analyze_Input_Item): Emit an
653 error when the input item comes from the related package.
655 2013-10-15 Arnaud Charlet <charlet@adacore.com>
657 * exp_ch11.adb (Expand_Exception_Handlers): Restrict previous
660 2013-10-14 Tristan Gingold <gingold@adacore.com>
662 * gcc-interface/gigi.h (standard_datatypes): Add
663 ADT_set_exception_parameter_decl
664 (set_exception_parameter_decl): New macro.
665 * gcc-interface/trans.c (gigi): Initialize set_exception_parameter_decl.
666 (Exception_Handler_to_gnu_zcx): Initialize the choice parameter.
667 * gcc-interface/trans.c: Synchronize declarations of other/all others
668 between gigi and the runtime.
670 2013-10-14 Robert Dewar <dewar@adacore.com>
672 * exp_attr.adb (Find_Stream_Subprogram): Optimize
673 Storage_Array stream handling.
674 (Find_Stream_Subprogram): Optimize Stream_Element_Array stream handling
675 * rtsfind.ads: Add entry for Stream_Element_Array Add
676 entries for RE_Storage_Array subprograms Add entries for
677 RE_Stream_Element_Array subprograms
678 * s-ststop.ads, s-ststop.adb: Add processing for System.Storage_Array.
679 Add processing for Ada.Stream_Element_Array.
681 2013-10-14 Tristan Gingold <gingold@adacore.com>
683 * a-except-2005.ads, a-except-2005.adb:
684 (Get_Exception_Machine_Occurrence): New function.
685 * raise-gcc.c (__gnat_unwind_exception_size): New constant.
687 2013-10-14 Robert Dewar <dewar@adacore.com>
689 * sem_res.adb: Minor fix to error message text.
690 * errout.ads, erroutc.ads: Minor reformatting.
691 * s-ststop.ads, s-stratt.ads: Clean up documentation of block IO
693 * s-stratt-xdr.adb: Minor comment update.
695 2013-10-14 Robert Dewar <dewar@adacore.com>
697 * sem_aux.adb, sem_aux.ads, sem_prag.adb: Minor reformatting.
699 2013-10-14 Ed Schonberg <schonberg@adacore.com>
701 * sem_res.adb (Resolve_Actuals): Add error message for a
702 subprogram with an in-out parameter when used in a predicate,
703 to clarify subsequent error at the point of call.
705 2013-10-14 Hristian Kirtchev <kirtchev@adacore.com>
707 * sem_prag.adb (Is_Matching_Input): Consume a matching null input.
709 2013-10-14 Robert Dewar <dewar@adacore.com>
711 * freeze.adb (Freeze_Record): Don't give warning about packed
712 and foreign convention.
714 2013-10-14 Ed Schonberg <schonberg@adacore.com>
716 * sem_aux.adb, sem_aux.ads (Package_Specification): New function, to
717 replace the less efficient idiom Specification.
718 (Unit_Declaration_Node (Pack_Id)), which handles library units and
720 * sem_ch3.adb, sem_ch10.adb, sem_prag.adb, sem_ch12.adb, sem_ch6.adb,
721 exp_disp.adb, sem_cat.adb, exp_dist.adb: Use Package_Specification.
723 2013-10-14 Hristian Kirtchev <kirtchev@adacore.com>
725 * exp_attr.adb (Expand_Update_Attribute): Update the call to
726 Process_Range_Update.
727 (Process_Range_Update): Add new formal parameter Typ and associated
728 comment on usage. Add local constant Index_Typ. Add a type conversion
729 as part of the indexed component to ensure that the loop variable
730 corresponds to the index type.
732 2013-10-14 Tristan Gingold <gingold@adacore.com>
734 * a-exexpr-gcc.adb: Adjust comment.
735 (Others_Value, All_Others_Value,
736 Unhandled_Others_Value): Declare as Character to slightly reduce
739 2013-10-14 Robert Dewar <dewar@adacore.com>
741 * freeze.adb (Size_Known): Size is not known for packed record
742 with aliased components
744 2013-10-14 Robert Dewar <dewar@adacore.com>
746 * sem_ch3.adb: Minor fix to error message.
747 * a-exexpr-gcc.adb, sem_util.adb, sem_case.adb, exp_ch11.adb: Minor
750 2013-10-14 Arnaud Charlet <charlet@adacore.com>
752 * exp_ch11.adb: Fix typo.
754 2013-10-14 Thomas Quinot <quinot@adacore.com>
756 * exp_util.ads: Minor reformatting.
758 2013-10-14 Ed Schonberg <schonberg@adacore.com>
760 * sem_ch3.adb (Build_Derived_Record_Type): Reject full views
761 with no explicit discriminant constraints, when the parents of
762 the partial view and the full view are constrained subtypes with
763 different constraints.
765 2013-10-14 Robert Dewar <dewar@adacore.com>
767 * freeze.adb (Freeze_Array_Type): New procedure, abstracts out
768 this code from Freeze.
769 (Freeze_Array_Type): Detect pragma Pack overriding foreign convention
770 (Freeze_Record_Type): Ditto.
772 2013-10-14 Hristian Kirtchev <kirtchev@adacore.com>
774 * sem_prag.adb (Analyze_Dependency_Clause): Add new local variable
775 Non_Null_Output_Seen. Update the call to Analyze_Input_Output.
776 (Analyze_Input_Item): Streamline the detection mechanism of null and
778 (Analyze_Input_List): Add new local variable
779 Non_Null_Input_Seen. Update all calls to Analyze_Input_Output.
780 (Analyze_Input_Output): Add new formal parameter Non_Null_Seen
781 and update the related comment on usage. Update the
782 recursive call to itself. Attribute 'Result is now treated
783 as a non-null item. Detect mixes of null and non-null items.
784 (Analyze_Initialization_Item): Streamline the detection mechanism
785 of null and non-null items.
787 2013-10-14 Vincent Celier <celier@adacore.com>
789 * projects.texi: Add documentation for the new project level
790 attribute Library_Rpath_Options.
792 2013-10-14 Tristan Gingold <gingold@adacore.com>
794 * a-exexpr-gcc.adb (Set_Exception_Parameter): New procedure.
795 (Set_Foreign_Occurrence): New procedure, extracted from
797 * exp_ch11.adb (Expand_Exception_Handlers): Do not expand choice
798 parameter in case of zcx.
799 * sem_ch11.adb (Analyze_Exception_Handlers): Need debug info
800 for the choice parameter.
801 * raise-gcc.c: Add comments.
803 2013-10-14 Hristian Kirtchev <kirtchev@adacore.com>
805 * aspects.adb: Add an entry in table Canonical_Aspect for
807 * aspects.ads: Add entries in tables Aspect_Id, Aspect_Argument,
808 Aspect_Names and Aspect_Delay for Initial_Condition.
809 * einfo.adb (Get_Pragma): Include pragma Initial_Condition to
810 categorization pragmas.
811 * einfo.ads (Get_Pragma): Update comment on usage.
812 * exp_ch7.adb (Expand_N_Package_Body): Add a runtime check to
813 verify the assertion introduced by pragma Initial_Condition.
814 (Expand_N_Package_Declaration): Add a runtime check to
815 verify the assertion introduced by pragma Initial_Condition.
816 (Expand_Pragma_Initial_Condition): New routine.
817 * par-prag: Include pragma Initial_Condition to the list of
818 pragmas that do not require special processing by the parser.
819 * sem_ch3.adb (Analyze_Declarations): Analyze pragma
820 Initial_Condition at the end of the visible declarations.
821 * sem_ch13.adb (Analyze_Aspect_Specifications): Add processing
822 for aspect Initial_Condition.
823 (Check_Aspect_At_Freeze_Point):
824 Aspect Initial_Condition does not need inspection at freezing.
825 * sem_prag.adb (Analyze_Initial_Condition_In_Decl_Part):
827 (Analyze_Pragma): Update all calls
828 to Check_Declaration_Order. Add processing for pragma
829 Initial_Condition. Initial_Condition is now a valid assertion
830 kind. Add an entry in table Sig_Flags for Initial_Condition.
831 (Check_Declaration_Order): Reimplemented to handle arbitrary
833 (Is_Valid_Assertion_Kind): Add an entry for
835 * sem_pag.ads (Analyze_Initial_Condition_In_Decl_Part):
837 * sem_util.adb (Add_Contract_Item): Pragma Initial_Condition
838 can now be associated with a package spec.
839 * sem_util.ads (Add_Contract_Item): Update comment on usage.
840 * sinfo.ads: Update the documentation of node N_Contract
841 * snames.ads-tmpl: Add new predefined name Initial_Condition. Add
842 new pragma id for Initial_Condition.
844 2013-10-14 Thomas Quinot <quinot@adacore.com>
846 * exp_pakd.adb: Minor reformatting.
848 2013-10-14 Robert Dewar <dewar@adacore.com>
850 * exp_prag.adb: Minor reformatting.
852 2013-10-14 Ed Schonberg <schonberg@adacore.com>
854 * sem_case.adb (Check_Against_Predicate): Handle properly an
855 others clause in various cases.
857 2013-10-14 Hristian Kirtchev <kirtchev@adacore.com>
859 * sem_prag.adb (Check_Matching_Constituent): Do
860 not inspect the hidden states if there are no hidden states. This
861 case arises when the constituents are states coming from a
864 2013-10-14 Doug Rupp <rupp@adacore.com>
866 * init.c [ARMEL and VxWorks] (__gnat_map_signal): Re-arm guard
867 page by clearing VALID bit vice setting page protection.
869 2013-10-14 Arnaud Charlet <charlet@adacore.com>
871 * gnat_rm.texi, adaint.c: Fix typo.
873 2013-10-14 Ed Schonberg <schonberg@adacore.com>
875 * sem_util.adb (Is_Variable, In_Protected_Function): In the
876 body of a protected function, the protected object itself is a
877 constant (not just its components).
879 2013-10-14 Vincent Celier <celier@adacore.com>
881 * snames.ads-tmpl: Add new standard name Library_Rpath_Options.
883 2013-10-14 Tristan Gingold <gingold@adacore.com>
885 * sem_prag.adb (Process_Import_Or_Interface): Allow importing
886 of exception using convention Cpp.
887 * exp_prag.adb (Expand_Pragma_Import_Or_Interface): Expand cpp
889 * raise-gcc.c (is_handled_by): Filter C++ exception occurrences.
890 * gnat_rm.texi: Document how to import C++ exceptions.
892 2013-10-14 Jose Ruiz <ruiz@adacore.com>
894 * sem_ch13.adb (Sem_Ch13.Analyze_Aspect_Specification): For
895 Priority and CPU aspects, when checking, issue a warning only
896 if it is obviously not a main program.
898 2013-10-14 Tristan Gingold <gingold@adacore.com>
900 * adaint.c: Fix condition for AIX. Minor reformatting.
902 2013-10-14 Robert Dewar <dewar@adacore.com>
904 * sem_ch3.adb, sem_prag.adb, prj.ads: Minor reformatting.
906 2013-10-14 Hristian Kirtchev <kirtchev@adacore.com>
908 * sem_prag.adb (Analyze_Depends_In_Decl_Part):
909 Rename Outputs_Seen to All_Outputs_Seen and update all occurrences
911 (Analyze_Input_Output): Add an item to
912 All_Inputs_Seen when it is an input or a self-referential output.
913 (Check_Mode): Comment reformatting.
914 (Analyze_Abstract_State): Remove the restriction that an Export state
915 must also have mode Input_Only or Output_Only.
917 2013-10-14 Hristian Kirtchev <kirtchev@adacore.com>
919 * einfo.adb: Flag 263 is now known as Has_Visible_Refinement.
920 (Has_Non_Null_Refinement): New routine.
921 (Has_Null_Refinement): The routine is now synthesized.
922 (Has_Visible_Refinement): New routine.
923 (Set_Has_Visible_Refinement): New routine.
924 (Write_Entity_Flags): Remove the output for
925 Has_Null_Refinement. Add output for Has_Visible_Refinement.
926 * einfo.ads: Update the occurrences of Has_Non_Null_Refinement,
927 Has_Null_Refinement and Has_Visible_Refinement in entities.
928 (Has_Non_Null_Refinement): New synthesized attribute.
929 (Has_Null_Refinement): This attribute is now synthesized.
930 (Has_Visible_Refinement): New routine with corresponding
932 (Set_Has_Visible_Refinement): New routine with corresponding pragma
934 * sem_ch3.adb (Analyze_Declarations): Add new local
935 variable In_Package_Body. Remove state refinements from
936 visibility at the end of the package body declarations.
937 (Remove_Visible_Refinements): New routine.
938 * sem_prag.adb (Analyze_Constituent): Collect a null
939 constituent and mark the state as having visible refinement.
940 (Analyze_Global_Item): Use attribute Has_Visible_Refinement to
941 detect a state with visible refinement.
942 (Analyze_Input_Output): Use attribute Has_Visible_Refinement to detect
943 a state with visible refinement.
944 (Check_Dependency_Clause): Use attribute Has_Non_Null_Refinement rather
945 than checking the contents of list Refinement_Constituents.
946 (Check_In_Out_States): Use attribute Has_Non_Null_Refinement rather
947 than checking the contents of list Refinement_Constituents.
948 (Check_Input_States): Use attribute Has_Non_Null_Refinement rather
949 than checking the contents of list Refinement_Constituents.
950 (Check_Matching_Constituent): Mark a state as having visible refinement.
951 (Check_Output_States): Use attribute Has_Non_Null_Refinement rather than
952 checking the contents of list Refinement_Constituents.
953 (Check_Refined_Global_Item): Use attribute Has_Visible_Refinement
954 to detect a state with visible refinement.
955 (Is_Matching_Input): Use attribute Has_Non_Null_Refinement rather than
956 checking the contents of list Refinement_Constituents.
957 * sem_util.adb (Is_Refined_State): Use attribute
958 Has_Visible_Refinement to detect a state with visible refinement.
960 2013-10-14 Hristian Kirtchev <kirtchev@adacore.com>
962 * sem_prag.adb (Check_Mode): Do not emit an
963 error when inspecting a self referencial output item of an
966 2013-10-14 Tristan Gingold <gingold@adacore.com>
968 * exp_prag.adb (Expand_Pragma_Import_Export_Exception): Fix
969 target type for code of VMS imported exception.
970 * init.c: Replace Exception_Code by void *.
971 * s-vmexta.adb (Hash, Base_Code_In): Adjust code after changing
972 the type of Exception_Code.
974 2013-10-14 Vincent Celier <celier@adacore.com>
976 * prj.ads: Minor comment updates.
977 * prj-attr.adb: New attribute Library_Rpath_Options.
979 2013-10-14 Robert Dewar <dewar@adacore.com>
981 * gnat_rm.texi: Library_Level attribute now applies to an
983 * sem_attr.adb (Analyze_Attribute, case Library_Level): Prefix
984 is now an entity name.
986 2013-10-14 Jose Ruiz <ruiz@adacore.com>
988 * sem_ch13.adb (Analyze_Aspect_Specification): For
989 Priority and CPU aspects in subprograms, the expression in the
990 aspect is analyzed and exported.
992 2013-10-14 Robert Dewar <dewar@adacore.com>
994 * s-valuti.adb, prep.adb, scng.adb, errout.adb: Minor reformatting.
996 2013-10-14 Eric Botcazou <ebotcazou@adacore.com>
998 * adaint.c: Further disable __gnat_get_executable_load_address
1001 2013-10-14 Vincent Celier <celier@adacore.com>
1003 * gnat_ugn.texi: Add documentation for comparing symbols to
1004 integers in preprocessing expressions.
1006 2013-10-14 Jose Ruiz <ruiz@adacore.com>
1008 * sem_prag.adb (Analyze_Aspect_Specification): For
1009 Priority and CPU aspects in subprograms, the expression in the
1010 aspect is analyzed and exported.
1011 (Analyze_Pragma): When having a Priority pragma in the
1012 main subprogram, load a unit that will force the initialization
1013 of the tasking run time, which is needed for setting the required
1016 2013-10-14 Vincent Celier <celier@adacore.com>
1018 * prj-nmsc.adb (Check_Interfaces): Put in Other_Interfaces all
1019 non Ada interface files.
1020 * prj.ads (Project_Data): New component Other_Interfaces.
1022 2013-10-14 Arnaud Charlet <charlet@adacore.com>
1024 * gcc-interface/Makefile.in: Target pairs clean ups.
1026 2013-10-14 Vincent Celier <celier@adacore.com>
1028 * errout.adb (Write_Error_Summary): Do not output the number
1029 of lines when Main_Source_File is unknown.
1030 (Output_Messages): Do not write the header when Main_Source_File is
1033 2013-10-14 Vincent Celier <celier@adacore.com>
1035 * prep.adb (Expression): Accept terms of the form 'symbol <relop>
1036 integer", where relop is =, <, <=, > or >=.
1037 (Parse_Def_File): Accept literal integer values.
1038 * gcc-interface/Make-lang.in: Add s-valint.o, s-valuns.o and
1039 s-valuti.o to the compiler object files.
1041 2013-10-14 Robert Dewar <dewar@adacore.com>
1043 * exp_prag.adb, exp_ch11.adb, s-exctab.adb: Minor reformatting.
1044 * usage.adb: Add line for -gnateu switch.
1046 2013-10-14 Vincent Celier <celier@adacore.com>
1048 * lib-writ.ads: Add comments to indicate that a path name in
1049 D lines may be quoted if the path name includes directories
1052 2013-10-14 Robert Dewar <dewar@adacore.com>
1054 * debug.adb: Document -gnatd.E.
1055 * gnat1drv.adb (Adjust_Global_Switches): Set Error_To_Warning
1057 * opt.ads (Error_To_Warning): New switch.
1058 * osint.adb: Minor reformatting.
1059 * sem_warn.adb (Warn_On_Overlapping_Actuals): Overlap is error
1060 in some cases in Ada 2012 mode (unless Error_To_Warning) is set.
1061 * sem_warn.ads (Warn_On_Overlapping_Actuals): Document error
1064 2013-10-14 Tristan Gingold <gingold@adacore.com>
1066 * cstand.adb: Add a comment for Standard_Exception_Type.
1068 2013-10-14 Ed Schonberg <schonberg@adacore.com>
1070 * exp_ch4.adb (Process_Transient_Object): If a transient scope
1071 has already been created, use the corresponding Node_To_Be_Wrapped
1072 as the insertion point for the controlled actions.
1074 2013-10-14 Tristan Gingold <gingold@adacore.com>
1076 * cstand.adb (Create_Standard): Change Import_Code component
1077 of Standard_Exception_Type to Foreign_Data. Its type is now
1078 Standard_A_Char (access to character).
1079 * exp_prag.adb (Expand_Pragma_Import_Export_Exception): Adjust
1080 definition of Code to match the type of Foreign_Data.
1081 * s-stalib.ads (Exception_Data): Replace Import_Code by Foreign_Data
1082 Change the definition of standard predefined exceptions.
1083 (Exception_Code): Remove.
1084 * raise.h (Exception_Code): Remove (Exception_Data): Replace
1085 Import_Code field by Foreign_Data.
1086 * rtsfind.ads (RE_Exception_Code): Remove
1087 (RE_Import_Address): Add.
1088 * a-exexpr-gcc.adb (Import_Code_For): Replaced by Foreign_Data_For.
1089 * exp_ch11.adb (Expand_N_Exception_Declaration): Associate null
1090 to Foreign_Data component.
1091 * raise-gcc.c (Import_Code_For): Replaced by Foreign_Data_For.
1092 (is_handled_by): Add comments. Use replaced function. Change
1093 condition so that an Ada occurrence is never handled by
1095 * s-exctab.adb (Internal_Exception): Associate Null_Address to
1096 Foreign_Data component.
1097 * s-vmexta.adb, s-vmexta.ads (Exception_Code): Declare Replace
1098 SSL.Exception_Code by Exception_Code.
1100 2013-10-14 Robert Dewar <dewar@adacore.com>
1102 * gnat_ugn.texi: Document -gnateu switch.
1103 * opt.ads (Ignore_Unrecognized_VWY_Switches): New switch.
1104 * stylesw.adb: Ignore unrecognized switch if
1105 Ignore_Unrecognized_VWY_Switches set.
1106 * switch-c.adb: Implement -gnateu (sets
1107 Ignore_Unrecognized_VWY_Switches).
1108 * validsw.adb: Ignore unrecognized switch if
1109 Ignore_Unrecognized_VWY_Switches set.
1110 * warnsw.adb: Ignore unrecognized switch if
1111 Ignore_Unrecognized_VWY_Switches set.
1113 2013-10-14 Robert Dewar <dewar@adacore.com>
1115 * exp_prag.adb, sem_prag.adb, a-exexda.adb, s-vmexta.ads: Minor
1118 2013-10-14 Vincent Celier <celier@adacore.com>
1120 * ali.adb (Get_File_Name): New Boolean parameter May_Be_Quoted,
1121 defaulted to False. Calls Get_Name with May_Be_Quoted.
1122 (Get_Name): New Boolean parameter May_Be_Quoted, defaulted to
1123 False. If May_Be_Quoted is True and first non blank charater is
1124 '"', unquote the name.
1125 (Scan_ALI): For the file/path name on the D line, call Get_File_Name
1126 with May_Be_Quoted = True, as it may have been quoted.
1127 * lib-util.adb, lib-util.ads (Write_Info_Name_May_Be_Quoted): New
1128 procedure to write file/path names that may contain spaces and if they
1130 * lib-writ.adb (Write_ALI): Use new procedure
1131 Write_Info_Name_May_Be_Quoted to write file/path names on D lines.
1133 2013-10-14 Hristian Kirtchev <kirtchev@adacore.com>
1135 * sem_prag.adb (Analyze_Depends_In_Decl_Part,
1136 Analyze_Global_In_Decl_Part,
1137 Analyze_Pre_Post_Condition_In_Decl_Part): Install the subprogram
1138 and its formals only when it is not already installed.
1139 * sem_util.adb (Is_Refined_State): A state is refined when it
1140 has a non-empty list of constituents.
1142 2013-10-14 Tristan Gingold <gingold@adacore.com>
1144 * adaint.c: Disable __gnat_get_executable_load_address for linux.
1145 * exp_prag.adb: Add comment in Expand_Pragma_Import_Export_Exception.
1147 2013-10-14 Tristan Gingold <gingold@adacore.com>
1149 * s-vmexta.ads: Add comments.
1151 2013-10-14 Hristian Kirtchev <kirtchev@adacore.com>
1153 * sem_ch6.adb (Analyze_Subprogram_Body_Contract): Add processing
1154 for pragma Refined_State.
1155 * sem_ch13.adb (Analyze_Aspect_Specifications): Add processing
1156 for aspect Refined_Depends.
1157 * sem_prag.adb (Analyze_Contract_Cases_In_Decl_Part):
1158 Use Find_Related_Subprogram_Or_Body to find the related
1159 context. Use the current scope when determining whether to
1160 ensure proper visibility.
1161 (Analyze_Depends_In_Decl_Part):
1162 Add local variable Spec_Id. Update the comment on usage of
1163 Subp_Id. Use Find_Related_Subprogram_Or_Body to find the
1164 related context. Extract the corresponding spec of the body
1165 (if any). Use the current scope when determining when to
1166 ensure proper visibility.
1167 (Analyze_Global_In_Decl_Part):
1168 Add local variable Spec_Id. Update the comment on usage of
1169 Subp_Id. Use Find_Related_Subprogram_Or_Body to find the
1170 related context. Extract the corresponding spec of the body
1171 (if any). Use the current scope when determining when to
1172 ensure proper visibility.
1173 (Analyze_Global_Item): Use the
1174 entity of the subprogram spec when performing formal parameter
1175 checks. Perform state-related checks.
1176 (Analyze_Input_Output):
1177 Use Is_Attribute_Result to detect 'Result. Query the
1178 entity of a subprogram spec when verifying the prefix of
1179 'Result. Perform state-related checks. (Analyze_Pragma):
1180 Merge the analysis of Refined_Depends and Refined_Global.
1181 (Analyze_Refined_Depends_In_Decl_Part): Provide implemenation.
1182 (Analyze_Refined_Global_In_Decl_Part): Move state-related checks
1183 to the body of Analyze_Global_In_Decl_Part. Rename local constant
1184 List to Items. (Analyze_Refined_Pragma): Remove circuitry to
1185 find the proper context, use Find_Related_Subprogram_Or_Body
1187 (Check_Function_Return): Query the entity of
1188 the subprogram spec when verifying the use of 'Result.
1189 (Check_In_Out_States, Check_Input_States, Check_Output_States):
1190 Avoid using Has_Null_Refinement to detect a state with
1191 a non-null refinement, use the Refinement_Constituents
1193 (Check_Matching_Constituent): Remove initialization code.
1194 (Check_Mode_Restriction_In_Function): Use the entity of the subprogram
1195 spec when verifying mode usage in functions.
1196 (Collect_Global_Items): New routine.
1197 (Collect_Subprogram_Inputs_Outputs): Add local
1198 variable Spec_Id. Add circuitry for bodies-as-specs. Use
1199 pragma Refined_Global when collecting for a body.
1200 (Create_Or_Modify_Clause): Use the location of the
1201 clause. Rename local variable Clause to New_Clause to avoid
1202 confusion and update all occurrences. Use Is_Attribute_Result
1204 (Find_Related_Subprogram): Removed.
1205 (Find_Related_Subprogram_Or_Body): New routine.
1206 (Is_Part_Of): Move routine to top level.
1207 (Normalize_Clause): Update the
1208 comment on usage. The routine can now normalize a clause with
1209 multiple outputs by splitting it.
1210 (Collect_Global_Items):
1211 Rename local constant List to Items. Remove the check for
1213 (Requires_Profile_Installation): Removed.
1214 (Split_Multiple_Outputs): New routine.
1215 * sem_prag.ads: Update the comments on usage of various
1216 pragma-related analysis routines.
1217 * sem_util.adb (Contains_Refined_State): The routine can now
1218 process pragma [Refined_]Depends.
1219 (Has_Refined_State): Removed.
1220 (Has_State_In_Dependency): New routine.
1221 (Has_State_In_Global): New routine.
1222 (Is_Attribute_Result): New routine.
1223 * sem_util.ads (Is_Attribute_Result): New routine.
1225 2013-10-14 Emmanuel Briot <briot@adacore.com>
1227 * s-regpat.adb (Compile): Fix finalization of the automaton
1228 when its size was automatically computed to be exactly 1000 bytes.
1230 2013-10-14 Ed Schonberg <schonberg@adacore.com>
1232 * sem_ch3.adb (Complete_Private_Subtype): If the full view of
1233 the base type is constrained, the full view of the subtype is
1234 known to be constrained as well.
1236 2013-10-14 Vincent Celier <celier@adacore.com>
1238 * projects.texi: Add documentation for new attributes of package
1239 Clean: Artifacts_In_Object_Dir and Artifacts_In_Exec_Dir.
1241 2013-10-14 Tristan Gingold <gingold@adacore.com>
1243 * adaint.c, adaint.h (__gnat_get_executable_load_address):
1245 * a-exexda.adb (Append_Info_Basic_Exception_Traceback): Add
1246 executable load address (Basic_Exception_Tback_Maxlength): Adjust.
1248 2013-10-14 Vincent Celier <celier@adacore.com>
1250 * prj-attr.adb: New attributes in package Clean:
1251 Artifacts_In_Exec_Dir, Artifacts_In_Object_Dir.
1252 * prj-nmsc.adb (Process_Clean (Attributes)): New
1253 procedure to process attributes Artifacts_In_Exec_Dir and
1254 Artifacts_In_Object_Dir in package Clean.
1255 * prj.ads (Project_Configuration): New components
1256 Artifacts_In_Exec_Dir and Artifacts_In_Object_Dir.
1257 * snames.ads-tmpl: New standard names Artifacts_In_Exec_Dir and
1258 Artifacts_In_Object_Dir used only by gprclean.
1260 2013-10-14 Robert Dewar <dewar@adacore.com>
1262 * exp_attr.adb (Expand_N_Attribute_Reference): Add error
1263 entry for Library_Level attribute (which should not survive
1265 * gnat_rm.texi: Document attribute Library_Level
1266 * sem_attr.adb (Analyze_Attribute, case Library_Level): Implement
1267 this new attribute (Set_Boolean_Result): Replaces Set_Result
1268 (Check_Standard_Prefix): Document that Check_E0 is called
1269 (Check_System_Prefix): New procedure
1270 * snames.ads-tmpl: Add entry for Library_Level attribute
1272 2013-10-14 Robert Dewar <dewar@adacore.com>
1274 * exp_ch6.adb, sinfo.ads: Minor reformatting.
1275 * checks.adb (Overlap_Check): Use identifier casing in messages.
1277 2013-10-14 Robert Dewar <dewar@adacore.com>
1279 * einfo.ads, einfo.adb (Default_Aspect_Component_Value): Is on base type
1281 * exp_aggr.adb (Expand_Array_Aggregate): Handle proper
1282 initialization of <> component.
1283 * exp_ch3.adb, exp_tss.adb: Minor reformatting
1284 * sem_ch13.adb (Default_Aspect_Component_Value, Default_Aspect_Value):
1285 Is on base type only.
1286 * sinfo.ads: Minor comment revision.
1288 2013-10-14 Robert Dewar <dewar@adacore.com>
1290 * g-decstr.adb (Decode_Wide_Wide_Character): Fix failure
1291 to detect invalid sequences where longer than necessary
1292 sequences are used for encoding.
1293 (Validate_Wide_Character):
1294 Call Decode_Wide_Character to get the above validations.
1295 (Validate_Wide_Wide_Character): Same fix
1296 * g-decstr.ads: Add documentation making it clear that the UTF-8
1297 implementation here recognizes all valid UTF-8 sequences, rather
1298 than the well-formed subset corresponding to characters defined
1300 (Next_Wide_Character): Remove comment about this
1301 being more efficient than Decode_Wide_Character (because this
1302 no longer the case).
1303 (Prev_Wide_Character): Add note that valid encoding is assumed.
1305 2013-10-14 Robert Dewar <dewar@adacore.com>
1307 * a-wichha.adb (Character_Set_Version): New function.
1308 * a-wichha.ads: Remove comments for pragma Pure (final RM has
1310 (Character_Set_Version): New function.
1311 * gnat_rm.texi: Update doc.
1313 2013-10-14 Hristian Kirtchev <kirtchev@adacore.com>
1315 * einfo.adb: Flag263 is now known as Has_Null_Refinement.
1316 (Has_Null_Refinement): New routine.
1317 (Set_Has_Null_Refinement): New routine.
1318 (Write_Entity_Flags): Output the status of flag
1319 Has_Null_Refinement.
1320 * einfo.ads: Add new flag Has_Null_Refinement along with
1321 comment on usage and update all nodes subject to the flag.
1322 (Has_Null_Refinement): New routine along with pragma Inline.
1323 (Set_Has_Null_Refinement): New rouitine along with pragma Inline.
1324 * sem_prag.adb (Analyze_Constituent): Mark a state as having
1325 a null refinement when the sole constituent is "null".
1326 (Analyze_Global_List): Handle null input/output items.
1327 (Analyze_Refined_Global_In_Decl_Part): Add local variable
1328 Has_Null_State. Add logic to handle combinations of states
1329 with null refinements and null global lists and/or items.
1330 (Check_In_Out_States, Check_Input_States, Check_Output_States):
1331 Use attribute Has_Null_Refinement to detect states with
1333 (Check_Refined_Global_List): Handle null input/output items.
1334 (Process_Global_Item): Handle states with null refinements.
1335 (Process_Global_List): Handle null input/output items.
1337 2013-10-14 Robert Dewar <dewar@adacore.com>
1339 * freeze.adb (Freeze_Entity): Reset Is_True_Constant for
1341 * gnat_ugn.texi: Update doc on aliased variables and constants.
1343 2013-10-14 Ed Schonberg <schonberg@adacore.com>
1345 * exp_pakd.adb (Expand_Packed_Element_Reference): If the
1346 reference is an actual in a call, the prefix has not been fully
1347 expanded, to account for the additional expansion for parameter
1348 passing. the prefix itself is a packed reference as well,
1349 recurse to complete the transformation of the prefix.
1351 2013-10-14 Eric Botcazou <ebotcazou@adacore.com>
1353 * exp_dbug.adb (Debug_Renaming_Declaration): Do not
1354 materialize the entity when the renamed object contains an
1355 N_Explicit_Dereference.
1356 * sem_ch8.adb (Analyze_Object_Renaming):
1357 If the renaming comes from source and the renamed object is a
1358 dereference, mark the prefix as needing debug information.
1360 2013-10-14 Doug Rupp <rupp@adacore.com>
1362 * system-vxworks-arm.ads (Stack_Check_Probes, Stack_Check_Limits):
1363 Enable Stack Probes, Disable Stack Limit Checking.
1364 * init.c [VxWorks] (__gnat_inum_to_ivec): Caste return value.
1365 (__gnat_map_signal): Fix signature.
1366 (__gnat_error_handler): Make
1367 static, fix signature, remove prototype, fix prototype warning.
1368 [ARMEL and VxWorks6] (__gnat_map_signal): Check and re-arm guard
1369 page for storage_error.
1370 * exp_pakd.adb: Minor reformatting.
1372 2013-10-14 Hristian Kirtchev <kirtchev@adacore.com>
1374 * sem_prag.adb (Analyze_Global_In_Decl_Part): Remove local
1375 variable Contract_Seen. Add local variable Proof_Seen.
1376 (Analyze_Global_List): Remove the processing for mode
1377 Contract_In. Add support for mode Proof_In.
1378 (Analyze_Pragma): Update the grammar of pragmas Global and
1380 * snames.ads-tmpl: Remove predefined name Contract_In. Add
1381 predefined name Proof_In.
1383 2013-10-14 Robert Dewar <dewar@adacore.com>
1385 * exp_prag.adb (Expand_Pragma_Check): Generate proper string
1387 * gnat_rm.texi: Add documentation for pragmas
1388 Type_Invariant[_Class]
1389 * par-prag.adb: Add entries for pragmas Type_Invariant[_Class]
1390 * sem_ch13.adb: Minor reformatting
1391 * sem_prag.adb: Implement pragmas Type_Invariant[_Class]
1392 * snames.ads-tmpl: Add entries for pragmas Type_Invariant[_Class]
1394 2013-10-14 Johannes Kanig <kanig@adacore.com>
1396 * debug.adb: Release now unused debug switches that were only
1397 relevant for gnat2why backend, not the frontend
1398 * frontend.adb (Frontend) Do not stop when -gnatd.H is present,
1401 2013-10-14 Hristian Kirtchev <kirtchev@adacore.com>
1403 * sem_prag.adb (Analyze_Global_Item): Allow
1404 references to enclosing formal parameters.
1406 2013-10-14 Thomas Quinot <quinot@adacore.com>
1408 * einfo.adb (Equivalent_Type): Add missing case
1409 E_Access_Subprogram_Type in guard (for remote access to
1410 subprograms) * sem_ch8.adb (Find_Direct_Name, Find_Expanded_Name):
1411 Add missing guards to account for the presence of RAS types
1412 that have already been replaced with the corresponding fat
1415 2013-10-14 Hristian Kirtchev <kirtchev@adacore.com>
1417 * aspects.adb: Add an entry in table Canonical_Aspect for
1419 * aspects.ads: Add entries in tables Aspect_Id, Aspect_Argument,
1420 Aspect_Names and Aspect_Delay for Initializes.
1421 * atree.ads, atree.adb (Ekind_In): New seven argument versions of the
1423 * einfo.adb: Remove Refined_State_Pragma from the list of node
1424 usage. Finalizer is now at position 28.
1426 and package bodies now have a contract.
1428 the assertion and node usage.
1429 (Get_Pragma): Update the Is_CDG
1430 flag to include Abstract_State, Initializes and Refined_State.
1431 (Refined_State_Pragma): Removed.
1432 (Set_Contract): Package and
1433 package bodies now have a contract.
1434 (Set_Finalizer): Update the
1435 assertion and node usage.
1436 (Set_Refined_State_Pragma): Removed.
1437 (Write_Field8_Name): Remove the output for Refined_State_Pragma.
1438 (Write_Field24_Name): Remove the output for Finalizer. Package
1439 and package bodies now have a contract.
1440 (Write_Field28_Name):
1441 Add output for Finalizer.
1442 * einfo.ads: Update the documentation and usage in entities
1443 of attribute Contract. Update the node position and usage in
1444 entities of attribute Finalizer. Remove the documentation
1445 and usage in entities for attribute Refined_State_Pragma.
1446 (Refined_State_Pragma): Removed along with pragma Inline.
1447 (Set_Refined_State_Pragma): Removed along with pragma Inline.
1448 * par-prag.adb: Add Initializes to the pragmas that do not
1449 require special processing by the parser.
1450 * sem_ch3.adb (Analyze_Declarations): Add local variable
1451 Prag. Update the retrieval of pragma Refined_State. Analyze
1452 aspect/pragma Initializes at the end of the visible declarations
1453 of the related package.
1454 * sem_ch6.adb (Analyze_Subprogram_Body_Contract):
1455 Add local variables Ref_Depends and Ref_Global. Analyze
1456 pragmas Refined_Global and Refined_Depends in that order.
1457 (Analyze_Subprogram_Contract): Add local variables Depends and
1458 Global. Analyze pragmas Global and Depends in that order.
1459 * sem_ch7.adb (Analyze_Package_Body_Helper): Package
1460 bodies now have a contract. Move the analysis of the aspect
1461 specifications after the defining entity has been decorated.
1462 (Analyze_Package_Declaration): Packages now have a contract. Move
1463 the analysis of the aspect specifications after the defining
1464 entity has been decorated.
1465 * sem_ch12.adb (Analyze_Generic_Package_Declaration): Packages
1467 * sem_ch13.adb (Analyze_Pragma): Code cleanup for aspect
1468 Abstract_State. Add processing for aspect Initializes.
1469 (Check_Aspect_At_Freeze_Point): Add an entry for Initializes.
1470 * sem_prag.adb: Use Get_Pragma_Arg to extract the expression
1471 of a pragma argument. Add an entry in table Sig_Flags for
1473 (Analyze_Initializes_In_Decl_Part): New routine.
1474 (Analyze_Pragma): Check the declaration order of pragmas
1475 Abstract_State and Initializes. Abstract_State is now part of
1476 the package contract. Analyze pragma Initializes. Check for
1477 duplicate Refined_State pragma. Refined_State is now part of
1478 the package contract.
1479 (Check_Declaration_Order): New routine.
1480 (Check_Test_Case): Alphabetized.
1481 * sem_prag.ads (Analyze_Initializes_In_Decl_Part): New routine.
1482 * sem_util.adb (Add_Contract_Item): Rename formal Subp_Id
1483 to Id. This routine can now support contracts on packages and
1485 * sem_util.ads (Add_Contract_Item): Rename formal Subp_Id to
1486 Id. Update comment on usage.
1487 * sinfo.ads: Update the usage of N_Contract nodes.
1488 * snames.ads-tmpl: Add predefined name Initializes. Add new
1489 pragma id for Initializes.
1491 2013-10-13 Nicolas Roche <roche@adacore.com>
1492 Eric Botcazou <ebotcazou@adacore.com>
1494 * gcc-interface/Make-lang.in (ada/%.o): Replace individual rules with
1495 generic rule and add $(POSTCOMPILE).
1497 (.adb.o): Add @$(ADA_DEPS).
1499 (ada/a-except.o): Likewise.
1500 (ada/s-excdeb.): Likewise.
1501 (ada/s-assert.o): Likewise.
1502 (ada/a-tags.o): Likewise.
1503 (ada_generated_files): New variable.
1504 Use them as dependency order for GNAT1_ADA_OBJS and GNATBIND_OBJS.
1505 (ADA_DEPFILES): New variable.
1509 2013-10-13 Eric Botcazou <ebotcazou@adacore.com>
1511 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Force all local
1512 variables with aggregate types in memory if not optimizing.
1514 2013-10-13 Hristian Kirtchev <kirtchev@adacore.com>
1516 * sem_prag.adb (Check_Mode): Do
1517 not emit an error when we are looking at inputs and
1518 the item is an unconstrained or tagged out parameter.
1519 (Check_Mode_Restriction_In_Enclosing_Context): Use Get_Pragma
1520 to find whether the context is subject to aspect/pragma Global.
1521 (Collect_Subprogram_Inputs_Outputs): Unconstrained or tagged
1522 out parameters are now considered inputs. Use Get_Pragma to
1523 find wheher the subprogram is subject to aspect/pragma Global.
1524 (Is_Unconstrained_Or_Tagged_Item): New routine.
1526 2013-10-13 Thomas Quinot <quinot@adacore.com>
1528 * einfo.ads: Minor reformatting.
1529 * gcc-interface/Make-lang.in: Update dependencies.
1531 2013-10-13 Robert Dewar <dewar@adacore.com>
1533 * gnat_rm.texi: Add documentation for pragmas Pre[_Class]
1535 * par-ch2.adb (Skip_Pragma_Semicolon): Handle extra semicolon nicely.
1536 * par-prag.adb: Add entries for pragmas Pre[_Class] and
1538 * sem_prag.adb: Add handling of pragmas Pre[_Class] and
1540 * sem_util.adb (Original_Aspect_Name): Moved here from
1541 Sem_Prag.Original_Name, and modified to handle pragmas
1542 Pre/Post/Pre_Class/Post_Class.
1543 * sem_util.ads (Original_Aspect_Name): Moved here from
1544 Sem_Prag.Original_Name.
1545 * snames.ads-tmpl: Add entries for pragmas Pre[_Class] and
1548 2013-10-13 Robert Dewar <dewar@adacore.com>
1550 * einfo.adb, sem_ch6.adb: Minor reformatting.
1552 2013-10-13 Hristian Kirtchev <kirtchev@adacore.com>
1554 * einfo.adb: Add node/list usage for Refined_State
1555 and Refinement_Constituents.
1556 (Get_Pragma): Update the
1557 initialization of Is_CDG to include Refined_Global and
1558 Refined_Depends. Rename constant Delayed to In_Contract and update
1559 all of its occurrences.
1560 (Is_Non_Volatile_State): New routine.
1561 (Is_Volatile_State): Removed.
1562 (Refined_State): New routine.
1563 (Refinement_Constituents): New routine.
1564 (Set_Refined_State): New routine.
1565 (Set_Refinement_Constituents): New routine.
1566 (Write_Field8_Name): Add output for Refinement_Constituents.
1567 (Write_Field10_Name): Add output for Refined_State.
1568 * einfo.ads: Add new synthesized attribute Is_Non_Volatile_State.
1569 Remove synthesized attribute Is_Volatile_State. Add new
1570 attributes Refined_State and Refinement_Constituents along with
1572 (Get_Pragma): Update the comment on usage.
1573 (Is_Non_Volatile_State): New routine.
1574 (Is_Volatile_State): Removed.
1575 (Refined_State): New routine and pragma Inline.
1576 (Refinement_Constituents): New routine and pragma Inline.
1577 (Set_Refined_State): New routine and pragma Inline.
1578 (Set_Refinement_Constituents): New routine and pragma Inline.
1579 * elists.ads, elists.adb (Clone): Removed.
1580 (New_Copy_Elist): New routine.
1581 (Remove): New routine.
1582 * sem_ch3.adb (Analyze_Declarations): Use Defining_Entity
1583 to get the entity of the subprogram [body].
1584 (Analyze_Object_Declaration): Add initialization for
1586 * sem_ch6.adb (Analyze_Subprogram_Body_Contract): Add processing
1587 for Refined_Global and Refined_Depends. Emit an error when
1588 the body requires Refined_Global, but the aspect/pragma is
1590 * sem_ch6.ads (Analyze_Subprogram_Body_Contract): Change
1591 procedure signature and add comment on usage.
1592 * sem_ch13.adb (Analyze_Aspect_Specifications): Add processing
1593 for aspect Refined_Global.
1594 * sem_prag.adb (Analyze_Abstract_State): Add initialization
1595 of attributes Refined_State and Refinement_Constituents.
1596 (Analyze_Depends_In_Decl_Part, Analyze_Global_In_Decl_Part,
1597 Analyze_Contract_Cases_In_Decl_Part): Remove local
1599 (Analyze_Pragma): Add processing for pragma
1600 Refined_Global. The analysis of Refined_Post and Refined_Pre
1601 has been merged. Update an error message in the processing of
1602 pragma Refined_State.
1603 (Analyze_Refined_Global_In_Decl_Part): Provide implementation.
1604 (Analyze_Refined_Pragma): New routine.
1605 (Analyze_Refined_Pre_Post_Condition): Removed.
1606 (Analyze_Refined_State_In_Decl_Part): Update the call to Clone.
1607 (Analyze_Refinement_Clause): Make State_Id visible to all
1609 (Check_Matching_Constituent): Establish
1610 a relation between a refined state and its constituent.
1611 (Collect_Hidden_States_In_Decls): Remove ??? comment. Look at
1612 the entity of the object declaration to establish its kind.
1613 * sem_util.adb: Alphabetize with and use clauses.
1614 (Contains_Refined_State): New routine.
1615 * sem_util.ads (Contains_Refined_State): New routine.
1617 2013-10-13 Thomas Quinot <quinot@adacore.com>
1619 * scos.ads: Minor documentation clarification.
1621 2013-10-13 Thomas Quinot <quinot@adacore.com>
1623 * s-oscons-tmplt.c (CLOCK_RT_Ada): Set to CLOCK_MONOTONIC when
1624 building on AIX 5.3 or later, and to CLOCK_REALTIME on older
1626 * init.c (pthread_condattr_setclock): Remove now useless weak symbol.
1627 * thread.c(__gnat_pthread_condattr_setup): Remove bogus AIX 5.2
1629 * s-osinte-aix.ads(clock_id_t): Fix C mapping (this is a 64-bit
1631 (clock_gettime): Import from C runtime library.
1632 * s-osinte-aix.adb (clock_gettime): Remove bogus emulation body,
1633 this routine is provided by the system in current supported
1636 2013-10-13 Robert Dewar <dewar@adacore.com>
1638 * sem_ch3.adb: Minor reformatting.
1640 2013-10-13 Ed Schonberg <schonberg@adacore.com>
1642 * freeze.adb (Freeze_Entity): For a function whose return type
1643 is incomplete, do not replace the type with the full view if the
1644 type is a limited view. In that case the full view appears in a
1645 different unit, and the back-end will retrieve it at the proper
1648 2013-10-13 Yannick Moy <moy@adacore.com>
1650 * exp_spark.adb (Expand_SPARK_Call): Do not introduce temporaries for
1653 2013-10-13 Ed Schonberg <schonberg@adacore.com>
1655 * sem_ch3.adb: in Ada 2012 access_to_function types can have
1657 (Derived_Type_Declaration): SPARK restriction
1658 must be flagged on the original node, since it may have been
1659 written as a subtype declaration.
1660 (Analyze_Subtype_Declaration): Do not enter name of
1661 entity in declaration if it is the current entity, because it may
1662 have been inserted in a previous analysis and it appears in the
1663 else_part of an if-statement that is rewritten during expansion.
1665 2013-10-13 Yannick Moy <moy@adacore.com>
1667 * exp_spark.adb (Expand_SPARK_N_Attribute_Reference): Remove procedure.
1668 (Expand_SPARK): Remove call to Expand_SPARK_N_Attribute_Reference and
1669 Expand_SPARK_N_Simple_Return_Statement.
1670 (Expand_SPARK_N_Simple_Return_Statement,
1671 Expand_SPARK_Simple_Function_Return): Remove procedures.
1673 2013-10-13 Vincent Celier <celier@adacore.com>
1675 * gnat_ugn.texi: Minor editing.
1677 2013-10-13 Ed Schonberg <schonberg@adacore.com>
1679 * sem_ch3.adb (Check_Abstract_Overriding): If a synchronized
1680 operation implements an interface primitive, mark the operation
1681 as referenced, to prevent usually spurious messages about unused
1682 entities: such operations are called in dispatching select
1683 statements that are not visible to the compiler.
1685 2013-10-13 Eric Botcazou <ebotcazou@adacore.com>
1687 * gcc-interface/decl.c (gnat_to_gnu_param): Remove obsolete comment.
1689 2013-10-11 Jakub Jelinek <jakub@redhat.com>
1691 * gcc-interface/utils.c (DEF_FUNCTION_TYPE_8): Define.
1693 2013-10-10 Robert Dewar <dewar@adacore.com>
1695 * par-ch6.adb (Check_Junk_Semicolon_Before_Return): Remove
1698 2013-10-10 Javier Miranda <miranda@adacore.com>
1700 * sem_ch13.adb (Freeze_Entity_Checks): Avoid
1701 loosing errors on CPP entities in -gnatc mode.
1703 2013-10-10 Robert Dewar <dewar@adacore.com>
1705 * sem_ch5.adb (Analyze_If_Statement): Only diagnose redundant
1708 2013-10-10 Robert Dewar <dewar@adacore.com>
1710 * restrict.adb (Check_SPARK_Restriction): Refine test (don't
1711 automatically go to the original node).
1712 * sem_ch11.adb (Analyze_Raise_Statement): Only raise
1713 statements that come from source violate SPARK restrictions.
1714 (Analyze_Raise_xxx_Error): Same fix.
1715 * sem_ch3.adb (Analyze_Object_Declaration): Check OK SPARK
1716 initialization on original node, not on possibly rewritten
1718 * sem_ch4.adb (Analyze_If_Expression): Only if expressions that
1719 come from source violate SPARK mode restrictions.
1721 2013-10-10 Robert Dewar <dewar@adacore.com>
1723 * gnat_ugn.texi: Fix confusing documentation for -gnatyM.
1725 2013-10-10 Yannick Moy <moy@adacore.com>
1727 * errout.adb (Compilation_Errors): In formal verification mode,
1728 always return False.
1730 2013-10-10 Hristian Kirtchev <kirtchev@adacore.com>
1732 * sem_prag.adb (Collect_Hidden_States_In_Decls): Only consider source
1733 non-constant objects.
1735 2013-10-10 Hristian Kirtchev <kirtchev@adacore.com>
1737 * aspects.adb: Add an entry in table Canonical_Aspect for
1739 * aspects.ads: Add entries in tables Aspect_Id, Aspect_Argument,
1740 Aspect_Names and Aspect_Delay for Refined_State.
1741 * einfo.adb: Add with and use clauses for Elists.
1742 Remove Refined_State from the list of node usage.
1743 Add Refined_State_Pragma to the list of node usage.
1744 (Has_Null_Abstract_State): New routine.
1745 (Refined_State): Removed.
1746 (Refined_State_Pragma): New routine.
1747 (Set_Refined_State): Removed.
1748 (Set_Refined_State_Pragma): New routine.
1749 (Write_Field8_Name): Add output for Refined_State_Pragma.
1750 (Write_Field9_Name): Remove the output for Refined_State.
1751 * einfo.ads: Add new synthesized attribute Has_Null_Abstract_State
1752 along with usage in nodes. Remove attribute Refined_State along
1753 with usage in nodes. Add new attribute Refined_State_Pragma along
1754 with usage in nodes.
1755 (Has_Null_Abstract_State): New routine.
1756 (Refined_State): Removed.
1757 (Refined_State_Pragma): New routine.
1758 (Set_Refined_State): Removed.
1759 (Set_Refined_State_Pragma): New routine.
1760 * elists.adb (Clone): New routine.
1761 * elists.ads (Clone): New routine.
1762 * par-prag.adb: Add Refined_State to the pragmas that do not
1763 require special processing by the parser.
1764 * sem_ch3.adb: Add with and use clause for Sem_Prag.
1765 (Analyze_Declarations): Add local variables Body_Id, Context and
1766 Spec_Id. Add processing for delayed aspect/pragma Refined_State.
1767 * sem_ch13.adb (Analyze_Aspect_Specifications): Update the
1768 handling of aspect Abstract_State. Add processing for aspect
1769 Refined_State. Remove the bizzare insertion policy for aspect
1771 (Check_Aspect_At_Freeze_Point): Add an entry for Refined_State.
1772 * sem_prag.adb: Add an entry to table Sig_Flags
1773 for pragma Refined_State.
1774 (Add_Item): Update the
1775 comment on usage. The inserted items need not be unique.
1776 (Analyze_Contract_Cases_In_Decl_Part): Rename variable Restore to
1777 Restore_Scope and update all its occurrences.
1779 Update the handling of pragma Abstract_State. Add processing for
1780 pragma Refined_State.
1781 (Analyze_Pre_Post_Condition_In_Decl_Part):
1782 Rename variable Restore to Restore_Scope and update all its
1784 (Analyze_Refined_State_In_Decl_Part): New routine.
1785 * sem_prag.ads (Analyze_Refined_State_In_Decl_Part): New routine.
1786 * snames.ads-tmpl: Add new predefined name for Refined_State. Add
1787 new Pragma_Id for Refined_State.
1789 2013-10-10 Ed Schonberg <schonberg@adacore.com>
1791 * sem_ch10.adb (Install_Limited_Withed_Unit): handle properly the
1792 case of a record declaration in a limited view, when the record
1793 contains a self-referential component of an anonymous access type.
1795 2013-10-10 Thomas Quinot <quinot@adacore.com>
1797 * exp_ch4.adb (Process_Transient_Object): For any context other
1798 than a simple return statement, insert the finalization action
1799 after the context, not as an action on the context (which will
1800 get evaluated before it).
1802 2013-10-10 Hristian Kirtchev <kirtchev@adacore.com>
1804 * einfo.adb (Write_Field19_Name): Correct the
1805 string name of attribute Default_Aspect_Value.
1807 2013-10-10 Ed Schonberg <schonberg@adacore.com>
1809 * sem_type.adb (Interface_Present_In_Ancestor): The progenitor
1810 in a type declaration may be an interface subtype.
1812 2013-10-10 Robert Dewar <dewar@adacore.com>
1814 * sinfo.ads (Do_Range_Check): Add special note on handling of
1815 range checks for Succ and Pred.
1817 2013-10-10 Robert Dewar <dewar@adacore.com>
1819 * erroutc.adb (Output_Msg_Text): Remove VMS special handling.
1821 2013-10-10 Robert Dewar <dewar@adacore.com>
1823 * a-chahan.ads, a-chahan.adb (Is_Line_Terminator): New function
1824 (Is_Mark): New function.
1825 (Is_Other_Format): New function.
1826 (Is_Punctuation_Connector): New function.
1827 (Is_Space): New function.
1829 2013-10-10 Robert Dewar <dewar@adacore.com>
1831 * sem_aggr.adb (Resolve_Array_Aggregate): Redo duplicate/missing
1832 choice circuit. Was not quite right in some cases, which showed
1833 up in ACATS test B43201C.
1834 * sem_attr.adb (Address_Checks): Make sure name is set right
1835 for some messages issued.
1836 * mlib-prj.adb: Minor code reorganization.
1837 * gnat_ugn.texi: Remove special VMS doc for tagging of warning msgs.
1838 * exp_ch9.adb: Minor reformatting.
1840 2013-10-10 Tristan Gingold <gingold@adacore.com>
1842 * lib-writ.adb (Write_Unit_Information): Adjust previous patch.
1844 2013-10-10 Robert Dewar <dewar@adacore.com>
1846 * sem_ch5.adb (Analyze_If_Statement): Warn on redundant if
1848 * sem_util.ads, sem_util.adb (Has_No_Obvious_Side_Effects): New
1851 2013-10-10 Ed Schonberg <schonberg@adacore.com>
1853 * exp_ch9.adb (Expand_N_Timed_Entry_Call): Simplify expansion
1854 for the case of a dispatching trigger: there is no need to
1855 duplicate the code or create a subprogram to encapsulate the
1856 triggering statements. This allows exit statements in the
1857 triggering statements, that refer to enclosing loops.
1859 2013-10-10 Robert Dewar <dewar@adacore.com>
1861 * freeze.adb: Minor reformatting.
1862 * sem_ch13.adb (Freeze_Entity_Checks): New procedure
1863 (Analyze_Freeze_Entity): Call Freeze_Entity_Checks
1864 (Analyze_Freeze_Generic_Entity): Call Freeze_Entity_Checks.
1865 * sinfo.ads: Add syntax for sprint for Freeze_Generic_Entity.
1866 * sprint.ads: Add syntax for freeze generic entity node.
1868 2013-10-10 Robert Dewar <dewar@adacore.com>
1870 * einfo.adb, einfo.ads: Minor comment updates.
1872 2013-10-10 Robert Dewar <dewar@adacore.com>
1874 * lib-writ.adb (Write_Unit_Information): Fatal error if linker
1875 options are detected in a predefined generic unit.
1877 2013-10-10 Thomas Quinot <quinot@adacore.com>
1879 * s-oscons-tmplt.c (CLOCK_REALTIME): Always define, possibly using
1880 a dummy placeholder value.
1881 (NEED_PTHREAD_CONDATTR_SETCLOCK): Remove, not needed anymore.
1882 * thread.c: Adjust #if test accordingly.
1884 2013-10-10 Hristian Kirtchev <kirtchev@adacore.com>
1886 * exp_ch6.adb (Consequence_Error): Generate an
1887 implicit if statement.
1888 (Expand_Contract_Cases): Generate an implicit if statement.
1889 (Process_Contract_Cases): Do not expand Contract_Cases when no code
1892 2013-10-10 Robert Dewar <dewar@adacore.com>
1894 * sem_attr.adb (Address_Checks): New procedure.
1896 2013-10-10 Ed Schonberg <schonberg@adacore.com>
1898 * sinfo.ads, sinfo.adb: New Node Freeze_Generic_Entity, to trigger
1899 semantic actions at the proper point for entities that previously
1900 had no explicit freeze point.
1901 * freeze.adb (Freeze_Generic_Entities): generate new nodes to
1902 indicate the point at which semantic checks can be performed on
1903 entities declared in generic packages.
1904 * sem_ch13.ads, sem_ch13.adb: New procedure
1905 Analyze_Freeze_Generic_Entity.
1906 * exp_util.adb (Insert_Actions): Treat new node like Freeze_Entity.
1907 * sem.adb (Analyze): Call Analyze_Freeze_Generic_Entity.
1908 * sprint.adb (Sprint_Node): display Analyze_Freeze_Generic_Entity.
1909 * gcc-interface/trans.c: Ignore Analyze_Freeze_Generic_Entity.
1910 * gcc-interface/Make-lang.in: Update dependencies.
1912 2013-10-10 Robert Dewar <dewar@adacore.com>
1914 * sem_aggr.adb (Resolve_Array_Aggregate): Identify duplicated
1917 2013-10-10 Robert Dewar <dewar@adacore.com>
1919 * sem_ch9.adb (Analyze_Task_Body): Aspects are illegal
1920 (Analyze_Protected_Body): Aspects are illegal.
1922 2013-10-10 Robert Dewar <dewar@adacore.com>
1924 * sem_ch6.adb, sem_ch13.adb: Minor reformatting.
1925 * sem_case.adb (Check_Choices): Fix bad listing of missing
1926 values from predicated subtype case (Check_Choices): List
1928 * errout.adb (Set_Msg_Text): Process warning tags in VMS mode
1929 * erroutc.adb (Output_Msg_Text): Handle VMS warning tags
1930 * gnat_ugn.texi: Document /WARNINGS=TAG_WARNINGS for VMS
1931 * ug_words: Add entries for -gnatw.d and -gnatw.D
1932 * vms_data.ads: Add [NO]TAG_WARNINGS for -gnatw.D/-gnatw.d
1933 * lib-writ.ads: Documentation fixes
1935 2013-10-10 Robert Dewar <dewar@adacore.com>
1937 * a-wichha.adb, a-wichha.ads, a-zchhan.adb, a-zchhan.ads
1938 (Is_Other_Format): New name for Is_Other.
1939 (Is_Punctuation_Connector): New name for Is_Punctuation
1941 2013-10-10 Hristian Kirtchev <kirtchev@adacore.com>
1943 * aspects.adb: Add entries in table Canonical_Aspects for aspects
1944 Refined_Depends and Refined_Global.
1945 * aspects.ads: Add entries in tables Aspect_Id, Aspect_Argument,
1946 Aspect_Names, Aspect_Declay, Aspect_On_Body_Or_Stub_OK for
1947 aspects Refined_Depends and Refined_Global.
1948 * einfo.adb (Contract): Subprogram bodies are now valid owners
1950 (Set_Contract): Subprogram bodies are now valid
1951 owners of contracts.
1952 (Write_Field24_Name): Output the contract
1953 attribute for subprogram bodies.
1954 * exp_ch6.adb (Expand_Subprogram_Contract): New routine.
1955 * exp_ch6.ads (Expand_Subprogram_Contract): New routine.
1956 * par-prag.adb: Pragmas Refined_Depends and Refined_Global do
1957 not require any special processing by the parser.
1958 * sem_ch3.adb (Adjust_D): Renamed to Adjust_Decl.
1959 (Analyze_Declarations): Code reformatting. Analyze the contract
1960 of a subprogram body at the end of the declarative region.
1961 * sem_ch6.adb (Analyze_Generic_Subprogram_Body):
1962 Subprogram bodies can now have contracts. Use
1963 Expand_Subprogram_Contract to handle the various contract
1965 (Analyze_Subprogram_Body_Contract): New null routine.
1966 (Analyze_Subprogram_Body_Helper): Subprogram bodies can now have
1967 contracts. Use Expand_Subprogram_Contract to handle the various
1968 contract assertions.
1969 (Analyze_Subprogram_Contract): Add local
1970 variable Nam. Update the call to Analyze_PPC_In_Decl_Part. Capture
1971 the pragma name in Nam.
1972 (Process_PPCs): Removed.
1973 * sem_ch6.ads (Analyze_Subprogram_Body_Contract): New routine.
1974 (Analyze_Subprogram_Contract): Update the comment on usage.
1975 * sem_ch13.adb (Analyze_Aspect_Specifications): Add null
1976 implementations for aspects Refined_Depends and Refined_Global.
1977 (Check_Aspect_At_Freeze_Point): Aspects Refined_Depends and
1978 Refined_Global do not need to be checked at the freeze point.
1979 * sem_prag.adb: Add entries in table Sig_Flags
1980 for pragmas Refined_Depends and Refined_Global.
1981 (Analyze_Contract_Cases_In_Decl_Part): Add local
1982 variable Restore. Use Restore to pop the scope.
1983 (Analyze_Depends_In_Decl_Part): Add local variable Restore. Use
1984 Restore to pop the scope.
1985 (Analyze_Global_In_Decl_List): Add local variable Restore. Use Restore
1987 (Analyze_PPC_In_Decl_Part): Renamed to
1988 Analyze_Pre_Post_Condition_In_Decl_Part.
1990 Add null implementations for pragmas Refined_Depends and
1991 Refined_Global. Refined_Pre and Refined_Post are now
1992 handled by routine Analyze_Refined_Pre_Post_Condition
1994 (Analyze_Refined_Depends_In_Decl_Part): New
1996 (Analyze_Refined_Global_In_Decl_Part):
1998 (Analyze_Refined_Pre_Post):
1999 Renamed to Analyze_Refined_Pre_Post_Condition.
2000 (Analyze_Refined_Pre_Post_Condition): Analyze the boolean
2002 (Check_Precondition_Postcondition): Update the call
2003 to Analyze_PPC_In_Decl_Part.
2004 * sem_prag.ads: Add entries in table
2005 Pragma_On_Body_Or_Stub_OK for pragmas Refined_Depends
2007 (Analyze_PPC_In_Decl_Part): Renamed
2008 to Analyze_Pre_Post_Condition_In_Decl_Part. Update the
2010 (Analyze_Refined_Depends_In_Decl_Part): New routine.
2011 (Analyze_Refined_Global_In_Decl_Part): New routine.
2012 (Analyze_Test_Case_In_Decl_Part): Update the comment on usage.
2013 * sem_util.adb (Add_Contract_Item): Rename formal Item to Prag
2014 and update all occurrences. Subprogram body contracts can now
2015 contain pragmas Refined_Depends and Refined_Global.
2016 * sem_util.ads (Add_Contract_Item): Rename formal Item to
2017 Prag. Update the comment on usage.
2018 * sinfo.ads: Update the comment on structure and usage of
2020 * snames.ads-tmpl: Add new predefined names for Refined_Depends
2021 and Refined_Global. Add entries in table Pragma_Id for
2022 Refined_Depends and Refined_Global.
2024 2013-10-10 Robert Dewar <dewar@adacore.com>
2026 * types.ads: Minor reformatting.
2028 2013-10-10 Thomas Quinot <quinot@adacore.com>
2030 * s-taprop-posix.adb: Add missing comment.
2032 2013-10-10 Robert Dewar <dewar@adacore.com>
2034 * freeze.adb (Freeze_Record_Type): Move choice checking to
2035 Analyze_Freeze_Entity (Freeze_Record_Type): Make sure all choices
2037 * sem_case.adb (Check_Choices): Remove misguided attempt to
2038 freeze choices (this is now done in Freeze_Record_Type where
2040 (Check_Choices): Remove some analyze/resolve calls
2041 that are redundant since they are done in Analyze_Choices.
2042 * sem_ch13.adb (Analyze_Freeze_Entity): Do the error
2043 checking for choices in variant records here (moved here from
2044 Freeze.Freeze_Record_Type)
2046 2013-10-10 Thomas Quinot <quinot@adacore.com>
2048 * s-oscons-tmplt.c, s-taprop-posix.adb (CLOCK_REALTIME): Always define,
2049 possibly using a dummy placeholder value.
2050 (Compute_Deadline): For the case of an
2051 Absolute_Calendar deadline, if the target uses another clock
2052 than CLOCK_REALTIME as CLOCK_RT_Ada, compensate for possible
2055 2013-10-10 Ed Schonberg <schonberg@adacore.com>
2057 * sem_ch8.adb (Find_Expanded_Name): Handle properly a fully
2058 qualified reference to a generic child unit within itself,
2059 in an instantiation.
2061 2013-10-10 Pascal Obry <obry@adacore.com>
2063 * prj-conf.adb: Minor typo fixes in comment.
2065 2013-10-10 Thomas Quinot <quinot@adacore.com>
2067 * s-taprop-posix.adb (Compute_Deadline): New local subprogram,
2068 factors common code between Timed_Sleep and Timed_Delay.
2070 2013-10-10 Robert Dewar <dewar@adacore.com>
2072 * freeze.adb (Freeze_Record_Type): Don't replace others if
2073 expander inactive. This avoids clobbering the ASIS tree in
2076 2013-10-10 Robert Dewar <dewar@adacore.com>
2078 * sem_res.adb (Resolve_Op_Expon): Avoid crash testing for
2079 fixed-point case in preanalysis mode (error will be caught during
2082 2013-10-10 Robert Dewar <dewar@adacore.com>
2084 * gnat_rm.texi: Refined_Pre and Refined_Post are now allowed as
2085 assertion identifiers for pragma Assertion_Policy.
2086 * sem_prag.adb (Is_Valid_Assertion_Kind): Add Refined_Pre/Refined_Post
2087 * sem_ch13.adb: Minor reformatting.
2089 2013-10-10 Pascal Obry <obry@adacore.com>
2091 * prj-conf.adb: Code refactoring.
2093 2013-10-10 Hristian Kirtchev <kirtchev@adacore.com>
2095 * einfo.adb: Remove Integrity_Level from the node usage list.
2096 (Has_Option): Update the implementation to match
2097 the new terminology.
2098 (Has_Property): Renamed to Has_Option.
2099 (Integrity_Level): Removed.
2100 (Is_External_State): New routine.
2101 (Is_Input_Only_State): Use Has_Option to determine whether a state
2102 is Input_Only. (Is_Input_State): Renamed to Is_Input_Only_State.
2103 (Is_Output_Only_State): Use Has_Option to determine whether
2104 a state is Output_Only.
2105 (Is_Output_State): Renamed to
2106 Is_Output_Only_State.
2107 (Is_Volatile_State): Use Has_Option to determine whether a state is
2109 (Set_Integrity_Level): Removed.
2110 (Write_Field8): Remove the entry for Integrity_Level.
2111 * einfo.ads: Remove Integrity_Level along with its documentation
2112 and usage in nodes. Rename Is_Input_State to Is_Input_Only_State.
2113 Rename Is_Output_State to Is_Output_Only_State. Update the
2114 documentation of Is_Volatile_State. Update the node structure of
2116 (Integrity_Level): Removed along with pragma Inline.
2117 (Is_External_State): New routine.
2118 (Is_Input_State): Renamed to Is_Input_Only_State.
2119 (Is_Output_State): Renamed to Is_Output_Only_State.
2120 (Set_Integrity_Level): Removed along with pragma Inline.
2121 * sem_prag.adb (Analyze_Pragma): Update the checks regarding
2122 global items and abstract state modes. Update the implementation
2123 of pragma Abstract_State to reflect the new rules and terminology.
2124 * snames.ads-tmpl: Remove the predefined name for Integrity
2125 level. Add new predefined names for Input_Only, Non_Volatile,
2126 Output_Only and Part_Of.
2128 2013-10-10 Ed Schonberg <schonberg@adacore.com>
2130 * lib-xref.adb (Generate_Reference): Do not generate a reference
2131 within a _postcondition procedure: a proper source reference has
2132 already been generated when pre- analyzing the original aspect
2133 specification, and the use of a formal in a pre/postcondition
2134 should not count as a proper use in a subprogram body.
2136 2013-10-10 Robert Dewar <dewar@adacore.com>
2138 * sem_eval.adb (Why_Non_Static): Fix bomb for deferred constant
2141 2013-10-10 Hristian Kirtchev <kirtchev@adacore.com>
2143 * aspects.adb: Add an entry for Aspect_Refined_Post in table
2145 * aspects.ads: Add an entry for Aspect_Refined_Post in tables
2146 Aspect_Id, Aspect_Argument, Aspect_Names, Aspect_Delay,
2147 Aspect_On_Body_Or_Stub_OK. Update the comment on the use of
2148 table Aspect_On_Body_Or_Stub_OK.
2149 * par-prag.adb: Add pragma Refined_Post to the list of pragmas
2150 that do not require special processing by the parser.
2151 * sem_attr.adb (Analyze_Attribute): Add special analysis for
2152 attributes 'Old and 'Result when code generation is disabled and
2153 they appear in aspect/pragma Refined_Post.
2154 (In_Refined_Post): New routine.
2155 * sem_ch6.adb (Analyze_Expression_Function): Move various
2156 aspects and/or pragmas that apply to an expression function to the
2157 corresponding spec or body.
2158 (Collect_Body_Postconditions): New routine.
2159 (Process_PPCs): Use routine Collect_Body_Postconditions
2160 to gather all postcondition pragmas.
2161 * sem_ch10.adb (Analyze_Proper_Body): Use routine
2162 Relocate_Pragmas_To_Body to move all source pragmas that follow
2163 a body stub to the proper body.
2164 (Move_Stub_Pragmas_To_Body): Removed.
2165 * sem_ch13.adb (Analyze_Aspect_Specifications): Add processing
2166 for aspect Refined_Post.
2167 (Check_Aspect_At_Freeze_Point): Aspect
2168 Refined_Post does not need delayed processing at the freeze point.
2169 * sem_prag.adb: Add an entry for pragma Refined_Post in
2171 (Analyze_Pragma): Add processing for pragma
2172 Refined_Post. Update the processing of pragma Refined_Pre
2173 to use common routine Analyze_Refined_Pre_Post.
2174 (Analyze_Refined_Pre_Post): New routine.
2175 (Relocate_Pragmas_To_Body): New routine.
2176 * sem_prag.ads: Table Pragma_On_Stub_OK is now known as
2177 Pragma_On_Body_Or_Stub_OK. Update the comment on usage of
2178 table Pragma_On_Body_Or_Stub_OK.
2179 (Relocate_Pragmas_To_Body): New routine.
2180 * snames.ads-tmpl: Add new predefined name for Refined_Post. Add
2181 new Pragma_Id for Refined_Post.
2183 2013-10-10 Robert Dewar <dewar@adacore.com>
2185 * exp_ch3.adb (Expand_N_Variant_Part): Now null, expansion of
2186 last choice to others is moved to Freeze_Record_Type.
2187 * freeze.adb (Freeze_Record_Type): Expand last variant to others
2188 if necessary (moved here from Expand_N_Variant_Part
2190 2013-10-10 Robert Dewar <dewar@adacore.com>
2192 * lib-xref-spark_specific.adb, par-ch13.adb, sem_prag.adb, sem_prag.ads,
2193 sem_ch12.adb, sem_attr.adb, sem_ch6.adb, sem_ch13.adb, a-sequio.adb,
2194 s-atocou-builtin.adb: Minor reformatting.
2196 2013-10-10 Thomas Quinot <quinot@adacore.com>
2198 * s-oscons-tmplt.c (NEED_PTHREAD_CONDATTR_SETCLOCK): This
2199 constant needs to be output to s-oscons.h, as it is tested
2202 2013-10-10 Robert Dewar <dewar@adacore.com>
2204 * exp_ch3.adb (Expand_N_Variant_Part): Don't expand choices, too early
2205 * exp_ch5.adb (Expand_N_Case_Statement): Use new Has_SP_Choice
2206 flag to avoid expanding choices when not necessary.
2207 * exp_util.adb: Minor reformatting
2208 * freeze.adb (Freeze_Record_Type): Redo expansion of variants
2209 * sem_aggr.adb: Minor reformatting
2210 * sem_case.ads, sem_case.adb: Major rewrite, separating Analysis and
2211 Checking of choices.
2212 * sem_ch3.adb (Analyze_Variant_Part): Rewrite to call new
2214 * sem_ch4.adb (Analyze_Case_Expression): Call Analyze_Choices
2216 * sem_ch5.adb (Analyze_Case_Statement): Call Analyze_Choices
2218 * sem_util.adb: Minor reformatting
2219 * sinfo.ads, sinfo.adb (Has_SP_Choice): New flag.
2221 2013-10-10 Vincent Celier <celier@adacore.com>
2223 * mlib-prj.adb (Build_Library): Do not issue link dynamic
2224 libraries with an Rpath, if switch -R was used.
2226 2013-10-10 Tristan Gingold <gingold@adacore.com>
2228 * s-stalib.ads (Image_Index_Table_8, Image_Index_Table_16,
2229 Image_Index_Table_32): Remove as not used.
2230 * s-imgint.adb (Image_Integer): Call Set_Image_Integer and
2231 remove duplicated code.
2233 2013-10-10 Hristian Kirtchev <kirtchev@adacore.com>
2235 * sem_prag.adb (Analyze_Pragma): Provide a
2236 more precise error message when pragma Refined_Pre applies to
2237 an expression function that is not a completion.
2239 2013-10-10 Thomas Quinot <quinot@adacore.com>
2241 * sem_attr.adb (Analyse_Attribute, case
2242 Attribute_Scalar_Storage_Order): a 'Scalar_Storage_Order attribute
2243 reference for a generic type is permitted in GNAT runtime mode.
2244 * a-sequio.adb (Read, Write): Use the endianness of the actual
2245 type to encode length information written to the file.
2247 2013-10-10 Ed Schonberg <schonberg@adacore.com>
2249 * par-ch13.adb (Aspect_Specifications_Present)): In earlier than
2250 Ada2012 mode, assume that a legal aspect name following "with"
2251 keyword is an older gnat switch and not a misplaced with_clause.
2253 2013-10-10 Hristian Kirtchev <kirtchev@adacore.com>
2255 * aspects.adb: Add an entry for Aspect_Refined_Pre in
2256 table Canonical_Aspect.
2257 (Aspects_On_Body_OK): Renamed to
2258 Aspects_On_Body_Or_Stub_OK.
2259 (Aspects_On_Body_Or_Stub_OK):
2260 Update the query in table Aspect_On_Body_OK.
2261 * aspects.ads: Add an entry for Aspect_Refined_Pre in tables
2262 Aspect_Id, Aspect_Argument, Aspect_Names, Aspect_Delay,
2263 Aspect_On_Body_Or_Stub_OK. Table Aspect_On_Body_OK is now known as
2264 Aspect_On_Body_Or_Stub_OK. Add a section of aspect specifications
2265 that apply to body stubs.
2266 (Aspects_On_Body_OK): Renamed to Aspects_On_Body_Or_Stub_OK.
2267 (Aspects_On_Body_Or_Stub_OK): Update the comment on usage.
2268 * par-prag.adb: Add pragma Refined_Pre to the list of pragmas
2269 that do not require special processing by the parser.
2270 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Delay the
2271 analysis of aspect specifications that apply to a body stub
2272 until the proper body is analyzed.
2273 * sem_ch10.adb: Add with and use clause for Sem_Ch13.
2274 (Analyze_Package_Body_Stub): Set the corresponding spec of the stub.
2275 (Analyze_Proper_Body): Relocate all pragmas that apply
2276 to a subprogram body stub to the declarations of the proper
2277 body. Analyze the aspect specifications of the stub when the
2278 proper body is not present.
2279 (Analyze_Protected_Body_Stub): Set the corresponding spec of the stub.
2280 (Analyze_Task_Body_Stub): Set the corresponding spec of the stub.
2281 (Move_Stub_Pragmas_To_Body): New routine.
2282 * sem_ch13.adb (Analyze_Aspect_Specifications): Add processing
2283 for aspect Refined_Pre.
2284 (Check_Aspect_At_Freeze_Point): Aspect
2285 Refined_Pre does not need delayed processing at the freeze point.
2286 * sem_prag.adb: Remove with and use clause for Snames. Add
2287 an entry for Pragma_Refined_Pre in table Sig_Flags.
2288 (Analyze_Pragma): Add processing for pragma Refined_Pre.
2289 * sem_prag.ads: Add with and use clause for Snames. Add table
2291 * sinfo.adb (Corresponding_Spec_Of_Stub): New routine.
2292 (Set_Corresponding_Spec_Of_Stub): New routine.
2293 * sinfo.ads: Add new attribute Corresponding_Spec_Of_Stub
2294 along with comment on usage and occurrences in nodes.
2295 (Corresponding_Spec_Of_Stub): New routine along with pragma
2297 (Set_Corresponding_Spec_Of_Stub): New routine along
2299 * snames.ads-tmpl: Add new predefined name for Refined_Pre. Add
2300 new Pragma_Id for Refined_Pre.
2302 2013-10-10 Ed Schonberg <schonberg@adacore.com>
2304 * sem_ch12.adb (Analyze_Package_Instantiation,
2305 Analyze_Subprogram_Instantiation): Improve error message when
2306 name in instantiation does not designate a generic unit of the
2309 2013-10-10 Robert Dewar <dewar@adacore.com>
2311 * exp_ch3.adb (Expand_N_Variant_Part): Expand statically
2312 predicated subtype which appears in Discrete_Choices list.
2313 * exp_ch5.adb (Expand_N_Case_Statement): Expand statically
2314 predicated subtype which appears in Discrete_Choices list of
2315 case statement alternative.
2316 * exp_util.ads, exp_util.adb (Expand_Static_Predicates_In_Choices): New
2318 * sem_case.adb: Minor reformatting (Analyze_Choices): Don't
2319 expand out Discrete_Choices that are names of subtypes with
2320 static predicates. This is now done in the analyzer so that the
2321 -gnatct tree is properly formed for ASIS.
2322 * sem_case.ads (Generic_Choices_Processing): Does not apply
2323 to aggregates any more, so change doc accordingly, and remove
2324 unneeded Get_Choices argument.
2325 * sem_ch3.adb (Analyze_Variant_Part): Remove no
2326 longer used Get_Choices argument in instantiation of
2327 Generic_Choices_Processing.
2328 * sem_ch4.adb (Analyze_Case_Expression): Remove no
2329 longer used Get_Choices argument in instantiation of
2330 Generic_Choices_Processing.
2331 * sem_ch5.adb (Analyze_Case_Statement): Remove no
2332 longer used Get_Choices argument in instantiation of
2333 Generic_Choices_Processing.
2334 * sinfo.ads: For N_Variant_Part, and N_Case_Statement_Alternative,
2335 document that choices that are names of statically predicated
2336 subtypes are expanded in the code generation tree passed to the
2337 back end, but not in the ASIS tree generated for -gnatct.
2339 2013-10-10 Ed Schonberg <schonberg@adacore.com>
2341 * sem_ch7.adb: Revert previous change.
2343 2013-10-10 Gary Dismukes <dismukes@adacore.com>
2345 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): In the case where
2346 the Storage_Pool aspect is specified by an aspect clause and a
2347 renaming is used to capture the evaluation of the pool name,
2348 insert the renaming in front of the aspect's associated entity
2349 declaration rather than in front of the corresponding attribute
2350 definition (which hasn't been appended to the declaration
2353 2013-10-10 Ed Schonberg <schonberg@adacore.com>
2355 * sem_ch6.adb (Is_Interface_Conformant): The controlling type
2356 of the interface operation is obtained from the ultimate alias
2357 of the interface primitive parameter, because that may be in
2358 fact an implicit inherited operation whose signature involves
2359 the type extension and not the desired interface.
2361 2013-10-10 Ed Schonberg <schonberg@adacore.com>
2363 * par-ch13.adb (Aspect_Specifications_Present): In Ada 2012,
2364 recognize an aspect specification with a misspelled name if it
2365 is followed by a a comma or semicolon.
2367 2013-10-10 Vadim Godunko <godunko@adacore.com>
2369 * s-atocou.adb, s-atocou.ads, s-atocou-x86.adb, s-atocou-builtin.adb:
2370 Fix copyright notice.
2372 2013-10-10 Yannick Moy <moy@adacore.com>
2374 * lib-xref-spark_specific.adb (Enclosing_Subprogram_Or_Package): Get
2375 enclosing subprogram for precondition/postcondition/contract cases.
2377 2013-10-10 Robert Dewar <dewar@adacore.com>
2379 * gnat_rm.texi: Minor fix.
2381 2013-10-10 Robert Dewar <dewar@adacore.com>
2383 * sem_ch13.adb (Analyze_Attribute_Definition_Clause, case
2384 Address): Remove the Comes_From_Source test for the overlap
2387 2013-10-10 Robert Dewar <dewar@adacore.com>
2389 * sem_util.adb: Minor code reorganization (use Nkind_In).
2390 * sem_warn.adb: Minor code reorganization (optimization in
2391 Check_Unset_Reference).
2392 * exp_ch9.adb, exp_ch4.adb, sinfo.ads: Minor reformatting.
2394 2013-10-10 Ed Schonberg <schonberg@adacore.com>
2396 * sem_ch7.adb (Install_Parent_Private_Declarations): When
2397 instantiating a child unit, do not install private declaration of
2398 a non-generic ancestor of the generic that is also an ancestor
2399 of the current unit: its private part will be installed when
2400 private part of ancestor itself is analyzed.
2402 2013-10-10 Thomas Quinot <quinot@adacore.com>
2404 * freeze.adb (Check_Component_Storage_Order): Retrieve component
2405 aliased status from type entities directly instead of going back
2406 to original component definition.
2407 * sem_ch7.adb: Minor reformatting.
2409 2013-10-10 Robert Dewar <dewar@adacore.com>
2411 * sem_ch13.adb (Analyze_Aspect_Specifications): For Address
2412 attribute, consider it to be set in source, because of aliasing
2414 (Analyze_Attribute_Definition_Clause): For the
2415 purpose of warning on overlays, take into account the aspect case.
2417 2013-10-10 Robert Dewar <dewar@adacore.com>
2419 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads, a-cforse.ads,
2420 a-cofove.ads: Minor reformatting.
2422 2013-10-10 Arnaud Charlet <charlet@adacore.com>
2424 * gnat_ugn.texi: Remove obsolete mention to -laddr2line.
2426 2013-10-10 Ed Schonberg <schonberg@adacore.com>
2428 * exp_ch4.adb (Expand_N_Case_Expression): Indicate that the
2429 generated variable used as a target of the expression needs
2432 2013-10-10 Jose Ruiz <ruiz@adacore.com>
2434 * exp_util.adb (Corresponding_Runtime_Package): Remove the condition
2435 related to No_Dynamic_Attachment which was wrong. Protected types
2436 with interrupt handlers (when not using a restricted profile)
2437 are always treated as protected types with entries, regardless
2438 of the No_Dynamic_Attachment restriction.
2439 * exp_ch9.adb (Expand_N_Protected_Type_Declaration): Simplify the code
2440 using the result of Corresponding_Runtime_Package.
2441 (Install_Private_Data_Declarations): When having
2442 static handlers and a non restricted profile, we use the
2443 type Static_Interrupt_Protection always, so we removed an
2444 extra wrong condition looking at the No_Dynamic_Attachment
2445 restriction. Simplify the code using the result of
2446 Corresponding_Runtime_Package.
2447 (Make_Initialize_Protection): Simplify the code using
2448 the result of Corresponding_Runtime_Package.
2449 (Install_Private_Data_Declaration): The No_Dynamic_Attachment
2450 restriction has nothing to do with static handlers. Remove the extra
2451 erroneous condition that was creating the wrong data type.
2453 2013-10-10 Hristian Kirtchev <kirtchev@adacore.com>
2455 * sem_util.adb (Is_Object_Reference): Attribute
2456 'Old produces an object reference.
2457 * gnat_rm.texi: Define accessibility level of
2458 X'Update(...) result.
2460 2013-10-10 Yannick Moy <moy@adacore.com>
2462 * gnat_rm.texi, a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
2463 a-cforse.ads, a-cofove.ads: Update comment and doc of formal containers
2465 2013-10-10 Ed Schonberg <schonberg@adacore.com>
2467 * sem_ch13.adb (Analyze_Aspect_Specifications): For Pre/Post
2468 conditions that apply to a subprogram body, preserve the placement
2469 and order of the generated pragmas, which must appear before
2470 other declarations in the body.
2472 2013-10-10 Bob Duff <duff@adacore.com>
2474 * gnat_ugn.texi: Add gnat2xml doc.
2476 2013-10-10 Doug Rupp <rupp@adacore.com>
2478 * s-vxwork-arm.ads: Fix interface to FP_CONTEXT.
2480 2013-10-10 Ed Schonberg <schonberg@adacore.com>
2482 * sem_ch13.adb (Analyze_Aspect_Specification): An aspect Import
2483 on a variable need not have a convention specified, as long as
2484 the implicit convention of the object, obtained from its type,
2485 is Ada or Ada-related.
2487 2013-10-10 Robert Dewar <dewar@adacore.com>
2489 * cstand.adb (Standard_Unsigned_64): New internal type.
2490 * gnat_rm.texi: Update documentation on To_Address.
2491 * sem_attr.adb (Analyze_Attribute, case To_Address): Fix
2492 problem with out of range static values given as literals or
2494 * stand.ads (Standard_Unsigned_64): New internal type.
2495 * stand.adb: Minor reformatting.
2497 2013-10-10 Ed Schonberg <schonberg@adacore.com>
2499 * sem_ch4.adb (Analyze_Selected_Component,
2500 Has_Mode_Conformant_Spec): If selected component may be an
2501 indexing of a parameterless call to a protected function, and
2502 expansion is disabled, this is a valid candidate interpretation.
2504 2013-10-10 Arnaud Charlet <charlet@adacore.com>
2506 * gnat_ugn.texi: Minor editing.
2508 2013-10-10 Robert Dewar <dewar@adacore.com>
2510 * gnatlink.adb: Minor reformatting.
2512 2013-10-10 Yannick Moy <moy@adacore.com>
2514 * debug.adb: Free flag d.E and change doc for flag d.K.
2516 2013-10-10 Ed Schonberg <schonberg@adacore.com>
2518 * sem_prag.adb (Check_Precondition_Postcondition): If the
2519 pragma comes from an aspect spec, and the subprogram is a
2520 library unit, treat as a ppc in a declarative part in ASIS mode,
2521 so that expression in aspect is properly analyzed. In this case
2522 there is no later point at which the aspect specification would
2525 2013-10-10 Bob Duff <duff@adacore.com>
2527 * opt.ads: Minor comment fix.
2529 2013-10-10 Vadim Godunko <godunko@adacore.com>
2531 * a-coinho-shared.ads, a-coinho-shared.adb: New file.
2532 * s-atocou.ads: Add procedure to initialize counter.
2533 * s-atocou.adb: Likewise.
2534 * s-atocou-builtin.adb: Likewise.
2535 * s-atocou-x86.adb: Likewise.
2536 * gcc-interface/Makefile.in: Select special version of
2537 Indefinite_Holders package on platforms where atomic built-ins
2538 are supported. Update tools target pairs for PikeOS.
2540 2013-10-10 Robert Dewar <dewar@adacore.com>
2542 * sem_ch3.adb: Minor reformatting.
2544 2013-10-10 Robert Dewar <dewar@adacore.com>
2546 * sinput-c.adb (Load_File): Ensure Source_Align alignment.
2547 * sinput-d.adb (Create_Debug_Source): Ensure Source_Align alignment.
2548 * sinput-l.adb (Create_Instantiation_Source): Ensure Source_Align
2551 * sinput.ads, sinput.adb (Get_Source_File_Index): New optimized (single
2553 * types.ads (Source_Align): New definition.
2554 (Source_Buffer): Document new alignment requirement.
2556 2013-10-10 Robert Dewar <dewar@adacore.com>
2558 * sem_prag.adb (Analyze_Pragma, case Linker_Section): Allow
2561 2013-10-10 Robert Dewar <dewar@adacore.com>
2563 * gnat_rm.texi: Minor adjustment to doc for To_Address attribute.
2565 2013-10-10 Vadim Godunko <godunko@adacore.com>
2567 * s-stopoo.ads (Root_Storage_Pool): Add pragma
2568 Preelaborable_Initialization.
2570 2013-09-25 Tom Tromey <tromey@redhat.com>
2572 * gcc-interface/Makefile.in (OUTPUT_OPTION): Define as "-o $@".
2574 2013-09-18 Eric Botcazou <ebotcazou@adacore.com>
2577 * gcc-interface/trans.c (Attribute_to_gnu): Define GNAT_PREFIX local
2578 variable and use it throughout.
2579 <Attr_Length>: Note whether the prefix is the dereference of a pointer
2580 to unconstrained array and, in this case, capture the result for both
2581 Attr_First and Attr_Last.
2583 2013-09-18 Eric Botcazou <ebotcazou@adacore.com>
2585 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Abstract_State>: New.
2587 2013-09-18 Eric Botcazou <ebotcazou@adacore.com>
2589 * gcc-interface/trans.c (gigi): Remove dead code.
2591 2013-09-18 Eric Botcazou <ebotcazou@adacore.com>
2593 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Pop the stack of
2594 return variables for subprograms using the CICO mechanism.
2596 2013-09-13 Dominique Dhumieres <dominiq@lps.ens.fr>
2598 * gcc-interface/Makefile.in: Fix darwin Filter to match on $target_os,
2601 2013-09-11 Thomas Schwinge <thomas@codesourcery.com>
2602 Olivier Hainque <hainque@adacore.com>
2604 * gcc-interface/Makefile.in: Import target_cpu, target_vendor,
2605 target_os and their host_ counterparts. Remove host_canonical and
2606 target_cpu_default, unused. Remove local ad-hoc computations of
2607 "host", "targ", "arch", "osys" and "manu". Replace uses of these by
2608 uses of the now imported family, hence back to filters against
2609 canonical values. Remove filters on e500 for target_cpu, expected to
2610 be canonicalized into powerpc. Invert the logic filtering on 64bit
2611 sparc for VxWorks. Simplify the filtering logic for bareboard tools
2612 target pairs, now using straight elf/eabi filters on the target_os
2615 2013-09-10 Ed Schonberg <schonberg@adacore.com>
2617 * sem_ch3.adb (Replace_Anonymoous_Access_To_Protected_Subprogram): If
2618 the return type is itself an access to function, recurse to emit
2619 another anonymous type.
2620 * gcc-interface/Make-lang.in: Update dependencies.
2622 2013-09-10 Robert Dewar <dewar@adacore.com>
2624 * err_vars.ads (Warning_Doc_Switch): Ignored in VMS mode.
2625 * errout.adb (Warning_Doc_Switch): Ignored in VMS mode.
2626 * errout.ads (Warning_Doc_Switch): Ignored in VMS mode.
2627 * inline.ads (Warnings): New component in Pending_Body_Info.
2628 * sem_ch12.adb (Pending_Body_Info): Save and restore warnings
2629 at instantiation point.
2630 * warnsw.adb (Save_Warnings): New function (Restore_Warnings):
2631 New procedure Remove special handling of Warning_Doc_Switch,
2632 cleaner to handle the VMS case in errout, than to introduce
2633 undocumented oddities here.
2634 * warnsw.ads (Warning_Record) : New type.
2635 (Save_Warnings): New function.
2636 (Restore_Warnings): New procedure.
2638 2013-09-10 Robert Dewar <dewar@adacore.com>
2640 * sinput.adb (Check_For_BOM): Avoid reading past end of file.
2642 2013-09-10 Robert Dewar <dewar@adacore.com>
2644 * errout.adb (Error_Msg_Ada_2012_Feature): New procedure.
2645 * errout.ads (Error_Msg_Ada_2012_Feature): New procedure.
2646 * inline.ads: Save/Restore Ada_Version_Pragma.
2647 * opt.adb: Save/Restore Ada_Version_Pragma.
2648 * opt.ads (Ada_Version_Pragma): New variable.
2649 * par-ch11.adb, par-ch12.adb, par-ch13.adb, par-ch4.adb, par-ch5.adb,
2650 par-ch6.adb, par-ch8.adb, par-prag.adb: Use Error_Msg_Ada_2012_Feature.
2651 * prj.adb: Initialize Ada_Version_Pragma.
2652 * sem_attr.adb: Use Error_Msg_Ada_2012_Feature.
2653 * sem_ch12.adb, sem_ch8.adb: Save/restore Ada_Version_Pragma.
2654 * sem_prag.adb (Analyze_Pragma, cases Ada_xx): Set Ada_Version_Pragma.
2655 * switch-c.adb: Initialize Ada_Version_Pragma.
2656 * sem_ch12.adb: Minor reformatting.
2658 2013-09-10 Ed Schonberg <schonberg@adacore.com>
2660 * sem_ch3.adb (Process_Subtype): Discard constraint on access
2661 to class-wide type. Such constraints are not supported and are
2662 considered a language pathology.
2664 2013-09-10 Robert Dewar <dewar@adacore.com>
2666 * gnatbind.adb: Correct starting date in --version string.
2667 * gnatdll.adb: Use Check_Version_And_Help_G to implement --help
2669 * gnatkr.adb: Use Check_Version_And_Help_G to implement --help
2671 * gnatlink.adb: Correct starting date in --version string.
2672 * gnatls.adb: Correct starting date in --version string.
2673 * make.adb: Correct starting date in --version string.
2675 2013-09-10 Robert Dewar <dewar@adacore.com>
2677 * switch-c.adb: Minor reformatting.
2678 * atree.ads (Original_Nodes): Add documentation on ASIS usage.
2679 * sinfo.ads: Add section on ASIS mode (documentation only).
2681 2013-09-10 Robert Dewar <dewar@adacore.com>
2683 * sem_prag.adb (Analyze_Pragma, case Warnings): Don't allow
2684 REASON parameter in compiler units (bootstrap issues).
2686 2013-09-10 Robert Dewar <dewar@adacore.com>
2688 * gnat1drv.adb (Adjust_Global_Switches): Output warning if
2689 -gnateE specified for a target that does not support it.
2691 2013-09-10 Ed Schonberg <schonberg@adacore.com>
2693 * sem_prag.adb (Analyze_Pragma, case SPARK_Mode): Handle properly
2694 a subprogram body without previous spec.
2696 2013-09-10 Gary Dismukes <dismukes@adacore.com>
2698 * sem_ch4.adb: Minor typo fixes.
2700 2013-09-10 Hristian Kirtchev <kirtchev@adacore.com>
2702 * aspects.adb (Aspects_On_Body_OK): New routine.
2703 * aspects.ads: Modify type Aspect_Expression to include
2704 the Optional_XXX variants. Update the contents of
2705 table Aspect_Argument. Add table Aspect_On_Body_OK.
2706 (Aspects_On_Body_OK): New routine.
2707 * par-ch13.adb (Get_Aspect_Specifications): Account for optional
2708 names and expressions when parsing an aspect.
2709 * sem_ch6.adb: Add with and use clause for Aspects.
2710 (Analyze_Subprogram_Body_Helper): Do not emit an error when
2711 analyzing a body with aspects that can be applied simultaneously
2712 to both spec and body.
2713 * sem_ch13.adb (Analyze_Aspect_Specifications): Insert the
2714 corresponding pragma of an aspect that applies to a subprogram
2715 body in the declarative part.
2716 (Make_Aitem_Pragma): Do not generate a pragma with an empty argument
2719 2013-09-10 Robert Dewar <dewar@adacore.com>
2721 * switch-c.adb: Diagnose -gnatc given after -gnatRm.
2722 * gnat_ugn.texi: Add documentation for -gnatRm.
2723 * usage.adb: Minor reorganization (put style entries in proper
2724 order) Document -gnatRm switch.
2725 * sinfo.ads: Minor comment fix.
2727 2013-09-10 Sergey Rybin <rybin@adacore.com frybin>
2729 * tree_io.ads: Update ASIS_Version_Number.
2731 2013-09-10 Ed Schonberg <schonberg@adacore.com>
2733 * sem_ch3.adb (Access_Subprogram_Declaration): Check whether the
2734 designated type can appear in a parameterless call.
2735 * sem_ch4.adb (Analyze_Call): Do not insert an explicit dereference
2736 in the case of an indirect call through an access function that
2737 returns an array type.
2738 (Analyze_One_Call): Handle properly legal parameterless calls
2739 whose result is indexed, in constructs of the for F.all (I)
2740 * sem_ch6.ads (May_Need_Actuals): Make public, for use on access
2741 to subprogram types.
2742 * sem_res.adb (Resolve_Call): If the call is indirect, there is
2743 no entity to set on the name in the call.
2745 2013-09-10 Hristian Kirtchev <kirtchev@adacore.com>
2747 * aspects.adb: Add entries in the Has_Aspect_Specifications_Flag
2748 table for package body and body stubs.
2749 (Move_Or_Merge_Aspects): New routine.
2750 (Remove_Aspects): New routine.
2751 * aspects.ads (Move_Aspects): Update comment on usage.
2752 (Move_Or_Merge_Aspects): New routine.
2753 (Remove_Aspects): New routine.
2754 * par-ch3.adb: Update the grammar of private_type_declaration,
2755 private_extension_declaration, object_renaming_declaration,
2756 and exception_renaming_declaration.
2757 (P_Subprogram): Parse the
2758 aspect specifications that apply to a body stub.
2759 * par-ch6.adb: Update the grammar of subprogram_body_stub and
2760 generic_instantiation.
2761 * par-ch7.adb: Update the grammar of package_declaration,
2762 package_specification, package_body, package_renaming_declaration,
2764 (P_Package): Parse the aspect specifications
2765 that apply to a body, a body stub and package renaming.
2766 * par-ch9.adb: Update the grammar of entry_declaration,
2767 protected_body, protected_body_stub, task_body,
2769 (P_Protected): Add local variable
2770 Aspect_Sloc. Add local constant Dummy_Node. Parse the aspect
2771 specifications that apply to a protected body and a protected
2773 (P_Task): Add local variable Aspect_Sloc. Add local
2774 constant Dummy_Node. Parse the aspect specifications that apply
2775 to a task body and a task body stub.
2776 * par-ch12.adb: Update the grammar of
2777 generic_renaming_declaration.
2778 (P_Generic): Parse the aspect
2779 specifications that apply to a generic renaming.
2780 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Do not emit
2781 an error when analyzing aspects that apply to a body stub. Such
2782 aspects are relocated to the proper body.
2783 * sem_ch7.adb (Analyze_Package_Body_Helper): Analyze the aspect
2784 specifications that apply to a body.
2785 * sem_ch9.adb (Analyze_Protected_Body): Warn about user-defined
2786 aspects not being supported on protected bodies. Remove the
2787 aspect specifications. (Analyze_Single_Protected_Declaration):
2788 Analyze the aspects that apply to a single protected declaration.
2789 (Analyze_Task_Body): Warn about user-defined aspects not being
2790 supported on task bodies. Remove the aspect specifications.
2791 * sem_ch10.adb: Add with and use clause for Aspects.
2792 (Analyze_Package_Body_Stub): Propagate the aspect specifications
2793 from the stub to the proper body.
2794 * sem_ch13.adb (Analyze_Aspect_Specifications): Insert the
2795 corresponding pragma of an aspect that applies to a body in the
2796 declarations of the body.
2797 * sinfo.ads: Update the gramma of expression_function,
2798 private_type_declaration, private_extension_declaration,
2799 object_renaming_declaration, exception_renaming_declaration,
2800 package_renaming_declaration, subprogram_renaming_declaration,
2801 generic_renaming_declaration, entry_declaration,
2802 subprogram_body_stub, package_body_stub, task_body_stub,
2803 generic_subprogram_declaration.
2805 2013-09-10 Hristian Kirtchev <kirtchev@adacore.com>
2807 * sem_prag.adb (Analyze_Pragma): Add processing
2808 for aspect/pragma SPARK_Mode when it applies to a [library-level]
2809 subprogram or package [body].
2811 2013-09-10 Robert Dewar <dewar@adacore.com>
2813 * gnat_ugn.texi: Document that -gnatc and -gnatR cannot be
2815 * switch-c.adb (Scan_Front_End_Switches): Give error if both
2816 -gnatR and -gnatc given.
2818 2013-09-10 Robert Dewar <dewar@adacore.com>
2820 * g-table.ads, g-table.adb (For_Each): New generic procedure
2821 (Sort_Table): New generic procedure.
2823 2013-09-10 Thomas Quinot <quinot@adacore.com>
2825 * adaint.c (__gnat_is_executable_file_attr): Should be true
2826 for an executable regular file only only (not for a directory
2827 that has the executable permission).
2829 2013-09-10 Ed Schonberg <schonberg@adacore.com>
2831 * sem_res.adb: Further work on operator calls in ASIS.
2833 2013-09-10 Yannick Moy <moy@adacore.com>
2835 * sinfo.ads, sem_prag.ads, sem_ch13.adb: Minor correction and comment
2838 2013-09-10 Thomas Quinot <quinot@adacore.com>
2840 * aspects.ads, sem_ch13.adb: Minor reformatting.
2841 * adaint.c (__gnat_set_close_on_exec): Add comment documenting
2842 that this routine is shared between OS_Lib and Sockets.
2844 2013-09-10 Robert Dewar <dewar@adacore.com>
2846 * exp_prag.adb (Expand_Pragma_Check): Ignore pragma if Is_Ignored set.
2847 * sem_ch13.adb (Make_Aitem_Pragma): Set Is_Checked if needed.
2848 * sem_prag.adb (Check_Kind): Moved from spec (Analyze_Pragma):
2849 Make sure Is_Ignored/Is_Checked are set right (Analyze_Pragma,
2850 case Check): Ditto (Check_Applicable_Policy): Handle
2851 Statement_Assertion case Throughout, set and check the Is_Checked
2852 flag as appropriate.
2853 * sem_prag.ads (Check_Kind): Moved to body.
2854 * sinfo.ads, sinfo.adb (Is_Checked): New flag.
2856 2013-09-10 Robert Dewar <dewar@adacore.com>
2858 * aspects.ads (Delay_Type): New type (Aspect_Delay): New table.
2859 * einfo.adb (Has_Delayed_Rep_Aspects): New flag
2860 (May_Inherit_Delayed_Rep_Aspects): New flag (Rep_Clause): Removed
2861 (use Get_Attribute_Representation_Clause).
2862 * einfo.ads (Has_Delayed_Rep_Aspects): New flag
2863 (May_Inherit_Delayed_Rep_Aspects): New flag
2864 * freeze.adb: Minor reformatting
2865 * sem_ch13.adb (Analyze_Aspect_Speficifications): Redo
2866 handling of delayed evaluation, including optimizing some cases
2867 and avoiding delays.
2868 (Analyze_Aspects_At_Freeze_Point): Now
2869 handled inheriting delayed rep aspects for type derivation case.
2870 (Inherit_Delayed_Rep_Aspects): New procedure
2871 * sem_ch13.ads (Analyze_Aspects_At_Freeze_Point): Now handled
2872 inheriting delayed rep aspects for type derivation case.
2873 * sem_ch3.adb (Build_Derived_Type): Set
2874 May_Inherit_Derived_Rep_Aspects if parent type flag
2875 Has_Delayed_Rep_Aspects is set
2877 2013-09-10 Robert Dewar <dewar@adacore.com>
2879 * errout.adb (Finalize): Don't delete real errors with specific
2882 2013-09-10 Ed Schonberg <schonberg@adacore.com>
2884 * exp_ch9.adb (Expand_N_Timed_Entry_Call,
2885 Expand_N_Conditional_Entry_Call, Expand_N_Asynchronous_Select):
2886 Handle properly a trigger that is a call to a primitive operation
2887 of a type that implements a limited interface, if the type itself
2890 2013-09-10 Robert Dewar <dewar@adacore.com>
2892 * sem_ch3.adb, sinfo.ads, exp_ch9.adb, sem_prag.adb, sem_ch12.adb,
2893 exp_ch4.adb, sprint.adb: Minor reformatting.
2895 2013-09-10 Yannick Moy <moy@adacore.com>
2897 * sinfo.ads: Document splitting of pre/post in N_Contract description.
2899 2013-09-10 Ed Schonberg <schonberg@adacore.com>
2901 * exp_ch4.adb (Expand_N_Op_Multiply): If the operation is of the
2902 form X * 2 ** N and it has been marked Is_Power_Of_2_For_Shift,
2903 add a mod operation if the result type is a binary modular type.
2905 2013-09-10 Hristian Kirtchev <kirtchev@adacore.com>
2907 * sem_prag.adb (Check_Mode_Restriction_In_Enclosing_Context): Add local
2908 variable Context. Remove local variable Subp_Id. Start the
2909 context traversal from the current subprogram rather than the
2910 current scope. Update the scope traversal and error reporting.
2912 2013-09-10 Ed Schonberg <schonberg@adacore.com>
2914 * exp_ch9.adb (Expand_N_Timed_Entry_Call): New procedure
2915 Rewrite_Triggering_Statements, to encapsulate the statements that
2916 follow the trigger of the entry call. This procedure is needed
2917 when the trigger is a dispatching call, because the expansion
2918 requires several copies of those statements. The procedure is
2919 more efficient, and preserves non-local references when the
2920 construct is within an instance.
2922 2013-09-10 Ed Schonberg <schonberg@adacore.com>
2924 * sem_ch12.adb (Analyze_Package_Instantiation): If the
2925 instantiation is a compilation unit, analyze aspects before
2926 analyzing the package declaration for the instance.
2927 * sem_ch13.adb (Analyze_Aspect_Specifications): If the
2928 corresponding node is a package instantiation, insert generated
2929 pragmas at the head of visible declarations.
2930 * sem_prag.adb (Analyze_Pragma, case Preelaborate): In an instance
2931 do not ignore the pragma if it comes from an aspect specification
2932 in the instance, and not from the generic unit.
2933 * sprint.adb (Sprint_Node_Actual): For a package declaration that
2934 is an instantiation, print aspects after declaration.
2936 2013-09-10 Robert Dewar <dewar@adacore.com>
2938 * einfo.adb, sem_prag.adb, rtsfind.ads: Minor reformatting.
2940 2013-09-10 Hristian Kirtchev <kirtchev@adacore.com>
2942 * sem_prag.adb (Get_SPARK_Mode_Id): Handle the
2943 case where the pragma may appear without an argument.
2944 (Analyze_Global_List): Add expanded_name to the list of constructs
2945 that denote a single item.
2946 (Collect_Global_List): Add expanded_name to the list of constructs
2947 that denote a single item.
2949 2013-09-10 Hristian Kirtchev <kirtchev@adacore.com>
2951 * exp_ch4.adb (Apply_Accessibility_Check): Add local constant
2952 Pool_Id and local variables Fin_Call and Free_Stmt. Finalize
2953 and deallocate a heap-allocated class-wide object after it
2954 has been determined that it violates the accessibility rules.
2955 * rtsfind.ads: Add new RTU_Id for System.Memory. Add new RE_Id
2956 and entry in RE_Unit_Table for RE_Free.
2958 2013-09-01 Eric Botcazou <ebotcazou@adacore.com>
2959 Iain Sandoe <iain@codesourcery.com>
2962 * gcc-interface/Makefile.in (GCC_LINK_FLAGS): Add -static-libstdc++.
2963 (GCC_LINK): Use CXX instead of CC.
2964 * gcc-interface/Make-lang.in (CXX_LFLAGS): New.
2965 (ADA_TOOLS_FLAGS_TO_PASS): Pass CXX, and CXX_LFLAGS for native.
2967 2013-08-13 Eric Botcazou <ebotcazou@adacore.com>
2969 * gcc-interface/decl.c (gnat_to_gnu_entity): Do not bother about alias
2970 sets of derived types in ASIS mode.
2972 2013-08-13 Eric Botcazou <ebotcazou@adacore.com>
2974 * gcc-interface/decl.c (gnat_to_gnu_entity): Replace True with true.
2975 (is_cplusplus_method): Likewise, and False with false.
2976 (components_need_strict_alignment): Likewise.
2977 * gcc-interface/misc.c (gnat_init_gcc_fp): Likewise.
2978 * gcc-interface/trans.c (Loop_Statement_to_gnu): Likewise.
2979 (Handled_Sequence_Of_Statements_to_gnu): Likewise.
2980 (add_cleanup): Likewise.
2981 (Sloc_to_locus1): Likewise.
2982 (Sloc_to_locus): Likewise.
2983 (set_expr_location_from_node): Likewise.
2984 * gcc-interface/utils.c (potential_alignment_gap): Likewise.
2986 2013-08-13 Thomas Quinot <quinot@adacore.com>
2988 * gcc-interface/trans.c (set_end_locus_from_node): Clear column info
2989 for the end_locus of a block if it does not come from an End_Label.
2991 2013-08-13 Thomas Quinot <quinot@adacore.com>
2993 * gcc-interface/trans.c (Handled_Sequence_Of_Statements_to_gnu): If
2994 there is no End_Label, attach cleanup actions to the sloc of the HSS
2996 (Exception_Handler_to_gnu_zcx): Associate cleanup actions with the sloc
2997 of the handler itself.
2998 (add_cleanup): Clear column information in sloc of cleanup actions.
2999 (Sloc_to_locus1): New static function.
3000 (Sloc_to_locus): Call it.
3001 (set_expr_location_from_node1): New static function.
3002 (set_expr_location_from_node): Call it.
3004 2013-08-13 Eric Botcazou <ebotcazou@adacore.com>
3006 * gcc-interface/trans.c (Call_to_gnu): Deal with specific conditional
3007 expressions for misaligned actual parameters.
3009 2013-08-13 Eric Botcazou <ebotcazou@adacore.com>
3011 * gcc-interface/trans.c (can_equal_min_or_max_val_p): Be prepared for
3012 values outside of the range of the type.
3014 2013-08-13 Eric Botcazou <ebotcazou@adacore.com>
3016 * gcc-interface/utils2.c (build_atomic_load): Do a mere view-conversion
3017 to the original type before converting to the result type.
3018 (build_atomic_store): First do a conversion to the original type before
3019 view-converting to the effective type, but deal with a padded type
3022 2013-08-08 Eric Botcazou <ebotcazou@adacore.com>
3024 * gcc-interface/Makefile.in (TOOLS_LIBS): Pick C object files from the
3025 compiler build and use standard library variables.
3026 (../../vxaddr2line$(exeext): Do not depend on targext.o and adjust.
3027 (gnatmake-re): Do not depend on targext.o.
3028 (gnatlink-re): Do not depend on link.o and targext.o.
3029 (../../gnatmake$(exeext): Likewise.
3030 (../../gnatlink$(exeext): Likewise.
3032 2013-07-21 OndÃ…
\99ej BÃÂlka <neleai@seznam.cz>
3034 * gcc-interface/gigi.h: Fix typos.
3035 * gcc-interface/trans.c: Likewise.
3036 * gcc-interface/utils2.c: Likewise.
3037 * gnat_rm.texi: Likewise.
3038 * gnat_ugn.texi: Likewise.
3039 * raise-gcc.c: Likewise.
3040 * sigtramp-ppcvxw.c: Likewise.
3041 * sysdep.c: Likewise.
3042 * terminals.c: Likewise.
3044 2013-07-20 Eric Botcazou <ebotcazou@adacore.com>
3047 * gcc-interface/ada.h (CAT): Fix typo.
3049 2013-07-08 Hristian Kirtchev <kirtchev@adacore.com>
3051 * einfo.adb (Get_Pragma): Handle the retrieval of delayed
3052 pragmas stored in N_Contract nodes.
3053 * einfo.ads (Get_Pragma): Update the comment on usage.
3054 * sem_prag.adb (Check_Precondition_Postcondition): Retain a copy
3055 of the pragma when it applies to a body that acts as a spec. The
3056 copy is preanalyzed and chained on the contract of the body.
3058 2013-07-08 Robert Dewar <dewar@adacore.com>
3060 * rtsfind.adb: Minor comment fix.
3062 2013-07-08 Hristian Kirtchev <kirtchev@adacore.com>
3064 * sem_ch4.adb (Check_Ghost_Subprogram_Call): Do not check the placement
3065 of a Ghost function call when the enclosing context is being
3068 2013-07-08 Ed Schonberg <schonberg@adacore.com>
3070 * exp_ch6.adb (Expand_Inlined_Call, Process_Formals): If the
3071 expression in a return statement is a numeric literal, qualify
3072 it with the return type for proper resolution.
3074 2013-07-08 Robert Dewar <dewar@adacore.com>
3076 * sem.ads: Minor comment updates.
3077 * s-restri.ads, exp_ch6.adb, lib-load.ads, exp_ch3.adb, sem_ch10.adb:
3080 2013-07-08 Robert Dewar <dewar@adacore.com>
3082 * exp_attr.adb (Expand_N_Attribute_Reference): Add dummy entry
3083 for Restriction_Set.
3084 * gnat_rm.texi: Add missing menu entry for Attribute Ref Add
3085 documentation for attribute Restriction_Set.
3086 * lib-writ.adb (Write_With_Lines): Generate special W lines
3087 for Restriction_Set.
3088 * lib-writ.ads: Document special use of W lines for
3090 * lib.ads (Restriction_Set_Dependences): New table.
3091 * par-ch4.adb (Is_Parameterless_Attribute): Add Loop_Entry to
3092 list (Scan_Name_Extension_Apostrophe): Remove kludge test for
3093 Loop_Entry (Scan_Name_Extension_Apostrophe): Handle No_Dependence
3095 * restrict.adb (Check_SPARK_Restriction): Put in Alfa order
3096 (OK_No_Dependence_Unit_Name): New function.
3097 * restrict.ads (OK_No_Dependence_Unit_Name): New function.
3098 * rtsfind.adb: Minor reformatting Minor code reorganization.
3099 * sem_attr.adb (Analyze_Attribute): Add processing for
3101 * sem_prag.adb (Process_Restrictions_Or_Restriction_Warnings):
3102 Remove Check_Unit_Name and use new function
3103 OK_No_Dependence_Unit_Name instead.
3104 * sinfo.ads: Minor comment updates.
3105 * snames.ads-tmpl: Add entry for Restriction_Set attribute.
3107 2013-07-08 Hristian Kirtchev <kirtchev@adacore.com>
3109 * exp_ch4.adb (Apply_Accessibility_Check): Remove local constant
3110 Pool_Id and local variable Free_Stmt. Do not deallocate the faulty
3111 object as "free" is not available on all targets/profiles.
3113 2013-07-08 Robert Dewar <dewar@adacore.com>
3115 * sem_ch13.adb (Analyze_Aspect_Specifications): Handle
3116 Storage_Size aspect for task type in case discriminant is
3118 (Analyze_Attribute_Definition_Clause): Do not flag Storage_Size
3119 attribute definition clause as obsolescent if from aspect.
3121 2013-07-08 Robert Dewar <dewar@adacore.com>
3123 * gnat_rm.texi: Add documentation for Img returning a function.
3124 * par-prag.adb: Minor reformatting.
3125 * restrict.adb: Minor reformatting and code reorganization.
3127 2013-07-08 Ed Schonberg <schonberg@adacore.com>
3129 * sem_res.adb: add guard to ASIS transform.
3131 2013-07-08 Ed Schonberg <schonberg@adacore.com>
3133 * exp_ch9.adb (Expand_N_Asynchronous_Select): If the trigger
3134 of the asynchronous select is a dispatching call, transform the
3135 abortable part into a procedure, to avoid duplication of local
3136 loop variables that may appear within.
3138 2013-07-08 Vincent Celier <celier@adacore.com>
3140 * projects.texi: Update the documentation of suffixes in package
3143 2013-07-08 Ed Schonberg <schonberg@adacore.com>
3145 * sem_ch6.adb (Conforming_Types): Anonymous_access_to_subprograsm
3146 types are type conformant if the designated type of one is
3147 protected and the other is not. Convention only matters when
3148 checking subtype conformance.
3150 2013-07-08 Ed Schonberg <schonberg@adacore.com>
3152 * sem_res.adb (Make_Call_Into_Operator): In ASIS mode, propagate
3153 back the fully resolved operands to the original function call
3154 so that all semantic information remains available to ASIS.
3156 2013-07-08 Ed Schonberg <schonberg@adacore.com>
3158 * sem_ch4.adb: minor reformatting (remove obsolete comment).
3159 * sem_ch9.adb: improve error message on illegal trigger.
3161 2013-07-08 Robert Dewar <dewar@adacore.com>
3163 * sem_prag.adb: Minor reformatting.
3165 2013-07-08 Robert Dewar <dewar@adacore.com>
3167 * gnatcmd.adb: Minor reformatting.
3169 2013-07-08 Robert Dewar <dewar@adacore.com>
3171 * targparm.adb (Get_Target_Parameters): Recognize pragma
3172 Partition_Elaboration_Policy.
3174 2013-07-08 Robert Dewar <dewar@adacore.com>
3176 * gnat_ugn.texi: Minor update to mention partition elaboration policy.
3178 2013-07-08 Ed Schonberg <schonberg@adacore.com>
3180 * sem_ch4.adb (Comple_Object_Operation): Revert previous change.
3181 (Analyze_Indexed_Component_Form): In ASIS mode, if node has been
3182 transformed but not rewritten as a function call (as is the case
3183 in a generic), analyze it as such.
3185 2013-07-08 Thomas Quinot <quinot@adacore.com>
3187 * gnat_rm.texi: Minor rewording: add missing word "operators"
3188 in documentation for restriction No_Direct_Boolean_Operator.
3190 2013-07-08 Robert Dewar <dewar@adacore.com>
3192 * errout.adb (Set_Msg_Txt): No longer sets Is_Style_Msg,
3193 Is_Warning_Msg, or Is_Unconditional_Msg (all are set elsewhere
3195 * errout.ads: Insertions ! and !! no longer have to be at the
3196 end of the message, they can be anywhere in the message.
3197 * erroutc.adb (Test_Style_Warning_Serious_Unconditional_Msg):
3198 Replaces Test_Style_Warning_Serious_Msg
3199 * erroutc.ads (Has_Double_Exclam): New flag New comments for
3200 existing flags (Test_Style_Warning_Serious_Unconditional_Msg):
3201 Replaces Test_Style_Warning_Serious_Msg
3202 * errutil.adb (Test_Style_Warning_Serious_Unconditional_Msg):
3203 Replaces Test_Style_Warning_Serious_Msg
3205 2013-07-08 Robert Dewar <dewar@adacore.com>
3207 * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings):
3208 Recognize SPARK_05 as synonym for SPARK in restrictions pragma.
3209 * restrict.ads, restrict.adb (SPARK_Hides): Table moved to body, only
3211 * scng.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb, sem_ch8.adb,
3212 sem_res.adb, sem_util.adb: Use restriction SPARK_05 instead of SPARK.
3213 * snames.ads-tmpl (Name_No_Obsolescent_Features): New entry.
3215 2013-07-08 Vincent Celier <celier@adacore.com>
3217 * gnatcmd.adb (Check_Files): Use a response file for gnatls
3220 2013-07-08 Gary Dismukes <dismukes@adacore.com>
3222 * freeze.adb: Minor typo fixes.
3224 2013-07-08 Robert Dewar <dewar@adacore.com>
3226 * gnat_rm.texi: Document SPARK_05 (replaces SPARK) Document
3227 obsolete recognition of SPARK Document all other obsolete synonyms
3228 for old restrictions.
3229 * restrict.adb (Check_SPARK_Restriction): SPARK_05 replaces
3230 SPARK (Process_Restriction_Synonyms): Handle SPARK as synonym
3232 * restrict.ads: Restriction SPARK_05 replaces SPARK.
3233 * s-rident.ads: Replace restriction SPARK by SPARK_05 Add SPARK
3234 as synonym for SPARK_05.
3235 * sem_prag.adb: Minor reformatting.
3236 * snames.ads-tmpl: Add entries for Name_SPARK and Name_SPARK_05.
3238 2013-07-08 Robert Dewar <dewar@adacore.com>
3240 * sem_dim.adb: Minor error message change.
3241 * freeze.adb (Freeze_Entity, array type case): Extend handling
3242 of Implicit_Packing to handle multi-dimensional array case.
3243 * gnat_rm.texi: Update doc on Implicit_Packing.
3245 2013-07-08 Robert Dewar <dewar@adacore.com>
3247 * exp_ch4.adb: Minor reformatting.
3249 2013-07-08 Ed Schonberg <schonberg@adacore.com>
3251 * sem_ch4.adb (Complete_Object_Operation): In ASIS mode, if
3252 the parent node is a selected component and the analysis as a
3253 call is successful, set the type of the selector in the parent
3254 node for subsequent checks, because the rewriting of the node
3255 does not take place during pre-analysis.
3257 2013-07-08 Robert Dewar <dewar@adacore.com>
3259 * sem_ch8.adb, exp_ch3.adb: Minor reformatting.
3261 2013-07-08 Hristian Kirtchev <kirtchev@adacore.com>
3263 * exp_ch4.adb (Expand_N_Op_Eq): When comparing two
3264 Bounded_Strings, use the predefined equality function of the
3265 root Super_String type.
3267 2013-07-08 Hristian Kirtchev <kirtchev@adacore.com>
3269 * exp_ch4.adb (Create_Alternative): Removed.
3270 (Expand_N_If_Expression): Remove constant
3271 In_Case_Or_If_Expression. Add local variable
3272 Ptr_Typ. Inspect the "then" and "else" action lists
3273 for transient controlled objects and generate code to
3274 finalize them. (Is_Controlled_Function_Call): Removed.
3275 (Process_Action): Update the comment on usage. Update the call
3276 to Process_Transient_Object. There is no need to continue the
3277 traversal of the object itself.
3278 (Process_Actions): New routine.
3279 (Process_Transient_Object): Moved to the top level of Exp_Ch4. Add
3280 a new formal and update the related comment on usage.
3281 * exp_util.adb (Within_Case_Or_If_Expression): Start the search
3282 from the parent of the node.
3284 2013-07-08 Robert Dewar <dewar@adacore.com>
3286 * a-cusyqu.ads, a-cbprqu.ads, s-interr.ads, a-cuprqu.ads,
3287 a-cbsyqu.ads: Minor reformatting (proper formatting of overriding).
3289 2013-07-08 Ed Schonberg <schonberg@adacore.com>
3291 * sem_ch8.adb (Attribute_Renaming): Treat 'Img as an attribute
3292 that can be renamed as a function.
3294 2013-07-08 Thomas Quinot <quinot@adacore.com>
3296 * g-socket.ads: Document target dependency: FIONBIO may or may not
3297 be inherited from listening socket by accepted socket.
3299 2013-07-08 Hristian Kirtchev <kirtchev@adacore.com>
3301 * exp_ch4.adb (Apply_Accessibility_Check): Do not deallocate the object
3302 on targets that can't deallocate.
3304 2013-07-08 Hristian Kirtchev <kirtchev@adacore.com>
3306 * exp_ch3.adb (Freeze_Type): Generate a
3307 subpools-related accessibility check only on profiles that
3308 include the corresponding library unit.
3310 2013-07-08 Gary Dismukes <dismukes@adacore.com>
3312 * sem_ch8.adb: Minor typo fixes.
3314 2013-07-08 Javier Miranda <miranda@adacore.com>
3316 * sem_ch8.adb (Save_Scope_Stack): Adding documentation.
3317 (Restore_Scope_Stack): Remove the elements of the list when the
3318 visibility of each entity is restored.
3320 2013-07-08 Robert Dewar <dewar@adacore.com>
3322 * exp_ch9.adb, sem.ads, sem_util.adb: Minor reformatting.
3324 2013-07-08 Robert Dewar <dewar@adacore.com>
3326 * sem_ch8.adb, sem_ch8.ads: Minor reformatting.
3328 2013-07-08 Gary Dismukes <dismukes@adacore.com>
3330 * gnat_rm.texi: Minor reformatting and rewording for consistency.
3332 2013-07-08 Bob Duff <duff@adacore.com>
3334 * exp_ch3.adb (Build_Master): If Desig_Type is an incomplete
3335 view coming from a limited-with'ed package, use the nonlimited
3336 view in case it has tasks.
3338 2013-07-08 Javier Miranda <miranda@adacore.com>
3340 * sem_ch8.ad[sb] (Save_Scope_Stack): Modified to return the list
3341 of entities which have been temporarily removed from immediate
3343 (Restore_Scope_Stack): Modified to receive an
3344 additional parameter with the list of entities whose immediate
3345 visibility must be restored.
3346 * sem.adb (Do_Analyze): Use new version of
3347 Save_Scope_Stack/Restore_Scope_Stack
3348 * sem_ch12.adb (Inline_Instance_Body): Use new version of
3349 Save_Scope_Stack and Restore_Scope_Stack
3351 2013-07-08 Hristian Kirtchev <kirtchev@adacore.com>
3353 * sem_prag.adb (Analyze_Pragma): Remove
3354 variable Unit_Prag. Remove the check on duplicate mode for the
3355 configuration form of the pragma.
3356 (Redefinition_Error): Removed.
3358 2013-07-08 Robert Dewar <dewar@adacore.com>
3360 * lib.ads, gnat_rm.texi, einfo.ads, sem_ch13.adb: Minor reformatting
3363 2013-07-08 Ed Schonberg <schonberg@adacore.com>
3365 * sem_prag.adb (Analyze_PPC_In_Decl_Part): In ASIS mode,
3366 pre-analyze only the original expression attached to the source
3367 aspect, not the relocated expression of the pragma, to prevent
3368 malformed trees in ASIS mode.
3369 * sem_ch13.adb (Analyze_Aspect_Specifications): Revert previous
3370 patch: the expression in the aspect for pre/post must be relocated
3371 to the pragma for proper analysis.
3373 2013-07-05 Hristian Kirtchev <kirtchev@adacore.com>
3375 * aspects.adb: Add an entry for SPARK_Mode in table Canonical_Aspect.
3376 * aspects.ads: Add an entry for SPARK_Mode in tables Aspect_Id,
3377 Aspect_Argument, Aspect_Names.
3378 * atree.adb (Node32): New routine.
3379 (Set_Node32): New routine.
3380 * atree.ads (Node32): New routine.
3381 (Set_Node32): New routine.
3382 * einfo.adb: Node32 is now used as SPARK_Mode_Pragmas.
3383 (Set_SPARK_Mode_Pragmas): New routine.
3384 (SPARK_Mode_Pragmas): New routine.
3385 (Write_Field32_Name): Add and entry for SPARK_Modes.
3386 * einfo.ads: Add attribute SPARK_Mode_Pragmas along with usage
3387 in various entities.
3388 (Set_SPARK_Mode_Pragmas): New routine and
3390 (SPARK_Mode_Pragmas): New routine and pragma Inline.
3391 * gnat_rm.texi: Add sections explaining the syntax and semantics
3392 of aspect/pragma SPARK_Mode.
3393 * gnat_ugn.texi: Add pragma SPARK_Mode to the list of
3394 configuration pragmas.
3395 * lib.adb (Set_SPARK_Mode_Pragma): New routine.
3396 (SPARK_Mode_Pragma): New routine.
3397 * lib.ads: Alphabetize the comments on fields of record
3398 Unit_Record. Add new field SPARK_Mode_Pragma along with
3399 comment on its usage. Update the layout of record Unit_Record.
3400 (Set_SPARK_Mode_Pragma): New routine and pragma Inline.
3401 (SPARK_Mode_Pragma): New routine and pragma Inline.
3402 * lib-load.adb (Create_Dummy_Package_Unit): Initialize
3403 field SPARK_Mode_Pragma.
3404 (Load_Main_Source): Initialize field SPARK_Mode_Pragma.
3405 (Load_Unit): Initialize field SPARK_Mode_Pragma.
3406 * lib-writ.adb (Add_Preprocessing_Dependency): Initialize field
3408 (Ensure_System_Dependency): Initialize field SPARK_Mode_Pragma.
3409 * opt.ads: Alphabetize verification flags. Store the
3410 compilation-wide SPARK mode in variable Global_SPARK_Mode.
3411 * par-prag.adb: Pragma SPARK_Mode does not need special processing
3413 * sem_ch13.adb (Analyze_Aspect_Specifications): Convert aspect
3414 SPARK_Mode into a pragma.
3415 (Check_Aspect_At_Freeze_Point): Aspect SPARK_Mode does not need
3417 * sem_prag.adb: Add an entry for SPARK_Mode in table Sig_Flags.
3418 (Analyze_Pragma): Add processing for pragma SPARK_Mode.
3419 (Get_SPARK_Mode_Id): New routine.
3420 (Is_Elaboration_SPARK_Mode): New routine.
3421 (Is_Private_SPARK_Mode): New routine.
3422 * sem_prag.ads (Get_SPARK_Mode_Id): New routine.
3423 (Is_Elaboration_SPARK_Mode): New routine.
3424 (Is_Private_SPARK_Mode): New routine.
3425 * sinfo.ads: Update the comment on the usage of field Next_Pragma.
3426 * snames.ads-tmpl: Add new predefined name for SPARK_Mode and
3427 Auto. Add new pragma Id for SPARK_Mode.
3428 * types.ads: Add new type SPARK_Mode_Id.
3430 2013-07-05 Ed Schonberg <schonberg@adacore.com>
3432 * sem_ch13.adb (Analyze_Aspect_Specifications): For
3433 pre/postconditions copy the expression to the generated pragma,
3434 to avoid sharing between the original aspect and the pragma node,
3435 because in ASIS_Mode both will be independently analyzed.
3437 2013-07-05 Ed Schonberg <schonberg@adacore.com>
3439 * exp_ch3.adb (Build_Variant_Record_Equality): Add pairs of
3440 formals for each discriminant of an unchecked union.
3441 (Make_Eq_Case): Suprogram accepts a list of discriminants. Nested
3442 variants are supported. New helper function Corresponding_Formal.
3443 * exp_ch4.adb (Build_Equality_Call): For unchecked unions,
3444 loop through discriminants to create list of inferred values,
3445 and modify call to equality routine accordingly.
3447 2013-07-05 Claire Dross <dross@adacore.com>
3449 * a-cfdlli.ads, a-cfhama.ads, a-cfhase.ads, a-cforma.ads,
3450 a-cforse.ads, a-cofove.ads: Add preconditions when needed +
3451 container types are not tagged any more.
3453 2013-07-05 Thomas Quinot <quinot@adacore.com>
3455 * freeze.adb (Freeze_Entity): For an object with captured
3456 initialization statements, do not remove Init_Stmts from the
3457 enclosing list, as Freeze_All might rely on it to know where to
3460 2013-07-05 Robert Dewar <dewar@adacore.com>
3462 * exp_ch4.adb, a-cfdlli.ads, a-ngelfu.ads, s-bignum.adb: Minor
3465 2013-07-05 Hristian Kirtchev <kirtchev@adacore.com>
3467 * exp_ch4.adb (Expand_Composite_Equality): Use the full view
3468 when the base type is private.
3470 2013-07-05 Claire Dross <dross@adacore.com>
3472 * a-cfdlli.ads: Add preconditions when needed.
3474 2013-07-05 Robert Dewar <dewar@adacore.com>
3476 * sem_ch8.adb: Minor reformatting.
3478 2013-07-05 Ed Schonberg <schonberg@adacore.com>
3480 * sem_ch3.adb (Access_Subprogram_Declaration): Use
3481 Generate_Reference_To_Formals.
3482 * lib-xref.adb (Generate_Reference_To_Formals): In the case of
3483 access to subprograms, the formals are found in the designated
3486 2013-07-05 Robert Dewar <dewar@adacore.com>
3488 * gnat_ugn.texi: Document that comments can be lined up with
3489 previous non-blank line.
3490 * styleg.adb (Check_Comment): Allow indentation to match previous
3491 non-blank line (Same_Column_As_Previous_Line): New function
3493 2013-07-05 Robert Dewar <dewar@adacore.com>
3495 * gnat_rm.texi: Update doc on missing pragmas.
3496 * sem_ch12.adb: Minor comment additions.
3498 2013-07-05 Hristian Kirtchev <kirtchev@adacore.com>
3500 * sem_prag.adb (Analyze_Pragma): Ensure that
3501 Contract_Cases, Depends and Global are analyzed when they apply
3502 to a subprogram compilation unit. The pragmas are all added
3503 unconditionally to the construct's contract. This ensures that
3504 proof tools can locate the pragmas.
3506 2013-07-05 Ed Schonberg <schonberg@adacore.com>
3508 * sem_ch8.adb (Freeze_Actual_Profile): An instance within
3509 a generic unit does not freeze a generic private type of the
3510 enclosing generic. This rule must also apply to a type derived
3511 from a generic private type.
3513 2013-07-05 Arnaud Charlet <charlet@adacore.com>
3515 * gnat_rm.texi: Add missing documentation for pragmas.
3517 2013-07-05 Yannick Moy <moy@adacore.com>
3519 * sem_ch12.adb: Minor comment.
3521 2013-07-05 Robert Dewar <dewar@adacore.com>
3523 * gnat_rm.texi: Document that -gnatR and -gnatD cannot be used
3525 * switch-c.adb: Do not allow -gnatD and -gnatR to both be
3528 2013-07-05 Robert Dewar <dewar@adacore.com>
3530 * gnat_rm.texi: Add missing documentation for pragmas.
3531 * sem_ch8.adb: Minor reformatting.
3532 * gnat_ugn.texi: Document that -gnatR and -gnatD cannot be used
3535 2013-07-05 Yannick Moy <moy@adacore.com>
3537 * sem_ch12.ads, sem_ch12.adb (Need_Subprogram_Instance_Body): Force
3538 instance of subprogram body in SPARK mode, by testing Expander_Active
3539 (set in SPARK mode) instead of Full_Expander_Active (not set in
3541 * sem_ch8.adb: Minor reformatting.
3543 2013-07-05 Robert Dewar <dewar@adacore.com>
3545 * freeze.adb (Freeze_Entity): Remove test of obsolete flag
3546 Propagate_Exceptions, and associated useless code that did
3548 * gnat_rm.texi: Add documentation for obsolete pragma
3549 Propagate_Exceptions.
3550 * opt.ads (Propagate_Exceptions): Obsolete flag removed.
3551 * sem_prag.adb (Analyze_Pragma, case Propagate_Exceptions):
3552 Remove useless and obsolete setting of Propagate_Exceptions flag.
3554 2013-07-05 Robert Dewar <dewar@adacore.com>
3556 * gnat_rm.texi, sem_prag.adb: Minor comment/text fixes.
3558 2013-07-05 Robert Dewar <dewar@adacore.com>
3560 * gnat_rm.texi: Add missing doc for various pragmas.
3562 2013-07-05 Robert Dewar <dewar@adacore.com>
3564 * par_sco.adb, sem_ch12.adb, par-ch5.adb: Minor reformatting.
3565 * gnat_rm.texi: Document pragma Profile_Warnings.
3566 * restrict.ads, sem_prag.adb: Minor reformatting.
3568 2013-07-05 Ed Schonberg <schonberg@adacore.com>
3570 * sem_ch12.adb (Check_Formal_Package_Instance): Handle properly
3571 a formal subprogram that was defaulted in the formal package.
3573 2013-07-05 Thomas Quinot <quinot@adacore.com>
3575 * par_sco.adb (Traverse_Declarations_Or_Statements): Ignore
3576 N_Implicit_Label_Declaration nodes.
3578 2013-07-05 Robert Dewar <dewar@adacore.com>
3580 * a-cfhase.adb, sem_prag.adb, a-cfhama.adb: Minor reformatting.
3582 2013-07-05 Ed Schonberg <schonberg@adacore.com>
3584 * sem_ch12.adb (Copy_Generic_Node): Check that name in function
3585 call is a valid entity name before preserving entity in generic
3588 2013-07-05 Thomas Quinot <quinot@adacore.com>
3590 * par-ch5.adb: Minor reformatting.
3592 2013-07-05 Thomas Quinot <quinot@adacore.com>
3594 * sinfo.ads: Minor clarification to documentation for
3595 N_Implicit_Label_Declaration.
3597 2013-07-05 Hristian Kirtchev <kirtchev@adacore.com>
3599 * a-except-2005.adb, a-except.adb: Add constant Rmsg_17. Correct the
3600 values of all remaining constants.
3601 (Rcheck_35): New routine along with pragmas Export and No_Return.
3602 (Rcheck_PE_Aliased_Parameters): New routine along with pragmas
3603 Export and No_Return.
3604 (Rcheck_PE_All_Guards_Closed,
3605 Rcheck_PE_Bad_Predicated_Generic_Type,
3606 Rcheck_PE_Current_Task_In_Entry_Body,
3607 Rcheck_PE_Duplicated_Entry_Address, Rcheck_PE_Explicit_Raise,
3608 Rcheck_PE_Implicit_Return, Rcheck_PE_Misaligned_Address_Value,
3609 Rcheck_PE_Missing_Return, Rcheck_PE_Overlaid_Controlled_Object,
3610 Rcheck_PE_Potentially_Blocking_Operation
3611 Rcheck_PE_Stubbed_Subprogram_Called,
3612 Rcheck_PE_Unchecked_Union_Restriction,
3613 Rcheck_PE_Non_Transportable_Actual, Rcheck_SE_Empty_Storage_Pool,
3614 Rcheck_SE_Explicit_Raise, Rcheck_SE_Infinite_Recursion,
3615 Rcheck_SE_Object_Too_Large, Rcheck_PE_Finalize_Raised_Exception):
3616 Update the use of Rmsg_XX.
3617 (Rcheck_17, Rcheck_18, Rcheck_19,
3618 Rcheck_20, Rcheck_21, Rcheck_22, Rcheck_23, Rcheck_24, Rcheck_25,
3619 Rcheck_26, Rcheck_27, Rcheck_28, Rcheck_29, Rcheck_30, Rcheck_31,
3620 Rcheck_32, Rcheck_33, Rcheck_34, Rcheck_35): Update corresponding
3621 renamed subprograms.
3622 * checks.adb: Add with and use clause for Stringt.
3623 (Apply_Parameter_Aliasing_Checks): Make constant Loc visible in
3624 all subprograms of Apply_Parameter_Aliasing_Checks. Remove local
3625 variable Cond. Initialize Check at the start of the routine. Use
3626 routine Overlap_Check to construct a simple or a detailed run-time
3627 check. Update the creation of the simple check.
3628 (Overlap_Check): New routine.
3629 * exp_ch11.adb (Get_RT_Exception_Name): Add a value for
3630 PE_Aliased_Parameters.
3631 * types.ads: Add new enumeration literal
3632 PE_Aliased_Parameters. Update the corresponding integer values
3633 of all RT_Exception_Code literals.
3634 * types.h: Add new constant PE_Aliased_Parameters. Correct the
3635 values of all remaining constants.
3637 2013-07-05 Yannick Moy <moy@adacore.com>
3639 * gnat_rm.texi: Minor renaming of SPARK into SPARK 2005 in
3642 2013-07-05 Ed Schonberg <schonberg@adacore.com>
3644 * sem_prag.adb (Analyze_PPC_In_Decl_Part): For a class-wide
3645 condition, when replacing the name of a formal by a conversion
3646 to the class-wide type, exempt selector names that appear in
3647 parameter associations.
3649 2013-06-13 Eric Botcazou <ebotcazou@adacore.com>
3651 * gcc-interface/ada-tree.h (DECL_BY_DOUBLE_REF_P): Delete.
3652 * gcc-interface/gigi.h (annotate_object): Adjust prototype.
3653 (convert_vms_descriptor): Likewise.
3654 * gcc-interface/decl.c (gnat_to_gnu_param): Do not pass fat pointer
3655 types by double dereference.
3656 (annotate_object): Remove BY_DOUBLE_REF parameter and adjust.
3657 (gnat_to_gnu_entity): Adjust calls to annotate_object.
3658 * gcc-interface/trans.c (Identifier_to_gnu): Do not deal with double
3660 (Call_to_gnu): Likewise.
3661 (build_function_stub): Adjust call to convert_vms_descriptor.
3662 (Subprogram_Body_to_gnu): Adjust call to annotate_object.
3663 * gcc-interface/utils.c (convert_vms_descriptor): Remove BY_REF
3664 parameter and adjust.
3666 2013-05-30 Eric Botcazou <ebotcazou@adacore.com>
3668 * gcc-interface/Makefile.in (arm% androideabi): Robustify.
3670 2013-05-26 Eric Botcazou <ebotcazou@adacore.com>
3672 * gcc-interface/decl.c: (gnat_to_gnu_entity): In ASIS mode, do not
3673 check that access types have a set size.
3675 2013-05-26 Eric Botcazou <ebotcazou@adacore.com>
3677 * gcc-interface/decl.c (vinfo_t): New type and associated vector.
3678 (components_to_record): Change return type to bool.
3679 Lay out the variants in two passes. Do not force a specific layout for
3680 the variant part if the variants do not have a representation clause.
3681 Take the alignment of the variant part into account when laying out
3682 variants without rep clause in a record type with a partial rep clause.
3683 (create_rep_part): Do not set the position of the field.
3685 2013-05-26 Eric Botcazou <ebotcazou@adacore.com>
3687 * gcc-interface/trans.c (Attribute_to_gnu) <Attr_Last_Bit>: Add kludge
3688 to avoid generating an overflow for -1.
3690 2013-05-26 Eric Botcazou <ebotcazou@adacore.com>
3692 * gcc-interface/gigi.h (create_type_decl): Adjust prototype.
3693 (create_label_decl): Complete prototype.
3694 (process_attributes): Declare.
3695 * gcc-interface/decl.c (gnat_to_gnu_entity): Adjust multiple calls to
3696 create_type_decl throughout.
3697 <E_Enumeration_Type>: Do the layout of the type manually and call
3698 process_attributes on it. Reindent.
3699 <E_Enumeration_Subtype>: Minor tweak.
3700 <E_Floating_Point_Subtype>: Reindent.
3701 <E_Array_Subtype>: Call process_attributes on the array type built
3702 for a packed array type.
3703 <E_Record_Type>: Call process_attributes on the type.
3704 <E_Record_Subtype>: Likewise.
3705 <E_Access_Type>: Likewise.
3706 <E_Subprogram_Type>: Likewise.
3707 Likewise for all types at the end of the processing.
3708 * gcc-interface/utils.c (make_aligning_type): Adjust call to
3710 (maybe_pad_type): Likewise.
3711 (create_index_type): Likewise.
3712 (create_type_decl): Remove attr_list parameter and associated code.
3713 (create_var_decl_1): Call process_attributes on the variable.
3714 (process_attributes): Take a pointer to the object and add in_place
3715 and gnat_node parameters and adjust throughout.
3716 <ATTR_MACHINE_ATTRIBUTE>: Pass ATTR_FLAG_TYPE_IN_PLACE only on demand
3717 and set the input location.
3718 Zap the attribute list at the end.
3719 (create_subprog_decl): Call process_attributes on the subprogram.
3720 (build_unc_object_type): Adjust call to create_type_decl.
3721 (handle_vector_type_attribute): Remove dead code.
3723 2013-05-26 Eric Botcazou <ebotcazou@adacore.com>
3725 * gcc-interface/gigi.h (make_aligning_type): Adjust prototype.
3726 * gcc-interface/utils.c (make_aligning_type): Take GNAT_NODE parameter
3727 for the position of the associated TYPE_DECL.
3728 * gcc-interface/decl.c (gnat_to_gnu_entity): Adjust call to above.
3729 * gcc-interface/utils2.c (maybe_wrap_malloc): Likewise.
3731 2013-05-26 Eric Botcazou <ebotcazou@adacore.com>
3733 * gcc-interface/decl.c (gnat_to_gnu_entity): Do not prematurely
3734 elaborate the full view of a type with a freeze node.
3735 * gcc-interface/trans.c (process_type): Add explicit predicate.
3737 2013-05-26 Eric Botcazou <ebotcazou@adacore.com>
3739 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Always build the
3740 UNC variable for aliased objects with unconstrained nominal subtype.
3742 2013-05-24 Eric Botcazou <ebotcazou@adacore.com>
3744 * gcc-interface/gigi.h (gnat_init_gcc_fp): Declare.
3745 * gcc-interface/trans.c (gigi): Call it.
3746 * gcc-interface/misc.c (gnat_init_gcc_fp): New function.
3748 2013-05-24 Eric Botcazou <ebotcazou@adacore.com>
3750 * gcc-interface/gigi.h (enum inline_status_t): New type.
3751 (create_subprog_decl): Adjust prototype.
3752 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Procedure>: Adjust
3753 calls to create_subprog_decl.
3754 (get_minimal_subprog_decl): Likewise.
3755 * gcc-interface/trans.c (gigi): Likewise.
3756 (build_raise_check): Likewise.
3757 (establish_gnat_vms_condition_handler): Likewise.
3758 (Compilation_Unit_to_gnu): Likewise.
3759 (gnat_to_gnu): Likewise.
3760 * gcc-interface/utils.c (create_subprog_decl): Change inline_flag
3761 parameter to inline_status and implement for suppressed inlining.
3763 2013-05-24 Eric Botcazou <ebotcazou@adacore.com>
3765 * gcc-interface/ada-tree.h (LOOP_STMT_NO_UNROLL): New define.
3766 (LOOP_STMT_UNROLL): Likewise.
3767 (LOOP_STMT_NO_VECTOR): Likewise.
3768 (LOOP_STMT_VECTOR): Likewise.
3769 * gcc-interface/trans.c (struct loop_info_d): Replace label field
3771 (Pragma_to_gnu) <Pragma_Loop_Optimize>: New case.
3772 (Loop_Statement_to_gnu): Save the loop statement onto the stack
3773 instead of the label.
3774 (gnat_to_gnu) <N_Exit_Statement>: Retrieve the loop label.
3776 2013-05-24 Eric Botcazou <ebotcazou@adacore.com>
3778 * gcc-interface/trans.c: Include diagnostic.h and opts.h.
3779 (Pragma_to_gnu) <Pragma_Warnings>: New case.
3781 2013-05-24 Eric Botcazou <ebotcazou@adacore.com>
3783 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Record_Type>: Constify
3784 a handful of local variables.
3785 For a derived untagged type that renames discriminants, change the type
3786 of the stored discriminants to a subtype with the bounds of the type
3787 of the visible discriminants.
3788 (build_subst_list): Rename local variable.
3790 2013-05-16 Jason Merrill <jason@redhat.com>
3792 * gcc-interface/Make-lang.in (gnat1$(exeext)): Use link mutex.
3794 2013-05-13 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
3797 * gcc-interface/Makefile.in: Allow for amd64 solaris2.
3799 2013-05-07 Eric Botcazou <ebotcazou@adacore.com>
3802 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Subtype>: Use
3803 int_const_binop to shift bounds by 1 when they are integer constants.
3805 2013-04-25 Arnaud Charlet <charlet@adacore.com>
3807 * gcc-interface/Makefile.in (ADA_EXCLUDE_SRCS): Exclude s-init.ad{s,b}
3809 2013-04-25 Hristian Kirtchev <kirtchev@adacore.com>
3811 * checks.adb (Apply_Predicate_Check): Update the comment associated
3812 with the call to Check_Expression_Against_Static_Predicate.
3813 * sem_ch3.adb (Analyze_Object_Declaration): Update the comment
3814 associated with the call to Check_Expression_Against_Static_Predicate.
3815 * sem_util.adb (Check_Expression_Against_Static_Predicate):
3816 Broaden the check from a static expression to an expression with
3817 a known value at compile time.
3818 * sem_util.ads (Check_Expression_Against_Static_Predicate): Update
3821 2013-04-25 Thomas Quinot <quinot@adacore.com>
3823 * exp_attr.adb (Expand_N_Attribute_Reference, cases Position,
3824 First_Bit, and Last_Bit): Fix incorrect test in implementation of
3825 RM 2005 13.5.2(3/2).
3827 2013-04-25 Claire Dross <dross@adacore.com>
3829 * a-cfhase.adb, a-cfhase.ads, a-cforma.adb, a-cforma.ads, a-cfhama.adb,
3830 a-cfhama.ads, a-cforse.adb, a-cforse.ads, a-cofove.adb, a-cofove.ads
3831 (Query_Element): Removed.
3832 (Update_Element): Removed.
3833 (Insert): The version with no New_Item specified is removed.
3837 Every check of fields Busy and Lock has been removed.
3839 2013-04-25 Robert Dewar <dewar@adacore.com>
3841 * sem_prag.adb (Analyze_Pragma, case Contract_Cases): Remove
3842 call to S14_Pragma (Find_Related_Subprogram): Require proper
3843 placement in subprogram body (Find_Related_Subprogram): Detect
3844 duplicates for all cases (Find_Related_Subprogram): Handle case
3845 of spec nested inside body.
3847 2013-04-25 Arnaud Charlet <charlet@adacore.com>
3849 * par-prag.adb: Fix typo.
3851 2013-04-25 Hristian Kirtchev <kirtchev@adacore.com>
3853 * checks.adb (Apply_Predicate_Check): If the type has a static
3854 predicate and the expression is also static, check whether the
3855 expression satisfies the predicate.
3856 * sem_ch3.adb (Analyze_Object_Declaration): If the type has a
3857 static predicate and the expression is also static, see if the
3858 expression satisfies the predicate.
3859 * sem_util.adb: Alphabetize several routines.
3860 (Check_Expression_Against_Static_Predicate): New routine.
3861 * sem_util.ads (Check_Expression_Against_Static_Predicate): New routine.
3863 2013-04-25 Robert Dewar <dewar@adacore.com>
3865 * gnat_rm.texi: Document Reason argument for pragma Warnings.
3866 * par-prag.adb: Handle Reason parameter for pragma Warnings.
3867 * sem_prag.adb (Analyze_Pragma, case Warnings): Allow Reason argument.
3868 * snames.ads-tmpl (Name_Reason): New name entry.
3870 2013-04-25 Yannick Moy <moy@adacore.com>
3872 * exp_spark.adb (Expand_SPARK_N_In): Remove procedure.
3873 (Expand_SPARK): Remove special expansion for membership tests.
3875 2013-04-25 Hristian Kirtchev <kirtchev@adacore.com>
3877 * exp_ch3.adb (Expand_N_Object_Declaration): Update all places
3878 that should use constant Base_Typ. When building an invariant
3879 check, account for invariants coming from the base type. Prevent
3880 the creation of a junk invariant check when the related object
3881 is of an array type and it is initialized with an aggregate.
3882 * exp_util.adb (Make_Invariant_Call): Typ is now a variable. Use
3883 the base type to create an invariant call when the type of the
3884 expression is a composite subtype.
3886 2013-04-25 Vasiliy Fofanov <fofanov@adacore.com>
3888 * a-cborse.adb: Fix minor typo.
3890 2013-04-25 Ed Schonberg <schonberg@adacore.com>
3892 * sem_ch6.adb (Different_Generic_Profile): A spec and body
3893 match in an instance if a subtype declaration that renames a
3894 generic actual with the same name appears between spec and body.
3896 2013-04-25 Robert Dewar <dewar@adacore.com>
3898 * sem_util.adb: Minor reformatting.
3900 2013-04-25 Ed Schonberg <schonberg@adacore.com>
3902 * exp_aggr.adb (Expand_N_Aggregate): Use special circuitry to
3903 fold strings with a single others choice only if there are no
3904 expressions in the aggregate.
3906 2013-04-25 Arnaud Charlet <charlet@adacore.com>
3908 * gnat_ugn.texi: Update doc on Ada 2012 default mode.
3910 2013-04-25 Hristian Kirtchev <kirtchev@adacore.com>
3912 * exp_ch6.adb: Add with and use clause for Stringt.
3913 (Expand_Contract_Cases): Moved from sem_ch6. Add formal parameters
3914 Decls and Stmts along with comments on their usage.
3915 * exp_ch6.ads (Expand_Contract_Cases): Moved from sem_ch6.
3916 * sem_ch6.adb (Expand_Contract_Cases): Moved to exp_ch6.
3917 (Process_Contract_Cases): Update the call to Expand_Contract_Cases.
3919 2013-04-25 Ed Schonberg <schonberg@adacore.com>
3921 * gnat_rm.texi: Minor editing, to clarify use of dimension aspects.
3922 * sem_util.adb (Is_OK_Variable_For_Out_Formal): Reject an
3923 aggregate for a packed type, which may be converted into an
3924 unchecked conversion of an object.
3926 2013-04-25 Robert Dewar <dewar@adacore.com>
3928 * sem_prag.adb: Minor code reorganization (correct misspelling
3930 * sem_util.adb, aspects.ads, sem_ch6.adb: Minor reformatting.
3931 * gnat_rm.texi: Document impl-defined aspects.
3932 * sem_dim.adb, sem_dim.ads, gnat_ugn.texi, s-dimmks.ads: Minor
3935 2013-04-25 Hristian Kirtchev <kirtchev@adacore.com>
3937 * einfo.adb (Set_Abstract_States): The attribute now applies
3938 to generic packages.
3939 * sem_ch4.adb (Referenced): Moved to sem_util.
3940 * sem_ch7.adb (Unit_Requires_Body): A [generic] package with
3941 a non-null abstract state needs a body.
3942 * sem_prag.adb (Analyze_Depends_In_Decl_Part): Update the calls
3943 to Collect_Subprogram_Inputs_Outputs.
3944 (Analyze_Global_Item): Verify the proper usage of an item with mode
3945 In_Out or Output relative to the enclosing context.
3946 (Analyze_Pragma): Abstract_State can now be applied to a generic
3947 package. Do not reset the Analyzed flag for pragmas Depends and Global
3948 as this is not needed.
3949 (Appears_In): Moved to library level.
3950 (Check_Mode_Restiction_In_Enclosing_Context): New routine.
3951 (Collect_Subprogram_Inputs_Outputs): Moved to library level. Add
3952 formal parameters Subp_Id, Subp_Inputs, Subp_Outputs and Global
3953 seen along with comments on usage.
3954 * sem_util.ads, sem_util.adb (Referenced): New routine.
3956 2013-04-25 Hristian Kirtchev <kirtchev@adacore.com>
3958 * sem_ch6.adb (Expand_Contract_Cases): Generate
3959 detailed error messages only when switch -gnateE is in effect.
3961 2013-04-25 Yannick Moy <moy@adacore.com>
3963 * sem_attr.adb (Analyze_Attribute): Do not issue
3964 an error for a possibly misplaced 'Result or 'Old attribute when
3965 analyzing the aspect.
3967 2013-04-25 Robert Dewar <dewar@adacore.com>
3969 * sem_ch12.adb, sem_util.adb, sem_ch4.adb: Minor reformatting.
3971 2013-04-25 Hristian Kirtchev <kirtchev@adacore.com>
3973 * sem_ch4.adb (Analyze_Quantified_Expression):
3974 Add local variable Loop_Id. Verify that the loop variable
3975 is used within the condition of the quantified expression.
3976 (Referenced): New routine.
3978 2013-04-25 Hristian Kirtchev <kirtchev@adacore.com>
3980 * sem_case.adb (Analyze_Choices): Enhance the error message
3981 given on a bad use of subtype predicate.
3982 * sem_ch5.adb (Analyze_Loop_Parameter_Specification): Enhance
3983 the error message given on a bad use of subtype predicate.
3984 * sem_util.adb (Bad_Predicated_Subtype_Use): Add formal parameter
3985 Suggest_Static. Emit an extra error message advising how to
3986 remedy the bad use of the predicate if the context warrants it.
3987 * sem_util.ads (Bad_Predicated_Subtype_Use): Add formal parameter
3988 Suggest_Static along with a comment explaining its usage.
3990 2013-04-25 Ed Schonberg <schonberg@adacore.com>
3992 * sem_disp.adb (Check_Dispatching_Operation): Further refinement
3993 to checks for AI05-0125: the check for a hidden primitive that
3994 may be overridden by the new declaration only applies if the
3995 hidden operation is never declared. This is not the case if the
3996 operation is declared in a parent unit.
3998 2013-04-25 Robert Dewar <dewar@adacore.com>
4000 * debug.adb: Remove d.X and d.Y entries and documentation.
4001 * exp_ch4.adb (Expand_N_If_Expression): Remove special code used
4002 if expression with actions not available (now always available).
4003 (Expand_Short_Circuit_Operator): Same change.
4004 * gnat1drv.adb (Adjust_Global_Switches) Remove setting
4005 Use_Expression_With_Actions flag, since this is now obsolete.
4006 * opt.ads (Use_Expression_Actions): Removed (always True now).
4007 * sinfo.ads: Minor comment updates.
4009 2013-04-25 Ed Schonberg <schonberg@adacore.com>
4011 * sem_ch12.adb (Check_Generic_Actuals): If an actual is an array
4012 subtype whose base type is currently private, install full view
4013 when compiling instance body.
4015 2013-04-25 Ed Schonberg <schonberg@adacore.com>
4017 * sem_disp.adb (Check_Dispatching_Operation): Refine checks for
4018 AI05-0125: the check for a hidden primitive that may be overridden
4019 by the new declaration is only performed if the declaration comes
4020 from source, and it must carry an explicit overriding indicator.
4022 2013-04-25 Hristian Kirtchev <kirtchev@adacore.com>
4024 * einfo.adb (Abstract_States): The attribute now applies to
4026 * sem_ch3.adb (Analyze_Object_Declaration): Check whether an
4027 object declaration introduces an illegal hidden state.
4028 * sem_prag.adb (Analyze_Abstract_State): Check whether a state
4029 declaration introduces an illegal hidden state.
4030 * sem_util.ads, sem_util.adb (Check_No_Hidden_State): New routine.
4032 2013-04-25 Ed Schonberg <schonberg@adacore.com>
4034 * exp_ch6.adb (Is_Build_In_Place_Function_Call): The call may
4035 be to a protected function, in which case the name in the call
4036 is a selected component.
4038 2013-04-25 Hristian Kirtchev <kirtchev@adacore.com>
4040 * sem_ch4.adb (Analyze_Quantified_Expression):
4041 Warn on a suspicious use of quantifier "some" when "all" was meant.
4042 (No_Else_Or_Trivial_True): New routine.
4044 2013-04-25 Robert Dewar <dewar@adacore.com>
4046 * einfo.ads, einfo.adb: Put back with/use for Namet.
4047 (Get_Pragma): New name (wi new spec) for Find_Pragma.
4048 * sem_ch6.adb: Change name Find_Pragma to Get_Pragma with
4049 different interface.
4051 2013-04-25 Ed Schonberg <schonberg@adacore.com>
4053 * sem_ch3.adb (Is_Visible_Component): In an instance all
4054 components are visible.
4056 2013-04-25 Matthew Heaney <heaney@adacore.com>
4058 * a-rbtgbo.adb, a-crbtgo.adb (Generic_Equal): do not test for
4059 tampering when container empty.
4060 * a-crbtgk.adb (Ceiling, Find, Floor): ditto.
4061 (Generic_Conditional_Insert, Generic_Conditional_Insert_With_Hint):
4064 2013-04-25 Ed Schonberg <schonberg@adacore.com>
4066 * par-ch12.adb: Move aspects from package specification to
4067 generic package declaration.
4068 * sem_ch12.adb: Analyze aspect specifications before building
4069 and analyzing the generic copy, so that the generated pragmas
4070 are properly taken into account.
4071 * sem_ch13.adb: For compilation unit aspects that apply to a
4072 generic package declaration, insert corresponding pragmas ahead
4073 of visible declarations.
4074 * sprint.adb: Display properly the aspects of a generic type
4077 2013-04-25 Robert Dewar <dewar@adacore.com>
4079 * frontend.adb: Minor reformatting.
4081 2013-04-25 Ed Schonberg <schonberg@adacore.com>
4083 * einfo.ads: Extend documentation on use of Is_Private_Ancestor
4085 * sem_ch3.adb (Is_Visible_Component): Refine predicate for the
4086 case of untagged types derived from private types, to reject
4087 illegal selected components.
4089 2013-04-25 Gary Dismukes <dismukes@adacore.com>
4091 * sem_util.adb (Is_Dependent_Component_Of_Mutable_Object): Test
4092 for case of selecting from an unexpanded implicit dereference
4093 and do not make a recursive call on such a prefix.
4095 2013-04-25 Doug Rupp <rupp@adacore.com>
4097 * targparm.adb (VXF{_Str}): New tag for vaxfloat.
4098 (Get_Target_Parameters): Handle VXF tag.
4099 * targparm.ads (VAX_Float_On_Target): New boolean.
4100 * system-vms-ia64.ads (VAX_Float): New boolean.
4101 * frontend.adb (Frontend): Handle VAX float boolean.
4103 2013-04-25 Hristian Kirtchev <kirtchev@adacore.com>
4105 * einfo.ads, einfo.adb: Remove with and use clauses for Namet.
4106 (Find_Pragma): New routine.
4107 * sem_util.ads, sem_util.adb (Find_Pragma): Moved to einfo.
4109 2013-04-25 Hristian Kirtchev <kirtchev@adacore.com>
4111 * sem_ch13.adb (Add_Call): Do not capture the nature of the inherited
4113 (Add_Predicates): Save the static predicate for diagnostics and error
4115 (Process_PPCs): Remove local variables Dynamic_Predicate_Present and
4116 Static_Predicate_Present. Add local variable Static_Pred. Ensure that
4117 the expression of a static predicate is static.
4119 2013-04-25 Hristian Kirtchev <kirtchev@adacore.com>
4121 * einfo.adb (Is_Ghost_Subprogram): Remove useless code.
4123 2013-04-25 Robert Dewar <dewar@adacore.com>
4125 * gnat_rm.texi: Minor addition of index entry.
4127 2013-04-25 Hristian Kirtchev <kirtchev@adacore.com>
4129 * sem_ch6.adb (Check_Access_Invariants): Test whether an
4130 invariant procedure is empty before generating a call to it.
4131 (Has_Enabled_Predicate): New routine.
4132 (Has_Null_Body): New routine.
4133 (Process_PPCs): Test whether an invariant procedure is
4134 empty before generating a call to it. Test whether predicates are
4135 enabled for a particular type before generating a predicate call.
4136 * sem_util.ads, sem_util.adb (Find_Pragma): New routine.
4138 2013-04-25 Robert Dewar <dewar@adacore.com>
4140 * sem_ch7.adb, einfo.adb, repinfo.adb, snames.adb-tmpl,
4141 snames.ads-tmpl: Minor reformatting.
4143 2013-04-25 Thomas Quinot <quinot@adacore.com>
4145 * sem_ch7.adb: Minor reformatting.
4147 2013-04-25 Robert Dewar <dewar@adacore.com>
4149 * gnat_rm.texi: Minor fix to Loop_Variant doc (Loop_Entry allowed).
4150 * s-tarest.adb: Minor reformatting.
4152 2013-04-25 Hristian Kirtchev <kirtchev@adacore.com>
4154 * aspects.ads, aspects.adb: Remove aspect Ghost from all relevant
4156 * einfo.adb: Remove with and use clause for Aspects.
4157 (Is_Ghost_Function): Removed.
4158 (Is_Ghost_Entity): New routine.
4159 (Is_Ghost_Subprogram): New routine.
4160 * einfo.ads: Remove synthesized attribute Is_Ghost_Function
4161 along with its uses in entities. Add synthesized attributes
4162 Is_Ghost_Entity and Is_Ghost_Subprogram along with uses in related
4164 (Is_Ghost_Function): Removed.
4165 (Is_Ghost_Entity): New routine.
4166 (Is_Ghost_Subprogram): New routine.
4167 * par-prag.adb: Remove pragma Ghost from the processing machinery.
4168 * repinfo.adb (List_Mechanisms): Add a value for convention Ghost.
4169 * sem_attr.adb (Analyze_Access_Attribute): Update the check
4170 for ghost subprograms.
4171 * sem_ch4.adb (Analyze_Call): Update the check for calls
4172 to ghost subprograms.
4173 (Check_Ghost_Function_Call): Removed.
4174 (Check_Ghost_Subprogram_Call): New routine.
4175 * sem_ch6.adb (Check_Convention): Rewritten.
4176 (Check_Overriding_Indicator): Remove the check for overriding
4178 (Convention_Of): New routine.
4179 * sem_ch12.adb (Preanalyze_Actuals): Update the check for ghost
4180 generic actual subprograms.
4181 * sem_mech.adb (Set_Mechanisms): Add an entry for convention Ghost.
4182 * sem_prag.adb: Remove the value for pragma Ghost from
4184 (Analyze_Pragma): Remove the processing for pragma Ghost.
4185 (Process_Convention): Emit an error when a ghost
4186 subprogram attempts to override.
4187 (Set_Convention_From_Pragma): Emit an error when a ghost subprogram
4188 attempts to override.
4189 * sinfo.ads: Clarify the usage of field Label_Construct.
4190 * snames.adb-tmpl (Get_Convention_Id): Add an entry for
4191 predefined name Ghost.
4192 (Get_Convention_Name): Add an entry for convention Ghost.
4193 * snames.ads-tmpl: Move predefined name Ghost to the sublist
4194 denoting conventions. Add convention id Ghost. Remove pragma
4197 2013-04-25 Ed Schonberg <schonberg@adacore.com>
4199 * sem_ch7.adb (Swap_Private_Dependents): Do no recurse on child
4200 units if within a generic hierarchy.
4202 2013-04-24 Hristian Kirtchev <kirtchev@adacore.com>
4204 * exp_ch6.adb (Expand_Actuals): Add a predicate check on an
4205 actual the related type has a predicate function.
4206 * sem_ch3.adb (Constant_Redeclaration): Ensure that the related
4207 type has an invariant procedure before building a call to it.
4208 * sem_ch6.adb (Append_Enabled_Item): New routine.
4209 (Check_Access_Invariants): Use routine
4210 Append_Enabled_Item to chain onto the list of postconditions.
4211 (Contains_Enabled_Pragmas): Removed.
4212 (Expand_Contract_Cases): Use routine Append_Enabled_Item to chain onto
4213 the list of postconditions.
4214 (Invariants_Or_Predicates_Present): Removed.
4215 (Process_PPCs): Partially reimplemented.
4217 2013-04-24 Sergey Rybin <rybin@adacore.com frybin>
4219 * tree_io.ads: Update ASIS_Version_Number because of changes
4220 in the way how entities are chained in a scope by means of
4223 2013-04-24 Ed Schonberg <schonberg@adacore.com>
4225 * exp_ch13.adb (Expand_N_Attribute_Definition_Clause, case
4226 Storage_Size): If the clause is not from an aspect, insert
4227 assignment to size variable of task type at the point of the
4228 clause, not after the task definition, to prevent access before
4229 elaboration in the back-end.
4231 2013-04-24 Yannick Moy <moy@adacore.com>
4233 * sem_prag.adb (Sig_Flags): Set correct value for Pragma_Assume.
4235 2013-04-24 Yannick Moy <moy@adacore.com>
4237 * gnat_rm.texi: Document 'Loop_Entry.
4239 2013-04-24 Jose Ruiz <ruiz@adacore.com>
4241 * s-tassta.adb, s-tarest.adb (Task_Wrapper): Start looking for
4242 fall-back termination handlers from the parents, because they apply
4243 only to dependent tasks.
4244 * s-solita.adb (Task_Termination_Handler_T): Do not look for fall-back
4245 termination handlers because the environment task has no parent,
4246 and if it defines one of these handlers it does not apply to
4247 itself because they apply only to dependent tasks.
4249 2013-04-24 Robert Dewar <dewar@adacore.com>
4251 * sem_type.adb, exp_attr.adb, exp_ch4.adb: Minor reformatting.
4253 2013-04-24 Robert Dewar <dewar@adacore.com>
4255 * gnat_rm.texi: Document 'Update attribute.
4256 * sem_attr.adb (Analyze_Attribute, case Update): Remove call
4257 to S14_Attribute (S14_Attribute): removed.
4259 2013-04-24 Robert Dewar <dewar@adacore.com>
4261 * interfac.ads: Add size clauses for IEEE_Float_32/64
4263 2013-04-24 Claire Dross <dross@adacore.com>
4265 * gnat1drv.adb (Adjust_Global_Switches): Remove
4266 special assignment of Use_Expression_With_Actions for SPARK_Mode.
4268 2013-04-24 Hristian Kirtchev <kirtchev@adacore.com>
4270 * checks.adb (Apply_Predicate_Check): Check for the presence
4271 of the dynamic predicate aspect when trying to determine if the
4272 predicate of a type is non-static.
4273 * sem_ch5.adb (Analyze_Loop_Parameter_Specification): Check
4274 for the presence of the dynamic predicate aspect when trying to
4275 determine if the predicate of a type is non- static.
4276 * sem_ch13.adb (Add_Call): Capture the nature of the
4277 inherited ancestor predicate.
4278 (Build_Predicate_Functions): Update comments. Rewrite the checks on
4279 static predicate application. Complain about the form of a non-static
4280 expression only when the type is static.
4282 2013-04-24 Ed Schonberg <schonberg@adacore.com>
4284 * sem_prag.adb: Add guard to tree traversal.
4286 2013-04-24 Vincent Celier <celier@adacore.com>
4288 * clean.adb (Clean): Remove local variable Root_Environment,
4289 use Makeutl.Root_Environment instead.
4290 * gnatcmd.adb: Remove local variable Root_Environment, use
4291 Makeutl.Root_Environment instead.
4292 * make.adb (Gnatmake): Remove local variable Root_Environment,
4293 use Makeutl.Root_Environment instead.
4294 * prj-makr.adb: Remove local variable Root_Environment, use
4295 Makeutl.Root_Environment instead.
4297 2013-04-24 Hristian Kirtchev <kirtchev@adacore.com>
4299 * exp_attr.adb (Expand_Loop_Entry_Attribute): Clarify the
4300 extraction of the declarative part of the conditional block. Move
4301 the processing of simple infinite loops to the start of the
4302 expansion logic. Correct the check which determines whether the
4303 proper scope is installed in visibility.
4304 * sem_attr.adb (Analyze_Attribute): Add local variable Attr
4305 to keep track of the attribute in case the enclosing indexed
4306 component has to be rewritten. When searching for the enclosing
4307 loop, start from the proper attribute reference in case of a
4308 rewriting. Do not allow for 'Loop_Entry to appear in pragma
4309 Assert. Replace loop variable J with Index. Set the type of the
4311 * sem_ch5.adb (Check_Unreachable_Code): Detect a specialized
4312 block that services a loop statement subject to at least one
4313 'Loop_Entry attribute.
4315 2013-04-24 Ed Schonberg <schonberg@adacore.com>
4317 * sem_type.adb (Disambiguate): In Ada 2012 mode, when trying to
4318 resolve a fixed point operation, use first subtype to determine
4319 whether type and operator are declared in the same list of
4322 2013-04-24 Hristian Kirtchev <kirtchev@adacore.com>
4324 * par-ch6.adb (P_Subprogram): Detect an illegal
4325 placement of the aspect specification list in the context of
4326 expression functions.
4328 2013-04-24 Ed Schonberg <schonberg@adacore.com>
4330 * exp_ch4.adb (Expand_N_Allocator): If the designated object
4331 has tasks, and the pointer type is an itype that has no master
4332 id, create a master renaming in the current context, which can
4333 only be an init_proc.
4335 2013-04-24 Robert Dewar <dewar@adacore.com>
4337 * sem_ch3.adb, sem_ch7.adb: Minor reformatting.
4338 * gnat_rm.texi: Document pragma Loop_Invariant.
4339 * sem_attr.adb (Analyze_Attribute, case Loop_Entry): This is
4340 no longer an S14_Attribute.
4341 * sem_prag.adb (Analyze_Pragma, case Loop_Invariant): Combine
4342 processing with Assert, allow message parameter, remove call
4345 2013-04-24 Thomas Quinot <quinot@adacore.com>
4347 * exp_ch4.adb: Minor reformatting.
4349 2013-04-24 Ed Schonberg <schonberg@adacore.com>
4351 * sem_ch7.adb (Swap_Private_Dependents): New internal routine
4352 to Install_Private_Declarations, to make the installation of
4353 private dependents recursive in the presence of child units.
4354 * sem_ch3.adb (Build_Discriminated_Subtype): Initialize properly
4355 the Private_Dependents of a private subtype.
4357 2013-04-24 Hristian Kirtchev <kirtchev@adacore.com>
4359 * exp_attr.adb (Expand_Loop_Entry_Attribute): Update the
4360 retrieval of the block declarations.
4361 * par-ch4.adb (P_Name): Let the name parsing machinery create
4362 a sequence of nested indexed components for attribute Loop_Entry.
4363 * sem_attr.adb (Analyze_Attribute): Add local constant
4364 Context. Reimplement part of the analysis of attribute Loop_Entry.
4365 (Convert_To_Indexed_Component): Removed.
4366 * sem_ch4.adb (Analyze_Indexed_Component_Form): Do not analyze
4367 an indexed component after it has been rewritten into attribute
4370 2013-04-24 Yannick Moy <moy@adacore.com>
4372 * snames.ads-tmpl: Minor change to list
4373 Loop_(In)variant not in configuration pragma.
4374 * sem_ch3.adb (Analyze_Declarations): Do not look at the original node
4375 for analyzing the expressions in pre/postconditions.
4377 2013-04-24 Robert Dewar <dewar@adacore.com>
4379 * gnatcmd.adb, xref_lib.adb, gnatls.adb, sem_ch13.adb: Minor
4382 2013-04-24 Yannick Moy <moy@adacore.com>
4384 * sem_ch6.adb (Analyze_Generic_Subprogram_Body,
4385 Analyze_Subprogram_Body_Helper): Reset contract node to Empty
4386 before setting entity to E_Subprogram_Body.
4387 * sem_ch8.adb (Analyze_Subprogram_Renaming): Reset contract node to
4388 Empty before setting entity to E_Subprogram_Body.
4390 2013-04-24 Vincent Celier <celier@adacore.com>
4392 * gnat_ugn.texi: Document new gnatls switch -aPdir.
4393 * gnatcmd.adb: Pass switch -aP<dir> to gnatls.
4394 * gnatls.adb (Scan_Ls_Arg): Process new switch -aP<dir>. Issue
4395 a warning for unknown switches.
4396 (Usage): Add line for new switch -aPdir.
4398 2013-04-24 Ed Schonberg <schonberg@adacore.com>
4400 * sem_util.adb, sem_util.ads (Is_Limited_Class_Wide_Type): Return true
4401 if the type comes from a limited view, so that task attributes can be
4404 2013-04-24 Yannick Moy <moy@adacore.com>
4406 * checks.adb (Apply_Float_Conversion_Check): Do not apply checks if
4407 full expansion is not enabled.
4409 2013-04-24 Ed Schonberg <schonberg@adacore.com>
4411 * sem_ch6.adb (Create_Extra_Formals): In Ada 2012, create extra
4412 formals if the type does not yet have a completion, and thus
4413 has no underlying view.
4415 2013-04-24 Ed Schonberg <schonberg@adacore.com>
4417 * sem_ch13.adb (Analyze_Aspect_Specifications): Treat an aspect
4418 specification for Address as a reference, to suppress warnings
4419 on entities that may be read by an external device.
4421 2013-04-24 Sergey Rybin <rybin@adacore.com frybin>
4423 * gnat_ugn.texi: Add description of '--help' and '--version'
4424 options for ASIS tools: gnatelim, gnatmetric, gnatstub, gnatpp.
4426 2013-04-24 Arnaud Charlet <charlet@adacore.com>
4428 * gnat_rm.texi: Minor syntax fix.
4430 2013-04-24 Hristian Kirtchev <kirtchev@adacore.com>
4432 * exp_attr.adb (Expand_Loop_Entry_Attribute): Add extra comments on
4433 what and why is being analyzed. Remove the decoration of renamings as
4434 this simply falls out of the general analysis mechanism.
4436 2013-04-24 Hristian Kirtchev <kirtchev@adacore.com>
4438 * sem_res.adb (Explain_Redundancy): New routine.
4439 (Resolve_Equality_Op): Place the error concerning a redundant
4440 comparison to True at the "=". Try to explain the nature of the
4443 2013-04-24 Javier Miranda <miranda@adacore.com>
4446 * checks.adb, exp_ch6.adb (Install_Null_Excluding_Check): No
4447 check in interface thunks since it is performed at the caller
4449 (Expand_Simple_Function_Return): No accessibility check
4450 needed in thunks since the check is done by the target routine.
4452 2013-04-24 Vincent Celier <celier@adacore.com>
4454 * xref_lib.adb (Add_Entity): Use the canonical file names
4455 so that source file names with capital letters are found on
4456 platforms where file names are case insensitive.
4458 2013-04-24 Hristian Kirtchev <kirtchev@adacore.com>
4460 * par-ch4.adb (P_Name): Continue to parse the name extension when the
4461 construct is attribute Loop_Entry. Do not convert the attribute
4462 reference into an indexed component when there is at least one
4463 expression / range following 'Loop_Entry.
4465 2013-04-24 Hristian Kirtchev <kirtchev@adacore.com>
4467 * sem_ch6.adb (Contains_Enabled_Pragmas): New routine.
4468 (Process_PPCs): Generate procedure _Postconditions
4469 only when the context has invariants or predicates or enabled
4472 2013-04-24 Thomas Quinot <quinot@adacore.com>
4474 * g-socket.adb (Host_Entry): Introduce intermediate copy of
4475 memory location pointed to by Hostent_H_Addr, as it might not
4476 have sufficient alignment.
4478 2013-04-24 Yannick Moy <moy@adacore.com>
4480 * repinfo.adb (List_Rep_Info): Set the value of Unit_Casing before
4481 calling subprograms which may read it.
4483 2013-04-24 Hristian Kirtchev <kirtchev@adacore.com>
4485 * einfo.adb: Remove Loop_Entry_Attributes from the usage of
4486 nodes. Flag 260 is now used.
4487 (Has_Loop_Entry_Attributes): New routine.
4488 (Loop_Entry_Attributes): Removed.
4489 (Set_Has_Loop_Entry_Attributes): New routine.
4490 (Set_Loop_Entry_Attributes): Removed.
4491 (Write_Entity_Flags): Write out Flag 260.
4492 (Write_Field10_Name): Remove the output for Loop_Entry_Attributes.
4493 * einfo.ads: Remove attribute Loop_Entry_Attributes,
4494 its related comment and uses in nodes. Add new attribute
4495 Has_Loop_Entry_Attributes, related comment and uses in loop nodes.
4496 (Has_Loop_Entry_Attributes): New routine and pragma Inline.
4497 (Loop_Entry_Attributes): Removed along with pragma Inline.
4498 (Set_Has_Loop_Entry_Attributes): New routine and pragma Inline.
4499 (Set_Loop_Entry_Attributes): Removed along with pragma Inline.
4500 * exp_attr.adb (Expand_Loop_Entry_Attribute): New routine.
4501 (Expand_N_Attribute_Reference): Expand attribute 'Loop_Entry.
4502 * exp_ch5.adb: Remove with and use clause for Elists.
4503 (Expand_Loop_Entry_Attributes): Removed.
4504 (Expand_N_Loop_Statement): Add local variable Stmt. Rename local
4505 constant Isc to Scheme. When a loop is subject to attribute
4506 'Loop_Entry, retrieve the nested loop from the conditional
4507 block. Move the processing of controlled object at the end of
4509 * sem_attr.adb (Analyze_Attribute): Do not chain attribute
4510 'Loop_Entry to its related loop.
4511 * sem_ch5.adb (Analyze_Loop_Statement): Add local variable
4512 Stmt. When the iteration scheme mentions attribute 'Loop_Entry,
4513 the entire loop is rewritten into a block. Retrieve the nested
4514 loop in such cases to complete the analysis.
4515 * sem_util.ads, sem_util.adb (Find_Loop_In_Conditional_Block): New
4517 (Subject_To_Loop_Entry_Attributes): New routine.
4519 2013-04-24 Robert Dewar <dewar@adacore.com>
4521 * exp_prag.adb (Expand_Loop_Variant): Generate pragma Check
4522 (Loop_Variant, xxx) rather than Assert (xxx).
4523 * gnat_rm.texi: Document pragma Loop_Variant.
4524 * sem_prag.adb (Analyze_Pragma, case Loop_Variant): Remove call
4527 2013-04-24 Yannick Moy <moy@adacore.com>
4529 * adabkend.adb, ali-util.adb, ali.adb, debug.adb,
4530 errout.adb, errout.ads, erroutc.adb, exp_ch3.adb, exp_ch4.adb,
4531 exp_ch6.adb, exp_ch7.adb, exp_dbug.adb, exp_util.adb,
4532 expander.adb, freeze.adb, gnat1drv.adb, lib-writ.adb,
4533 lib-writ.ads, lib-xref.adb, lib-xref.ads, opt.adb, opt.ads,
4534 restrict.adb, sem_aggr.adb, sem_attr.adb, sem_ch3.adb,
4535 sem_ch4.adb, sem_ch5.adb, sem_ch6.adb, sem_eval.adb, sem_prag.adb,
4536 sem_res.adb, sem_util.adb: Everything with name
4537 'Alfa' renamed in 'SPARK'. Update comments.
4538 Renaming of units with name 'Alfa', renamed with 'SPARK' instead.
4539 * exp_alfa.adb: renamed exp_spark.adb.
4540 * exp_alfa.ads: renamed exp_spark.ads.
4541 * get_alfa.adb: renamed get_spark_xrefs.adb.
4542 * get_alfa.ads: renamed get_spark_xrefs.ads.
4543 * lib-xref-alfa.adb: renamed lib-xref-spark_specific.adb.
4544 * put_alfa.adb: renamed put_spark_xrefs.adb.
4545 * put_alfa.ads: renamed put_spark_xrefs.ads.
4546 * alfa.adb: renamed spark_xrefs.adb.
4547 * alfa.ads: renamed spark_xrefs.ads.
4548 * alfa_test.adb: renamed spark_xrefs_test.adb.
4549 * gcc-interface/Make-lang.in: Update dependencies.
4551 2013-04-24 Robert Dewar <dewar@adacore.com>
4553 * gnat_rm.texi: Document pragma Assume.
4554 * sem_prag.adb (Analyze_Pragma, case Assume): Now processed as
4555 part of Assert, and no longer requires -gnatd.F
4557 2013-04-24 Robert Dewar <dewar@adacore.com>
4559 * gnat_rm.texi: Document pragma Assert_And_Cut.
4560 * sem_prag.adb (Analyze_Pragma, case Assert_And_Cut): Remove
4563 2013-04-24 Ed Schonberg <schonberg@adacore.com>
4565 * sem_aux.adb: Add guard in Available_View.
4567 2013-04-24 Hristian Kirtchev <kirtchev@adacore.com>
4569 * sem_prag.adb (Analyze_Depends_In_Decl_Part): Use
4570 Find_Related_Subprogram to find the associated subprogram.
4571 (Analyze_Global_In_Decl_List): Use Find_Related_Subprogram
4572 to find the associated subprogram.
4573 (Analyze_Pragma): Use Find_Related_Subprogram to find the associated
4576 2013-04-24 Hristian Kirtchev <kirtchev@adacore.com>
4578 * exp_ch6.adb: Remove with and use clause for Sem_Prag.
4579 (Freeze_Subprogram): Call Analyze_Subprogram_Contract to analyze
4580 the contract of a subprogram.
4581 * sem_ch3.adb: Remove with and use clause for Sem_Prag.
4582 (Analyze_Declarations): Call Analyze_Subprogram_Contract to
4583 analyze the contract of a subprogram.
4584 * sem_ch6.adb (Analyze_Subprogram_Contract): New routine.
4585 (Check_Subprogram_Contract): Removed.
4586 * sem_ch6.ads (Analyze_Subprogram_Contract): New routine.
4587 (Check_Subprogram_Contract): Removed.
4588 (Expand_Contract_Cases): Add a guard against malformed contract cases.
4589 * sem_ch13.adb (Analyze_Aspect_Specifications): Call
4590 Decorate_Delayed_Aspect_And_Pragma to decorate aspects
4591 Contract_Cases, Depends and Global. Reimplement the analysis of
4592 aspect Contract_Cases.
4593 (Decorate_Delayed_Aspect_And_Pragma): New routine.
4594 * sem_prag.adb (Analyze_Contract_Cases_In_Decl_Part): New routine.
4595 (Analyze_CTC_In_Decl_Part): Removed.
4596 (Analyze_Pragma): Reimplement the analysis of pragma Contract_Cases.
4597 (Analyze_Test_Case_In_Decl_Part): New routine.
4598 (Find_Related_Subprogram): New routine.
4599 (Requires_Profile_Installation): Add new formal Prag. Update
4600 the logic to take into account the origin of the pragma.
4601 * sem_prag.ads (Analyze_Contract_Cases_In_Decl_Part): New routine.
4602 (Analyze_CTC_In_Decl_Part): Removed.
4603 (Analyze_Test_Case_In_Decl_Part): New routine.
4605 2013-04-24 Robert Dewar <dewar@adacore.com>
4607 * sem_prag.adb (Process_Convention): Move Stdcall tests to
4608 Set_Convention_From_Pragma so that they are applied to each
4609 entry of a homonym set.
4610 (Process_Convention): Don't try to set convention if already set.
4612 2013-04-24 Robert Dewar <dewar@adacore.com>
4614 * gnatbind.adb: Minor reformatting.
4616 2013-04-24 Vincent Celier <celier@adacore.com>
4618 * clean.adb (Gnatclean): Add the default project search
4619 directories in the project search path after scanning the
4620 switches on the command line.
4621 (Initialize): Do not put the default project search directories in the
4622 project search path.
4623 * gnatcmd.adb (GNATcmd): Add the default project search
4624 directories in the project search path after scanning the switches
4625 on the command line.
4626 * make.adb (Initialize): Add the default project search
4627 directories in the project search path after scanning the switches
4628 on the command line.
4630 2013-04-24 Yannick Moy <moy@adacore.com>
4632 * restrict.ads (Restriction_Warnings): Initialize with all False value.
4634 2013-04-24 Robert Dewar <dewar@adacore.com>
4636 * checks.ads, checks.adb (Predicate_Checks_Suppressed): New function.
4637 * exp_util.ads, exp_util.adb (Make_Predicate_Check): Check setting of
4639 * snames.ads-tmpl (Name_Predicate_Check): New check name.
4640 * types.ads (Predicate_Check): New definition.
4641 * gnat_rm.texi: Add documentation for Predicate_Check.
4643 2013-04-24 Ed Schonberg <schonberg@adacore.com>
4645 * exp_ch8.adb (Expand_N_Subprogram_Renaming_Declaration): If this
4646 is a renaming of predefined equality for an untagged record,
4647 add generated body to the freeze actions for the subprogram, to
4648 prevent freezing issues when the record has incomplete components.
4649 * exp_ch4.adb (Expand_Composite_Equality): If the type is a type
4650 without completion, return a predefined comparison instead of
4651 just False. This may happen when building the expression for
4652 record equality, when some component has a type whose completion
4653 has not been seen yet. The operation will be analyzed an expanded
4654 after the type has been frozen, at which point all component
4655 types will have been completed, or an error reported.
4657 2013-04-24 Ed Schonberg <schonberg@adacore.com>
4659 * sem_ch13.adb (Analyze_Aspect_Specifications): Do not delay
4660 analysis of a Convention aspect.
4662 2013-04-24 Eric Botcazou <ebotcazou@adacore.com>
4664 * fe.h (Machine_Overflows_On_Target): New macro and declaration.
4665 (Signed_Zeros_On_Target): Likewise.
4667 2013-04-24 Hristian Kirtchev <kirtchev@adacore.com>
4669 * exp_ch6.adb: Add with and use clause for Sem_Prag.
4670 (Freeze_Subprogram): Analyze all delayed aspects for a null
4671 procedure so that they are available when analyzing the
4672 internally-generated _Postconditions routine.
4673 * exp_ch13.adb: Remove with and use clause for Sem_Prag.
4674 (Expand_N_Freeze_Entity): Move the code that analyzes delayed
4675 aspects of null procedures to exp_ch6.Freeze_Subprogram.
4676 * sem_prag.adb (Analyze_Abstract_State): Update the check on
4677 volatile requirements.
4679 2013-04-24 Bob Duff <duff@adacore.com>
4681 * ali-util.ads (Source_Record): New component Stamp_File
4682 to record from whence the Stamp came.
4683 * ali-util.adb (Set_Source_Table): Set Stamp_File component.
4684 * bcheck.adb (Check_Consistency): Print additional information in
4686 * gnatbind.adb (Gnatbind): Print additional information in
4689 2013-04-24 Robert Dewar <dewar@adacore.com>
4691 * exp_ch13.adb, sem_prag.adb: Update comments.
4692 * sem_ch3.adb, exp_ch9.adb, g-socket.adb, sem_ch13.adb: Minor
4695 2013-04-24 Doug Rupp <rupp@adacore.com>
4697 * vms_data.ads (/{NO}INHIBIT-EXEC): Document new default behavior.
4699 2013-04-24 Yannick Moy <moy@adacore.com>
4701 * sinfo.ads: Minor correction of typo.
4703 2013-04-24 Ed Schonberg <schonberg@adacore.com>
4705 * sem_ch3.adb: Create packed array only when expander is
4708 2013-04-24 Hristian Kirtchev <kirtchev@adacore.com>
4710 * sem_prag.adb (Analyze_Depends_In_Decl_Part): Install the formals only
4711 when the context warrants it.
4712 (Analyze_Global_In_Decl_List): Install the formals only when
4713 the context warrants it.
4714 (Requires_Profile_Installation): New routine.
4716 2013-04-24 Ed Schonberg <schonberg@adacore.com>
4718 * exp_ch6.adb (Expand_N_Simple_Return_Statement): When the return
4719 type is a discriminated private type that does not require use
4720 of the secondary stack, a constrained subtype of the underlying
4721 type is created to convey the proper object size to the backend.
4722 If the return type is originally a private type, the return
4723 expression is wrapped in an unchecked_conversion. If the return
4724 expression is used subsequently in a call to the postcondition
4725 function, this conversion must be undone to prevent a spurious
4726 error on the analysis of that call.
4728 2013-04-23 Kai Tietz <ktietz@redhat.com>
4731 * raise-gcc.c (__SEH__): Additional check that SjLj isn't active.
4733 2013-04-23 Eric Botcazou <ebotcazou@adacore.com>
4734 Pascal Obry <obry@adacore.com>
4736 * gcc-interface/Makefile.in (targ): Fix target name check.
4737 (../../gnatmake$(exeext)): Add '+' for LTO.
4738 (../../gnatlink$(exeext)): Likewise.
4740 2013-04-23 Hristian Kirtchev <kirtchev@adacore.com>
4742 * exp_ch9.adb (Build_PPC_Wrapper): Correct the traversal of
4743 pre- and post-conditions.
4744 (Expand_N_Task_Type_Declaration):
4745 Use the correct attribute to check for pre- and post-conditions.
4746 * exp_ch13.adb (Expand_N_Freeze_Entity): Correct the traversal of
4747 pre- and post-conditions. Analyze delayed classification items.
4748 * freeze.adb (Freeze_Entity): Use the correct attribute to
4749 check for pre- and post- conditions.
4750 * sem_ch3.adb (Analyze_Declarations): Correct the traversal
4751 of pre- and post-conditions as well as contract- and
4752 test-cases. Analyze delayed pragmas Depends and Global.
4753 * sem_ch6.adb (Check_Subprogram_Contract): Use the correct
4754 attribute to check for pre- and post-conditions, as well as
4755 contract-cases and test-cases. (List_Inherited_Pre_Post_Aspects):
4756 Correct the traversal of pre- and post- conditions.
4757 (Process_Contract_Cases): Update the comment on usage. Correct
4758 the traversal of contract-cases.
4759 (Process_Post_Conditions): Update the comment on usage. Correct the
4760 traversal of pre- and post-conditions.
4761 (Process_PPCs): Correct the traversal of pre- and post-conditions.
4762 (Spec_Postconditions): Use the correct
4763 attribute to check for pre- and post- conditions, as well as
4764 contract-cases and test-cases.
4765 * sem_ch13.adb (Analyze_Aspect_Specifications): Reimplement the
4766 actions related to aspects Depends and Global. Code refactoring
4767 for pre- and post-conditions.
4768 (Insert_Delayed_Pragma): New routine.
4769 * sem_prag.adb (Add_Item): New routine.
4770 (Analyze_Depends_In_Decl_Part): New routine.
4771 (Analyze_Global_In_Decl_Part): New routine.
4772 (Analyze_Pragma): Reimplement the actions related to aspects Depends and
4773 Global. Verify that a body acts as a spec for pragma Contract_Cases.
4774 (Chain_PPC): Use Add_Contract_Item to chain a pragma.
4775 (Chain_CTC): Correct the traversal of contract-
4776 and test-cases. Use Add_Contract_Item to chain a pragma.
4777 (Chain_Contract_Cases): Correct the traversal of contract-
4778 and test-cases. Use Add_Contract_Item to chain a pragma.
4779 (Check_Precondition_Postcondition): Update the comment on usage.
4780 (Check_Test_Case): Update the comment on usage.
4781 * sem_prag.ads (Analyze_Depends_In_Decl_Part): New routine.
4782 (Analyze_Global_In_Decl_Part): New routine.
4783 * sem_util.ads, sem_util.adb (Add_Contract_Item): New routine.
4784 * sinfo.adb (Classifications): New routine.
4785 (Contract_Test_Cases): New routine.
4786 (Pre_Post_Conditions): New routine.
4787 (Set_Classifications): New routine.
4788 (Set_Contract_Test_Cases): New routine.
4789 (Set_Pre_Post_Conditions): New routine.
4790 (Set_Spec_CTC_List): Removed.
4791 (Set_Spec_PPC_List): Removed.
4792 (Spec_CTC_List): Removed.
4793 (Spec_PPC_List): Removed.
4794 * sinfo.ads: Update the structure of N_Contruct along with all
4796 (Classifications): New routine and pragma Inline.
4797 (Contract_Test_Cases): New routine and pragma Inline.
4798 (Pre_Post_Conditions): New routine and pragma Inline.
4799 (Set_Classifications): New routine and pragma Inline.
4800 (Set_Contract_Test_Cases): New routine and pragma Inline.
4801 (Set_Pre_Post_Conditions): New routine and pragma Inline.
4802 (Set_Spec_CTC_List): Removed.
4803 (Set_Spec_PPC_List): Removed.
4804 (Spec_CTC_List): Removed.
4805 (Spec_PPC_List): Removed.
4807 2013-04-23 Doug Rupp <rupp@adacore.com>
4809 * init.c (GNAT$STOP) [VMS]: Bump sigargs[0] count by 2
4810 to account for LIB$STOP not having the chance to add the PC and
4813 2013-04-23 Robert Dewar <dewar@adacore.com>
4815 * sem_ch13.adb: Minor code reorganization (remove some redundant
4817 * sem_ch3.adb, sem_prag.adb: Minor reformatting.
4819 2013-04-23 Yannick Moy <moy@adacore.com>
4821 * einfo.ads: Minor typo fix.
4822 * sem_ch13.adb (Build_Predicate_Functions): Reject cases where
4823 Static_Predicate is applied to a non-scalar or non-static type.
4824 * sem_prag.adb: Minor typo fix.
4826 2013-04-23 Doug Rupp <rupp@adacore.com>
4828 * init.c (GNAT$STOP) [VMS]: New function.
4830 2013-04-23 Ed Schonberg <schonberg@adacore.com>
4832 * sem_ch3.adb: Add exp_pakd to context.
4833 (Constrain_Component_Type): If the component of the parent is
4834 packed, and the record subtype being built is already frozen,
4835 as is the case for an itype, the component type itself will not
4836 be frozen, and the packed array type for it must be constructed
4839 2013-04-23 Thomas Quinot <quinot@adacore.com>
4841 * g-socket.adb, g-socket.ads (Set_Close_On_Exec): New subprogram.
4843 2013-04-23 Yannick Moy <moy@adacore.com>
4845 * err_vars.ads (Error_Msg_Qual_Level): Set variable to zero
4847 * opt.ads (Multiple_Unit_Index): Set variable to zero at declaration.
4848 * sem_util.adb (NCT_Table_Entries): Set variable to zero at declaration.
4849 * set_targ.ads (Num_FPT_Modes): Set variable to zero at declaration.
4850 * stylesw.adb (Save_Style_Check_Options): Protect testing the
4851 value of Style_Check_Comments_Spacing by a previous test that
4852 Style_Check_Comments is True.
4854 2013-04-23 Thomas Quinot <quinot@adacore.com>
4856 * sem_prag.adb, sem_prag.ads (Effective_Name): Rename to
4857 Original_Name, and move declaration to package body as this
4858 subprogram is not used from outside. Also clarify documentation.
4860 2013-04-23 Ed Schonberg <schonberg@adacore.com>
4862 * exp_ch6.adb (Expand_N_Subprogram_Body): When compiling with
4863 initialize_scalars, disable predicate checks on the generated
4864 assignment to an out scalar parameter.
4866 2013-04-23 Gary Dismukes <dismukes@adacore.com>
4868 * sem_ch4.adb (Analyze_Allocator): Remove error
4869 check for "constrained in partial view" constraints entirely.
4871 2013-04-23 Robert Dewar <dewar@adacore.com>
4873 * einfo.ads, sem_prag.ads: Minor reformatting.
4874 * errout.ads: Comment update.
4876 2013-04-23 Yannick Moy <moy@adacore.com>
4878 * exp_ch5.adb: Minor typo.
4880 2013-04-23 Thomas Quinot <quinot@adacore.com>
4882 * gnat_ugn.texi: Fix typo.
4884 2013-04-23 Ed Schonberg <schonberg@adacore.com>
4886 * einfo.ads: Minor documentation clarification.
4888 2013-04-23 Bob Duff <duff@adacore.com>
4890 * types.ads: Fix incorrect comment.
4892 2013-04-23 Ed Schonberg <schonberg@adacore.com>
4894 * sem_aux.adb sem_aux.ads (Effectively_has_Constrained_Partial_View):
4895 Rename subprogram as Object_Type_Has_Constrained_Partial_View, better
4896 description of purpose.
4897 * checks.adb (Apply_Discriminant_Check): Use above renaming.
4898 * sem_ch4.adb (Analyze_Allocator): Check Has_Constrained_Partial_View
4899 of the base type, rather than using the Object_Type predicate.
4900 * sem_attr.adb (Analyze_Attribute, case 'Access): Use above renaming.
4901 * sem_util.adb (Is_Dependent_Component_Of_Mutable_Object): ditto.
4902 * exp_attr.adb (Expand_N_Attribute_Reference, case 'Constrained): Ditto.
4903 * exp_ch4.adb (Expand_N_Allocator): Ditto.
4905 2013-04-23 Robert Dewar <dewar@adacore.com>
4907 * exp_prag.adb (Expand_Pragma_Check): Check for Assert rather
4909 * sem_prag.adb (Is_Valid_Assertion_Kind): Moved to spec
4910 (Effective_Name): New function (Analyze_Pragma, case Check):
4911 Disallow [Statement_]Assertions (Check_Kind): Implement
4912 Statement_Assertions (Check_Applicable_Policy): Use Effective_Name
4913 (Is_Valid_Assertion_Kind): Allow Statement_Assertions.
4914 * sem_prag.ads (Is_Valid_Assertion_Kind): Moved here from body
4915 (Effective_Name): New function.
4916 * sem_res.adb: Minor reformatting.
4917 * snames.ads-tmpl (Name_Statement_Assertions): New entry.
4918 * gnat_rm.texi: Add documentation of new assertion kind
4919 Statement_Assertions.
4921 2013-04-23 Robert Dewar <dewar@adacore.com>
4923 * sinfo.ads, einfo.adb, sem_res.adb, exp_ch6.adb, aspects.adb: Minor
4924 reformatting and code clean up.
4926 2013-04-23 Vincent Celier <celier@adacore.com>
4928 * prj-part.ads, prj-conf.ads: Minor comment updates.
4930 2013-04-23 Ed Schonberg <schonberg@adacore.com>
4932 * einfo.adb (Predicate_Function): For a private type, retrieve
4933 predicate function from full view.
4934 * aspects.adb (Find_Aspect): Ditto.
4935 * exp_ch6.adb (Expand_Actuals): If the formal is class-wide and
4936 the actual is a definite type, apply predicate check after call.
4937 * sem_res.adb: Do not apply a predicate check before the call to
4938 a generated Init_Proc.
4940 2013-04-23 Robert Dewar <dewar@adacore.com>
4942 * sem_ch13.adb (Analyze_Aspect_Specifications): Significant
4943 rewrite to make sure Is_Ignore is properly captured when aspect
4945 * sem_ch6.adb: Minor reformatting.
4946 * sem_prag.adb (Analyze_Pragma): Do not test policy at time of
4947 pragma for the case of a pragma coming from an aspect (already
4948 tested when we analyzed the aspect).
4950 2013-04-23 Vincent Celier <celier@adacore.com>
4952 * prj-conf.adb (Parse_Project_And_Apply_Config): New
4953 Boolean parameter Implicit_Project, defaulted to False. Call
4954 Prj.Part.Parse with Implicit_Project.
4955 * prj-conf.ads (Parse_Project_And_Apply_Config): New Boolean
4956 parameter Implicit_Project, defaulted to False.
4957 * prj-part.adb (Parse_Single_Project): New Boolean parameter
4958 Implicit_Project, defaulted to False. When Implicit_Project is
4959 True, change the Directory of the project node to the Current_Dir.
4960 * prj-part.ads (Parse): New Boolean parameter, defaulted to False
4962 2013-04-23 Robert Dewar <dewar@adacore.com>
4964 * exp_util.adb: Minor reformatting.
4966 2013-04-23 Robert Dewar <dewar@adacore.com>
4968 * xoscons.adb: Minor reformatting.
4970 2013-04-23 Hristian Kirtchev <kirtchev@adacore.com>
4972 * sem_prag.adb (Check_Mode): Ensure that a
4973 self-referential output appears in both input and output lists of
4974 the subprogram as categorized by aspect Global.
4975 (Check_Usage): Rename formal parameters to better illustrate their
4976 function. Update all uses of the said formals.
4978 2013-04-23 Thomas Quinot <quinot@adacore.com>
4980 * exp_util.adb, exp_util.ads (Fully_Qualified_Name_String): New
4981 parameter Append_NUL to make NUL-termination optional.
4982 * exp_dist.adb: Consistently use the above throughout instead of
4983 Get_Library_Unit_Name_String.
4985 2013-04-23 Robert Dewar <dewar@adacore.com>
4987 * sem_util.adb, sem_res.adb, prj-tree.adb, prj-tree.ads: Minor
4990 2013-04-23 Pascal Obry <obry@adacore.com>
4992 * xoscons.adb: Remove unused use clause, minor code clean-up.
4994 2013-04-23 Ed Schonberg <schonberg@adacore.com>
4996 * sem_util.ads, sem_util.adb: Code cleanup for Is_Expression_Function
4997 (can apply to any scope entity).
4998 * sem_res.adb (Resolve_Call): If the call is within another
4999 expression function it does not constitute a freeze point.
5001 2013-04-23 Yannick Moy <moy@adacore.com>
5003 * exp_ch6.adb (Expand_Actuals): Test that Subp
5004 is overloadable before testing if it's an inherited operation.
5006 2013-04-23 Robert Dewar <dewar@adacore.com>
5008 * a-envvar.adb, a-envvar.ads, exp_util.adb, sem_ch12.adb: Minor
5011 2013-04-23 Ed Schonberg <schonberg@adacore.com>
5013 * sem_ch3.adb (Analyze_Object_Declarations): Undo previous patch.
5014 * exp_util.adb (Expand_Subtype_From_Expr): If the expression
5015 is a source entity and the declaration is for an aliased
5016 unconstrained array, create a new subtype so that the flag
5017 Is_Constr_Subt_For_UN_Aliased does not pollute other entities.
5019 2013-04-23 Hristian Kirtchev <kirtchev@adacore.com>
5021 * aspects.adb: Move tables Base_Aspect and Inherited_Aspect
5022 from the spec to the body.
5023 (Find_Aspect): Update the call to Get_Aspect_Id.
5024 (Get_Aspect_Id): New version that takes an aspect specification.
5025 * aspects.ads: Reorganize all aspect related tables.
5026 (Get_Aspect_Id): New version that takes an aspect specification.
5027 * par_sco.adb (Traverse_Aspects): Update the call to Get_Aspect_Id.
5028 * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration): Update
5029 the call to Get_Aspect_Id.
5030 * sem_ch13.adb (Analyze_Aspect_At_Freeze_Point): Update the
5031 call to Get_Aspect_Id. (Analyze_Aspect_Specifications): Update
5032 the call to Get_Aspect_Id. Update the call to Impl_Defined_Aspect.
5034 2013-04-23 Robert Dewar <dewar@adacore.com>
5036 * sem_prag.adb (Fix_Error): Rewrite to do more accurate job
5037 of getting proper name in the case where pragma comes from
5039 * sem_ch3.adb, sinfo.ads, par-ch6.adb, exp_ch6.adb: Minor reformatting.
5041 2013-04-23 Yannick Moy <moy@adacore.com>
5043 * sem_ch6.adb (Process_PPCs): Do not filter postconditions based on
5046 2013-04-23 Thomas Quinot <quinot@adacore.com>
5048 * par_sco.adb (Traverse_Aux_Decls): Minor code reorganization.
5050 2013-04-23 Doug Rupp <rupp@adacore.com>
5052 * init.c: Move facility macros outside IN_RTS.
5054 2013-04-23 Thomas Quinot <quinot@adacore.com>
5056 * freeze.adb (Freeze_Entity): For the case of a bit-packed
5057 array time that is known at compile time to have more that
5058 Integer'Last+1 elements, issue an error, since such arrays are
5061 2013-04-23 Hristian Kirtchev <kirtchev@adacore.com>
5063 * sem_prag.adb (Analyze_Dependency_Clause): Update all calls to
5064 Analyze_Input_Output.
5065 (Analyze_Input_List): Update all calls to Analyze_Input_Output.
5066 (Analyze_Input_Output): Add formal parameter Self_Ref along with
5067 comment on its usage. Update all calls to Analyze_Input_Output.
5068 (Analyze_Pragma): Add new local variable Self_Ref to capture
5069 the presence of a self-referential dependency clause. Update
5070 all calls to Analyze_Input_Output.
5071 (Check_Mode): Add formal parameter Self_Ref along with comment on its
5072 usage. Verify the legality of a self-referential output.
5074 2013-04-23 Ed Schonberg <schonberg@adacore.com>
5076 * exp_ch6.adb: Add predicate checks on by-copy parameter.
5078 2013-04-23 Vincent Celier <celier@adacore.com>
5080 * a-envvar.adb, a-envvar.ads (Value): New.
5082 2013-04-22 Yannick Moy <moy@adacore.com>
5084 * exp_prag.adb (Expand_Pragma_Loop_Variant): Rewrite pragma as
5085 null statement if ignored.
5086 * sem_ch6.adb (Expand_Contract_Cases): Do nothing if pragma is ignored.
5087 * sem_prag.adb (Analyze_Pragma): Keep analyzing ignored pragmas.
5089 2013-04-22 Hristian Kirtchev <kirtchev@adacore.com>
5091 * sem_prag.adb (Analyze_Contract_Case): New routine.
5092 (Analyze_Pragma): Aspect/pragma Contract_Cases can
5093 now be associated with a library level subprogram.
5094 Add circuitry to detect illegal uses of aspect/pragma Contract_Cases
5095 in a subprogram body.
5096 (Chain_Contract_Cases): Rename formal parameter Subp_Decl to
5097 Subp_Id. Remove local constant Subp. The entity of the subprogram
5098 is now obtained via the formal paramter.
5100 2013-04-22 Ed Schonberg <schonberg@adacore.com>
5102 * sem_ch3.adb (Analyze_Object_Declaration): Do not set
5103 Is_Constr_Subt_For_Unc_Aliased on the subtype of the expression,
5104 if the expression is a source entity.
5106 2013-04-22 Yannick Moy <moy@adacore.com>
5108 * exp_prag.adb, sinfo.ads, sem_prag.ads: Minor correction of typos in
5110 * sem_ch6.adb (Expand_Contract_Cases): Add location to message.
5112 2013-04-22 Thomas Quinot <quinot@adacore.com>
5114 * sem_prag.adb (Fix_Error): For a pragma rewritten from another
5115 pragma, fix up error message to include original pragma name.
5116 * par_sco.adb: Minor reformatting.
5118 2013-04-22 Robert Dewar <dewar@adacore.com>
5120 * sem_prag.adb, sem_util.adb, sem_util.ads, sem_res.adb, exp_ch6.adb,
5121 sem_ch6.adb, opt.ads: Minor reformatting.
5123 2013-04-22 Pascal Obry <obry@adacore.com>
5125 * gnat_ugn.texi, prj-nmsc.adb, projects.texi: Add check for
5126 Library_Standalone and Library_Kind.
5128 2013-04-22 Ed Schonberg <schonberg@adacore.com>
5130 * exp_ch6.adb (Expand_Actuals): If the call is to an
5131 inherited operation and the actual is a by-reference type with
5132 predicates, add predicate call to post-call actions.
5133 * sem_util.adb (Is_Inherited_Operation_For_Type): Fix coding
5134 error: a type declaration has a defining identifier, not an Etype.
5135 * sem_res.adb: Restore code removed because of above error.
5137 2013-04-22 Doug Rupp <rupp@adacore.com>
5139 * init.c (__gnat_handle_vms_condition): Also match C$_SIGINT.
5141 2013-04-22 Yannick Moy <moy@adacore.com>
5143 * gnat_rm.texi, exp_util.adb, sem_prag.adb, sem_prag.ads, par-ch2.adb,
5144 opt.ads, sem_ch13.adb: Minor correction of typos in comments/doc.
5146 2013-04-22 Vincent Celier <celier@adacore.com>
5148 * prj-nmsc.adb (Check_Library_Attributes): Set Library_Dir to
5149 No_Path_Information only when Directories_Must_Exist_In_Projects
5151 (Get_Directories): Set Object_Directory
5152 or Exec_Directory to No_Path_Information only when
5153 Directories_Must_Exist_In_Projects is False.
5155 2013-04-22 Yannick Moy <moy@adacore.com>
5157 * par-prag.adb, sem_attr.adb, sem_ch6.adb, sem_prag.adb, sem_warn.adb,
5158 snames.ads-tmpl, sinfo.ads, sem_util.ads: Remove all references to
5159 Pragma_Contract_Case and Name_Contract_Case.
5161 2013-04-22 Yannick Moy <moy@adacore.com>
5163 * aspects.ads, aspects.adb, sem_ch13.adb: Removal of references to
5165 * gnat_ugn.texi, gnat_rm.texi Description of Contract_Case replaced by
5166 description of Contract_Cases.
5168 2013-04-12 Robert Dewar <dewar@adacore.com>
5170 * makeutl.adb, prj-nmsc.adb: Minor reformatting.
5172 2013-04-12 Robert Dewar <dewar@adacore.com>
5174 * exp_util.adb (Make_Invariant_Call): Use Check_Kind instead
5176 * gnat_rm.texi (Check_Policy): Update documentation for new
5177 Check_Policy syntax.
5178 * sem_prag.adb (Check_Kind): Replaces Check_Enabled
5179 (Analyze_Pragma, case Check_Policy): Rework to accomodate new
5180 syntax (like Assertion_Policy).
5181 * sem_prag.ads (Check_Kind): Replaces Check_Enabled.
5183 2013-04-12 Doug Rupp <rupp@adacore.com>
5185 * init.c (SS$_CONTROLC, SS$_CONTINUE) [VMS]: New macros.
5186 (__gnat_handle_vms_condition) [VMS]: Dispatch on the Crtl/C user
5187 handler if installed.
5188 * ctrl_c.c (__gnat_install_int_handler)
5189 [VMS]: Install a dummy sigaction handler to trigger the real
5190 user handler dispatch in init.c/__gnat_handle_vms_condition.
5191 (__gnat_uninstall_int_handler) [VMS]: Likewise.
5193 2013-04-12 Vincent Celier <celier@adacore.com>
5195 * clean.adb (Parse_Cmd_Line): Set Directories_Must_Exist_In_Projects
5196 to False if switch is specified.
5197 * makeutl.adb (Initialize_Source_Record): Do not look for the
5198 object file if there is no object directory.
5199 * opt.ads (Directories_Must_Exist_In_Projects): New Boolean
5200 variable, defaulted to True.
5201 * prj-nmsc.adb (Check_Library_Attributes): Do not fail if library
5202 directory does not exist when Directories_Must_Exist_In_Projects is
5204 (Get_Directories): Do not fail when the object or the exec directory
5205 do not exist when Directories_Must_Exist_In_Projects is False.
5207 2013-04-12 Robert Dewar <dewar@adacore.com>
5209 * namet.adb, namet.ads: Minor addition (7 arg version of Nam_In).
5210 * exp_prag.adb, sem_ch3.adb, sem_intr.adb, sem_type.adb, exp_util.adb,
5211 sem_aux.adb, exp_ch9.adb, sem_ch7.adb, sem_ch10.adb, sem_prag.adb,
5212 par-ch2.adb, tbuild.adb, rtsfind.adb, freeze.adb, sem_util.adb,
5213 sem_res.adb, sem_attr.adb, exp_ch2.adb, prj-makr.adb, sem_elab.adb,
5214 exp_ch4.adb, sem_ch4.adb, sem_mech.adb, sem_ch6.adb, par-prag.adb,
5215 prj-nmsc.adb, exp_disp.adb, sem_ch8.adb, sem_warn.adb, par-util.adb,
5216 sem_eval.adb, exp_intr.adb, sem_ch13.adb, exp_cg.adb, lib-xref.adb,
5217 sem_disp.adb, exp_ch3.adb: Minor code reorganization (use Nam_In).
5219 2013-04-12 Doug Rupp <rupp@adacore.com>
5221 * init.c: Don't clobber condition code on VMS.
5223 2013-04-12 Robert Dewar <dewar@adacore.com>
5225 * exp_aggr.adb: Minor reformatting.
5226 * namet.ads, namet.adb (Nam_In): New functions.
5228 2013-04-12 Robert Dewar <dewar@adacore.com>
5230 * einfo.adb (Has_Dynamic_Predicate_Aspect): New flag.
5231 (Has_Static_Predicate_Aspect): New flag.
5232 * einfo.ads (Has_Dynamic_Predicate_Aspect): New flag.
5233 (Has_Static_Predicate_Aspect): New flag.
5234 * exp_ch9.adb: Minor reformatting.
5235 * exp_util.adb (Make_Invariant_Call): Check_Enabled now handles
5237 * gnat1drv.adb: Remove setting of Debug_Pragmas_Enabled,
5238 since this switch is gone and control of Debug is done with
5240 * gnat_rm.texi: Update documentation for Assertion_Policy and
5241 Check_Policy pragmas.
5242 * opt.adb (Debug_Pragmas_Disabled[_Config]): Removed
5243 (Debug_Pragmas_Enabled[_Config]): Removed Since debug now
5244 controlled by Assertion_Enabled.
5245 * opt.ads (Debug_Pragmas_Disabled[_Config]): Removed
5246 (Debug_Pragmas_Enabled[_Config]): Removed Since debug now
5247 controlled by Assertion_Enabled.
5248 * par-ch2.adb (Scan_Pragma_Argument_Association): Allow new
5250 * sem_attr.adb: Minor reformatting.
5251 * sem_ch13.adb (Analyze_Aspect_Specification): Disable aspect
5252 if DISABLE policy applies.
5253 * sem_ch6.adb (Grab_PPC): Check original name of aspect for
5254 aspect from pragma (Process_PPCs): Properly check assertion policy.
5255 * sem_prag.adb (Check_Enabled): Rewritten for new Assertion_Policy
5256 (Check_Appicable_Policy): New procedure.
5257 (Is_Valid_Assertion_Kind): New function.
5258 (Rewrite_Assertion_Kind): New procedure.
5259 (Analyze_Pragma): Handle case of disabled assertion pragma.
5260 (Analyze_Pragma, case Assertion_Policy): Rewritten for Ada 2012.
5261 (Analyze_Pragma, case Check): Deal with 'Class possibilities.
5262 (Analyze_Pragma, case Check_Policy): Deal with 'Class possibilities.
5263 (Analyze_Pragma, case Contract_Class): New handling of ignored pragma.
5264 (Analyze_Pragma, case Debug): New control with Assertion_Policy.
5265 (Analyze_Pragma, case Debug_Policy): Now consistent with
5267 (Analyze_Pragma, case Loop_Invariant): New handling of ignored
5269 (Analyze_Pragma, case Loop_Variant): New handling of ignored pragma.
5270 (Analyze_Pragma, case Precondition): Use proper name for Check pragma.
5271 (Analyze_Pragma, case Check_Enabled): Rewritten for new policy stuff.
5272 * sem_prag.ads (Check_Enabled): Rewritten for new
5273 Assertion_Policy stuff.
5274 (Check_Appicable_Policy): New procedure.
5275 * sinfo.adb (Is_Disabled): New flag.
5276 (Is_Ignored): New flag.
5277 * sinfo.ads (Is_Disabled): New flag.
5278 (Is_Ignored): New flag.
5279 (N_Pragma_Argument_Association): New 'Class forms.
5280 * snames.ads-tmpl: New names Name_uPre, Name_uPost,
5281 Name_uType_Invariant, Name_uInvariant.
5282 * switch-c.adb: Remove setting of Debug_Pragmas_Enabled for -gnata.
5283 * tree_io.ads (ASIS_Version_Number): Updated (remove
5284 read write of obsolete flags Debug_Pragmas_Disabled and
5285 Debug_Pragmas_Enabled.
5287 2013-04-12 Ed Schonberg <schonberg@adacore.com>
5289 * exp_aggr.adb (Get_Explicit_Discriminant_Value): Subsidiary
5290 of Build_Record_Aggr_Code, used to retrieve explicit values
5291 for inherited discriminants in an extension aggregate, when the
5292 ancestor type is unconstrained.
5294 2013-04-12 Ed Schonberg <schonberg@adacore.com>
5296 * sem_attr.adb (Check_Stream_Attribute): If restriction
5297 No_Default_Stream_Attributes is active, it is illegal to use a
5298 predefined elementary type stream attribute either by itself,
5299 or more importantly as part of the attribute subprogram for a
5300 composite type. However, if the broader restriction No_Streams
5301 is active, then stream operations are not generated, and there
5304 2013-04-12 Robert Dewar <dewar@adacore.com>
5306 * gnatbind.adb: Minor reformatting.
5308 2013-04-12 Bob Duff <duff@adacore.com>
5310 * sem_attr.adb (Analyze_Access_Attribute): Treat P'Access like a
5311 call only in the static elaboration model.
5313 2013-04-12 Hristian Kirtchev <kirtchev@adacore.com>
5315 * sem_prag.adb (Analyze_Input_List): Detect an illegal dependency
5316 clause where both input and output lists are null.
5317 (Analyze_Pragma): Update the grammar of pragma Depends.
5319 2013-04-12 Vincent Celier <celier@adacore.com>
5321 * gnatbind.adb (No_Restriction_List): Exclude restrictions that
5322 take a parameter value, not a count.
5323 * prj.ads, prj.adb (Remove_All_Restricted_Languages): New procedure.
5324 * projects.texi: Complete documentation of attribute Roots.
5326 2013-04-12 Thomas Quinot <quinot@adacore.com>
5328 * exp_ch3.adb, exp_util.ads, checks.adb, freeze.adb, sem_attr.adb,
5329 sem_ch3.adb: Minor reformatting.
5330 * exp_ch4.adb (Size_In_Storage_Elements): Minor documentation
5331 improvement: note that the computation is pessimistic for bit
5333 * gnat_rm.texi (Range_Length): Fix minor error in description
5336 2013-04-12 Hristian Kirtchev <kirtchev@adacore.com>
5338 * aspects.adb (Find_Aspect): New routine.
5339 (Find_Value_Of_Aspect): New routine.
5340 (Has_Aspect): Reimplemented.
5341 * aspects.ads (Find_Aspect): New routine.
5342 (Find_Value_Of_Aspect): New routine, previously known as Find_Aspect.
5343 * exp_ch5.adb (Expand_Iterator_Loop): Update the call to Find_Aspect.
5344 * exp_util.adb (Is_Iterated_Container): Update the call to Find_Aspect.
5345 * sem_ch4.adb (Try_Container_Indexing): Update calls to Find_Aspect.
5346 * sem_ch5.adb (Analyze_Iterator_Specification): Update
5347 the call to Find_Aspect. Use function Has_Aspect for better
5349 (Preanalyze_Range): Use function Has_Aspect for better readability.
5350 * sem_ch13.adb (Check_One_Function): Update the call to Find_Aspect.
5351 * sem_prag.adb (Analyze_Pragma): There is no longer need to
5352 look at the parent to extract the corresponding pragma for
5355 2013-04-12 Robert Dewar <dewar@adacore.com>
5357 * checks.adb, sem_elab.adb, repinfo.adb, sem_ch4.adb, restrict.adb,
5358 restrict.ads: Minor reformatting.
5360 2013-04-12 Ed Schonberg <schonberg@adacore.com>
5362 * lib-xref.adb: Retrieve original name of classwide type if any.
5364 2013-04-12 Thomas Quinot <quinot@adacore.com>
5366 * exp_ch11.ads: Minor reformatting.
5368 2013-04-12 Hristian Kirtchev <kirtchev@adacore.com>
5370 * aspects.adb: Alphabetize subprogram bodies in this unit. Add
5371 an entry for Aspect_Ghost in the table of canonical aspects.
5372 (Has_Aspect): New routine.
5373 * aspects.ads: Add Aspect_Ghost to all relevant
5374 tables. Alphabetize subprograms in this unit.
5375 (Has_Aspect): New routine.
5376 * einfo.adb: Add with and use clauses for Aspects.
5377 (Is_Ghost_Function): New routine.
5378 * einfo.ads: Add new synthesized attribute Is_Ghost_Function and
5379 update the structure of the related nodes.
5380 (Is_Ghost_Function): New routine.
5381 * exp_ch4.adb (Find_Enclosing_Context): Use routine
5382 Is_Body_Or_Package_Declaration to terminate a search.
5383 (Is_Body_Or_Unit): Removed.
5384 * exp_util.adb (Within_Case_Or_If_Expression): Use routine
5385 Is_Body_Or_Package_Declaration to terminate a search.
5386 * par-prag.adb: Add pragma Ghost to the list of pragmas that do
5387 not need special processing by the parser.
5388 * sem_attr.adb (Analyze_Access_Attribute): Detect an
5389 illegal use of 'Access where the prefix is a ghost function.
5390 (Analyze_Attribute): Use routine Is_Body_Or_Package_Declaration
5391 to terminate a search. (Check_References_In_Prefix): Use routine
5392 Is_Body_Or_Package_Declaration to terminate a search.
5393 * sem_ch4.adb (Analyze_Call): Mark a function when it appears
5394 inside an assertion expression. Verify the legality of a call
5395 to a ghost function.
5396 (Check_Ghost_Function_Call): New routine.
5397 * sem_ch6.adb (Analyze_Function_Call): Code reformatting. Move
5398 the setting of attribute In_Assertion_Expression to Analyze_Call.
5399 (Check_Overriding_Indicator): Detect an illegal attempt to
5400 override a function with a ghost function.
5401 * sem_ch12.adb (Preanalyze_Actuals): Detect an illegal use of
5402 a ghost function as a generic actual.
5403 * sem_elab.adb (Check_Internal_Call_Continue): Update the call
5405 * sem_prag.adb: Add an entry for pragma Ghost in the table
5406 of significant arguments.
5407 (Analyze_Pragma): Do not analyze
5408 an "others" case guard. Add processing for pragma Ghost. Use
5409 Preanalyze_Assert_Expression when analyzing the expression of
5410 pragmas Loop_Invariant and Loop_Variant.
5411 * sem_util.adb (Get_Subprogram_Entity): Reimplemented.
5412 (Is_Body_Or_Package_Declaration): New routine.
5413 * sem_util.ads: Alphabetize subprotrams in this unit.
5414 (Is_Body_Or_Package_Declaration): New routine.
5415 * sinfo.adb (In_Assertion): Rename to In_Assertion_Expression.
5416 (Set_In_Assertion): Rename to Set_In_Assertion_Expression.
5417 * sinfo.ads: Rename flag In_Assertion to In_Assertion_Expression
5418 to better reflect its use. Update all places that mention the flag.
5419 (In_Assertion): Rename to In_Assertion_Expression. Update
5420 related pragma Inline. (Set_In_Assertion): Rename to
5421 Set_In_Assertion_Expression. Update related pragma Inline.
5422 * snames.ads-tmpl: Add new predefined name Ghost. Add new pragma
5425 2013-04-12 Arnaud Charlet <charlet@adacore.com>
5427 * sem_prag.adb (Set_Imported): Do not generate error for multiple
5428 Import in CodePeer mode.
5429 * s-rident.ads: Fix minor typo.
5431 2013-04-12 Ed Schonberg <schonberg@adacore.com>
5433 * checks.adb (Insert_Valid_Check): Do not insert validity check
5434 in the body of the generated predicate function, to prevent
5437 2013-04-12 Ed Schonberg <schonberg@adacore.com>
5439 * s-rident.ads: Add various missing Ada 2012 restrictions:
5440 No_Access_Parameter_Allocators, No_Coextensions,
5441 No_Use_Of_Attribute, No_Use_Of_Pragma.
5442 * snames.ads-tmpl: Add corresponding names.
5443 * restrict.ads restrict.adb: Subprograms and data structures to
5444 handle aspects No_Use_Of_Attribute and No_Use_Of_Pragma.
5445 * sem_ch4.adb: Correct name of restrictions is
5446 No_Standard_Allocators_After_Elaboration.
5447 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Check
5448 violation of restriction No_Use_Of_Attribute.
5449 * sem_prag.adb (Process_Restrictions_Or_Restriction_Warnings):
5450 Set restrictions No_Use_Of_Pragma and No_Use_Of_Attribute.
5451 (Analyze_Pragma): Check violation of restriction No_Use_Of_Pragma.
5452 * sem_res.adb: Check restrictions No_Access_Parameter_Allocators
5453 and No_Coextensions.
5454 * bcheck.adb: Correct name of restrictions is
5455 No_Standard_Allocators_After_Elaboration.
5456 * gnatbind.adb: Correct name of restrictions is
5457 No_Standard_Allocators_After_Elaboration.
5459 2013-04-12 Hristian Kirtchev <kirtchev@adacore.com>
5461 * sem_prag.adb (Analyze_Pragma, (Check_Mode_Restriction_In_Function):
5462 Correct error message format.
5464 2013-04-12 Robert Dewar <dewar@adacore.com>
5466 * sem_attr.adb: Minor reformatting.
5468 2013-04-12 Ed Schonberg <schonberg@adacore.com>
5470 * sem_elab.adb (Within_Elaborate_All): Do not examine a context
5471 item that has not been analyzed, because the unit may have errors,
5472 or the context item may come from a proper unit inserted at the
5473 point of a stub and not analyzed yet.
5475 2013-04-12 Thomas Quinot <quinot@adacore.com>
5477 * gnat1drv.adb, repinfo.adb, repinfo.ads (Repinfo.List_Array_Info,
5478 List_Record_Info): Also include scalar storage order information in
5481 2013-04-12 Yannick Moy <moy@adacore.com>
5483 * sem_ch6.adb (Process_Contract_Cases): Update code to apply to
5484 Contract_Cases instead of Contract_Case pragma.
5486 2013-04-12 Robert Dewar <dewar@adacore.com>
5488 * a-cfdlli.ads, g-socket.adb, s-fileio.adb: Minor reformatting.
5490 2013-04-12 Yannick Moy <moy@adacore.com>
5492 * sem_attr.adb (Analyze_Attribute): Update analyse of
5493 Attribute_Old and Attribute_Result so they are allowed in the
5494 right-hand-side of an association in a Contract_Cases pragma.
5495 * sem_prag.adb (Analyze_CTC_In_Decl_Part): Add pre-analysis of
5496 the expressions in a Contract_Cases pragma.
5498 2013-04-12 Robert Dewar <dewar@adacore.com>
5500 * sem.ads, opt.ads: Minor comment edits.
5501 * sem_warn.adb, sem_ch6.adb: Minor reformatting.
5503 2013-04-12 Claire Dross <dross@adacore.com>
5505 * a-cfdlli.adb a-cfdlli.ads (List, Not_No_Element, Iterate,
5506 Reverse_Iterate, Query_Element, Update_Element, Read, Write): Removed,
5507 not suitable for formal analysis.
5509 2013-04-12 Ed Schonberg <schonberg@adacore.com>
5511 * sem_prag.adb (Analyze_Abstract_State): Use Defining entity
5512 to locate package entity, which may be a child unit.
5514 2013-04-12 Thomas Quinot <quinot@adacore.com>
5516 * g-socket.adb, g-socket.ads (Connect_Socket, version with timeout): If
5517 the specified timeout is 0, do not attempt to determine whether the
5518 connection succeeded.
5520 2013-04-12 Doug Rupp <rupp@adacore.com>
5522 * s-fileio.adb (Form_RMS Context_Key): Fix some thinkos.
5524 2013-04-12 Doug Rupp <rupp@adacore.com>
5526 * s-fileio.adb: Minor reformatting.
5528 2013-04-12 Ed Schonberg <schonberg@adacore.com>
5530 * sem_warn.adb (Check_Infinite_Loop_Warning): Do not warn if
5531 the last statement in the analyzed loop is an unconditional
5534 2013-04-12 Robert Dewar <dewar@adacore.com>
5536 * opt.ads (Style_Check_Main): New switch.
5537 * sem.adb (Semantics): Set Style_Check flag properly for new
5538 unit to be analyzed.
5539 * sem_ch10.adb (Analyze_With_Clause): Don't reset Style_Check,
5540 the proper setting of this flag is now part of the Semantics
5542 * switch-c.adb (Scan_Front_End_Switches): Set Style_Check_Main
5543 for -gnatg and -gnaty
5545 2013-04-12 Doug Rupp <rupp@adacore.com>
5547 * s-crtl.ads (fopen, freopen): Add vms_form parameter
5548 * i-cstrea.ads (fopen, freopen): Likewise.
5549 * adaint.h (__gnat_fopen, __gnat_freopen): Likewise.
5550 * adaint.c (__gnat_fopen, __gnat_freopen): Likewise.
5551 [VMS]: Split out RMS keys and call CRTL function appropriately.
5552 * s-fileio.adb (Form_VMS_RMS_Keys, Form_RMS_Context_Key): New
5554 (Open, Reset): Call Form_VMS_RMS_Keys. Call fopen,freopen with
5556 * gnat_rm.texi: Document implemented RMS keys.
5558 2013-04-12 Hristian Kirtchev <kirtchev@adacore.com>
5560 * sem_ch13.adb (Analyze_Aspect_Specifications):
5561 Insert the corresponding pragma for aspect Abstract_State at
5562 the top of the visible declarations of the related package.
5563 Previously this was only done when the package is a compilation
5566 2013-04-12 Arnaud Charlet <charlet@adacore.com>
5568 * gnat_ugn.texi: Further menu clean ups.
5569 * sem_prag.adb, opt.ads: Minor reformatting.
5570 * sem_util.ads: Minor comment fix.
5572 2013-04-12 Hristian Kirtchev <kirtchev@adacore.com>
5574 * sem_ch13.adb (Analyze_Aspect_Specifications): Aspect
5575 Depends is now a delayed aspect. The delay is required
5576 due to the interplay between aspects Depends and Global.
5577 (Check_Aspect_At_Freeze_Point): Add an entry for aspect Depends.
5578 * sem_prag.adb: Reformat various error messages.
5579 (Add_Item): New subsidiary routine.
5580 (Analyze_Pragma): Add new variables
5581 Global_Seen, Result_Seen, Subp_Inputs and Subp_Outputs. The
5582 analysis of pragma Depends now has the capability to check
5583 the proper mode and usage of subprogram inputs and outputs.
5584 (Appears_In): New routine.
5585 (Check_Function_Return): New routine.
5586 (Check_Mode): New routine.
5587 (Check_Usage): New routine.
5588 (Collect_Subprogram_Inputs_Outputs): New routine.
5590 2013-04-12 Bob Duff <duff@adacore.com>
5592 * par-ch7.adb (P_Package): Initialize Sloc in the newly-pushed scope
5595 2013-04-12 Robert Dewar <dewar@adacore.com>
5597 * switch-c.adb: Minor fix to wording of error message for
5600 2013-04-12 Robert Dewar <dewar@adacore.com>
5602 * impunit.adb: Add s-multip and s-mudido to list of impl defined
5604 * gnat_rm.texi: Add documentation for
5605 System.Multiprocessors[.Dispatching_Domains].
5607 2013-04-12 Ben Brosgol <brosgol@adacore.com>
5609 * gnat_ugn.texi: Completion of menu cleanups.
5611 2013-04-12 Arnaud Charlet <charlet@adacore.com>
5613 * sem_prag.adb (Diagnose_Multiple_Pragmas): Relax the rules
5614 in Relaxed_RM_Semantics.
5616 2013-04-12 Arnaud Charlet <charlet@adacore.com>
5618 * set_targ.adb (elab code): Add support for non gcc back-ends
5619 where save_argv is null.
5621 2013-04-12 Robert Dewar <dewar@adacore.com>
5623 * gnat1drv.adb (Gnat1drv): Test Target_Dependent_Info_Write_Name.
5624 * opt.ads (Target_Dependent_Info_Read): Add _Name, now an access
5625 type (Target_Dependent_Info_Write): Add _Name, now an access type.
5626 * set_targ.adb (Write_Target_Dependent_Values): Use name
5627 from -gnatet switch stored in Target_Dependent_Info_Write_Name
5628 (Read_Target_Dependent_Values): Use name from -gnateT switch
5629 stored in Target_Dependent_Info_Read_Name.
5630 * switch-c.adb: New form of -gnatet and -gnateT switches.
5631 * usage.adb: New form of -gnatet and -gnateT switches with
5634 2013-04-11 Eric Botcazou <ebotcazou@adacore.com>
5636 * gcc-interface/decl.c (elaborate_expression_1): Skip only constant
5637 arithmetics when looking for a read-only variable in the expression.
5639 2013-04-11 Javier Miranda <miranda@adacore.com>
5641 * check.ads, exp_ch6.adb (Install_Null_Excluding_Check): No check in
5642 interface thunks since it is performed at the caller side.
5643 (Expand_Simple_Function_Return): No accessibility check needed in thunks
5644 since the check is done by the target routine.
5646 2013-04-11 Ed Schonberg <schonberg@adacore.com>
5648 * sem_prag.adb (Analyze_Pragma, case Priority): pre-analyze
5649 expression with type Any_Priority.
5650 * exp_ch9.adb (Initialize_Protection): Check that the value
5651 of the priority expression is within the bounds of the proper
5654 2013-04-11 Robert Dewar <dewar@adacore.com>
5656 * sem_prag.adb, prj-env.adb: Minor reformatting.
5658 2013-04-11 Ben Brosgol <brosgol@adacore.com>
5660 * gnat_ugn.texi: Clean ups.
5662 2013-04-11 Yannick Moy <moy@adacore.com>
5664 * set_targ.adb: Minor comment update.
5666 2013-04-11 Pascal Obry <obry@adacore.com>
5668 * gnat_ugn.texi: Remove obsolete comment about DLL calling
5671 2013-04-11 Javier Miranda <miranda@adacore.com>
5673 * exp_ch6.adb (Expand_Call): For the call to the target primitive
5674 of an interface thunks do not compute the extra actuals; just
5675 propagate the extra actuals received by the thunk.
5676 * exp_disp.adb (Expand_Interface_Thunk): Decorate new attribute
5678 * sem_ch6.adb (Create_Extra_Formals): Do not generate extra
5679 formals in interface thunks whose target primitive has no extra
5682 2013-04-11 Hristian Kirtchev <kirtchev@adacore.com>
5684 * sem_prag.adb (Analyze_Pragma): Detect
5685 a renaming by looking at the Renamed_Object attribute.
5686 (Is_Renaming): Removed.
5688 2013-04-11 Vincent Celier <celier@adacore.com>
5690 * prj-env.adb (Initialize_Default_Project_Path): Take
5691 into account a project path file, specified by environment
5692 variable GPR_PROJECT_PATH_FILE, before taking into account
5694 * projects.texi: Add documentation for GPR_PROJECT_PATH_FILE
5696 2013-04-11 Ed Schonberg <schonberg@adacore.com>
5698 * a-cdlili.adb, a-cdlili.ads, a-cihama.adb, a-cihama.ads, a-coinve.adb,
5699 a-coinve.ads, a-ciorse.adb, a-ciorse.ads, a-coorma.adb, a-coorma.ads,
5700 a-cfdlli.adb, a-cfdlli.ads, a-cborma.adb, a-cborma.ads, a-cidlli.adb,
5701 a-cidlli.ads, a-ciormu.adb, a-ciormu.ads, a-cihase.adb, a-cihase.ads,
5702 a-cohama.adb, a-cohama.ads, a-coorse.adb, a-coorse.ads, a-cbhama.adb,
5703 a-cbhama.ads, a-cborse.adb, a-cborse.ads, a-ciorma.adb, a-cobove.adb,
5704 a-ciorma.ads, a-cobove.ads, a-coormu.adb, a-coormu.ads, a-cohase.adb,
5705 a-cohase.ads, a-cbdlli.adb, a-cbdlli.ads, a-cbhase.adb, a-cbhase.ads:
5706 Move Iterator operations from body to private part of spec.
5708 2013-04-11 Eric Botcazou <ebotcazou@adacore.com>
5710 * ttypes.ads, get_targ.ads: More minor rewording of comments.
5712 2013-04-11 Johannes Kanig <kanig@adacore.com>
5714 * debug.adb: Document use of switch -gnatd.Z.
5716 2013-04-11 Hristian Kirtchev <kirtchev@adacore.com>
5718 * sem_prag.adb (Analyze_Pragma): Both pragma Depends and Global can now
5719 support renamings of entire objects. Legal renamings are replaced by
5720 the object they rename.
5721 (Is_Renaming): New routine.
5723 2013-04-11 Yannick Moy <moy@adacore.com>
5725 * set_targ.adb, opt.ads: Minor changes in comments.
5727 2013-04-11 Ben Brosgol <brosgol@adacore.com>
5729 * gnat_ugn.texi: Minor clean ups.
5731 2013-04-11 Robert Dewar <dewar@adacore.com>
5733 * nlists.ads, nlists.adb, treepr.adb, treepr.ads: Move debugging
5734 function p from Nlists to Treepr.
5736 2013-04-11 Ed Schonberg <schonberg@adacore.com>
5738 * sem_disp.adb (Check_Dispatching_Context): If the context is
5739 a contract for a null procedure defer error reporting until
5740 postcondition body is created.
5741 * exp_ch13.adb (Expand_N_Freeze_Entity): If the entity is a
5742 null procedure, complete the analysis of its contracts so that
5743 calls within classwide conditions are properly rewritten as
5746 2013-04-11 Thomas Quinot <quinot@adacore.com>
5748 * sem_ch10.adb, sem_ch12.adb: Minor reformatting.
5750 2013-04-11 Robert Dewar <dewar@adacore.com>
5752 * exp_attr.adb, sem_res.adb, sem_attr.adb: Minor reformatting.
5754 2013-04-11 Robert Dewar <dewar@adacore.com>
5756 * atree.adb, atree.ads (Node31): New function.
5757 (Set_Node31): New procedure.
5759 2013-04-11 Robert Dewar <dewar@adacore.com>
5761 * errout.ads: Minor typo correction.
5763 2013-04-11 Javier Miranda <miranda@adacore.com>
5765 * einfo.ad[sb] (Thunk_Entity/Set_Thunk_Entity): New attribute.
5767 2013-04-11 Robert Dewar <dewar@adacore.com>
5769 * back_end.adb (Register_Back_End_Types): Moved to Get_Targ
5770 * back_end.ads (C_String): Moved to Get_Targ
5771 (Register_Type_Proc): Moved to Get_Targ (Register_Back_End_Types):
5773 * cstand.adb (Register_Float_Type): New interface
5774 (Create_Back_End_Float_Types): Use entries in FPT_Mode_Table.
5775 * get_targ.adb (Register_Back_End_Types): Moved here from
5777 * get_targ.ads (C_String): Moved here from Back_End
5778 (Register_Type_Proc): Moved here from Back_End
5779 (Register_Back_End_Types): here from Back_End.
5780 * gnat1drv.adb (GGnat11drv): Add call to
5781 Write_Target_Dependent_Values;
5782 * lib-writ.ads, lib-writ.adb (Write_ALI): Remove section writing
5783 obsolete target dependent info.
5784 * opt.ads (Generate_Target_Dependent_Info):
5785 Removed (Target_Dependent_Info_Read): New flag
5786 (Target_Dependent_Info_Write): New flag
5787 * output.adb: Minor comment change
5788 * s-os_lib.ads: Minor reformatting
5789 * set_targ.ads, set_targ.adb: Minor reformatting.
5790 * switch-c.adb (Scan_Switches.First_Ptr): New variable
5791 (Scan_Front_End_Switches): Check -gnatd.b, -gnateT come first
5792 (Scan_Front_End_Switches): Handle -gnatet, -gnateT
5793 * ttypes.ads: Remove documentation section on target dependent
5794 info in ali file Remove four letter codes, no longer used Instead
5795 of using Get_Targ.Get_xxx, we use Set_Targ.xxx
5796 * usage.adb: Add usage lines for -gnatet/-gnateT
5797 * gcc-interface/Make-lang.in: Update dependencies.
5799 2013-04-11 Thomas Quinot <quinot@adacore.com>
5801 * sem_ch4.adb: Update documentation.
5802 * sinfo.ads (N_Expression_With_Actions): Ditto.
5804 2013-04-11 Hristian Kirtchev <kirtchev@adacore.com>
5806 * sem_ch13.adb (Analyze_Aspect_Specifications):
5807 Add a guard to prevent the double insertion of the same aspect
5808 into a rep item list. This previously led to a circularity.
5810 2013-04-11 Ed Schonberg <schonberg@adacore.com>
5812 * sem_attr.adb (Eval_Attribute, case 'Access): Reject attribute
5813 reference if the prefix is the dereference of an anonymous access
5815 * exp_attr.adb (Expand_N_Attribute_Reference, Access_Cases): Handle
5816 properly a reference to the current instance of a protected type
5817 from within a protected subprogram.
5818 * sem_res.adb (Find_Unique_Access_Type): Treat
5819 Attribute_Access_Type like Allocator_Type when resolving an
5822 2013-04-11 Arnaud Charlet <charlet@adacore.com>
5824 * xgnatugn.adb: Remove obsolete comments.
5826 2013-04-11 Robert Dewar <dewar@adacore.com>
5828 * back_end.ads, back_end.adb: Minor reformatting.
5829 * set_targ.ads, set_targ.adb: New files.
5831 2013-04-11 Hristian Kirtchev <kirtchev@adacore.com>
5833 * sem_case.adb (Check_Against_Predicate): New routine.
5834 (Check_Choices): When the type covered by the list of choices
5835 is a static subtype with a static predicate, check all choices
5836 agains the predicate.
5837 (Issue_Msg): All versions removed.
5838 (Missing_Choice): New routines.
5839 * sem_ch4.adb: Code and comment reformatting.
5840 (Analyze_Case_Expression): Do not check the choices when the case
5841 expression is being preanalyzed and the type of the expression
5842 is a subtype with a static predicate.
5843 (Has_Static_Predicate): New routine.
5844 * sem_ch13.adb: Code and comment reformatting. (Build_Range):
5845 Always build a range even if the low and hi bounds denote the
5846 same value. This is needed by the machinery in Check_Choices.
5847 (Build_Static_Predicate): Always build a range even if the low and
5848 hi bounds denote the same value. This is needed by the machinery
5851 2013-04-11 Robert Dewar <dewar@adacore.com>
5853 * einfo.ads, sem_util.adb, exp_ch6.adb, xgnatugn.adb: Minor
5856 2013-04-11 Doug Rupp <rupp@adacore.com>
5858 * gnatlink.adb: Fold program basename to lower case on VMS for
5861 2013-04-11 Matthew Heaney <heaney@adacore.com>
5863 * a-rbtgbo.adb (Generic_Equal): Initialize Result variable before
5866 2013-04-11 Arnaud Charlet <charlet@adacore.com>
5868 * xgnatugn.adb: Remove dead code (handling of @ifset/@ifclear).
5870 2013-04-11 Arnaud Charlet <charlet@adacore.com>
5872 * gnat_ugn.texi: Remove some use of ifset in menus. Not strictly
5873 needed, and seems to confuse some versions of makeinfo.
5875 2013-04-11 Javier Miranda <miranda@adacore.com>
5877 * einfo.adb (Is_Thunk): Remove assertion.
5878 (Set_Is_Thunk): Add assertion.
5879 * einfo.ads (Is_Thunk): Complete documentation.
5880 * exp_ch11.adb (Expand_N_Handled_Sequence_Of_Statements): Code cleanup.
5881 * exp_ch3.ad[sb] (Is_Variable_Size_Array): Moved to sem_util
5882 (Is_Variable_Size_Record): Moved to sem_util
5883 * exp_ch6.adb (Expand_Call): Code cleanup.
5884 (Expand_N_Extended_Return_Statement): Code cleanup.
5885 (Expand_Simple_Function_Return): Code cleanup.
5886 * exp_disp.adb Remove dependency on exp_ch3
5887 (Expand_Interface_Thunk): Add minimum decoration needed to set
5889 * sem_ch3.ad[sb] (Is_Constant_Bound): moved to sem_util
5890 * sem_util.ad[sb] (Is_Constant_Bound): Moved from
5891 sem_ch3 (Is_Variable_Size_Array): Moved from exp_ch3
5892 (Is_Variable_Size_Record): Moved from exp_ch3
5894 2013-04-11 Javier Miranda <miranda@adacore.com>
5896 * exp_ch11.adb (Expand_N_Handled_Sequence_Of_Statements): Do
5897 not add cleanup actions in thunks associated with interface types.
5898 * exp_ch3.ad[sb] (Is_Variable_Size_Record): Move declaration to
5900 * exp_ch4.adb (Tagged_Conversion): Update call to
5901 Expand_Interface_Conversion since the parameter Is_Static is no
5903 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Adding
5904 assertion to ensure that interface thunks are never handled by
5906 (Expand_N_Simple_Function_Return): Do not rewrite this statement
5907 as an extended return statement in interface thunks, and do not
5908 perform copy in the secondary stack if the return statement is
5910 * exp_disp.adb (Expand_Dispatching_Call): No longer displace
5911 the pointer to the returned object in functions returning interface
5913 (Expand_Interface_Thunk): For functions returning interface types
5914 displace the pointer to the returned object.
5915 (Expand_Interface_Conversion): Remove formal
5916 Is_Static since this subprogram can now evaluate it locally.
5917 * sem_ch3.adb (Add_Internal_Interface_Entities): For functions
5918 propagate the type returned by the covered interface primitive to
5919 the internal interface entity. Needed by the thunk to generate
5920 the code which displaces "this" to reference the corresponding
5921 secondary dispatch table.
5922 * sem_disp.adb (Propagate_Tag): Update call to
5923 Expand_Interface_Conversion since the parameter Is_Static is no
5925 * sem_res.adb (Resolve_Type_Conversion): Update calls to
5926 Expand_Interface_Conversion since the parameter Is_Static is no
5927 longer needed plus code cleanup.
5929 2013-04-11 Eric Botcazou <ebotcazou@adacore.com>
5931 * init.c (RETURN_ADDR_OFFSET): Delete as unused.
5933 2013-04-11 Robert Dewar <dewar@adacore.com>
5935 * a-crbtgk.adb, a-ciorse.adb, a-crbtgo.adb, a-coorse.adb, a-rbtgbo.adb,
5936 a-cborse.adb, a-rbtgso.adb, exp_ch3.adb: Minor reformatting.
5938 2013-04-11 Yannick Moy <moy@adacore.com>
5940 * exp_ch4.adb (Expand_N_Selected_Component): Do not expand
5941 discriminant check for Unchecked_Union.
5942 * sem_res.adb (Resolve_Selected_Component): Set flag
5943 Do_Discriminant_Check even when expansion is not performed.
5944 * sinfo.ads (Do_Discriminant_Check): Update documentation for the case
5947 2013-04-11 Thomas Quinot <quinot@adacore.com>
5949 * sem_ch13.adb (Same_Representation): Two types with different scalar
5950 storage order never have the same representation.
5952 2013-04-11 Arnaud Charlet <charlet@adacore.com>
5954 * xgnatugn.adb (Push_Conditional): Simplify handling,
5955 no longer need to keep track of "excluding" sections.
5956 (Currently_Excluding): Removed.
5957 (Process_Source_File):
5958 Set unw/vms flag so that texinfo can do the whole handling of
5959 @ifset/@ifclear sections. Fix handling of nested @ifset/@ifclear
5961 * gnat_ugn.texi: Add a section on performing unassisted install
5964 2013-04-11 Johannes Kanig <kanig@adacore.com>
5966 * debug.adb: Document usage of -gnatd.Q switch.
5968 2013-04-11 Matthew Heaney <heaney@adacore.com>
5970 * a-crbtgk.adb (Ceiling, Find, Floor): Adjust locks
5971 before element comparisons.
5972 (Generic_Conditional_Insert, Generic_Conditional_Insert_With_Hint):
5974 * a-crbtgo.adb, a-rbtgbo.adb (Generic_Equal): Adjust locks before
5975 element comparisons.
5976 * a-rbtgso.adb (Difference, Intersection): Adjust locks
5977 before element comparisons.
5978 (Is_Subset, Overlap): Ditto
5979 (Symmetric_Difference, Union): Ditto
5980 * a-btgbso.adb (Set_Difference, Set_Intersection): Adjust locks
5981 before element comparisons.
5982 (Set_Subset, Set_Overlap): Ditto
5983 (Set_Symmetric_Difference, Set_Union): Ditto
5984 * a-coorse.adb, a-ciorse.adb, a-cborse.adb
5985 (Update_Element_Preserving_Key): Adjust locks before element
5986 comparisons (Replace_Element): Ditto
5988 2013-04-11 Pascal Obry <obry@adacore.com>
5990 * prj-attr.adb, projects.texi, snames.ads-tmpl: Remove Build_Slaves
5993 2013-04-11 Ed Schonberg <schonberg@adacore.com>
5995 * exp_ch3.adb (Build_Equivalent_Aggregate): Subsidiary of
5996 Expand_N_Object_Declaration, used to construct an aggregate
5997 with static components whenever possible, so that objects of a
5998 discriminated type can be initialized without calling the init.
6001 2013-04-11 Vincent Celier <celier@adacore.com>
6003 * prj-makr.adb (Process_Directory): On VMS, always delete,
6004 then recreate the temporary file with Create_Output_Text_File,
6005 otherwise the output redirection does not work properly.
6007 2013-04-11 Eric Botcazou <ebotcazou@adacore.com>
6009 * urealp.ads: Fix minor typo.
6011 2013-04-11 Fabien Chouteau <chouteau@adacore.com>
6013 * cio.c (mktemp): Don't use tmpnam function from the
6014 system on VxWorks in kernel mode.
6016 2013-04-11 Vincent Celier <celier@adacore.com>
6018 * make.adb (Compile): Clarify the error message reported
6019 when gnatmake refuses to compile a runtime source.
6020 (Start_Compile_If_Possible): Ditto.
6022 2013-04-11 Vincent Celier <celier@adacore.com>
6024 * gnat_ugn.texi: Add documentation about -gnatc and gnatmake.
6026 2013-04-11 Vincent Celier <celier@adacore.com>
6028 * switch-c.adb: Document internal switches.
6029 * usage.adb: Remove lines for internal switches: -gnatea, -gnateO,
6030 -gnatez and -gnateO.
6032 2013-04-11 Ed Schonberg <schonberg@adacore.com>
6034 * par-ch6.adb (P_Subprogram): Attach aspects to subprogram stub.
6035 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Allow aspects on
6037 * sem_ch13.adb (Analyze_Aspect_Specifications): Analyze generated
6038 pre/post pragmas at once before analyzing the proper body.
6039 * sem_prag.adb (Chain_PPC): Handle pragma that comes from an
6040 aspect on a subprogram stub.
6041 * aspects.adb: Aspect specifications can appear on a
6042 subprogram_Body_Stub.
6044 2013-04-11 Vincent Celier <celier@adacore.com>
6046 * gnatname.adb: Minor comment fix.
6048 2013-04-11 Vincent Celier <celier@adacore.com>
6050 * prj-makr.adb (Process_Directory): Create a new temporary
6051 file for each invocation of the compiler, in directory pointed
6052 by environment variable TMPDIR if it exists.
6054 2013-04-11 Arnaud Charlet <charlet@adacore.com>
6056 * gnat_ugn.texi: Minor editing/clean ups.
6058 2013-04-11 Ed Schonberg <schonberg@adacore.com>
6060 * sem_ch6.adb (Analyze_Null_Procedure): New subprogram, mostly
6061 extracted from Analyze_Subprogram_Declaration, to handle null
6062 procedure declarations that in ada 2012 can be completions of
6063 previous declarations.
6065 2013-04-11 Hristian Kirtchev <kirtchev@adacore.com>
6067 * sem_prag.adb (Entity_Of): Moved to Exp_Util.
6068 * exp_util.ads, exp_util.adb (Entity_Of): New routine.
6070 2013-04-11 Robert Dewar <dewar@adacore.com>
6072 * g-spipat.ads: Minor comment fix.
6074 2013-04-11 Robert Dewar <dewar@adacore.com>
6076 * sem_prag.adb, sem_util.adb, sem_res.adb, exp_ch4.adb: Minor
6079 2013-04-11 Thomas Quinot <quinot@adacore.com>
6081 * exp_util.ads (Fully_Qualified_Name_String): Document that the
6082 constructed literal is the entity name in all upper case.
6084 2013-04-11 Thomas Quinot <quinot@adacore.com>
6086 * sem_util.adb (Set_Entity_With_Style_Check): Fix logic of
6087 check for implementation defined identifiers.
6089 2013-04-11 Yannick Moy <moy@adacore.com>
6091 * checks.adb (Apply_Type_Conversion_Checks): Add an explanation
6092 of why range check and length are put on different nodes.
6093 * exp_ch4.adb (Apply_Type_Conversion_Checks): Remove check marks
6094 when doing their expansion.
6096 2013-04-11 Ed Schonberg <schonberg@adacore.com>
6098 * sem_util.ads, sem_util.adb (Get_Incomplete_View_Of_Ancestor):
6099 New function to implement the notion introduced in RM 7.3.1
6100 (5.2/3): in a child unit, a derived type is within the derivation
6101 class of an ancestor declared in a parent unit, even if there
6102 is an intermediate derivation that does not see the full view
6104 * sem_res.adb (Valid_Conversion): if all else fails, examine if an
6105 incomplete view of an ancestor makes a numeric conversion legal.
6107 2013-04-11 Ed Schonberg <schonberg@adacore.com>
6109 * sem_ch6.adb: in Ada2012 operators can only have in
6112 2013-04-11 Vincent Celier <celier@adacore.com>
6114 * makeutl.adb (Create_Binder_Mapping_File): Do not put into
6115 the mapping file ALI files of sources that have been replaced.
6117 2013-04-11 Vincent Celier <celier@adacore.com>
6119 * projects.texi: Add subsection Duplicate Sources in Projects.
6121 2013-04-11 Vincent Celier <celier@adacore.com>
6123 * gnat_ugn.texi: Add documentation for gnatmake switch -droot_dir/**
6125 2013-04-11 Arnaud Charlet <charlet@adacore.com>
6127 * init.c (__gnat_install_handler): Only set up an alternate
6128 stack when installing a signal handler for SIGSEGV.
6130 2013-04-11 Thomas Quinot <quinot@adacore.com>
6132 * g-socket.adb (Connect_Socket, timeout version): Call
6133 underlying connect operation directly, not through the 2-argument
6134 Connect_Socket thick binding, in order to avoid raising a junk
6135 exception for the EINPROGRESS return.
6137 2013-04-11 Robert Dewar <dewar@adacore.com>
6139 * a-cdlili.adb: Minor addition of pragma Warnings (Off).
6141 2013-04-11 Robert Dewar <dewar@adacore.com>
6143 * hostparm.ads: Minor reformatting.
6145 2013-04-11 Hristian Kirtchev <kirtchev@adacore.com>
6147 * aspects.ads, aspects.adb: Add Aspect_Depends to all the relevant
6149 * elists.ads, elists.adb (Contains): New routine.
6150 * par-prag.adb: Pragma Depends does not need any special treatment
6152 * sem_ch13.adb (Analyze_Aspect_Specifications):
6153 Transform aspect Depends into a corresponding pragma.
6154 (Check_Aspect_At_Freeze_Point): Aspect Depends does not need
6155 inspection at its freeze point.
6156 * sem_prag.adb (Analyze_Pragma): Perform analysis and
6157 normalization of pragma Depends. Remove the use of function
6158 Is_Duplicate_Item. Use End_Scope to uninstalle the formal
6159 parameters of a subprogram. Add a value for pragma Depends in
6161 (Is_Duplicate_Item): Removed.
6162 * snames.ads-tmpl: Add predefined name for Depends as well as
6163 a pragma identifier.
6165 2013-04-11 Arnaud Charlet <charlet@adacore.com>
6167 * gnat1drv.adb: Minor code clean up.
6169 2013-04-11 Arnaud Charlet <charlet@adacore.com>
6171 * debug.adb, sem_ch13.adb (Analyze_Enumeration_Representation_Clause):
6172 Ignore enumeration rep clauses by default in CodePeer mode, unless
6173 -gnatd.I is specified.
6175 2013-04-11 Ed Schonberg <schonberg@adacore.com>
6177 * sem_util.adb (Safe_To_Capture_Value): If the node belongs to
6178 an expression that has been attached to the else_actions of an
6179 if-expression, the capture is not safe.
6181 2013-04-11 Yannick Moy <moy@adacore.com>
6183 * checks.adb (Apply_Type_Conversion_Checks): Put check mark on type
6184 conversion for arrays.
6186 2013-04-11 Robert Dewar <dewar@adacore.com>
6188 * a-cdlili.adb, a-cidlli.adb, a-cbdlli.adb: Minor reformatting.
6190 2013-04-11 Johannes Kanig <kanig@adacore.com>
6192 * adabkend.adb: Minor comment addition.
6194 2013-04-11 Matthew Heaney <heaney@adacore.com>
6196 * a-cdlili.adb, a-cidlli.adb, a-cbdlli.adb ("="): Increment
6197 lock counts before entering loop.
6199 (Is_Sorted, Merge, Sort): Ditto.
6200 (Reverse_Find): Ditto.
6201 (Splice_Internal): Internal operation to refactor splicing logic.
6202 (Splice): Some logic moved into Splice_Internal.
6204 2013-04-11 Johannes Kanig <kanig@adacore.com>
6206 * adabkend.adb (Scan_Compiler_Arguments): Do not call
6207 Set_Output_Object_File_Name in Alfa_Mode
6208 * gnat1drv.adb (Adjust_Global_Switches): Take Alfa_Mode into account.
6209 * opt.ads: Fix documentation.
6211 2013-04-11 Robert Dewar <dewar@adacore.com>
6213 * sem_res.adb: Minor code reorganization and comment fixes.
6214 * sem_type.adb: Minor reformatting.
6216 2013-04-11 Hristian Kirtchev <kirtchev@adacore.com>
6218 * exp_ch4.adb (Process_Transient_Object): Add new
6219 local variable Fin_Call. Remove and explain ??? comment. Use the
6220 Actions of logical operators "and then" and "or else" to insert
6221 the generated finalization call.
6223 2013-04-11 Eric Botcazou <ebotcazou@adacore.com>
6225 * gnat_rm.texi: Fix typo.
6227 2013-04-11 Ed Schonberg <schonberg@adacore.com>
6229 * sem_res.adb: Minor reformatting.
6231 2013-04-11 Robert Dewar <dewar@adacore.com>
6233 * atree.h: Add declarations for Flag255-Flag289 Fix declaration
6234 of Field30 (was wrong, but no effect, since not yet referenced by
6235 back end) Add declarations for Field31-Field35 Add declarations
6237 * einfo.ads, einfo.adb (Has_Invariants): No longer applies to
6239 (Has_Predicates): No longer applies to functions.
6240 (Is_Predicate_Function): New flag.
6241 (Is_Predicate_Function_M): New flag.
6242 (Is_Invariant_Procedure): New flag.
6243 (Predicate_Function_M): New function.
6244 (Set_Predicate_Function_M): New procedure.
6245 * exp_ch11.adb (Expand_N_Raise_Expression): Take care of special
6246 case of appearing in predicate used for membership test.
6247 * exp_ch3.adb (Insert_Component_Invariant_Checks): Set
6248 Is_Invariant_Procedure flag.
6249 * exp_ch4.adb (Expand_Op_In): Call special predicate function
6250 that takes care of raise_expression nodes in the predicate.
6251 * exp_util.ads, exp_util.adb (Make_Predicate_Call): Add argument Mem for
6253 * sem_ch13.adb (Build_Predicate_Functions): New name for
6254 Build_Predicate_Function. Major rewrite to take care of raise
6255 expression in predicate for membership tests.
6256 * sem_res.adb (Resolve_Actuals): Include both predicate functions
6257 in defense against infinite predicate function loops.
6258 * sinfo.ads, sinfo.adb (Convert_To_Return_False): New flag.
6260 2013-04-11 Robert Dewar <dewar@adacore.com>
6262 * sem_prag.adb: Minor reformatting.
6264 2013-04-11 Ed Schonberg <schonberg@adacore.com>
6266 * lib-xref.adb: Generate reference for component of anonymous
6269 2013-04-11 Robert Dewar <dewar@adacore.com>
6271 * stand.ads: Minor reformatting.
6273 2013-04-11 Matthew Heaney <heaney@adacore.com>
6275 * a-convec.adb, a-coinve.adb, a-cobove.adb ("="): Increment lock
6276 counts before entering loop.
6277 (Find, Find_Index): Ditto.
6278 (Is_Sorted, Merge, Sort): Ditto.
6279 (Reverse_Find, Reverse_Find_Index): Ditto.
6281 2013-04-11 Robert Dewar <dewar@adacore.com>
6283 * exp_ch11.ads, exp_ch11.adb (Expand_N_Raise_Expression): New procedure.
6284 * exp_util.adb (Insert_Actions): Add entry for N_Raise_Expression.
6285 * expander.adb: Add call to Expand_N_Raise_Expression.
6286 * par-ch11.adb (P_Raise_Expression): New procedure.
6287 * par-ch4.adb (P_Relation): Handle Raise_Expression.
6288 * par.adb (P_Raise_Expression): New procedure.
6289 * sem.adb: Add handling for N_Raise_Expression.
6290 * sem_ch11.ads, sem_ch11.adb (Analyze_Raise_Expression): New procedure.
6291 * sem_res.adb (Resolve): Add handling for N_Raise_Expression.
6292 * sinfo.ads, sinfo.adb (N_Raise_Expression): New node.
6293 * sprint.adb (Sprint_Node_Actual): Add handling for N_Raise_Expression.
6294 * stand.ads (Any_Type): Document use with N_Raise_Expression.
6296 2013-04-11 Vincent Celier <celier@adacore.com>
6298 * gnat_ugn.texi: Remove section "The Development Environments"
6299 now that all predefined attributes are documented, including
6300 those in package IDE.
6302 2013-04-11 Ed Schonberg <schonberg@adacore.com>
6304 * sem_ch6.adb: Preserve parent link in copy of expression.
6306 2013-04-11 Vincent Celier <celier@adacore.com>
6308 * projects.texi: Complete rewrite of the subsection Attributes
6309 in section "Project file Reference".
6311 2013-04-11 Robert Dewar <dewar@adacore.com>
6313 * exp_ch4.adb: Minor reformatting.
6315 2013-04-11 Robert Dewar <dewar@adacore.com>
6317 * exp_ch4.adb (Expand_Concatenate): Remove wrapping in
6318 expression-with-actions node. No longer needed given fix to
6319 sem_prag and caused loss of some useful warnings.
6320 * sem.ads: Minor reformatting.
6321 * sem_prag.adb (Check_Disabled): Removed, to be replaced by not
6322 Check_Enabled. These two routines were curiously incompatible
6324 (Analyze_Pragma, case Check): Make sure we do
6325 not expand the string argument if the check is disabled. Avoid
6326 use of Check_Disabled, which resulted in missing analysis in
6328 * sem_prag.ads (Check_Disabled): Removed, to be replaced by not
6329 Check_Enabled. These two routines were curiously incompatible
6332 2013-04-11 Hristian Kirtchev <kirtchev@adacore.com>
6334 * exp_ch4.adb (Process_Transient_Object): Use
6335 an unchecked conversion when associating a transient controlled
6336 object with its "hook".
6338 2013-04-11 Ed Schonberg <schonberg@adacore.com>
6340 * sem_prag.adb (Analyze_Pragma, case
6341 Preelaborable_Initialization): The pragma is legal if it comes
6342 from an aspect on the private view of the type, even though its
6343 analysis point takes place later at the freeze point.
6345 2013-04-11 Robert Dewar <dewar@adacore.com>
6347 * sem_ch6.adb: Minor reformatting.
6349 2013-04-11 Yannick Moy <moy@adacore.com>
6351 * ali-util.adb (Read_Withed_ALIs): Do not consider it an error to
6352 read ALI files with No_Object=True in Alfa mode.
6353 * gnat1drv.adb: Set appropriately Back_End_Mode in Alfa mode, whether
6354 this is during frame condition generation of translation to Why.
6356 2013-04-11 Robert Dewar <dewar@adacore.com>
6358 * exp_ch4.adb: Minor code reorganization
6359 * types.ads: Minor reformatting.
6361 2013-04-11 Johannes Kanig <kanig@adacore.com>
6363 * opt.ads New global boolean Frame_Condition_Mode to avoid
6364 referring to command line switch.
6365 * gnat1drv.adb (Gnat1drv) set frame condition mode when -gnatd.G
6366 is present, and disable Code generation in that case. Disable
6367 ALI file generation when switch is *not* present.
6369 2013-04-11 Ed Schonberg <schonberg@adacore.com>
6371 * sem_ch6.adb (Analyze_Expression_Function): Perform the
6372 pre-analysis on a copy of the expression, to prevent downstream
6373 visbility issues involving operators and instantiations.
6375 2013-04-11 Johannes Kanig <kanig@adacore.com>
6377 * debug.adb: Reservation and documentation for -gnatd.G switch.
6378 * gnat1drv.adb (Adjust_Global_Switches) Take into account -gnatd.G
6379 switch, and set ALI file generation accordingly.
6381 2013-04-11 Robert Dewar <dewar@adacore.com>
6383 * exp_ch4.adb, exp_dist.adb: Minor reformatting.
6384 * gnat_rm.texi, gnat_ugn.texi: -020 Add documentation clarifying that
6385 check names introduced with pragma Check_Name are suppressed by -gnatp.
6387 2013-04-11 Vincent Celier <celier@adacore.com>
6389 * gnat_ugn.texi, projects.texi: Move chapter "Tools Supporting Project
6390 Files" from projects.texi to gnat_ugn.texi.
6392 2013-04-11 Arnaud Charlet <charlet@adacore.com>
6394 * gcc-interface/Make-lang.in: Update dependencies.
6396 2013-04-11 Yannick Moy <moy@adacore.com>
6398 * gnat1drv.adb (Adjust_Global_Switches): Allow missing body in Alfa
6401 2013-04-11 Hristian Kirtchev <kirtchev@adacore.com>
6403 * exp_ch4.adb (Expand_N_Allocator): Detect the
6404 allocation of an anonymous controlled object where the type of
6405 the context is named. Use the pool and finalization master of
6406 the named access type to allocate the object.
6408 2013-04-11 Vincent Celier <celier@adacore.com>
6410 * gnat_ugn.texi: Remove most mentions of gprbuild.
6411 * projects.texi: Remove all mentions of asociative array
6414 2013-04-11 Robert Dewar <dewar@adacore.com>
6416 * sem_prag.adb, sem_attr.adb, gnat1drv.adb, prj-makr.adb,
6417 opt.ads, sem_ch13.adb: Minor reformatting.
6418 * debug.adb: Minor comment fix (remove junk .I doc).
6420 2013-04-11 Thomas Quinot <quinot@adacore.com>
6422 * rtsfind.ads, exp_dist.adb, exp_dist.ads (Rtsfind.PCS_Version, case
6423 PolyORB): Bump to 6.
6424 (Exp_Dist.PolyORB_Support): Replace TC_Build with
6427 2013-04-11 Arnaud Charlet <charlet@adacore.com>
6429 * debug.adb, sem_prag.adb, par-ch2.adb, sem_attr.adb, gnat1drv.adb,
6430 exp_disp.adb, opt.ads, sem_ch13.adb (Relaxed_RM_Semantics): New flag.
6431 Enable this flag in CodePeer mode, and also via -gnatd.M.
6432 Replace some uses of CodePeer_Mode by Relaxed_RM_Semantics.
6434 2013-04-11 Ed Schonberg <schonberg@adacore.com>
6436 * sem_ch8.adb (Check_Constrained_Object): If a subtype is created
6437 from the renamed object in an object renaming declaration with
6438 an unconstrained nominal subtype, freeze the created subtype at
6439 once, to prevent order of elaboration issues in the backend.
6441 2013-04-11 Arnaud Charlet <charlet@adacore.com>
6443 * exp_aggr.adb (Aggr_Size_OK): Refine setting of Max_Aggr_Size
6444 in particular in CodePeer mode.
6446 2013-04-11 Vincent Celier <celier@adacore.com>
6448 * gnat_ugn.texi: Add documentation for backup copies of project
6451 2013-04-11 Tristan Gingold <gingold@adacore.com>
6453 * gnat_rm.texi: Add Detect_BLocking in the ravenscar profile
6456 2013-04-11 Vincent Celier <celier@adacore.com>
6458 * gnatname.adb (Scan_Args): Recognize new switch --no-backup
6459 (Usage): Add line for --no-backup.
6460 * opt.ads (No_Backup): New Boolean variable, initialized to False.
6461 (Ada_Version_Default): Switch to Ada 2012 by default.
6462 * prj-makr.adb (Initialize): Create a backup for an existing
6463 project file if gnatname is not invoked with --no-backup.
6465 2013-04-11 Thomas Quinot <quinot@adacore.com>
6467 * exp_ch4.adb: Minor code improvement: replace various calls to
6468 Make_If_Statement in expansion with Make_Implicit_If_Statement.
6470 2013-04-11 Eric Botcazou <ebotcazou@adacore.com>
6472 * ali.adb: Fix minor typo.
6474 2013-04-11 Thomas Quinot <quinot@adacore.com>
6476 * exp_ch4.adb (Find_Enclosing_Context): Add missing case of
6477 N_Procedure_Call_Statement.
6479 2013-04-11 Robert Dewar <dewar@adacore.com>
6481 * debug.adb: Minor comment fix.
6483 2013-04-11 Johannes Kanig <kanig@adacore.com>
6485 * debug.adb: Remove comment for -gnatd.G.
6487 2013-04-11 Thomas Quinot <quinot@adacore.com>
6489 * exp_ch4.adb (Expand_Record_Equality.Suitable_Element):
6490 Remove recursive routine, replace with...
6491 (Expand_Record_Equality.Element_To_Compare): New subroutine,
6492 implement iterative search for next element to compare.
6493 Add explanatory comment in the tagged case.
6495 2013-04-11 Ed Schonberg <schonberg@adacore.com>
6497 * sem_ch5.adb: remove spurious warning from non-empty loop.
6498 * sem_ch8.adb (Enclosing_Instance): Make public to other routines
6499 in the package, in order to suppress redundant semantic checks
6500 on subprogram renamings in nested instantiations.
6502 2013-04-11 Robert Dewar <dewar@adacore.com>
6504 * errout.ads: Minor reformatting.
6505 * sem_eval.adb (Why_Not_Static): Now issues continuation messages
6506 (Why_Not_Static): Test for aggregates behind string literals.
6507 * sem_eval.ads (Why_Not_Static): Now issues continuation messages.
6509 2013-04-11 Robert Dewar <dewar@adacore.com>
6511 * exp_ch4.adb (Expand_Concatenation): Wrap expansion in
6512 Expressions_With_Actions.
6514 2013-04-11 Ed Schonberg <schonberg@adacore.com>
6516 * sem_ch6.adb (Base_Types_Match): For an actual type in an
6517 instance, the base type may itself be a subtype, so find true
6518 base type to determine compatibility.
6520 2013-04-11 Robert Dewar <dewar@adacore.com>
6522 * s-osprim-mingw.adb, sem_ch3.adb, sem_prag.adb, sem_util.adb.
6523 makeutl.adb, sem_ch8.adb: Minor reformatting.
6525 2013-04-11 Vincent Celier <celier@adacore.com>
6527 * gnat_ugn.texi: Minor fixes for VMS.
6528 * ug_words: Minor addition: -gnato? => /OVERFLOW_CHECKS=?.
6530 2013-04-11 Robert Dewar <dewar@adacore.com>
6532 * usage.adb (Usage): Minor edit to -gnatW message
6534 2013-04-11 Robert Dewar <dewar@adacore.com>
6536 * exp_aggr.adb (Expand_N_Aggregate): Add circuit for handling
6537 others for string literal case. Also add big ??? comment about
6538 this new code, which should be redundant, but is not.
6539 * sem_eval.adb (Eval_Concatenation): Handle non-static case
6540 properly (Eval_String_Literal): Handle non-static literal properly
6542 2013-03-20 Tobias Burnus <burnus@net-b.de>
6544 * i-fortra.ads: Update comment, add Ada 2012's optional
6545 Star and Kind data types for enhanced interoperability.
6547 2013-03-16 Eric Botcazou <ebotcazou@adacore.com>
6549 * gnatvsn.ads (Library_Version): Bump to 4.9.
6551 2013-03-08 Cesar Strauss <cestrauss@gmail.com>
6554 * seh_init.c (Raise_From_Signal_Handler): Declare as no-return.
6555 (__gnat_SEH_error_handler): Likewise. Remove final return.
6557 2013-03-06 Eric Botcazou <ebotcazou@adacore.com>
6559 * gcc-interface/trans.c (Attribute_to_gnu): Abort instead of erroring
6560 out for an unimplemented attribute.
6562 2013-03-06 Eric Botcazou <ebotcazou@adacore.com>
6564 * gcc-interface/decl.c (gnat_to_gnu_field): Remove the wrapper around
6565 a misaligned integral type if a size is specified for the field.
6567 2013-03-06 Eric Botcazou <ebotcazou@adacore.com>
6569 * gcc-interface/trans.c (Raise_Error_to_gnu) <CE_Index_Check_Failed>:
6570 Record the unpadded type of the index type on the RCI stack.
6572 2013-03-06 Eric Botcazou <ebotcazou@adacore.com>
6574 * gcc-interface/trans.c (emit_range_check): Assert that the range type
6575 is a numerical type and remove useless local variables.
6577 2013-02-25 Eric Botcazou <ebotcazou@adacore.com>
6579 * gcc-interface/ada-tree.h: Back out change accidentally committed.
6581 2013-02-21 Jakub Jelinek <jakub@redhat.com>
6584 * gnat-style.texi (@title): Remove @hfill.
6585 * projects.texi: Avoid line wrapping inside of @pxref or @xref.
6587 2013-02-14 Rainer Emrich <rainer@emrich-ebersheim.de>
6590 * tracebak.c: Cast from pointer via FARPROC.
6592 2013-02-07 Simon Wright <simon@pushface.org>
6595 * init.c (__darwin_major_version): New function for x86-64/Darwin.
6596 (__gnat_adjust_context_for_raise) [Darwin]: Disable the workaround
6597 on Darwin 12 and above.
6599 2013-02-06 Rainer Emrich <rainer@emrich-ebersheim.de>
6602 * adaint.c (__gnat_check_OWNER_ACL): Cast from pointer via
6603 SECURITY_DESCRIPTOR *
6604 (__gnat_set_OWNER_ACL): Cast from DWORD to ACCESS_MODE
6605 (__gnat_portable_spawn): Fix cast to char* const*
6606 (add_handle): Cast from pointer via void **
6607 (add_handle): Cast from pointer via int *
6608 (__gnat_locate_exec_on_path): Cast from pointer via TCHAR *
6609 (__gnat_locate_exec_on_path): Cast from pointer via char *
6610 * initialize.c (append_arg): Cast from pointer via LPWSTR
6611 (__gnat_initialize): Cast from pointer via LPWSTR
6612 * seh_init.c (__gnat_map_SEH): Cast from pointer via FARPROC
6614 2013-02-06 Hristian Kirtchev <kirtchev@adacore.com>
6616 * gcc-interface/Make-lang.in: Enable System.Stack_Checking.Operations
6617 target pairs on VxWorks 5 only.
6619 2013-02-06 Arnaud Charlet <charlet@adacore.com>
6621 * gcc-interface/Make-lang.in: Update dependencies.
6623 2013-02-06 Vincent Celier <celier@adacore.com>
6625 * prj-proc.adb (Process_Aggregated_Projects): Use a new project
6626 node tree for each project tree rooted at an aggregated project.
6628 2013-02-06 Hristian Kirtchev <kirtchev@adacore.com>
6630 * sem_util.adb (Is_Interface_Conversion): New routine.
6631 (Object_Access_Level): Detect an interface conversion
6632 that has been rewritten into a different construct. Use the
6633 original form of the conversion to find the access level of
6636 2013-02-06 Eric Botcazou <ebotcazou@adacore.com>
6638 * einfo.ads (Has_Pragma_No_Inline): New flag using Flag201.
6639 (Has_Pragma_No_Inline): Declare and mark as inline.
6640 (Set_Has_Pragma_No_Inline): Likewise.
6641 * einfo.adb (Has_Pragma_No_Inline): New function.
6642 (Set_Has_Pragma_No_Inline): New procedure.
6643 (Write_Entity_Flags): Handle Has_Pragma_No_Inline.
6644 * snames.ads-tmpl (Name_No_Inline): New pragma-related name.
6645 (Pragma_Id): Add Pragma_No_Inline value.
6646 * par-prag.adb (Prag): Handle Pragma_Inline.
6647 * sem_prag.adb (Inline_Status): New enumeration type.
6648 (Process_Inline): Change Active parameter
6649 to Inline_Status and add support for suppressed inlining.
6650 (Analyze_Pragma) <Pragma_Inline>: Adjust to above change.
6651 <Pragma_Inline_Always>: Likewise.
6652 <Pragma_No_Inline>: Implement new pragma No_Inline.
6653 (Sig_Flags): Add Pragma_No_Inline.
6654 * gnat_rm.texi (Implementation Defined Pragmas): Add No_Inline.
6655 * gnat_ugn.texi (Switches for gcc): Mention Pragma No_Inline.
6657 2013-02-06 Pascal Obry <obry@adacore.com>
6659 * s-osprim-mingw.adb (Clock): Make sure we copy all data locally
6660 to avoid interleaved modifications that could happen from another
6661 task calling Get_Base_Data.
6662 (Get_Base_Data): Make it a critical section. Avoid updating if another
6663 task has already done it.
6665 2013-02-06 Eric Botcazou <ebotcazou@adacore.com>
6667 * sem_prag.adb: Minor reformatting.
6669 2013-02-06 Pascal Obry <obry@adacore.com>
6671 * s-tasloc.ads: Set System.Task_Lock to preelaborate.
6673 2013-02-06 Eric Botcazou <ebotcazou@adacore.com>
6675 * snames.ads-tmpl (Name_Loop_Optimize, Name_No_Unroll,
6676 Name_Unroll, Name_No_Vector, Name_Vector): New pragma-related
6678 (Pragma_Id): Add Pragma_Loop_Optimize value.
6679 * par-prag.adb (Prag): Handle Pragma_Loop_Optimize.
6680 * sem_prag.adb (Check_Loop_Invariant_Variant_Placement): Rename to...
6681 (Check_Loop_Pragma_Placement): ...this.
6683 <Pragma_Loop_Invariant>: Adjust to above renaming.
6684 <Loop_Variant>: Likewise.
6685 <Pragma_Loop_Optimize>: Implement new pragma Loop_Optimize.
6686 (Sig_Flags): Add Pragma_Loop_Optimize.
6687 * gnat_rm.texi (Implementation Defined Pragmas): Add Loop_Optimize.
6688 * gnat_ugn.texi (Vectorization of loops): Mention Loop_Optimize.
6690 2013-02-06 Robert Dewar <dewar@adacore.com>
6692 * osint.ads: Minor fix of typo.
6694 2013-02-06 Sergey Rybin <rybin@adacore.com frybin>
6696 * gnat_ugn.texi: gnatmetric: update the documentation of
6697 complexity metrics for Ada 2012.
6699 2013-02-06 Javier Miranda <miranda@adacore.com>
6701 * exp_disp.adb (Make_Secondary_DT): Code cleanup:
6702 remove useless initialization.
6704 2013-02-06 Ed Schonberg <schonberg@adacore.com>
6706 * sem_ch3.adb (Build_Discriminant_Constraints): Do not
6707 generate overflow checks on a discriminant expression if the
6708 discriminant constraint is applied to a private type that has
6709 a full view, because the check will be applied when the full
6710 view is elaborated. Removing the redundant check is not just
6711 an optimization, but it prevents spurious assembler errors,
6712 because of the way the backend generates names for expressions
6713 that require overflow checking.
6715 2013-02-06 Pascal Obry <obry@adacore.com>
6717 * s-osprim-mingw.adb: Removes workaround for an old GNU/Linker
6718 limitation on Windows.
6728 (Clock): Use variable corresponding to access.
6729 (Get_Base_Time): Likewise.
6730 (Monotonic_Clock): Likewise.
6732 2013-02-06 Vincent Celier <celier@adacore.com>
6734 * make.adb (Gnatmake): When gnatmake is called with a project
6735 file, do not invoke gnatbind with -I-.
6736 * makeutl.adb (Create_Binder_Mapping_File): Rewrite function. Get
6737 the infos from all the sources.
6739 2013-02-06 Ed Schonberg <schonberg@adacore.com>
6741 * snames.ads-tmpl: Add Name_Overriding_Renamings and pragma
6742 Overriding_Renamings.
6743 * par-prag.adb: Recognize pragma Overriding_Renamings.
6744 * opt.ads (Overriding_Renamings): flag to control compatibility
6745 mode with Rational compiler, replaces Rational_Profile flag.
6746 * sem_ch8.adb (Analyze_Subprogram_Renaming): When
6747 Overriding_Renamings is enabled, accept renaming declarations
6748 where the new subprogram renames and overrides a locally inherited
6749 operation. Improve error message for some illegal renamings.
6750 * sem_prag.adb (Analyze_Pragma): Add case for Overriding_Renamings.
6751 (Set_Rational_Profile): The Rational_Profile enables
6752 Overriding_Renamings, Implicit_Packing, and Use_Vads_Size.
6754 2013-02-06 Ed Schonberg <schonberg@adacore.com>
6756 * sem_util.adb: Set parent of copied aggregate component, to
6757 prevent infinite loop.
6759 2013-02-06 Robert Dewar <dewar@adacore.com>
6761 * sem_ch3.adb, sem_ch10.adb: Minor reformatting.
6762 * exp_disp.adb: Minor comment update.
6763 * comperr.ads, osint.ads, rtsfind.adb, sem_prag.adb: Minor addition of
6766 2013-02-06 Thomas Quinot <quinot@adacore.com>
6768 * targparm.ads, sem_ch13.adb (Support_Nondefault_SSO): New target
6769 parameter, defaulted to False for now, indicates targets where
6770 non-default scalar storage order may be specified.
6772 2013-02-06 Thomas Quinot <quinot@adacore.com>
6774 * sprint.adb (Write_Itype): Treat E_Record_Subtype_With_Private
6775 same as E_Record_Subtype. Display E_Class_Wide_Subtype as
6778 2013-02-06 Hristian Kirtchev <kirtchev@adacore.com>
6780 * sem_ch3.adb (Complete_Private_Subtype): Inherit the
6781 Has_Unknown_Discriminants from the full view of the base type.
6783 2013-02-06 Tristan Gingold <gingold@adacore.com>
6785 * raise-gcc.c: Remove useless includes (sys/stat.h, adaint.h)
6786 Enclosing debugging functions within #ifndef inhibit_libc to
6787 support builds without full C headers.
6789 2013-02-06 Thomas Quinot <quinot@adacore.com>
6791 * gnat_rm.texi: Add a minimal example of Scalar_Storage_Order.
6793 2013-02-06 Hristian Kirtchev <kirtchev@adacore.com>
6795 * sem_ch10.adb (Install_Limited_Withed_Unit): Add a missing
6796 check to detect a parent-child relationship between two units in
6797 order to correctly bypass the installation of a limited view. In
6798 other words, the comment on the intended usage of the check was
6799 correct, but the code itself did not reflect the behavior.
6801 2013-02-06 Javier Miranda <miranda@adacore.com>
6803 * exp_ch5.adb (Expand_N_Assignment_Statement): Do not generate the
6804 runtime check on assignment to tagged types if compiling with checks
6807 2013-02-06 Robert Dewar <dewar@adacore.com>
6809 * exp_util.adb, checks.adb, sem_ch12.adb, sem_res.adb, prj-conf.adb,
6810 s-os_lib.adb: Minor reformatting
6812 2013-02-06 Vincent Celier <celier@adacore.com>
6814 * ug_words: Add -gnateY = /IGNORE_STYLE_CHECKS_PRAGMAS.
6816 2013-02-06 Ed Schonberg <schonberg@adacore.com>
6818 * snames.ads-tmpl: Add Name_Rational and pragma Rational.
6819 * par-prag.adb: Recognize pragma Rational.
6820 * opt.ads (Rational_Profile): flag to control compatibility mode
6821 with Rational compiler.
6822 * sem_ch8.adb (Analyze_Subprogram_Renaming): When Rational profile
6823 is enable, accept renaming declarations where the new subprogram
6824 and the renamed entity have the same name.
6825 * sem_prag.adb (analyze_pragma): Add pragma Rational, and recognize
6826 Rational as a profile.
6828 2013-02-06 Hristian Kirtchev <kirtchev@adacore.com>
6830 * exp_ch5.adb (Expand_Loop_Entry_Attributes): When
6831 dealing with a for loop that iterates over a subtype indication
6832 with a range, use the low and high bounds of the subtype.
6834 2013-02-06 Nicolas Roche <roche@adacore.com>
6836 * s-os_lib.adb (Normalize_Arguments): Arguments containing tabs should
6839 2013-02-06 Vincent Celier <celier@adacore.com>
6841 * prj-conf.adb (Process_Project_And_Apply_Config): New variable
6842 Conf_Project. New recursive procedure Check_Project to find a non
6843 aggregate project and put its Project_Id in Conf_Project. Fails if
6844 no such project can be found.
6845 (Get_Or_Create_Configuration_File): New parameter Conf_Project.
6846 (Do_Autoconf): Use project directory of project Conf_Project to store
6847 the generated configuration project file.
6848 * prj-conf.ads (Get_Or_Create_Configuration_File): New parameter
6851 2013-02-06 Javier Miranda <miranda@adacore.com>
6853 * sem_res.adb (Resolve_Actuals): Generate a read
6854 reference for out-mode parameters in the cases specified by
6857 2013-02-06 Hristian Kirtchev <kirtchev@adacore.com>
6859 * sem_attr.adb (Resolve_Attribute): Do not resolve the prefix of
6860 Loop_Entry, instead wait until the attribute has been expanded. The
6861 delay ensures that any generated checks or temporaries are inserted
6862 before the relocated prefix.
6864 2013-02-06 Ed Schonberg <schonberg@adacore.com>
6866 * sem_ch12.adb: Code clean up.
6868 2013-02-06 Ed Schonberg <schonberg@adacore.com>
6870 * checks.adb (Apply_Discriminant_Check): Look for discriminant
6871 constraint in full view of private type when needed.
6872 * sem_ch12.adb (Validate_Array_Type_Instance): Specialize
6873 previous patch to components types that are private and without
6876 2013-02-06 Hristian Kirtchev <kirtchev@adacore.com>
6878 * exp_ch4.adb (Find_Enclosing_Context): Recognize
6879 a simple return statement as one of the cases that require special
6880 processing with respect to temporary controlled function results.
6881 (Process_Transient_Object): Do attempt to finalize a temporary
6882 controlled function result when the associated context is
6883 a simple return statement. Instead, leave this task to the
6884 general finalization mechanism.
6886 2013-02-06 Thomas Quinot <quinot@adacore.com>
6888 * einfo.ads: Minor reformatting.
6889 (Status_Flag_Or_Transient_Decl): Add ??? comment.
6891 2013-02-06 Hristian Kirtchev <kirtchev@adacore.com>
6893 * exp_ch4.adb (Expand_N_Expression_With_Actions): Rewritten. This
6894 routine should be able to properly detect controlled transient
6895 objects in its actions and generate the appropriate finalization
6897 * exp_ch6.adb (Enclosing_Context): Removed.
6898 (Expand_Ctrl_Function_Call): Remove local subprogram and
6899 constant. Use routine Within_Case_Or_If_Expression to determine
6900 whether the lifetime of the function result must be extended to
6901 match that of the context.
6902 * exp_util.ads, exp_util.adb (Within_Case_Or_If_Expression): New
6905 2013-02-06 Ed Schonberg <schonberg@adacore.com>
6907 * sem_ch12.adb (Validate_Array_Type_Instance): Extend check
6908 for subtype matching of component type of formal array type,
6909 to avoid spurious error when component type is a separate actual
6910 in the instance, and there may be a discrepancy between private
6911 and full view of component type.
6913 2013-02-06 Robert Dewar <dewar@adacore.com>
6915 * s-dim.ads, clean.adb: Minor reformatting.
6917 2013-02-06 Javier Miranda <miranda@adacore.com>
6919 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Undo previous patch.
6920 (Can_Split_Unconstrained_Function): Only split the inlined function if
6921 the compiler generates the code of its body.
6923 2013-02-06 Robert Dewar <dewar@adacore.com>
6925 * exp_prag.adb, sem_ch3.adb, exp_attr.adb, sem_prag.adb, sem_ch6.adb,
6926 exp_intr.adb, exp_dist.adb, sem_ch13.adb: Internal clean up for
6929 2013-02-06 Robert Dewar <dewar@adacore.com>
6931 * gnat_rm.texi: Minor text updates for pragma Warning.
6933 2013-02-06 Geert Bosch <bosch@adacore.com>
6935 * s-multip.adb (Number_Of_CPUs): Short-circuit in case of
6938 2013-02-06 Vincent Celier <celier@adacore.com>
6940 * clean.adb (Delete): On VMS use host notation to delete all files.
6942 2013-02-06 Robert Dewar <dewar@adacore.com>
6944 * sem_prag.adb, sem_ch6.adb, prj-conf.adb, erroutc.adb: Minor
6947 2013-02-06 Gary Dismukes <dismukes@adacore.com>
6949 * sem_ch6.adb (Check_For_Primitive_Subprogram): Test for
6950 the special case of a user-defined equality that overrides
6951 the predefined equality of a nonderived type declared in a
6953 * sem_util.adb (Collect_Primitive_Operations): Add test for
6954 Is_Primitive when looping over the subprograms following a type,
6955 to catch the case of primitives such as a user-defined equality,
6956 which otherwise won't be found when the type is not a derived
6957 type and is declared in a declarative part.
6959 2013-02-06 Vincent Celier <celier@adacore.com>
6961 * prj-conf.adb (Check_Target): Always return True when Target
6962 is empty (Get_Or_Create_Configuration_File.Get_Project_Target):
6963 New procedure to get the value of attribute Target in the main
6965 (Get_Or_Create_Configuration_File.Do_Autoconf): No
6966 need to get the value of attribute Target in the main project.
6967 (Get_Or_Create_Configuration_File): Call Get_Project_Target and
6968 use the target fom this call.
6970 2013-02-06 Eric Botcazou <ebotcazou@adacore.com>
6972 * erroutc.adb (Validate_Specific_Warning): Do not issue the
6973 warning about an ineffective Pragma Warnings for -Wxxx warnings.
6974 * sem_prag.adb (Analyze_Pragma) <Warnings>: Accept -Wxxx warnings.
6975 * gnat_rm.texi (Pragma Warnings): Document coordination with
6976 warnings of the GCC back-end.
6978 2013-02-06 Javier Miranda <miranda@adacore.com>
6980 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Do not build the body
6981 of an inlined function if we do not generate code for the function.
6983 2013-02-06 Pascal Obry <obry@adacore.com>
6985 * s-os_lib.adb (Locate_Exec_On_Path): Call Normalize_Pathname
6986 with Resolve_Links set to False.
6988 2013-02-03 Eric Botcazou <ebotcazou@adacore.com>
6990 * gcc-interface/decl.c: Include diagnostic-core.h.
6991 (gnat_to_gnu_entity) <E_Array_Type>: Sorry if Reverse_Storage_Order
6992 is set on the entity.
6993 <E_Record_Type>: Likewise.
6994 * gcc-interface/Make-lang.in (ada/decl.o): Add $(DIAGNOSTIC_CORE_H).
6996 2013-01-29 Ben Brosgol <brosgol@adacore.com>
6998 * gnat_rm.texi: Fixed typos. Minor edits.
7000 2013-01-29 Bob Duff <duff@adacore.com>
7002 * a-convec.adb: Minor reformatting.
7004 2013-01-29 Pascal Obry <obry@adacore.com>
7006 * tempdir.adb, tempdir.ads (Use_Temp_Dir): Set wether to use the temp
7009 2013-01-29 Ed Schonberg <schonberg@adacore.com>
7011 * exp_ch5.adb (Expand_Iterator_Loop_Over_Array): Preserve loop
7012 identifier only if it comes from source.
7013 (Expand_N_Loop_Statement): If the domain of iteration is an
7014 enumeration type with a representation clause, remove from
7015 visibility the loop identifier before rewriting the loop as a
7016 block with a declaration for said identifier.
7017 * sem_util.adb (Remove_Homonym): Handle properly the default case.
7019 2013-01-29 Vincent Celier <celier@adacore.com>
7021 * prj-proc.adb: Minor comment spelling fix.
7023 2013-01-29 Pascal Obry <obry@adacore.com>
7025 * prj-proc.adb (Process_Expression_Variable_Decl): Prepend
7026 Project_Path to current environment.
7028 2013-01-29 Thomas Quinot <quinot@adacore.com>
7030 * sprint.adb (Sprint_Node_Actual): Output freeze nodes for
7031 itypes even if Dump_Freeze_Null is not set.
7033 2013-01-29 Robert Dewar <dewar@adacore.com>
7035 * sem_util.adb: Minor reformatting.
7036 * s-rident.ads: Minor comment fixes.
7038 2013-01-29 Pascal Obry <obry@adacore.com>
7040 * prj-env.ads, prj-env.adb (Add_Directories): Add parameter to
7041 control if the path is prepended or appended.
7043 2013-01-29 Ed Schonberg <schonberg@adacore.com>
7045 * sem_ch6.adb (Analyze_Expression_Function): An expression
7046 function declaration is not a subprogram declaration, and thus
7047 cannot appear in a protected definition.
7049 2013-01-29 Hristian Kirtchev <kirtchev@adacore.com>
7051 * exp_util.adb (Insert_Actions): When new
7052 actions come from the expression of the expression with actions,
7053 then they must be added to the list of existing actions.
7055 2013-01-29 Eric Botcazou <ebotcazou@adacore.com>
7057 * sem_ch3.adb (Analyze_Subtype_Declaration) <Private_Kind>: For
7058 the subtype of a constrained private type with discriminants
7059 that has got a full view, show that the completion is a clone
7062 2013-01-29 Javier Miranda <miranda@adacore.com>
7064 * errout.ads, errout.adb (Get_Ignore_Errors): New subprogram.
7065 * opt.ads (Warn_On_Overlap): Update documentation.
7066 * sem_aggr.adb (Resolve_Aggregate, Resolve_Extension_Aggregate):
7067 Check function writable actuals.
7068 * sem_ch3.adb (Build_Derived_Record_Type,
7069 Record_Type_Declaration): Check function writable actuals.
7070 * sem_ch4.adb (Analyze_Range): Check function writable actuals.
7071 * sem_ch5.adb (Analyze_Assignment): Remove code of the initial
7072 implementation of AI05-0144.
7073 * sem_ch6.adb (Analyze_Function_Return,
7074 (Analyze_Procedure_Call.Analyze_Call_And_Resolve): Remove code
7075 of the initial implementation of AI05-0144.
7076 * sem_res.adb (Resolve): Remove code of the initial implementation.
7077 (Resolve_Actuals): Call Check_Function_Writable_Actuals and remove call
7078 of the initial implementation.
7079 (Resolve_Arithmetic_Op, Resolve_Logical_Op,
7080 Resolve_Membership_Op): Check function writable actuals.
7081 * sem_util.ad[sb] (Actuals_In_Call): Removed
7082 (Check_Order_Dependence): Removed (Save_Actual): Removed
7083 (Check_Function_Writable_Actuals): New subprogram.
7084 * usage.adb (Usage): Update documentation.
7085 * warnsw.adb (Set_Warning_Switch): Enable warn_on_overlap when
7086 setting all warnings.
7088 2013-01-29 Robert Dewar <dewar@adacore.com>
7090 * a-calend-vms.adb: Minor comment fix.
7092 2013-01-29 Robert Dewar <dewar@adacore.com>
7094 * mlib-utl.adb, gnatlink.adb: Avoid reference to ASCII.Back_Slash
7095 because of casing issues.
7096 * sem_util.ads: Minor comment fix.
7097 * style.adb (Check_Identifier): Set proper casing for entities
7099 * styleg.adb: Minor comment improvement.
7100 * stylesw.ads (Style_Check_Standard): Fix bad comments.
7102 2013-01-29 Hristian Kirtchev <kirtchev@adacore.com>
7104 * sem_prag.adb: Add the grammar for pragmas Abstract_State and Global.
7105 (Analyze_Pragma): Push the scope of the related subprogram and install
7106 its formals once before starting the analysis of the [moded] global
7109 2013-01-29 Pascal Obry <obry@adacore.com>
7111 * prj-proc.adb (Process_Expression_Variable_Decl): Always handle
7112 relative paths in Project_Path as relative to the aggregate
7113 project location. Note that this was what was documented.
7115 2013-01-29 Vincent Celier <celier@adacore.com>
7117 * gnatcmd.adb: For "gnat stub -P ...", do not check the naming
7118 scheme for Ada, when Ada is not a language for the project.
7120 2013-01-29 Ed Schonberg <schonberg@adacore.com>
7122 * sem_ch3.adb (Analyze_Subtype_Declaration): Inherit
7123 Is_Generic_Actual_Type flag in a nested instance.
7124 * sem_ch12.adb (Restore_Private_Views): Preserve
7125 Is_Generic_Actual_Type flag if actual is a Generic_Actual_Type
7126 of an enclosing instance.
7127 * sem_util.adb (Corresponding_Generic_Type): Handle generic actual
7128 which is an actual of an enclosing instance.
7129 * sem_type.adb (Real_Actual): If a generic_actual_type is the
7130 formal of an enclosing generic and thus renames the corresponding
7131 actual, use the actual of the enclosing instance to resolve
7132 spurious ambiguities in instantiations when two formals are
7133 instantiated with the same actual.
7135 2013-01-29 Robert Dewar <dewar@adacore.com>
7137 * gnat_rm.texi: Document all Ada 2005 and Ada 2012 pragmas as
7138 being available as implementation-defined pragmas in earlier
7141 2013-01-29 Vincent Celier <celier@adacore.com>
7143 * clean.adb (Delete): On VMS, delete all versions of the file.
7145 2013-01-29 Robert Dewar <dewar@adacore.com>
7147 * par-ch6.adb (No_Constraint_Maybe_Expr_Func): New procedure.
7148 * par-util.adb (No_Constraint): Undo special handling, moved
7151 2013-01-29 Robert Dewar <dewar@adacore.com>
7153 * aspects.ads: Aspect Warnings is implementation defined Add
7154 some other missing entries to impl-defined list Mark Warnings
7155 as GNAT pragma in main list.
7156 * sem_ch8.adb: Process aspects for all cases of renaming
7159 2013-01-29 Robert Dewar <dewar@adacore.com>
7161 * sem_ch6.adb (Analyze_Function_Call): Set In_Assertion flag.
7162 * sem_elab.adb (Check_Internal_Call_Continue): Do not issue
7163 warnings about possible elaboration error if call is within
7165 * sinfo.ads, sinfo.adb (In_Assertion): New flag in N_Function_Call node.
7167 2013-01-29 Robert Dewar <dewar@adacore.com>
7169 * a-calend-vms.adb, g-eacodu-vms.adb, g-trasym-vms-alpha.adb,
7170 * s-auxdec-vms-ia64.adb, s-mastop-vms.adb, s-osprim-vms.adb,
7171 s-tasdeb-vms.adb: Replace pragma Interface by pragma Import.
7173 2013-01-29 Robert Dewar <dewar@adacore.com>
7175 * opt.ads (Ignore_Style_Checks_Pragmas): New flag.
7176 * par-prag.adb (Par, case Style_Checks): Recognize
7177 Ignore_Style_Checks_Pragmas.
7178 * sem_prag.adb (Analyze_Pragma, case Style_Checks): Recognize
7179 Ignore_Style_Checks_Pragmas.
7180 * switch-c.adb: Recognize -gnateY switch.
7181 * usage.adb: Add documentation for "-gnateY".
7182 * vms_data.ads: Add IGNORE_STYLE_CHECKS_PRAGMAS (-gnateY).
7184 2013-01-29 Vincent Celier <celier@adacore.com>
7186 * clean.adb (Clean_Executables): Add Sid component when calling
7188 * make.adb: When inserting in the Queue, add the Source_Id
7189 (Sid) when it is known (Start_Compile_If_Possible): When the
7190 Source_Id is known (Sid), get the path name of the ALI file
7191 (Full_Lib_File) from it, to avoid finding old ALI files in other
7193 * makeutl.ads (Source_Info): New Source_Id component Sid in
7194 Format_Gnatmake variant.
7196 2013-01-29 Robert Dewar <dewar@adacore.com>
7198 * gnat_ugn.texi: Document -gnateY.
7200 2013-01-29 Doug Rupp <rupp@adacore.com>
7202 * s-osinte-vms.ads, s-taprop-vms.adb, system-vms_64.ads,
7203 system-vms-ia64.ads: Replace pragma Interface by pragma Import.
7205 2013-01-29 Robert Dewar <dewar@adacore.com>
7207 * atree.ads, atree.adb (Node30): New function.
7208 (Set_Node30): New procedure.
7209 (Num_Extension_Nodes): Change to 5 (activate new fields/flags).
7210 * atree.h: Add macros for Field30 and Node30.
7211 * einfo.ads, einfo.adb: Move some fields to avoid duplexing.
7212 * treepr.adb (Print_Entity_Information): Print fields 30-35.
7214 2013-01-29 Robert Dewar <dewar@adacore.com>
7216 * sem_prag.adb (Analyze_Pragma, case Interface): Consider to
7217 be a violation of No_Obsolescent_Features even in Ada 95. Also
7218 generates a warning in -gnatwj mode.
7219 (Analyze_Pragma, case Interface_Name): Generates a warning in -gnatwj
7221 * gnat_ugn.texi: Additional documentation on -gnatwj and pragma
7224 2013-01-29 Vincent Celier <celier@adacore.com>
7226 * snames.ads-tmpl: Add new standard name Trailing_Switches.
7228 2013-01-29 Ed Schonberg <schonberg@adacore.com>
7230 * sem_disp.adb (Check_Controlling_Type): If a designated type T
7231 of an anonymous access type is a limited view of a tagged type,
7232 it can be a controlling type only if the subprogram is in the
7235 2013-01-29 Vincent Celier <celier@adacore.com>
7237 * gnatcmd.adb: Use the project where the config pragmas file is
7238 declared to get its path.
7240 2013-01-29 Vincent Celier <celier@adacore.com>
7242 * prj-attr.adb: New attribute Linker'Trailing_Switches.
7244 2013-01-22 Eric Botcazou <ebotcazou@adacore.com>
7246 * gcc-interface/trans.c (gnat_to_gnu) <N_Expression_With_Actions>: Do
7247 not translate the Etype of the node before translating the Actions.
7249 2013-01-22 Eric Botcazou <ebotcazou@adacore.com>
7251 * gcc-interface/trans.c (Pragma_to_gnu) <Name_Space>: Use optimize_size
7252 instead of optimize and adjust warning message.
7253 (Compilation_Unit_to_gnu): Process pragmas preceding the unit.
7255 2013-01-22 Tristan Gingold <gingold@adacore.com>
7257 * gcc-interface/gigi.h (ADT_unhandled_except_decl,
7258 ADT_unhandled_others_decl): New.
7259 (unhandled_others_decl, unhandled_except_decl): Define.
7260 * gcc-interface/trans.c: Include common/common-target.h.
7261 (gigi): Initialize them.
7262 (Subprogram_Body_to_gnu): On SEH targets, wrap the body of the main
7263 function in a try/catch clause.
7265 2013-01-11 Eric Botcazou <ebotcazou@adacore.com>
7267 * gcc-interface/Make-lang.in (COMMON_ADAFLAGS): Remove -gnata.
7268 (CHECKING_ADAFLAGS): New.
7269 (ALL_ADAFLAGS): Include CHECKING_ADAFLAGS.
7271 2013-01-10 Eric Botcazou <ebotcazou@adacore.com>
7273 * gcc-interface/config-lang.in (boot_language_boot_flags): Delete.
7274 * gcc-interface/Make-lang.in (BOOT_ADAFLAGS): Likewise.
7276 2013-01-07 Eric Botcazou <ebotcazou@adacore.com>
7278 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Record_Type>: Adjust
7279 comment about type extension with discriminants.
7280 <E_Record_Subtype>: Remove useless test and reorder conditions.
7281 (elaborate_entity) <E_Record_Subtype>: Likewise.
7283 2013-01-07 Richard Biener <rguenther@suse.de>
7286 * gcc-interface/Make-lang.in (ada.install-common): Always apply
7287 program_transform_name.
7289 2013-01-06 Eric Botcazou <ebotcazou@adacore.com>
7291 * gnatvsn.ads (Current_Year): Bump to 2013.
7293 2013-01-06 Olivier Hainque <hainque@adacore.com>
7295 * gcc-interface/decl.c (gnat_to_gnu_field): Emit a specialized
7296 diagnostic for component size mismatch wrt volatile requirements.
7297 Add a gcc_unreachable() at the end of the checks for size. Split
7298 the check on volatile for positions into one check on atomic and
7299 a subsequent one on volatile.
7301 2013-01-06 Eric Botcazou <ebotcazou@adacore.com>
7303 * gcc-interface/decl.c (elaborate_entity) <E_Record_Type>: Delete.
7305 2013-01-06 Eric Botcazou <ebotcazou@adacore.com>
7307 * gcc-interface/decl.c (gnat_to_gnu_entity) <discrete_type>: Do not
7308 pack the field of the record type made for a misaligned type.
7310 2013-01-06 Eric Botcazou <ebotcazou@adacore.com>
7312 * gcc-interface/decl.c (annotate_value) <COMPONENT_REF>: Be prepared
7313 for discriminants inherited from parent record types.
7315 2013-01-04 Robert Dewar <dewar@adacore.com>
7317 * warnsw.adb: Minor fixes to -gnatw.d handling.
7319 2013-01-04 Robert Dewar <dewar@adacore.com>
7321 * einfo.adb, atree.adb: Enlarge entities to make 63 more flags, 6 more
7324 2013-01-04 Joel Brobecker <brobecker@adacore.com>
7326 * gnat_ugn.texi: Fix typo.
7328 2013-01-04 Robert Dewar <dewar@adacore.com>
7330 * gnat_rm.texi: Document alignment choice for subtypes.
7332 2013-01-04 Robert Dewar <dewar@adacore.com>
7334 * validsw.ads: Minor fix to comment.
7336 2013-01-04 Doug Rupp <rupp@adacore.com>
7338 * Makefile.rtl (GNATRTL_NONTASKING_OBJS,
7339 GNATRTL_ALTIVEC_OBJS): Factor g-al* objects.
7340 * gcc-interface/Makefile.in (ADA_EXCLUDE_SRCS): Add g-al* sources.
7341 (GNATRTL_ALTIVEC_OBJS): Override to null for VMS.
7342 Rename leon vxworks toolchain as leon-wrs-vxworks.
7343 * gcc-interface/Make-lang.in: Update dependencies
7345 2013-01-04 Pascal Obry <obry@adacore.com>
7347 * prj.ads (For_Each_Source): Add Locally_Removed parameter.
7348 (Source_Iterator): Add Locally_Removed field.
7349 * prj.adb (For_Each_Source): Ignore Locally_Removed files if needed.
7352 2013-01-04 Robert Dewar <dewar@adacore.com>
7354 * exp_attr.adb: Minor reformatting.
7356 2013-01-04 Robert Dewar <dewar@adacore.com>
7358 * checks.adb (Insert_Valid_Check): Fix handling of renamed
7359 packed array element.
7360 * exp_ch4.adb (Expand_Concatenate): Fix some missing parent
7361 fields in generated code.
7362 * exp_util.adb (Side_Effect_Free): Improve detection of cases
7365 2013-01-04 Robert Dewar <dewar@adacore.com>
7367 * sinfo.ads: Clean up order of N_xxx subtypes
7369 2013-01-04 Vincent Celier <celier@adacore.com>
7371 * prj-conf.adb (Check_Target): Allow --autoconf= with no target.
7373 2013-01-04 Robert Dewar <dewar@adacore.com>
7375 * types.ads, prj-conf.adb, par-tchk.adb: Minor reformatting.
7377 2013-01-04 Robert Dewar <dewar@adacore.com>
7379 * par-ch6.adb (P_Subprogram): Better handling of missing IS
7380 after expression function.
7381 * par-util.adb (No_Constraint): Improve handling to avoid bad warnings.
7383 2013-01-04 Robert Dewar <dewar@adacore.com>
7385 * exp_util.ads, exp_util.adb (Insert_Actions): In expression with
7386 actions case, new actions are appended to the sequence rather than
7389 2013-01-04 Robert Dewar <dewar@adacore.com>
7391 * gnat_ugn.texi: Document -gnatw.d/w.D (does no apply in VMS mode).
7392 * usage.adb: Add lines for -gnatw.d/w.D switches.
7393 * warnsw.adb: Minor fixes (some missing cases of setting
7394 Warning_Doc_Switch). Reject -gnatw.d and -gnatw.D in VMS mode.
7396 2013-01-04 Robert Dewar <dewar@adacore.com>
7398 * exp_util.adb (Remove_Side_Effects): Make sure scope suppress
7399 is restored on exit.
7401 2013-01-04 Robert Dewar <dewar@adacore.com>
7403 * usage.adb: Document -gnateF (check overflow for predefined Float).
7405 2013-01-04 Robert Dewar <dewar@adacore.com>
7407 * sem_res.adb (Resolve_Type_Conversion): Remove incorrect
7408 prevention of call to Apply_Type_Conversion_Checks, which resulted
7409 in missing check flags in formal mode.
7411 2013-01-04 Vincent Celier <celier@adacore.com>
7413 * makeutl.ads (Db_Switch_Args): New table used by gprbuild.
7414 * prj-conf.adb (Check_Builder_Switches): Check for switches
7415 --config= (Get_Db_Switches): New procedure to get the --db
7416 switches so that they are used when invoking gprconfig in
7418 (Do_Autoconf): When invoking gprconfig, use the --db switches, if any.
7420 2013-01-04 Pascal Obry <obry@adacore.com>
7422 * prj-nmsc.adb: Minor reformatting.
7424 2013-01-04 Vincent Celier <celier@adacore.com>
7426 * makeutl.ads (Root_Environment): New variable, moved rom
7427 gprbuild (Load_Standard_Base): New Boolean variable, moved
7429 * prj-conf.adb (Check_Builder_Switches): New procedure to check
7430 for switch --RTS in package Builder. If a runtime specified
7431 by --RTS is a relative path name, but not a base name, then
7432 find the path on the Project Search Path.
7433 (Do_Autoconf): Call Check_Builder_Switches.
7434 (Locate_Runtime): New procedure, moved from gprbuild, to get the
7435 absolute paths of runtimes when they are not specified as a base name.
7436 * prj-conf.ads (Locate_Runtime): New procedure, moved from gprbuild.
7438 2013-01-04 Ed Schonberg <schonberg@adacore.com>
7440 * sem_ch3.adb (Build_Private_Derived_Type): Set
7441 Has_Private_Ancestor on type derived from an untagged private
7442 type whose full view has discriminants
7443 * sem_aggr.adb (Resolve_Record_Aggregate): Reject non-extension
7444 aggregate for untagged record type with private ancestor.
7446 2013-01-04 Thomas Quinot <quinot@adacore.com>
7448 * sem_elab.adb, sem_ch3.adb: Minor reformatting.
7450 2013-01-04 Robert Dewar <dewar@adacore.com>
7452 * table.adb: Minor reformatting.
7454 2013-01-04 Ed Schonberg <schonberg@adacore.com>
7456 * sem_ch10.adb (Check_Redundant_Withs): A with_clause that does
7457 not come from source does not generate a warning for redundant
7460 2013-01-04 Hristian Kirtchev <kirtchev@adacore.com>
7462 * aspects.adb, aspects.ads: Add Aspect_Global to all relevant tables.
7463 * par-prag.adb: Add pragma Global to the list of pragmas that
7464 do not need special processing by the parser.
7465 * sem_ch13.adb (Analyze_Aspect_Specifications): Convert aspect
7466 Global into a pragma without any form of legality checks. The
7467 work is done by Analyze_Pragma. The aspect and pragma are both
7468 marked as needing delayed processing. Insert the corresponding
7469 pragma of aspect Abstract_State in the visible declarations of the
7471 (Check_Aspect_At_Freeze_Point): Aspect Global
7472 does not need processing even though it is marked as delayed.
7473 Alphabetize the list on aspect names.
7474 * sem_prag.adb: Add a value for pragma Global in table Sig_Flags.
7475 (Analyze_Pragma): Add ??? comment about the grammar of pragma
7476 Abstract_State. Move the error location from the pragma to the
7477 state to improve the quality of error placement. Add legality
7478 checks for pragma Global.
7479 * snames.ads-tmpl Add the following specially recognized names
7481 2013-01-04 Eric Botcazou <ebotcazou@adacore.com>
7483 * sem_ch3.adb: Fix minor typo.
7485 2013-01-04 Ed Schonberg <schonberg@adacore.com>
7487 * par-ch13.adb (Aspect_Specifications_Present): In Strict mode,
7488 accept an aspect name followed by a comma, indicating a defaulted
7491 2013-01-04 Joel Brobecker <brobecker@adacore.com>
7493 * gnat_ugn.texi: Document procedure to codesign GDB on Darwin.
7494 Update doc on gnattest --separates switch.
7496 2013-01-04 Thomas Quinot <quinot@adacore.com>
7498 * s-chepoo.ads: Minor reformatting.
7500 2013-01-04 Arnaud Charlet <charlet@adacore.com>
7502 * usage.adb: Remove mention of -gnatN in usage.
7504 2013-01-04 Robert Dewar <dewar@adacore.com>
7506 * exp_prag.adb, gnatcmd.adb, exp_util.adb, table.adb, sem_prag.adb,
7507 freeze.adb, sem_ch4.adb, sem_warn.adb, opt.ads, exp_aggr.adb,
7508 prj-conf.adb, sem_ch13.adb: Minor reformatting.
7510 2013-01-04 Thomas Quinot <quinot@adacore.com>
7512 * sinfo.ads: Minor documentation update.
7514 2013-01-04 Thomas Quinot <quinot@adacore.com>
7516 * sem_ch3.adb, einfo.adb (Analyze_Object_Declaration): Do not set Ekind
7517 before resolving initialization expression.
7519 2013-01-04 Hristian Kirtchev <kirtchev@adacore.com>
7521 * checks.adb (Generate_Index_Checks): Delay the generation of
7522 the check for an indexed component where the prefix mentions
7523 Loop_Entry until the attribute has been properly expanded.
7524 * exp_ch5.adb (Expand_Loop_Entry_Attributes): Perform minor
7525 decoration of the constant that captures the value of Loop_Entry's
7526 prefix at the entry point into a loop. Generate index checks
7527 for an attribute reference that has been transformed into an
7530 2013-01-04 Thomas Quinot <quinot@adacore.com>
7532 * exp_prag.adb, exp_util.adb, exp_util.ads, freeze.adb, exp_aggr.adb,
7533 sem_ch13.adb (Exp_Aggr.Collect_Initialization_Statements): Nothing to
7534 do if Obj is already frozen.
7535 (Exp_Util.Find_Init_Call): Rename to...
7536 (Exp_Util.Remove_Init_Call): New subprogram, renamed from
7537 Find_Init_Call. Remove the initialization call from the enclosing
7538 list if found, and if it is from an Initialization_Statements
7539 attribute, reset it.
7540 (Exp_Util.Append_Freeze_Action): Minor code reorganization.
7541 (Exp_Util.Append_Freeze_Actions): Ensure a freeze node has been
7542 allocated (as is already done in Append_Freeze_Action).
7543 (Freeze.Freeze_Entity): For an object with captured
7544 Initialization_Statements and non-delayed freezeing, unwrap the
7545 initialization statements and insert and them directly in the
7547 (Sem_Ch13.Check_Address_Clause): For an object
7548 with Initialization_Statements and an address clause, unwrap the
7549 initialization statements when moving them to the freeze actions.
7551 2013-01-03 Pascal Obry <obry@adacore.com>
7553 * prj-attr.adb, projects.texi, snames.ads-tmpl: Add package remote and
7554 corresponding attibutes.
7556 2013-01-03 Thomas Quinot <quinot@adacore.com>
7558 * exp_aggr.adb: Minor comment improvement.
7560 2013-01-03 Hristian Kirtchev <kirtchev@adacore.com>
7562 * aspects.adb, aspects.ads: Add Aspect_Abstract_State to all the
7564 * einfo.ads, einfo.adb: Add Integrity_Level and Refined_State to
7565 the description of fields (Abstract_States): New routine.
7566 (Integrity_Level): New routine.
7567 (Has_Property): New routine.
7568 (Is_Input_State): New routine.
7569 (Is_Null_State): New routine.
7570 (Is_Output_State): New routine.
7571 (Is_Volatile_State): New routine.
7572 (Refined_State): New routine.
7573 (Set_Abstract_States): New routine.
7574 (Set_Integrity_Level): New routine.
7575 (Set_Refined_State): New routine.
7576 (Write_Field8_Name): Add proper output for E_Abstract_State.
7577 (Write_Field9_Name): Add proper output for E_Abstract_State.
7578 (Write_Field25_Name): Add proper output for E_Package.
7579 * lib-xref.ads: Add new letter for an abstract state.
7580 * par-prag.adb: Add pragma Abstract_State to the list of pragma
7581 that do not need special processing by the parser.
7582 * sem_ch13.adb (Analyze_Aspect_Specifications): Convert
7583 aspect Abstract_State into a pragma without any form
7584 of legality checks. The work is done by Analyze_Pragma.
7585 (Check_Aspect_At_Freeze_Point): Aspect Abstract_State does not
7586 require delayed analysis.
7587 * sem_prag.adb: Add a value for pragma Abstract_State in table
7589 (Analyze_Pragma): Add legality checks for pragma
7590 Abstract_State. Analysis of individual states introduces a state
7591 abstraction entity into the visibility chain.
7592 * snames.ads-tmpl: Add new names for abstract state and
7593 integrity. Add new pragma id for abstract state.
7595 2013-01-03 Bob Duff <duff@adacore.com>
7597 * table.adb (Reallocate): Calculate new Length in
7598 Long_Integer to avoid overflow.
7600 2013-01-03 Thomas Quinot <quinot@adacore.com>
7602 * sem_ch3.adb, sinfo.ads, freeze.adb, sem_ch4.adb, exp_aggr.adb
7603 (Sem_Ch3.Analyze_Object_Declaration): Set Ekind early so that
7604 it is set properly when expanding the initialization expression.
7605 (Freeze.Check_Address_Clause): Transfer initialization expression
7606 to an assignment in the freeze actions, so that the object is
7607 initialized only after being elaborated by GIGI.
7608 (Sinfo (comments), Sem_Ch4.Analyze_Expression_With_Actions): Allow
7609 a Null_Statement as the expression in an Expression_With_Actions.
7610 (Exp_Aggr.Collect_Initialization_Statements): New subprogram
7611 shared by expansion of record and array aggregates, used to
7612 capture statements for an aggregate used to initalize an object
7613 into an Expression_With_Actions (which acts as a container for
7615 (Exp_Aggr.Convert_Aggr_In_Obj_Decl): Use the above to
7616 capture initialization statements, instead of the previously
7617 existing loop which left freeze nodes out of the capturing
7618 construct (causing out of order elaboration crashes in GIGI).
7619 (Exp_Aggr.Expand_Array_Aggregate): Use the above to capture
7620 initialization statements (this was previously not done for
7621 arrays). Also do not unconditionally prevent in place expansion
7622 for an object with address clause.
7624 2013-01-03 Thomas Quinot <quinot@adacore.com>
7626 * gnat_rm.texi, freeze.adb (Check_Component_Storage_Order): Check that
7627 a record extension has the same scalar storage order as the parent type.
7629 2013-01-03 Thomas Quinot <quinot@adacore.com>
7631 * exp_ch4.adb: Add comment.
7633 2013-01-03 Vincent Celier <celier@adacore.com>
7635 * prj.adb: Minor spelling error correction in comment.
7637 2013-01-03 Vincent Celier <celier@adacore.com>
7639 * gnatcmd.adb (GNATCmd): If a single main has been specified
7640 as an absolute path, use its simple file name to find specific
7641 switches, instead of the absolute path.
7643 2013-01-03 Javier Miranda <miranda@adacore.com>
7645 * sem_warn.adb (Warn_On_Overlapping_Actuals): For overlapping
7646 parameters that are record types or array types generate warnings
7647 only compiling under -gnatw.i
7648 * opt.ads (Extensions_Allowed): Restore previous documentation.
7650 2013-01-03 Vincent Celier <celier@adacore.com>
7652 * prj-conf.adb (Do_Autoconf): If Target is specified in the
7653 main project, but not on the command line, use the Target in
7654 the project to invoke gprconfig in auto-configuration.
7655 * makeutl.ads (Default_Config_Name): New constant String.
7657 2013-01-03 Arnaud Charlet <charlet@adacore.com>
7659 * usage.adb: Minor: fix typo in usage.
7661 2013-01-03 Thomas Quinot <quinot@adacore.com>
7663 * sem_ch13.adb (Analyze_Record_Representation_Clause): Reject
7664 an illegal component clause for an inherited component in a
7667 2013-01-03 Emmanuel Briot <briot@adacore.com>
7669 * xref_lib.adb (Parse_Identifier_Info): Fix handling of arrays, which
7670 have information in the ALI file for both the index and the component
7673 2013-01-03 Emmanuel Briot <briot@adacore.com>
7675 * projects.texi: Fix error in documenting the project path
7676 computed for an aggregate project.
7678 2013-01-03 Javier Miranda <miranda@adacore.com>
7680 * sem_warn.adb (Warn_On_Overlapping_Actuals): Adding documentation
7681 plus restricting the functionality of this routine to cover the
7682 cases described in the Ada 2012 reference manual. The previous
7683 extended support is now available under -gnatX.
7684 * s-tassta.adb (Finalize_Global_Tasks): Addition of a dummy
7685 variable to call Timed_Sleep. Required to avoid warning on
7686 overlapping out-mode actuals.
7687 * opt.ads (Extensions_Allowed): Update documentation.
7689 2013-01-03 Tristan Gingold <gingold@adacore.com>
7691 * s-arit64.ads: Use Multiply_With_Ovflo_Check as __gnat_mulv64.
7693 * gcc-interface/Makefile.in: Remove reference to arit64.c.
7695 2013-01-03 Thomas Quinot <quinot@adacore.com>
7697 * checks.adb, checks.ads (Apply_Address_Clause_Check): The check must
7698 be generated at the start of the freeze actions for the entity, not
7699 before (or after) the freeze node.
7701 2013-01-03 Thomas Quinot <quinot@adacore.com>
7703 * exp_aggr.adb (Exp_Aggr.Convert_Aggregate_In_Obj_Decl):
7704 Reorganize code to capture initialization statements in a block,
7705 so that freeze nodes are excluded from the captured block.
7707 2013-01-03 Thomas Quinot <quinot@adacore.com>
7709 * exp_ch11.adb: Minor reformatting.
7711 2013-01-03 Thomas Quinot <quinot@adacore.com>
7713 * exp_util.adb, einfo.adb, einfo.ads, freeze.adb, exp_aggr.adb,
7714 sem_ch13.adb (Einfo.Initialization_Statements,
7715 Einfo.Set_Initialization_Statements): New entity attribute
7717 (Exp_Util.Find_Init_Call): Handle case of an object initialized
7718 by an aggregate converted to a block of assignment statements.
7719 (Freeze.Check_Address_Clause): Do not clear Has_Delayed_Freeze
7720 even for objects that require a constant address, because the
7721 address expression might involve entities that have yet to be
7722 elaborated at the point of the object declaration.
7723 (Exp_Aggr.Convert_Aggregate_In_Obj_Decl): For a type that does
7724 not require a transient scope, capture the assignment statements
7725 in a block so that they can be moved down after elaboration of
7726 an address clause if needed.
7727 (Sem_Ch13.Check_Constant_Address_Clause.Check_Expr_Constants,
7728 case N_Unchecked_Conversion): Do not replace operand subtype with
7729 its base type as this violates a GIGI invariant if the operand
7730 is an identifier (in which case the etype of the identifier
7731 is expected to be equal to that of the denoted entity).
7733 2013-01-03 Javier Miranda <miranda@adacore.com>
7735 * sem_util.ads, sem_util.adb (Denotes_Same_Object): Extend the
7736 functionality of this routine to cover cases described in the Ada 2012
7739 2013-01-03 Ed Schonberg <schonberg@adacore.com>
7741 * sem_elab.adb (Set_Elaboration_Constraint): Handle properly
7742 a 'Access attribute reference when the subprogram is called
7745 2013-01-03 Arnaud Charlet <charlet@adacore.com>
7747 * s-tpobop.adb (PO_Do_Or_Queue): Refine assertion, since a
7748 select statement may be called from a controlled (e.g. Initialize)
7749 operation and have abort always deferred.
7751 2013-01-03 Robert Dewar <dewar@adacore.com>
7753 * sem_ch8.adb, einfo.ads, einfo.adb: Minor code reorganization.
7755 2013-01-03 Javier Miranda <miranda@adacore.com>
7757 * exp_ch3.adb (Make_Controlling_Function_Wrappers): Exclude
7758 internal entities associated with interfaces and add minimum
7759 decoration to the defining entity of the generated wrapper to
7760 allow overriding interface primitives.
7761 * sem_disp.ads (Override_Dispatching_Operation): Addition of a
7762 new formal (Is_Wrapper).
7763 * sem_disp.adb (Override_Dispatching_Operation): When overriding
7764 interface primitives the new formal helps identifying that the
7765 new operation is not fully decorated.
7767 2013-01-03 Thomas Quinot <quinot@adacore.com>
7769 * sem_ch7.adb, sem_ch10.adb, einfo.adb, einfo.ads, sem_ch12.adb,
7770 rtsfind.adb, sem_elab.adb, sem_ch4.adb, sem_ch8.adb
7771 (Einfo.Is_Visible_Child_Unit, Einfo.Set_Is_Visible_Child_Unit):
7772 Rename to Is_Visible_Lib_Unit, Set_Is_Visible_Lib_Unit, and
7773 update spec accordingly (now also applies to root library units).
7774 (Sem_Ch10.Analyze_Subunit.Analyze_Subunit_Context): Toggle above flag
7775 on root library units, not only child units.
7776 (Sem_Ch10.Install[_Limited]_Withed_Unit): Same.
7777 (Sem_Ch10.Remove_Unit_From_Visibility): Reset Is_Visible_Lib_Unit
7778 even for root library units.
7779 (Sem_Ch8.Find_Expanded_Name): A selected component form whose prefix is
7780 Standard is an expanded name for a root library unit.
7782 2013-01-03 Thomas Quinot <quinot@adacore.com>
7784 * exp_ch3.adb: Minor reformatting.
7786 2013-01-03 Olivier Hainque <hainque@adacore.com>
7788 * tracebak.c: Reinstate changes to support ppc-lynx178.
7790 2013-01-03 Ed Schonberg <schonberg@adacore.com>
7792 * atree.ads: Minor reformatting and documentation enhancement.
7794 2013-01-03 Ed Schonberg <schonberg@adacore.com>
7796 * exp_ch3.adb (Expand_N_Object_Declaration): If the object has
7797 a class-wide type and a renaming declaration is created for it,
7798 preserve entity chain, which already contains generated internal
7799 types. This ensures that freezing actions are properly generated
7800 for all objects declared subsequently in the same scope, and
7801 that debugging information is generated for them.
7802 * sem_util.adb, sem_util.ads (we): New debugging routine, to
7803 display entity chain of a given scope.
7805 2013-01-03 Robert Dewar <dewar@adacore.com>
7807 * exp_intr.adb: Minor reformatting.
7809 2013-01-03 Robert Dewar <dewar@adacore.com>
7811 * einfo.adb: Minor reformatting.
7813 2013-01-03 Pascal Obry <obry@adacore.com>
7815 * adaint.c, adaint.h (__gnat_get_module_name): Removed.
7816 (__gnat_is_module_name_supported): Removed.
7817 * s-win32.ads: Add some needed definitions.
7818 * g-trasym.ads: Update comments.
7820 2013-01-03 Robert Dewar <dewar@adacore.com>
7822 * layout.adb (Set_Composite_Alignment): Fix problems of
7823 interactions with Optimize_Alignment set to Space.
7825 2013-01-03 Thomas Quinot <quinot@adacore.com>
7827 * exp_disp.adb: Minor reformatting.
7829 2013-01-02 Richard Biener <rguenther@suse.de>
7832 * gcc-interface/Makefile.in: Add $(GMPINC) to includes.
7834 2013-01-02 Thomas Quinot <quinot@adacore.com>
7836 * exp_intr.adb (Expand_Dispatching_Constructor_Call): Remove
7837 side effects from Tag_Arg early, doing it too late may cause a
7838 crash due to inconsistent Parent link.
7839 * sem_ch8.adb, einfo.ads: Minor reformatting.
7841 2013-01-02 Robert Dewar <dewar@adacore.com>
7843 * einfo.ads, einfo.adb (Has_Independent_Components): New flag.
7844 * freeze.adb (Size_Known): We do not know the size of a packed
7845 record if it has atomic components, by reference type components,
7846 or independent components.
7847 * sem_prag.adb (Analyze_Pragma, case Independent_Components): Set new
7848 flag Has_Independent_Components.
7850 2013-01-02 Yannick Moy <moy@adacore.com>
7852 * opt.ads (Warn_On_Suspicious_Contract): Set to True by default.
7853 * usage.adb (Usage): Update usage message.
7855 2013-01-02 Pascal Obry <obry@adacore.com>
7857 * adaint.c (__gnat_is_module_name_supported): New constant.
7859 2013-01-02 Ed Schonberg <schonberg@adacore.com>
7861 * sem_attr.adb (Check_Array_Type): Reject an attribute reference on an
7862 array whose component type does not have a completion.
7864 2013-01-02 Geert Bosch <bosch@adacore.com>
7866 * a-nllcef.ads, a-nlcefu.ads, a-nscefu.ads: Make Pure.
7868 2013-01-02 Robert Dewar <dewar@adacore.com>
7870 * par_sco.adb: Minor reformatting.
7872 2013-01-02 Javier Miranda <miranda@adacore.com>
7874 * sem_aggr.adb (Resolve_Array_Aggregate): Remove dead code.
7876 2013-01-02 Olivier Hainque <hainque@adacore.com>
7878 * a-exctra.ads (Get_PC): New function.
7880 2013-01-02 Thomas Quinot <quinot@adacore.com>
7882 * sem_ch8.adb: Minor reformatting.
7884 2013-01-02 Thomas Quinot <quinot@adacore.com>
7886 * sem_ch7.adb: Minor reformatting.
7888 2013-01-02 Thomas Quinot <quinot@adacore.com>
7890 * freeze.adb (Check_Component_Storage_Order): Do not crash on
7893 2013-01-02 Robert Dewar <dewar@adacore.com>
7895 * gnat1drv.adb, targparm.adb, targparm.ads: Minor name change: add
7896 On_Target to Atomic_Sync_Default.
7898 2013-01-02 Robert Dewar <dewar@adacore.com>
7900 * sem_warn.adb (Warn_On_Known_Condition): Suppress warning for
7901 comparison of attribute result with constant
7902 * a-ststio.adb, s-direio.adb, s-rannum.adb: Remove unnecessary pragma
7903 Warnings (Off, "..");
7905 2013-01-02 Yannick Moy <moy@adacore.com>
7907 * sem_prag.ads: Minor correction of comment.
7909 2013-01-02 Thomas Quinot <quinot@adacore.com>
7911 * par_sco.adb (Traverse_Package_Declaration): The first
7912 declaration in a nested package is dominated by the preceding
7913 declaration in the enclosing scope.
7915 2013-01-02 Pascal Obry <obry@adacore.com>
7917 * adaint.c, adaint.h (__gnat_get_module_name): Return the actual
7918 module containing a given address.
7920 2013-01-02 Thomas Quinot <quinot@adacore.com>
7922 * sem_ch3.adb: Minor reformatting.
7924 2013-01-02 Pascal Obry <obry@adacore.com>
7926 * cstreams.c (__gnat_ftell64): New routine. Use _ftelli64 on
7927 Win64 and default to ftell on other platforms.
7928 (__gnat_fsek64): Likewise.
7929 * i-cstrea.ads: Add fssek64 and ftell64 specs.
7930 * s-crtl.ads: Likewise.
7931 * a-ststio.adb, s-direio.adb (Size): Use 64 bits version when required.
7932 (Set_Position): Likewise.
7934 2013-01-02 Thomas Quinot <quinot@adacore.com>
7936 * par_sco.adb: Generate X SCOs for default expressions in
7937 subprogram body stubs. Do not generate any SCO for package,
7938 task, or protected body stubs.
7940 2013-01-02 Ed Schonberg <schonberg@adacore.com>
7942 * sem_ch3.adb: Further improvement to ASIS mode for anonymous
7943 access to protected subprograms.
7945 2013-01-02 Robert Dewar <dewar@adacore.com>
7947 * par_sco.adb, vms_data.ads: Minor reformatting.
7949 2013-01-02 Thomas Quinot <quinot@adacore.com>
7951 * par_sco.adb (Traverse_Declarations_Or_Statement): Function
7952 form, returning value of Current_Dominant upon exit, for chaining
7954 (Traverse_Declarations_Or_Statement.Traverse_One, case
7955 N_Block_Statement): First statement is dominated by last declaration.
7956 (Traverse_Subprogram_Or_Task_Body): Ditto.
7957 (Traverse_Package_Declaration): First private
7958 declaration is dominated by last visible declaration.
7959 (Traverse_Sync_Definition): Ditto.
7961 2013-01-02 Thomas Quinot <quinot@adacore.com>
7963 * gnat_rm.texi: Restrict the requirement for Scalar_Storage_Order
7964 matching Bit_Order to record types only, since array types do not
7967 2013-01-02 Vincent Celier <celier@adacore.com>
7969 * gnat_ugn.texi: Remove documentation of -gnateO, which is an
7971 * usage.adb: Indicate that -gnateO is an internal switch.
7973 2013-01-02 Thomas Quinot <quinot@adacore.com>
7975 * par_sco.adb: Add SCO generation for task types and single
7977 * get_scos.adb: When adding an instance table entry for a
7978 non-nested instantiation, make sure the Enclosing_Instance is
7981 2013-01-02 Hristian Kirtchev <kirtchev@adacore.com>
7983 * sem_attr.adb (Analyze_Attribute): Skip the special _Parent
7984 scope generated for subprogram inlining purposes while trying
7985 to locate the enclosing function.
7986 * sem_prag.adb (Analyze_Pragma): Preanalyze the boolean
7987 expression of pragma Postcondition when the pragma comes from
7988 source and appears inside a subprogram body.
7990 2013-01-02 Thomas Quinot <quinot@adacore.com>
7992 * switch-c.adb, fe.h, back_end.adb: Enable generation of instantiation
7993 information in debug info unconditionally when using -fdump-scos,
7994 instead of relying on a separate command line switch -fdebug-instances.
7995 * gcc-interface/Make-lang.in: Update dependencies.
7997 2013-01-02 Ed Schonberg <schonberg@adacore.com>
7999 * sem_ch12.adb: Additional refinement of predicate.
8001 2013-01-02 Vincent Celier <celier@adacore.com>
8003 * vms_data.ads: Remove incorrect spaces at end of descriptions
8004 of qualifiers for single switch.
8006 2013-01-02 Ben Brosgol <brosgol@adacore.com>
8008 * gnat_rm.texi: Minor edits / wordsmithing in section on pragma
8009 Check_Float_Overflow.
8011 2013-01-02 Thomas Quinot <quinot@adacore.com>
8013 * sprint.adb (Sprint_Node_Actual): Do not add extra parens for
8014 a conditional expression (CASE or IF expression) that already
8015 has parens. Also omit ELSE keyword for an IF expression without
8018 2013-01-02 Thomas Quinot <quinot@adacore.com>
8020 * gnat1drv.adb (Adjust_Global_Switches): Adjust back-end
8021 flag_debug_instances here, after front-end switches have been
8024 2013-01-02 Vincent Celier <celier@adacore.com>
8026 * usage.adb: Minor reformatting.
8028 2013-01-02 Arnaud Charlet <charlet@adacore.com>
8030 * opt.ads: Fix typo.
8032 2013-01-02 Thomas Quinot <quinot@adacore.com>
8034 * par_sco.adb: Generate P decision SCOs for SPARK pragmas
8035 Assume and Loop_Invariant.
8037 2013-01-02 Robert Dewar <dewar@adacore.com>
8039 * vms_data.ads: Add entry for Float_Check_Valid (-gnateF).
8040 * ug_words: Add entry for Float_Check_Overflow.
8041 * usage.adb: Minor reformatting.
8042 * gnat_ugn.texi: Add documentation for -gnateF (Check_Float_Overflow).
8044 2013-01-02 Vincent Celier <celier@adacore.com>
8046 * gnat_ugn.texi: Add documentation for switches -gnateA, -gnated,
8047 -gnateO=, -gnatet and -gnateV.
8048 * ug_words: Add qualifiers equivalent to -gnateA, -gnated,
8049 -gnatet and -gnateV.
8050 * usage.adb: Add lines for -gnatea, -gnateO and -gnatez.
8051 * vms_data.ads: Add new compiler qualifiers /ALIASING_CHECK
8052 (-gnateA), /DISABLE_ATOMIC_SYNCHRONIZATION (-gnated),
8053 /PARAMETER_VALIDITY_CHECK (-gnateV) and /TARGET_DEPENDENT_INFO
8056 2013-01-02 Robert Dewar <dewar@adacore.com>
8058 * checks.adb (Apply_Scalar_Range_Check): Implement Check_Float_Overflow.
8059 * opt.ads, opt.adb: Handle flags Check_Float_Overflow[_Config].
8060 * par-prag.adb: Add dummy entry for pragma Check_Float_Overflow.
8061 * sem_prag.adb: Implement pragma Check_Float_Overflow.
8062 * snames.ads-tmpl: Add entries for pragma Check_Float_Overflow.
8063 * switch-c.adb: Recognize -gnateF switch.
8064 * tree_io.ads: Update ASIS version number.
8065 * gnat_rm.texi: Add documentation of pragma Check_Float_Overflow.
8067 2013-01-02 Robert Dewar <dewar@adacore.com>
8069 * checks.adb, exp_ch4.adb, exp_ch6.adb, exp_ch7.adb, exp_ch9.adb,
8070 exp_disp.adb, exp_dist.adb, exp_intr.adb, exp_prag.adb, exp_util.adb,
8071 freeze.adb, gnat1drv.adb, inline.adb, layout.adb, lib-xref.adb,
8072 par-ch10.adb, par-labl.adb, par-load.adb, par-util.adb, restrict.adb,
8073 sem_ch13.adb, sem_ch4.adb, sem_ch6.adb, sem_dim.adb, sem_elab.adb,
8074 sem_res.adb, sem_warn.adb, sinput-l.adb: Add tags to warning messages.
8075 * sem_ch6.ads, warnsw.ads, opt.ads: Minor comment updates.
8077 2013-01-02 Robert Dewar <dewar@adacore.com>
8079 * err_vars.ads: Minor comment fix.
8081 2013-01-02 Ed Schonberg <schonberg@adacore.com>
8083 * sem_ch12.adb: Refine predicate.
8085 2013-01-02 Robert Dewar <dewar@adacore.com>
8087 * errout.ads: Minor comment fixes.
8088 * opt.ads: Minor comment additions.
8089 * exp_aggr.adb: Add tags to warning messages
8090 * exp_ch11.adb, exp_ch3.adb, exp_ch4.adb, exp_util.adb, sem_aggr.adb,
8091 sem_attr.adb, sem_case.adb, sem_cat.adb, sem_ch3.adb, sem_ch4.adb,
8092 sem_ch5.adb, sem_disp.adb, sem_dist.adb, sem_elab.adb, sem_eval.adb,
8093 sem_intr.adb, sem_mech.adb, sem_prag.adb, sem_res.adb, sem_util.adb,
8094 sem_warn.adb: Add tags to warning messages
8096 2013-01-02 Doug Rupp <rupp@adacore.com>
8098 * init.c [VMS] Remove subtest on reason mask for ACCVIO that is a C_E.
8100 2013-01-02 Ed Schonberg <schonberg@adacore.com>
8102 * sem_ch12.adb: Recover source name for renamed packagea.
8104 2013-01-02 Robert Dewar <dewar@adacore.com>
8106 * errout.adb (Set_Msg_Insertion_Warning): Correct typo causing
8107 tests to fail if insertion sequence is at end of message string.
8108 * opt.ads: Minor comment fixes and additions.
8109 * sem_ch7.adb, sem_ch8.adb, sem_ch9.adb, sem_ch10.adb, sem_ch11.adb,
8110 sem_ch12.adb, sem_ch13.adb: Add tags to warning messages.
8111 * sem_ch6.ads, sem_ch6.adb (Cannot_Inline): Deal with warning message
8112 tags. Add tags to warning messages.
8114 2013-01-02 Robert Dewar <dewar@adacore.com>
8116 * err_vars.ads (Warning_Doc_Switch): New flag.
8117 * errout.adb (Error_Msg_Internal): Implement new warning flag
8118 doc tag stuff (Set_Msg_Insertion_Warning): New procedure.
8119 * errout.ads: Document new insertion sequences ?? ?x? ?.x?
8120 * erroutc.adb (Output_Msg_Text): Handle ?? and ?x? warning doc
8122 * erroutc.ads (Warning_Msg_Char): New variable.
8123 (Warn_Chr): New field in error message object.
8124 * errutil.adb (Error_Msg): Set Warn_Chr in error message object.
8125 * sem_ch13.adb: Minor reformatting.
8126 * warnsw.adb: Add handling for -gnatw.d and -gnatw.D
8127 (Warning_Doc_Switch).
8128 * warnsw.ads: Add handling of -gnatw.d/.D switches (warning
8131 2013-01-02 Robert Dewar <dewar@adacore.com>
8133 * opt.ads: Minor reformatting.
8135 2013-01-02 Doug Rupp <rupp@adacore.com>
8137 * init.c: Reorganize VMS section.
8138 (scan_condtions): New function for scanning condition tables.
8139 (__gnat_handle_vms_condtion): Use actual exception name for imported
8140 exceptions vice IMPORTED_EXCEPTION.
8141 Move condition table scanning into separate function. Move formerly
8142 special handled conditions to system condition table. Use SYS$PUTMSG
8143 output to fill exception message field for formally special handled
8144 condtions, in particular HPARITH to provide more clues about cause and
8145 location then raised from the translated image.
8147 2013-01-02 Thomas Quinot <quinot@adacore.com>
8149 * sem_ch13.adb (Analyze_Aspect_Specifications): For a Pre/Post
8150 aspect that applies to a library subprogram, prepend corresponding
8151 pragma to the Pragmas_After list, in order for split AND THEN
8152 sections to be processed in the expected order.
8154 2013-01-02 Thomas Quinot <quinot@adacore.com>
8156 * exp_prag.adb (Expand_Pragma_Check): The statements generated
8157 for the pragma must have the sloc of the pragma, not the
8158 sloc of the condition, otherwise this creates anomalies in the
8159 generated debug information that confuse coverage analysis tools.
8161 2013-01-02 Thomas Quinot <quinot@adacore.com>
8163 * sem_ch13.adb: Minor reformatting.
8165 2013-01-02 Arnaud Charlet <charlet@adacore.com>
8167 * g-excact.ads (Core_Dump): Clarify that this subprogram does
8168 not dump cores under Windows.
8170 2013-01-02 Ed Schonberg <schonberg@adacore.com>
8172 * sem_ch8.adb (Analyze_Primitive_Renamed_Operation): The prefixed
8173 view of a subprogram has convention Intrnnsic, and a renaming
8174 of a prefixed view cannot be the prefix of an Access attribute.
8176 2013-01-02 Robert Dewar <dewar@adacore.com>
8178 * restrict.adb: Minor reformatting.
8180 2013-01-02 Thomas Quinot <quinot@adacore.com>
8182 * exp_prag.adb: Minor reformatting.
8184 2013-01-02 Ed Schonberg <schonberg@adacore.com>
8186 * sem_ch12.adb (Get_Associated_Node): If the node is an
8187 identifier that denotes an unconstrained array in an object
8188 declaration, it is rewritten as the name of an anonymous
8189 subtype whose bounds are given by the initial expression in the
8190 declaration. When checking whether that identifier is global
8191 reference, use the original node, not the local generated subtype.
8193 2013-01-02 Olivier Hainque <hainque@adacore.com>
8195 * tracebak.c: Revert previous change, incomplete.
8197 2013-01-02 Ed Schonberg <schonberg@adacore.com>
8199 * sem_ch13.adb (Analyze_Aspect_Specifications): If the aspect
8200 appears on a subprogram body that acts as a spec, place the
8201 corresponding pragma in the declarations of the body, so that
8202 e.g. pre/postcondition checks can be generated appropriately.
8204 2013-01-02 Robert Dewar <dewar@adacore.com>
8206 * sem_ch3.adb: Minor reformatting and code reorganization.
8208 2013-01-02 Vincent Celier <celier@adacore.com>
8210 * switch-m.adb (Normalize_Compiler_Switches): Record the
8211 complete switch -fstack-check=specific instead of its shorter
8212 alias -fstack-check.
8214 2013-01-02 Ed Schonberg <schonberg@adacore.com>
8216 * sem_ch3.adb (Derive_Subprogram): Enforce RM 6.3.1 (8):
8217 if the derived type is a tagged generic formal type with
8218 unknown discriminants, the inherited operation has convention
8219 Intrinsic. As such, the 'Access attribute cannot be applied to it.
8221 2013-01-02 Thomas Quinot <quinot@adacore.com>
8223 * sem_attr.adb: Minor reformatting.
8225 2013-01-02 Thomas Quinot <quinot@adacore.com>
8227 * par_sco.adb: Add SCO generation for S of protected types and
8228 single protected object declarations.
8230 2013-01-02 Robert Dewar <dewar@adacore.com>
8232 * sem_eval.adb, osint.ads: Minor reformatting.
8234 2013-01-02 Hristian Kirtchev <kirtchev@adacore.com>
8236 * sem_prag.adb (Analyze_Pragma): Check the legality of pragma Assume.
8238 2013-01-02 Thomas Quinot <quinot@adacore.com>
8240 * sem_eval.adb (Compile_Time_Compare): For static operands, we
8241 can perform a compile time comparison even if in preanalysis mode.
8243 2013-01-02 Thomas Quinot <quinot@adacore.com>
8245 * par_sco.adb (SCO_Record): Always use
8246 Traverse_Declarations_Or_Statements to process the library level
8247 declaration, so that SCOs are properly generated for its aspects.
8249 2013-01-02 Thomas Quinot <quinot@adacore.com>
8251 * scos.ads (In_Decision): Add missing entry for 'a'.
8252 * sem_prag.adb (Analyze_Pragma, case pragma Check): Omit
8253 call to Set_SCO_Pragma_Enabled for Invariant and Predicate.
8254 * sem_ch13.adb: Minor comment update.
8256 Copyright (C) 2013 Free Software Foundation, Inc.
8258 Copying and distribution of this file, with or without modification,
8259 are permitted in any medium without royalty provided the copyright
8260 notice and this notice are preserved.