1 2014-07-29 Robert Dewar <dewar@adacore.com>
3 * sem_prag.adb (Analyze_Pragma, case Allow_Integer_Address):
4 Fix incorrect RTE call which caused bomb if pragma was in
5 configuration pragma file.
7 2014-07-29 Jerome Lambourg <lambourg@adacore.com>
9 * expect.c (__gnat_expect_poll): Fix typo in previous change.
10 * g-expect.adb: Update comments.
12 2014-07-29 Arnaud Charlet <charlet@adacore.com>
14 * s-parame-hpux.ads, s-parame-vms-ia64.ads, s-parame.ads
15 (Default_Attribute_Count): Bump to 16 on native platforms.
17 2014-07-29 Ed Schonberg <schonberg@adacore.com>
19 * sem_res.adb: Add guard to front-end inlining for SPARK.
21 2014-07-29 Robert Dewar <dewar@adacore.com>
23 * sem_ch10.adb, debug.adb, sem_prag.adb, sem_res.adb, sem_ch6.adb:
26 2014-07-29 Ed Schonberg <schonberg@adacore.com>
28 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Build body to
29 inline in GNATprove mode when subprogran is marked Inline_Always.
30 * sem_res.adb (Resolve_Call): Expand call in place in GNATProve
31 mode if body to inline is available.
32 * sem_prag.adb (Analyze_Pragma, case Inline_Always): Make pragma
33 effective in GNATprove mode.
34 * sem_ch10.adb (Analyze_Compilation_Unit): Call
35 Check_Package_Body_For_Inlining in GNATprove mode, so that body
36 containing subprograms with Inline_Always can be available before
39 2014-07-29 Ed Schonberg <schonberg@adacore.com>
41 * inline.ads, inline.adb, sem_ch10.adb: Rename Check_Body_For_Inlining
42 to Check_Package_Body_For_Inlining, to prevent confusion with other
45 2014-07-29 Robert Dewar <dewar@adacore.com>
47 * opt.ads: Minor comment update.
48 * sem_attr.adb (Uneval_Old_Msg): Deal with case of aspect, where
49 we want setting of Uneval_Old at time of encountering the aspect.
50 * sem_ch13.adb (Analyze_Aspect_Specifications): Capture setting
52 * sinfo.adb (Uneval_Old_Accept): New function (Uneval_Old_Warn):
53 New function (Set_Uneval_Old_Accept): New procedure.
54 (Set_Uneval_Old_Warn): New procedure.
55 * sinfo.ads: Uneval_Old_Accept: New flag Uneval_Old_Warn: New flag.
57 2014-07-29 Robert Dewar <dewar@adacore.com>
59 * sinfo.ads, inline.adb, inline.ads, sem_ch6.adb: Minor reformatting.
60 * snames.ads-tmpl: Minor reformatting.
61 * xsnamest.adb (XSnamesT): Remove special casing of Name_Error
62 to give <Error>. Not clear why this was there, but the compiler
63 sources do not reference Name_Error, and this interfered with
64 the circuits for pragma Unevaluated_Use_Of_Old.
66 2014-07-29 Hristian Kirtchev <kirtchev@adacore.com>
68 * sem_prag.adb (Process_Atomic_Shared_Volatile): Allow volatile
69 types in SPARK 2014 (again).
70 * sem_res.adb (Is_OK_Volatile_Context): New routine.
71 (Resolve_Entity_Name): Ensure that a volatile object with
72 enabled properties Async_Writers or Effectire_Reads appears in
73 a non-interfering context.
75 2014-07-29 Ed Schonberg <schonberg@adacore.com>
77 * sem_ch6.adb: Move Build_Body_To_Inline,
78 Check_And_Buid_Body_To_Inline, and Cannot_Inline to package Inline.
79 * exp_ch6.adb: Mode Expand_Inlined_Body to package Inline.
80 * inline.ads, inline.adb: Package now contains subprograms that
81 implement front-end inlining. No functional changes, no test
84 2014-07-29 Robert Dewar <dewar@adacore.com>
86 * exp_dbug.adb, g-expect.adb, sem_elab.adb: Minor typo fix.
88 2014-07-29 Ed Schonberg <schonberg@adacore.com>
90 * sem_ch6.adb (Analyze_Return_Type): Reject a return type that
91 is a limited view when the context is a package body, because
92 there is no subsequent place at which the non-limited view may
94 (Process_Formals): Ditto.
95 * sinfo.ads, par-ch3.adb: Minor reformatting.
97 2014-07-29 Jerome Lambourg <lambourg@adacore.com>
99 * expect.c (__gnat_expect_poll): New parameter dead_process
100 used to return the dead process among the array of file
101 descriptors. The Windows, VMS and HPUX implementations now
102 properly report the dead process via this parameter. Other unixes
104 * g-expect.adb (Poll): Adapt to the C profile.
105 (Expect_Internal): Use the new parameter to properly close the
106 File Descriptor. This then can be properly reported by the
107 function First_Dead_Process as is expected.
109 2014-07-29 Robert Dewar <dewar@adacore.com>
111 * gnat_ugn.texi: Minor clarification of -gnatQ switch.
113 2014-07-29 Robert Dewar <dewar@adacore.com>
115 * einfo.adb (Derived_Type_Link): New function
116 (Set_Derived_Type_Link): New procedure.
117 (Write_Field31_Name): Output Derived_Type_Link.
118 * einfo.ads: New field Derived_Type_Link.
119 * exp_ch6.adb (Expand_Call): Warn if change of representation
121 * sem_ch13.adb: Minor addition of ??? comment.
122 (Rep_Item_Too_Late): Warn on case that is legal but could cause an
123 expensive implicit conversion.
124 * sem_ch3.adb (Build_Derived_Type): Set Derived_Type_Link if needed.
126 2014-07-29 Hristian Kirtchev <kirtchev@adacore.com>
128 * exp_ch3.adb (Build_Init_Procedure): Renamed Local_DF_Id
129 to DF_Id. Add new local variable DF_Call. Do not perform any
130 elaboration-related checks on the call to the partial finalization
131 routine within an init proc to avoid generating bogus elaboration
132 warnings on expansion-related code.
133 * sem_elab.adb (Check_A_Call): Move constant Access_Case to
134 the top level of the routine. Ensure that Output_Calls takes
135 into account flags -gnatel and -gnatwl when emitting warnings
137 (Check_Internal_Call_Continue): Update the call to Output_Calls.
138 (Elab_Warning): Moved to the top level of routine Check_A_Call.
139 (Emit): New routines.
140 (Output_Calls): Add new formal parameter Check_Elab_Flag along with a
141 comment on usage. Output all warnings or info messages only when the
142 caller context demands it and the proper elaboration flag is set.
144 2014-07-29 Yannick Moy <moy@adacore.com>
146 * sem_attr.adb (Analyze_Attribute/Attribute_Old):
147 Check rule about Old appearing in potentially unevaluated
148 expression everywhere, not only in Post.
150 2014-07-29 Arnaud Charlet <charlet@adacore.com>
152 * sem_prag.adb: Update comment.
153 * a-except.adb, a-except-2005.adb: Minor editing.
155 2014-07-29 Pierre-Marie Derodat <derodat@adacore.com>
157 * exp_dbug.adb (Debug_Renaming_Declaration):
158 Do not create renaming entities for renamings of non-packed
159 objects and for exceptions.
161 2014-07-29 Robert Dewar <dewar@adacore.com>
163 * sem_ch3.adb, sinfo.ads, types.ads, sem_prag.adb, a-except-2005.adb,
164 sem_ch6.adb, par-ch3.adb: Minor reformatting.
166 2014-07-29 Ed Schonberg <schonberg@adacore.com>
168 * sem_ch6.adb (Check_Return_Subtype_Indication): Reject a return
169 subtype indication in an extended return statement when the
170 return value is an ancestor of the return type of the function,
171 and that return type is a null record extension.
173 2014-07-29 Thomas Quinot <quinot@adacore.com>
175 * sem_ch13.adb (Rep_Item_Too_Late): Specialize/clarify error
176 message produced for the case of a type-related representation
177 item that is made illegal by 13.10(1).
178 * gnat_rm.texi (Scalar_Storage_Order): Minor change in
181 2014-07-29 Robert Dewar <dewar@adacore.com>
183 * gnat_ugn.texi: Add section on Wide_Wide_Character encodings.
184 * erroutc.adb (Output_Error_Msgs): Take wide characters into
185 account in computing position of error flags.
186 * sinput.adb (Get_Column_Number): Take wide characters into
189 2014-07-29 Ed Schonberg <schonberg@adacore.com>
191 * par-ch3.adb (P_Access_Type_Definition): The subtype indication
192 in an access type definition can carry a null_exclusion indicator.
193 * sem_ch3.adb (Access_Type_Declaration): If the subtype indication
194 carries a null_exclusion indicator, verify that the subtype
195 indication denotes an access type, and create a null-excluding
197 * sinfo.ads, sinfo.adb: New attribute Null_Excluding_Subtype,
198 defined on N_Access_To_Object_Definition to indicate that the
199 subtype indication carries a null_exclusion indicator.
201 2014-07-29 Hristian Kirtchev <kirtchev@adacore.com>
203 * exp_ch6.adb (Add_Extra_Actual): Do not construct
204 the extra actual by name, generate a reference instead.
206 2014-07-29 Arnaud Charlet <charlet@adacore.com>
208 * sem_prag.adb (Analyze_Pragma): Do not crash analyzing
209 Allow_Integer_Address if already set.
210 * a-except-2005.adb (Rcheck_PE_Stream_Operation_Not_Allowed):
211 Fix order, for consistency with Rmsg_xx declarations.
213 2014-07-29 Ed Schonberg <schonberg@adacore.com>
215 * sem_ch4.adb (Complete_Object_Operation): If the type of the
216 candidate subprogram is a limited view, use non-limited view
219 2014-07-29 Robert Dewar <dewar@adacore.com>
221 * sem_ch13.adb: Minor change in RM reference.
222 * sem_mech.ads: Minor reformatting.
223 * einfo.ads: Minor comment fix.
224 * types.ads: Minor correction to range given for Mechanism_Type.
225 * exp_ch6.adb (Add_Invariant_And_Predicate_Checks): Do not
226 check predicate on way out for OUT or IN OUT parameters.
227 * par-ch3.adb (P_Constraint_Opt): Handle missing RANGE keyword
228 better (P_Range_Constraint): Corresponding fix.
229 * checks.ads: Minor comment clarification.
231 2014-07-29 Gary Dismukes <dismukes@adacore.com>
233 * sem_ch8.adb (Analyze_Object_Renaming): Set the Is_Volatile
234 and Treat_As_Volatile flags based on whether the renamed object
235 is a volatile object.
237 2014-07-29 Olivier Hainque <hainque@adacore.com>
240 (Default_Alignment): Rename as Storage_Alignment. This is not
241 a "default" that can be overriden. Augment comment to clarify
242 intent and document why we need to manage alignment padding.
243 (Header_Offset): Set to Header'Object_Size instead of 'Size
244 rounded up to Storage_Alignment. Storage_Alignment on the
245 allocation header is not required by our internals so was
246 overkill. 'Object_Size is enough to ensure proper alignment
247 of the header address when substracted from a storage address
248 aligned on Storage_Alignment.
249 (Minimum_Allocation): Rename as Extra_Allocation, conveying that
250 this is always added on top of the incoming allocation requests.
251 (Align): New function, to perform alignment rounding operations.
252 (Allocate): Add comments on the Storage_Address computation
253 scheme and adjust so that the alignment padding applies to that
254 (Storage_Address) only.
256 2014-07-29 Robert Dewar <dewar@adacore.com>
258 * exp_ch3.adb (Default_Initialize_Object): Remove incorrect
260 * cstand.adb (Create_Standard): Use E_Array_Type for standard
261 string types. Make sure index of Any_String/Any_Array is in a list.
262 * errout.adb: Minor reformatting.
264 2014-07-29 Robert Dewar <dewar@adacore.com>
266 * gnat_ugn.texi: Clean up and correct documentation of warnings.
267 * usage.adb: Minor corrections to make sure warnings are properly
269 * warnsw.adb (Set_Warning_Switch): Remove redundant return statement.
270 (WA_Warnings): Add Warn_On_Suspicious_Modulus_Value.
272 2014-07-29 Ed Schonberg <schonberg@adacore.com>
274 * exp_ch3.adb (Expand_N_Object_Declaration): The dummy block
275 created to match internal sequence numbers between compilations
276 with/without abort must have its type properly set.
278 2014-07-29 Robert Dewar <dewar@adacore.com>
280 * ali.adb (Initialize_ALI): Initialize SSO_Default_Specified
281 (Scan_ALI): Set SSO_Default in ALIs_Record (Scan_ALI): Set
282 SSO_Default_Specified.
283 * ali.ads (ALIs_Record): Add field SSO_Default
284 (SSO_Default_Specified): New global switch.
285 * bcheck.adb (Check_Consistent_SSO_Default): New procedure
286 (Check_Configuration_Consistency): Call this procedure
287 * einfo.adb (SSO_Set_High_By_Default): New
288 function (SSO_Set_Low_By_Default): New function
289 (Set_SSO_Set_High_By_Default): New procedure
290 (Set_SSO_Set_Low_By_Default): New procedure (Write_Entity_Flags):
292 * einfo.ads (SSO_Set_Low_By_Default): New flag
293 (SSO_Set_High_By_Default): New flag
294 * freeze.adb (Set_SSO_From_Default): New procedure
295 (Freeze_Array_Type): Call Set_SSO_From_Default
296 (Freeze_Record_Type): Call Set_SSO_From_Default
297 * gnat_rm.texi: Document pragma Default_Scalar_Storage_Order
298 * lib-writ.adb (Write_ALI): Set OL/OH in P line as needed
299 * lib-writ.ads: Add OL/OH parameters to P line
300 * opt.adb: Set Default_SSO, Default_SSO_Config as appropriate
301 * opt.ads (Default_SSO): New global switch (Default_SSO_Config):
303 * repinfo.adb (List_Scalar_Storage_Order): List SSO when it is
304 set by default using pragma Default_Scalar_Storage_Order.
305 * sem.ads (Scope_Stack_Entry): Add component Save_Default_SSO
306 * sem_ch13.adb (Inherit_Delayed_Rep_Aspects):
307 Clear SSO defaults when explicit SSO is inherited.
308 (Analyze_Attribute_Definition_Clause): Clear SSO defaults when
309 explicit SSO is specified.
310 (Inherit_Aspects_At_Freeze_Point):
311 Clear SSO default when inheriting SSO.
312 * sem_ch3.adb (Set_Default_SSO): New procedure
313 (Analyze_Private_Extension_Declaration): Set defualt SSO
314 (Array_Type_Declaration): ditto (Build_Derived_Array_Type): ditto
315 (Build_Derived_Private_Type): ditto (Build_Derived_Record_Type):
316 ditto (Build_Derived_Type): ditto (Make_Class_Wide_Type): ditto
317 (Record_Type_Declaration): ditto
318 * sem_ch8.adb (Pop_Scope): Restore Default_SSO (Push_Scope):
320 * sem_prag.adb (Analyze_Pragma, case
321 Default_Scalar_Storage_Order): Set Default_SSO
323 2014-07-29 Ed Schonberg <schonberg@adacore.com>
325 * sem_ch6.adb (Valid_Operator_Definition): Verify that
326 all parameter have mode IN. This check must be done here for
327 subprogram instantiations that have operator names, because their
328 analysis does not follow the same path as that for subprogram
331 2014-07-29 Robert Dewar <dewar@adacore.com>
333 * freeze.adb (Freeze_Entity, Concurrent_Type case): Add a guard
334 to make sure that the Etype of a component of the corresponding
335 record type is present before trying to freeze it.
336 * sem_ch5.adb: Minor reformatting.
338 2014-07-29 Robert Dewar <dewar@adacore.com>
340 * exp_attr.adb, types.ads, types.h, exp_ch11.adb, a-except.adb,
341 a-except-2005.adb: Add new reason code PE_Stream_Operation_Not_Allowed,
342 and then use it when a stream operation is used from a library generic
343 when the restriction (No_Streams) is active.
345 2014-07-29 Thomas Quinot <quinot@adacore.com>
347 * projects.texi: Fix minor typo.
349 2014-07-29 Yannick Moy <moy@adacore.com>
351 * sem_attr.adb (Analyze_Attribute): Fix generation of warning.
353 2014-07-29 Arnaud Charlet <charlet@adacore.com>
355 * sem_ch5.adb (Check_Unreachable_Code): Do not remove code in
358 2014-07-29 Hristian Kirtchev <kirtchev@adacore.com>
360 * exp_ch7.adb (Find_Last_Init): Add local variable
361 Deep_Init_Found. Check the statement immediately following the
362 declaration if [Deep_]Initialization was not found.
364 2014-07-29 Hristian Kirtchev <kirtchev@adacore.com>
366 * exp_util.adb (Is_Aliased): It appears that
367 'reference-d and renamed objects still play some role in Boolean
368 expression with actions and cannot be finalized immediately.
370 2014-07-29 Ed Schonberg <schonberg@adacore.com>
372 * exp_dbug.adb (Qualify_Needed): For debugging purposes,
373 Loop names are not part of the full qualification of entity names.
375 2014-07-29 Robert Dewar <dewar@adacore.com>
377 * einfo.adb (Has_Protected): Test base type.
378 * sem_ch4.adb (Analyze_Allocator): Reorganize code to make sure
379 that we always properly check No_Protected_Type_Allocators.
381 2014-07-29 Ed Schonberg <schonberg@adacore.com>
383 * sem_util.ads, sem_util.adb (Defining_Entity): Now applies to
384 loop declarations as well.
385 * exp_ch5.adb (Expand_Loop_Statement): Apply Qualify_Entity_Names
386 to an iterator loop, because it may contain local renaming
387 declarations that require debugging information.
389 2014-07-29 Robert Dewar <dewar@adacore.com>
391 * sem_util.ads, exp_util.adb, sem_attr.adb: Minor reformatting.
393 2014-07-29 Robert Dewar <dewar@adacore.com>
395 * einfo.ads, einfo.adb (Static_Real_Or_String_Predicate): New function
396 (Set_Static_Real_Or_String_Predicate): New procedure
397 * sem_ch13.adb (Build_Predicate_Functions): Accomodate static
398 string predicates (Is_Predicate_Static): Handle static string
400 * sem_eval.adb (Real_Or_String_Static_Predicate_Matches):
401 New procedure (Check_Expression_Against_Static_Predicate):
402 Deal with static string predicates, now fully implemented
403 (Eval_Relational_Op): Allow string equality/inequality as static
404 if not comes from source.
406 2014-07-29 Robert Dewar <dewar@adacore.com>
408 * sem_aggr.adb, exp_ch5.adb, sem_ch5.adb, exp_util.adb, einfo.adb,
409 einfo.ads, sem_util.adb, sem_attr.adb, sem_case.adb, sem_eval.adb,
410 sem_eval.ads, sem_ch13.adb: General cleanup of static predicate
411 handling. Change name of Discrete_Predicate to
412 Discrete_Static_Predicate, and replace testing of the presence of this
413 field by testing the flag Has_Static_Expression.
415 2014-07-29 Robert Dewar <dewar@adacore.com>
417 * gnat_rm.texi: Document pragma Unevaluated_Use_Of_Old.
418 * opt.adb: Handle Uneval_Old.
419 * opt.ads (Uneval_Old, Uneval_Old_Config): New variables.
420 * par-prag.adb: Add dummy entry for pragma Unevaluated_Use_Of_Old.
421 * sem.ads (Save_Uneval_Old): New field in Scope_Stack_Entry.
422 * sem_attr.adb (Uneval_Old_Msg): New procedure.
423 * sem_ch8.adb (Push_Scope): Save Uneval_Old.
424 (Pop_Scope): Restore Uneval_Old.
425 * sem_prag.adb (Analyze_Pragma, case Unevaluated_Use_Of_Old):
427 * snames.ads-tmpl: Add entries for pragma Unevaluated_Use_Of_Old
428 Add entries for Name_Warn, Name_Allow.
430 2014-07-29 Robert Dewar <dewar@adacore.com>
432 * sem_aggr.adb (Resolve_Array_Aggregate): Change Is_Static_Range
433 to Is_OK_Static_Range.
434 * sem_attr.adb (Eval_Attribute): Make sure we properly flag
435 static attributes (Eval_Attribute, case Size): Handle size of
436 zero properly (Eval_Attribute, case Value_Size): Handle size of
438 * sem_ch13.adb: Minor reformatting.
439 * sem_ch3.adb (Process_Range_Expr_In_Decl): Change
440 Is_Static_Range to Is_OK_Static_Range.
441 * sem_eval.adb (Eval_Case_Expression): Total rewrite, was
442 wrong in several ways (Is_Static_Range): Moved here from spec
443 (Is_Static_Subtype): Moved here from spec Change some incorrect
444 Is_Static_Subtype calls to Is_OK_Static_Subtype.
445 * sem_eval.ads: Add comments to section on
446 Is_Static_Expression/Raises_Constraint_Error (Is_OK_Static_Range):
447 Add clarifying comments (Is_Static_Range): Moved to body
448 (Is_Statically_Unevaluated): New function.
449 * sem_util.ads, sem_util.adb (Is_Preelaborable_Expression): Change
450 Is_Static_Range to Is_OK_Static_Range.
451 * sinfo.ads: Additional commments for Is_Static_Expression noting
452 that clients should almost always use Is_OK_Static_Expression
453 instead. Many other changes throughout front end units to obey
455 * tbuild.ads, tbuild.adb (New_Occurrence_Of): Set Is_Static_Expression
456 for enumeration literal.
457 * exp_ch5.adb, sem_intr.adb, sem_ch5.adb, exp_attr.adb, exp_ch9.adb,
458 lib-writ.adb, sem_ch9.adb, einfo.ads, checks.adb, checks.ads,
459 sem_prag.adb, sem_ch12.adb, freeze.adb, sem_res.adb, exp_ch4.adb,
460 exp_ch6.adb, sem_ch4.adb, sem_ch6.adb, exp_aggr.adb, sem_cat.adb:
461 Replace all occurrences of Is_Static_Expression by
462 Is_OK_Static_Expression.
464 2014-07-29 Hristian Kirtchev <kirtchev@adacore.com>
466 * exp_ch4.adb (Process_Transient_Object): Remove constant
467 In_Cond_Expr, use its initialization expression in place.
468 * exp_ch7.adb (Process_Declarations): There is no need to check
469 that a transient object being hooked is controlled as it would
470 not have been hooked in the first place.
471 * exp_util.adb (Is_Aliased): 'Reference-d or renamed transient
472 objects are not considered aliased when the related context is
473 a Boolean expression_with_actions.
474 (Requires_Cleanup_Actions): There is no need to check that a transient
475 object being hooked is controlled as it would not have been hooked in
478 2014-07-29 Robert Dewar <dewar@adacore.com>
480 * errout.adb: Minor reformatting.
482 2014-07-29 Hristian Kirtchev <kirtchev@adacore.com>
484 * exp_ch3.adb (Default_Initialize_Object): Add new variables
485 Abrt_Blk and Dummy. Generate a dummy temporary when aborts are
486 not allowed to ensure the symmetrical generation of symbols.
487 * exp_ch7.adb (Build_Object_Declarations): Remove variables A_Expr
488 and E_Decl. Add new variables Decl and Dummy. Generate a dummy
489 temporary when aborts are not allowed to ensure symmertrical
490 generation of symbols.
491 * exp_intr.adb (Expand_Unc_Deallocation): Add new variable
492 Dummy. Generate a dummy temporary when aborts are not allowed
493 to ensure symmertrical generation of symbols.
495 2014-07-29 Ed Schonberg <schonberg@adacore.com>
497 * exp_dbug.adb (Debug_Renaming_Declaration): For an object
498 renaming, indicate that the renamed entity itself needs debug
499 information. This is necessary if that entity is a temporary,
500 e.g. part of the expansion of an explicit dereference in an
503 2014-07-29 Thomas Quinot <quinot@adacore.com>
505 * errout.adb (Set_Error_Posted): When propagating flag to
506 an enclosing named association, also propagate to the parent
507 of that node, so that named and positional associations are
508 treated consistently.
510 2014-07-29 Ed Schonberg <schonberg@adacore.com>
512 * sem_attr.adb (Resolve_Attribute, case 'Update): Set
513 Do_Range_Check properly on array component expressions that
514 have a scalar type. In GNATprove mode, only checks on scalar
515 components must be marked by the front-end.
517 2014-07-29 Ed Schonberg <schonberg@adacore.com>
519 * sem_res.adb (Resolve_Type_Conversion): If the type of the
520 expression is a limited view, use the non-limited view when
523 2014-07-29 Hristian Kirtchev <kirtchev@adacore.com>
525 * exp_ch4.adb (Expand_N_Case_Expression): Mark the generated
526 case statement as coming from a conditional expression.
527 (Expand_N_If_Expression): Mark the generated if statement as
528 coming from a conditional expression.
529 * exp_ch5.adb (Expand_N_Case_Statement): Do not process controlled
530 objects found in case statement alternatives when the case
531 statement is actually a case expression.
532 (Expand_N_If_Statement):
533 Do not process controlled objects found in an if statement when
534 the if statement is actually an if expression.
535 * sinfo.adb (From_Conditional_Expression): New routine.
536 (Set_From_Conditional_Expression): New routine.
537 * sinfo.ads Add new semantic flag From_Conditional_Expression and
538 update related nodes.
539 (From_Conditional_Expression): New routine along with pragma Inline.
540 (Set_From_Conditional_Expression): New routine along with pragma Inline.
542 2014-07-29 Hristian Kirtchev <kirtchev@adacore.com>
544 * exp_ch7.adb (Build_BIP_Cleanup_Stmts): Remove
545 formal parameter Obj_Id and update the comment on usage. Renamed
546 Obj_Typ to Func_Typ and update all occurrences.
547 (Find_Last_Init): Remove formal parameter Decl and update the comment
549 Remove local constants Obj_Id and Obj_Typ. Remove local variables
550 Init_Typ and Is_Conc. Remove the extraction of the initialization type.
551 (Find_Last_Init_In_Block): Remove formal parameter
552 Init_Typ and update the comment on usage.
553 (Is_Init_Call): Remove formal parameter Init_Typ and update the comment
554 on usage. Check whether the procedure call is an initialization
555 procedure of either the object type or the initialization type.
556 (Is_Init_Proc_Of): New routine.
557 (Process_Object_Declaration): Obj_Id and Obj_Typ are now global to this
558 routine. Add new variable Init_Typ. Add circuitry to extract the object
559 type as well as the initialization type.
561 2014-07-29 Robert Dewar <dewar@adacore.com>
563 * sem_case.adb: Minor reformatting.
564 * sem_aux.ads: Minor reformatting.
566 2014-07-29 Ed Schonberg <schonberg@adacore.com>
568 * sinfo.adb (Set_Else_Actions, Set_Then_Actions): Set parent
569 pointer on these fields, even though they are semantic, because
570 subsequent analysis and expansion of action nades may require
571 exploring the tree, for example to locate a node to be wrapped
572 when a function with controlled result is called.
574 2014-07-29 Claire Dross <dross@adacore.com>
576 * sem_aux.adb (Get_Binary_Nkind): Use case on
577 Name_Id instead of an intermediate string.
578 (Get_Unary_Nkind): Use case on Name_Id instead of an intermediate
581 2014-07-29 Sergey Rybin <rybin@adacore.com frybin>
583 * gnat_ugn.texi (gnatelim, gnatstub, gnatmetric): Add note
584 about processing sources with preprocessor directives.
586 2014-07-24 Martin Liska <mliska@suse.cz>
588 * gcc-interface/trans.c (finalize_nrv): Adjust function call.
589 * gcc-interface/utils.c (rest_of_subprog_body_compilation): Likewise.
590 (gnat_write_global_declarations): Likewise.
592 2014-07-19 David Wohlferd <dw@LimeGreenSocks.com>
594 * gnat_rm.texi: Clean up for makeinfo 5.2.
596 2014-07-19 David Wohlferd <dw@LimeGreenSocks.com>
598 * gnat_rm.texi (Machine Code Insertions): Clean up.
600 2014-07-18 Robert Dewar <dewar@adacore.com>
602 * exp_ch7.adb: Minor reformatting.
604 2014-07-18 Claire Dross <dross@adacore.com>
606 * sem_aux.ads (Get_Binary_Nkind): New function that returns
607 the Node_Kind value of an entity defining a binary operator.
608 (Get_Unary_Nkind): New function that returns the Node_Kind value
609 of an entity defining a unary operator.
611 2014-07-18 Pascal Obry <obry@adacore.com>
613 * sysdep.c: comment update.
614 * adaint.c (__gnat_fputwc): Use wchar_t on a limited set of
615 platforms where it is known to be supported.
617 2014-07-18 Thomas Quinot <quinot@adacore.com>
619 * sem_dist.adb (Process_Remote_AST_Declaration): Need
620 to set Fat_Type's Ekind in order to be able to use its
621 Corresponding_Remote_Type attribute.
623 2014-07-18 Hristian Kirtchev <kirtchev@adacore.com>
625 * einfo.adb Last_Aggregate_Assignment is now Node 30.
626 (Last_Aggregate_Assignment): Include
627 constants in the assertion. Update the underlying node.
628 (Set_Last_Aggregate_Assignment): Include constants in the
629 assertion. Update the underlying node. (Write_Field11_Name):
630 Remove the entry for Last_Aggregate_Assignment.
631 (Write_Field30_Name): Add an entry for Last_Aggregate_Assignment.
632 * einfo.ads Update the node designation and usage of attribute
633 Last_Aggregate_Assignment.
634 * exp_aggr.adb (Expand_Array_Aggregate): Store the last
635 assignment statement used to initialize a controlled object.
636 (Late_Expansion): Store the last assignment statement used to
637 initialize a controlled record or an array of controlled objects.
638 * exp_ch3.adb (Expand_N_Object_Declaration): Default
639 initialization of objects is now performed in a separate routine.
640 (Default_Initialize_Object): New routine.
641 * exp_ch7.adb (Build_BIP_Cleanup_Stmts): Add formal parameter
642 Obj_Id. Update the comment on usage.
643 (Find_Last_Init): Remove formal parameter Typ. Update comment on usage.
644 Reimplement the logic. (Find_Last_Init_In_Block): New routine.
645 (Is_Init_Call): Add formal parameter Init_Typ. Update the
646 comment on usage. Account for the type init proc when trying
647 to determine whether a statement is an initialization call.
648 (Make_Adjust_Call): Rename formal parameter For_Parent to
649 Skip_Self. Update all occurrences of For_Parent. Account for
650 non-tagged types. Update the call to Make_Call.
651 (Make_Call): Rename formal parameter For_Parent to Skip_Self. Update
652 comment on usage. Update all occurrences of For_Parent.
653 (Make_Final_Call): Rename formal parameter For_Parent to
654 Skip_Self. Update all occurrences of For_Parent. Account
655 for non-tagged types. Update the call to Make_Call.
656 (Process_Object_Declaration): Most variables and constants are
657 now local to the routine.
658 * exp_ch7.ads (Make_Adjust_Call): Rename formal parameter
659 For_Parent to Skip_Self. Update the comment on usage.
660 (Make_Final_Call): Rename formal parameter For_Parent to
661 Skip_Self. Update the comment on usage.
663 2014-07-18 Ed Schonberg <schonberg@adacore.com>
665 * sem_ch9.adb (Analyze_Requeue): The entry being referenced
666 can be a procedure that is implemented by entry, and have a
667 formal that is a synchronized interface. It does not have to
668 be declared as a protected operation.
670 2014-07-18 Robert Dewar <dewar@adacore.com>
672 * gnat_rm.texi: Remove mention of obsolete attributes
673 Max[_Interrupt]_Priority, which have never been implemented
674 (or at the very least were removed long ago if they ever were
675 implemented. Add documentation of Max[_Interrupt]_Priority
676 constants in package System.
677 * ttypes.ads: Document actual handling of package System,
678 rather than a historical fantasy version. Remove mention of
679 non-existent attributes Max[_Interrupt]_Priority.
681 2014-07-18 Pascal Obry <obry@adacore.com>
683 * a-witeio.adb (Put): No 16-bit character output when text
684 translation is disabled.
685 * i-cstrea.ads: Code clean up.
687 2014-07-18 Robert Dewar <dewar@adacore.com>
689 * gnat_rm.texi: Document that Wchar_T_Size and Word_Size are
692 2014-07-18 Arnaud Charlet <charlet@adacore.com>
694 * a-witeio.adb, initialize.c: Update comments. Minor clean ups.
696 2014-07-18 Pascal Obry <obry@adacore.com>
698 * adaint.c: Do not include wchar.h on VxWorks.
699 * mingw32.h: Remove obsolete definition.
701 2014-07-18 Pascal Obry <obry@adacore.com>
703 * a-textio.adb, a-witeio.adb, a-ztexio.adb: Use C_Streams Default_Text.
704 * i-cstrea.ads (Content_Encoding): Moved here, add convention C.
705 * s-ficobl.ads (Content_Encoding): Moved to C_Streams.
706 * s-fileio.adb (Open): Adjust to use Content_Encoding from C_Streams.
708 2014-07-18 Pascal Obry <obry@adacore.com>
710 * a-textio.adb: Rename Is_Text_File to Text_Encoding.
711 * a-ztexio.adb: Likewise.
712 * a-witeio.adb: Likewise.
713 (Open): Pass file's translation mode to set_text_mode.
714 * s-ficobl.ads (Content_Encoding): New type.
715 (Text_Content_Encoding): New subtype.
716 (AFCB): Rename Is_Text_File to Text_Encoding.
717 * s-fileio.adb (Open): Handles new text_translation
718 values. Remove Is_Text_File which is equivalent to Text_Encoding
719 in Text_Content_Encoding.
720 * adaint.h (__gnat_set_mode): New routine.
721 * sysdep.c (__gnat_set_wide_text_mode): Removed.
722 (__gnat_set_mode): New routine.
724 2014-07-18 Arnaud Charlet <charlet@adacore.com>
726 * gcc-interface/decl.c, gcc-interface/trans.c,
727 gcc-interface/utils.c (Is_Packed_Array_Type): Renamed
728 Is_Packed_Array_Impl_Type.
730 2014-07-18 Gary Dismukes <dismukes@adacore.com>
732 * sem_util.adb: Minor typo correction.
734 2014-07-18 Ben Brosgol <brosgol@adacore.com>
736 * gnat_rm.texi: Complete previous change.
738 2014-07-18 Pascal Obry <obry@adacore.com>
740 * s-fileio.adb: Minor style fix.
742 2014-07-18 Ed Schonberg <schonberg@adacore.com>
744 * sem_ch13.adb (Analyze_Aspect_Specifications): Detect improper
745 specification of stream attributes for subtypes that are not
746 first subtypes, to prevent malformed rep_item chains in the case
747 of such illegal specifications for discriminated private subtypes.
748 (Check_Overloaded_Name): Verify that the name is an entity name
751 2014-07-18 Pascal Obry <obry@adacore.com>
753 * adaint.c (__gnat_fputwc) Do not disable on cross-build.
755 2014-07-18 Robert Dewar <dewar@adacore.com>
757 * sem_prag.adb, sem_attr.adb,
758 sem_aggr.adb, sinfo.ads, sem_eval.ads: Minor reformatting.
760 2014-07-18 Pascal Obry <obry@adacore.com>
762 * sysdep.c (__gnat_wide_text_translation_required): Removed from here.
763 * initialize.c (__gnat_wide_text_translation_required): Defined here.
765 2014-07-18 Pascal Obry <obry@adacore.com>
767 * adaint.c (__gnat_fputwc): New routine.
768 * s-crtl.ads (fputwc): Now imported as __gnat_fputwc.
770 2014-07-18 Hristian Kirtchev <kirtchev@adacore.com>
772 * einfo.adb: Flag 270 is now used as Stores_Attribute_Old_Prefix.
773 (Set_Stores_Attribute_Old_Prefix): New routine.
774 (Stores_Attribute_Old_Prefix): New routine.
775 (Write_Entity_Flags):
776 Output flag Stores_Attribute_Old_Prefix.
777 * einfo.ads Add new flag Stores_Attribute_Old_Prefix along with
779 (Set_Stores_Attribute_Old_Prefix): New routine
780 along with pragma Inline.
781 (Stores_Attribute_Old_Prefix): New
782 routine along with pragma Inline.
783 * exp_attr.adb (Expand_N_Attribute_Reference): Mark the generated
784 constant which captures the result of attribute 'Old's prefix.
785 * sem_util.adb (In_Assertion_Expression_Pragma): Recognize a
786 relocated expression which acted as a prefix of attribute 'Old.
788 2014-07-18 Bob Duff <duff@adacore.com>
790 * s-spsufi.adb (Finalize_And_Deallocate): Set Subpool.Owner to
791 null before dispatching to Deallocate_Subpool.
792 * s-stposu.ads (Default_Subpool_For_Pool): Change mode of
793 parameter of Default_Subpool_For_Pool to 'in out'.
794 * s-stposu.adb (Set_Pool_Of_Subpool): Use raise expression. Add
795 a message to the raise.
796 * sem_util.adb: Minor reformatting.
798 2014-07-18 Robert Dewar <dewar@adacore.com>
800 * sem_util.adb (Check_Expression_Against_Static_Predicate):
801 Mark expression as non-static if it fails static predicate check,
802 and issue additional warning.
804 2014-07-18 Pascal Obry <obry@adacore.com>
806 * a-witeio.adb (Put): Control translation based on
807 wide_text_translation_required.
808 * adaint.c (CurrentCCSEncoding): New variable.
809 * initialize.c (__gnat_initialize): On Windows initialize
810 CurrentCCSEncoding based on values in GNAT_CCS_ENCODING
811 environment variable.
812 * mingw32.h (CurrentCCSEncoding): New external.
813 (__gnat_wide_text_translation_required): Likewise.
814 * sysdep.c (wide_text_translation_required): New variable.
815 (__gnat_set_wide_text_mode): Set mode based on CurrentCCSEncoding.
817 2014-07-18 Hristian Kirtchev <kirtchev@adacore.com>
819 * sem_prag.adb (Analyze_Refined_Depends_In_Decl_Part): Remove global
820 variable Refined_States. Add global variable Matched_Items.
821 (Check_Dependency_Clause): Account for dependency
822 clauses utilizing states with visible null refinements.
823 (Is_Null_Refined_State): New routine.
824 (Match_Items): Record each successfully matched item of pragma Depends.
825 (Record_Item): New routine.
827 2014-07-18 Ed Schonberg <schonberg@adacore.com>
829 * sem_attr.adb (Analyze_Attribute, case 'Update): Set
830 Do_Range_Check flag on a dynamic index expression used in a
831 component association in the argument of Update.
833 2014-07-18 Gary Dismukes <dismukes@adacore.com>
835 * einfo.ads, sem_eval.ads, sem_ch13.adb: Minor reformatting.
837 2014-07-18 Hristian Kirtchev <kirtchev@adacore.com>
839 * exp_ch6.adb (Expand_Simple_Function_Return): Redo the marking
840 of enclosing blocks, loops and the enclosing function using a
841 parent-based traversal.
842 * exp_util.adb (Wrap_Statements_In_Block): Suppress the secondary
843 stack reclamation if the iterator loop contains a return statement
845 * sem_ch5.adb (Analyze_Loop_Statement): There is no need to
846 patch up the scope stack as the secondary stack management now
847 takes into account the enclosing function of the iterator loop.
849 2014-07-18 Robert Dewar <dewar@adacore.com>
851 * sem_ch3.adb, g-memdum.ads, i-cstrea.ads: Minor reformatting.
853 2014-07-18 Robert Dewar <dewar@adacore.com>
855 * einfo.adb (Has_Static_Predicate): New function.
856 (Set_Has_Static_Predicate): New procedure.
857 * einfo.ads (Has_Static_Predicate): New flag.
858 * sem_ch13.adb (Is_Predicate_Static): New function
859 (Build_Predicate_Functions): Use Is_Predicate_Static to reorganize
860 (Add_Call): Minor change in Sloc of generated expression
861 (Add_Predicates): Remove setting of Static_Pred, no longer used.
862 * sem_ch4.adb (Has_Static_Predicate): Removed this function,
863 replace by use of the entity flag Has_Static_Predicate_Aspect.
864 * sem_eval.adb (Eval_Static_Predicate_Check): Check real case
865 and issue warning that predicate is not checked for now.
866 * sem_eval.ads (Eval_Static_Predicate_Check): Fix comments in
868 * sem_util.adb (Check_Expression_Against_Static_Predicate):
869 Carry out check for any case where there is a static predicate,
870 and output appropriate message.
871 * sinfo.ads: Minor comment corrections.
873 2014-07-18 Ed Schonberg <schonberg@adacore.com>
875 * exp_ch3.adb (Expand_Freeze_Record_Type): If the type is derived
876 from an untagged private type whose full view is tagged, the type
877 is marked tagged for layout reasons, but it has no dispatch table,
878 so Set_All_DT_Position must not be called.
879 * exp_ch13.adb: If the freeze node is for a type internal to a
880 record declaration, as is the case for a class-wide subtype
881 of a parent component, the relevant scope is the scope of the
884 2014-07-18 Thomas Quinot <quinot@adacore.com>
886 * g-memdum.adb, g-memdum.ads: Code clean ups.
888 2014-07-18 Hristian Kirtchev <kirtchev@adacore.com>
890 * sem_prag.adb (Check_Dependency_Clause):
891 Update the comment on usage. Reimplement the mechanism which
892 attempts to match a single clause of Depends against one or
893 more clauses of Refined_Depends.
894 (Input_Match): Removed.
895 (Inputs_Match): Removed.
896 (Is_Self_Referential): Removed.
897 (Normalize_Clause): Update the call to Split_Multiple_Outputs.
898 (Normalize_Outputs): Rename variable Split to New_Claue and update
900 (Report_Extra_Clauses): Update the comment on usage.
901 (Split_Multiple_Outputs): Renamed to Normalize_Outputs.
903 2014-07-18 Gary Dismukes <dismukes@adacore.com>
905 * i-cstrea.ads: Minor reformatting.
907 2014-07-18 Hristian Kirtchev <kirtchev@adacore.com>
909 * exp_util.adb (Wrap_Statements_In_Block): Propagate both
910 secondary stack-related flags to the generated block.
911 * sem_ch5.adb (Analyze_Loop_Statement): Update the scope chain
912 once the loop is relocated in a block.
914 2014-07-18 Robert Dewar <dewar@adacore.com>
916 * repinfo.ads: Add documentation on handling of back annotation
919 2014-07-18 Ed Schonberg <schonberg@adacore.com>
921 * sinfo.ads, sinfo.adb (Incomplete_View): New semantic attribute
922 of full type declaration, denotes previous declaration for
923 incomplete view of the type.
924 * sem_ch3.adb (Analyze_Full_Type_Declaration): Set Incomplete_View
925 of declaration if one is present.
926 (Replace_Type): When constructing the signature of an inherited
927 operation, handle properly the case where the operation has a
928 formal whose type is an incomplete view.
929 * sem_util.adb (Collect_Primitive_Operations): Handle properly
930 the case of an operation declared after an incomplete declaration
931 for a type T and before the full declaration of T.
933 2014-07-18 Pascal Obry <obry@adacore.com>
935 * i-cstrea.ads: Add documentation for set_wide_text_mode.
937 2014-07-18 Robert Dewar <dewar@adacore.com>
939 * a-witeio.adb: Minor code reorganization.
940 * i-cstrea.ads: Add comment.
942 2014-07-18 Thomas Quinot <quinot@adacore.com>
944 * s-oscons-tmplt.c (NAME_MAX): Minor cleaup and comment
947 2014-07-18 Robert Dewar <dewar@adacore.com>
949 * g-memdum.adb, g-memdum.ads, exp_strm.adb: Minor reformatting.
951 2014-07-18 Pascal Obry <obry@adacore.com>
953 * s-crtl.ads, i-cstrea.ads (fputwc): New routine.
954 * a-witeio.adb (Put): On platforms where there is translation
955 done by the OS output the raw text.
956 (New_Line): Use Put above to properly handle the LM wide characters.
958 2014-07-18 Thomas Quinot <quinot@adacore.com>
960 * g-memdum.adb, g-memdum.ads (Dump): New parameter Prefix, defaulted
963 2014-07-18 Eric Botcazou <ebotcazou@adacore.com>
965 * opt.ads (Suppress_Back_Annotation): Remove as unused.
966 * fe.h (Back_Annotate_Rep_Info): Likewise.
967 (Global_Discard_Names): Likewise.
969 2014-07-18 Robert Dewar <dewar@adacore.com>
971 * sem_ch13.adb (Is_Type_Ref): Check that type name is not
974 2014-07-18 Vincent Celier <celier@adacore.com>
976 * s-osinte-vms.ads: Fix style errors.
978 2014-07-18 Thomas Quinot <quinot@adacore.com>
980 * s-oscons-tmplt.c (_POSIX_SOURCE): Define in order to get
981 NAME_MAX and PATH_MAX.
983 2014-07-18 Bob Duff <duff@adacore.com>
985 * exp_strm.adb (Build_Record_Or_Elementary_Input_Function,
986 Build_Record_Or_Elementary_Output_Procedure): For Input and
987 Output attributes, do not read/write the discriminants if they
988 have default values; that will be done by Read/Write.
990 2014-07-18 Robert Dewar <dewar@adacore.com>
992 * sem_aggr.adb, exp_ch5.adb, sem_ch3.adb, layout.adb, sem_type.adb,
993 exp_util.adb, exp_attr.adb, einfo.adb, einfo.ads, exp_pakd.adb,
994 checks.adb, exp_pakd.ads, freeze.adb, sem_util.adb, exp_dbug.adb,
995 exp_dbug.ads, exp_ch4.adb, sem_ch8.adb, exp_aggr.adb, sem_eval.adb,
996 sem_ch13.adb: Change name Packed_Array_Type to Packed_Array_Impl_Type.
998 2014-07-18 Robert Dewar <dewar@adacore.com>
1000 * lib-writ.adb, makeutl.adb, ali.ads: Minor reformatting.
1002 2014-07-18 Vincent Celier <celier@adacore.com>
1004 * lib-writ.ads: Update documentation about the D lines.
1006 2014-07-18 Ed Schonberg <schonberg@adacore.com>
1008 * sem_ch13.adb (Replace_Type_References_Generic): Use type entity
1009 as a parameter, rather than its Chars field, in order to locate
1010 freeze node of type. If the predicate or invariant has references
1011 to types other than the one to which the contract applies, these
1012 types must be frozen, and the corresponding predicate functions
1013 created, before that freeze node.
1015 2014-07-18 Robert Dewar <dewar@adacore.com>
1017 * freeze.adb, einfo.ads, einfo.adb: Minor code reorganization.
1018 * par_sco.adb: Minor reformatting.
1020 2014-07-18 Gary Dismukes <dismukes@adacore.com>
1022 * exp_ch4.adb (Real_Range_Check): Turn off
1023 the Do_Range_Check flag on the conversion's current Expression
1024 argument rather than on the originally captured Operand node,
1025 as Expression may reflect a rewriting (as in conversions to a
1028 2014-07-18 Vincent Celier <celier@adacore.com>
1030 * ali.adb (Scan_ALI): Set Sdep_Record.Unit_Name, when the unit
1032 * ali.ads (Sdep_Record): New component Unit_Name.
1033 * lib-writ.adb (Write_ALI): Write the unit name in D lines.
1034 * makeutl.adb (Check_Source_Info_In_ALI): Return False if a
1035 dependent unit is in a project and the source file name is not
1038 2014-07-18 Bob Duff <duff@adacore.com>
1040 * s-addima.ads: Minor: add comment.
1042 2014-07-18 Thomas Quinot <quinot@adacore.com>
1044 * freeze.adb (Check_Component_Storage_Order): Fix enforcement
1045 of nesting rules for composites with different SSOs.
1047 2014-07-18 Thomas Quinot <quinot@adacore.com>
1049 * par_sco.adb (Is_Logical_Operator): An If_Expression is not
1050 a proper logical operator.
1051 (Has_Decision): An If_Expression indicates the presence of a decision
1052 although it is not a logical operator.
1054 2014-07-18 Robert Dewar <dewar@adacore.com>
1056 * gnat_ugn.texi: Remove note that -gnatR not allowed with -gnatc.
1057 * switch-c.adb: Remove prohibition of -gnatR and -gnatc together.
1059 2014-07-18 Eric Botcazou <ebotcazou@adacore.com>
1061 * sem_ch13.adb (Kill_Rep_Clause): Clear Comes_From_Source flag
1062 on the null statement.
1064 2014-07-18 Thomas Quinot <quinot@adacore.com>
1066 * adaint.c: Minor comment rewording.
1067 * socket.c: Define macros _REENTRANT and _THREAD_SAFE so that
1068 use of errno in this file is thread safe.
1070 2014-07-18 Arnaud Charlet <charlet@adacore.com>
1072 * gnat_ugn.texi: Doc clarification.
1073 * sem_ch13.adb (Kill_Rep_Clause): Use Replace not Rewrite.
1074 * sem_ch13.ads: Minor comment update.
1076 2014-07-18 Robert Dewar <dewar@adacore.com>
1078 * repinfo.ads: Minor comment fix.
1080 2014-07-18 Robert Dewar <dewar@adacore.com>
1082 * par-prag.adb: Add dummy entry for Default_Scalar_Storage_Order.
1083 * sem_prag.adb: Add dummy implementation of
1084 Default_Scalar_Storage_Order.
1085 * snames.ads-tmpl: Add dummy entry for
1086 Default_Scalar_Storage_Order pragma.
1088 2014-07-18 Robert Dewar <dewar@adacore.com>
1090 * opt.adb (Tree_Read): Read Address_Is_Private,
1091 Ignore_Rep_Clauses, Ignore_Style_Check_Pragmas, Multiple_Unit_Index.
1092 (Tree_Write): Corresponding writes
1093 * opt.ads: Minor comment reformatting and fixes.
1094 * tree_io.ads: Increment ASIS_Version_Number.
1096 2014-07-18 Robert Dewar <dewar@adacore.com>
1098 * sem_attr.adb, s-os_lib.ads, prj-tree.adb: Minor reformatting.
1099 * types.h: Fix typo.
1101 2014-07-18 Robert Dewar <dewar@adacore.com>
1103 * freeze.adb (Check_Address_Clause): Use Kill_Rep_Clause (no
1105 * gnat_ugn.texi: Document that -gnatI removes rep clauses from
1107 * sem_ch13.adb (Kill_Rep_Clause): New procedure
1108 (Analyze_Attribute_Definition_Clause): Use
1109 Kill_Rep_Clause. This is just a cleanup, no functional effect.
1110 (Analyze_Enumeration_Representation_Clause):
1111 Use Kill_Rep_Clause. This means that enum rep
1112 clauses are now properly removed from -gnatct trees.
1113 (Analyze_Record_Representation_Clause): Same change.
1114 * sem_ch13.ads (Kill_Rep_Clause): New procedure.
1116 2014-07-18 Pascal Obry <obry@adacore.com>
1118 * s-os_lib.ads, s-os_lib.adb (GM_Time_Of): New routine to create an
1119 OS_Time from time parts.
1120 * adaint.h, adaint.c (__gnat_to_os_time): New routine.
1122 2014-07-18 Ed Schonberg <schonberg@adacore.com>
1124 * sem_ch4.adb (Try_Container_Indexing): Refine previous patch for
1125 indexing over containers that are derived types: check whether
1126 signature of found operation has the correct first parameter
1127 before retrieving directly a primitive operation.
1129 2014-07-18 Ed Schonberg <schonberg@adacore.com>
1131 * sem_attr.adb (Analyze_Attribute, case 'Update): Set
1132 Do_Range_Check flag on dynamic bounds of a range used in a
1133 component association in the argument of Update.
1135 2014-07-18 Thomas Quinot <quinot@adacore.com>
1137 * adaint.c: #define _REENTRANT and _THREAD_SAFE in order for
1138 accesses to errno(3) to be thread safe.
1140 2014-07-18 Vincent Celier <celier@adacore.com>
1142 * prj-tree.adb (Imported_Or_Extended_Project_Of): For each non
1143 limited imported project that is an extending project, return
1144 a project being extended if it has the expected name.
1146 2014-07-18 Pascal Obry <obry@adacore.com>
1148 * s-os_lib.ads, s-os_lib.adb (Set_File_Last_Modify_Time_Stamp): New
1149 routine to set the last modification time stamp for the given file.
1150 * gnatchop.adb (File_Time_Stamp): Removed.
1152 Set_File_Last_Modify_Time_Stamp instead of ad-hoc implementation.
1154 2014-07-18 Ed Schonberg <schonberg@adacore.com>
1156 * sem_aggr.adb (Aggregate_Constraint_Checks): Moved to sem_util.
1157 * sem_util.ads, sem_util.adb (Aggregate_Constraint_Checks):
1158 Moved here, so it can be shared with the resolution of 'Update,
1159 whose argument shares some features with aggregates.
1160 * sem_attr.adb (Resolve_Attribute, case 'Update): Apply
1161 Aggregate_Constraint_Checks with the expression of each
1162 association, so that the Do_Range_Check flag is set when needed.
1164 2014-07-18 Ed Schonberg <schonberg@adacore.com>
1166 * sem_ch4.adb (Try_Container_Indexing): If the container
1167 type is a derived type, the value of the inherited aspect is
1168 the Reference operation declared for the parent type. However,
1169 Reference is also a primitive operation of the new type, and
1170 the inherited operation has a different signature. We retrieve
1171 the right one from the list of primitive operations of the
1174 2014-07-18 Vincent Celier <celier@adacore.com>
1176 * debug.adb: Update comment.
1178 2014-07-18 Hristian Kirtchev <kirtchev@adacore.com>
1180 * exp_util.adb (Needs_Finalization): There is no reason why a
1181 C type should not benefit from finalization actions.
1183 2014-07-18 Thomas Quinot <quinot@adacore.com>
1185 * s-oscons-tmplt.c (NAME_MAX): Fix definition for Solaris
1186 (FILENAME_MAX): Remove unneeded definition.
1188 2014-07-18 Robert Dewar <dewar@adacore.com>
1190 * exp_attr.adb, debug.adb: Update comments.
1192 2014-07-18 Vincent Celier <celier@adacore.com>
1194 * par-ch4.adb (Simple_Expression): Add missing style check
1195 for binary adding operators.
1196 (Term): Add missing style check for multiplying operators.
1198 2014-07-18 Robert Dewar <dewar@adacore.com>
1200 * impunit.adb: Minor comment correction.
1201 * widechar.adb, s-wchcon.ads: Minor comment corrections.
1203 2014-07-18 Robert Dewar <dewar@adacore.com>
1205 * sem_ch13.adb (Build_Discrete_Static_Predicate): New name
1206 for Build_Static_Predicate (Build_Predicate_Functions):
1207 Don't try to build discrete predicate for real type.
1208 (Build_Predicate_Functions): Report attempt to use
1209 Static_Predicate function on real type as unimplemented.
1210 * sem_util.adb (Check_Expression_Against_Static_Predicate):
1211 Add guard to prevent blow up on predicate for real type.
1213 2014-07-18 Ed Schonberg <schonberg@adacore.com>
1215 * einfo.adb (Set_Static_Predicate): Simplify assertion to handle
1216 properly static predicate on enumeration types and modular types
1219 2014-07-18 Pierre-Marie Derodat <derodat@adacore.com>
1221 * scos.ads (SCO_Unit_Table_Entry): Add a field to keep track of
1222 the corresponding source file index.
1223 * get_scos.ads (Get_SCOs): Add a default value for it.
1224 * par_sco.adb (SCO_Record): Fill the corresponding value.
1227 2014-07-18 Vincent Celier <celier@adacore.com>
1229 * a-strunb-shared.adb, s-auxdec.ads, s-rannum.adb, atree.ads,
1230 urealp.adb, vms_data.ads, lib.ads, s-auxdec-vms_64.ads: Minor
1232 * gnat_ugn.texi: Add documentation for new gnatmem switch -t.
1234 2014-07-18 Thomas Quinot <quinot@adacore.com>
1236 * g-sercom.ads (Set): document possible data loss.
1238 2014-07-18 Ed Schonberg <schonberg@adacore.com>
1240 * exp_attr.adb (Expand_N_Attribute_Reference, cases Input,
1241 Output, Read, Write): If the restriction No_Streams is active,
1242 replace each occurrence of a stream attribute by an explicit
1245 2014-07-18 Robert Dewar <dewar@adacore.com>
1247 * par_sco.adb, a-reatim.ads, exp_attr.adb, sem_util.adb: Minor
1250 2014-07-18 Robert Dewar <dewar@adacore.com>
1252 * einfo.ads, einfo.adb (Has_Out_Or_In_Out_Parameter): New flag and
1254 (Set_Has_Out_Or_In_Out_Parameter): New procedure.
1255 * sem_ch6.adb (Set_Formal_Mode): Set Has_Out_Or_In_Out_Parameter flag.
1256 * sem_res.adb (Resolve_Call): Error if call of Ada 2012 function
1257 with OUT or IN OUT from earlier Ada mode (e.g. Ada 2005)
1259 2014-07-18 Robert Dewar <dewar@adacore.com>
1261 * bcheck.adb (Check_Consistent_Restrictions):
1262 Remove obsolete code checking for violation of
1263 No_Standard_Allocators_After_Elaboration (main program)
1264 * bindgen.adb (Gen_Adainit): Handle
1265 No_Standard_Allocators_After_Elaboration
1266 (Gen_Output_File_Ada): ditto.
1267 * exp_ch4.adb (Expand_N_Allocator): Handle
1268 No_Standard_Allocators_After_Elaboration.
1269 * Makefile.rtl: Add entry for s-elaall
1270 * rtsfind.ads: Add entry for Check_Standard_Allocator.
1271 * s-elaall.ads, s-elaall.adb: New files.
1272 * sem_ch4.adb (Analyze_Allocator): Handle
1273 No_Standard_Allocators_After_Elaboration.
1275 2014-07-18 Robert Dewar <dewar@adacore.com>
1277 * lib.adb, lib.ads, lib-writ.adb, lib-writ.ads, ali.adb,
1278 ali.ads, lib-load.adb: Remove Lib.Has_Allocator and all uses.
1279 Remove AB parameter from ali files and all uses.
1280 Remove Allocator_In_Body and all uses.
1282 2014-07-18 Robert Dewar <dewar@adacore.com>
1284 * g-expect-vms.adb: Add comment.
1286 2014-07-18 Thomas Quinot <quinot@adacore.com>
1288 * par_sco.adb (Is_Logical_Operation): return True for
1291 2014-07-18 Ed Schonberg <schonberg@adacore.com>
1293 * sem_attr.adb (Resolve_Attribute, case 'Update): Do full
1294 analysis and resolution of each choice in the associations within
1295 the argument of Update, because they may be variable names.
1297 2014-07-18 Hristian Kirtchev <kirtchev@adacore.com>
1299 * exp_attr.adb (Expand_Loop_Entry_Attribute): Insert any condition
1300 actions before the generated if statement.
1302 2014-07-18 Hristian Kirtchev <kirtchev@adacore.com>
1304 * gnat_ugn.texi Enhance the documentation of
1305 switches -gnateA and -gnateV.
1307 2014-07-18 Ed Schonberg <schonberg@adacore.com>
1309 * sem_util.adb (Build_Default_Subtype): Add missing condition
1310 so that code matches description: use the full view of the base
1311 only if the base is private and the subtype is not.
1313 2014-07-17 Gary Dismukes <dismukes@adacore.com>
1315 * exp_disp.adb: Minor reformatting.
1316 * exp_disp.adb: Minor code reorganization.
1318 2014-07-17 Thomas Quinot <quinot@adacore.com>
1320 * gnat_rm.texi, freeze.adb (Check_Component_Storage_Order): Do not
1321 require an explicit SSO attribute definition clause on a composite type
1322 just because one of its components has one.
1324 2014-07-17 Robert Dewar <dewar@adacore.com>
1326 * sem_attr.adb (Analyze_Attribute, case Loop_Entry): Rewrite
1327 attribute out of existence if the enclosing pragma is ignored.
1328 * sem_util.adb: Minor reformatting.
1330 2014-07-17 Ed Schonberg <schonberg@adacore.com>
1332 * exp_aggr.adb (Expand_Array_Aggregate): Handle properly an
1333 array aggregate expanded into assignments when it appears as a
1334 local declaration in an inlined body.
1336 2014-07-17 Doug Rupp <rupp@adacore.com>
1338 * init.c [__ANDROID__]: Modify for ZCX.
1339 * exp_aggr.adb: Minor reformatting
1340 * sigtramp-armvxw.c, sigtramp-ppcvxw.c: Update comments.
1342 2014-07-17 Robert Dewar <dewar@adacore.com>
1344 * a-strunb-shared.ads, a-stwiun-shared.ads, a-stzunb-shared.ads,
1345 exp_ch7.adb, g-pehage.ads, g-socket.ads, gnat_ugn.texi, gnat_ugx.texi,
1346 scng.adb: Remove incorrect usage "allow to" and "allows to".
1348 2014-07-17 Robert Dewar <dewar@adacore.com>
1350 * exp_dist.adb: Minor reformatting.
1352 2014-07-17 Bob Duff <duff@adacore.com>
1354 * gnat_ugn.texi: Improve documentation of Unrestricted_Access.
1356 2014-07-17 Robert Dewar <dewar@adacore.com>
1358 * sem_ch13.adb (Build_Invariant_Procedure): Add variable Nam
1359 (Add_Invariants): Set Nam to Name_Type_Invariant if from aspect.
1361 2014-07-17 Thomas Quinot <quinot@adacore.com>
1363 * exp_pakd.adb (Create_Packed_Array_Type.Install_PAT): For a
1364 non-bit-packed array, propagate Reverse_Storage_Order to the
1367 2014-07-17 Javier Miranda <miranda@adacore.com>
1369 * exp_disp.adb: Fix comment.
1370 * exp_pakd.adb: Minor reformatting.
1372 2014-07-17 Robert Dewar <dewar@adacore.com>
1374 * bindgen.adb (Gen_Elab_Calls): Skip reference to elab
1375 entity if none exists (Gen_Elab_Calls): Complain if clash with
1376 No_Multiple_Elaboration.
1377 * s-rident.ads, restrict.ads: Add restriction No_Multiple_Elaboration.
1378 * sem_util.adb (Build_Elaboration_Entity): Skip building entity
1380 * gnat_rm.texi: Document restriction No_Multiple_Elaboration.
1381 * sem_ch4.adb: Minor comment updates.
1383 2014-07-17 Ed Schonberg <schonberg@adacore.com>
1385 * exp_ch9.adb (Buid_Protected_Subprogram_Call): Preserve type
1386 of function call for later use when shared passive objects
1389 2014-07-17 Hristian Kirtchev <kirtchev@adacore.com>
1391 * par-ch13.adb (Get_Aspect_Specifications):
1392 Catch a case where the argument of SPARK aspect Refined_State
1393 is not properly parenthesized.
1395 2014-07-17 Hristian Kirtchev <kirtchev@adacore.com>
1397 * exp_ch6.adb (Expand_Ctrl_Function_Call): Do not extend
1398 the lifetime of a reference to an Ada 2012 container element.
1399 (Is_Element_Reference): New routine.
1401 2014-07-17 Robert Dewar <dewar@adacore.com>
1403 * ali.ads: Minor comment fix.
1404 * lib-writ.adb: Minor reformatting.
1406 2014-07-17 Ed Schonberg <schonberg@adacore.com>
1408 * sem_ch10.adb (Analyze_Proper_Body): When analyzing a subunit
1409 in ASIS mode, load another subunit only if it a subunit of the
1410 current one, not a sibling that has been reached through the
1411 analysis of an ancestor. This allows the construction of the
1412 ASIS tree for the subunit even when sibling subunits have errors.
1414 2014-07-17 Hristian Kirtchev <kirtchev@adacore.com>
1416 * sem_ch3.adb (Analyze_Declarations): Remove the guard which
1417 prevents the analysis of various contracts when the associated
1418 construct is erroneous.
1419 * sem_util.adb (Save_SPARK_Mode_And_Set): Do not query the
1420 SPARK_Pragma of an illegal or a partially decorated construct.
1422 2014-07-17 Robert Dewar <dewar@adacore.com>
1424 * s-imguns.ads: Minor reformatting.
1426 2014-07-17 Hristian Kirtchev <kirtchev@adacore.com>
1428 * exp_ch7.adb (Build_Finalization_Master): Move all local
1429 variables to the proper code section. When looking for an existing
1430 finalization master, inspect the ultimate ancestor type of the
1432 * sem_util.ads, sem_util.adb (Root_Type_Of_Full_View): New routine.
1434 2014-07-17 Robert Dewar <dewar@adacore.com>
1436 * aspects.ads, aspects.adb: Add entries for aspect Annotate.
1437 * gnat_rm.texi: Document Entity argument for pragma Annotate and
1439 * sem_ch13.adb (Analyze_Aspect_Specification): Add processing
1440 for Annotate aspect.
1441 * sem_prag.adb (Analyze_Pragma, case Annotate): Allow optional
1442 Entity argument at end.
1443 * sinfo.ads (N_Aspect_Specification): Add note on Annotate aspect.
1445 2014-07-17 Tristan Gingold <gingold@adacore.com>
1447 * s-imguns.ads: Fix minor typo.
1449 2014-07-17 Thomas Quinot <quinot@adacore.com>
1451 * sprint.adb: Minor reformatting.
1453 2014-07-17 Robert Dewar <dewar@adacore.com>
1455 * sprint.adb (Write_Itype): Print proper header for string
1458 2014-07-17 Steve Baird <baird@adacore.com>
1460 * sinfo.ads, sem_scil.ads: Improve comments, minor reformatting.
1462 2014-07-17 Vincent Celier <celier@adacore.com>
1464 * gnatbind.adb: Change in message "try ... for more information".
1466 2014-07-17 Robert Dewar <dewar@adacore.com>
1468 * sprint.adb: Code clean up.
1470 2014-07-17 Hristian Kirtchev <kirtchev@adacore.com>
1472 * exp_ch7.adb (Find_Last_Init): Relocate local variables to
1473 the relevant code section. Add new local constant Obj_Id. When
1474 a limited controlled object is initialized by a function call,
1475 the build-in-place object access function call acts as the last
1476 initialization statement.
1477 * exp_util.adb (Is_Object_Access_BIP_Func_Call): New routine.
1478 (Is_Secondary_Stack_BIP_Func_Call): Code reformatting.
1479 * exp_util.ads (Is_Object_Access_BIP_Func_Call): New routine.
1481 2014-07-17 Ed Schonberg <schonberg@adacore.com>
1483 * sem_ch8.adb (Analyze_Generic_Renaming): For generic subprograms,
1484 propagate intrinsic flag to renamed entity, to allow e.g. renaming
1485 of Unchecked_Conversion.
1486 * sem_ch3.adb (Analyze_Declarations): Do not analyze contracts
1487 if the declaration has errors.
1489 2014-07-17 Ed Schonberg <schonberg@adacore.com>
1491 * a-rbtgbk.adb: a-rbtgbk.adb (Generic_Insert_Post): Check whether
1492 container is busy before checking whether capacity allows for
1493 a further insertion. Insertion in a busy container that is full
1494 raises Program_Error rather than Capacity_Error. Previous to that
1495 patch which exception was raised varied among container types.
1497 2014-07-17 Robert Dewar <dewar@adacore.com>
1499 * g-comlin.ads, g-comlin.adb: Minor clean up.
1501 2014-07-17 Bob Duff <duff@adacore.com>
1503 * gnat_ugn.texi: Update gnatpp doc.
1505 2014-07-17 Robert Dewar <dewar@adacore.com>
1507 * gnat_rm.texi: Document new restriction No_Long_Long_Integers.
1508 * exp_ch4.adb (Make_Array_Comparison_Op): Add note that we
1509 could do this by actually expanding a real generic.
1510 * a-tags.ads: Add comments about performance.
1511 * sprint.adb (Sprint_Node_Actual, case N_Object_Declaration):
1512 Print Etype of defining identifier, rather than the object
1513 definition. More information.
1515 2014-07-17 Thomas Quinot <quinot@adacore.com>
1517 * exp_dist.adb: Minor documentation clarification.
1519 2014-07-17 Hristian Kirtchev <kirtchev@adacore.com>
1521 * exp_util.adb (Is_Aliased): Revert previous change.
1523 2014-07-17 Vincent Celier <celier@adacore.com>
1525 * g-comlin.adb (Try_Help): New procedure.
1526 (Getopt): Use new procedure Try_Help.
1527 * g-comlin.ads (Try_Help): New procedure.
1529 2014-07-17 Bob Duff <duff@adacore.com>
1531 * gnat_ugn.texi: Minor update.
1533 2014-07-17 Robert Dewar <dewar@adacore.com>
1535 * gnat_rm.texi: Improve documentation of Unrestricted_Access.
1536 * sinfo.ads: Document restriction on aggregates (must expand to
1537 assignments if one or more assignments needs expansion, e.g. for
1539 * sem_ch13.adb: All warning messages regarding bit order should
1541 * gnat_ugn.texi: Minor correction of missing @ on @code
1543 2014-07-17 Robert Dewar <dewar@adacore.com>
1545 * restrict.ads (Implementation_Restriction): Add No_Long_Long_Integer.
1546 * s-rident.ads (Partition_Boolean_Restrictions): Add
1547 No_Long_Long_Integer.
1548 * sem_ch3.adb (Modular_Type_Declaration): Size must be <=
1549 Long_Integer'Size if restriction No_Long_Long_Integer is active.
1550 (Signed_Integer_Type_Declaration): Do not allow Long_Long_Integer
1551 as the implicit base type for a signed integer type declaration
1552 if restriction No_Long_Long_Integer is active.
1553 * sem_util.ads, sem_util.adb (Set_Entity_With_Checks): Include check for
1554 No_Long_Long_Integer.
1556 2014-07-17 Robert Dewar <dewar@adacore.com>
1558 * sem_ch3.adb, a-ztexio.ads, exp_imgv.adb, casing.adb, casing.ads,
1559 einfo.ads, checks.adb, sem_ch12.adb, a-textio.ads, freeze.adb,
1560 repinfo.adb, exp_ch6.adb, sem_ch4.adb, a-witeio.ads, sem_ch8.adb,
1561 sem_warn.adb, exp_aggr.adb, exp_dist.adb, par-tchk.adb, s-fatgen.adb,
1562 treepr.adb, lib-xref.adb: Remove the word kludge from ada sources.
1564 2014-07-17 Robert Dewar <dewar@adacore.com>
1566 * debug.adb: Remove -gnatdQ.
1567 * exp_disp.adb: Remove -gnatdQ.
1568 * a-ztenio.ads, a-wtinio.ads, a-wtmoio.ads, a-ztcoau.ads, a-tiinio.ads,
1569 a-wtfiio.ads, a-timoio.ads, sem_ch12.adb, a-tifiio.ads, a-ztinio.ads,
1570 rtsfind.adb, rtsfind.ads, a-ztmoio.ads, a-wtdeio.ads, a-ztfiio.ads,
1571 a-tideio.ads, a-wtflio.ads, a-ztdeio.ads, sem_ch8.adb, a-tiflio.ads,
1572 sprint.adb, a-ztflio.ads, snames.ads-tmpl, a-wtenio.ads,
1573 a-tienio.ads: Rename Text_IO_Kludge to Text_IO_Special_Unit.
1575 2014-07-17 Robert Dewar <dewar@adacore.com>
1577 * back_end.adb: Minor reformatting and comment additions.
1578 * checks.ads, checks.adb (Duplicated_Tag_Checks_Suppressed): New
1580 * exp_disp.adb (Make_DT): Use Duplicated_Tag_Checks_Suppressed.
1581 (Make_VM_TSD): Use Duplicated_Tag_Checks_Suppressed.
1582 * gnat_rm.texi: Document new check Duplicated_Tag_Checks_Suppressed.
1583 * gnat_ugn.texi: Additional documentation for Duplicated_Tag_Check.
1584 * snames.ads-tmpl (Duplicated_Tag_Checks_Suppressed): New check.
1585 * types.ads (Duplicated_Tag_Checks_Suppressed): New check.
1587 2014-07-17 Robert Dewar <dewar@adacore.com>
1589 * gnat_rm.texi: Minor comment updates.
1591 2014-07-17 Ed Schonberg <schonberg@adacore.com>
1593 * sem_util.adb (Make_Explicit_Dereference): If the expression
1594 being dereferenced is a generalized indexing, reset the overloaded
1595 flag on the generalized indexing call, consistent with the
1596 resetting of the flag on the original indexed component.
1598 2014-07-17 Robert Dewar <dewar@adacore.com>
1600 * gnat_ugn.texi: Document advise not to mix -gnatV? and
1603 2014-07-17 Robert Dewar <dewar@adacore.com>
1605 * checks.adb (Insert_Valid_Check): Don't insist on a name
1606 for the prefix when we make calls to Force_Evaluation and
1607 Duplicate_Subexpr_No_Checks.
1608 * exp_util.adb (Is_Volatile_Reference): Handle all cases properly
1609 (Remove_Side_Effects): Handle all volatile references right
1610 (Side_Effect_Free): Volatile reference is never side effect free
1611 * sinfo.ads (N_Attribute_Reference): Add comments explaining
1612 that in the tree, the prefix can be a general expression.
1614 2014-07-17 Hristian Kirtchev <kirtchev@adacore.com>
1616 * sem_ch6.adb (Analyze_Subprogram_Body_Contract,
1617 Analyze_Subprogram_Contract): Add comments on SPARK_Mode save/restore.
1618 * sem_ch7.adb (Analyze_Package_Body_Contract,
1619 Analyze_Package_Contract): Add comments on SPARK_Mode save/restore.
1621 2014-07-17 Robert Dewar <dewar@adacore.com>
1623 * exp_ch7.ads, exp_util.ads: Document Insert_Action_After,
1624 Store_After_Actions_In_Scope.
1626 2014-07-17 Robert Dewar <dewar@adacore.com>
1628 * sem_aux.ads: Minor comment addition.
1630 2014-07-17 Ed Schonberg <schonberg@adacore.com>
1632 * sem_res.adb (Make_Call_Into_Operator): If the call is already
1633 a rewriting of an operator node, there are no actuals to be
1634 propagated from original node to rewritten node when in ASIS mode.
1636 2014-07-17 Hristian Kirtchev <kirtchev@adacore.com>
1638 * sem_ch6.adb (Analyze_Subprogram_Body_Contract,
1639 Analyze_Subprogram_Contract): Add new local variable Mode. Save
1640 and restore the SPARK mode of the related construct in a
1642 * sem_ch7.adb (Analyze_Package_Body_Contract,
1643 Analyze_Package_Contract): Add new local variable Mode. Save and
1644 restore the SPARK mode of the related construct in a stack-like fashion.
1645 * sem_util.adb Remove with and use clause for Opt.
1646 (Restore_SPARK_Mode): New routine.
1647 (Save_SPARK_Mode_And_Set): New routine.
1648 * sem_util.ads Add with and use clause for Opt.
1649 (Restore_SPARK_Mode): New routine.
1650 (Save_SPARK_Mode_And_Set): New routine.
1652 2014-07-17 Hristian Kirtchev <kirtchev@adacore.com>
1654 * exp_util.adb (Is_Aliased): Transient objects
1655 within an expression with actions cannot be considered aliased.
1657 2014-07-17 Thomas Quinot <quinot@adacore.com>
1659 * sem.ads (Scope_Stack_Entry): Reorganize storage of action lists;
1660 introduce a new list (cleanup actions) for each (transient) scope.
1661 * sinfo.ads, sinfo.adb (Cleanup_Actions): New attribute for
1663 * exp_ch7.ads (Store_Cleanup_Actions_In_Scope): New subprogram.
1664 * exp_ch7.adb (Store_Actions_In_Scope): New subprogram, common
1665 processing for Store_xxx_Actions_In_Scope.
1666 (Build_Cleanup_Statements): Allow for a list of additional
1667 cleanup statements to be passed by the caller.
1668 (Expand_Cleanup_Actions): Take custom cleanup actions associated
1669 with an N_Block_Statement into account.
1670 (Insert_Actions_In_Scope_Around): Account for Scope_Stack_Entry
1671 reorganization (refactoring only, no behaviour change).
1672 (Make_Transient_Block): Add assertion to ensure that the current
1673 scope is indeed a block (namely, the entity for the transient
1674 block being constructed syntactically, which has already been
1675 established as a scope). If cleanup actions are present in the
1676 transient scope, transfer them now to the transient block.
1677 * exp_ch6.adb (Expand_Protected_Subprogram_Call): Freeze the
1678 called function while it is still present as the name in a call
1679 in the tree. This may not be the case later on if the call is
1680 rewritten into a transient block.
1681 * exp_smem.adb (Add_Shared_Var_Lock_Procs): The post-actions
1682 inserted after calling a protected operation on a shared passive
1683 protected must be performed in a block finalizer, not just
1684 inserted in the tree, so that they are executed even in case of
1685 a normal (RETURN) or abnormal (exception) transfer of control
1686 outside of the current scope.
1687 * exp_smem.ads (Add_Shared_Var_Lock_Procs): Update documentation
1688 * sem_ch8.adb, expander.adb, exp_ch11.adb: Adjust for
1689 Scope_Stack_Entry reorganization.
1691 2014-07-17 Thomas Quinot <quinot@adacore.com>
1693 * exp_disp.adb (Make_DT, Make_VM_TSD): Do not omit Check_TSD
1694 call for types that do not have an explicit attribute definition
1695 clause for External_Tag, as their default tag may clash with an
1696 explicit tag defined for some other type.
1698 2014-07-17 Hristian Kirtchev <kirtchev@adacore.com>
1700 * exp_util.adb (Is_Controlled_Function_Call): Recognize a
1701 controlled function call with multiple actual parameters that
1702 appears in Object.Operation form.
1704 2014-07-17 Thomas Quinot <quinot@adacore.com>
1706 * einfo.ads, einfo.adb (Has_External_Tag_Rep_Clause): Remove
1708 * sem_ch13.adb (Analyze_Attribute_Definition_Clause, case
1709 External_Tag): No need to set entity flag.
1710 * sem_aux.ads, sem_aux.adb (Has_External_Tag_Rep_Clause):
1711 Reimplement correctly in terms of Has_Rep_Item.
1713 2014-07-17 Thomas Quinot <quinot@adacore.com>
1715 * exp_ch7.adb (Establish_Transient_Scope.Find_Node_To_Be_Wrapped):
1716 Start examining the tree at the node passed to
1717 Establish_Transient_Scope (not its parent).
1718 * exp_ch6.adb (Make_Build_In_Place_Call_In_Object_Declaration):
1719 The access type for the variable storing the reference to
1720 the call must be declared and frozen prior to establishing a
1722 * exp_ch9.adb: Minor reformatting.
1724 2014-07-17 Pascal Obry <obry@adacore.com>
1726 * s-os_lib.ads: Minor comment update.
1728 2014-07-17 Tristan Gingold <gingold@adacore.com>
1730 * sysdep.c: Add ATTRIBUTE_UNUSED to avoid warnings. Fix some
1732 * socket.c: Remove #warning to avoid warning.
1733 * expect.c: Indent some preprocessor directives to clarify
1734 nested if. Do not use wait.h on PikeOS. Add ATTRIBUTE_UNUSED
1736 * env.c: Fix indentation. Port to PikeOS.
1737 * gsocket.h: Port to PikeOS. Remove #warning.
1738 * terminals.c: Port to PikeOS. Fix indentation of the stubs.
1739 Add ATTRIBUTE_UNUSED to stubs arguments. Fix return statement
1740 of stubbed __gnat_setup_parent_communication.
1741 * adaint.c: Port to PikeOS. Reindent some preprocessor
1742 directives to clarify nested if. Fix indentation. Add missing
1745 2014-07-17 Robert Dewar <dewar@adacore.com>
1747 * sem_attr.adb: Minor reformatting.
1749 2014-07-17 Robert Dewar <dewar@adacore.com>
1751 * exp_ch7.adb, exp_ch7.ads, sinfo.ads: Minor reformatting.
1753 2014-07-17 Ed Schonberg <schonberg@adacore.com>
1755 * sem_case.adb (Check_Choice_Set): If the case expression is the
1756 expression in a predicate, do not recheck coverage against itself,
1757 to prevent spurious errors.
1758 * sem_ch13.adb (Check_Aspect_At_End_Of_Declarations): Indicate that
1759 expression comes from an aspect specification, to prevent spurious
1760 errors when expression is a case expression in a predicate.
1762 2014-07-17 Pascal Obry <obry@adacore.com>
1764 * adaint.c, adaint.h (__gnat_set_executable): Add mode parameter.
1765 * s-os_lib.ads, s-os_lib.adb (Set_Executable): Add Mode parameter.
1767 2014-07-17 Vincent Celier <celier@adacore.com>
1769 * gnatchop.adb, make.adb, gnatbind.adb, clean.adb, gprep.adb,
1770 gnatxref.adb, gnatls.adb, gnatfind.adb, gnatname.adb: Do not output
1771 the usage for an erroneous invocation of a gnat tool.
1773 2014-07-16 Vincent Celier <celier@adacore.com>
1775 * gnatls.adb: Get the target parameters only if -nostdinc was
1778 2014-07-16 Ed Schonberg <schonberg@adacore.com>
1780 * checks.adb (Insert_Valid_Check): If the expression is a packed
1781 component of a modular type of the right size the data is always
1782 valid. This os particularly useful if the component is part of
1783 a volatile variable.
1785 2014-07-16 Robert Dewar <dewar@adacore.com>
1787 * gnat_rm.texi, sinfo.ads, freeze.adb, exp_aggr.adb: Minor reformatting
1789 2014-07-16 Thomas Quinot <quinot@adacore.com>
1791 * exp_ch7.ads: Minor documentation fix.
1793 2014-07-16 Ed Schonberg <schonberg@adacore.com>
1795 * sem_ch3.adb (Find_Type_Name): Diagnose properly
1796 a private extension completion that is an interface definition
1797 with an interface list.
1799 2014-07-16 Arnaud Charlet <charlet@adacore.com>
1801 * gnatls.adb (Gnatls): Code clean ups.
1803 2014-07-16 Thomas Quinot <quinot@adacore.com>
1805 * sinfo.ads, sinfo.adb (N_Compound_Statement): New node kind.
1806 * sem.adb (Analyze): Handle N_Compound_Statement.
1807 * sprint.adb (Sprint_Node_Actual): Ditto.
1808 * sem_ch5.ads, sem_ch5.adb (Analyze_Compound_Statement): New
1809 procedure to handle N_Compound_Statement.
1810 * exp_aggr.adb (Collect_Initialization_Statements):
1811 Use a proper compound statement node, instead of a bogus
1812 expression-with-actions with a NULL statement as its expression,
1813 to wrap collected initialization statements.
1814 * freeze.ads, freeze.adb
1815 (Explode_Initialization_Compound_Statement): New public procedure,
1816 lifted from Freeze_Entity.
1817 (Freeze_Entity): When freezing
1818 an object with captured initialization statements and without
1819 delayed freezing, explode compount statement.
1820 * sem_ch4.adb (Analyze_Expression_With_Actions): Remove special
1821 case that used to handle bogus EWAs with NULL statement as
1823 * exp_ch13.adb (Expand_N_Freeze_Entity): For an object with
1824 delayed freezing and captured initialization statements, explode
1827 2014-07-16 Gary Dismukes <dismukes@adacore.com>
1829 * g-rewdat.adb, g-rewdat.ads: Minor reformatting.
1831 2014-07-16 Doug Rupp <rupp@adacore.com>
1833 * s-interr-hwint.adb: Casing error on parameter.
1835 2014-07-16 Pascal Obry <obry@adacore.com>
1837 * Makefile.rtl: Add g-rewdat.o dependencies in
1838 GNATRTL_NONTASKING_OBJS.
1840 2014-07-16 Ed Schonberg <schonberg@adacore.com>
1842 * sem_case.adb: Code clean up.
1844 2014-07-16 Vincent Celier <celier@adacore.com>
1846 * make.adb: Do not read gnat.adc when gnatmake is invoked
1849 2014-07-16 Pascal Obry <obry@adacore.com>
1851 * gnat_rm.texi, impunit.adb, g-rewdat.adb, g-rewdat.ads: Initial
1852 implementation of GNAT.Rewrite_Data.
1854 2014-07-16 Vincent Celier <celier@adacore.com>
1856 * gnatls.adb (Normalize): New function.
1857 (Gnatls): Get the target parameters. On targets other than VMS,
1858 normalize the path names in the source search path, the object search
1859 path and the project search path.
1861 2014-07-16 Ed Schonberg <schonberg@adacore.com>
1863 * sem_case.adb: Avoid self-checking of case expressions in
1866 2014-07-16 Robert Dewar <dewar@adacore.com>
1868 * gnat_rm.texi: Document effect of Suppress_Initialization on tags and
1871 2014-07-16 Eric Botcazou <ebotcazou@adacore.com>
1873 * switch-b.adb (Scan_Binder_Switches): Add missing guard.
1875 2014-07-16 Ben Brosgol <brosgol@adacore.com>
1877 * gnat_ugn.texi: Fix typo.
1879 2014-07-16 Ed Schonberg <schonberg@adacore.com>
1881 * exp_ch4.adb (Expand_N_Case_Expression): Do not expand case
1882 expression if it is the specification of a subtype predicate:
1883 it will be expanded when the return statement is analyzed, or
1884 when a static predicate is transformed into a static expression
1885 for evaluation by the front-end.
1886 * sem_ch13.adb (Get_RList): If the expression for a static
1887 predicate is a case expression, extract the alternatives of the
1888 branches with a True value to create the required statically
1889 evaluable expression.
1891 2014-07-16 Thomas Quinot <quinot@adacore.com>
1893 * exp_prag.adb (Expand_Pragma_Check): Use the location of the
1894 expression, not the location of the aspect, for all generated
1895 code, so that in particular the call to raise_assert_failure
1896 gets the sloc of the associated condition.
1898 (Expand_Subprogram_Contract.Build_Postconditions_Procedure):
1899 Set an explicit End_Label on the handled sequence of statements
1900 for the _Postconditions procedure so that the implicit return
1901 statement does not erroneously get associated with code generated
1902 for the last condition in postconditions.
1904 2014-07-16 Thomas Quinot <quinot@adacore.com>
1906 * ug_words: Fix name of VMS synonym for -gnatw.z (SIZE_ALIGNMENT,
1907 not SIZE_ALIGN) and -gnatw.Z (NOSIZE_ALIGNMENT, not NOSIZE_ALIGN).
1908 * vms_data.ads: Add missing spaces in VMS synonyms for -gnatw.z /
1911 2014-07-16 Robert Dewar <dewar@adacore.com>
1913 * sem_ch3.adb, sem_prag.adb, sem_util.adb, sem_res.adb, sem_ch13.adb:
1914 Minor code reorganization (use Is_Access_Type, not in Access_Kind).
1915 * exp_ch3.adb: Minor code reorganization, use Is_Access_Type,
1917 * par-ch4.adb (At_Start_Of_Attribute): New function
1918 (P_Simple_Expression): Better msg for bad attribute prefix.
1919 * scans.ads: Minor reformatting.
1921 2014-07-16 Ed Schonberg <schonberg@adacore.com>
1923 * sem_attr.adb (Resolve_Attribute, case 'Update): If choice is a
1924 static constant, check that in belongs to the corresponding index
1925 subtype, to produce the proer warning when expansion is disabled.
1927 2014-07-16 Robert Dewar <dewar@adacore.com>
1929 * freeze.adb (Freeze_Entity): Warn on incompatible size/alignment.
1930 * gnat_ugn.texi: Document -gnatw.z and -gnatw.Z.
1931 * ug_words: VMS synonyms (WARNINGS=[NO]SIZE_ALIGN) for -gnatw.z/-gnatw.Z
1932 * usage.adb: Add lines for -gnatw.z/-gnatw.Z.
1933 * vms_data.ads: VMS synonyms (WARNINGS=[NO]SIZE_ALIGN) for
1935 * warnsw.adb: Set Warn_On_Size_Alignment appropriately.
1936 * warnsw.ads (Warn_On_Size_Alignment): New flag Minor
1939 2014-07-16 Hristian Kirtchev <kirtchev@adacore.com>
1941 * exp_ch7.adb (Process_Declarations): Reinstate the check on
1942 a hook object to ensure that the related transient declaration
1944 * exp_util.adb (Is_Aliased): Do not consider expresison with
1945 actions as a special context.
1946 (Requires_Cleanup_Actions): Reinstate the check on a hook object to
1947 ensure that the related transient declaration is finalizable.
1949 2014-07-16 Robert Dewar <dewar@adacore.com>
1951 * checks.ads, checks.adb (Allocation_Checks_Suppressed): New function.
1952 * snames.ads-tmpl: Add Allocation_Check to list of check names.
1953 * types.ads: Add Allocation_Check to list of check names.
1955 2014-07-16 Thomas Quinot <quinot@adacore.com>
1957 * sem_util.adb (Enter_Name): replace bogus test for presence of
1958 Corresponding_Remote_Type with correct test on Ekind.
1959 * sem_res.adb (Valid_Conversion): ditto; also clarify validity
1960 of calls to Corresponding_ Remote_Type (documentation fix).
1962 2014-07-16 Robert Dewar <dewar@adacore.com>
1964 * gnat_rm.texi: Document illegal case of Unrestricted_Access.
1965 * sem_attr.adb (Analyze_Access_Attribute): Set_Non_Aliased_Prefix
1967 (Resolve_Attribute, case Access): Flag illegal Unrestricted_Access use.
1968 * sinfo.ads, sinfo.adb (Non_Aliased_Prefix): New flag.
1970 2014-07-16 Robert Dewar <dewar@adacore.com>
1972 * gnat_ugn.texi: Document binder switch -Ra.
1973 * gnatbind.adb (List_Closure_Display): Implement -Ra switch
1975 * opt.ads (List_Closure_All): New switch.
1976 * switch-b.adb (Scan_Binder_Switches): Recognize -Ra to set
1979 2014-07-16 Ben Brosgol <brosgol@adacore.com>
1981 * gnat_rm.texi: Minor edits, to make case consistent in names
1982 of types and fields.
1984 2014-07-16 Robert Dewar <dewar@adacore.com>
1986 * gnat_rm.texi: Document erroneous mixing of thin pointers and
1988 * gnat_ugn.texi: Add note on size of access types about thin
1989 pointers and the use of attribute Unrestricted_Access.
1991 2014-07-16 Ed Schonberg <schonberg@adacore.com>
1993 * a-cbdlli.ads, a-cbdlli.adb, a-cbhama.ads, a-cbhama.adb,
1994 * a-cbhase.ads, a-cbhase.adb, a-cborma.ads, a-cborma.adb,
1995 * a-cborse.ads, a-cborse.adb, a-cobove.ads a-cobove.adb: Add Control
1996 machinery to detect tampering on bounded vectors.
1998 2014-07-16 Robert Dewar <dewar@adacore.com>
2000 * gnat_rm.texi: Document that leading/trailing asterisks are
2001 now implied for the pattern match string for pragma Warnings
2002 and Warning_As_Error.
2003 * sem_prag.adb (Acquire_Warning_Match_String): New procedure.
2004 (Analyze_Pragma, case Warning_As_Error): Call
2005 Acquire_Warning_Match_String.
2006 (Analyze_Pragma, case Warnings): Call Acquire_Warning_Match_String.
2008 2014-07-16 Bob Duff <duff@adacore.com>
2010 * gnat_ugn.texi: Document need for project file
2011 for --incremental switch for gnat2xml.
2013 2014-07-16 Robert Dewar <dewar@adacore.com>
2015 * gnat_rm.texi: Fix example of non-packable components in packed
2018 2014-07-16 Robert Dewar <dewar@adacore.com>
2020 * s-tpoben.adb, s-tasren.adb, s-interr.adb, s-interr-hwint.adb,
2021 s-shasto.adb, s-interr-vms.adb, s-interr-sigaction.adb: Avoid use of
2022 upper case in exception messages.
2024 2014-07-16 Robert Dewar <dewar@adacore.com>
2026 * snames.ads-tmpl, sem_attr.adb, exp_attr.adb: Same_Storage attribute
2027 is renamed Has_Same_Storage.
2028 * gnat_rm.texi: Document missing SPARK pragmas and attributes.
2029 * sem_prag.adb: Minor comment fix (use LOCAL_NAME in syntax
2032 2014-07-16 Robert Dewar <dewar@adacore.com>
2034 * exp_util.adb, sem_attr.adb, exp_ch4.adb, a-cohase.ads,
2035 a-coinho-shared.adb, a-coinho-shared.ads: Minor reformatting.
2037 2014-07-16 Robert Dewar <dewar@adacore.com>
2039 * gnat_ugn.texi: Add note that integrated
2040 preprocessing cannot be applied to configuration pragma files.
2042 2014-07-16 Yannick Moy <moy@adacore.com>
2044 * sem_attr.adb (Analyze_Attribute/cases Pred
2045 and Succ): Always enable range check on fixed-point types if
2046 not suppressed for the type.
2048 2014-07-16 Hristian Kirtchev <kirtchev@adacore.com>
2050 * sem_util.adb (State_Has_Enabled_Property):
2051 Account for an external property denoted by an others choice.
2053 2014-07-16 Hristian Kirtchev <kirtchev@adacore.com>
2055 * exp_ch4.ads, exp_ch4.adb (Find_Hook_Context): Relocated to Exp_Util.
2056 * exp_ch7.adb (Process_Declarations): There is no need to check
2057 that a transient object being hooked is controlled as it would
2058 not have been hooked in the first place.
2059 * exp_ch9.adb Remove with and use clause for Exp_Ch4.
2060 * exp_util.adb (Find_Hook_Context): Relocated from Exp_Ch4.
2061 (Is_Aliased): A renaming of a transient controlled object is
2062 not considered aliasing when it occurs within an expression
2064 (Requires_Cleanup_Actions): There is no need to
2065 check that a transient object being hooked is controlled as it
2066 would not have been hooked in the first place.
2067 * exp_util.ads (Find_Hook_Context): Relocated from Exp_Ch4.
2069 2014-07-16 Hristian Kirtchev <kirtchev@adacore.com>
2071 * sem_ch13.adb (Insert_After_SPARK_Mode): Moved to
2072 the outer level of routine Analyze_Aspect_Specifications. Ensure
2073 that the corresponding pragmas of aspects Initial_Condition and
2074 Initializes are inserted after pragma SPARK_Mode.
2076 2014-07-16 Ed Schonberg <schonberg@adacore.com>
2078 * sem_attr.adb (Analyze_Attribute, case 'Update): Handle
2079 properly a choice list with more than one choice, where each
2080 is an aggregate denoting a sequence of array indices for a
2081 multidimentional array. For SPARK use.
2083 2014-07-16 Vadim Godunko <godunko@adacore.com>
2085 * a-coinho-shared.adb (Adjust): Create
2086 copy of internal shared object and element when source container
2089 (Query_Element): Likewise.
2090 (Update_Element): Likewise.
2091 (Constant_Reference): Likewise. Raise Constraint_Error on attempt
2092 to get reference for empty holder.
2093 (Reference): Likewise.
2095 2014-07-16 Thomas Quinot <quinot@adacore.com>
2097 * exp_ch4.adb (Find_Hook_Context): New subprogram, extracted
2098 from Process_Transient_Oject.
2099 * exp_ch4.ads: Ditto.
2100 * exp_ch9.adb (Build_Class_Wide_Master): Insert the _master
2101 declaration as an action on the topmost enclosing expression,
2102 not on a possibly conditional subexpreession.
2104 2014-07-16 Vadim Godunko <godunko@adacore.com>
2106 * a-coinho.adb, a-coinho-shared.adb, a-coinho.ads, a-coinho-shared.ads:
2107 Fix parameter mode of Update_Element.
2109 2014-07-16 Robert Dewar <dewar@adacore.com>
2111 * a-coinho.adb, a-coinho-shared.adb, a-coinho-shared.ads: Minor
2114 2014-07-16 Ed Schonberg <schonberg@adacore.com>
2116 * a-cohase.ads: Type Iterator must be controlled, so that the
2117 tampering bit is properly set through an iteration.
2118 * a-cohase.adb: Add Finalize operation for type Iterator.
2120 2014-07-16 Ed Schonberg <schonberg@adacore.com>
2122 * a-coinho-shared.adb, a-coinho-shared.ads: Proper structures for
2125 2014-07-16 Ed Schonberg <schonberg@adacore.com>
2127 * a-coinho-shared.adb: Fix spurious accessibility check.
2129 2014-06-15 Jan Hubicka <hubicka@ucw.cz>
2131 * gcc-interface/utils.c (process_attributes): Use set_decl_tls_model.
2133 2014-06-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
2136 * gnat_rm.texi: Fix errors with makeinfo 5.1.
2138 2014-06-14 Arnaud Charlet <charlet@adacore.com>
2141 * gnat_rm.texi: Attempt to fix error with makeinfo 5.1.
2143 2014-06-13 Yannick Moy <moy@adacore.com>
2145 * exp_attr.adb: Fix typo in comment.
2146 * gnat1drv.adb (Adjust_Global_Switches): Force float overflow
2147 checking in GNATprove_Mode.
2149 2014-06-13 Ed Schonberg <schonberg@adacore.com>
2151 * a-coinho-shared.adb, a-coinho-shared.ads: Update shared version.
2153 2014-06-13 Robert Dewar <dewar@adacore.com>
2155 * sem_ch3.adb, sem_ch9.adb, a-coinho.adb, a-coinho.ads: Minor
2158 2014-06-13 Hristian Kirtchev <kirtchev@adacore.com>
2160 * sem_prag.adb (Analyze_Pragma): Add local
2161 variable Missing_Parentheses. Emit an error when a state
2162 declaration with options appears without parentheses. Add a
2163 guard to prevent a bogus error when a state declaration may be
2164 interpreted as an option if a previous declaration with options
2165 was not parenthesized.
2167 2014-06-13 Robert Dewar <dewar@adacore.com>
2169 * checks.adb: Validate_Alignment_Check_Warnings: New procedure
2170 (Apply_Address_Clause_Check): Make Aligment_Warnings table entry.
2171 * checks.ads (Alignment_Warnings_Record): New type.
2172 (Alignment_Warnings): New table
2173 (Validate_Alignment_Check_Warnings): New procedure.
2174 * errout.adb (Delete_Warning_And_Continuations): New procedure
2175 (Error_Msg_Internal): Set Warning_Msg (Delete_Warning): Handle
2176 Warnings_Treated_As_Errors (Finalize): Minor reformatting
2177 * errout.ads (Warning_Msg): New variable
2178 (Delete_Warning_And_Continuations): New procedure
2179 * erroutc.adb (Delete_Msg): Handle Warnings_Treated_As_Errors count.
2180 * gnat1drv.adb (Post_Compilation_Validation_Checks): New procedure.
2182 2014-06-13 Ed Schonberg <schonberg@adacore.com>
2184 * a-coinho.adb, a-coinho.ads: Add Reference machinery.
2186 2014-06-13 Hristian Kirtchev <kirtchev@adacore.com>
2188 * errout.adb (SPARK_Msg_N): New routine.
2189 (SPARK_Msg_NE): New routine.
2190 * errout.ads Add a section on SPARK-related error routines.
2191 (SPARK_Msg_N): New routine.
2192 (SPARK_Msg_NE): New routine.
2193 * sem_ch13.adb (Analyze_Aspect_Specifications): Ensure that
2194 pragma Abstract_State is always inserted after SPARK_Mode.
2195 (Insert_After_SPARK_Mode): New routine.
2196 * sem_prag.adb (Analyze_Abstract_State,
2197 Analyze_Constituent, Analyze_External_Property,
2198 Analyze_External_Property_In_Decl_Part, Analyze_Global_Item,
2199 Analyze_Global_List, Analyze_Initialization_Item,
2200 Analyze_Initialization_Item_With_Inputs, Analyze_Input_Item,
2201 Analyze_Input_List, Analyze_Input_Output, Analyze_Part_Of,
2202 Analyze_Pragma, Analyze_Refined_Depends_In_Decl_Part,
2203 Analyze_Refined_Global_In_Decl_Part,
2204 Analyze_Refined_State_In_Decl_Part, Analyze_Refinement_Clause,
2205 Check_Aspect_Specification_Order, Check_Constituent_Usage,
2206 Check_Declaration_Order, Check_Dependency_Clause,
2207 Check_Duplicate_Mode, Check_Duplicate_Option,
2208 Check_Duplicate_Property, Check_External_Properties,
2209 Check_External_Property, Check_Function_Return,
2210 Check_Matching_Constituent, Check_Matching_State,
2211 Check_Mode_Restriction_In_Enclosing_Context,
2212 Check_Mode_Restriction_In_Function, Check_Refined_Global_Item,
2213 Check_State_And_Constituent_Use, Create_Or_Modify_Clause,
2214 Has_Extra_Parentheses, Inconsistent_Mode_Error,
2215 Match_Error, Propagate_Part_Of, Report_Extra_Clauses,
2216 Report_Extra_Constituents_In_List, Report_Extra_Inputs,
2217 Report_Unrefined_States, Report_Unused_Constituents,
2218 Report_Unused_States, Role_Error, Usage_Error):
2219 Convert Error_Msg_XXX calls to SPARK_Msg_XXX calls
2220 to report semantic errors only when SPARK_Mode is on.
2221 (Analyze_Depends_In_Decl_Part): Do not check the syntax of
2222 pragma Depends explicitly, this is now done by the analysis.
2223 (Analyze_Global_In_Decl_List): Do not check the syntax of
2224 pragma Global explicitly, this is now done by the analysis.
2225 (Analyze_Initializes_In_Decl_Part): Do not check the syntax of
2226 pragma Initializes explicitly, this is now done by the analysis.
2227 (Analyze_Part_Of): Do not check the syntax of the encapsulating
2228 state, this is now done by the analysis.
2229 (Analyze_Pragma): Do
2230 not check the syntax of a state declaration, this is now done
2232 (Analyze_Refined_Depends_In_Decl_Part): Do not
2233 check the syntax of pragma Refined_Depends explicitly, this is now
2234 done by the analysis.
2235 (Analyze_Refined_Global_In_Decl_Part): Do
2236 not check the syntax of pragma Refined_Global explicitly, this is
2237 now done by the analysis.
2238 (Analyze_Refined_State_In_Decl_Part):
2239 Do not check the syntax of pragma Refined_State explicitly, this
2240 is now done by the analysis.
2241 (Check_Dependence_List_Syntax): Removed.
2242 (Check_Global_List_Syntax): Removed.
2243 (Check_Initialization_List_Syntax): Removed.
2244 (Check_Item_Syntax): Removed.
2245 (Check_Missing_Part_Of): Do not consider items from an instance.
2246 (Check_Refinement_List_Syntax): Removed.
2247 (Check_State_Declaration_Syntax): Removed.
2248 (Collect_Global_List): Do not raise Program_Error when the input is
2250 (Process_Global_List): Do not raise Program_Error when the input
2252 * sem_ch13.adb: Minor reformatting.
2254 2014-06-13 Ed Schonberg <schonberg@adacore.com>
2256 * sem_ch3.adb (Find_Type_Name): Diagnose a private type completion
2257 that is an interface definition with an interface list.
2258 (Process_Full_View): Move error message on missmatched interfaces
2259 between views to the declaration of full view, for clarity.
2260 * sem_ch9.adb (Check_Interfaces): Move error message to full view,
2263 2014-06-13 Robert Dewar <dewar@adacore.com>
2265 * exp_attr.adb (Expand_N_Attribute_Reference, case Pred/Succ): Change
2268 2014-06-13 Robert Dewar <dewar@adacore.com>
2270 * makeutl.adb: Minor reformatting.
2272 2014-06-13 Gail Schenker <schenker@adacore.com>
2274 * debug.adb, sem_eval.adb (Why_Not_Static): Remove temporary code and
2275 associated flag (d.z), no longer needed.
2277 2014-06-13 Ed Schonberg <schonberg@adacore.com>
2279 * sem_ch13.adb (Analyze_Aspect_Specifications): For Import and
2280 Export aspects, do not check whether a corresponding Convention
2281 aspect has been specified. Convention is optional in Ada2012,
2282 and defaults to Convention_Ada.
2284 2014-06-13 Eric Botcazou <ebotcazou@adacore.com>
2286 * checks.adb (Apply_Address_Clause_Check): Only issue the new
2287 warning if the propagation warning is issued.
2289 2014-06-13 Thomas Quinot <quinot@adacore.com>
2291 * exp_ch4.adb: Minor reformatting.
2293 2014-06-13 Robert Dewar <dewar@adacore.com>
2295 * exp_attr.adb (Expand_N_Attribute_Reference, case Pred):
2296 Handle float range check case (Expand_N_Attribute_Reference,
2297 case Succ): Handle float range check case.
2298 * sem_attr.adb (Analyze_Attribute, case Pred/Succ): Handle float
2301 2014-06-13 Vincent Celier <celier@adacore.com>
2303 * makeutl.ads (Compute_Builder_Switches): Change name of
2304 parameter Root_Environment to Env.
2305 * prj-conf.adb (Check_Switches): Call Locate_Runtime with the
2306 Env parameter of procedure Get_Or_Create_Configuration_File.
2307 (Locate_Runtime): Call Find_Rts_In_Path with the Project_Path
2308 of new parameter Env.
2309 * prj-conf.ads (Locate_Runtime): New parameter Env of type
2310 Prj.Tree.Environment.
2312 2014-06-13 Robert Dewar <dewar@adacore.com>
2314 * gnat_rm.texi: Minor comment clarification for Check_Float_Overflow.
2316 2014-06-13 Robert Dewar <dewar@adacore.com>
2318 * exp_attr.adb, exp_ch9.adb, lib-writ.adb, g-comlin.adb: Minor
2320 * sem_attr.adb: Minor code reformatting and simplification.
2321 * checks.adb: Fix minor typo.
2323 2014-06-13 Emmanuel Briot <briot@adacore.com>
2325 * g-comlin.adb (Get_Argument): fix expansion
2326 of command line arguments (e.g. "*.adb") when using a custom
2327 parser. The parser was not passed to the recursive call, and
2328 thus we were trying to do the expansion on the default command
2331 2014-06-13 Thomas Quinot <quinot@adacore.com>
2333 * exp_ch9.adb: Minor reformatting.
2335 2014-06-13 Ed Schonberg <schonberg@adacore.com>
2337 * exp_attr.adb (Expand_N_Attribute_Reference, case 'Old):
2338 To determine whether the attribute should be expanded, examine
2339 whether the enclosing postcondition pragma is to be checked,
2340 rather than using the internal flag Assertions_Enabled.
2342 2014-06-13 Ben Brosgol <brosgol@adacore.com>
2344 * gnat_rm.texi: Minor fixes.
2345 * gnat_ugn.texi: Added a missing "@itemize".
2347 2014-06-13 Robert Dewar <dewar@adacore.com>
2349 * debug.adb: Remove -gnatd.1 flag documentation.
2350 * layout.adb (Layout_Type): Remove special handling of size
2351 for anonymous access type.
2352 * sem_ch3.adb (Replace_Type): Remove special handling of size
2353 for anonymous access type.
2355 2014-06-13 Robert Dewar <dewar@adacore.com>
2357 * debug.adb: Document debug flag -gnatd.1.
2358 * layout.adb (Layout_Type): Size change for anonymous access
2359 types under -gnatd.1.
2360 * sem_ch3.adb (Replace_Type): Size change for anonymous access
2361 types under -gnatd.1.
2363 2014-06-13 Robert Dewar <dewar@adacore.com>
2365 * layout.adb (Layout_Type): Anonymous access types designating
2366 unconstrained arrays are always thin pointers.
2367 * sem_ch3.adb (Replace_Type): Anonymous access types designating
2368 unconstrained arrays are always thin pointers.
2370 2014-06-13 Ed Schonberg <schonberg@adacore.com>
2372 * sem_attr.adb (Analyze_Attribute): Use Check_Parameterless_Call
2373 to resolve the prefix of an attribute that is an entity name
2374 and may be a parameterless call. Minor code reorganization.
2376 2014-06-13 Robert Dewar <dewar@adacore.com>
2378 * lib.ads, lib.adb, lib-writ.adb, lib-load.adb (Is_Compiler_Unit):
2380 * opt.ads (Compiler_Unit): New flag.
2381 * par-ch5.adb (Test_Statement_Required): Call Check_Compiler_Unit
2382 for null statement sequence (not allowed in compiler unit).
2383 * par-prag.adb (Prag): Handle Compiler_Unit[_Warning] during
2385 * restrict.ads, restrict.adb (Check_Compiler_Unit): New version and new
2387 * sem_ch11.adb, sem_ch3.adb, sem_ch4.adb: New calling sequence for
2388 Check_Compiler_Unit.
2389 * sem_ch6.adb (Analyze_Extended_Return_Statement): Call
2390 Check_Compiler_Unit (this construct is not allowed in compiler
2392 * sem_prag.adb (Analyze_Pragma, case Compiler_Unit[_Warning]):
2393 Set Opt.Compiler_Unit.
2395 2014-06-13 Geert Bosch <bosch@adacore.com>
2397 * gnat_rm.texi, s-tasinf-solaris.ads, sem_prag.adb, gnat_ugn.texi,
2398 s-tasinf-mingw.ads, s-tasinf.ads, s-tasinf-linux.ads,
2399 s-tasinf-vxworks.ads: Make Task_Info pragma and package obsolescent.
2401 2014-06-13 Robert Dewar <dewar@adacore.com>
2403 * s-tasini.adb, s-tarest.adb, s-taprob.adb: Minor reformatting.
2405 2014-06-13 Hristian Kirtchev <kirtchev@adacore.com>
2407 * freeze.adb (Freeze_Entity): Remove the check concerning volatile
2408 types in SPARK as it is poorly placed and poorly formulated. The
2409 check was flagging ALL volatile entities as illegal in SPARK.
2410 * sem_prag.adb (Process_Atomic_Shared_Volatile): Flag volatile
2411 types as illegal in SPARK.
2413 2014-06-13 Robert Dewar <dewar@adacore.com>
2415 * sem_cat.adb: Minor reformatting.
2417 2014-06-13 Yannick Moy <moy@adacore.com>
2419 * sem_prag.adb (Analyze_Pragma/Post_Class): Fix typo.
2421 2014-06-13 Arnaud Charlet <charlet@adacore.com>
2423 * gnat_rm.texi: Add detail on SPARK_05 restriction.
2425 2014-06-13 Bob Duff <duff@adacore.com>
2427 * s-solita.adb (Get_Sec_Stack_Addr, Init_Tasking_Soft_Links):
2428 Add assertions requiring the secondary stack to be initialized.
2429 * s-solita.ads (Init_Tasking_Soft_Links): Comment.
2430 * s-taprob.adb, s-tarest.adb, s-tasini.adb (elab code): Make sure the
2431 secondary stack is initialized before calling Init_Tasking_Soft_Links,
2432 by adding pragmas Elaborate_Body.
2434 2014-06-13 Thomas Quinot <quinot@adacore.com>
2436 * sem_ch13.adb (Analyze_Stream_TSS_Definition): Remove temporary
2437 kludge disabling new legality check.
2439 2014-06-13 Hristian Kirtchev <kirtchev@adacore.com>
2441 * freeze.adb (Freeze_Record_Type): Remove checks related to SPARK
2443 (Freeze_Type): Volatile types are now illegal in SPARK.
2445 2014-06-13 Robert Dewar <dewar@adacore.com>
2447 * aspects.ads, aspects.adb: Add aspect Thread_Local_Storage.
2448 * gnat_rm.texi: Document aspect Thread_Local_Storage.
2450 2014-06-13 Ed Schonberg <schonberg@adacore.com>
2452 * sem_cat.adb (Validate_Static_Object_Name): A constant whose
2453 value is a temporary that renames an aggregate is legal in a
2454 preelaborated unit. Illegalities, if any will be detected in
2455 the aggregate components.
2457 2014-06-13 Ed Schonberg <schonberg@adacore.com>
2459 * einfo.ads: Minor reformatting an comment expansion.
2461 2014-06-13 Robert Dewar <dewar@adacore.com>
2463 * back_end.ads, back_end.adb: Make_Id, Make_SC, Set_RND are moved to
2465 * tbuild.ads, tbuild.adb: Make_Id, Make_SC, Set_RND are moved here from
2467 * gnat1drv.adb: Make_Id, Make_SC, Set_RND are moved to Tbuild
2468 * sem_warn.adb: Minor reformatting.
2470 2014-06-13 Doug Rupp <rupp@adacore.com>
2472 * adaint.c (__gnat_open_new_temp) [VMS]: Open binary
2475 2014-06-13 Yannick Moy <moy@adacore.com>
2477 * sem_warn.adb (Check_Unset_References): Take
2478 case of Refined_Post into account in Within_Postcondition check.
2480 2014-06-13 Hristian Kirtchev <kirtchev@adacore.com>
2482 * freeze.adb (Freeze_Record_Type): Volatile types are not allowed in
2485 2014-06-13 Yannick Moy <moy@adacore.com>
2487 * sem_ch13.adb (Analyze_Aspect_Specifications/Aspect_Import,
2488 Aspect_Export): Consider that variables may be set outside the program.
2490 2014-06-13 Robert Dewar <dewar@adacore.com>
2492 * back_end.adb (Make_Id): New function.
2493 (Make_SC): New function.
2494 (Set_RND): New procedure.
2495 * back_end.ads (Make_Id): New function.
2496 (Make_SC): New function.
2497 (Set_RND): New procedure.
2498 * einfo.ads: Minor comment updates.
2499 * frontend.adb: Move Atree.Initialize call to Gnat1drv.
2500 * gnat1drv.adb (Gnat1drv): New calling sequence for
2501 Get_Target_Parameters.
2502 (Gnat1drv): Move Atree.Initialize here from Frontend.
2503 * targparm.adb (Get_Target_Parameters): New calling
2504 sequence (Get_Target_Parameters): Handle pragma Restriction
2506 * targparm.ads (Get_Target_Parameters): New calling sequence.
2508 2014-06-13 Gary Dismukes <dismukes@adacore.com>
2510 * sem_prag.adb (Process_Import_Or_Interface): Exit the homonym
2511 loop if the pragma does not come from source, so that an implicit
2512 pragma Import only applies to the first declaration, avoiding
2513 possible conflicts with earlier explicit and implicit declarations
2514 due to multiple Provide_Shift_Operators pragmas.
2515 (Set_Imported): Remove previous fix that bypassed pragma duplication
2517 * gnat_rm.texi: Change 'equivalent' to 'similar' in description
2518 of Provide_Shift_Operators.
2520 2014-06-12 Jan Hubicka <hubicka@ucw.cz>
2522 * gcc-interface/utils.c (process_attributes) <ATTR_LINK_SECTION>: Pass
2523 string pointer directly to set_decl_section_name.
2525 2014-06-11 Robert Dewar <dewar@adacore.com>
2527 * sem_ch13.adb: Minor reformatting.
2529 2014-06-11 Hristian Kirtchev <kirtchev@adacore.com>
2531 * sem_prag.adb (Check_Clause_Syntax): Add new
2532 local variable Outputs. Account for the case where multiple
2533 output items appear as an aggregate.
2535 2014-06-11 Robert Dewar <dewar@adacore.com>
2537 * sem_warn.adb (Output_Obsolescent_Entity_Warnings): Tag warning
2540 2014-06-11 Ed Schonberg <schonberg@adacore.com>
2542 * einfo.ads: Minor reformatting.
2544 2014-06-11 Hristian Kirtchev <kirtchev@adacore.com>
2546 * a-cbdlli.adb, a-cdlili.adb, a-cidlli.adb, a-crdlli.adb (Insert): Add
2547 new variable First_Node. Update the position after all insertions have
2548 taken place to First_Node.
2550 2014-06-11 Robert Dewar <dewar@adacore.com>
2552 * debug.adb: Remove debug flag -gnatd.1, no longer needed.
2553 * layout.adb (Layout_Type): Remove test of -gnatd.1.
2555 2014-06-11 Robert Dewar <dewar@adacore.com>
2557 * sem_ch13.adb: Minor reformatting.
2559 2014-06-11 Hristian Kirtchev <kirtchev@adacore.com>
2561 * sem_prag.adb (Check_Clause_Syntax): Add new
2562 local variable Outputs. Account for the case where multiple
2563 output items appear as an aggregate.
2565 2014-06-11 Robert Dewar <dewar@adacore.com>
2567 * sem_warn.adb (Output_Obsolescent_Entity_Warnings): Tag warning
2570 2014-06-11 Ed Schonberg <schonberg@adacore.com>
2572 * einfo.ads: Minor reformatting.
2574 2014-06-11 Hristian Kirtchev <kirtchev@adacore.com>
2576 * a-cbdlli.adb, a-cdlili.adb, a-cidlli.adb, a-crdlli.adb (Insert): Add
2577 new variable First_Node. Update the position after all insertions have
2578 taken place to First_Node.
2580 2014-06-11 Robert Dewar <dewar@adacore.com>
2582 * debug.adb: Remove debug flag -gnatd.1, no longer needed.
2583 * layout.adb (Layout_Type): Remove test of -gnatd.1.
2585 2014-06-11 Thomas Quinot <quinot@adacore.com>
2587 * freeze.ads: Minor reformatting.
2588 * checks.adb (Determine_Range): Do not attempt to determine
2589 the range of a deferred constant whose full view has not been
2591 * sem_res.adb (Resolve): Remove undesirable guard against
2592 resolving expressions from expression functions.
2594 2014-06-11 Robert Dewar <dewar@adacore.com>
2596 * debug.adb (Debug_Flag_Dot_1): Set to enable fix for anonymous
2598 * layout.adb (Layout_Type): Make anonymous access types for
2599 subprogram formal types and return types always thin. For now
2600 only enabled if -gnatd.1 set.
2602 2014-06-11 Ed Schonberg <schonberg@adacore.com>
2604 * sem_ch13.adb (Analyze_Stream_TSS_Definition): Apply legality
2605 rule for stream attributes of interface types (RM 13.13.2 (38/3)):
2606 subprogram must be a null procedure.
2608 2014-06-11 Hristian Kirtchev <kirtchev@adacore.com>
2610 * sem_prag.adb (Analyze_Input_Item): Allow formal
2611 parameters to appear as input_items in an initialization_list
2612 of pragma Initializes. Encapsulation now applies to states and
2613 variables only (as it should). Add RM references to key errors.
2614 * sem_prag.adb (Set_Imported): Suppress errors
2615 about preceding Imports when the pragma does not come from source,
2616 which can happen through use of pragma Provide_Shift_Operators.
2618 2014-06-11 Thomas Quinot <quinot@adacore.com>
2620 * sem_ch3.adb: Minor reformatting.
2621 * einfo.ads (Full_View): Minor comment update.
2623 2014-06-11 Robert Dewar <dewar@adacore.com>
2625 * einfo.adb (Is_Independent): New flag.
2626 * einfo.ads (Is_Independent): New flag.
2627 (Has_Independent_Components): Clean up and fix comments.
2628 * sem_prag.adb (Fix_Error): Deal with changing argument
2629 [of] to entity [for].
2630 (Analyze_Pragma, case Independent): Set Is_Independent flag
2631 (Analyze_Pragma, case Independent_Components): Set Is_Independent flag
2632 in all components of specified record.
2634 2014-06-11 Thomas Quinot <quinot@adacore.com>
2636 * sem_ch12.adb (Analyze_Formal_Decimal_Fixed_Point_Type):
2637 Set proper Etype on bounds of dummy type created for analysis
2640 2014-06-11 Robert Dewar <dewar@adacore.com>
2642 * debug.adb: Minor comment fix (add missing section of dot
2645 2014-06-11 Robert Dewar <dewar@adacore.com>
2647 * gnat_rm.texi, switch-c.adb, sem_prag.adb, a-tgdico.ads, par-prag.adb,
2648 opt.ads, a-finali.ads, snames.ads-tmpl: Remove all traces of
2649 pragma/aspects Pure_05 Pure_12 Preelaborate_05.
2650 * errout.adb (Output_Messages): Avoid duplicate output for
2651 library level instance.
2652 * sem_elab.adb (Is_Call_Of_Generic_Formal): Moved to outer level
2653 (Check_Elab_Call): Add call to Is_Call_Of_Generic_Formal
2654 * exp_ch4.adb (Expand_N_Op_Expon): New interface for Exp_Modular.
2655 * s-expmod.ads, s-expmod.adb (Exp_Modular): Change interface to
2656 accomodate largest modulus value.
2657 * gnat_ugn.texi: Minor updates.
2659 2014-06-11 Ed Schonberg <schonberg@adacore.com>
2661 * sem_ch12.adb (Instantiate_Package_Body): Do not attempt to
2662 load body of generic package or its parent, if body is optional
2663 and the unit does not require a body.
2665 2014-06-11 Robert Dewar <dewar@adacore.com>
2667 * gnat_rm.texi: Document System.Unsigned_Types.
2668 * impunit.adb: System.Unsigned_Types (s-unstyp.ads) is user accessible.
2669 * s-unstyp.ads: Update comments (this is now user available unit).
2671 2014-06-11 Robert Dewar <dewar@adacore.com>
2673 * make.adb, sem_res.adb: Minor reformatting.
2675 2014-06-11 Thomas Quinot <quinot@adacore.com>
2677 * a-astaco.ads, a-tags.ads, s-excdeb.ads, a-tgdico.ads, a-stmaco.ads,
2678 a-except-2005.ads, s-except.ads, a-taside.ads, a-dynpri.ads,
2679 a-chahan.ads, a-sytaco.ads, s-stalib.ads, a-strmap.ads: Change pragmas
2680 Preelaborate_05 to just Preelaborate in runtime units, and similarly
2681 change Pure_05 to just Pure.
2683 2014-06-11 Ed Schonberg <schonberg@adacore.com>
2685 * sem_ch6.adb (Analyze_Subprogram_Body_Contract): Do not attempt
2686 analysis if error has been posted on subprogram body.
2688 2014-06-11 Ed Schonberg <schonberg@adacore.com>
2690 * sem_ch13.adb (Analyze_Stream_TSS_Definition): Apply legality
2691 rule given in RM 13.1 (8/1) for operational attributes to stream
2692 attributes: the attribute must apply to a first subtype. Fixes
2693 missing errors in ACATS test bdd2004.
2695 2014-06-11 Robert Dewar <dewar@adacore.com>
2697 * exp_ch3.adb (Build_Record_Init_Proc): Don't build for variant
2698 record type if restriction No_Implicit_Conditionals is active.
2699 (Expand_N_Object_Declaration): Don't allow default initialization
2700 for variant record type if restriction No_Implicit_Condition is active.
2701 (Build_Variant_Record_Equality): Don't build for variant
2702 record type if restriction No_Implicit_Conditionals is active.
2703 * exp_ch4.adb (Expand_N_Op_Eq): Error if variant records with
2704 No_Implicit_Conditionals.
2705 * sem_aux.ads, sem_aux.adb (Has_Variant_Part): New function.
2707 2014-06-11 Ramon Fernandez <fernandez@adacore.com>
2709 * i-cstrin.ads: Update comments.
2711 2014-06-11 Ed Schonberg <schonberg@adacore.com>
2713 * sem_res.adb (Resolve_Selected_Component): Handle properly a
2714 selected component whose prefix is overloaded, when none of the
2715 interpretations matches the expected type.
2717 2014-06-11 Bob Duff <duff@adacore.com>
2719 * make.adb (Wait_For_Available_Slot): Give a more
2720 informative error message; if the ALI file is not found, print
2721 the full path of what it's looking for.
2723 2014-06-11 Sergey Rybin <rybin@adacore.com frybin>
2725 * gnat_ugn.texi, vms_data.ads: add description of gnatstub -W<par>
2726 option to specify the result file encoding.
2728 2014-06-11 Robert Dewar <dewar@adacore.com>
2730 * errout.ads, sem_ch12.adb: Minor reformatting.
2731 * debug.adb, erroutc.adb: Remove -gnatd.q debug switch.
2732 * lib-xref.adb: Minor reformatting.
2733 * restrict.adb: Minor code reorganization (put routines in
2736 2014-06-11 Yannick Moy <moy@adacore.com>
2738 * einfo.ads: Minor typo in comment
2740 2014-06-11 Ed Schonberg <schonberg@adacore.com>
2742 * sinfo.ads, sinfo.adb: New attribute Uninitialized_Variable, for
2743 formal private types and private type extensions, to indicate
2744 variable in a generic unit whose uninitialized use suggest that
2745 actual type should be fully initialized.
2746 Needs_Initialized_Actual: removed, functionaity replaced by
2748 * lib-xref.adb (Generate_Reference): Generate a reference for
2749 variables of a formal type when the unit is not the main unit,
2750 to enable appropriate warnings in an instance.
2751 * sem_ch12.adb (Check_Ininialized_Type): Improve warning on use
2752 of variable in a generic unit that suggests that actual type
2753 should be full initialized.
2754 * sem_warn.adb; (May_Need_Initialized_Actual): Make into procedure
2755 and do not emot warning, which now only appears in an instance.
2757 2014-06-11 Eric Botcazou <ebotcazou@adacore.com>
2759 * gnat_ugn.texi: Fix minor typo.
2761 2014-06-11 Hristian Kirtchev <kirtchev@adacore.com>
2763 * sem_ch3.adb Add with and use clause for Sem_Ch10.
2764 (Analyze_Declarations): Code reformatting. Analyze the contract
2765 of a subprogram body stub at the end of the declarative region.
2766 * sem_ch6.adb (Analyze_Subprogram_Body_Contract): Spec_Id is
2767 now a variable. Do not process the body if its contract is not
2768 available. Account for subprogram body stubs when extracting
2769 the corresponding spec.
2770 * sem_ch6.ads (Analyze_Subprogram_Contract): Update the comment
2772 * sem_ch10.ads, sem_ch10.adb (Analyze_Subprogram_Body_Stub_Contract):
2774 * sem_prag.adb (Analyze_Depends_In_Decl_Part):
2775 Account for subprogram body stubs when extracting the
2777 (Analyze_Global_In_Decl_List):
2778 Account for subprogram body stubs when extracting the
2780 (Analyze_Refined_Depends_In_Decl_Part):
2781 Use Find_Related_Subprogram_Or_Body to retrieve the declaration
2782 of the related body. Spec_Is now a variable. Account for
2783 subprogram body stubs when extracting the corresponding spec.
2784 (Analyze_Refined_Global_In_Decl_Part): Use
2785 Find_Related_Subprogram_Or_Body to retrieve the declaration
2786 of the related body. Spec_Is now a variable. Account for
2787 subprogram body stubs when extracting the corresponding spec.
2788 (Collect_Subprogram_Inputs_Output): Account for subprogram body
2789 stubs when extracting the corresponding spec.
2791 2014-06-11 Vincent Celier <celier@adacore.com>
2793 * gnatcmd.adb (Process_Link): Do not invoke gnatlink with
2796 2014-06-11 Robert Dewar <dewar@adacore.com>
2798 * debug.adb: Add debug flag -gnatd.q.
2799 * erroutc.adb (Prescan_Message): Bomb if untagged warning with
2801 * styleg.adb (Check_Xtra_Parens): Message should be a style
2803 * sem_aggr.adb, sem_ch3.adb, exp_ch9.adb, checks.adb, sem_prag.adb,
2804 par-endh.adb, eval_fat.adb, freeze.adb, sem_util.adb, sem_attr.adb,
2805 sem_elab.adb, sem_ch6.adb, sem_warn.adb, sem_cat.adb,
2806 sem_ch13.adb, lib-xref.adb: Add remaining warning tags.
2808 2014-06-11 Ben Brosgol <brosgol@adacore.com>
2810 * gnat_rm.texi: Revised chapter on Implementation Defined
2813 2014-06-11 Geert Bosch <bosch@adacore.com>
2815 * s-exctab.adb: avoid race conditions in exception registration.
2817 2014-06-11 Robert Dewar <dewar@adacore.com>
2819 * errout.adb (Warn_Insertion): New function.
2820 (Error_Msg): Use Warn_Insertion and Prescan_Message.
2821 (Error_Msg_Internal): Set Info field of error object.
2822 (Error_Msg_NEL): Use Prescan_Message.
2823 (Set_Msg_Text): Don't store info: at start of message.
2824 (Skip_Msg_Insertion_Warning): New name for Set_Msg_Insertion_Warning.
2825 (Skip_Msg_Insertion_Warning): Now just skips warning insertion.
2826 * errout.ads: Document new ?$? and >$> insertion sequences
2827 Document use of "(style)" and "info: "
2828 * erroutc.adb (dmsg): Print several missing fields
2829 (Get_Warning_Tag): Handle -gnatel case (?$?) (Output_Msg_Text):
2830 Deal with new tagging of info messages
2831 * erroutc.ads: Is_Info_Msg: New global (Error_Msg_Object):
2832 Add field Info (Prescan_Message): New procedure, this procedure
2833 replaces the old Test_Style_Warning_Serious_Unconditional_Msg
2834 * errutil.adb, exp_util.adb, par-ch7.adb, sem_ch13.adb, sem_ch7.adb,
2835 sem_elab.adb: Follow new rules for info message (info belongs
2836 only at the start of a message, and only in the first message,
2837 not in any of the continuations).
2838 * gnat_ugn.texi: Document full set of warning tags.
2840 2014-06-11 Gary Dismukes <dismukes@adacore.com>
2842 * sem_util.adb: Minor typo fix.
2844 2014-06-11 Ed Schonberg <schonberg@adacore.com>
2846 * sem_warn.adb (Check_References): Do not emit spurious warnings
2847 on uninitialzed variable of a formal private type if variable
2850 2014-06-09 Jan Hubicka <hubicka@ucw.cz>
2852 * gcc-interface/utils.c (process_attributes) <ATTR_LINK_SECTION>: Use
2853 set_decl_section_name accessor.
2855 2014-05-22 Thomas Schwinge <thomas@codesourcery.com>
2857 * gcc-interface/utils.c (DEF_FUNCTION_TYPE_0, DEF_FUNCTION_TYPE_6)
2858 (DEF_FUNCTION_TYPE_7, DEF_FUNCTION_TYPE_8)
2859 (DEF_FUNCTION_TYPE_VAR_5): Cosmetic fixes.
2861 2014-05-21 Robert Dewar <dewar@adacore.com>
2863 * layout.adb: Minor reformatting.
2864 * sem_prag.adb (Analyze_Pragma, case Inspection_Point): Call
2867 2014-05-21 Robert Dewar <dewar@adacore.com>
2869 * restrict.ads (Implementation_Restriction): Add entry for
2871 * rtsfind.ads: Add entries for Fixed_IO and Decimal_IO in
2872 Ada.[Wide_[Wide_]Text_IO.
2873 * s-rident.ads (Restriction_Id): Add entry for No_Fixed_IO.
2874 * sem_attr.adb (Analyze_Attribute): Disallow fixed point types
2875 for Img, Image, Value, Wide_Image, Wide_Value, Wide_Wide_Image,
2876 Wide_Wide_Value if restriction No_Fixed_IO is set.
2877 * sem_util.adb (Set_Entity_Checks): Check restriction No_Fixed_IO.
2879 2014-05-21 Robert Dewar <dewar@adacore.com>
2881 * gnatcmd.adb: Minor error msg changes (no upper case letter
2883 * sem_ch12.adb, sem_ch5.adb, sem_res.adb, sem_util.adb: Minor
2886 2014-05-21 Robert Dewar <dewar@adacore.com>
2888 * debug.adb: Debug flag -gnatd.G inhibits static elab tracing
2889 via generic formals.
2890 * sem_elab.adb (Is_Call_Of_Generic_Formal): Return False if
2893 2014-05-21 Thomas Quinot <quinot@adacore.com>
2895 * exp_pakd.adb (Revert_Storage_Order): Renamed from Byte_Swap to
2896 more accurately describe that this subprogram needs to come into
2897 play also in cases where no byte swapping is involved, because
2898 it also takes care of some required shifts (left-justification
2901 2014-05-21 Thomas Quinot <quinot@adacore.com>
2903 * freeze.adb (Check_Component_Storage_Order): Indicate whether
2904 a Scalar_Storage_Order attribute definition is present for the
2906 (Freeze_Record_Type): Suppress junk warnings
2907 about purportedly junk Bit_Order / Scalar_Storage_Order attribute
2910 2014-05-21 Robert Dewar <dewar@adacore.com>
2912 * sem_ch8.adb (Analyze_Subprogram_Renaming): Put back call
2913 to Kill_Elaboration_Checks.
2915 2014-05-21 Gary Dismukes <dismukes@adacore.com>
2917 * layout.adb (Assoc_Add): Suppress the optimization of the (E
2918 - C1) + C2 case, when the expression type is unsigned and C1 <
2919 C2, to avoid creating a negative literal when folding.
2921 2014-05-21 Hristian Kirtchev <kirtchev@adacore.com>
2923 * freeze.adb (Freeze_Record_Type): Update the use of
2925 * sem_ch3.adb (Analyze_Object_Contract): Update the use of
2927 (Process_Discriminants): Update the use of Is_SPARK_Volatile.
2928 * sem_ch5.adb (Analyze_Iterator_Specification): Update the use
2929 of Is_SPARK_Volatile.
2930 (Analyze_Loop_Parameter_Specification):
2931 Update the use of Is_SPARK_Volatile.
2932 * sem_ch6.adb (Process_Formals): Catch an illegal use of an IN
2933 formal parameter when its type is volatile.
2934 * sem_prag.adb (Analyze_Global_Item): Update the use of
2936 * sem_res.adb (Resolve_Entity_Name): Correct the guard which
2937 determines whether an entity is a volatile source SPARK object.
2938 * sem_util.adb (Has_Enabled_Property): Accout for external
2939 properties being set on objects other than abstract states
2940 and variables. An example would be a formal parameter.
2941 (Is_SPARK_Volatile): New routine.
2942 (Is_SPARK_Volatile_Object):
2943 Remove the entity-specific tests. Call routine Is_SPARK_Volatile
2944 when checking entities and/or types.
2945 * sem_util.ads (Is_SPARK_Volatile): New routine.
2947 2014-05-21 Robert Dewar <dewar@adacore.com>
2949 * sem_warn.adb: Minor fix to warning messages (use ?? instead
2952 2014-05-21 Vincent Celier <celier@adacore.com>
2954 * gnatcmd.adb (GNATCmd): For platforms other than VMS, recognize
2955 switch --version and --help.
2957 2014-05-21 Robert Dewar <dewar@adacore.com>
2959 * sem_elab.adb (Is_Call_Of_Generic_Formal): New function.
2961 2014-05-21 Ed Schonberg <schonberg@adacore.com>
2963 * sem_ch5.adb (Analyze_Iterator_Specification): Set type of
2964 iterator variable when the domain of iteration is a formal
2965 container and this is an element iterator.
2967 2014-05-21 Bob Duff <duff@adacore.com>
2969 * sem_ch12.adb: Minor reformatting.
2971 2014-05-21 Robert Dewar <dewar@adacore.com>
2973 * sinfo.ads, sem_ch12.adb, sem_warn.adb: Minor reformatting.
2975 2014-05-21 Robert Dewar <dewar@adacore.com>
2977 * sem_elab.adb: Minor reformatting.
2978 * s-taprop.ads: Minor comment fix.
2979 * sem_ch8.adb (Analyze_Subprogram_Renaming): Remove call to
2980 Kill_Elaboration_Checks.
2981 * errout.adb, erroutc.adb: Minor reformatting.
2983 2014-05-21 Thomas Quinot <quinot@adacore.com>
2985 * exp_pakd.adb (Byte_Swap): Handle the case of a sub-byte
2986 component. No byte swapping occurs, but this procedure also takes
2987 care of appropriately justifying the argument.
2989 2014-05-21 Hristian Kirtchev <kirtchev@adacore.com>
2991 * sem_ch6.adb: sem_ch6.adb (Analyze_Aspects_On_Body_Or_Stub):
2993 (Analyze_Subprogram_Body_Helper): Move the
2994 analysis of aspect specifications and the processing of the
2995 subprogram body contract after inlining has taken place.
2996 (Diagnose_Misplaced_Aspect_Specifications): Removed.
2998 2014-05-21 Javier Miranda <miranda@adacore.com>
3000 * sem_ch3.adb (Build_Derived_Record_Type): Revert previous change.
3002 2014-05-21 Robert Dewar <dewar@adacore.com>
3004 * sem_eval.ads, sem_eval.adb (Why_Not_Static): Messages are not
3005 continuations any more.
3007 2014-05-21 Ed Schonberg <schonberg@adacore.com>
3009 * sinfo.ads, sinfo.adb: New flag Needs_Initialized_Actual,
3010 present in formal_Private_Definitions and on private extension
3011 declarations of a formal derived type. Set when the use of the
3012 formal type in a generic suggests that the actual should be a
3013 fully initialized type.
3014 * sem_warn.adb (May_Need_Initialized_Actual): new subprogram
3015 to indicate that an entity of a generic type has default
3016 initialization, and that the corresponing actual type in any
3017 subsequent instantiation should be fully initialized.
3018 * sem_ch12.adb (Check_Initialized_Type): new subprogram,
3019 to emit a warning if the actual for a generic type on which
3020 Needs_Initialized_Actual is set is not a fully initialized type.
3022 2014-05-21 Robert Dewar <dewar@adacore.com>
3024 * sem_elab.adb, prj-dect.adb: Minor reformatting.
3026 2014-05-21 Robert Dewar <dewar@adacore.com>
3028 * erroutc.ads: Minor comment addition.
3030 2014-05-21 Robert Dewar <dewar@adacore.com>
3032 * errout.ads: Add documentation for use of >*> tag.
3033 * restrict.adb: Make sure we use >*> tag for restriction warnings.
3035 2014-05-21 Gary Dismukes <dismukes@adacore.com>
3037 * debug.adb: Add case of illegal overriding_indicator for a
3038 protected subprogram body to description of -gnatd.E switch.
3039 * sem_ch6.adb (Verify_Overriding_Indicator): Issue error message
3040 for cases of giving overriding_indicators on protected subprogram
3041 bodies, but change this to a warning if -gnatd.E is enabled. No
3042 longer give a style warning about missing indicators on protected
3045 2014-05-21 Robert Dewar <dewar@adacore.com>
3047 * prj.ads, sem_ch12.adb, prj.adb, exp_pakd.adb,
3048 sem_elab.ads: Minor reformatting.
3049 * erroutc.adb, erroutc.ads (Warning_Specifically_Suppressed): Make Tag
3052 2014-05-21 Pascal Obry <obry@adacore.com>
3054 * prj-dect.adb: Allow package Install in aggregate project.
3056 2014-05-21 Robert Dewar <dewar@adacore.com>
3058 * sem_ch13.adb (Analyze_Aspect_Specifications):
3059 Insert_Delayed_Pragma is now used for the case of Attach_Handler.
3060 * sem_prag.adb: Minor comment improvements.
3062 2014-05-21 Ed Schonberg <schonberg@adacore.com>
3064 * sem_ch12.adb (Install_Body): When checking whether freezing of
3065 instantiation must be delayed, verify that the common enclosing
3066 subprogram to generic and instance is in fact an overloadable
3069 2014-05-21 Vincent Celier <celier@adacore.com>
3071 * makeutl.adb (Mains.Complete_Mains.Do_Complete): Look for all
3072 mains with the same name and fail if there is more than one.
3073 * prj.ads, prj.adb (Find_All_Sources): New function
3075 2014-05-21 Robert Dewar <dewar@adacore.com>
3077 * sem_ch13.adb: Minor reformatting.
3078 * lib-xref-spark_specific.adb, sem_util.adb: Minor reformatting.
3079 * sem_prag.adb: Minor error message improvement.
3081 2014-05-21 Yannick Moy <moy@adacore.com>
3083 * lib-xref-spark_specific.adb, lib-xref.ads, lib-xref.adb
3084 (Enclosing_Subprogram_Or_Package): Only return a library-level
3087 2014-05-21 Javier Miranda <miranda@adacore.com>
3089 * sem_ch3.adb (Build_Derived_Record_Type): Initialize Parent_Base
3090 to the full view of the parent type when processing a derived type
3091 which is the full view of a private type not defined in a generic
3092 unit which is derived from a private type with discriminants
3093 whose full view is a non-tagged record type.
3095 2014-05-21 Javier Miranda <miranda@adacore.com>
3097 * exp_ch4.adb (Expand_Allocator_Expression.Apply_Accessibility_Check):
3098 Complete previous patch.
3100 2014-05-21 Thomas Quinot <quinot@adacore.com>
3103 * g-socket.adb (Read and Write for Datagram_Socket_Stream_Type):
3104 Provide a behaviour more consistent with underlying datagram
3105 socket: do not attempt to loop over Send_Socket/Receive_Socket
3106 iterating along the buffer.
3108 2014-05-21 Hristian Kirtchev <kirtchev@adacore.com>
3110 * freeze.adb (Freeze_Record_Type): Ensure that a discriminated
3111 or a tagged type is not labelled as volatile. Ensure that a
3112 non-volatile type has no volatile components.
3113 * sem_ch3.adb (Analyze_Object_Contract): Add local constant
3114 Obj_Typ. Code reformatting. Ensure that a discriminated or
3115 tagged object is not labelled as volatile.
3116 * sem_prag.adb (Process_Atomic_Shared_Volatile): Ensure that
3117 pragma Volatile applies to a full type declaration or an object
3118 declaration when SPARK mode is on.
3120 2014-05-21 Sergey Rybin <rybin@adacore.com frybin>
3122 * gnat_ugn.texi: For ASIS tools, reword the paragraph about
3123 providing options needed for compiling the argument source for
3124 the situation when a project file can be used as a tool parameter.
3126 2014-05-21 Gary Dismukes <dismukes@adacore.com>
3128 * gnat_rm.texi: Minor typo fix.
3130 2014-05-21 Robert Dewar <dewar@adacore.com>
3132 * stand.adb (Tree_Read): Read missing entities.
3133 (Tree_Write): Write missing entities.
3135 2014-05-21 Ben Brosgol <brosgol@adacore.com>
3137 * gnat_ugn.texi: Wordsmithing edits to Coupling Metrics Control
3138 section in gnatmetric chapter.
3140 2014-05-21 Robert Dewar <dewar@adacore.com>
3142 * exp_ch6.adb (Expand_Actuals): Spec moved here, since not used
3143 outside Exp_Ch6 (Expand_Actuals): Deal with proper insertion of
3144 post-call copy write back (see detailed comment in code).
3145 * exp_ch6.ads (Expand_Actuals): Moved to body, not used outside
3147 * tbuild.ads: Minor reformatting.
3149 2014-05-21 Robert Dewar <dewar@adacore.com>
3151 * stand.ads: Add warning about adding new entities and
3152 Tree_Read/Tree_Write.
3154 2014-05-21 Robert Dewar <dewar@adacore.com>
3156 * sem_util.adb (Set_Entity_With_Checks): Don't complain about
3157 references to restricted entities within the units in which they
3160 2014-05-21 Robert Dewar <dewar@adacore.com>
3162 * gnat1drv.adb (Check_Bad_Body): Use Source_File_Is_Body to
3163 simplify the needed test, and also deal with failure to catch
3164 situations with non-standard names.
3165 * sinput-l.ads, sinput-l.adb (Source_File_Is_No_Body): New function
3166 (Source_File_Is_Subunit): Removed, no longer used.
3168 2014-05-21 Javier Miranda <miranda@adacore.com>
3171 (Expand_Allocator_Expression.Apply_Accessibility_Check): for a
3172 renaming of an access to interface object there is no need to
3173 generate extra code to reference the tag.
3175 2014-05-21 Robert Dewar <dewar@adacore.com>
3177 * errout.adb, erroutc.adb, erroutc.ads: Allow warning tag in pragma
3178 Warnings (Off, string).
3180 2014-05-21 Robert Dewar <dewar@adacore.com>
3182 * osint.adb: Fix three error messages to say invalid instead
3184 * par-ch4.adb, exp_aggr.adb, sem_attr.adb, sem_aux.adb, sem_ch3.adb,
3185 sem_ch5.adb, sem_ch6.adb, sem_ch7.adb, sem_dim.adb, sem_res.adb,
3186 sem_util.adb, sem_util.ads: Fix incorrect use of erroneous in comments.
3188 2014-05-21 Ed Schonberg <schonberg@adacore.com>
3190 * freeze.adb, sem_ch13.adb, sem_ch13.ads, sem_ch9.adb,
3191 sem_ch9.ads: Move discriminant manipulation routines for analysis of
3192 aspect specifications from sem_ch9 to sem_ch13, where they belong.
3194 2014-05-21 Robert Dewar <dewar@adacore.com>
3196 * gnat_ugn.texi: Clearly document -gnatw.g (GNAT warnings).
3197 Clearly document -gnatyg (GNAT style switches).
3198 * usage.adb: Add line line for -gnatw.g (GNAT warnings) More
3199 detail for line for -gnatyg (GNAT style switches) -gnatw.d/D is
3200 available for VMS after all.
3201 * warnsw.adb: Reorganize to eliminate duplicated code
3202 (Restore_Warnings): Add a couple of missing entries
3203 (Save_Warnings): Add a couple of missing entries.
3204 * warnsw.ads: Add missing entries to Warning_Record (not clear
3205 what the impact is).
3207 2014-05-21 Robert Dewar <dewar@adacore.com>
3209 * errout.adb (Set_Msg_Insertion_Warning): Handle ?*? (restriction
3211 * errout.ads: Document ?*? (restriction warning) insertion.
3212 * erroutc.adb (Get_Warning_Tag): Deal with ?*? (restriction
3214 * erroutc.ads: Document use of * for restriction warning tag.
3215 * restrict.adb (Restriction_Msg): Tag with ?*? instead of ??.
3217 2014-05-21 Ed Schonberg <schonberg@adacore.com>
3219 * sem_ch9.adb (Push_Scope_And_Install_Discriminants): Do not
3220 make discriminants immediately visible when analyzing an aspect
3221 of a subtype declaration.
3222 (Uninstall_Discriminants): Do not apply to the entity in a
3223 subtype declaration.
3225 2014-05-21 Ed Schonberg <schonberg@adacore.com>
3227 * sem_util.adb: Code clean up.
3229 2014-05-21 Eric Botcazou <ebotcazou@adacore.com>
3231 * gnat_ugn.texi: Document -Werror.
3233 2014-05-21 Bob Duff <duff@adacore.com>
3235 * sem_util.adb (Is_Dependent_Component_Of_Mutable_Object):
3236 This was returning False if the Object is a constant view. Fix
3237 it to return True in that case, because it might be a view of
3239 (Has_Discriminant_Dependent_Constraint): Fix latent
3240 bug; this function was crashing when passed a discriminant.
3242 2014-05-21 Robert Dewar <dewar@adacore.com>
3244 * gnat_ugn.texi: Remove misplaced section that is now obsolete.
3245 * s-arit64.adb: Minor code reorganization.
3246 * sem_prag.adb: Minor comment fix (remove erroneous use of the
3249 2014-05-21 Robert Dewar <dewar@adacore.com>
3251 * g-table.adb, g-dyntab.adb (Reallocate): Fix possible overflow in
3252 computing new table size.
3254 2014-05-21 Robert Dewar <dewar@adacore.com>
3256 * einfo.ads: Minor reformatting.
3257 * ceinfo.adb: Deal with slight format change of einfo.ads.
3259 2014-05-21 Ed Schonberg <schonberg@adacore.com>
3261 * sem_prag.adb (Analyze_Part_Of): Further work on the proper
3262 implementation of the SPARK 2014 rule concerning private child
3265 2014-05-21 Vincent Celier <celier@adacore.com>
3267 * makeusg.adb: Add switch -d to usage.
3269 2014-05-21 Ed Schonberg <schonberg@adacore.com>
3271 * sem_util.adb (Find_Actual): If an actual that is the prefix
3272 of an enclosing prefixed call has been rewritten, use Nkind
3273 and Sloc to identify the corresponding formal, when handling
3274 deferred references.
3276 2014-05-21 Robert Dewar <dewar@adacore.com>
3278 * debug.adb: Document -gnatd.z switch.
3279 * sem_eval.adb (Why_Non_Static): Test -gnatd.z switch.
3281 2014-05-21 Robert Dewar <dewar@adacore.com>
3283 * einfo.ads (Can_Never_Be_Null): Minor comment update.
3284 * sem_prag.adb (Check_Arg_Is_Task_Dispatching_Policy): Minor
3285 error message change.
3286 * s-arit64.adb ("abs"): New function. Use expression functions
3287 for the simple conversions and arithmetic.
3289 2014-05-18 Eric Botcazou <ebotcazou@adacore.com>
3291 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Rework comment and
3292 set function_start_locus.
3294 2014-05-18 Eric Botcazou <ebotcazou@adacore.com>
3296 * utils.c (gnat_write_global_declarations): Adjust the flags put on
3299 2014-05-18 Eric Botcazou <ebotcazou@adacore.com>
3301 * gcc-interface/decl.c (change_qualified_type): New static function.
3302 (gnat_to_gnu_entity): Use it throughout to add qualifiers on types.
3303 <E_Array_Type>: Set TYPE_VOLATILE on the array type directly.
3304 <E_Array_Subtype>: Likewise.
3305 Do not set flags on an UNCONSTRAINED_ARRAY_TYPE directly.
3306 (gnat_to_gnu_component_type): Likewise.
3307 (gnat_to_gnu_param): Likewise.
3309 2014-05-18 Eric Botcazou <ebotcazou@adacore.com>
3311 * fe.h (Set_Present_Expr): Move around.
3312 (End_Location): New macro.
3313 * gcc-interface/trans.c (Case_Statement_to_gnu): Use End_Location.
3315 2014-05-18 Eric Botcazou <ebotcazou@adacore.com>
3317 * gcc-interface/decl.c (gnat_to_gnu_entity): Use Underlying_Type in
3318 lieu of more verbose construct.
3319 * gcc-interface/trans.c (Call_to_gnu): Likewise.
3320 (gnat_to_gnu): Likewise. Remove obsolete code.
3322 2014-05-18 Eric Botcazou <ebotcazou@adacore.com>
3324 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Subtype>: Do not
3325 consider that regular packed arrays can never be superflat.
3327 2014-05-17 Trevor Saunders <tsaunders@mozilla.com>
3329 * gcc-interface/ada-tree.h: Remove usage of variable_size gty
3331 * gcc-interface/decl.c (annotate_value): Adjust.
3332 * gcc-interface/trans.c (Attribute_to_gnu): Likewise.
3333 (push_range_check_info): Likewise.
3334 (Loop_Statement_to_gnu): Likewise.
3335 (Subprogram_Body_to_gnu): Likewise.
3336 (Compilation_Unit_to_gnu): Likewise.
3337 (start_stmt_group): Likewise.
3338 * gcc-interface/utils.c (init_gnat_utils): Likewise.
3339 (gnat_pushlevel): Likewise.
3340 (maybe_pad_type): Likewise.
3342 2014-05-14 Eric Botcazou <ebotcazou@adacore.com>
3344 * seh_init.c: Fix copyright year.
3346 2014-05-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
3348 * seh_init.c (__gnat_map_SEH): Compile also when __CYGWIN__ and __SEH__
3349 are defined. Move include windows.h before system.h.
3350 * s-oscons-tmplt.c (DTR_CONTROL_ENABLE, RTS_CONTROL_ENABLE): Compile
3351 also when __CYGWIN__ is defined. Include windef.h before winbase.h.
3353 2014-05-14 Richard Sandiford <r.sandiford@uk.ibm.com>
3355 * gcc-interface/decl.c (gnat_to_gnu_entity): Convert integer_one_node
3356 to the appropriate type.
3357 * gcc-interface/trans.c (gnat_to_gnu): Likewise.
3358 (pos_to_constructor): Likewise.
3360 2014-05-13 Eric Botcazou <ebotcazou@adacore.com>
3362 * gcc-interface/decl.c (annotate_value): Fix thinko in latest change.
3364 2014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
3365 Mike Stump <mikestump@comcast.net>
3366 Richard Sandiford <rdsandiford@googlemail.com>
3368 * gcc-interface/cuintp.c (UI_From_gnu): Use wide-int interfaces.
3369 * gcc-interface/decl.c (gnat_to_gnu_entity): Use TYPE_SIGN.
3370 (annotate_value): Use wide-int interfaces.
3371 * gcc-interface/utils.c (get_nonnull_operand): Use tree_fits_uhwi_p.
3373 2014-04-28 Richard Henderson <rth@redhat.com>
3375 * gcc-interface/Makefile.in: Support aarch64-linux.
3377 2014-04-28 Eric Botcazou <ebotcazou@adacore.com>
3379 * exp_dbug.ads (Get_External_Name): Add 'False' default to Has_Suffix,
3380 add 'Suffix' parameter and adjust comment.
3381 (Get_External_Name_With_Suffix): Delete.
3382 * exp_dbug.adb (Get_External_Name_With_Suffix): Merge into...
3383 (Get_External_Name): ...here. Add 'False' default to Has_Suffix, add
3385 (Get_Encoded_Name): Remove 2nd argument in call to Get_External_Name.
3386 Call Get_External_Name instead of Get_External_Name_With_Suffix.
3387 (Get_Secondary_DT_External_Name): Likewise.
3388 * exp_cg.adb (Write_Call_Info): Likewise.
3389 * exp_disp.adb (Export_DT): Likewise.
3390 (Import_DT): Likewise.
3391 * comperr.ads (Compiler_Abort): Remove Code parameter and add From_GCC
3392 parameter with False default.
3393 * comperr.adb (Compiler_Abort): Likewise. Adjust accordingly.
3394 * types.h (Fat_Pointer): Rename into...
3395 (String_Pointer): ...this. Add comment on interfacing rules.
3396 * fe.h (Compiler_Abort): Adjust for above renaming.
3397 (Error_Msg_N): Likewise.
3398 (Error_Msg_NE): Likewise.
3399 (Get_External_Name): Likewise. Add third parameter.
3400 (Get_External_Name_With_Suffix): Delete.
3401 * gcc-interface/decl.c (STDCALL_PREFIX): Define.
3402 (create_concat_name): Adjust call to Get_External_Name, remove call to
3403 Get_External_Name_With_Suffix, use STDCALL_PREFIX, adjust for renaming.
3404 * gcc-interface/trans.c (post_error): Likewise.
3405 (post_error_ne): Likewise.
3406 * gcc-interface/misc.c (internal_error_function): Likewise.
3408 2014-04-28 Richard Biener <rguenther@suse.de>
3411 * gcc-interface/utils.c: Define flag_isoc11.
3413 2014-04-26 Eric Botcazou <ebotcazou@adacore.com>
3415 * gnatvsn.ads (Library_Version): Bump to 4.10.
3417 2014-04-23 Eric Botcazou <ebotcazou@adacore.com>
3420 2014-04-22 Richard Henderson <rth@redhat.com>
3422 * gcc-interface/Makefile.in: Support aarch64-linux.
3424 2014-04-22 Eric Botcazou <ebotcazou@adacore.com>
3426 * fe.h (Compiler_Abort): Replace Fat_Pointer with String_Pointer.
3427 (Error_Msg_N): Likewise.
3428 (Error_Msg_NE): Likewise.
3429 (Get_External_Name_With_Suffix): Likewise.
3430 * types.h (Fat_Pointer): Delete.
3431 (String_Pointer): New type.
3432 (DECLARE_STRING_POINTER): New macro.
3433 * gcc-interface/decl.c (create_concat_name): Adjust.
3434 * gcc-interface/trans.c (post_error): Likewise.
3435 (post_error_ne): Likewise.
3436 * gcc-interface/misc.c (internal_error_function): Likewise.
3438 2014-04-22 Richard Henderson <rth@redhat.com>
3440 * gcc-interface/Makefile.in: Support aarch64-linux.
3442 * init.c [__linux__] (HAVE_GNAT_ALTERNATE_STACK): New define.
3443 (__gnat_alternate_stack): Enable for all linux except ia64.
3445 2014-04-22 Eric Botcazou <ebotcazou@adacore.com>
3447 * fe.h (Compiler_Abort): Replace Fat_Pointer with String_Pointer.
3448 (Error_Msg_N): Likewise.
3449 (Error_Msg_NE): Likewise.
3450 (Get_External_Name_With_Suffix): Likewise.
3451 * types.h (Fat_Pointer): Delete.
3452 (String_Pointer): New type.
3453 (DECLARE_STRING_POINTER): New macro.
3454 * gcc-interface/decl.c (create_concat_name): Adjust.
3455 * gcc-interface/trans.c (post_error): Likewise.
3456 (post_error_ne): Likewise.
3457 * gcc-interface/misc.c (internal_error_function): Likewise.
3459 2014-04-15 Eric Botcazou <ebotcazou@adacore.com>
3460 Pierre-Marie de Rodat <derodat@adacore.com>
3462 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create a mere
3463 scalar constant instead of a reference for renaming of scalar literal.
3464 Do not create a new object for constant renaming except for a function
3465 call. Make sure a VAR_DECL is created for the renaming pointer.
3466 * gcc-interface/trans.c (constant_decl_with_initializer_p): New.
3467 (fold_constant_decl_in_expr): New function.
3468 (Identifier_to_gnu): Use constant_decl_with_initializer_p.
3469 For a constant renaming, try to fold a constant DECL in the result.
3470 (lvalue_required_p) <N_Object_Renaming_Declaration>: Always return 1.
3471 (Identifier_to_gnu): Reference the renamed object of constant renaming
3473 * gcc-interface/utils.c (invalidate_global_renaming_pointers): Do not
3474 invalidate constant renaming pointers.
3476 2014-04-15 Eric Botcazou <ebotcazou@adacore.com>
3478 * gcc-interface/utils.c (type_for_vector_element_p): New predicate.
3479 (build_vector_type_for_size): New function.
3480 (build_vector_type_for_array): Likewise.
3481 (unchecked_convert): Build an intermediate vector type to convert
3482 from a generic array type to a vector type.
3483 (handle_vector_size_attribute): Reimplement.
3484 (handle_vector_type_attribute): Likewise.
3486 2014-04-15 Eric Botcazou <ebotcazou@adacore.com>
3488 * gcc-interface/decl.c (prepend_one_attribute_pragma): Call
3489 Is_OK_Static_Expression in lieu of Is_Static_Expression to
3490 detect valid arguments.
3492 2014-04-15 Eric Botcazou <ebotcazou@adacore.com>
3494 * gcc-interface/trans.c (gnat_gimplify_stmt): Propagate loop hints.
3496 2014-04-14 Paolo Carlini <paolo.carlini@oracle.com>
3498 * gcc-interface/decl.c (gnat_to_gnu_entity): Use TYPE_IDENTIFIER.
3499 (components_to_record): Likewise.
3500 * gcc-interface/utils.c (make_aligning_type): Likewise.
3501 (maybe_pad_type): Likewise.
3502 (finish_record_type): Likewise.
3503 (rest_of_record_type_compilation): Likewise.
3505 2014-04-14 Eric Botcazou <ebotcazou@adacore.com>
3507 * snames.ads-tmpl (Name_Ivdep): New pragma-related name.
3508 * sem_prag.adb (Analyze_Pragma) <Pragma_Loop_Optimize>: Add support
3510 * gnat_rm.texi (Implementation Defined Pragmas): Document new Ivdep
3511 hint for Loop_Optimize.
3512 * gnat_ugn.texi (Vectorization of loops): Mention new Ivdep hint.
3513 * gcc-interface/trans.c (Pragma_to_gnu) <Pragma_Loop_Optimize>: Deal
3514 with new Ivdep hint.
3515 * gcc-interface/ada-tree.h (LOOP_STMT_IVDEP): New macro.
3516 * gcc-interface/trans.c (Pragma_to_gnu) <Pragma_Loop_Optimize>: Deal
3517 with new Ivdep hint.
3518 (gnat_gimplify_stmt) <LOOP_STMT>: Propagate loop hints.
3520 2014-04-14 Eric Botcazou <ebotcazou@adacore.com>
3521 Robert Dewar <dewar@adacore.com>
3523 * opt.ads (Suppress_Back_Annotation): Remove as unused.
3524 * fe.h (Back_Annotate_Rep_Info): Likewise.
3525 (Global_Discard_Names): Likewise.
3526 (List_Representation_Info): Declare.
3527 * types.h (Uint_Minus_1): Likewise.
3528 * repinfo.ads: Document back-annotation change.
3529 * gcc-interface/gigi.h (init_gnat_decl): Declare.
3530 (destroy_gnat_decl): Likewise.
3531 * gcc-interface/decl.c (annotate_value): Do not create the cache of
3532 annotated values here but...
3533 <CALL_EXPR>: Only inline the call if -gnatR3 is specified or we are
3535 (init_gnat_decl): ...here instead. New function.
3536 (destroy_gnat_decl): Likewise.
3537 * gcc-interface/trans.c (gigi): Call {init|destroy}_gnat_decl.
3538 * gcc-interface/utils.c (init_gnat_utils): Minor reformatting.
3540 2014-04-14 Eric Botcazou <ebotcazou@adacore.com>
3542 * gcc-interface/decl.c (create_field_decl_from): Finalize non-constant
3543 offset for the field, if any.
3545 2014-04-09 Eric Botcazou <ebotcazou@adacore.com>
3546 Svante Signell <svante.signell@gmail.com>
3550 * s-osinte-x32.adb: New file.
3551 * s-linux.ads (Time): New section.
3552 * s-linux-alpha.ads (Time): Likewise.
3553 * s-linux-android.ads (Time: Likewise.
3554 * s-linux-hppa.ads (Time): Likewise.
3555 * s-linux-mipsel.ads (Time): Likewise.
3556 * s-linux-sparc.ads (Time): Likewise.
3557 * s-linux-x32.ads (Time): Likewise.
3558 * s-osprim-x32.ads (timespec): Adjust.
3560 (To_Timespec): Likewise.
3561 * s-osinte-linux.ads (Time): Define local subtypes for those defined
3563 * s-taprop-linux.adb (Monotonic_Clock): Do not define timeval.
3564 * s-osinte-hpux.ads (timespec): Revert POSIX breakage.
3565 * s-osinte-kfreebsd-gnu.ads (timespec): Likewise.
3566 * s-osinte-solaris-posix.ads (timespec): Likewise.
3567 * s-osinte-posix.adb (To_Timespec): Likewise.
3568 * gcc-interface/Makefile.in (x32/Linux): Use s-osinte-x32.adb.
3570 2014-04-08 Eric Botcazou <ebotcazou@adacore.com>
3573 * gcc-interface/Makefile.in (arm% linux-android): Switch to EHABI.
3574 * s-linux-android.ads: New file.
3575 * s-intman-android.adb: Likewise.
3576 * s-osinte-android.ads: Adjust.
3577 * sigtramp-armdroid.c: Likewise.
3578 * sigtramp.h: Add Android support.
3580 2014-04-07 Eric Botcazou <ebotcazou@adacore.com>
3582 * gcc-interface/Makefile.in (alpha-vms): Add missing line.
3584 2014-03-30 Eric Botcazou <ebotcazou@adacore.com>
3587 * system-linux-alpha.ads: Adjust for Ada 2005.
3588 * system-linux-mips.ads: Likewise.
3589 * system-linux-mips64el.ads: Likewise.
3590 * system-linux-mipsel.ads: Likewise.
3591 * system-linux-s390.ads: Likewise.
3592 * system-linux-s390x.ads: Likewise.
3593 * system-linux-sparc.ads: Likewise.
3594 * system-linux-sparcv9.ads: Likewise.
3595 * system-rtems.ads: Likewise.
3596 * system-vxworks-arm.ads: Likewise.
3598 2014-03-16 Andreas Schwab <schwab@linux-m68k.org>
3601 * gcc-interface/Makefile.in (target_cpu_default): Revert
3604 2014-03-13 Eric Botcazou <ebotcazou@adacore.com>
3607 * cstand.adb (Register_Float_Type): Add 'precision' parameter and use
3608 it to set the RM size. Use directly 'size' for the Esize.
3609 (Create_Back_End_Float_Types): Adjust call to above.
3610 * get_targ.ads (Register_Type_Proc): Add 'precision' parameter.
3611 * set_targ.ads (FPT_Mode_Entry): Add 'precision' component.
3612 (Write_Target_Dependent_Values): Adjust comment.
3613 * set_targ.adb (Register_Float_Type): Add 'precision' parameter and
3615 (Write_Target_Dependent_Values): Write the precision in lieu of size.
3616 (Initialization): Read the precision in lieu of size and compute the
3617 size from the precision and the alignment.
3618 * gcc-interface/gigi.h (enumerate_modes): Add integer parameter.
3619 * gcc-interface/misc.c (enumerate_modes): Likewise. Do not register
3620 types for vector modes, pass the size in addition to the precision.
3622 2014-03-10 Eric Botcazou <ebotcazou@adacore.com>
3624 * gcc-interface/Make-lang.in (ADA_DEPFILES): Fix typo.
3626 2014-03-07 Doug Rupp <rupp@adacore.com>
3629 * system-linux-armel.ads (Backend_Overflow_Checks): Set to True.
3630 (Support_64_Bit_Divides): Removed, no longer used.
3631 (ZCX_By_Default): Enabled.
3633 2014-02-25 Doug Rupp <rupp@adacore.com>
3635 * gcc-interface/Makefile.in (arm-linux):
3636 (EH_MECHANISM): Use ARM unwinder (-arm)
3637 (LIBGNAT_TARGET_PAIRS: Override defaults with a-exexpr-gcc.adb and
3639 (EXTRA_LIBGNAT_OBJS): Add raise-gcc.o
3640 (EXTRA_GNATRTL_NONTASKING_OBJS): Add g-cppexc.o s-excmac.o.
3641 (arm-wrs-vxworks): Add EH_MECHANISM=-gcc for kernel mode.
3642 (EXTRA_LIBGNAT_OBJS): Add sigtramp-armvxw.o
3643 Add dependencies for sigtramp-armvxw.o.
3645 2014-02-25 Eric Botcazou <ebotcazou@adacore.com>
3647 * gcc-interface/trans.c (Pragma_to_gnu): Deal with Warning_As_Error.
3649 2014-02-25 Robert Dewar <dewar@adacore.com>
3651 * rtsfind.adb (Is_RTE): Protect against entity with no scope
3652 field (previously this call blew up on the Standard entity).
3653 * sem_attr.adb (Analyze_Attribute, case Access): Remove
3654 test for No_Abort_Statements, this is now handled in
3655 Set_Entity_With_Checks.
3656 * exp_ch6.adb, sem_ch10.adb, sem_ch4.adb, sem_ch8.adb, sem_res.adb:
3657 Change name Set_Entity_With_Style_Check => Set_Entity_With_Checks.
3658 * sem_util.ads, sem_util.adb: Change name Set_Entity_With_Style_Check =>
3659 Set_Entity_With_Checks.
3660 (Set_Entity_With_Checks): Add checks for No_Dynamic_Attachment,
3661 Add checks for No_Abort_Statements.
3663 2014-02-25 Robert Dewar <dewar@adacore.com>
3665 * exp_ch9.adb (Expand_Entry_Barrier): Add comment that call to
3666 Check_Restriction is OK.
3668 2014-02-25 Ed Schonberg <schonberg@adacore.com>
3670 * sem_ch3.adb (Process_Full_View): Better error message when
3671 the full view of a private type without discriminants is an
3673 * sem_ch7.adb (Uninstall_Declarations): Ditto.
3675 2014-02-25 Eric Botcazou <ebotcazou@adacore.com>
3677 * sigtramp-armvxw.c: Also restore r0.
3679 2014-02-25 Robert Dewar <dewar@adacore.com>
3681 * errout.adb (Error_Msg_Internal): Warning_Msg_Char set
3682 unconditionally (Set_Msg_Insertion_Warning): Warning_Msg_Char
3683 set unconditionally.
3684 * erroutc.adb (Get_Warning_Tag): Does not give a leading space
3685 any more (Output_Msg_Text): Rewritten with new convention on
3686 output of warnings that are treated as errors.
3687 * erroutc.ads (Error_Msg_Object): Warn_Chr is always set even
3689 * gnat_rm.texi: Updates to documentation on pragma
3691 * warnsw.adb (Set_Dot_Warning_Switch): -gnatw.e should not
3692 set Warning_Doc_Switch.
3693 * lib-writ.ads: Add documentation note on ALI file generation
3695 * exp_ch6.adb (Expand_Call): Remove check for No_Abort_Statements
3697 * sem_attr.adb (Resolve_Attribute, case Access):
3698 Abort_Task'Access violates the No_Abort_Statements restriction.
3699 * sem_res.adb (Resolve_Call): Check restriction
3700 No_Abort_Statements for call to Abort_Task or a renaming of it.
3702 2014-02-25 Robert Dewar <dewar@adacore.com>
3704 * sem_ch3.adb (Array_Type_Declaration): Check for case of using
3706 * lib.ads: Minor reformatting.
3707 * einfo.ads: Minor reformatting.
3709 2014-02-25 Doug Rupp <rupp@adacore.com>
3711 * sem_mech.adb (Set_Mechanisms): For convention Fortran on VMS
3712 use Short_Descriptor(S) as the argument passing mechanism.
3714 2014-02-25 Eric Botcazou <ebotcazou@adacore.com>
3716 * sigtramp-ppcvxw.c (CFI_COMMON_REGS): Also include r0.
3718 2014-02-25 Robert Dewar <dewar@adacore.com>
3720 * atree.ads (Warnings_Treated_As_Errors): New variable.
3721 * errout.adb (Error_Msg_Internal): Set Warn_Err flag in
3722 error object (Initialize): Initialize Warnings_As_Errors_Count
3723 (Write_Error_Summary): Include count of warnings treated as errors.
3724 * erroutc.adb (Warning_Treated_As_Error): New function.
3725 (Matches): Function moved to outer level of package.
3726 * erroutc.ads (Error_Msg_Object): Add Warn_Err flag.
3727 (Warning_Treated_As_Error): New function.
3728 * gnat_rm.texi: Document pragma Treat_Warning_As_Error.
3729 * opt.adb: Add handling of Warnings_As_Errors_Count[_Config].
3730 * opt.ads (Config_Switches_Type): Add entry for
3731 Warnings_As_Errors_Count.
3732 (Warnings_As_Errors_Count): New variable.
3733 (Warnings_As_Errors): New array.
3734 * par-prag.adb: Add dummy entry for Warning_As_Error.
3735 * sem_prag.adb (Analyze_Pragma): Implement new pragma
3737 * snames.ads-tmpl: Add entries for Warning_As_Error pragma.
3739 2014-02-25 Eric Botcazou <ebotcazou@adacore.com>
3741 * sigtramp.h: Fix minor inaccuracy.
3743 2014-02-25 Ben Brosgol <brosgol@adacore.com>
3745 * gnat_ugn.texi: Added description of kill command.
3747 2014-02-25 Robert Dewar <dewar@adacore.com>
3749 * gnat_rm.texi (Address_Clauses): Add a section discussing the
3750 problem of address clauses causing unexpected initialization,
3751 including the effect of Initialize_Scalars.
3753 2014-02-25 Robert Dewar <dewar@adacore.com>
3755 * errout.adb: Various changes for better msgs for anonmous access
3757 * erroutc.ads, erroutc.adb (Buffer_Ends_With): Version with character
3759 (Buffer_Remove): Version with character argument.
3760 * sem_attr.adb (Resolve_Attribute, case Access): Better handling
3761 of mismatching conventions for access-to-subprogram case.
3762 * sem_prag.adb (Set_Convention_From_Pragma): Deal with anonymous
3763 access types in record.
3764 * sem_util.ads, sem_util.adb (Set_Convention): Handle anonymous access
3765 types, including in records.
3767 2014-02-25 Doug Rupp <rupp@adacore.com>
3769 * sigtramp-ppcvxw.c, sigtramp.h, sigtramp-armvxw.c: Comment
3770 enhancements and corrections.
3772 2014-02-25 Robert Dewar <dewar@adacore.com>
3774 * gnat_rm.texi: New section "Conventions and Anonymous Access Types"
3776 2014-02-25 Robert Dewar <dewar@adacore.com>
3778 * gnat_rm.texi: First set of documentation additions for
3779 predefined RM units.
3780 * checks.adb: Minor reformatting.
3781 * sem_elab.adb (Check_Task_Activation): Minor fix to error
3783 * sem_util.adb: Minor reformatting.
3785 2014-02-25 Arnaud Charlet <charlet@adacore.com>
3787 * usage.adb (Usage): Add help on -gnateC.
3788 * switch-c.adb (Scan_Front_End_Switches): Add handling of -gnateC.
3789 * opt.ads (Generate_CodePeer_Messages): New flag.
3790 * gnat_ugn.texi: Document new switch -gnateC.
3792 2014-02-25 Ben Brosgol <brosgol@adacore.com>
3794 * gnat_rm.texi: Corrected minor typos in Implementation Defined
3796 * opt.ads: Minor reformatting.
3798 2014-02-25 Robert Dewar <dewar@adacore.com>
3800 * binde.adb: Change messages to mention -gnatel instead of -gnatwl.
3801 * gnat_ugn.texi: Update documentation of -gnatwl Add documentation
3803 * opt.ads (Warn_Info_Messages): New flag.
3804 * sem_elab.adb: Use Elab_Warnings, Elab_Info_Messages to control
3806 * sem_prag.adb: Use Elab_Warnings, Elab_Info_Messages to control
3808 * switch-m.ad, switch-c.adb: Recognize new -gnatel/EL switches.
3809 * usage.adb: Add documentation of -gnatel/-gnateL Update
3810 documentation of -gnatwl/-gnatwL.
3811 * warnsw.adb: New handling of Elab_Warnings, Elab_Info_Messages
3812 * warnsw.ads (Elab_Info_Messages): New field in Warning_Record
3814 2014-02-25 Robert Dewar <dewar@adacore.com>
3816 * einfo.ads, einfo.adb (Has_Shift_Operator): New flag.
3817 * gnat_rm.texi: Document pragma Provide_Shift_Operators.
3818 * interfac.ads: Minor code reorganization (add pragma
3819 Compiler_Unit_Warning).
3820 * par-prag.adb: Add dummy entry for Provide_Shift_Operators.
3821 * sem_ch3.adb (Build_Derived_Numeric_Type): Copy
3822 Has_Shift_Operator flag.
3823 * sem_intr.adb (Check_Intrinsic_Subprogram): Make sure
3824 Check_Shift is always called (Check_Shift): Set Has_Shift_Operator.
3825 * sem_prag.adb: Implement pragma Provide_Shift_Operators.
3826 * snames.ads-tmpl: Add entries for pragma Provide_Shift_Operators
3827 Add entry for Name_Amount.
3828 * checks.adb (Selected_Range_Checks): When checking for a null
3829 range, make sure we use the base type, and not the subtype for
3830 deciding a range is null.
3831 * sem_ch5.adb (Analyze_Loop_Parameter_Specification): Check
3832 for suspicious loop bound which is outside the range of the
3834 * gnat_ugn.texi: Add documentation section "Determining the
3835 Chosen Elaboration Order"
3836 * sem_ch13.adb (UC_Entry): Add field Act_Unit
3837 (Validate_Unchecked_Conversion): Store Act_Unit
3838 (Validate_Unchecked_Conversions): Test Warnings_Off in Act_Unit
3839 * treepr.adb: Minor reformatting.
3841 2014-02-25 Arnaud Charlet <charlet@adacore.com>
3843 * usage.adb: Minor: fix typo.
3845 2014-02-25 Robert Dewar <dewar@adacore.com>
3847 * lib.ads, s-bitops.adb, s-bitops.ads, s-conca5.adb, gnat_rm.texi,
3848 s-conca5.ads, s-conca7.adb, s-conca7.ads, s-crc32.adb, s-crc32.ads,
3849 s-conca9.adb, s-conca9.ads, g-dyntab.adb, s-crtl.ads, g-dyntab.ads,
3850 s-excdeb.adb, s-addope.adb, s-addope.ads, s-carun8.adb, s-carun8.ads,
3851 g-htable.adb, g-htable.ads, g-hesora.adb, g-hesora.ads, s-conca2.adb,
3852 s-conca2.ads, a-comlin.adb, a-chlat1.ads, a-comlin.ads, errout.ads,
3853 a-except.adb, s-conca4.adb, a-except.ads, s-conca4.ads, s-conca6.adb,
3854 s-conca6.ads, g-spchge.adb, g-spchge.ads, g-u3spch.adb, g-u3spch.ads,
3855 a-strhas.ads, restrict.adb, aspects.adb, aspects.ads, s-conca8.adb,
3856 s-conca8.ads, back_end.adb, par-prag.adb, g-byorma.adb, g-byorma.ads,
3857 a-elchha.adb, a-elchha.ads, g-speche.adb, g-speche.ads, s-casuti.adb,
3858 s-assert.adb, s-casuti.ads, s-assert.ads, a-clrefi.adb, a-clrefi.ads,
3859 s-conca3.adb, s-conca3.ads, a-ioexce.ads: Implement pragma
3860 Compiler_Unit_Warning, change Compiler_Unit everywhere to
3861 Compiler_Unit_Warning.
3863 2014-02-25 Sergey Rybin <rybin@adacore.com frybin>
3865 * sem_prag.adb (Analyze_Depends_In_Decl_Part): Do not normalize
3866 in ASIS mode aggregates that are used as aspect definitions.
3868 2014-02-25 Robert Dewar <dewar@adacore.com>
3870 * exp_ch7.adb, sem_util.adb, sem_util.ads, exp_ch6.adb: Minor
3873 2014-02-25 Ed Schonberg <schonberg@adacore.com>
3875 * freeze.adb (Freeze_Entity): If the return type of a function
3876 is a limited view, and the non-limited view has not been seen yet,
3877 defer freezing to some later point.
3879 2014-02-25 Robert Dewar <dewar@adacore.com>
3881 * sem_ch3.adb: Minor reformatting.
3883 2014-02-25 Robert Dewar <dewar@adacore.com>
3885 * s-excdeb.ads, s-except.ads, s-exctab.adb, s-exctab.ads, s-finmas.ads,
3886 s-htable.adb, s-htable.ads, s-imenne.adb, s-imenne.ads, s-imgenu.adb,
3887 s-imgenu.ads, s-mastop.adb, s-mastop.ads, s-memory-vms_64.adb,
3888 s-memory-vms_64.ads, s-memory.adb, s-memory.ads, s-os_lib.adb,
3889 s-os_lib.ads, s-parame.adb, s-parame.ads, s-purexc.ads, s-restri.adb,
3890 s-restri.ads, s-rident.ads, s-secsta.adb, s-secsta.ads, s-soflin.adb,
3891 s-soflin.ads, s-sopco3.adb, s-sopco3.ads, s-sopco4.adb, s-sopco4.ads,
3892 s-sopco5.adb, s-sopco5.ads, s-spsufi.ads, s-stache.adb, s-stache.ads,
3893 s-stalib.adb, s-stalib.ads, s-stoele.adb, s-stoele.ads, s-strcom.adb,
3894 s-strcom.ads, s-strhas.adb, s-string.adb, s-string.ads, s-strops.adb,
3895 s-strops.ads, s-ststop.adb, s-ststop.ads, s-traceb.adb, s-traceb.ads,
3896 s-traent.adb, s-traent.ads, s-unstyp.ads, s-utf_32.adb, s-utf_32.ads,
3897 s-wchcnv.adb, s-wchcnv.ads, s-wchcon.adb, s-wchcon.ads, s-wchjis.adb,
3898 s-wchjis.ads, sem_ch11.adb, sem_ch4.adb, sem_ch5.adb, sem_prag.adb,
3899 snames.ads-tmpl: Change Compiler_Unit everywhere to
3900 Compiler_Unit_Warning.
3902 2014-02-25 Hristian Kirtchev <kirtchev@adacore.com>
3904 * exp_ch6.adb (Add_Or_Save_Precondition): New routine.
3905 (Collect_Body_Postconditions_In_Decls): New routine.
3906 (Collect_Body_Postconditions_Of_Kind): Factor out code. Handle
3907 postcondition aspects or pragmas that appear on a subprogram
3909 (Collect_Spec_Preconditions): Factor out code. Handle
3910 precondition aspects or pragmas that appear on a subprogram
3912 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): The analysis of
3913 aspects that apply to a subprogram body stub is no longer delayed,
3914 the aspects are analyzed on the spot.
3915 (SPARK_Aspect_Error):
3916 Aspects that apply to a subprogram declaration cannot appear in
3918 * sem_ch10.adb Remove with and use clause for Sem_Ch13.
3919 (Analyze_Proper_Body): Add local variable Comp_Unit. Unum
3920 is now a local variable. Code cleanup. Analysis related to
3921 the aspects of a subprogram body stub is now carried out by
3922 Analyze_Subprogram_Body_Helper. Do not propagate the aspects
3923 and/or pragmas of a subprogram body stub to the proper body
3924 as this is no longer needed. Do not analyze the aspects of a
3925 subprogram stub when the corresponding source unit is missing.
3926 (Analyze_Protected_Body_Stub): Flag the illegal use of aspects
3928 (Analyze_Task_Body_Stub): Flag the illegal use of
3930 (Optional_Subunit): Add local variable Unum.
3931 * sem_ch13.adb (Insert_Delayed_Pragma): Do not analyze a generated
3932 pragma when it applies to a subprogram body stub.
3933 * sem_prag.adb (Analyze_Pragma): Pragmas Contract_Cases,
3934 Depends and Global can now apply to a subprogram body stub as
3935 long as it acts as its own spec.
3936 (Analyze_Refined_Pragma):
3937 Code reformatting. Refinement pragmas cannot apply to a subunit.
3939 2014-02-25 Hristian Kirtchev <kirtchev@adacore.com>
3941 * einfo.ads Update the usage of flag
3942 Uses_Sec_Stack. Uses_Sec_Stack now applies to E_Loop entities.
3943 * exp_ch5.adb (Expand_Iterator_Loop): The temporary for a cursor
3944 now starts with the letter 'C'. This makes reading expanded
3946 * exp_ch7.adb (Establish_Transient_Scope): Add local variable
3947 Iter_Loop. Signal that an Ada 2012 iterator loop requires
3948 secondary stack management when creating a transient scope for
3949 an element reference.
3950 * exp_util.adb (Process_Statements_For_Controlled_Objects):
3951 When wrapping the statements of a loop, pass the E_Loop entity
3952 to the wrapping machinery.
3953 (Wrap_Statements_In_Block): Add
3954 formal parameter Scop along with comment on usage. Add local
3955 variables Block_Id, Block_Nod and Iter_Loop. Mark the generated
3956 block as requiring secondary stack management when the block is
3957 created inside an Ada 2012 iterator loop. This ensures that any
3958 reference objects are reclaimed on each iteration of the loop.
3959 * sem_ch5.adb (Analyze_Loop_Statement): Mark the generated block
3960 tasked with the handling of container iterators as requiring
3961 secondary stack management. This ensures that iterators are
3962 reclaimed when the loop terminates or is exited in any fashion.
3963 * sem_util.adb (Add_Block_Identifier): New routine.
3964 (Find_Enclosing_Iterator_Loop): New routine.
3965 * sem_util.ads (Add_Block_Identifier): New routine.
3966 (Find_Enclosing_Iterator_Loop): New routine.
3968 2014-02-25 Robert Dewar <dewar@adacore.com>
3970 * sinfo.ads: Minor reformatting.
3972 2014-02-25 Tristan Gingold <gingold@adacore.com>
3974 * s-expllu.ads, s-expuns.ads, s-expmod.ads: Minor comment fix.
3976 2014-02-25 Pascal Obry <obry@adacore.com>
3978 * sinput-l.adb, osint.adb, osint.ads: Add Prep_Suffix to factorize code.
3980 2014-02-25 Tristan Gingold <gingold@adacore.com>
3982 * sem_ch10.adb: Minor comment fix.
3984 2014-02-25 Bob Duff <duff@adacore.com>
3986 * s-tasdeb.adb: Misc cleanup of this package,
3987 including printing addresses in hexadecimal.
3988 (Write): Fix minor bug when taking 'Address of an empty string.
3990 2014-02-25 Ed Schonberg <schonberg@adacore.com>
3992 * sem_prag.adb (Analyze_Part_Of): Reject state refinement in a
3993 public child unit when it does not refer to the abstract state
3994 of a public ancestor.
3996 2014-02-25 Yannick Moy <moy@adacore.com>
3998 * sem_prag.adb (Analyze_Pragma/Pragma_Validity_Checks): Ignore pragma
3999 Validity_Checks in GNATprove and CodePeer modes.
4001 2014-02-25 Pascal Obry <obry@adacore.com>
4003 * prj-attr.adb, projects.texi, snames.ads-tmpl: Add package Install's
4004 Artifacts attribute.
4006 2014-02-25 Yannick Moy <moy@adacore.com>
4008 * sem_prag.adb: Minor reformatting to get consistent messages.
4010 2014-02-25 Robert Dewar <dewar@adacore.com>
4012 * checks.adb: Minor reformatting.
4013 * sinfo.ads (Do_Range_Check): Document that this flag is never
4014 passed to the back end.
4016 2014-02-25 Yannick Moy <moy@adacore.com>
4018 * sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_prag.adb, sem_attr.adb,
4019 sem_ch6.adb: Remove useless references to SPARK RM in error messages.
4021 2014-02-25 Hristian Kirtchev <kirtchev@adacore.com>
4023 * sem_res.adb (Appears_In_Check): New routine.
4024 (Resolve_Entity_Name): Remove local variables Prev and
4025 Usage_OK. Par is now a constant. Remove the parent chain traversal
4026 as the placement of a volatile object with enabled property
4027 Async_Writers and/or Effective_Reads must appear immediately
4028 within a legal construct.
4030 2014-02-25 Hristian Kirtchev <kirtchev@adacore.com>
4032 * checks.adb (Apply_Selected_Range_Checks):
4033 Alphabetize local constants and variables. Add comments.
4034 Always insert a range check that requires runtime evaluation into
4037 2014-02-25 Robert Dewar <dewar@adacore.com>
4039 * sem_attr.adb, sem_ch6.adb, par-ch3.adb: Minor reformatting.
4041 2014-02-25 Bob Duff <duff@adacore.com>
4043 * s-tassta.adb (Finalize_Global_Tasks): Limit the number of loop
4044 iterations while waiting for independent tasks to terminate;
4045 if an independent task does not terminate, we do not want to
4046 hang here. In that case, the thread will be terminated when the
4048 * s-taprop-linux.adb (Abort_Task): Fix Assert to allow for ESRCH.
4050 2014-02-25 Ed Schonberg <schonberg@adacore.com>
4052 * sem_prag.adb (Check_SPARK_Aspect_For_ASIS): New subprogram,
4053 used to perform pre-analysis of the expression for SPARK
4054 aspects that have a non-standard syntax, such as GLobal and
4055 Initializes. The procedure applies to the original expression
4056 in an aspect specification, prior to the analysis of the
4057 corresponding pragma, in order to provide semantic information
4058 for ASIS navigation purposes.
4059 (Analyze_Global_In_Decl_List, Analyze_Initializes_In_Decl_Part):
4060 Call new subprogram.
4062 2014-02-25 Yannick Moy <moy@adacore.com>
4064 * sem_prag.adb: Remove obsolete reference to SPARK RM in error message.
4066 2014-02-25 Doug Rupp <rupp@adacore.com>
4068 * init.c (HAVE_GNAT_ADJUST_CONTEXT_FOR_RAISE): Enable for ARM.
4069 (__gnat_adjust_context_for_raise): Bump the PC by 2.
4071 2014-02-25 Ed Schonberg <schonberg@adacore.com>
4073 * par-ch3.adb (P_Basic_Declarative_Items): In the case of a
4074 misplaced IS, add a statement sequence to improper body only if
4075 one has not been parsed already.
4077 2014-02-25 Ed Schonberg <schonberg@adacore.com>
4079 * sem_attr.adb (Analyze_Attribute, case 'Update): Check for
4080 mismatch when multidimensional array is updated with a single
4083 2014-02-25 Yannick Moy <moy@adacore.com>
4085 * sem_ch3.adb, sem_ch5.adb, sem_prag.adb, sem_attr.adb, errout.ads,
4086 sem_ch6.adb: Mark most references to SPARK RM in error messages
4089 2014-02-24 Ed Schonberg <schonberg@adacore.com>
4091 * par-ch3.adb (P_Basic_Declarative_Items): If an improper body
4092 appears in a list of basic declarations, complete the tree with
4093 an empty statement list, to prevent cascaded errors and crashes
4094 if semantic analysis is attempted.
4096 2014-02-24 Thomas Quinot <quinot@adacore.com>
4098 * g-sercom-mingw.adb (Open): Fix incorrect test for error return
4100 * erroutc.adb: Minor reformatting.
4102 2014-02-24 Hristian Kirtchev <kirtchev@adacore.com>
4104 * sem_prag.adb (Check_Clause_Syntax): Account
4105 for a solitary input item in a dependency list.
4107 2014-02-24 Yannick Moy <moy@adacore.com>
4109 * gnat1drv.adb (Adjust_Global_Switches): Do not
4110 use validity checks at all in GNATprove_Mode.
4112 2014-02-24 Robert Dewar <dewar@adacore.com>
4114 * g-sercom-mingw.adb, g-sercom-linux.adb, sem_prag.adb, freeze.adb,
4115 atree.adb, atree.ads: Minor reformatting.
4117 2014-02-24 Hristian Kirtchev <kirtchev@adacore.com>
4119 * sem_ch6.adb (Analyze_Subprogram_Body_Contract): Do not enforce
4120 global and dependence refinement when SPARK_Mode is off.
4121 * sem_ch7.adb (Analyze_Package_Body_Contract): Do not enforce
4122 state refinement when SPARK_Mode is off.
4123 * sem_ch13.adb (Analyze_Aspect_Specifications): Add local
4124 variable Decl. Insert the generated pragma for Refined_State
4125 after a potential pragma SPARK_Mode.
4126 * sem_prag.adb (Analyze_Depends_In_Decl_Part): Add local
4127 constant Deps. Remove local variable Expr. Check the syntax
4128 of pragma Depends when SPARK_Mode is off. Factor out the
4129 processing for extra parenthesis around individual clauses.
4130 (Analyze_Global_In_Decl_List): Items is now a constant. Check
4131 the syntax of pragma Global when SPARK_Mode is off.
4132 (Analyze_Initializes_In_Decl_Part): Check the syntax of pragma
4133 Initializes when SPARK_Mode is off.
4134 (Analyze_Part_Of): Check
4135 the syntax of the encapsulating state when SPARK_Mode is off.
4136 (Analyze_Pragma): Check the syntax of pragma Abstract_State when
4137 SPARK_Mode is off. Move the declaration order check with respect
4138 to pragma Initializes to the end of the processing. Do not verify
4139 the declaration order for pragma Initial_Condition when SPARK_Mode
4140 is off. Do not complain about a useless package refinement when
4142 (Analyze_Refined_Depends_In_Decl_Part): Refs
4143 is now a constant. Check the syntax of pragma Refined_Depends
4144 when SPARK_Mode is off.
4145 (Analyze_Refined_Global_In_Decl_Part):
4146 Check the syntax of pragma Refined_Global when SPARK_Mode is off.
4147 (Analyze_Refined_State_In_Decl_Part): Check the syntax of pragma
4148 Refined_State when SPARK_Mode is off.
4149 (Check_Dependence_List_Syntax): New routine.
4150 (Check_Global_List_Syntax): New routine.
4151 (Check_Initialization_List_Syntax): New routine.
4152 (Check_Item_Syntax): New routine.
4153 (Check_State_Declaration_Syntax): New routine.
4154 (Check_Refinement_List_Syntax): New routine.
4155 (Has_Extra_Parentheses): Moved to the top level of Sem_Prag.
4157 2014-02-24 Robert Dewar <dewar@adacore.com>
4159 * a-tags.adb, s-os_lib.adb: Minor reformatting.
4161 2014-02-24 Thomas Quinot <quinot@adacore.com>
4163 * g-sercom-mingw.adb, g-sercom-linux.adb (Raise_Error): Include
4164 strerror message, not just numeric errno value.
4166 2014-02-24 Doug Rupp <rupp@adacore.com>
4168 * raise-gcc.c (exception_class_eq): Make endian neutral.
4170 2014-02-24 Ed Schonberg <schonberg@adacore.com>
4172 * atree.ads, atree,adb (Copy_Separate_Tree): Remove Syntax_Only
4173 flag, and reset Etype and Analyzed attributes unconditionally
4174 when copying a tree that may be partly analyzed.
4175 * freeze.adb: Change calls to Copy_Separate_Tree accordingly.
4176 * sem_ch6.adb (Check_Inline_Pragma): If the Inline pragma appears
4177 within a subprogram body and applies to it, remove it from the
4178 body before making a copy of it, to prevent spurious errors when
4179 analyzing the copied body.
4181 2014-02-24 Thomas Quinot <quinot@adacore.com>
4183 * s-os_lib.adb (Errno_Message): Do not depend on Integer'Image.
4184 * s-oscons-tmplt.c: On VxWorks, include adaint.h only after
4185 vxWorks.h has been included. Also ensure that file attributes
4186 related definitions are output even in cases where socket support
4188 * a-tags.adb: Code clean up.
4189 * Make-generated.in (OSCONS_CPP, OSCONS_EXTRACT): Use -iquote
4190 instead of -I to add the main ada source directory to the header
4191 search path, in order to avoid conflict between our own "types.h"
4192 and VxWork's <types.h>.
4194 2014-02-24 Robert Dewar <dewar@adacore.com>
4196 * atree.ads, atree.adb (Copy_Separate_Tree): Add Syntax_Only parameter.
4197 * debug.adb: Remove documentation of -gnatd.X, no longer used.
4198 * freeze.adb (Wrap_Imported_Subprogram): Fixed and activated.
4200 2014-02-24 Bob Duff <duff@adacore.com>
4202 * gnat_ugn.texi: Improve documentation of gnatpp.
4204 2014-02-24 Thomas Quinot <quinot@adacore.com>
4206 * g-stheme.adb, g-socthi-vms.adb, g-socthi-vms.ads,
4207 g-socthi-vxworks.adb, g-socthi-vxworks.ads, g-stseme.adb,
4208 g-socthi-mingw.adb, g-socthi-mingw.ads, g-socthi.adb,
4209 g-socthi.ads, g-socket.adb (Host_Error_Message): Return a string, not
4210 a chars_ptr, because on Windows this is a renaming of
4211 Socket_Error_Message.
4213 2014-02-24 Robert Dewar <dewar@adacore.com>
4215 * a-direct.adb, sem_ch5.adb, a-cfdlli.adb, a-cfhase.adb, a-tags.adb,
4216 s-filatt.ads, a-cforma.adb, sem_ch6.adb, g-socthi-mingw.adb,
4217 a-cfhama.adb, a-cforse.adb, a-cofove.adb: Minor reformatting and code
4220 2014-02-24 Thomas Quinot <quinot@adacore.com>
4222 * Make-generated.in (OSCONS_CPP, OSCONS_EXTRACT): Make sure
4223 that the source directory containing s-oscons-tmplt.c is on the
4224 include path, so that all internal header files are available.
4226 2014-02-24 Ed Schonberg <schonberg@adacore.com>
4228 * sem_ch5.adb (Analyze_Loop_Parameter_Specification): If the
4229 domain of iteration is an attribute reference 'Old, this is an
4230 Ada 2012 iterator and the loop must be rewritten as such.
4232 2014-02-24 Thomas Quinot <quinot@adacore.com>
4234 * s-fileio.adb (Errno_Message): Remove, use shared version from
4236 * s-crtrun.ads, Makefile.rtl: Remove now unused unit.
4237 * g-stseme (Socket_Error_Message): Reimplement in terms of new
4239 * g-socthi.ads, g-socthi.adb: Change profile of
4240 Socket_Error_Message to return String to allow the above.
4241 * g-socket.adb, g-socthi-mingw.adb, g-socthi-mingw.ads,
4242 * g-socthi-vms.adb, g-socthi-vms.ads, g-socthi-vxworks.adb,
4243 * g-socthi-vxworks.ads: Update to account for the above profile
4245 * a-tags.adb: Use strlen builtin binding provided by s-crtl.
4246 * s-crtl.ads (strncpy): New procedure.
4247 * s-os_lib.adb (Copy_Attributes): Import just once (strncpy):
4248 Use import from s-crtl.
4249 * a-envvar.adb, osint.adb: Use imports of C runtime functions
4250 from s-crtl instead of re-importing locally.
4252 2014-02-24 Hristian Kirtchev <kirtchev@adacore.com>
4254 * sem_prag.adb (Analyze_Global_Item): Emit the
4255 variable related checks concerning volatile objects only when
4258 2014-02-24 Robert Dewar <dewar@adacore.com>
4260 * sem_ch5.adb (Analyze_Iterator_Specification): use
4261 Error_Msg_Ada_2012_Feature.
4263 2014-02-24 Jose Ruiz <ruiz@adacore.com>
4265 * s-rident.ads (Profile_Info): For Ravenscar, the restrictions
4266 No_Local_Timing_Events and No_Specific_Termination_Handlers
4267 must be set, according to the Ravenscar profile definition
4270 2014-02-24 Ed Schonberg <schonberg@adacore.com>
4272 * sem_ch6.adb (Analyze_Expression_Function): If this is a
4273 completion, freeze return type and its designated type if needed.
4275 2014-02-24 Thomas Quinot <quinot@adacore.com>
4277 * sem_ch13.adb (Analyze_Attribute_Definition_Clause, case
4278 'Address): When moving initialization statements to a freeze
4279 entity, keep them under a single node (i.e. do not unwrap
4280 expressions with actions), and set the Initialization_Statements
4281 attribute again so that processing of a later pragma Import can
4284 2014-02-24 Claire Dross <dross@adacore.com>
4286 * a-cfdlli.adb, a-cfdlli.ads, a-cfhama.adb, a-cfhama.ads,
4287 a-cfhase.adb, a-cfhase.ads, a-cforma.adb, a-cforma.ads,
4288 a-cforse.adb, a-cforse.ads, a-cofove.adb, a-cofove.ads: Rename
4289 Left/Right to First_To_Previous/Current_To_Last.
4291 2014-02-24 Thomas Quinot <quinot@adacore.com>
4293 * adaint.h (struct file_attributes): New component "error"
4294 (__gnat_error_attributes): Accessor for the above.
4295 * adaint.c (__gnat_error_attributes): New subprogram
4296 (__gnat_stat): Fix returned value (expect errno value)
4297 (__gnat_stat_to_attr): Add management of error component (set to
4298 stat errno value, except for missing files where it is set to 0,
4299 and exists is set to 0).
4300 * osint.ads (File_Attributes_Size): Update per change above,
4301 also clarify documentation.
4302 * s-filatt.ads: New file, binding to file attributes related
4304 * Makefile.rtl (s-filatt): New runtime unit.
4305 * s-crtl.ads (strlen): Expose binding to GCC builtin (falls back
4306 to library function if not available on target).
4307 * s-os_lib.ads, s-os_lib.adb (Errno_Message): New subprogram.
4308 * s-oscons-tmplt.c (SIZEOF_struct_file_attributes,
4309 SIZEOF_struct_dirent_alloc): New constants.
4310 * Make-generated.in (s-oscons.ads): Now requires adaint.h.
4311 * a-direct.adb (Fetch_Next_Entry): Fix incorrect buffer sizes.
4312 Perform appropriate error checking if stat fails (do not just
4313 ignore existing files if stat fails)
4314 * gcc-interface/Make-lang.in (GNAT_ADA_OBJS, GNATBIND_OBJS): Update
4317 2014-02-24 Hristian Kirtchev <kirtchev@adacore.com>
4319 * sem_prag.adb (Analyze_Global_Item): Move the check concerning
4320 the use of volatile objects as global items in a function to
4321 the variable related checks section.
4322 * sem_util.adb (Async_Readers_Enabled): Directly call
4323 Has_Enabled_Property.
4324 (Async_Writers_Enabled): Directly call Has_Enabled_Property.
4325 (Effective_Reads_Enabled): Directly call Has_Enabled_Property.
4326 (Effective_Writes_Enabled): Directly call Has_Enabled_Property.
4327 (Has_Enabled_Property): Rename formal parameter State_Id to Item_Id.
4328 Update the comment on usage. State_Has_Enabled_Property how handles
4329 the original logic of the routine. Add processing for variables.
4330 (State_Has_Enabled_Property): New routine.
4331 (Variable_Has_Enabled_Property): New routine.
4333 2014-02-24 Robert Dewar <dewar@adacore.com>
4335 * sinfo.ads, sem_ch12.adb, sem_res.adb, sem_ch4.adb, par-ch12.adb:
4337 * atree.ads, atree.adb (Node35): New function.
4338 (Set_Node35): New procedure.
4339 * debug.adb: Define new debug flag -gnatd.X.
4340 * einfo.ads, einfo.adb (Import_Pragma): New field.
4341 * freeze.adb (Wrap_Imported_Procedure): New procedure (not
4342 really active yet, has to be activated with -gnatd.X.
4343 * sem_prag.adb (Set_Imported): Set new Import_Pragma
4344 field (Set_Imported): Don't set Is_Public (see
4345 Freeze.Wrap_Imported_Subprogram)
4346 * par-ch3.adb (P_Component_List): Handle unexpected null component.
4348 2014-02-24 Yannick Moy <moy@adacore.com>
4350 * sem_ch3.adb: Correct reference to SPARK RM in error messages.
4351 * gnat_rm.texi: Correct documentation of attribute Update.
4353 2014-02-24 Ed Schonberg <schonberg@adacore.com>
4355 * sem_ch5.adb (Analyze_Iterator_Specification): Reject container
4356 iterator in older versions of Ada.
4358 2014-02-24 Gary Dismukes <dismukes@adacore.com>
4360 * sem_ch5.adb, sem_aux.ads, sem_ch12.adb, gnat_ugn.texi, par.adb,
4361 par-ch12.adb: Change spelling 'parametrization' to 'parameterization'.
4363 2014-02-24 Ed Schonberg <schonberg@adacore.com>
4365 * sinfo.ads, sinfo.adb: New attribute Generalized_Indexing, for
4366 indexed_components that are instances of Ada 2012 container
4367 indexing operations. Analysis and resolution of such nodes
4368 is performed on the attribute, and the original source is
4369 preserved for ASIS operations. If expansion is enabled, the
4370 indexed component is replaced by the value of this attribute,
4371 which is in a call to an Indexing aspect, in most case wrapped
4372 in a dereference operation.
4373 * sem_ch4.adb (Analyze_Indexed_Component): Create
4374 Generalized_Indexing attribute when appropriate.
4375 (Analyze_Call): If prefix is not overloadable and has an indexing
4376 aspect, transform into an indexed component so it can be analyzed
4377 as a potential container indexing.
4378 (Analyze_Expression): If node is an indexed component with a
4379 Generalized_ Indexing, do not re-analyze.
4380 * sem_res.adb (Resolve_Generalized_Indexing): Complete resolution
4381 of an indexed_component that has been transformed into a container
4383 (Resolve_Indexed_Component): Call the above when required.
4384 (Resolve): Do not insert an explicit dereference operation on
4385 an indexed_component whose type has an implicit dereference:
4386 the operation is inserted when resolving the related
4387 Generalized_Indexing.
4389 2014-02-24 Olivier Ramonat <ramonat@adacore.com>
4391 * gnat_rm.texi, gnat_ugn.texi: Replace Ada Compiler by Ada Development
4394 2014-02-24 Hristian Kirtchev <kirtchev@adacore.com>
4396 * sem_prag.adb (Check_Constituent_Usage): Remove leading spaces in
4398 (Inconsistent_Mode_Error): Remove leading spaces in error messages.
4399 Merge the expected and available mode errors.
4400 (Report_Unused_Constituents): Remove leading spaces in error messages.
4401 (Report_Unused_States): Remove leading spaces in error messages.
4403 2014-02-24 Thomas Quinot <quinot@adacore.com>
4405 * par_sco.adb (Traverse_One): Refine categorization of statement
4408 2014-02-24 Robert Dewar <dewar@adacore.com>
4410 * aspects.ads, aspects.adb: Remove aspects Ada_2005 and Ada_2012,
4411 Pure_05, Pure_12 and Preelaborate_05.
4412 * gnat_rm.texi: Update accordingly.
4413 * sem_prag.adb: Document one argument form of Ada_05/Ada_2005
4414 pragmas Document one argument form of Ada_12/Ada_2012 pragmas
4415 Recognize one argument form of these pragmas only in GNAT mode
4418 2014-02-24 Ed Schonberg <schonberg@adacore.com>
4420 * s-dimmks.ads: Replace symbol for temperature, previously the
4421 Greek letter Theta, by the ASCII @ sign.
4422 * s-diflio.ads: ditto.
4424 2014-02-24 Robert Dewar <dewar@adacore.com>
4426 * exp_ch4.adb: Minor code reorganization (use OR for boolean
4428 * sem_ch3.adb, sem_prag.adb, freeze.adb: Minor reformatting.
4430 2014-02-24 Ben Brosgol <brosgol@adacore.com>
4432 * gnat_ugn.texi, projects.texi: Added the necessary conditionalization
4433 so that references to gnatmem and ASIS tools do not appear in the FSF
4434 edition of the GNAT User's Guide.
4436 2014-02-24 Yannick Moy <moy@adacore.com>
4438 * freeze.adb (Freeze_Entity): Do not issue warning
4439 for pre/post being ignored on imported subprogram in GNATprove
4442 2014-02-24 Robert Dewar <dewar@adacore.com>
4444 * exp_ch5.adb, sem_ch5.adb, sem_type.adb, sem_res.adb, sem_attr.adb,
4445 stand.ads, sem_eval.adb: Minor reformatting.
4447 2014-02-24 Yannick Moy <moy@adacore.com>
4449 * sem_prag.adb: Minor rewording in error message.
4451 2014-02-24 Johannes Kanig <kanig@adacore.com>
4453 * exp_util.adb (Expand_Subtype_From_Expr): Do not expand subtypes in
4454 GNATprove_mode, gnat2why doesn't need nor use these types.
4456 2014-02-24 Gary Dismukes <dismukes@adacore.com>
4458 * exp_ch4.adb (Expand_N_Op_Expon): On the AAMP
4459 target, in the case of signed integer exponentiation that uses a
4460 run-time routine, always select the Exp_* versions, since overflow
4461 checking is automatically done by AAMP arithmetic instructions.
4463 2014-02-24 Hristian Kirtchev <kirtchev@adacore.com>
4465 * sem_ch13.adb (Analyze_Aspect_Specifications):
4466 When the related context is a package instace, insert pragma
4467 Abstract_State after all internally-generated renamings related
4468 to the instance "header".
4470 2014-02-24 Ed Schonberg <schonberg@adacore.com>
4472 * sem_ch3.adb (Analyze_Declarations): Analyze Contract of abstract
4474 * sem_disp.adb (Check_Dispatching_Context): A non-dispatching
4475 call to an abstract subprogram is legal if it appears in a
4476 pre/postcondition of another abstract operation.
4478 2014-02-24 Sergey Rybin <rybin@adacore.com frybin>
4480 * gnat_ugn.texi: Misc updates.
4482 2014-02-24 Hristian Kirtchev <kirtchev@adacore.com>
4484 * exp_prag.adb (Expand_Old): Set the type of the generated temporary.
4486 2014-02-24 Gary Dismukes <dismukes@adacore.com>
4488 * layout.adb (Layout_Variant_Record): Instantiate
4489 Generic_Check_Choices and call Check_Choices before calling
4490 Build_Discr_Checking_Funcs, since we need Others_Discrete_Choices
4491 set to prevent generating incorrect discriminant-checking
4492 functions for 'others' variants (functions that unconditionally
4493 return True rather than accounting for the values covered by the
4495 * sem_eval.ads (Subtypes_Statically_Compatible): Add formal
4496 Formal_Derived_Matching.
4497 (Subtypes_Statically_Match): Add formal Formal_Derived_Matching.
4498 * sem_eval.adb (Subtypes_Statically_Compatible): Pass new
4499 Formal_Derived_Matching formal to Subtypes_Statically_Match.
4500 (Subtypes_Statically_Match): Suppress the Object_Size matching
4501 test in the case where Formal_Derived_Matching is True.
4502 * sem_ch12.adb (Validate_Derived_Type_Instance): Pass
4503 True for Formal_Derived_Matching_Formal on the call to
4504 Subtypes_Statically_Compatible.
4506 2014-02-23 Eric Botcazou <ebotcazou@adacore.com>
4508 * gcc-interface/Make-lang.in (ADA_TOOLS_FLAGS_TO_PASS): Robustify.
4510 2014-02-23 Eric Botcazou <ebotcazou@adacore.com>
4512 * gcc-interface/utils2.c (build_simple_component_ref): Fix formatting.
4513 Look through a conversion between original and packable version to get
4515 (build_component_ref): Rework comment and fix formatting.
4517 2014-02-20 Sergey Rybin <rybin@adacore.com frybin>
4519 * gnat_ugn.texi, vms_data.ads (gnatelim): Add description of
4520 project-specific options.
4522 2014-02-20 Ed Schonberg <schonberg@adacore.com>
4524 * a-cbdlli.adb (Insert): When capacity exceeded, raise Capacity_Error,
4525 not Constraint_Error.
4526 * a-cbmutr.adb (Append_Child, Insert_Child, Prepend_Child): Ditto.
4527 * sem_ch5.adb: Code clean up.
4529 2014-02-20 Hristian Kirtchev <kirtchev@adacore.com>
4531 * sem_prag.adb (Usage_Error): Remove local
4532 constant Typ. Remove the specialized diagnostics for unconstrained
4533 or tagged items as those are not part of the explicit input set
4534 of the related subprogram and should not be flagged.
4536 2014-02-20 Ed Schonberg <schonberg@adacore.com>
4538 * sem_attr.adb: Add guard to preserve all errors.
4540 2014-02-20 Vincent Celier <celier@adacore.com>
4542 * switch-m.adb (Normalize_Compiler_Switches): Take into account
4543 switches that are recorded in ALI files: -gnateA, -gnateE,
4544 -gnateF, -gnateinn, -gnateu, -gnateV and -gnateY.
4546 2014-02-20 Ed Schonberg <schonberg@adacore.com>
4548 * sem_ch5.adb (Analyze_Iterator_Specification): Check legality
4549 of an element iterator form over a formal container with an
4551 * exp_ch5.adb (Build_Formal_Container_Iteration): Utility
4552 to create declaration and loop statements for both forms of
4553 container iterators.
4554 (Expand_Formal_Container_Element_Iterator): New procedure
4555 to handle loops of the form "for E of C" when C is a formal
4557 (Expand_Formal_Container_Iterator): Code cleanup.
4559 2014-02-20 Hristian Kirtchev <kirtchev@adacore.com>
4561 * sem_prag.adb (Add_Item_To_Name_Buffer): New routine.
4562 (Analyze_Contract_Case): Remove the use of
4563 "may". Replace "aspect Contract_Cases" to avoid categorization
4564 of aspect vs pragma.
4565 (Analyze_External_Property_In_Decl_Part): Remove the use of "formal".
4566 (Analyze_Global_Item): Remove
4567 the use of "formal", specify the subprogram. Split the
4568 error message about a state with visible refinement into
4569 two. Remove the use of "global" from "volatile global item".
4570 (Analyze_Initialization_Item): Ensure that the SPARK RM reference
4572 (Analyze_Input_Output): Update the call to
4573 Check_Mode. Specify the duplicated item. Reword the error
4574 message concerning an input of a null output list. Use "\"
4575 for error message continuation.
4576 (Analyze_Part_Of): Remove
4577 the use of "may". Use "\" for error message continuation.
4578 (Analyze_Refined_Depends_In_Decl_Part): Update the error
4579 message concerning a useless refinement to match the format
4581 (Analyze_Refined_Global_In_Decl_Part): Reword the error message
4582 concerning a useless refinement.
4583 (Analyze_Refinement_Clause): Use "\" for error message continuation.
4584 (Check_Constituent_Usage): Use "\" for error message continuation.
4585 (Check_Dependency_Clause): Use "\" for error message continuation.
4586 (Check_Matching_Constituent): Use "\" for error message continuation.
4587 (Check_Missing_Part_Of): Use "\" for error message continuation.
4588 (Check_Mode): Renamed to
4589 Check_Role. Update the comment on usage. Redo the error reporting
4591 (Check_Mode_Restriction_In_Enclosing_Context): Use "\" for error
4592 message continuation.
4593 (Find_Mode): Renamed to Find_Role. Update the parameter profile along
4594 with comment on usage. Update all occurrences of Is_Input and Is_Output.
4595 (Inconsistent_Mode_Error): Use "\" for error message continuation.
4596 (Input_Match): Use "\" for error message continuation.
4597 (Role_Error): New routine.
4598 (Set_Convention_From_Pragma): Use "\" for error message continuation.
4599 (Usage_Error): Add local variable Error_Msg. Build specialized error
4600 message showcasing the offending item kind. Redo the diagnostics for
4601 unconstrained types.
4603 2014-02-20 Ed Schonberg <schonberg@adacore.com>
4605 * exp_util.adb (Is_Iterated_Container): Use high-level primitives
4606 to determine whether a type is a container type, rather than
4607 examining only its type declaration, so that subtypes and derived
4608 types are handled properly.
4610 2014-02-20 Sergey Rybin <rybin@adacore.com frybin>
4612 * gnat_ugn.texi: gnatmetric: add description of project-specific
4615 2014-02-20 Ed Schonberg <schonberg@adacore.com>
4617 * sem_attr.adb (Analyze_Attribute, case 'Update): Verify that
4618 all choices in an association for a record type have the same
4619 type, as is done for record aggregates.
4621 2014-02-20 Robert Dewar <dewar@adacore.com>
4623 * a-cborma.adb, a-cbhama.adb, a-cbdlli.adb, a-cbmutr.adb: Use pragma
4624 Unmodified rather than Warnings (Off). Make comments
4625 uniform in the four affected units.
4627 2014-02-20 Robert Dewar <dewar@adacore.com>
4629 * sem_ch13.adb (Analyze_Attribute_Definition_Clause, case
4630 Object_Size): For non-scalar types allow any value that is a
4632 * gnat_rm.texi: Document Object_Size for composites more clearly.
4634 2014-02-20 Yannick Moy <moy@adacore.com>
4636 * sem_util.ads, sem_util.adb (Default_Initialization): Remove function.
4638 2014-02-20 Ed Schonberg <schonberg@adacore.com>
4640 * stand.ads: Raise_Type: new predefined entity, used as the type
4641 of a Raise_Expression prior to resolution.
4642 * cstand.adb: Build entity for Raise_Type.
4643 * sem_ch11.adb (Analyze_Raise_Expression): use Raise_Type as the
4644 initial type of the node.
4645 * sem_type.adb (Covers): Raise_Type is compatible with all
4647 * sem_res.adb (Resolve): Remove special handling of Any_Type on
4648 Raise_Expression nodes.
4649 (Resolve_Raise_Expression): Signal ambiguity if the type of the
4650 context is still Raise_Type.
4652 2014-02-20 Robert Dewar <dewar@adacore.com>
4654 * sem_ch12.adb (Validate_Access_Type_Instance): Add message if
4655 mismatching predicates.
4656 * sem_ch6.adb (Check_Conformance): Give better messages on
4658 * sem_eval.adb (Predicates_Match): Move to spec.
4659 * sem_eval.ads (Predicates_Match): Moved here from body.
4661 2014-02-20 Ed Schonberg <schonberg@adacore.com>
4663 * a-cbmutr.adb: Use default value in Insert_Child.
4665 2014-02-20 Vincent Celier <celier@adacore.com>
4667 * gnatcmd.adb, make.adb, prj-makr.adb, clean.adb: Call
4668 Stringt.Initialize in all project aware tools.
4670 2014-02-20 Doug Rupp <rupp@adacore.com>
4672 * gnat_ugn.texi: Document gnatbind -X option.
4673 * vms_data.ads: Minor warnings documentation reformatting.
4675 2014-02-20 Ed Schonberg <schonberg@adacore.com>
4677 * exp_ch3.adb (Expand_Freeze_Array_Type): Only create invariant
4678 procedure for a base type.
4680 2014-02-20 Robert Dewar <dewar@adacore.com>
4682 * sem_ch4.adb (Analyze_Case_Expression): Get type from first
4683 expression with type info.
4684 * sem_ch13.adb: Minor reformatting.
4685 * sem_eval.adb (Subtypes_Statically_Match): Make sure we return
4686 False if predicates do not match on the two types.
4688 2014-02-20 Arnaud Charlet <charlet@adacore.com>
4690 * sem_prag.adb (Analyze_Pragma [pragma Attach_Handler]):
4691 In Relaxed_RM_Semantics mode, allow any static integer value,
4692 for compatibility with other compilers.
4694 2014-02-20 Vincent Celier <celier@adacore.com>
4696 * errutil.adb (Initialize): Properly initialize entry in table
4697 Warnings when warnings are suppressed.
4699 2014-02-20 Robert Dewar <dewar@adacore.com>
4701 * s-os_lib.ads: Add warning about non-portability of Rename_File.
4702 * sem_util.ads, sem_util.adb (Is_Junk_Name): New function.
4703 * sem_warn.adb: Use Is_Junk_Name to suppress some warnings.
4704 * gnat_ugn.texi: Document no warnings on junk variable names.
4705 * layout.adb: Minor code reorganization (use Ekind_In).
4706 * stringt.adb: Move initialization of Null_String_Id to Initialize
4709 2014-02-20 Ed Schonberg <schonberg@adacore.com>
4711 * sem_ch13.adb: Initialize optional Element_Id.
4713 2014-02-20 Robert Dewar <dewar@adacore.com>
4715 * s-os_lib.ads (Rename_File): Minor commment addition.
4717 2014-02-20 Thomas Quinot <quinot@adacore.com>
4719 * einfo.ads: Minor reformatting.
4721 2014-02-20 Hristian Kirtchev <kirtchev@adacore.com>
4723 * aspects.adb (Exchange_Aspects): New routine.
4724 * aspects.ads (Exchange_Aspects): New routine.
4725 * atree.adb (Rewrite): Do not check whether the save node has
4726 aspects as it never will, instead check the node about to be clobbered.
4727 * einfo.adb (Write_Field25_Name): Abstract_States can appear in
4728 entities of generic packages.
4729 * sem_ch6.adb (Analyze_Expression_Function): Fix the parent
4730 pointer of an aspect specification list after rewriting takes place.
4731 * sem_ch7.adb (Analyze_Package_Body_Helper): Swap the aspect
4732 specifications of the generic template and the copy used for analysis.
4733 * sem_ch12.adb (Analyze_Generic_Package_Declaration): Swap
4734 the aspect specifications of the generic template and the
4735 copy used for analysis.
4736 (Analyze_Package_Instantiation): Propagate the aspect specifications
4737 from the generic template to the instantiation.
4738 (Build_Instance_Compilation_Unit_Nodes): Propagate the aspect
4739 specifications from the generic template to the instantiation.
4740 * sem_ch13.adb (Analyze_Aspect_Specifications): Handle aspects
4741 Abstract_State, Initializes and Initial_Condition when they
4742 apply to a package instantiation.
4744 2014-02-20 Robert Dewar <dewar@adacore.com>
4746 * stringt.adb: Add call to Initialize in package initialization.
4748 2014-02-20 Robert Dewar <dewar@adacore.com>
4750 * a-crbtgk.adb, a-cihama.adb, a-coinve.adb, a-ciorse.adb, a-crbtgo.adb,
4751 a-cidlli.adb, a-cimutr.adb, a-cihase.adb, a-cohama.adb, a-coorse.adb,
4752 a-chtgke.adb, a-chtgop.adb, a-comutr.adb, a-ciorma.adb, a-cobove.adb,
4753 a-convec.adb, a-cohase.adb, a-chtgbk.adb, a-chtgbo.adb: Minor
4756 2014-02-20 Bob Duff <duff@adacore.com>
4758 * s-os_lib.ads: Minor: Remove incorrect comment.
4760 2014-02-20 Robert Dewar <dewar@adacore.com>
4762 * sem_elab.adb (Check_Elab_Assign): Clearer warning message.
4764 2014-02-20 Ed Schonberg <schonberg@adacore.com>
4766 * a-cborma.adb (Assign): When creating a node without a specified
4767 element, insert an uninitialized element in the map, because
4768 the instance may provide an element type with a default
4769 initialization, e.g a scalar with a Default_Value aspect.
4770 * a-cbhama.adb (Assign_Key): Remove useless Allocate procedure.
4771 (Insert): In the version without explicit element, provide an
4772 uninitialized element, as above.
4773 * a-cbdlli.adb (Append): In the version without explicit element,
4774 provide an uninitalized element, as above.
4775 (Allocate): Remove unused version.
4777 2014-02-20 Robert Dewar <dewar@adacore.com>
4779 * sem_elab.adb: Minor code reorganization (use Nkind_In).
4780 * stringt.adb: Remove temporary pragma Warnings (Off).
4781 * stringt.ads: Add pragma Elaborate_Body to ensure initialization
4784 2014-02-20 Matthew Heaney <heaney@adacore.com>
4786 * a-chtgbk.adb (Replace): Use correct offset when calculating bucket
4789 2014-02-20 Ed Schonberg <schonberg@adacore.com>
4791 * sem_ch5.adb (Analyze_Iterator_Specification): Initialize
4792 properly the cursor type for subsequent volatile testing in SPARK
4793 mode, when domain is a formal container with an Iterabe aspect.
4795 2014-02-20 Robert Dewar <dewar@adacore.com>
4797 * errout.adb (Set_Warnings_Mode_Off): Add Reason argument.
4798 (Set_Specific_Warning_Off): Add Reason argument.
4799 * errout.ads (Set_Warnings_Mode_Off): Add Reason argument.
4800 (Set_Specific_Warning_Off): Add Reason argument.
4801 * erroutc.adb (Warnings_Entry): Add Reason field
4802 (Specific_Warning_Entry): Add Reason field.
4803 (Warnings_Suppressed): return String_Id for Reason.
4804 (Warning_Specifically_Suppressed): return String_Id for Reason.
4805 * erroutc.ads (Warnings_Entry): Add Reason field.
4806 (Specific_Warning_Entry): Add Reason field.
4807 (Set_Specific_Warning_Off): Add Reason argument.
4808 (Set_Warnings_Mode_Off): Add Reason argument.
4809 (Warnings_Suppressed): return String_Id for Reason.
4810 (Warning_Specifically_Suppressed): return String_Id for Reason.
4811 * errutil.adb (Warnings_Suppressed): returns String_Id for Reason
4812 (Warning_Specifically_Suppressed): returns String_Id for Reason
4813 * gnat_rm.texi: Document that Warning parameter is string literal
4814 or a concatenation of string literals.
4815 * par-prag.adb: New handling for Reason argument.
4816 * sem_prag.adb (Analyze_Pragma, case Warning): New handling
4817 for Reason argument.
4818 * sem_util.ads, sem_util.adb (Get_Reason_String): New procedure.
4819 * sem_warn.ads (Warnings_Off_Entry): Add reason field.
4820 * stringt.adb: Set Null_String_Id.
4821 * stringt.ads (Null_String_Id): New constant.
4823 2014-02-20 Robert Dewar <dewar@adacore.com>
4825 * einfo.ads: Minor comment addition: Etype of package is
4827 * checks.adb, exp_aggr.adb, exp_atag.adb, exp_attr.adb, exp_ch13.adb,
4828 exp_ch2.adb, exp_ch3.adb, exp_ch4.adb, exp_ch5.adb, exp_ch6.adb,
4829 exp_ch7.adb, exp_ch9.adb, exp_dbug.adb, exp_disp.adb, exp_imgv.adb,
4830 exp_intr.adb, exp_prag.adb, exp_sel.adb, exp_strm.adb, exp_util.adb,
4831 freeze.adb, rtsfind.adb, sem_aggr.adb, sem_attr.adb, sem_ch10.adb,
4832 sem_ch12.adb, sem_ch13.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
4833 sem_ch6.adb, sem_ch8.adb, sem_dim.adb, sem_prag.adb, sem_res.adb,
4834 sem_util.adb, tbuild.adb, tbuild.ads: Remove New_Reference_To.
4835 Replace all calls with calls to New_Occurrence_Of.
4837 2014-02-20 Robert Dewar <dewar@adacore.com>
4839 * par-util.adb (Ignore, case of right paren): Make this a
4842 2014-02-19 Robert Dewar <dewar@adacore.com>
4844 * sem_ch5.adb, sem_prag.adb, sem_attr.adb: Minor reformatting.
4845 * debug.adb: Remove -gnatd.X switch, no longer used.
4846 * styleg.adb (Check_Then): Remove check of -gnatd.X, check is
4849 2014-02-19 Bob Duff <duff@adacore.com>
4851 * g-socket.ads: Minor: Correct some comments.
4853 2014-02-19 Ed Schonberg <schonberg@adacore.com>
4855 * sem_ch5.adb: Inhibit iterator rewriting in ASIS mode.
4857 2014-02-19 Arnaud Charlet <charlet@adacore.com>
4859 * sem_ch13.adb (Analyze_Aspect_Specifications): Do not generate
4860 an error on out of range priorities if Relaxed_RM_Semantics.
4861 * sem_prag.adb (Analyze_Pragma): Ditto.
4863 2014-02-19 Bob Duff <duff@adacore.com>
4865 * sem_attr.adb (Resolve_Attribute): Detect the case of F'Access
4866 where F denotes the renaming of an enumeration literal, and
4867 issue a specialized error message.
4869 2014-02-19 Matthew Heaney <heaney@adacore.com>
4871 * a-chtgop.ads (Checked_Index): New operation.
4872 (Next): Changed mode of hash table.
4873 * a-chtgop.adb (Adjust, Delete_Node_Sans_Free): Detect tampering
4874 (Generic_Read, Reserve_Capacity): Ditto.
4875 (Generic_Equal): Detect tampering.
4876 (Next): Changed mode of hash table, detect tampering.
4877 * a-chtgke.ads (Checked_Index, Checked_Equivalent_Keys): New
4879 (Find): Changed mode of hash table.
4880 * a-chtgke.adb (Checked_Equivalent_Keys): New operation
4881 (Delete_Key_Sans_Free, Generic_Conditional_Insert): Detect
4883 (Find): Changed mode of hash table, check for tampering.
4884 (Generic_Replace_Element): Check for tampering.
4885 * a-chtgbk.ads (Checked_Index, Checked_Equivalent_Keys): New operation.
4886 * a-chtgbk.adb (Checked_Index, Checked_Equivalent_Keys): New
4887 operation (Delete_Key_Sans_Free, Generic_Conditional_Insert):
4889 (Find, Generic_Replace_Element): Check for tampering.
4890 * a-chtgbo.ads (Checked_Index): New operation.
4891 * a-chtgbo.adb (Checked_Index): New operation
4892 (Delete_Node_Sans_Free, Generic_Equal): Detect tampering.
4893 (Generic_Read, Next): Ditto.
4894 * a-cohase.adb, a-cihase.adb (Is_In): Changed mode of hash
4895 table (Difference, Intersection): Use variable view of
4896 source, detect tampering (Find, Is_Subset, Overlap): Use
4897 variable view of container (Symmetric_Difference, Union):
4898 Detect tampering (Vet): Use Checked_Index to detect tampering
4899 (Constant_Reference, Element, Find): Use variable view of
4901 (Update_Element_Preserving_Key): Detect tampering.
4902 * a-cbhase.adb (Difference, Find, Is_In): Use variable view
4905 (Equivalent_Sets, Overlap): Use Node's Next component.
4906 (Vet): Use Checked_Index to detect tampering.
4907 (Constant_Reference, Element, Find): Use variable view of container.
4908 (Update_Element_Preserving_Key): Detect tampering.
4909 * a-cohama.adb, a-cihama.adb, a-cbhama.adb (Constant_Reference,
4910 Element, Find): Use variable view of container.
4911 (Reference): Rename hash table component.
4912 (Vet): Use Checked_Index to detect tampering.
4914 2014-02-19 Arnaud Charlet <charlet@adacore.com>
4916 * adabkend.adb (Scan_Compiler_Arguments): Add missing handling
4919 2014-02-19 Thomas Quinot <quinot@adacore.com>
4921 * tbuild.adb (New_Occurrence_Of, New_Rerefence_To): Guard
4922 against calls without Def_Id.
4924 2014-02-19 Claire Dross <dross@adacore.com>
4926 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads, a-cforse.ads,
4927 a-cofove.ads: Add global annotations to subprograms.
4929 2014-02-19 Hristian Kirtchev <kirtchev@adacore.com>
4931 * sem_prag.adb (Analyze_Initial_Condition_In_Decl_Part): Remove
4932 constants Errors, Pack_Id and Pack_Init. Remove variable Vars.
4933 Initial_Condition no longer requires the presence of pragma
4934 Initialized. Do not try to diagnose whether all variables mentioned in
4935 pragma Initializes also appear in Initial_Condition.
4936 (Collect_Variables): Removed.
4937 (Match_Variable): Removed.
4938 (Match_Variables): Removed.
4939 (Report_Unused_Variables): Removed.
4941 2014-02-19 Thomas Quinot <quinot@adacore.com>
4943 * gnat_rm.texi (pragma Stream_Convert): Minor rewording.
4945 2014-02-19 Robert Dewar <dewar@adacore.com>
4947 * sem_util.adb, sem_util.ads, prj-conf.adb, s-os_lib.adb: Minor
4950 2014-02-19 Vincent Celier <celier@adacore.com>
4952 * prj-part.adb (Parse_Single_Project): Use the fully resolved
4953 project path, with all symbolic links resolved, to check if the
4954 same project is imported with a different unresolved path.
4955 * prj-tree.ads (Project_Name_And_Node): Component Canonical_Path
4956 changed to Resolved_Path to reflect that all symbolic links
4959 2014-02-19 Ed Schonberg <schonberg@adacore.com>
4961 * sem_util.ads, sem_util.adb (Get_Cursor_Type): Moved to sem_util
4962 from sem_ch13, for use elsewhere.
4963 * sem_ch13.adb (Get_Cursor_Type): Moved to sem_util.
4964 * sem_ch5.adb (Analyze_Iterator_Specification): Set properly the
4965 cursor type on the loop variable when the iteration is over o
4968 2014-02-19 Vincent Celier <celier@adacore.com>
4970 * prj-conf.adb (Add_Default_GNAT_Naming_Scheme): Add declaration
4971 for an empty Target (Check_Target): Never fail when an empty
4972 target is declared in the configuration project.
4974 2014-02-19 Ed Schonberg <schonberg@adacore.com>
4976 * sem_prag.adb (Check_Arg_Is_Local_Name): Argument is local if
4977 the pragma comes fron a predicate aspect and the context is a
4978 record declaration within the scope that declares the type.
4980 2014-02-19 Robert Dewar <dewar@adacore.com>
4982 * gnat_rm.texi: Minor clarifications.
4983 * expander.adb, sem_aggr.adb: Add comments.
4985 2014-02-19 Ed Schonberg <schonberg@adacore.com>
4987 * sem_prag.adb (Check_Arg_Is_Local_Name): For an aspect that
4988 applies to a subprogram body, the name is the current scope,
4989 rather than being declared in the current scope.
4990 (Analyze_Pragma, case No_Return): Handle properly a No_Return
4991 aspect applied to a subprogram body.
4993 2014-02-19 Ed Schonberg <schonberg@adacore.com>
4995 * sem_ch13.adb (Resolve_Iterable_Operation): Improve resolution
4996 of overloaded subprograms, and fix bug in handling of primitive
4999 2014-02-19 Pascal Obry <obry@adacore.com>
5001 * s-os_lib.adb: Minor reformatting.
5003 2014-02-19 Yannick Moy <moy@adacore.com>
5005 * expander.adb (Expand): Do nothing inside generics.
5006 * sem_aggr.adb (Aggregate_Constraint_Checks): Do nothing inside
5009 2014-02-19 Yannick Moy <moy@adacore.com>
5011 * exp_ch2.adb: Remove useless 'with' of unit Uintp.
5013 2014-02-19 Robert Dewar <dewar@adacore.com>
5015 * sem_ch3.adb, style.adb, sem_prag.adb, sem_ch13.adb: Minor reformatting
5016 * a-sequio.adb: Remove useless pragma Extensions_Allowed (no
5019 2014-02-19 Claire Dross <dross@adacore.com>
5021 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
5022 a-cforse.ads, a-cofove.ads: Add Iterable aspect to formal containers.
5024 2014-02-19 Hristian Kirtchev <kirtchev@adacore.com>
5026 * sem_ch3.adb (Analyze_Declarations): Analyze
5027 a package contract at the end of the private declarations (if
5028 applicable), otherwise analyze it and the end of the visible
5031 2014-02-19 Ed Schonberg <schonberg@adacore.com>
5033 * style.adb (Missing_Overriding): If subprogram is an
5034 instantiation, place warning on the instance node itself,
5035 without mention of the original generic. Do not emit message
5036 if explicit Ada version is older than the introduction of the
5037 overriding indicator.
5039 2014-02-19 Yannick Moy <moy@adacore.com>
5041 * gnat_rm.texi: Doc clarifications.
5043 2014-02-19 Yannick Moy <moy@adacore.com>
5045 * exp_util.adb (Remove_Side_Effects): Do not remove side-effects
5048 2014-02-19 Ed Schonberg <schonberg@adacore.com>
5050 * sem_ch13.adb (Get_Cursor_Type): Obtain cursor type from
5051 specified First primitive, rather than by name.
5052 (Validate_Iterable_Aspect, Resolve_Iterable_Operation): Use it,
5053 and extend error checking for missing primitives and incorrect
5056 2014-02-19 Ed Schonberg <schonberg@adacore.com>
5058 * sem_ch3.adb (Check_Pragma_Implemented): Detect additional
5059 errors when a Synchronization aspect on an overriding protected
5060 operation does not match the given aspect on the overridden
5061 operation of an ancestor interface.
5063 2014-02-19 Hristian Kirtchev <kirtchev@adacore.com>
5065 * sem_prag.adb (Check_Loop_Pragma_Grouping): New routine.
5066 (Check_Loop_Pragma_Placement): Update
5067 comment on usage. Remove local variables Orig_Stmt and
5068 Within_Same_Sequence. Check that the current Loop_Invariant or
5069 Loop_Variant pragma is grouped together with other such pragmas.
5070 (Is_Loop_Pragma): New routine.
5071 (Prev_In_Loop): Removed.
5073 2014-02-19 Robert Dewar <dewar@adacore.com>
5075 * par-ch6.adb (P_Return): For extended return, end column lines
5077 * par.adb: Minor documentation clarification.
5079 2014-02-19 Yannick Moy <moy@adacore.com>
5081 * sem_prag.adb (Check_Loop_Pragma_Placement): Add check
5082 that Loop_Invariant and Loop_Variant appear consecutively.
5083 * gnat_rm.texi Update documentation of Loop_Invariant and
5084 Loop_Variant pragmas.
5086 2014-02-19 Robert Dewar <dewar@adacore.com>
5088 * debug.adb: Document -gnatd.X.
5089 * par-ch5.adb (P_If_Statement): Always check THEN, even if not
5091 (Check_Then_Column): Ditto.
5092 * styleg.adb (Check_Then): Allow THEN on line after IF.
5093 (Check_Then): Check THEN placement under control of -gnatd.X
5094 * styleg.ads (Check_Then): Now called even if THEN is not first
5096 * stylesw.ads (Style_Check_If_Then_Layout): Document new
5098 * gnat_ugn.texi: For -gnatyi, THEN can now be on line after IF.
5100 2014-02-19 Robert Dewar <dewar@adacore.com>
5102 * a-cfhama.adb, a-cfhase.adb, a-cforse.adb, a-cofove.adb, a-ngcefu.adb,
5103 a-teioed.adb, a-wtedit.adb, a-ztedit.adb, exp_ch5.adb, inline.adb,
5104 prj-pp.adb, prj-tree.adb, sem_ch12.adb, sem_ch8.adb,
5105 vms_conv.adb: Fix bad layout of IF statements
5107 2014-02-19 Robert Dewar <dewar@adacore.com>
5109 * exp_util.adb (Side_Effect_Free): Scalar if expressions can be SEF.
5111 2014-02-19 Robert Dewar <dewar@adacore.com>
5113 * exp_util.adb: Update comments.
5115 2014-02-19 Doug Rupp <rupp@adacore.com>
5117 * bindgen.adb (Gen_Adainit) [VMS] New global Float_Format.
5118 * init.c (__gl_float_format): [VMS] New global.
5119 (__gnat_set_features): Call FP_CONTROL to set FPSR for the float
5120 representation in effect.
5122 2014-02-19 Hristian Kirtchev <kirtchev@adacore.com>
5124 * exp_ch6.adb Add with and use clause for Exp_Prag.
5125 (Expand_Contract_Cases): Relocated to Exp_Prag.
5126 * exp_ch6.ads (Expand_Contract_Cases): Relocated to Exp_Prag.
5127 * exp_prag.adb Add with and use clauses for Checks and Validsw.
5128 (Expand_Contract_Cases): Relocated from Exp_Ch6. Update the
5129 structure of the expanded code to showcase the evaluation of
5130 attribute 'Old prefixes. Add local variable Old_Evals. Expand
5131 any attribute 'Old references found within a consequence. Add
5132 circuitry to evaluate the prefixes of attribute 'Old that
5133 belong to a selected consequence.
5134 (Expand_Old_In_Consequence): New routine.
5135 * exp_prag.ads (Expand_Contract_Cases): Relocated from Exp_Ch6.
5136 * sem_attr.adb (Check_Use_In_Contract_Cases): Warn that a
5137 potentially unevaluated prefix is always evaluated.
5139 2014-02-19 Robert Dewar <dewar@adacore.com>
5141 * exp_attr.adb (Expand_Min_Max_Attribute): Use Insert_Declaration
5142 (Expand_Min_Max_Attribute): Use Matching_Standard_Type.
5143 * exp_ch4.adb (Expand_N_Expression_With_Actions): Remove special
5144 handling for the case of Modify_Tree_For_C, this approach did
5146 * exp_util.adb (Matching_Standard_Type): New function
5147 (Side_Effect_Free): New top level functions (from
5148 Remove_Side_Effects).
5149 * exp_util.ads (Side_Effect_Free): New top level functions
5151 * sinfo.ads: Minor comment updates.
5153 2014-02-19 Ed Schonberg <schonberg@adacore.com>
5155 * exp_ch6.adb (Expand_Simple_Function_Return): If return
5156 type is unconstrained and uses the secondary stack, mark the
5157 enclosing function accordingly, to ensure that the value is not
5158 prematurely removed.
5160 2014-02-19 Hristian Kirtchev <kirtchev@adacore.com>
5162 * par.adb Alphabetize the routines in Par.Sync.
5163 (Resync_Past_Malformed_Aspect): New routine.
5164 * par-ch13.adb (Get_Aspect_Specifications): Alphabetize local
5165 variables. Code and comment reformatting. Detect missing
5166 parentheses on aspects [Refined_]Global and [Refined_]Depends
5167 with a non-null definition.
5168 * par-sync.adb: Alphabetize all routines in this separate unit.
5169 (Resync_Past_Malformed_Aspect): New routine.
5171 2014-02-19 Robert Dewar <dewar@adacore.com>
5173 * sem_eval.ads, sem_eval.adb (Subtypes_Statically_Match): Return False
5174 if Esize values do not match.
5176 2014-02-19 Yannick Moy <moy@adacore.com>
5178 * sinfo.ads: Minor comment update.
5180 2014-02-19 Hristian Kirtchev <kirtchev@adacore.com>
5182 * atree.ads: Minor reformatting (change Entity_Info to Einfo).
5184 2014-02-19 Thomas Quinot <quinot@adacore.com>
5186 * exp_ch7.adb (Find_Node_To_Be_Wrapped): An assignment statement
5187 that has the No_Ctrl_Actions flag is a suitable node to be
5188 wrapped if the assigned expression has no finalization actions.
5189 * sem_eval.adb (Eval_Entity_Name): For a compile time known
5190 boolean value, mark the corresponding condition SCO as constant.
5192 2014-02-19 Robert Dewar <dewar@adacore.com>
5194 * exp_util.adb: Minor reformatting.
5195 * exp_util.ads (Matching_Standard_Type): New function.
5196 * exp_ch7.adb: Minor reformatting.
5198 2014-02-19 Ed Schonberg <schonberg@adacore.com>
5200 * sem_ch13.adb (Get_Cursor_Type): Use scope of iterable type
5201 to find declaration for Cursor, to handle properly the case of
5202 a discriminated iterable type.
5204 2014-02-19 Vincent Celier <celier@adacore.com>
5206 * gnatcmd.adb (GNATCmd): Always replace the object dirs of
5207 imported library projects with the library ALI dirs, when setting
5209 * prj-env.ads (Ada_Objects_Path): Correct comments about
5210 argument Including_Libraries.
5212 2014-02-19 Gary Dismukes <dismukes@adacore.com>
5214 * gnat_rm.texi: Minor spelling fixes.
5216 2014-02-19 Doug Rupp <rupp@adacore.com>
5218 * init.c: Remove unneeded code.
5219 * fe.h (Float_Format): New macro
5220 * gcc-interface/trans.c (gigi): On VMS, set vms_float_format.
5222 2014-02-19 Hristian Kirtchev <kirtchev@adacore.com>
5224 * sem_prag.adb (Check_Refined_Global_Item):
5225 A state or variable acts as a constituent only it is part of an
5226 encapsulating state and the state has visible refinement.
5228 2014-02-19 Ed Schonberg <schonberg@adacore.com>
5230 * sem_ch6.adb (Analyze_Subprogram_Contract): Do not warn on a
5231 postcondition for a function when the expression does not mention
5232 'Result but the function has in-out parameters.
5234 2014-02-19 Robert Dewar <dewar@adacore.com>
5236 * gnat_rm.texi: Add documentation on Value_Size forcing biased
5239 2014-02-19 Hristian Kirtchev <kirtchev@adacore.com>
5241 * lib-xref.ads Remove the small table of letter and symbol usage as we
5244 2014-02-19 Hristian Kirtchev <kirtchev@adacore.com>
5246 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Emit specific error
5247 messages depending on the offending misplaced aspect specifications.
5248 (Diagnose_Misplaced_Aspect_Specifications): New routine.
5250 2014-02-19 Ed Schonberg <schonberg@adacore.com>
5252 * sem_ch13.adb (Get_Cursor): Utility to retrieve cursor type
5253 for iterable aspect primitives.
5254 (Resolve_Iterable_Operation): Use expected signature of iterable
5255 aspect to resolve primitive when overloading is present.
5256 (Validate_Iterable_Aspect, Analyze_Aspects_At_Freeze_Point): use it.
5257 (Check_Signature): Removed.
5259 2014-02-19 Yannick Moy <moy@adacore.com>
5261 * sem_ch10.adb (Analyze_Proper_Body): Issue error on missing
5262 subunit in GNATprove_Mode.
5263 * sinfo.ads (GNATprove_Mode): Document error issued in GNATprove_Mode.
5265 2014-02-19 Hristian Kirtchev <kirtchev@adacore.com>
5267 * lib-xref.ads Alphabetize the contents of table
5268 Xref_Entity_Letters. Add an entry in table Xref_Entity_Letters
5269 for E_Abstract_State. List all letters and symbols in use.
5270 * sem_prag.adb (Analyze_Abstract_State): Update all calls
5271 to Create_Abstract_State to reflect the new signature.
5272 (Create_Abstract_State): Change subprogram profile and update
5273 the comment on usage. Use the proper location of the state
5274 declaration when creating a new abstract state entity. Do not
5275 generate an external name, but simply reuse the name coming from
5276 the state declaration.
5278 2014-02-19 Robert Dewar <dewar@adacore.com>
5280 * exp_ch4.adb (Expand_N_Expression_With_Actions): Make sure
5281 declarations get properly inserted in Modify_Tree_For_C mode.
5282 * sinfo.ads: Minor comment addition.
5284 2014-02-19 Robert Dewar <dewar@adacore.com>
5286 * par-ch9.adb, exp_ch5.adb, sem_ch5.adb, exp_attr.adb, sem_util.adb,
5287 sem_util.ads, sem_ch13.adb, sem_ch13.ads: Minor reformatting.
5289 2014-02-19 Ed Schonberg <schonberg@adacore.com>
5291 * style.adb (Missing_Overriding): Warning does not apply in
5292 language versions prior to Ada 2005.
5293 * snames.ads-tmpl: Add Name_Iterable and Attribute_Iterable.
5294 * sem_attr.adb: Add Attribute_Iterable where needed.
5295 * exp_attr.adb: ditto.
5296 * exp_ch5.adb (Expand_Formal_Container_Loop): New procedure to
5297 handle loops and quantified expressions over types that have an
5298 iterable aspect. Called from Expand_Iterator_Loop.
5299 * sem_ch5.adb (Analyze_Iterator_Specification): Recognize types
5300 with Iterable aspect.
5301 * sem_ch13.adb (Validate_Iterable_Aspect): Verify that the
5302 subprograms specified in the Iterable aspect have the proper
5303 signature involving container and cursor.
5304 (Check_Aspect_At_Freeze_Point): Analyze value of iterable aspect.
5305 * sem_ch13.ads (Validate_Iterable_Aspect): New subprogram.
5306 * sem_util.ads, sem_util.adb (Get_Iterable_Type_Primitive):
5307 New procedure to retrieve one of the primitives First, Last,
5308 or Has_Element, from the value of the iterable aspect of a
5310 (Is_Container_Element): Predicate to recognize expressions
5311 that denote an element of one of the predefined containers,
5312 for possible optimization. This subprogram is not currently
5313 used, pending ARG discussions on the legality of the proposed
5314 optimization. Worth preserving for eventual use.
5315 (Is_Iterator): Recognize formal container types.
5316 * aspects.ads, aspects.adb: Add Aspect_Iterable where needed.
5318 2014-02-19 Robert Dewar <dewar@adacore.com>
5320 * exp_attr.adb (Expand_Min_Max_Attribute): New procedure
5321 (Expand_N_Attribute_Reference): Use this procedure for Min and Max.
5322 * exp_ch4.adb (Expand_N_Expression_With_Actions): Remove object
5323 declarations from list of actions.
5324 * output.ads, output.adb (Delete_Last_Char): New procedure.
5325 * sinfo.ads: Document handling of Mod and expression with actions
5326 in Modify_Tree_For_C mode.
5328 2014-02-19 Ed Schonberg <schonberg@adacore.com>
5330 * par-ch9.adb (P_Task): Add a null statement to produce a
5331 well-formed task body when due to a previous syntax error the
5332 statement list is empty.
5334 2014-02-19 Hristian Kirtchev <kirtchev@adacore.com>
5336 * sem_prag.adb (Check_Dependency_Clause): Account
5337 for the case where a state with a non-null refinement matches a
5338 null output list. Comment reformatting.
5339 (Inputs_Match): Copy a solitary input to avoid an assertion failure
5340 when trying to match the same input in multiple clauses.
5342 2014-02-19 Gary Dismukes <dismukes@adacore.com>
5344 * sem_attr.adb: Minor typo fix.
5346 2014-02-18 Robert Dewar <dewar@adacore.com>
5348 * cstand.adb (Build_Signed_Integer_Type): Minor change of formal
5349 from Int to Nat (Build_Unsigned_Integer_Type): New procedure
5350 (Create_Standard): Create new unsigned types.
5351 * exp_ch4.adb (Expand_N_Op_Mod): Expand mod in Modify_Tree_For_C
5352 mode (Expand_N_Reference): Removed, problematic and not needed
5354 * exp_ch4.ads (Expand_N_Reference): Removed, problematic and
5356 * exp_util.ads, exp_util.adb (Power_Of_Two): New function.
5357 * expander.adb: Remove call to Expand_N_Reference (problematic,
5358 and not needed now).
5359 * sem_aux.ads, sem_aux.adb (Corresponding_Unsigned_Type): New function.
5360 * stand.adb: Read and write unsigned type entities.
5361 * stand.ads: Add new unsigned types.
5363 2014-02-18 Hristian Kirtchev <kirtchev@adacore.com>
5365 * sem_ch4.adb (Analyze_Call): Do not mark a function call
5366 as being inside an assertion expression as the flag is now removed.
5367 (Check_Ghost_Subprogram_Call): Do not query the
5368 In_Assertion_Expression flag as it is now removed, instead use
5369 a predicate function.
5370 * sem_elab.adb (Check_Internal_Call_Continue): Do not query the
5371 In_Assertion_Expression flag as it is now removed, instead use
5372 a predicate function.
5373 * sem_prag.ads: Add new table Assertion_Expression_Pragma.
5374 * sem_util.adb Add with and use clause for Sem_Prag.
5375 (In_Assertion_Expression_Pragma): New routine.
5376 * sem_util.ads (In_Assertion_Expression_Pragma): New routine.
5377 * sinfo.adb (In_Assertion_Expression): Removed.
5378 (Set_In_Assertion_Expression): Removed.
5379 * sinfo.ads Remove flag In_Assertion_Expression along with its
5381 (In_Assertion_Expression): Removed along with
5382 pragma Inline. (Set_In_Assertion_Expression): Removed along
5385 2014-02-18 Sergey Rybin <rybin@adacore.com frybin>
5387 * gnat_ugn.texi: gnatpp section: add note that '-j' cannot be
5388 used together with '-r', '-rf' or '-rnb' options.
5390 2014-02-18 Hristian Kirtchev <kirtchev@adacore.com>
5392 * sem_attr.adb (Analyze_Attribute): Comment
5393 and code reformatting. Use separate routines to check the
5394 legality of attribute 'Old in certain pragmas. Verify
5395 the use of 'Old, 'Result and locally declared entities
5396 within the prefix of 'Old.
5397 (Check_References_In_Prefix): New routine.
5398 (Check_Use_In_Contract_Cases): New routine.
5399 (Check_Use_In_Test_Case): New routine.
5401 2014-02-18 Vincent Celier <celier@adacore.com>
5403 * sem_aux.adb (Is_By_Reference_Type): For each components of
5404 a record type, check also if the component is volatile as it
5405 may have an aspect that makes it volatile. If it is, then the
5406 record type is a by reference type.
5408 2014-02-18 Robert Dewar <dewar@adacore.com>
5410 * exp_attr.adb: Minor reformatting.
5411 * exp_ch4.ads, exp_ch4.adb (Expand_N_Reference): New procedure.
5412 * exp_util.adb (Remove_Side_Effects): Add conditional expressions
5413 as another case where we don't generate N_Reference nodes for
5415 * expander.adb (Expand): Add call to Expand_N_Reference.
5417 2014-02-06 Hristian Kirtchev <kirtchev@adacore.com>
5419 * sem_prag.adb (Analyze_Refined_Pragma): Remove
5420 local variable Pack_Spec. Refinement pragmas may now apply to
5421 bodies of both visible and private subprograms.
5423 2014-02-06 Robert Dewar <dewar@adacore.com>
5425 * exp_attr.adb (Expand_Loop_Entry_Attribute):
5426 Minor change (Attr => N) (Expand_Pred_Succ): New name
5427 Expand_Pred_Succ_Attribute (Expand_N_Attribute_Reference, case
5428 Max): Expand into if expression if Modify_Tree_For_C mode.
5429 (Expand_N_Attribute_Reference, case Min): ditto
5430 * sinfo.ads: Modify_Tree_For_C takes care of expanding Min and
5433 2014-02-06 Ed Schonberg <schonberg@adacore.com>
5435 * sem_ch3.adb (Analyze_Object_Declaration): Do not generate
5436 predicate check if this is an internal declaration with
5437 No_Initialization set, as for an expanded aggregate component.
5439 2014-02-06 Doug Rupp <rupp@adacore.com>
5441 * init.c (__gnat_default_resignal_p) [VMS]: Test for and resignal
5442 conditions with severity of "SUCCESS" or "INFORMATIONAL".
5444 2014-02-06 Yannick Moy <moy@adacore.com>
5446 * sem_prag.adb (Analyze_Pragma): Analyze pragma
5447 Debug rewritten node before rewriting it as a null statement in
5450 2014-02-06 Robert Dewar <dewar@adacore.com>
5452 * sem_attr.adb (Min_Max): New procedure.
5453 (Max_Alignment_For_Allocation_Max_Size_In_Storage_Elements): New
5456 2014-02-06 Sergey Rybin <rybin@adacore.com frybin>
5458 * gnat_ugn.texi, vms_data.ads: Add documentation of '-t' option for
5461 2014-02-06 Hristian Kirtchev <kirtchev@adacore.com>
5463 * sem_prag.adb (Analyze_Abstract_State): Update
5464 all calls to Create_Abstract_State to pass the proper state
5466 (Create_Abstract_State): Add new formal parameter
5467 State_Decl along with comment on usage. Establish a link between
5468 the abstract state entity and the state declaration.
5470 2014-02-06 Robert Dewar <dewar@adacore.com>
5472 * sem_attr.adb (Analyze_Attribute, case Max): Check for improper
5473 comparison of unordered enumeration type.
5474 (Analyze_Attribute, case Max): Check for improper comparison of
5475 unordered enumeration type.
5476 * sem_res.adb (Bad_Unordered_Enumeration_Reference): Moved to
5478 * sem_util.ads, sem_util.adb (Bad_Unordered_Enumeration_Reference):
5479 Moved here from Sem_Res.
5481 2014-02-06 Robert Dewar <dewar@adacore.com>
5483 * sem_ch3.adb, sem_prag.adb, sem_res.adb, lib-xref.adb: Minor
5486 2014-02-06 Hristian Kirtchev <kirtchev@adacore.com>
5488 * sem_ch6.adb (Process_Formals): Error message reformatting.
5490 2014-02-06 Hristian Kirtchev <kirtchev@adacore.com>
5492 * sem_ch3.adb (Handle_Late_Controlled_Primitive): Add local
5493 variable Spec. Do not inherit the null indicator from the
5494 subprogram body when generating the spec.
5496 2014-02-06 Robert Dewar <dewar@adacore.com>
5498 * casing.adb (Determine_Casing): Consider SPARK_Mode to be
5501 2014-02-06 Ed Schonberg <schonberg@adacore.com>
5503 * exp_ch6.adb (Is_Build_In_Place_Function): Predicate is false
5504 when the function has a foreign convention, but not if only the
5505 limited return type has such a convention.
5507 2014-02-06 Hristian Kirtchev <kirtchev@adacore.com>
5509 * sem_ch3.adb (Handle_Late_Controlled_Primitive): Remove local
5510 variable Spec. Comment reformatting. Use Copy_Separate_Tree
5511 rather than New_Copy_Tree when building the corresponding
5512 subprogram declaration.
5514 2014-02-06 Hristian Kirtchev <kirtchev@adacore.com>
5516 * sem_prag.adb (Analyze_Global_Item): Remove
5517 the mode-related checks on abstract states with enabled external
5519 (Property_Error): Removed.
5521 2014-02-06 Javier Miranda <miranda@adacore.com>
5523 * lib-xref.adb (Generate_Reference): When
5524 generating the reference to the first private entity take care
5525 of handling swapped entities.
5527 2014-02-06 Sergey Rybin <rybin@adacore.com frybin>
5529 * gnat_ugn.texi, vms_data.ads: Add documentation of -j option for
5532 2014-02-06 Robert Dewar <dewar@adacore.com>
5534 * exp_ch4.adb (Expand_N_Shift_Left): Handle shift counts greater
5535 than the word size when operating in Modify_Tree_For_C mode.
5536 * sinfo.ads: Add documentation section on Modify_Tree_For_C mode.
5538 2014-02-06 Robert Dewar <dewar@adacore.com>
5540 * erroutc.adb (Warning_Specifically_Suppressed.Matches):
5541 compare is case insensitive.
5542 * gnat_rm.texi: Document that string compare for Warnings Off
5543 is now case insensitive.
5545 2014-02-06 Eric Botcazou <ebotcazou@adacore.com>
5547 * gnat_rm.texi: Small wording tweak.
5549 2014-02-06 Pascal Obry <obry@adacore.com>
5551 * prj-attr.adb, projects.texi, snames.ads-tmpl: Add Included_Patterns
5552 and Included_Artifact_Patterns attribute definitions.
5554 2014-02-06 Yannick Moy <moy@adacore.com>
5556 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Set
5557 SPARK_Mode pragma component for all subprograms, including stubs.
5559 2014-02-06 Hristian Kirtchev <kirtchev@adacore.com>
5561 * sem_ch10.adb (Analyze_Package_Body_Stub): Maintain
5562 the configuration options of the enclosing context in a
5564 (Analyze_Subprogram_Body_Stub): Maintain the
5565 configuration options of the enclosing context in a stack-like
5568 2014-02-06 Robert Dewar <dewar@adacore.com>
5570 * debug.adb: -gnatd.u sets Modify_Tree_For C
5571 * exp_ch4.adb (Expand_N_Op_Rotate_Left): Expand out
5572 if Modify_Tree_For_C (Expand_N_Op_Rotate_Right): ditto.
5573 (Expand_N_Op_Arithmetic_Right_Shift): ditto.
5574 * exp_intr.adb (Expand_Shift): Call expander so we do
5575 Modify_Tree_For_C expansions.
5576 * gnat1drv.adb (Adjust_Global_Switches): Set Modify_Tree_For_C
5579 2014-02-06 Fedor Rybin <frybin@adacore.com>
5581 * prj-proc.ads (Tree_Loaded_Callback): new type Callback used
5582 after the phase 1 of the processing of each aggregated project
5583 to get access to project trees of aggregated projects.
5584 (Process_Project_Tree_Phase_1): new parameter On_New_Tree_Loaded
5585 If specified, On_New_Tree_Loaded is called after each aggregated
5586 project has been processed succesfully.
5587 (Process): new parameter On_New_Tree_Loaded.
5588 * prj-proc.adb (Process_Aggregated_Projects): On_New_Tree_Loaded
5589 callback added after processing of each aggregated project.
5590 (Recursive_Process): new parameter On_New_Tree_Loaded.
5591 (Process): new parameter On_New_Tree_Loaded.
5592 (Process_Project_Tree_Phase_1): new parameter On_New_Tree_Loaded.
5593 * prj-conf.ads (Parse_Project_And_Apply_Config): new parameter
5595 * prj-conf.adb (Parse_Project_And_Apply_Config): new parameter
5598 2014-02-06 Bob Duff <duff@adacore.com>
5600 * gnat_ugn.texi: Implement --insert-blank-lines and
5601 --preserve-blank-lines switches.
5603 2014-02-06 Sergey Rybin <rybin@adacore.com frybin>
5605 * gnat_ugn.texi, vms_data.ads: Add documentation of -j option for
5608 2014-02-06 Eric Botcazou <ebotcazou@adacore.com>
5610 * gnat_rm.texi (Pragma Optimize_Alignment): Document the effect
5611 of the pragma on individual objects.
5613 2014-02-06 Hristian Kirtchev <kirtchev@adacore.com>
5615 * einfo.adb Node29 is now used as BIP_Initialization_Call.
5616 (BIP_Initialization_Call): New routine.
5617 (Set_BIP_Initialization_Call): New routine.
5618 (Write_Field29_Name): Add an entry for constants and variables.
5619 * einfo.ads Add new attribute BIP_Initialization_Call and update
5621 (BIP_Initialization_Call): New routine along with pragma Inline.
5622 (Set_BIP_Initialization_Call): New routine along with pragma Inline.
5623 * exp_ch6.adb (Make_Build_In_Place_Call_In_Object_Declaration):
5624 Add local declaration Res_Decl. Capture the build-in-place
5625 initialization call when the related object declaration has
5626 created a transient block.
5627 * exp_ch7.adb (Process_Transient_Objects): Add local variable
5628 Fin_Insrt. Recognize a scenario where an object declaration acts
5629 as a transient context and is initialized by a build-in-place
5632 2014-02-06 Pascal Obry <obry@adacore.com>
5634 * prj-util.adb (For_Interface_Sources): Fix handling of required
5635 bodies for aggregate libs.
5637 2014-02-06 Robert Dewar <dewar@adacore.com>
5639 * nlists.ads: Minor comment clarifications.
5641 2014-02-06 Robert Dewar <dewar@adacore.com>
5643 * gnat1drv.adb (Adjust_Global_Switches): Set Modify_Tree_For_C
5645 * opt.ads (Modify_Tree_For_C): New flag.
5646 * output.ads, output.adb (Last_Char): New function.
5648 2014-02-06 Pascal Obry <obry@adacore.com>
5650 * projects.texi, prj-env.adb (Initialize_Default_Project_Path): Add
5651 share/gpr for cross-builds.
5653 2014-02-06 Robert Dewar <dewar@adacore.com>
5655 * exp_util.ads, checks.adb, sem_prag.adb, prj-util.adb, sem_ch13.adb:
5656 Minor reformatting and code clean ups.
5658 2014-02-06 Pascal Obry <obry@adacore.com>
5660 * prj-util.adb (For_Interface_Sources): Skip non compilable languages.
5661 * prj.ads: Minor typo fix in comment.
5663 2014-02-06 Hristian Kirtchev <kirtchev@adacore.com>
5665 * sem_prag.adb (Analyze_Depends_In_Decl_Part): Add
5666 local variable Expr. Flag clauses with extra parenthesis as this
5667 is not allowed by the syntax of the pragma. Code reformatting.
5669 2014-02-06 Hristian Kirtchev <kirtchev@adacore.com>
5671 * exp_attr.adb (Expand_N_Attribute_Reference): Alphabetize
5672 variables. Rename variabme Tnn to Temp. Do not create a temporary
5673 if assertions are disabled. Find enclosing routine _Postconditions
5674 and insert the temporary that captures the value of the prefix
5676 * exp_ch6.adb (Build_Postconditions_Procedure):
5677 Insert the generated _Postconditions routine
5678 before the first source declaration of the related
5680 (Insert_After_Last_Declaration): Removed.
5681 (Insert_Before_First_Source_Declaration): New routine.
5683 2014-02-06 Ed Schonberg <schonberg@adacore.com>
5685 * exp_util.adb, exp_util.ads (Within_Internal_Subprogram):
5686 Utility to determine whether current expansion is for the body
5687 of a predefined primitive operation.
5688 (Make_Predicate_Check): Use Within_Internal_Subpgram
5689 * checks.adb (Apply_Predicate_Check): Use
5690 Within_Internal_Subprogram
5691 * sem_ch13.adb (Freeze_Entity_Checks): Ditto.
5693 2014-02-06 Pascal Obry <obry@adacore.com>
5695 * prj.ads, prj-util.adb: Minor reformatting.
5697 2014-02-06 Ed Schonberg <schonberg@adacore.com>
5699 * exp_ch6.adb (Expand_Subprogram_Contract, Append_Enabled_Item):
5700 Take into account the Split_PPC flag to ensure that conjuncts
5701 in a composite postcondition aspect are tested in source order.
5703 2014-02-06 Hristian Kirtchev <kirtchev@adacore.com>
5705 * sem_ch6.adb (Analyze_Generic_Subprogram_Body): Flag illegal
5707 * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration): Flag
5708 illegal use of SPARK_Mode.
5709 (Instantiate_Subprogram_Body): Flag illegal use of SPARK_Mode.
5710 * sem_prag.adb (Analyze_Pragma): Code reformatting.
5711 * sem_util.adb Add with and use clause for Aspects.
5712 (Check_SPARK_Mode_In_Generic): New routine.
5713 * sem_util.ads (Check_SPARK_Mode_In_Generic): New routine.
5715 2014-02-06 Thomas Quinot <quinot@adacore.com>
5717 * a-calend.adb (Formatting_Operations.Split): Ensure that
5718 Time_Error is raised for invalid time values.
5720 2014-02-06 Arnaud Charlet <charlet@adacore.com>
5722 * sem_prag.adb (Analyze_Pragma): Rewrite as a null statement
5725 2014-02-06 Robert Dewar <dewar@adacore.com>
5727 * einfo.ads, einfo.adb (Is_Discriminant_Check_Function): New flag.
5728 * exp_ch3.adb (Build_Dcheck_Function): Set
5729 Is_Discriminant_Check_Function.
5731 2014-02-06 Hristian Kirtchev <kirtchev@adacore.com>
5733 * exp_ch7.adb (Is_Subprogram_Call): Inspect
5734 the original tree in certain cases where a construct has been
5735 factored out and replaced by a reference to a temporary.
5737 2014-02-06 Ed Schonberg <schonberg@adacore.com>
5739 * sem_ch3.adb (Process_Full_View): Fix typo in the order of
5740 parameters when propagating predicate function to full view.
5741 (Find_Type_Of_Object): Freeze base type of object type to catch
5742 premature use of discriminated private type without a full view.
5744 2014-02-06 Robert Dewar <dewar@adacore.com>
5746 * sprint.adb: Minor reformatting.
5748 2014-02-06 Hristian Kirtchev <kirtchev@adacore.com>
5750 * exp_ch4.adb (Process_Transient_Object): Add local variable
5751 Temp_Ins. When the transient object is initialized by an
5752 aggregate, the hook must capture the object after the last
5753 component assignment takes place.
5754 * exp_ch7.adb (Detect_Subprogram_Call): Expose the subprogram to
5755 routine Is_Subprogram_Call.
5756 (Is_Subprogram_Call): Inspect an
5757 aggregate that has been heavily expanded for subprogram calls.
5758 (Process_Transient_Objects): Add local variables Expr, Ptr_Id
5759 and Temp_Ins. Remove the nested declare block and adjust the
5760 indentation. When the transient object is initialized by an
5761 aggregate, the hook must capture the object after the last
5762 component assignment takes place.
5764 2014-02-06 Hristian Kirtchev <kirtchev@adacore.com>
5766 * sem_prag.adb (Analyze_Global_Item): Detect illegal uses of
5767 external states with enabled properties that do not match the
5769 (Property_Error): New routine.
5770 * sem_res.adb (Property_Error): New routine.
5771 (Resolve_Actuals): Detect illegal uses of external variables with
5772 enabled properties in procedure calls that do not match the mode of
5773 the corresponding formal parameter.
5775 2014-02-06 Hristian Kirtchev <kirtchev@adacore.com>
5777 * sem_util.adb (Has_Enabled_Property): Rename
5778 formal parameter Prop_Nam to Property. Update the comment on usage
5779 and all occurrences in the body. Add local variable Prop_Nam. When
5780 inspecting a property with an expression, the property name
5781 appears as the first choice of the component association.
5783 2014-02-04 Robert Dewar <dewar@adacore.com>
5785 * exp_ch5.adb, einfo.ads, freeze.adb, sem_ch8.adb: Minor reformatting.
5787 2014-02-04 Gary Dismukes <dismukes@adacore.com>
5789 * sem_aggr.adb: Change "runtime" to "run time" in warning message,
5790 for consistency with other messages.
5792 2014-02-04 Ed Schonberg <schonberg@adacore.com>
5794 * exp_ch5.adb (Expand_Iterator_Loop): For a container element
5795 iterator, indicate that the element is a constant if the container
5796 type does not have a variable indexing aspect.
5797 * sem_ch8.adb (Analyze_Object_Renaming): If the entity is already
5798 marked as constant, do not reset its Ekind, to ensure that
5799 container elements in an element loop are not modified if the
5800 container (e.g. a hashed set) only has a constant indexing aspect.
5802 2014-02-04 Arnaud Charlet <charlet@adacore.com>
5804 * g-souinf.ads: Subprograms in this unit are actually not pure.
5805 * freeze.adb (Freeze_Subprogram): Do not reset Is_Pure for Intrinsics.
5806 * einfo.ads (Is_Pure): Update doc to match implementation.
5808 2014-02-04 Gary Dismukes <dismukes@adacore.com>
5810 * exp_ch13.adb: Minor spelling fix.
5812 2014-02-04 Robert Dewar <dewar@adacore.com>
5814 * opt.ads: Minor comment update.
5816 2014-02-04 Robert Dewar <dewar@adacore.com>
5818 * exp_ch4.adb (Expand_N_Expression_With_Actions): Use Rewrite
5821 2014-02-04 Ed Schonberg <schonberg@adacore.com>
5823 * sem_aggr.adb (Resolve_Array_Aggregate): Suppress warnings
5824 on null expressions if component type is non-null, when the
5825 corresponding association covers an empty range of index values.
5827 2014-02-04 Robert Dewar <dewar@adacore.com>
5829 * sinfo.ads: Further comments on N_Expression_With_Actions node.
5831 2014-02-04 Hristian Kirtchev <kirtchev@adacore.com>
5833 * sem_prag.adb (Analyze_Refined_Depends_In_Decl_Part): Remove global
5834 variables Out_Items and Ref_Global. Remove local constant
5835 Body_Id along with dummy variables D1, D2, D3, D4, D5, D6, D7
5836 and D8. Remove the useless collection of global items as this
5837 was a leftover from an earlier version of the routine. Move
5838 several routines out to avoid deep nesting and indentation.
5839 (Inputs_Match): Add formal parameter Dep_Clause. Rename formal
5840 parameter Do_Checks to Post_Errors. Update the comment on usage.
5841 (Is_Matching_Input): Renamed to Input_Match. Add formal parameters
5842 Ref_Inputs and Do_Checks. Rename formal parameter Do_Checks
5843 to Post_Errors. Update the comment on usage. Account for the
5844 case where a self referential state may have a null input_list.
5845 (Is_Self_Referential): New routine.
5847 2014-02-04 Ed Schonberg <schonberg@adacore.com>
5849 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): If the
5850 entity renames an expression, as in the case of an object of
5851 an unconstrained type initialized by a function call, defer the
5852 rewriting of the expression to the expander.
5853 * exp_ch13.adb (Expand_N_Attribute_Definition_Clause, case
5854 'Alignment): If the entity renames an expression, introduce
5855 temporary to capture value, and rewrite original declaration to
5858 2014-02-04 Gary Dismukes <dismukes@adacore.com>
5860 * g-comlin.adb: Minor typo fix.
5862 2014-02-04 Ed Schonberg <schonberg@adacore.com>
5864 * freeze.adb (Freeze_All): Types derived from a formal
5865 access_to_classwide type do not have a finalization master.
5867 2014-02-04 Robert Dewar <dewar@adacore.com>
5869 * sprint.adb: Minor reformatting.
5871 2014-02-04 Robert Dewar <dewar@adacore.com>
5873 * exp_ch4.adb (Expand_N_Expression_With_Actions): Eliminate
5874 cases where Actions is a null list.
5875 * sinfo.ads (N_Expression_With_Actions): Actions can be
5876 temporarily empty during semantic analysis, but must be non-empty
5877 in the final expanded tree.
5879 2014-01-31 Robert Dewar <dewar@adacore.com>
5881 * exp_ch9.adb: Minor reformatting.
5883 2014-01-31 Emmanuel Briot <briot@adacore.com>
5885 * g-comlin.adb (Set_Command_Line): Take the switches
5886 configuration from the Command_Line_Config.
5888 2014-01-31 Hristian Kirtchev <kirtchev@adacore.com>
5890 * sem_prag.adb (Analyze_Refinement_Clause): Guard against a malformed
5893 2014-01-31 Vincent Celier <celier@adacore.com>
5895 * projects.texi: Add more documentation about others used as an
5896 index in indexed attributes.
5898 2014-01-31 Robert Dewar <dewar@adacore.com>
5900 * gnat_ugn.texi: Minor update.
5901 * gnat_rm.texi: Add example to Restriction_Warnings documentation.
5902 * exp_util.adb: Minor reformatting.
5904 2014-01-31 Ed Schonberg <schonberg@adacore.com>
5906 * exp_ch9.adb (Expand_Entry_Barrier): Warn if the barrier
5907 depends on data that is not private to the protected object,
5908 and potentially modifiable in unsynchronized fashion.
5910 2014-01-31 Yannick Moy <moy@adacore.com>
5912 * erroutc.adb (Validate_Specific_Warnings): Remove special case for
5915 2014-01-31 Robert Dewar <dewar@adacore.com>
5917 * prj-attr.ads (First_Attribute_Of): Returns Empty_Attribute
5918 for Unknown_Package.
5919 * sem_ch6.adb, sem_attr.adb: Minor comment addition.
5921 2014-01-31 Hristian Kirtchev <kirtchev@adacore.com>
5923 * exp_util.adb (Build_Allocate_Deallocate_Proc): Rewrite
5924 the logic that generates a runtime check to determine the
5925 controlled status of the object about to be allocated or
5926 deallocated. Class-wide types now always use a runtime check
5927 even if they appear as generic actuals.
5928 (Find_Object): Detect
5929 a special case that involves interface class-wide types because
5930 the object appears as a complex expression.
5932 2014-01-31 Ed Schonberg <schonberg@adacore.com>
5934 * sem_ch6.adb (Process_Formals): In Ada2012 mode, place
5935 subprogram with an incomplete untagged formals on the list of
5936 private dependents, to verify that the type is properly completed
5937 in the private part.
5938 * sem_attr.adb: Code clean up.
5940 2014-01-31 Robert Dewar <dewar@adacore.com>
5942 * exp_ch6.adb: Minor reformatting.
5944 2014-01-31 Vincent Celier <celier@adacore.com>
5946 * prj-attr.adb (First_Attribute_Of): Return Unknown_Attribute
5947 when Pkg is unknown.
5949 2014-01-31 Hristian Kirtchev <kirtchev@adacore.com>
5951 * sem_res.adb (Resolve_Entity_Name): Comment
5952 reformatting. Allow volatile objects in various generated checks.
5954 2014-01-31 Ed Schonberg <schonberg@adacore.com>
5956 * sem_attr.adb (Analyze_Attribute, case 'Update): For a record
5957 component association, set the etype of the identifier, for
5960 2014-01-31 Ed Schonberg <schonberg@adacore.com>
5962 * exp_ch6.adb (Has_Visibility_Of_Subprogram): If type is not
5963 declared in a package, not checks can apply to the subprogram.
5965 2014-01-31 Robert Dewar <dewar@adacore.com>
5967 * erroutc.adb (Validate_Specific_Warnings): Warnings are
5968 controlled -gnatw.W.
5969 * gnat_ugn.texi: Document new warnings controlled by -gnatw.w.
5970 * opt.ads (Warn_On_Warnings_Off): Now controls more cases.
5972 2014-01-31 Arnaud Charlet <charlet@adacore.com>
5974 * exp_disp.adb: Update comments.
5976 2014-01-31 Yannick Moy <moy@adacore.com>
5978 * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration,
5979 Save_Global_References): Guard access to expression in aspect.
5981 2014-01-31 Yannick Moy <moy@adacore.com>
5983 * sem_prag.adb (Analyze_Pragma/Pragma_SPARK_Mode):
5984 Issue an error when the pragma is applied to a generic unit,
5985 a generic declaration, or inside a generic.
5987 2014-01-31 Yannick Moy <moy@adacore.com>
5989 * sem_ch8.adb (Analyze_Subprogram_Renaming): Set SPARK_Mode on renaming
5992 2014-01-31 Robert Dewar <dewar@adacore.com>
5994 * exp_ch9.adb, s-tassta.adb, s-tposen.adb, s-tposen.ads: Minor
5997 2014-01-31 Tristan Gingold <gingold@adacore.com>
5999 * exp_disp.adb: Add a historic note.
6001 2014-01-31 Robert Dewar <dewar@adacore.com>
6003 * sem_warn.adb (Warn_On_Useless_Assignments): Add call to
6004 Process_Deferred_References.
6006 2014-01-31 Yannick Moy <moy@adacore.com>
6008 * erroutc.adb (Validate_Specific_Warnings): Do not issue a message for
6009 ineffective pragma Warnings(Off) in GNATprove_Mode.
6011 2014-01-31 Bob Duff <duff@adacore.com>
6013 * s-taskin.ads: Minor comment fix.
6014 * s-tassta.adb (Abort_Dependents): Don't abort all dependents;
6015 just direct dependents. If this is actually an abort, each task
6016 will take care of aborting its dependents, so all dependents will
6017 get aborted, as before. However, when this is called the second
6018 time from Vulnerable_Complete_Master "for convenience" (i.e. to
6019 kill off tasks waiting at terminate alternatives), aborting
6020 indirect dependents is wrong, because it causes some unrelated
6021 tasks to get aborted.
6023 2014-01-31 Robert Dewar <dewar@adacore.com>
6025 * sem_ch4.adb: Minor reformatting.
6027 2014-01-31 Robert Dewar <dewar@adacore.com>
6029 * exp_ch2.adb: New calling sequence for Is_LHS.
6030 * frontend.adb: Add call to Process_Deferred_References.
6031 * lib-xref.ads, lib-xref.adb (Process_Deferred_References): New.
6032 (Deferred_References): New table.
6033 * sem_ch8.adb (Find_Direct_Name): Make deferred reference table
6035 (Find_Expanded_Name): Ditto.
6036 * sem_res.adb: New calling sequence for Is_LHS.
6037 * sem_util.ads, sem_util.adb (Is_LHS): New calling sequence.
6038 * sem_warn.adb: Call Process_Deferred_References before issuing
6041 2014-01-31 Tristan Gingold <gingold@adacore.com>
6043 * exp_util.adb (Corresponding_Runtime_Package): Restrict the
6044 use of System_Tasking_Protected_Objects_Single_Entry.
6045 * exp_ch9.adb (Build_Simple_Entry_Call): Remove Mode parameter
6046 of Protected_Single_Entry_Call.
6047 (Expand_N_Timed_Entry_Call): Remove single_entry case.
6048 * exp_disp.adb (Make_Disp_Asynchronous_Select_Body): Remove
6050 (Make_Disp_Timed_Select_Body): Likewise.
6051 * rtsfind.ads (RE_Timed_Protected_Single_Entry_Call): Remove.
6052 * s-tposen.adb (Send_Program_Error, PO_Do_Or_Queue): Remove
6054 (Wakeup_Entry_Caller): Remove Self_ID and New_State parameters.
6055 (Wait_For_Completion_With_Timeout): Remove.
6056 (Protected_Single_Entry_Call): Remove Mode parameter
6057 (always Simple_Call).
6058 (Service_Entry): Remove Self_Id constant (not used anymore).
6059 (Timed_Protected_Single_Entry_Call): Remove.
6060 * s-tposen.ads (Timed_Protected_Single_Entry_Call): Remove.
6061 (Protected_Single_Entry_Call): Remove Mode parameter.
6063 2014-01-29 Hristian Kirtchev <kirtchev@adacore.com>
6065 * einfo.adb (Get_Pragma): Handle the retrieval of pragma Refined_Post.
6066 * einfo.ads (Get_Pragma): Update the comment on special pragmas
6067 handled by this routine.
6068 * sem_prag.adb (Analyze_Pragma): Add a legal pragma Refined_Post
6069 to the contract of the related subprogram body.
6070 * sem_util.adb (Add_Contract_Item): Handle the insertion of
6071 pragma Refined_Post into the contract of a subprogram body.
6072 * sinfo.ads Update the documentation of node N_Contract.
6073 * sem_res.adb (Resolve_Entity_Name): Add a guard
6074 to detect abstract states and variables only when checking the
6075 SPARK 2014 rules concerning volatile object placement.
6077 2014-01-29 Ed Schonberg <schonberg@adacore.com>
6079 * sem_ch4.adb (Find_Equality_Types, Try_One_Interp): within an instance,
6080 null is compatible with any access type.
6082 2014-01-29 Hristian Kirtchev <kirtchev@adacore.com>
6084 * sem_util.adb (Find_Placement_In_State_Space): Assume that the default
6085 placement is not in a package.
6087 2014-01-29 Hristian Kirtchev <kirtchev@adacore.com>
6089 * sem_util.adb (Has_Enabled_Property): Compare the character field of
6092 2014-01-29 Robert Dewar <dewar@adacore.com>
6094 * sem_intr.adb, a-ztexio.ads, sinfo.ads, sem_res.adb, gnatlink.adb,
6095 vms_conv.adb, a-except.ads, a-except-2005.ads, a-teioed.adb,
6096 sem_warn.ads, treepr.ads, erroutc.ads, a-excach.adb: Minor reformatting.
6098 2014-01-29 Robert Dewar <dewar@adacore.com>
6100 * sem_util.ads, sem_util.adb (In_Pragma_Expression): New function.
6101 * sem_warn.adb (Check_References): Suppress warnings if inside
6102 Initial_Condition pragma.
6104 2014-01-29 Hristian Kirtchev <kirtchev@adacore.com>
6106 * sem_prag.adb (Check_Missing_Part_Of): List all values of
6107 State_Space_Kind for readability reasons. Do not emit an error on
6108 a private item when the enclosing package lacks aspect/pragma
6109 Abstract_State. Do not emit an error on a private package
6110 instantiation when the corresponding generic template lacks
6112 (Has_Visible_State): New routine.
6113 * sem_util.adb (Find_Placement_In_State_Space): The visible
6114 declarations of any kind of child units in general act as proper
6117 2014-01-29 Robert Dewar <dewar@adacore.com>
6119 * a-except-2005.adb, a-except.adb, a-excpol-abort.adb, a-exstat.adb,
6120 ali.adb, a-numaux.ads, a-numaux-darwin.ads, a-numaux-libc-x86.ads,
6121 a-numaux-vms.ads, a-numaux-vxworks.ads, a-numaux-x86.ads, aspects.ads,
6122 a-taside.adb, a-teioed.adb, a-textio.adb, a-textio.ads, atree.adb,
6123 atree.ads, a-witeio.adb, a-witeio.ads, a-wtedit.adb, a-ztedit.adb,
6124 a-ztexio.adb, bcheck.adb, binde.adb, checks.adb, comperr.adb,
6125 cstand.adb, debug_a.adb, einfo.ads, errout.adb, erroutc.adb,
6126 eval_fat.adb, exp_aggr.adb, exp_attr.adb, exp_ch11.adb, exp_ch3.adb,
6127 exp_ch4.adb, exp_ch5.adb, exp_ch6.adb, exp_ch9.adb, exp_dbug.adb,
6128 exp_disp.adb, exp_fixd.adb, exp_imgv.adb, exp_intr.adb, exp_util.adb,
6129 freeze.adb, frontend.adb, g-comlin.ads, g-mbdira.adb, gnat1drv.adb,
6130 gprep.adb, g-spipat.adb, i-cpp.ads, i-vxwork.ads, i-vxwork-x86.ads,
6131 krunch.ads, layout.adb, lib-load.adb, lib-writ.adb, lib-writ.ads,
6132 live.adb, namet.ads, osint.adb, osint-c.adb, output.ads, par.adb,
6133 par-ch10.adb, par-ch13.adb, par-ch3.adb, par-ch4.adb, par-ch5.adb,
6134 par-ch6.adb, par-ch9.adb, par-endh.adb, par-labl.adb, par-prag.adb,
6135 par-sync.adb, par-tchk.adb, par-util.adb, prj.adb, repinfo.adb,
6136 rtsfind.adb, s-arit64.adb, s-asthan-vms-alpha.adb,
6137 s-asthan-vms-ia64.adb, s-bignum.adb, scans.adb, scng.adb, s-dimmks.ads,
6138 sem_aggr.adb, sem_attr.adb, sem_aux.adb, sem_cat.adb, sem_ch10.adb,
6139 sem_ch12.adb, sem_ch13.adb, sem_ch13.ads, sem_ch3.adb, sem_ch4.adb,
6140 sem_ch5.adb, sem_ch6.adb, sem_ch8.adb, sem_disp.adb, sem_elab.adb,
6141 sem_elim.adb, sem_eval.adb, sem_intr.adb, sem_prag.adb, sem_res.adb,
6142 sem_type.adb, sem_util.adb, sem_warn.adb, set_targ.adb, s-fatgen.adb,
6143 s-fatgen.ads, s-fileio.adb, s-imgcha.adb, s-imgrea.adb, sinfo.ads,
6144 sinput-c.adb, snames.ads-tmpl, s-os_lib.adb, sprint.adb,
6145 s-regpat.adb, s-secsta.adb, s-stalib.ads,
6146 s-stchop.adb, s-stoele.ads, stand.ads, s-taprop-solaris.adb,
6147 s-tasdeb-vms.adb, s-tasini.adb, s-tassta.adb, s-valdec.adb,
6148 s-valuti.adb, s-wchjis.adb, s-wchwts.adb, system.ads, system-vms_64.ads,
6149 system-vms-ia64.ads, treepr.adb, types.ads, uintp.adb, uname.adb,
6150 urealp.adb, usage.adb, vxaddr2line.adb: Minor reformatting.
6152 2014-01-29 Robert Dewar <dewar@adacore.com>
6154 * expander.adb: Minor reformatting.
6156 2014-01-29 Javier Miranda <miranda@adacore.com>
6158 * exp_ch3.adb (Predefined_Primitive_Bodies): Adding documentation to
6161 2014-01-29 Javier Miranda <miranda@adacore.com>
6163 * exp_ch3.adb (Predefined_Primitive_Bodies): Complete the code
6164 that checks if an interface types defines the predefined "="
6165 function because the compiler was erroneously not generating the
6166 predefined "=" primitive as soon as the name of some interface
6167 primitive is "=" (formals were not checked).
6169 2014-01-29 Ed Schonberg <schonberg@adacore.com>
6171 * expander.adb (Expander): In GNATprove mode, do not process
6172 transient scopes: they are in general not created in this mode,
6173 and an attempt to examine them will lead to constraint errors when
6174 processing configuration pragmas that have analyzable expressions.
6176 2014-01-29 Vincent Celier <celier@adacore.com>
6178 * clean.adb (Gnatclean): Fail if main project is an aggregate
6179 project or if there is an aggregate library project in the
6181 * gnatcmd.adb: Fail if the main project is an aggregate project
6182 or if there is an aggegate library project in the project tree.
6183 * make.adb (Initialize): : Fail if main project is an aggregate
6184 project or if there is an aggregate library project in the
6186 * makeutl.ads (Aggregate_Libraries_In): New Boolean function.
6187 * prj-makr.adb (Initialize): Fail if the main project is an
6188 aggregate project or an aggregate library project.
6190 2014-01-29 Vincent Celier <celier@adacore.com>
6192 * prj-part.adb (Check_Import_Aggregate): New procedure
6193 to check if an imported project is an aggregate project.
6194 (Parse_Single_Project): Call Check_Import_Aggregate
6195 * projects.texi: Document that aggregate projects cannot be
6196 extended or imported.
6198 2014-01-29 Robert Dewar <dewar@adacore.com>
6200 * exp_ch9.adb, sem_ch7.ads, s-regexp.adb, sem_ch13.adb: Minor
6201 reformatting and code clean up.
6202 * gnat_ugn.texi: Add documentation section on Atomic Variables
6205 2014-01-29 Hristian Kirtchev <kirtchev@adacore.com>
6207 * einfo.adb Flag264 is now unused.
6208 (Has_Body_References): Removed.
6209 (Set_Has_Body_References): Removed.
6210 (Write_Entity_Flags): Remove the output for flag Has_Body_References.
6211 * einfo.ads Update the comment on usage of attribute
6212 Body_References. Remove attribute Has_Body_References and its
6214 (Has_Body_References): Removed along with pragma Inline.
6215 (Set_Has_Body_References): Removed along with pragma Inline.
6216 * sem_prag.adb (Analyze_Global_Item): Move the call to
6217 Record_Possible_Body_Reference in the state related checks
6218 section. Add a comment intended function.
6219 (Analyze_Input_Output): Move the call to Record_Possible_Body_Reference
6220 in the state related checks section. Add a comment intended function.
6221 (Analyze_Refinement_Clause): Cleanup the illegal body reference
6222 reporting. Add a comment on timing of error reporting.
6223 (Record_Possible_Body_Reference): Reimplement the routine.
6225 2014-01-29 Vincent Celier <celier@adacore.com>
6227 * makeutl.adb (Mains.Find_File_Add_Extension): Only look for specs for
6228 unit-based languages.
6229 (Mains.Complete_Mains.Do_Complete): Use the source file project
6230 tree when calling Find_File_Add_Extension. Use the correct
6231 project name when reporting an error.
6233 2014-01-29 Hristian Kirtchev <kirtchev@adacore.com>
6235 * aspects.adb Add an entry for aspect Part_Of in table
6237 * aspects.ads Add an entry for aspect Part_Of in tables Aspect_Id,
6238 Aspect_Argument, Aspect_Names and Aspect_Delay.
6239 * atree.h Define Elist9.
6240 * atree.adb (Elist9): New routine.
6241 (Set_Elist9): New routine.
6242 * atree.ads (Elist9): New routine.
6243 (Set_Elist9): New routine.
6244 * einfo.adb Add Part_Of_Constituents and Encapsulating_State to
6245 the list of node usage. Remove Refined_State from the list of
6247 (Encapsulating_State): New routine.
6249 Handle pragma Part_Of; (Part_Of_Constituents): New routine.
6250 (Refined_State): Removed.
6251 (Set_Encapsulating_State): New routine.
6252 (Set_Part_Of_Constituents): New routine.
6253 (Set_Refined_State): Removed.
6254 (Write_Field9_Name): Add an entry
6255 for Part_Of_Constituents (Write_Field10_Name): Add an entry for
6256 Encapsulating_State. Remove the entry for Refined_State.
6257 * einfo.ads Add new attributes Encapsulating_State
6258 and Part_Of_Constituents alond with their usage in
6259 entities. Remove attribute Refined_State along with its
6261 (Encapsulating_State): New routine and
6262 pragma Inline. (Get_Pragma): Update the comment on usage.
6263 (Part_Of_Constituents): New routine and pragma Inline.
6264 (Refined_State): Removed along with pragma Inline.
6265 (Set_Encapsulating_State): New routine and pragma Inline.
6266 (Set_Part_Of_Constituents): New routine and pragma Inline.
6267 (Set_Refined_State): Removed along with pragma Inline.
6268 * par-prag.adb Pragma Part_Of does not need any special processing
6270 * sem_ch3.adb (Analyze_Declarations): Remove local variables
6271 Body_Id and Prag. Call separate routines to analyze the
6272 contract of a package [body].
6273 (Analyze_Object_Contract):
6274 Update the comment on usage. Remove local variables
6275 Items and Nam. Use Get_Pragma rather than traversing the
6276 classification list. Verify whether the lack of indicator
6277 Part_Of agrees with the placement of the variable in state space.
6278 (Analyze_Object_Declaration): Initialize the encapsulating state
6279 of a variable. (Requires_State_Refinement): Moved to sem_util.
6280 * sem_ch7.adb (Analyze_Package_Body_Contract): New routine.
6281 (Analyze_Package_Contract): New routine.
6282 * sem_ch7.ads (Analyze_Package_Body_Contract): New routine.
6283 (Analyze_Package_Contract): New routine.
6284 * sem_ch10.adb (Decorate_State): Initialize the encapsulating
6285 state and Part_Of constituents.
6286 * sem_ch13.adb (Analyze_Aspect_Specifications):
6287 Add processing for aspect Part_Of. Update all
6288 calls to Decorate_Delayed_Aspect_And_Pragma.
6289 (Check_Aspect_At_Freeze_Point): Aspect Part_Of does
6290 not need any special processing at freeze time.
6291 (Decorate_Delayed_Aspect_And_Pragma): Renamed to
6292 Decorate_Aspect_And_Pragma. Add formal parameter Delayed and
6293 update the associated comment.
6294 * sem_prag.adb Add an entry for pragma Part_Of in table Sig_Flags.
6295 (Analyze_Abstract_State): Add new global variable State_Id. Remove
6296 local constants Errors and Loc. Remove local variables Is_Null
6297 and State_Nam. Create the entity of the abstract state on the
6298 spot, before all remaining checks are performed. Verify that a
6299 missing Part_Of option agrees with the placement of the abstract
6300 state within the state space.
6301 (Analyze_Depends_In_Decl_Part):
6302 Add new global variables Constits_Seen and States_Seen. Check
6303 that a state and a corresponding constituent do not appear
6304 in pragma [Refined_]Depends.
6305 (Analyze_Global_In_Decl_Part):
6306 Add new global variables Constits_Seen and States_Seen. Check
6307 that a state and a corresponding constituent do not appear
6308 in pragma [Refined_]Global.
6309 (Analyze_Global_Item):
6310 Remove the now obsolete code that deals with Part_Of.
6311 Add the entity of the global item to the list of processed
6312 items. (Analyze_Initializes_In_Decl_Part): Add new global
6313 variables Constits_Seen and States_Seen. Check that a state
6314 and a corresponding constituent do not appear in pragma
6316 (Analyze_Initialization_Item): Add the entity
6317 of the initialization item to the list of processed items.
6318 (Analyze_Input_Item): Add the entity of the initialization
6319 item to the list of processed items.
6320 (Analyze_Input_Output):
6321 Remove the now obsolete code that deals with Part_Of. Add the
6322 entity of the input/output to the list of processed items.
6323 (Analyze_Part_Of): New routine.
6324 (Analyze_Part_Of_Option): Remove
6325 local constant Par_State. Add local constant Encaps and local
6326 variables Encaps_Id and Legal. Use Analyze_Part of to analyze
6327 the option. Turn the related state into a Part_Of constituent
6328 if the option is legal.
6329 (Analyze_Pragma): Add processing
6331 (Analyze_Refined_State_In_Decl_Part):
6332 Remove global constants Pack_Body and Spec_Id. Remove
6333 global variables Abstr_States and Hidden_States. Add new
6334 global variables Available_States, Body_Id, Body_States and
6335 Spec_Id. Add new local constant Body_Decl. Reimplement the
6336 logic that extracts the states available for refinement from
6337 the related package and the body hidden states of the said
6339 (Analyze_Refinement_Clause): Add local variable Part_Of_Constits.
6340 (Check_Applicable_Policy): Alphabetize body.
6341 (Check_Dependency_Clause): Replace Refined_State
6342 with Encapsulating_State.
6343 (Check_Matching_Constituent):
6344 Reimplement the logic that determines whether an item is a valid
6345 / invalid constituent of the current refined state. Return when
6346 a construct does not denote a valid abstract state. Extract the
6347 list of Part_Of constituents for further analysis. Check that all
6348 Part_Of constituents of a state have been used in its refinement.
6349 (Check_Matching_State): Update the comment on usage. Operate
6350 on the list of available states.
6351 (Check_Missing_Part_Of): New routine.
6352 (Check_Refined_Global_Item): Replace Refined_State
6353 with Encapsulating_State.
6354 (Check_State_And_Constituent_Use): New routine.
6355 (Create_Abstract_State): New routine.
6356 (Is_Matching_Input): Replace Refined_State with Encapsulating_State.
6357 (Is_Part_Of): Removed.
6358 (Collect_Body_States): New routine.
6359 (Collect_Constituent): Replace Refined_State with Encapsulating_State.
6360 (Collect_Hidden_States): Removed.
6361 (Report_Unrefined_States): Change the profile of the procedure along
6362 with the comment on usage.
6363 (Report_Unused_Constituents): New routine.
6364 (Report_Unused_Hidden_States): Removed.
6365 (Report_Unused_States): New routine.
6366 * sem_prag.ads (Check_Missing_Part_Of): New routine.
6367 * sem_util.adb (Add_Contract_Item): Pragma Part_Of can now
6368 appear in the classification pragmas of a package instantiation
6370 (Find_Placement_In_State_Space): New routine.
6371 (Is_Child): Removed.
6372 (Is_Child_Or_Sibling): Remove formal
6373 parameter Private_Child. Remove the private child checks.
6374 (Requires_State_Refinement): Moved from sem_ch3.
6375 * sem_util.ads Add new type State_Space_Kind along with
6376 comment on its usage and values.
6377 (Add_Contract_Item): Update the comment on usage.
6378 (Find_Body_Discriminal): Alphabetize spec.
6379 (Find_Placement_In_State_Space): New routine.
6380 (Is_Child_Or_Sibling): Remove formal parameter Private_Child
6381 and update the comment on usage.
6382 (Requires_State_Refinement): Moved from sem_ch3.
6383 * sinfo.ads: Update the documentation of N_Contract.
6384 * snames.ads-tmpl The predefined name for Part_Of is now used
6385 to denote a pragma. Add Pragma_Id for Part_Of.
6387 2014-01-29 Emmanuel Briot <briot@adacore.com>
6389 * s-regexp.adb (Create_Secondary_Table): Automatically grow the state
6391 (Dump): New subprogram.
6393 2014-01-29 Tristan Gingold <gingold@adacore.com>
6395 * exp_ch9.adb (Expand_N_Protected_Type_Declaration): Add
6396 Expand_Entry_Declaration to factorize code.
6398 2014-01-29 Ed Schonberg <schonberg@adacore.com>
6400 * checks.adb: minor clarification.
6401 * sem_ch7.adb (Declare_Inherited_Private_Subprograms): Limit
6402 search for primitive operations to the entities that immediately
6403 follow the type declaration.
6405 2014-01-29 Tristan Gingold <gingold@adacore.com>
6407 * exp_ch9.adb (Build_Protected_Entry): Do not call
6408 Complete_Entry_Body anymore.
6409 * rtsfind.ads (RE_Complete_Single_Entry_Body): Remove.
6410 * s-tposen.ads, s-tposen.adb (Complete_Single_Entry_Body): Remove.
6412 2014-01-29 Pierre-Marie Derodat <derodat@adacore.com>
6414 * s-os_lib.adb, s-os_lib.ads (Normalize_Pathname): Return an empty
6415 string when the Name input bigger than allowed. Adapt the function
6418 2014-01-29 Ed Schonberg <schonberg@adacore.com>
6420 * checks.adb (Install_Null_Excluding_Check): Do not emit warning
6421 if expression is within a case_expression of if_expression.
6423 2014-01-29 Robert Dewar <dewar@adacore.com>
6425 * exp_ch9.adb, inline.ads: Minor reformatting.
6427 2014-01-29 Tristan Gingold <gingold@adacore.com>
6429 * exp_ch9.adb (Is_Exception_Safe): Return true if no exceptions.
6431 2014-01-29 Yannick Moy <moy@adacore.com>
6433 * inline.ads (Pending_Body_Info): Add SPARK_Mode and
6434 SPARK_Mode_Pragma components to be able to analyze generic
6436 * sem_ch12.adb (Analyze_Package_Instantiation,
6437 Inline_Instance_Body, Need_Subprogram_Instance_Body,
6438 Load_Parent_Of_Generic): Pass in SPARK_Mode from instantiation
6439 for future analysis of the instance.
6440 (Instantiate_Package_Body,
6441 Instantiate_Subprogram_Body, Set_Instance_Inv): Set SPARK_Mode
6442 from instantiation to analyze the instance.
6444 2014-01-29 Robert Dewar <dewar@adacore.com>
6446 * sem_ch7.adb, sem_prag.adb, sem_ch4.adb, sem_ch6.adb: Minor code
6449 2014-01-29 Yannick Moy <moy@adacore.com>
6451 * gnat_rm.texi: Update description of SPARK_Mode pragma.
6453 2014-01-29 Tristan Gingold <gingold@adacore.com>
6455 * exp_ch9.adb (Expand_N_Protected_Body): Remove Num_Entries.
6457 2014-01-29 Thomas Quinot <quinot@adacore.com>
6459 * sem_ch4.adb (Find_Component_In_Instance): Update comment.
6461 2014-01-29 Ed Schonberg <schonberg@adacore.com>
6463 * exp_util.adb (Build_Task_Image_Prefix): Indicate that the
6464 resulting string is an internal entity. and thus requires no
6465 initialization. This is relevant when Initialize_ Scalars is
6466 enabled, because the resultant spurious initialization may lead to
6467 secondary stack anomalies that produce a mangled name for a task.
6469 2014-01-29 Yannick Moy <moy@adacore.com>
6471 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): SPARK_Mode
6472 not inherited from spec anymore. Check consistency
6473 rules after processing of declarations.
6474 * sem_ch7.adb (Analyze_Package_Body_Helper): SPARK_Mode not inherited
6475 from spec anymore. Check consistency rules after processing of
6477 (Analyze_Package_Declaration): Set SPARK_Mode only for non-generic
6479 * sem_prag.adb (Analyze_Pragma/Pragma_SPARK_Mode): Implement new
6482 2014-01-27 Robert Dewar <dewar@adacore.com>
6484 * sem_res.adb (Resolve_Comparison_Op): Add type name/location
6486 (Resolve_Range): Add type name/location to unordered msg.
6488 2014-01-27 Claire Dross <dross@adacore.com>
6490 * a-cofove.adb/s (Copy): Add precondition so that Copy (Source,
6491 Capacity) is only called with Capacity >= Length (Source) and
6492 Capacity in Capacity_Range.
6493 * a-cfdlli.adb/s, a-cfhase.adb/s, a-cfhama.adb/s, a-cforse.adb/s,
6494 a-cforma.adb/s (Copy): Add precondition so that Copy (Source, Capacity)
6495 is only called with Capacity >= Source.Capacity. Raise Capacity_Error
6496 in the code is this is not the case.
6498 2014-01-27 Thomas Quinot <quinot@adacore.com>
6500 * sem_ch4.adb (Analyze_Selected_Component): Fix handling of
6501 selected component in an instance where the component of the
6502 actual is not visibile at instantiation.
6504 2014-01-27 Ed Schonberg <schonberg@adacore.com>
6506 * sem_ch6.adb: sem_ch6.adb (Set_Actual_Subtypes): If the type
6507 has a dynamic predicate, generate freeze node for Actual_Subtype
6508 at once, because the declaration of the corresponding predicate
6509 function will make reference to it.
6511 2014-01-27 Tristan Gingold <gingold@adacore.com>
6513 * exp_ch7.adb, exp_ch9.adb: Adjust comments.
6515 2014-01-27 Robert Dewar <dewar@adacore.com>
6517 * exp_ch4.adb (Expand_N_Op_Expon): Remove unsigned type test
6518 for 2**X optimization.
6520 2014-01-27 Ed Schonberg <schonberg@adacore.com>
6522 * a-suenst.adb: strings.utf_encoding.strings (Decode): Check
6523 explicitly whether value is in range of Character, because the
6524 library is typically compiled with range checks disabled, and
6525 we cannot rely on the implicit check on the argument of 'Val.
6527 2014-01-27 Vincent Celier <celier@adacore.com>
6529 * a-ciorma.adb, a-cihama.adb (Assign): Copy the Source to the Target,
6530 not the Target to itself.
6532 2014-01-27 Robert Dewar <dewar@adacore.com>
6534 * vms_conv.ads, ali.adb, sem_ch6.ads, opt.ads, vms_cmds.ads: Minor
6535 changes to avoid incorrect use of unordered enum types.
6537 2014-01-27 Thomas Quinot <quinot@adacore.com>
6539 * sem_ch4.adb: Minor reformatting.
6541 2014-01-27 Robert Dewar <dewar@adacore.com>
6543 * scn.adb (Check_End_Of_Line): Removed.
6544 (Error_Long_Line): Removed.
6545 (Determine_License): Use versions of above routines from Scanner.
6546 * scng.adb (Check_End_Of_Line): Moved to spec.
6547 (Error_Long_Line): Removed, no longer used.
6548 * scng.ads (Check_End_Of_Line): Moved here from body.
6550 2014-01-27 Tristan Gingold <gingold@adacore.com>
6552 * exp_ch7.adb (Build_Cleanup_Statements): Call
6553 Build_Protected_Subprogram_Call_Cleanup to insert the cleanup
6555 * exp_ch9.adb (Build_Protected_Subprogram_Body): Likewise.
6556 Remove Service_Name variable.
6557 (Build_Protected_SUbprogam_Call_Cleanup): New procedure that
6558 factorize code from the above subprograms.
6559 * exp_ch9.ads (Build_Protected_Subprogram_Call_Cleanup): New procedure.
6561 2014-01-27 Hristian Kirtchev <kirtchev@adacore.com>
6563 * einfo.adb (Has_Option): Reimplemented.
6564 * sem_prag.adb (Analyze_Refinement_Clause): Add global
6565 variables AR_Constit, AW_Constit, ER_Constit, EW_Constit,
6566 External_Constit_Seen and State. Add local variables Body_Ref,
6567 Body_Ref_Elmt and Extra_State. Reimplement part of the logic to
6568 avoid a cumbersome while pool. Verify the legality of an external
6569 state and relevant properties.
6570 (Check_External_Property): New routine.
6571 (Check_Matching_State): Remove parameter profile
6572 and update comment on usage.
6573 (Collect_Constituent): Store the
6574 relevant external property of a constituent.
6575 * sem_util.adb (Async_Readers_Enabled): Update the call to
6576 Has_Enabled_Property.
6577 (Async_Writers_Enabled): Update the call to Has_Enabled_Property.
6578 (Effective_Reads_Enabled): Update the call to Has_Enabled_Property.
6579 (Effective_Writes_Enabled): Update the call to Has_Enabled_Property.
6580 (Has_Enabled_Property): Rename formal parameter Extern to State_Id.
6581 Update comment on usage. Reimplement the logic to recognize the various
6582 formats of properties.
6584 2014-01-27 Ed Schonberg <schonberg@adacore.com>
6586 * par-ch5.adb: Minor reformatting.
6588 2014-01-27 Tristan Gingold <gingold@adacore.com>
6590 * s-tposen.ads: Harmonize style and comments.
6592 2014-01-27 Vincent Celier <celier@adacore.com>
6594 * projects.texi: Document that shared library projects, by
6595 default, cannot import projects that are not shared library
6598 2014-01-27 Robert Dewar <dewar@adacore.com>
6600 * sem_ch8.adb (Find_Selected_Component): Use Replace instead
6603 2014-01-27 Ed Schonberg <schonberg@adacore.com>
6605 * a-suenco.adb, a-suenst.adb (Decode): Raise encoding error if
6606 any other exception is raised.
6607 (Convert): If both Input_Scheme and Output_Scheme are UTF_8 it is
6608 still necessary to perform a conversion in order to remove overlong
6611 2014-01-27 Robert Dewar <dewar@adacore.com>
6613 * exp_smem.adb: Minor reformatting.
6615 2014-01-27 Thomas Quinot <quinot@adacore.com>
6617 * a-calfor.ads: Fix incorrect reference to operator "-" in comment.
6619 2014-01-27 Ed Schonberg <schonberg@adacore.com>
6621 * sem_res.adb (Make_Call_Into_Operator): In ASIS mode, relocate
6622 nodes for operands to the original node for the call, to preserve
6623 Original_Node pointers within the resolved operands, given that
6624 they may have been rewritten as well. Previous approach copied
6625 the operands into a new tree and lost those pointers.
6627 2014-01-27 Claire Dross <dross@adacore.com>
6630 * a-cofove.adb, a-cofove.ads: Add Strict_Equal function to the API.
6632 2014-01-27 Ed Schonberg <schonberg@adacore.com>
6634 * sem_util.adb (Check_Internal_Protected_Use): A call through
6635 an anonymous access parameter of the current protected function
6636 is not a potential modification of the current object.
6638 2014-01-27 Ed Schonberg <schonberg@adacore.com>
6640 * a-cobove.adb (Reserve_Capacity): Procedure raises
6641 Capacity_Error, not Constraint_Error, when request cannot be
6644 2014-01-27 Vincent Celier <celier@adacore.com>
6646 * a-coorma.adb, a-cohama.adb (Assign): Copy the Source to the Target,
6647 not the Target to itself.
6649 2014-01-27 Ed Schonberg <schonberg@adacore.com>
6651 * exp_ch4.adb (Expand_Concatenate): If the target of the
6652 concatenation is a library-level entity, always use the off-line
6653 version of concatenation, regardless of optimization level. This
6654 is space-efficient, and prevents linking problems when some
6655 units are compiled with different optimization levels.
6657 2014-01-27 Ed Schonberg <schonberg@adacore.com>
6659 * sem_ch5.adb: Code clean up.
6661 2014-01-27 Ed Schonberg <schonberg@adacore.com>
6663 * par-ch5.adb (P_Iterator_Specification): Improve error recovery
6664 when an array or container iterator includes a subtype indication,
6665 which is only legal in an element iterator.
6667 2014-01-27 Thomas Quinot <quinot@adacore.com>
6669 * exp_ch7.adb: Minor reformatting.
6671 2014-01-27 Robert Dewar <dewar@adacore.com>
6673 * opt.adb (SPARK_Mode): Default for library units is None rather
6675 * opt.ads: Remove AUTO from SPARK_Mode_Type SPARK_Mode_Type is
6677 * sem_prag.adb (Analyze_Pragma, case SPARK_Mode): Remove AUTO
6679 * snames.ads-tmpl (Name_Auto): Removed, no longer used.
6681 2014-01-27 Robert Dewar <dewar@adacore.com>
6683 * par-ch5.adb (P_Sequence_Of_Statements): Make entry in
6684 Suspicious_Labels table if we have identifier; followed by loop
6686 * par-endh.adb (Evaluate_End_Entry): Search Suspicious_Labels table.
6687 * par.adb (Suspicious_Labels): New table.
6689 2014-01-27 Robert Dewar <dewar@adacore.com>
6691 * exp_aggr.adb (Check_Bounds): Reason is range check, not
6694 2014-01-27 Yannick Moy <moy@adacore.com>
6696 * get_spark_xrefs.adb (Get_SPARK_Xrefs): Accept new type 'c' for
6698 * lib-xref-spark_specific.adb (Is_Global_Constant): Remove useless
6700 (Add_SPARK_Xrefs): Include references to constants.
6701 * spark_xrefs.ads Document new character 'c' for references to
6704 2014-01-27 Thomas Quinot <quinot@adacore.com>
6706 * exp_smem.adb (Add_Write_After): For a function call, insert write as
6707 an after action in a transient scope.
6709 2014-01-27 Thomas Quinot <quinot@adacore.com>
6711 * exp_smem.adb (Expand_Shared_Passive_Variable): For a reference
6712 to a shared variable as an OUT formal in a call to an init proc,
6713 the 'Read call must be emitted after, not before, the call.
6715 2014-01-27 Robert Dewar <dewar@adacore.com>
6717 * gnat_rm.texi: Remove mention of AUTO mode for SPARK_Mode pragma.
6719 2014-01-27 Robert Dewar <dewar@adacore.com>
6721 * a-wichha.adb (Character_Set_Version): Change to output proper
6724 2014-01-27 Hristian Kirtchev <kirtchev@adacore.com>
6726 * einfo.adb (Is_Input_Only_State): Removed.
6727 (Is_Non_Volatile_State): Removed.
6728 (Is_Output_State): Removed.
6729 * einfo.ads (Is_Input_Only_State): Remove attribute and
6730 subprogram. Update related entity.
6731 (Is_Non_Volatile_State):
6732 Remove attribute and subprogram. Update related entity.
6733 (Is_Output_State): Removed attribute and subprogram. Update
6735 * exp_ch6.adb (Expand_Subprogram_Contract): Update comment on
6737 * sem_ch3.adb (Analyze_Declarations): Analyze the contract of
6738 an object, not just variables.
6739 (Analyze_Object_Contract): New routine.
6740 (Analyze_Variable_Contract): Removed.
6741 (Process_Discriminants): Detect an illegal use of volatile
6742 discriminant in SPARK mode.
6743 * sem_ch5.adb (Analyze_Iterator_Specification):
6744 Detect an illegal use of volatile loop variable.
6745 (Analyze_Loop_Parameter_Specification): Detect an illegal use
6746 of volatile loop variable.
6747 * sem_ch6.adb (Process_Formals): Update the volatile object
6748 detection. Detect an illegal formal of mode IN OUT or OUT in
6749 SPARK mode. Enhance the error messages with references.
6750 * sem_ch12.adb (Instantiate_Object): Update the volatile object
6751 detection. Enhance the error messages with references.
6752 * sem_prag.adb (Analyze_Abstract_State): Enhance the error
6753 messages with references.
6754 (Analyze_Contract_Case): Enhance the error messages with references.
6755 (Analyze_External_Property): Call Check_Duplicate_Property to process
6756 an external property.
6757 (Analyze_External_Property_In_Decl_Part): New routine.
6758 (Analyze_External_State_In_Decl_Part): Removed.
6759 (Analyze_Global_Item): Detect an illegal
6760 use of a volatile constant. Detect an illegal use
6761 of a variable with enabled Effective_Reads. Enhance
6762 the error messages with references. Remove obsolete
6763 checks concerning Input_Only and Output_Only states.
6764 (Analyze_Initialization_Item): Enhance the error messages
6766 (Analyze_Initializes_In_Decl_Part): Do not
6767 collect the states and variables when the initialization list
6769 (Analyze_Input_Item): Enhance the error messages with references.
6770 (Analyze_Input_Output): Enhance the error messages with references.
6771 (Analyze_Pragma): Enhance the error messages with references.
6772 (Analyze_Refinement_Clause): Code reformatting.
6773 (Analyze_Refined_Depends_In_Decl_Part):
6774 Rename global variable Global to Reg_Global and update all
6775 occurrences. Add local variables D7 and D8. Update the error
6776 messages with references. Update the call to Collect_Global_Items.
6777 (Analyze_Refined_Global_In_Decl_Part): Add local variables
6778 Has_Proof_In_State, Proof_In_Constits and Proof_In_Items. Update
6779 the call to Collect_Global_Items. Account for a Proof_In state
6780 in null / useless refinement checks. Verify the coverage of
6782 (Check_Dependency_Clause): Remove local variable
6783 Out_Constits. Remove the retrieval and removal of constituents
6784 for an Output_Only state. Remove the reporting of unused
6785 Output_Only state constituents.
6786 (Check_Duplicate_Mode): Enhance
6787 the error message with a reference.
6788 (Check_Duplicate_Property): New routine.
6789 (Check_Duplicate_Option): Enhance the error message with a reference.
6790 (Check_External_Properties): Enhance the error message with a reference.
6791 (Check_Function_Return): Enhance the error message with a reference.
6792 (Check_In_Out_States): Update
6793 comment on usage. Add a specialized error message for Proof_In
6794 constituents. Enhance the error message with a reference.
6795 (Check_Input_States): Update comment on usage. Account for
6796 possible Proof_In constituents. Enhance the error message
6798 (Check_Matching_Constituent): Enhance the error message with a
6800 (Check_Matching_State): Enchance the error message with a reference.
6801 (Check_Mode): Add local variable From_Global. Update the call to
6802 Find_Mode. Emit more precise error messages concerning extra items
6803 (Check_Mode_Restriction_In_Enclosing_Context): Consider
6804 pragma Refined_Global. Enhance the error message with a
6806 (Check_Mode_Restriction_In_Function): Enhance the error message with
6808 (Check_Output_States): Update comment on usage. Add local variable
6809 Posted. Account for possible Proof_In constituents. Produce a detailed
6810 list of missing constituents.
6811 (Check_Proof_In_States): New routine.
6812 (Check_Refined_Global_Item): Handle Proof_In
6813 constituents. Enchance the error message with a reference.
6814 (Collect_Global_Items): Add formal parameters Proof_In_Items
6815 and Has_Proof_In_State. Update the comment on usage. Account
6817 (Create_Or_Modify_Clause): Enchance
6818 the error message with a reference.
6820 formal parameter From_Global. Update the comment on usage.
6821 Detect when the mode is governed by pragma [Refined_]Global.
6822 (Output_Constituents): Removed.
6823 (Report_Extra_Constituents):
6824 Report extra Proof_In constituents.
6825 (Report_Unused_Constituents): Removed.
6826 (Usage_Error): Code reformatting. Enhance the error
6827 messages with reference.
6828 * sem_prag.ads (Analyze_External_Property_In_Decl_Part): New routine.
6829 (Analyze_External_State_In_Decl_Part): Removed.
6830 * sem_res.adb (Resolve_Actuals): Update the volatile object
6831 detection. Enhance the error message with a reference.
6832 (Resolve_Entity_Name): Update the volatile object
6833 detection. Enhance the error message with a reference.
6834 * sem_util.adb (Is_Refined_State): Add a guard to avoid a crash.
6835 (Is_SPARK_Volatile_Object): New routine.
6836 (Has_Volatile_Component): New routine.
6837 * sem_util.ads (Is_Delegate): Alphabetized.
6838 (Is_SPARK_Volatile_Object): New routine.
6839 (Has_Volatile_Component): New routine.
6840 * snames.ads-tmpl: Remove names Name_Input_Only and Name_Output_Only.
6842 2014-01-27 Ed Schonberg <schonberg@adacore.com>
6844 * sem_attr.adb: Resolve fully prefix of 'Update.
6846 2014-01-27 Ben Brosgol <brosgol@adacore.com>
6848 * gnat_rm.texi: Minor clarifications.
6850 2014-01-27 Robert Dewar <dewar@adacore.com>
6852 * sem_elab.adb (Check_Internal_Call_Continue): Avoid complaining
6853 about call that is generated as part of an Initial_Condition
6855 * sem_prag.adb: Minor spelling correction.
6857 2014-01-27 Robert Dewar <dewar@adacore.com>
6859 * sem_prag.adb (Set_Convention_From_Pragma): Check that
6860 convention Ghost can only apply to functions.
6861 * einfo.ads, einfo.adb (Is_Ghost_Subprogram): Add clarifying comment.
6863 2014-01-27 Robert Dewar <dewar@adacore.com>
6865 * gnat_ugn.texi: Add Short_Enums to documentation of
6868 2014-01-27 Robert Dewar <dewar@adacore.com>
6870 * sem_prag.adb (Analyze_Input_Item): Correct check for input
6871 item in same package.
6872 * sem_util.ads, sem_util.adb (Within_Scope): New function.
6874 2014-01-26 Arnaud Charlet <charlet@adacore.com>
6876 * a-intnam-lynxos.ads, mlib-tgt-specific-lynxos.adb,
6877 s-osinte-lynxos-3.adb, s-osinte-lynxos-3.ads, s-osinte-lynxos.adb,
6878 s-osinte-lynxos.ads, s-taprop-lynxos.adb, s-tpopsp-lynxos.adb,
6879 system-lynxos-ppc.ads, system-lynxos-x86.ads: Removed, no longer
6882 2014-01-25 Eric Botcazou <ebotcazou@adacore.com>
6884 * gcc-interface/Makefile.in: Fix oversight.
6886 2014-01-25 Eric Botcazou <ebotcazou@adacore.com>
6888 * gcc-interface/utils.c (convert_to_fat_pointer): Un-obfuscate the
6889 conversion from a thin pointer with a shifted value.
6890 * gcc-interface/utils2.c (gnat_build_constructor): Propagate the
6891 read-only flag from the values onto the result.
6892 (gnat_invariant_expr): Accept read-only CONSTRUCTORs.
6894 2014-01-25 Tristan Gingold <gingold@adacore.com>
6896 * gcc-interface/decl.c (gnat_to_gnu_entity): Always build a variable
6897 for E_Variable with a pragma Linker_Section.
6899 2014-01-25 Robert Dewar <dewar@adacore.com>
6901 * gcc-interface/decl.c (gnat_to_gnu_param): Make sure an Out parameter
6902 with Default_Value aspect is passed in by copy.
6904 2014-01-24 Eric Botcazou <ebotcazou@adacore.com>
6906 * set_targ.adb: Set Short_Enums.
6907 * gcc-interface/lang.opt (fshort-enums): New option.
6908 * gcc-interface/misc.c (gnat_handle_option): Handle it.
6909 (gnat_post_options): Do not modify the global settings.
6911 2014-01-24 Robert Dewar <dewar@adacore.com>
6913 * g-rannum.ads, g-rannum.adb (Random_Ordinary_Fixed): New generic
6915 (Random_Decimal_Fixed): New generic function.
6916 * s-rannum.ads: Minor comment clarifications.
6918 2014-01-24 Robert Dewar <dewar@adacore.com>
6920 * back_end.adb: Remove Short_Enums handling (handled in
6921 Ttypes/Get_Targ now) Minor added comments.
6922 * freeze.adb: Change name Short_Enums_On_Target to
6924 * get_targ.ads, get_targ.adb (Get_Short_Enums): New function.
6925 * opt.ads: Minor comment updates.
6926 * sem_ch13.adb: Change name Short_Enums_On_Target to
6928 * set_targ.adb: Set Short_Enums from gcc back end.
6929 * set_targ.ads (Short_Enums): New variable.
6930 * targparm.ads, targparm.adb: Remove Short_Enums entries (handled in
6931 Ttypes/Get_Targ now).
6932 * ttypes.ads (Target_Short_Enums): New constant boolean switch
6934 2014-01-24 Pascal Obry <obry@adacore.com>
6936 * g-sercom-mingw.adb: Fix serial port name for port number > 10.
6938 2014-01-24 Gary Dismukes <dismukes@adacore.com>
6940 * exp_disp.adb (Expand_Dispatching_Call): Call Unqualify on Param when
6941 comparing it with Ctrl_Arg, since Ctrl_Arg may have had qualification
6944 2014-01-24 Robert Dewar <dewar@adacore.com>
6946 * sinfo.ads, make.adb, prj-env.adb: Minor reformatting.
6948 2014-01-24 Vincent Celier <celier@adacore.com>
6950 * prj.adb (Add_Aggregated_Project): Do not add a project in
6951 the list if it is already there.
6953 2014-01-24 Yannick Moy <moy@adacore.com>
6955 * lib-xref-spark_specific.adb (Enclosing_Subprogram_Or_Package):
6956 Correct the search for a subrogram declaration to which a pragma is
6959 2014-01-24 Bob Duff <duff@adacore.com>
6961 * gnat_ugn.texi: Document --decimal-grouping and
6962 --based-grouping switches in gnatpp.
6964 2014-01-24 Ed Schonberg <schonberg@adacore.com>
6966 * sinfo.ads: Documentation update.
6968 2014-01-24 Ed Schonberg <schonberg@adacore.com>
6970 * sem_ch3.adb (Constant_Redeclaration): New declaration is
6971 illegal if previous one has an initial expression that is an
6972 aggregate expanded into assignments.
6974 2014-01-24 Ed Schonberg <schonberg@adacore.com>
6976 * sem_ch5.adb (Analyze_Loop_Parameter_Specification): Small
6977 code reorganization to remove spurious warning on a loop with
6978 an array element iterator that has a null range.
6980 2014-01-24 Vincent Celier <celier@adacore.com>
6982 * make.adb (Binding_Phase): When setting the Ada paths, use
6983 the library ALI dir, not the object dir in libraries.
6985 2014-01-24 Yannick Moy <moy@adacore.com>
6987 * sinfo.ads: Add documentation of check flag fields.
6989 2014-01-24 Ed Schonberg <schonberg@adacore.com>
6991 * sem_res.adb (Resolve_Actuals): If an actual is a view
6992 conversion of a discriminated object, and the formal type is
6993 discriminated and constrained, apply a discriminant check to
6996 2014-01-24 Robert Dewar <dewar@adacore.com>
6998 * prj.adb, prj-env.adb, back_end.adb: Add comment, minor code clean ups.
7000 2014-01-24 Ed Schonberg <schonberg@adacore.com>
7002 * sem_ch3.adb (Analyze_Declarations): At the end of an
7003 appropriate declarative part, call Freeze_All from the first
7004 declaration in the scope, not from the first unfrozen one. This
7005 is necessary to apply visibility checks to entities with delayed
7006 aspects. Otherwise, in the presence of instantiations and cleanups
7007 that they may generate, the delayed aspects may be analyzed too
7008 late and produce spurious visibility errors.
7009 * sem_attr.adb: Place etype on range.
7010 * sem_ch6.adb: Documentation expression functions.
7012 2014-01-24 Robert Dewar <dewar@adacore.com>
7014 * exp_ch7.adb: Minor change of Indices to Indexes (preferred
7015 terminology in compiler).
7017 2014-01-24 Robert Dewar <dewar@adacore.com>
7019 * scans.ads: Remove Tok_Raise from Sterm, Eterm, After_SM
7020 categories, now that Ada 95 supports raise expressions.
7022 2014-01-24 Robert Dewar <dewar@adacore.com>
7024 * freeze.adb (Freeze_Enumeration_Type): Use new target parameter
7025 Short_Enums_On_Target.
7026 * sem_ch13.adb (Set_Enum_Esize): Take Short_Enums_On_Target
7028 * targparm.ads, targparm.adb: Add new target parameter Short_Enums.
7030 2014-01-24 Ed Schonberg <schonberg@adacore.com>
7032 * sem_ch5.adb (Analyze_Iterator_Specification): If subtype
7033 indication is given explicity, check that it matches the array
7034 component type or the container element type of the domain
7037 2014-01-24 Tristan Gingold <gingold@adacore.com>
7039 * back_end.adb (Scan_Compiler_Arguments): Set Short_Enums_On_Target.
7040 * gcc-interface/misc.c (flag_short_enums): Declare.
7041 (gnat_post_options): Set it.
7043 2014-01-24 Vincent Celier <celier@adacore.com>
7045 * prj-env.adb (Ada_Objects_Path): Use Ada_Objects_Path_No_Libs
7046 to cache the result when Including_Libraries is False.
7047 * prj-env.ads (Ada_Objects_Path): Update documentation
7048 * prj.adb (Free (Project_Id)): Also free Ada_Objects_Path_No_Libs
7049 (Get_Object_Directory): Return the Library_Ali_Dir only when
7050 when Including_Libraries is True.
7051 * prj.ads (Get_Object_Directory): Fix and complete documentation
7052 (Project_Data): New component Ada_Objects_Path_No_Libs
7054 2014-01-24 Robert Dewar <dewar@adacore.com>
7056 * checks.adb (Expr_Known_Valid): Result of fpt operator never
7059 2014-01-24 Eric Botcazou <ebotcazou@adacore.com>
7061 * back_end.adb: Minor fix in comment.
7063 2014-01-24 Javier Miranda <miranda@adacore.com>
7065 * sem_ch3.adb (Check_Abstract_Overriding): Code reestructuration
7066 required to report the error in case of task types.
7068 2014-01-24 Ed Schonberg <schonberg@adacore.com>
7070 * sem_attr.adb: Additional index checking.
7072 2014-01-24 Ed Schonberg <schonberg@adacore.com>
7074 * sem_attr.adb (Analyze_Attribute, case 'Update): Analyze
7075 expressions in each component association, and for records note
7076 the entity in each association choice, for subsequent resolution.
7077 (Resolve_Attribute, case 'Update): Complete resolution of
7078 expressions in each component association.
7080 2014-01-24 Robert Dewar <dewar@adacore.com>
7082 * sem.adb (Sem): Avoid premature reference to Current_Sem_Unit
7083 (this was causing Is_Main_Unit_Or_Main_Unit_Spec to be set wrong,
7084 leading to wrong handling of SPARK_Mode for library units).
7086 2014-01-24 Robert Dewar <dewar@adacore.com>
7088 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Set SPARK_Mode
7089 on generic instances (do not consider them to be internally
7092 2014-01-24 Doug Rupp <rupp@adacore.com>
7094 * s-osinte-android.ads (pthread_sigmask): Import sigprocmask
7095 vice pthread_sigmask.
7097 2014-01-24 Vincent Celier <celier@adacore.com>
7099 * prj.adb (Debug_Output (Str, Str2)): Output if verbosity is
7102 2014-01-24 Vincent Celier <celier@adacore.com>
7104 * prj-ext.adb (Add): Do not output anything when Silent is True,
7105 whatever the verbosity. When Source is From_External_Attribute,
7106 set the corresponding environment variable if it is not already set.
7107 * prj-ext.ads (Add): New Boolean parameter Silent, defaulted
7109 * prj-proc.adb (Process_Expression_For_Associative_Array):
7110 For attribute External, call Prj.Ext.Add with Silent set to
7111 True for the child environment, to avoid useless output in non
7114 2014-01-24 Ed Schonberg <schonberg@adacore.com>
7116 * sem_res.adb (Set_Slice_Subtype): Handle properly a discrete
7117 range given by a subtype indication, and force evaluation of
7118 the bounds, as for a simple range.
7119 * exp_util.adb (Evaluate_Slice_Bounds): Utility to force evaluation
7120 of bounds of slice for various kinds of discrete ranges.
7121 (Evaluate_Name, Evaluate_Subtype_From_Expr): use
7122 Evaluate_Slice_Bounds.
7124 2014-01-24 Bob Duff <duff@adacore.com>
7126 * s-taskin.ads (Activator): Make this Atomic, because
7127 Activation_Is_Complete reads it, and that can be called
7128 from any task. Previously, this component was only
7129 modified by the activator before activation, and by
7130 Self after activation.
7131 * a-taside.ads, a-taside.adb (Environment_Task,
7132 Activation_Is_Complete): Implement these missing functions.
7134 2014-01-24 Doug Rupp <rupp@adacore.com>
7136 * init.c: Add a handler section for Android.
7138 2014-01-24 Arnaud Charlet <charlet@adacore.com>
7140 * i-cexten.ads (Unsigned_33..64, Unsigned_33..64): New types.
7142 2014-01-24 Ed Schonberg <schonberg@adacore.com>
7144 * sem_ch4.adb (Operator_Check): If one operand is a
7145 Raise_Expression, set its type to that of the other operand.
7146 * sem_res.adb (Resolve_Raise_Expression): new procedure.
7147 (Resolve_Actuals): For an actual that is a Raise_Expression,
7148 set the type to that of the formal.
7149 * sem_type.adb (Find_Unique_Type): If one of the operands is a
7150 Raise_Expression, return type of the other operand.
7152 2014-01-24 Ed Schonberg <schonberg@adacore.com>
7154 * sem_aggr.adb (Resolve_Record_Aggregate): If a scalar
7155 component of the record has a type with a default aspect, and
7156 the corresponding aggregate component is initiaized with a box,
7157 use the default value in the rewritten aggregate.
7159 2014-01-24 Tristan Gingold <gingold@adacore.com>
7161 * s-interr.ads, s-interr.adb, s-interr-hwint.adb, s-interr-vms.adb,
7162 s-interr-sigaction.adb,
7163 s-interr-dummy.adb (Install_Restricted_Handlers): Add Prio parameter.
7164 * exp_ch9.adb (Make_Initialize_Protection): Add Prio parameter
7165 to the call to Install_Restricted_Handlers.
7167 2014-01-24 Emmanuel Briot <briot@adacore.com>
7169 * prj-nmsc.adb (Check_File): Add protection when the source is
7170 not fully initialized.
7172 2014-01-24 Ed Schonberg <schonberg@adacore.com>
7174 * sem_util.adb (Is_Post_State): In a postcondition, a selected
7175 component that denotes an implicit dereference is a reference
7176 to the post state of the subprogram.
7178 2014-01-24 Robert Dewar <dewar@adacore.com>
7180 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): SPARK_Mode OFF
7181 for generated subprograms.
7182 (Analyze_Subprogram_Specification): Ditto.
7184 2014-01-24 Vincent Celier <celier@adacore.com>
7186 * prj-dect.adb (Check_Attribute_Allowed): Detect more forbidden
7187 attributes in package Builder of aggregate and aggregate library
7189 * prj-nmsc.adb (Process_Naming_Scheme.Check.Check_Aggregate):
7190 Remove procedure (Process_Naming_Scheme.Check.Check_Aggregated):
7191 Remove parameters. Change error message from "... externally
7192 build library ..." to "... externally built project ...".
7193 (Process_Naming_Scheme.Check): Do not do any check in aggregate
7194 project, as attribute Library_Dir and Library_Name have already
7195 been detected as forbidden.
7197 2014-01-24 Vincent Celier <celier@adacore.com>
7199 * prj-env.adb (Find_Project): If cached project path is not in
7200 project directory, look in current directory first and use cached
7201 project path only if project is not found in project directory.
7203 2014-01-24 Robert Dewar <dewar@adacore.com>
7205 * sem_util.adb, lib-xref.adb: Correct false positive warnings.
7207 2014-01-24 Vincent Celier <celier@adacore.com>
7209 * projects.texi: Document that aggregate projects are only
7210 supported by gprbuild, but not by gnatmake. Document that the
7211 only attribute Switches in package Binder of aggregate projects
7212 will be ignored if its index is not others. Document that
7213 attribute Global_Config_File is allowed in package Binder of
7216 2014-01-24 Robert Dewar <dewar@adacore.com>
7218 * sem_prag.adb: Minor code reorganization.
7219 * sem_util.adb: Minor fix of potential latent bug in Is_LHS.
7221 2014-01-24 Pascal Obry <obry@adacore.com>
7223 * prj-attr.adb, projects.texi, snames.ads-tmpl: Add Excluded_Patterns
7224 attribute definition.
7226 2014-01-24 Vincent Celier <celier@adacore.com>
7228 * makeutl.adb (Queue.Insert_No_Roots): In gprbuild, do not put
7229 in the Queue the same source (same path, same multi-source index)
7230 from the same project file, to avoid compiling several times
7233 2014-01-24 Eric Botcazou <ebotcazou@adacore.com>
7235 * einfo.ads (First_Rep_Item): Remove obsolete stuff.
7236 (Has_Gigi_Rep_Item): Likewise.
7237 * sem_prag.adb (Analyze_Pragma) <Pragma_Linker_Section>: Do not set
7238 Has_Gigi_Rep_Item for objects.
7239 * gcc-interface/decl.c (prepend_one_attribute_to): Rename into...
7240 (prepend_one_attribute): ...this.
7241 (prepend_one_attribute_pragma): New function extracted from...
7242 (prepend_attributes): ...here. Swap the parameters for consistency.
7243 (gnat_to_gnu_entity): Adjust calls to prepend_one_attribute_to and to
7245 <object>: Deal with a pragma Linker_Section on a constant
7246 or variable. <E_Function>: Deal with a pragma Linker_Section
7248 (get_minimal_subprog_decl): Adjust calls to prepend_one_attribute_to.
7250 2014-01-24 Vincent Celier <celier@adacore.com>
7252 * opt.ads: Minor comment update.
7254 2014-01-24 Robert Dewar <dewar@adacore.com>
7256 * sem_prag.adb (Analyze_Input_Output): Add missing error check
7258 * sem_util.adb (Is_Refined_State): Add defense against junk
7261 2014-01-24 Pascal Obry <obry@adacore.com>
7263 * projects.texi: Removes Build_Slaves attribute documentation.
7265 2014-01-23 Robert Dewar <dewar@adacore.com>
7267 * opt.adb (Register_Opt_Config_Switches): Save SPARK_Mode_Pragma
7270 2014-01-23 Ed Schonberg <schonberg@adacore.com>
7272 * sem_util.adb (Is_Potentially_Unevaluated): Predicate only
7273 applies to expressions that come from source.
7274 * sem_attr.adb (Analyze_Attribute, case 'Old): Improve error
7276 (Analyze_Attribute, case 'Loop_Entry): Apply SPARK 2014 legality
7277 rule regarding potentially unevaluated expressions, to prefix
7280 2014-01-23 Ed Schonberg <schonberg@adacore.com>
7282 * exp_util.adb (Make_Invqriant_Call): If type of expression is
7283 a private extension, get invariant from base type.
7285 2014-01-23 Robert Dewar <dewar@adacore.com>
7287 * sem_util.adb, sem_attr.adb: Minor reformatting.
7289 2014-01-23 Robert Dewar <dewar@adacore.com>
7291 * opt.adb (Save_Opt_Config_Switches): Save SPARK_Mode_Pragma
7292 (Restore_Opt_Config_Switches): Restore SPARK_Mode_Pragma.
7293 * sem.adb (Semantics): Remove save/restore of
7294 SPARK_Mode[_Pragma]. Not needed since already done in
7295 Save/Restore_Opt_Config_Switches.
7297 2014-01-23 Robert Dewar <dewar@adacore.com>
7299 * gnat_rm.texi, einfo.adb, einfo.ads, sem_prag.adb, gnat_ugn.texi,
7300 freeze.adb, repinfo.adb, aspects.adb, aspects.ads, sem_ch13.adb:
7301 Linker_Section enhancements.
7303 2014-01-23 Tristan Gingold <gingold@adacore.com>
7305 * gnat_rm.texi: Minor editing.
7307 2014-01-23 Robert Dewar <dewar@adacore.com>
7309 * opt.adb (Set_Opt_Config_Switches): Reset SPARK mode for
7310 with'ed internal units.
7311 * sem.adb (Semantics): Save and restore SPARK_Mode[_Pragma].
7313 2014-01-23 Javier Miranda <miranda@adacore.com>
7315 * lib-xref.adb (Generate_Reference): As part of processing the
7316 "end-of-spec" reference generate an extra reference to the first
7317 private entity of the package.
7318 * xr_tabls.adb (Add_Reference): No action needed for the extra
7319 'E' reference associated; similar to the processing of the
7322 2014-01-23 Bob Duff <duff@adacore.com>
7324 * gnat_ugn.texi: Change "--&pp off" to "--!pp off".
7326 2014-01-23 Ed Schonberg <schonberg@adacore.com>
7328 * sem_util.ads, sem_util.adb (Is_Potentially_Unevaluated): new
7329 predicate to implement rule given in 6.1.1 (20/3).
7330 * sem_attr.adb (Analyze_Attribute, case 'Old): Reject prefix of
7331 'Old in a postcondition, if it is potentially unevaluated and
7332 it is not an entity name.
7334 2014-01-23 Bob Duff <duff@adacore.com>
7336 * gnat_ugn.texi: Document the new "--&pp off" feature of gnatpp.
7338 2014-01-23 Robert Dewar <dewar@adacore.com>
7340 * gnatlink.adb (Gnatlink): Fix problem of generating bad name
7343 2014-01-23 Bob Duff <duff@adacore.com>
7345 * g-dynhta.ads: Minor comment fix.
7347 2014-01-23 Yannick Moy <moy@adacore.com>
7349 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Inherit SPARK_Mode
7350 from spec on body only when not already inherited on spec. Set
7351 SPARK_Mode from context on body without previous spec. *
7352 * sem_prag.adb (Analyze_Pragma): Check placement of pragma on
7353 library-level entities. Correct retrieval of entity from
7354 declaration, for cases where the declaration is not a unit.
7355 * sem_ch12.adb (Instantiate_Object): Avoid
7356 calling Is_Volatile_Object on an empty node.
7358 2014-01-23 Robert Dewar <dewar@adacore.com>
7360 * gnatlink.adb (Gnatlink): Check for suspicious executable file
7363 2014-01-23 Robert Dewar <dewar@adacore.com>
7365 * a-ngelfu.ads: Remove bad uses of AND which should be AND THEN.
7366 * sem_res.adb (Check_No_Direct_Boolean_Operators): Don't give
7367 style errors in instances.
7368 * g-dynhta.ads (Static_HTable): Comment updates.
7370 2014-01-23 Vincent Celier <celier@adacore.com>
7372 * prj-conf.adb (Get_Or_Create_Configuration_File): Do not attempt
7373 to find a configuration project file when Config_File_Name is
7374 No_Configuration_File.
7375 * prj-conf.ads (No_Configuration_File): New constant String.
7376 * prj-pars.adb (Parse): Call Get_Or_Create_Configuration_File
7377 with Config_File_Name set to No_Configuration_File, so that
7378 no existing configuration project file will be used, and the
7379 configuration project will be only created in memory when
7380 Add_Default_GNAT_Naming_Scheme is called.
7381 * projects.texi: Minor reformatting.
7383 2014-01-23 Vincent Celier <celier@adacore.com>
7385 * prj-conf.adb (Get_Or_Create_Configuration_File): Never parse
7386 a config project file if On_Load_Config is not null.
7387 * prj-pars.adb: Minor comment changes.
7389 2014-01-23 Ed Schonberg <schonberg@adacore.com>
7391 * lib-xref.adb (Output_References): Output progenitors of
7392 synchronized tagged types, for source navigation.
7394 2014-01-23 Robert Dewar <dewar@adacore.com>
7396 * exp_util.adb, sinfo.adb, sinfo.ads, sem.adb, sem_res.adb,
7397 expander.adb, exp_ch11.adb, exp_ch11.ads, sem_ch11.adb, sem_ch11.ads,
7398 sprint.adb, sprint.ads: Remove unused node N_Subprogram_Info.
7400 2014-01-23 Emmanuel Briot <briot@adacore.com>
7402 * prj-conf.adb (Get_Or_Create_Configuration_File): call
7403 On_Load_Config later.
7405 2014-01-23 Hristian Kirtchev <kirtchev@adacore.com>
7407 * sem_ch3.adb (Analyze_Declarations): Do not
7408 generate the spec of the late primitive in ASIS mode. Add two
7409 comments to explain the special cases when the expansion is
7412 2014-01-23 Robert Dewar <dewar@adacore.com>
7414 * sem_util.adb (Note_Possible_Modification): Fix error of
7415 misbehaving for implicit dereference cases in -gnatc mode.
7417 2014-01-23 Emmanuel Briot <briot@adacore.com>
7419 * prj-pars.adb: Minor reformatting.
7421 2014-01-22 Ed Schonberg <schonberg@adacore.com>
7423 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): A subprogram
7424 body generated for an expression function within a protected body
7425 needs a set of renaming declarations if the expression function
7428 2014-01-22 Ed Schonberg <schonberg@adacore.com>
7430 * lib-xref.adb (Get_Type_Reference): In semantics-only mode,
7431 list interface progenitor of a tagged concurrent type, for better
7434 2014-01-22 Robert Dewar <dewar@adacore.com>
7436 * lib.adb (In_Extended_Main_Code_Unit): Return False for
7438 (In_Extended_Main_Source_Unit): Return False for Standard_Location.
7439 * lib.ads (In_Extended_Main_Code_Unit): Add documentation on
7440 treatment of Slocs No_Location and Standard_Location.
7441 * restrict.adb (Check_Restriction_No_Dependence): Explicitly
7442 check for entity with Standard_Location Sloc, rather than relying
7443 on Lib routines to do that.
7444 * sem_res.adb (Resolve_Call): Implement SPARK_05 restriction
7445 that a call cannot occur before a later occuring body within
7448 2014-01-22 Thomas Quinot <quinot@adacore.com>
7450 * rtsfind.adb: Update comment.
7452 2014-01-22 Hristian Kirtchev <kirtchev@adacore.com>
7454 * sem_aux.ads, sem_aux.adb (Is_Body): New routine.
7455 * sem_ch3.adb (Analyze_Declarations): Add local variable
7456 Body_Seen. Generate the spec of a late controlled
7457 primitive body that is about to freeze its related type.
7458 (Handle_Late_Controlled_Primitive): New routine.
7460 2014-01-22 Robert Dewar <dewar@adacore.com>
7462 * a-stream.adb: Minor reformatting.
7464 2014-01-22 Ed Schonberg <schonberg@adacore.com>
7466 * sem_ch8.adb (From_Actual_Package): Introduce a recursive
7467 sub-procedure Declared_In_Actual to handle properly the visibility
7468 of actuals in actual packages, that are themselves actuals to a
7469 actual package of the current instance. This mimics properly the
7470 visibility of formals of formal packages declared with a box,
7471 within the corresponding generic unit.
7473 2014-01-22 Robert Dewar <dewar@adacore.com>
7475 * checks.adb: Do not assume that a volatile variable is valid.
7477 2014-01-22 Thomas Quinot <quinot@adacore.com>
7479 * g-catiio.ads (Image, Value): Clarify that these functions
7480 operate in the local time zone. Minor documentation update.
7482 2014-01-22 Thomas Quinot <quinot@adacore.com>
7484 * csets.adb, csets.ads, opt.ads: Minor documentation fixes.
7486 2014-01-22 Robert Dewar <dewar@adacore.com>
7488 * sem_aux.adb, sem_aux.ads, sem_ch3.adb (Has_Unconstrained_Elements):
7489 Moved to sem_aux.adb.
7491 2014-01-22 Robert Dewar <dewar@adacore.com>
7493 * vms_data.ads: Minor reformatting.
7495 2014-01-22 Robert Dewar <dewar@adacore.com>
7497 * debug.adb: Document messages affected by -gnatd.E including
7498 the new ones that relate to late definition of equality.
7499 * sem_ch6.adb (Check_Untagged_Equality): In Ada 2012 mode, if
7500 debug flag -gnatd.E is set, then generate warnings rather than
7502 (Check_Untagged_Equality): In earlier versions of Ada,
7503 generate warnings if Warn_On_Ada_2012_Incompatibility flag is set.
7505 2014-01-22 Robert Dewar <dewar@adacore.com>
7507 * sem_prag.adb (Usage_Error): Output additional messages for
7508 unconstrained OUT parameters lacking an input dependency.
7510 2014-01-22 Robert Dewar <dewar@adacore.com>
7512 * sem_ch4.adb: Minor reformatting.
7514 2014-01-22 Robert Dewar <dewar@adacore.com>
7516 * restrict.ads: Minor reformatting.
7517 * sem_res.adb (Resolve_Call): Check for SPARK_05 restriction that
7518 forbids a call from within a subprogram to the same subprogram.
7520 2014-01-22 Thomas Quinot <quinot@adacore.com>
7522 * a-stream.ads (Read_SEA, Write_SEA): New subprograms, optimized
7523 stream attributes for Stream_Element_Array.
7524 * a-stream.adb (Read_SEA, Write_SEA): Bodies for the above.
7525 * rtsfind.adb (Check_CRT): Do not reject a reference to an entity
7526 defined in the current scope.
7528 2014-01-22 Robert Dewar <dewar@adacore.com>
7530 * debug.adb, exp_ch4.adb, erroutc.adb: Minor reformatting.
7532 2014-01-22 Thomas Quinot <quinot@adacore.com>
7534 * sem_ch7.adb, sem_ch8.adb, exp_ch3.adb: Minor reformatting.
7536 2014-01-22 Thomas Quinot <quinot@adacore.com>
7538 * sem_ch3.adb (Analyze_Object_Declaration): For a constant
7539 declaration initialized with a function call, whose type
7540 has variable size, need to remove side effects so that the
7541 initialization expression becomes a dereference of a temporary
7542 reference to the function result.
7544 2014-01-22 Yannick Moy <moy@adacore.com>
7546 * errout.adb (Initialize): Remove trick to add dummy entry
7548 * erroutc.adb (Set_Warnings_Mode_Off,
7549 Set_Warnings_Mode_On): Do nothing if warnings are suppressed by
7550 command line switch.
7551 * opt.ads (Warning_Mode): Document behavior
7552 wrt pragma Warnings, in normal mode and in GNATprove_Mode.
7554 2014-01-22 Robert Dewar <dewar@adacore.com>
7556 * sem_ch3.adb, errout.adb, erroutc.adb: Minor reformatting.
7558 2014-01-22 Robert Dewar <dewar@adacore.com>
7560 * sem_ch13.adb (Check_Pool_Size_Clash): New procedure
7561 (Analyze_Attribute_Definition_Clause, case Storage_Pool): call
7562 Check_Pool_Size_Clash (Analyze_Attribute_Definition_Clause,
7563 case Storage_Size): call Check_Pool_Size_Clash.
7565 2014-01-22 Robert Dewar <dewar@adacore.com>
7567 * sem_ch3.adb, exp_util.adb, sem_dim.adb, sem_elab.adb, sem_ch8.adb,
7568 sem_eval.ads: Minor reformatting.
7570 2014-01-22 Thomas Quinot <quinot@adacore.com>
7572 * sem_eval.adb (Compile_Time_Known_Bounds): Return False for
7573 Any_Composite to prevent cascaded errors.
7575 2014-01-22 Yannick Moy <moy@adacore.com>
7577 * errout.adb (Initialize): Do not insert special entry in Warnings
7578 table in GNATprove_Mode.
7579 * erroutc.adb (Set_Warnings_Mode_On): Add info in Warnings table in
7581 * gnat1drv.adb (Adjust_Global_Switches): Do not suppress frontend
7584 2014-01-22 Robert Dewar <dewar@adacore.com>
7586 * sem_prag.adb (Analyze_Initializes_In_Decl_Part): Handle null
7589 2014-01-22 Robert Dewar <dewar@adacore.com>
7591 * snames.ads-tmpl: Update header.
7593 2014-01-22 Thomas Quinot <quinot@adacore.com>
7595 * exp_util.adb (Insert_Actions): When inserting actions on a
7596 short circuit operator that has already been analyzed, do not park
7597 actions in node; instead introduce an N_Expression_With_Actions
7598 and insert actions immediately.
7599 Add guard for unexpected case of climbing up through statement
7600 in Actions list of an N_Expression_With_Actions.
7601 * sem_elab.adb (Insert_Elab_Check): Remove complex
7602 specialized circuitry for the case where the context is already
7603 analyzed, as it is not needed and introduces irregularities in
7604 finalization. Instead rely on the above change to Insert_Actions
7605 to ensure that late insertion on short circuit operators works
7608 2014-01-22 Ed Schonberg <schonberg@adacore.com>
7610 * sem_ch4.adb (Operator_Check): Improve error message when an
7611 operand of concatenation is an access type.
7613 2014-01-22 Thomas Quinot <quinot@adacore.com>
7615 * sem_dim.adb (Analyze_Dimension_Identifier): Add guard against
7618 2014-01-22 Ed Schonberg <schonberg@adacore.com>
7620 * sem_ch8.adb (Find_Selected_Component): Handle properly the case
7621 of an expanded name in a proper body, whose prefix is a package
7622 in the context of the proper body, when there is a homonym of
7623 the package declared in the parent unit.
7625 2014-01-22 Robert Dewar <dewar@adacore.com>
7627 * sem_warn.adb (Check_Use_Clause): Don't give no entities used
7628 msg if errors found.
7629 (Check_One_Unit): Same change.
7631 2014-01-22 Robert Dewar <dewar@adacore.com>
7633 * ug_words: Add missing/wrong entries for VMS warning switches.
7634 * sem_prag.adb (Check_Duplicate_Pragma): Avoid flagging parent type.
7636 2014-01-22 Jerome Guitton <guitton@adacore.com>
7638 * mlib-tgt-specific-vxworks.adb (Get_Target_Suffix): Replace xscale by
7641 2014-01-22 Robert Dewar <dewar@adacore.com>
7643 * gnat_rm.texi, gnat_ugn.texi: Document passive task optimization
7645 2014-01-22 Eric Botcazou <ebotcazou@adacore.com>
7647 * gcc-interface/Makefile.in: Minor fixes.
7649 2014-01-21 Robert Dewar <dewar@adacore.com>
7651 * par-ch4.adb (P_If_Expression): Rewritten to improve error recovery.
7652 * par-ch5.adb (P_Condition): New version with expression prescanned.
7653 * par.adb (P_Condition): New version with expression prescanned.
7655 2014-01-21 Robert Dewar <dewar@adacore.com>
7657 * gnat_rm.texi: Document that Allow_Integer_Address is ignored
7658 if Address is not a private type.
7659 * sem_prag.adb (Analyze_Pragma, case Allow_Integer_Address):
7660 Ignore pragma if System.Address is not a private type.
7662 2014-01-21 Arnaud Charlet <charlet@adacore.com>
7664 * namet.ads (Name_Len): Initialize to 0 to avoid accessing an
7665 uninitialized value.
7667 2014-01-21 Thomas Quinot <quinot@adacore.com>
7669 * gnat_rm.texi (Scalar_Storage_Order): Update documentation.
7671 2014-01-21 Ed Schonberg <schonberg@adacore.com>
7673 * sem_ch12.adb (Set_Instance_Env): In Ada 2012 mode, preserve
7674 the value of Assertions_Enabled flag when compiling an instance of
7675 an internal unit. This facilitates the use of pre/postconditions
7676 in generic internal units, such as the new elementary function
7679 2014-01-21 Robert Dewar <dewar@adacore.com>
7681 * exp_aggr.adb: Minor reformatting.
7682 * sem_attr.adb: Minor reformatting.
7683 * sem_res.adb: Minor comment addition.
7684 * einfo.adb: Minor comment updates.
7685 * freeze.adb: Minor reformatting and code reorganization.
7687 2014-01-21 Ed Schonberg <schonberg@adacore.com>
7689 * par-ch4.adb (P_If_Expression): Handle more gracefully an
7690 elsif clause that does not have an else part.
7692 2014-01-21 Robert Dewar <dewar@adacore.com>
7694 * checks.adb, sem_util.ads, sem_ch4.adb: Minor reformatting.
7695 * gcc-interface/Makefile.in: clean up target pairs.
7697 2014-01-21 Pascal Obry <obry@adacore.com>
7699 * projects.texi: Minor typo fix.
7701 2014-01-21 Thomas Quinot <quinot@adacore.com>
7703 * freeze.adb (Check_Component_Storage_Order): If a record type
7704 has an explicit Scalar_Storage_Order attribute definition clause,
7705 reject any component that itself is of a composite type and does
7708 2014-01-21 Ed Schonberg <schonberg@adacore.com>
7710 * sem_ch10.adb (Generate_Parent_Reference): Make public so it
7711 can be used to generate proper cross-reference information for
7712 the parent units of proper bodies.
7714 2014-01-21 Thomas Quinot <quinot@adacore.com>
7716 * exp_pakd.adb (Expand_Packed_Element_Set,
7717 Expand_Packed_Element_Reference): No byte swapping required in
7718 the front-end for the case of a reverse storage order array,
7719 as this is now handled uniformly in the back-end. However we
7720 still need to swap back an extracted element if it is itself a
7721 nested composite with reverse storage order.
7723 2014-01-21 Hristian Kirtchev <kirtchev@adacore.com>
7725 * sem_prag.adb (Analyze_External_Property): Add processing for "others".
7726 (Analyze_Pragma): Update the grammar of pragma Abstract_State to
7729 2014-01-21 Arnaud Charlet <charlet@adacore.com>
7731 * gnat_ugn.texi: Minor updates.
7733 2014-01-21 Thomas Quinot <quinot@adacore.com>
7735 * exp_pakd.adb: Update comment, minor reformatting.
7737 2014-01-21 Hristian Kirtchev <kirtchev@adacore.com>
7739 * sem_ch3.adb (Analyze_Variable_Contract): Trigger the volatile
7740 object check when SPARK_Mode is on.
7741 * sem_ch6.adb (Process_Formals): Trigger the volatile object
7742 check when SPARK_Mode is on.
7743 * sem_ch12.adb (Instantiate_Object): Trigger the volatile object
7744 check when SPARK_Mode is on.
7745 * sem_ch13.adb (Analyze_Aspect_Specifications): Insert the
7746 corresponding pragma of aspect SPARK_Mode in the visible
7747 declarations of a package declaration.
7748 * sem_prag.adb (Analyze_Pragma): Trigger the volatile object
7749 check when SPARK_Mode is on.
7750 * sem_res.adb (Resolve_Actuals): Trigger the volatile object
7751 check when SPARK_Mode is on.
7752 (Resolve_Entity_Name): Trigger
7753 the volatile object check when SPARK_Mode is on.
7755 2014-01-21 Robert Dewar <dewar@adacore.com>
7757 * sem_ch3.adb, sem_prag.adb, sem_prag.ads, sem_ch12.adb, sem_res.adb,
7758 sem_ch6.adb, a-except-2005.adb: Minor reformatting.
7760 2014-01-21 Ed Schonberg <schonberg@adacore.com>
7762 * exp_ch3.adb (Expand_N_Object_Declaration): When a class-wide
7763 object is declared, it is rewritten as a renaming of an dynamic
7764 expression that wraps the initial value. The renaming declaration
7765 is first given an internal name, to prevent collisions with the
7766 entity already declared, and then the name is modified to reflect
7767 the original one. the modification of the name must preserve
7768 the source location of the original, to prevent spurious errors
7769 when compiling with style checks if the declaration involves
7770 more than one entity.
7772 2014-01-21 Hristian Kirtchev <kirtchev@adacore.com>
7774 * aspects.adb Add entries for Async_Readers, Async_Writers,
7775 Effective_Reads and Effective_Writes in table Canonical_Aspect.
7776 * aspects.ads Add entries for Async_Readers, Async_Writers,
7777 Effective_Reads and Effective_Writes in tables Aspect_Id,
7778 Aspect_Names, Aspect_Delay and Implementation_Defined_Aspect.
7779 * atree.adb (Ekind_In): New version with 8 parameters.
7780 (Node34): New routine.
7781 (Set_Node34): New routine.
7782 * atree.ads (Ekind_In): New version with 8 parameters.
7783 (Node34): New routine.
7784 (Set_Node34): New routine.
7785 * einfo.adb Contract is now Node34.
7786 (Contract): Update the assertion and node usage.
7787 (Get_Pragma): Include pragmas Async_Readers, Async_Writers,
7788 Effective_Reads and Effective_Writes.
7789 (Set_Contract): Update the assertion and node usage.
7790 (Write_Field24_Name): Remove the output for a contract.
7791 (Write_Field34_Name): Add output for a contract.
7792 * einfo.ads Contract is now Node34. Update the comment on
7793 attribute usage and related node structures.
7794 (Get_Pragma): Update the comment on usage.
7795 * par-prag.adb (Prag): Pragmas Async_Readers, Async_Writers,
7796 Effective_Reads and Effective_Writes do not require special
7797 processing by the parser.
7798 * sem_ch3.adb (Analyze_Variable_Contract): New routine.
7799 (Analyze_Declarations): Analyze the contract of a variable at
7800 the end of the declarative region.
7801 (Analyze_Object_Declaration): Create a contract for a variable.
7802 * sem_ch6.adb (Analyze_Subprogram_Contract): Update the retrieval
7803 of classification pragmas.
7804 (Process_Formals): Detect an illegal
7805 use of a volatile object as a formal in a function.
7806 * sem_ch12.adb (Instantiate_Object): Detect an illegal use of
7807 a volatile object as an actual in generic instantiation.
7808 * sem_prag.adb Add entries for Async_Readers, Async_Writers,
7809 Effective_Reads and Effective_Writes in table Sig_Flags.
7810 (Analyze_External_State_In_Decl_Part): New routine.
7811 (Analyze_Global_Item): Detect an illegal use of a volatile object
7812 as a global item of a function.
7813 (Analyze_Pragma): Reimplement
7814 pragma Abstract_State. Add support for pragmas Async_Readers,
7815 Async_Writers, Effective_Reads and Effective_Writes.
7816 (Check_External_Properties): New routine.
7817 * sem_prag.ads (Analyze_External_State_In_Decl_Part): New routine.
7818 (Check_External_Properties): New routine.
7819 * sem_res.adb (Resolve_Actuals): Detect an illegal use of a
7820 volatile object as an actual in a call.
7821 (Resolve_Entity_Name):
7822 Add local variables Par, Prev and Usage_OK. Detect illegal
7823 contexts of volatile objects.
7824 * sem_util.adb (Add_Contract_Item): Add support for
7825 pragmas associated with the contract of a variable.
7826 (Async_Readers_Enabled): New routine.
7827 (Async_Writers_Enabled): New routine.
7828 (Effective_Reads_Enabled): New routine.
7829 (Effective_Writes_Enabled): New routine.
7830 (Has_Enabled_Property):
7832 (Is_Unchecked_Conversion_Instance): New routine.
7833 (Is_Volatile_Object): Add support for entities that may denote
7835 * sem_util.ads (Add_Contract_Item): Update the
7837 (Async_Readers_Enabled): New routine.
7838 (Async_Writers_Enabled): New routine.
7839 (Effective_Reads_Enabled): New routine.
7840 (Effective_Writes_Enabled): New routine.
7841 (Is_Unchecked_Conversion_Instance): New routine.
7842 * sinfo.ads Update the comment on the structure of N_Contract.
7843 * snames.ads-tmpl Add predefined names for Async_Readers,
7844 Async_Writers, Effective_Reads and Effective_Writes. Add
7845 pragma ids for Async_Readers, Async_Writers, Effective_Reads
7846 and Effective_Writes.
7848 2014-01-21 Robert Dewar <dewar@adacore.com>
7850 * exp_ch4.adb (Eval_Op_Expon): Use CRT_Safe_Compile_Time_Known_Value
7851 * sem_eval.adb (Compile_Time_Known_Value): Remove special
7852 handling of CRT mode (CRT_Safe_Compile_Time_Known_Value): New
7853 function (Eval_Op_Expon): Add CRT_Safe in call to Test_Foldable
7854 (Test_Foldable): Add CRT_Safe parameter
7855 * sem_eval.ads (Compile_Time_Known_Value): Remove special
7856 handling of CRT mode.
7857 (CRT_Safe_Compile_Time_Known_Value): New function.
7859 2014-01-21 Robert Dewar <dewar@adacore.com>
7861 * sem_prag.adb (Analyze_Pragma, case SPARK_Mode): Fix problem
7862 with pragma or aspect that applies to package spec or subprogram
7865 2014-01-21 Robert Dewar <dewar@adacore.com>
7867 * exp_aggr.adb: Minor reformatting.
7869 2014-01-21 Johannes Kanig <kanig@adacore.com>
7871 * gnat1drv.adb (Gnat1drv) remove obsolete reference to -gnatd.H.
7873 2014-01-21 Bob Duff <duff@adacore.com>
7875 * gnat_ugn.texi: Document the "checks" attribute in gnat2xml.
7877 2014-01-21 Steve Baird <baird@adacore.com>
7879 * gnat_rm.texi: Improve description of SPARK_Mode pragma.
7881 2014-01-21 Vincent Celier <celier@adacore.com>
7883 * prj-part.adb (Parse_Single_Project): Accept to extend a project
7884 if it has only be imported by an project being extended. When a
7885 project that has only been imported by a project being extended
7886 is imported by another project that is not being extended,
7887 reset the previous indication, so that it will be an error if
7888 this project is extended later.
7889 * prj-tree.adb (Create_Project): Include component From_Extended
7890 in table Projects_HT
7891 * prj-tree.ads (Project_Name_And_Node): New Boolean component
7894 2014-01-21 Robert Dewar <dewar@adacore.com>
7896 * atree.ads, atree.adb: Add Node33 and Set_Node33.
7897 * einfo.ads, einfo.adb (SPARK_Pragma): New field (SPARK_Aux_Pragma):
7898 New field (SPARK_Pragma_Inherited): New flag
7899 (SPARK_Aux_Pragma_Inherited): New flag (SPARK_Mode_Pragmas):
7901 * lib.ads, lib.adb: Remove SPARK_Mode_Pragma, no longer used.
7902 * opt.ads (SPARK_Mode_Pragma): New global variable.
7903 * sem.ads: Add Save_SPARK_Mode_Pragma field to Scope_Stack_Entry.
7904 * sem_ch3.adb: Use new SPARK_Mode data structures.
7905 * sem_ch6.adb: Set SPARK_Mode fields in subprogram specs and bodies.
7906 * sem_ch7.adb: Set SPARK_Mode fields in package spec and body entities.
7907 * sem_ch8.adb (Push_Scope): Save SPARK_Mode_Pragma.
7908 (Pop_Scope): Restore SPARK_Mode_Pragma.
7909 * sem_prag.adb (Analyze_Pragma, case SPARK_Mode): Rewrite for
7910 new data structures.
7912 2014-01-21 Arnaud Charlet <charlet@adacore.com>
7914 * back_end.adb: Undo previous change, not needed. Minor reformatting.
7916 2014-01-21 Thomas Quinot <quinot@adacore.com>
7918 * exp_ch5.adb: Fix comment.
7919 * switch-c.adb: Minor comment update.
7920 * exp_ch3.adb: Minor reformatting.
7922 2014-01-21 Arnaud Charlet <charlet@adacore.com>
7924 * back_end.adb (Scan_Compiler_Arguments): Do not store object
7925 filename in gnatprove mode.
7927 2014-01-21 Thomas Quinot <quinot@adacore.com>
7929 * sinfo.ads (No_Ctrl_Actions): Clarify documentation (flag also
7930 suppresses usage of primitive _assign for tagged types).
7931 * exp_aggr.adb (Build_Array_Aggr_Code.Gen_Assign): Set
7932 No_Ctrl_Actions for a tagged type that does not require
7933 finalization, as we want to disable usage of _assign (which
7934 may cause undesirable discriminant checks on an uninitialized,
7937 2014-01-21 Ed Schonberg <schonberg@adacore.com>
7939 * sem_prag.adb: Reject invariant'class on completion.
7941 2014-01-21 Javier Miranda <miranda@adacore.com>
7943 * exp_ch3.adb (Build_Init_Procedure): For
7944 derivations of interfaces, do not move the the initialization
7945 of the _parent field since such assignment is not generated.
7947 2014-01-21 Ed Schonberg <schonberg@adacore.com>
7949 * sem_res.adb (Rewrite_Renamed_Operator): Do not replace entity
7950 with the operator it renames if we are within an expression of
7951 a pre/postcondition, because the expression will be reanalyzed
7952 at a later point, and the analysis of the renaming may affect
7953 the visibility of the operator when in an instance.
7955 2014-01-21 Robert Dewar <dewar@adacore.com>
7957 * sinfo.ads, sinfo.adb: Change Do_Discriminant_Check to use new Flag1.
7958 Add this flag to type conversion nodes and assignment nodes.
7959 * treepr.adb: Deal properly with Flag 1,2,3.
7960 * treeprs.adt: Minor comment update.
7962 2014-01-21 Robert Dewar <dewar@adacore.com>
7964 * sem_eval.adb (Compile_Time_Known_Value): Add Ignore_CRT
7966 * sem_eval.ads (Compile_Time_Known_Value): Add Ignore_CRT
7967 parameter, completely rewrite spec.
7969 2014-01-21 Ed Schonberg <schonberg@adacore.com>
7971 * sem_ch10.adb (Install_Withed_Unit): If the unit is a subprogram
7972 instance that is inlined, it may have been rewritten as a wrapper
7973 package. In that case the unit that must be made visible is the
7974 related instance of the package.
7976 2014-01-21 Arnaud Charlet <charlet@adacore.com>
7978 * exp_ch9.adb (Expand_N_Selective_Accept.Add_Accept): Refine
7979 previous change in codepeer mode.
7981 2014-01-21 Arnaud Charlet <charlet@adacore.com>
7983 * exp_ch9.adb (Expand_N_Selective_Accept.Add_Accept): Always add
7984 call to Abort_Undefer, as expected by the runtime.
7985 * s-tasren.adb (Local_Complete_Rendezvous): Replace
7986 Defer_Abort_Nestable by Defer_Abort, since we do not expect abort to be
7987 deferred at this point. Update comments.
7989 2014-01-21 Thomas Quinot <quinot@adacore.com>
7991 * exp_ch4.adb, exp_ch5.adb, checks.adb: Minor reformatting.
7993 2014-01-21 Arnaud Charlet <charlet@adacore.com>
7995 * switch-c.adb, usage.adb, gnat_ugn.texi: Mark -gnates as internal,
7998 2014-01-21 Robert Dewar <dewar@adacore.com>
8000 * switch-c.adb, usage.adb, atree.adb, atree.ads: Minor reformatting.
8002 2014-01-21 Thomas Quinot <quinot@adacore.com>
8004 * atree.adb, atree.ads (Num_Extension_Nodes): Switch to Node_Id, since
8005 this is value is used in Node_Id arithmetic operations.
8006 (Copy_Node, Exchange_Entities): Use loops indexed by Num_Extension_Nodes
8007 instead of hard-coded unrolled code.
8009 2014-01-21 Yannick Moy <moy@adacore.com>
8011 * gnat1drv.adb: Minor code cleanup, removing useless code.
8013 2014-01-21 Arnaud Charlet <charlet@adacore.com>
8015 * opt.ads (SPARK_Switches_File_Name): New.
8016 * switch-c.adb (Scan_Front_End_Switches): Add handling of -gnates=xxx *
8017 * usage.adb (Usage): Document -gnates, in gnatprove mode only.
8018 * gnat_ugn.texi: Document -gnates.
8020 2014-01-21 Yannick Moy <moy@adacore.com>
8022 * errout.adb (Special_Msg_Delete): Update comment. Remove
8023 special case for GNATprove which should not ignore mismatch
8024 in sizes for representation clauses.
8025 * sem_prag.adb (Analyze_Pragma): Remove special case for GNATprove
8026 which should not ignore pragma Pack.
8028 2014-01-21 Ed Schonberg <schonberg@adacore.com>
8030 * sem_ch4.adb: Code clean up.
8032 2014-01-21 Steve Baird <baird@adacore.com>
8034 * gnat_rm.texi: Improve GNAT RM description of SPARK_Mode pragma.
8036 2014-01-21 Robert Dewar <dewar@adacore.com>
8038 * gcc-interface/gigi.h: Get Flags array address.
8039 * gcc-interface/trans.c: Acquire Flags array address.
8040 * atree.adb: Add support for Flags array and Flag0,1,2,3.
8041 * atree.ads: Add support for Flags array and Flag0,1,2,3.
8042 * atree.h: Add support for Flags array and Flag0,1,2,3.
8043 * back_end.adb: Pass Flags array address to gigi.
8045 2014-01-21 Ed Schonberg <schonberg@adacore.com>
8047 * sem_ch8.adb (Attribute_Renaming): Transfer original attribute
8048 reference to generated body so that legality checks on stream
8049 attributes are properly applied. If type is tagged and already
8050 frozen, insert generated body at the point of the renaming
8053 2014-01-21 Ed Schonberg <schonberg@adacore.com>
8055 * sem_ch12.adb: Code clean up.
8056 * sem_ch8.adb: Minor reformatting
8058 2014-01-20 Robert Dewar <dewar@adacore.com>
8060 * checks.adb: Check SPARK_Mode instead of GNATProve_Mode for
8061 converting warnings on inevitable exceptions to errors.
8062 * exp_ch4.adb: Check SPARK_Mode instead of GNATProve_Mode for
8063 converting warnings on inevitable exceptions to errors.
8064 * opt.adb (SPARK_Mode_Config): Handled like other config flags
8065 * opt.ads (SPARK_Mode_Type): Moved here from types (renamed from
8066 SPARK_Mode_Id) (SPARK_Mode_Type): Add pragma Ordered, remove
8067 SPARK_ from names (SPARK_Mode): New flag (SPARK_Mode_Config):
8068 New flag (Config_Switches_Type): Add SPARK_Mode field
8069 * sem.adb: Minor code reorganization (remove unnecessary with)
8070 * sem.ads (Scope_Stack_Entry): Add Save_SPARK_Mode field
8071 * sem_aggr.adb: Check SPARK_Mode instead of GNATProve_Mode for
8072 converting warnings on inevitable exceptions to errors.
8073 * sem_attr.adb: Check SPARK_Mode instead of GNATProve_Mode for
8074 converting warnings on inevitable exceptions to errors.
8075 * sem_ch3.adb: Check SPARK_Mode instead of GNATProve_Mode for
8076 converting warnings on inevitable exceptions to errors.
8077 * sem_ch4.adb: Check SPARK_Mode instead of GNATProve_Mode for
8078 converting warnings on inevitable exceptions to errors.
8079 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Reset SPARK_Mode
8081 * sem_ch7.adb (Analyze_Package_Body_Helper): Reset SPARK_Mode
8083 * sem_ch8.adb (Push_Scope): Save SPARK_Mode (Pop_Scope):
8085 * sem_elab.adb: Check SPARK_Mode instead of GNATProve_Mode for
8086 converting warnings on inevitable exceptions to errors.
8087 * sem_prag.adb (Get_SPARK_Mode_From_Pragma): New function
8088 (Get_SPARK_Mode_Id): Removed (Get_SPARK_Mode_Type): New name
8089 of Get_SPARK_Mode_Id
8090 * sem_prag.ads (Get_SPARK_Mode_From_Pragma): New function
8091 * sem_res.adb: Check SPARK_Mode instead of GNATProve_Mode for
8092 converting warnings on inevitable exceptions to errors.
8093 * sem_util.adb: Check SPARK_Mode instead of GNATProve_Mode for
8094 converting warnings on inevitable exceptions to errors.
8095 * types.ads (SPARK_Mode_Id): Moved to opt.ads and renamed
8098 2014-01-20 Ed Schonberg <schonberg@adacore.com>
8100 * sem_ch13.adb: Add semantic information to rewritten type
8103 2014-01-20 Ed Schonberg <schonberg@adacore.com>
8105 * exp_ch5.adb (Expand_N_Assignment_Statement): If both sides
8106 are of a type with unknown discriminants, convert both to the
8107 underlying view of the type, so that the proper constraint check
8108 can be applied to the right-hand side.
8110 2014-01-20 Robert Dewar <dewar@adacore.com>
8112 * atree.adb (Copy_Node): Fix failure to copy last component
8113 (Exchange_Entities): Fix failure to exchange last entity
8115 2014-01-20 Ed Schonberg <schonberg@adacore.com>
8117 * sem_ch12.adb: Code clean up.
8119 2014-01-20 Robert Dewar <dewar@adacore.com>
8121 * gnat_rm.texi, sem_ch4.adb: Minor reformatting.
8123 2014-01-20 Ed Schonberg <schonberg@adacore.com>
8125 * sem_ch4.adb (Analyze_Quantified_Expression): If after
8126 pre-analysis the loop parameter specification has been
8127 rewritten as a iterator specification, propagate the change to
8128 the quantified expression, for ASIS navigtion needs.
8130 2014-01-20 Vincent Celier <celier@adacore.com>
8132 * par-ch10.adb: Minor error message change: escape [ and ].
8134 2014-01-20 Robert Dewar <dewar@adacore.com>
8136 * checks.adb: Make warnings on exceptions into errors in GNATprove mode.
8137 * errout.adb: Implement [ and ] insertion characters.
8138 * errout.ads: Document new [ and ] insertion characters.
8139 * sem_ch12.adb, restrict.adb, frontend.adb, exp_ch7.adb: Minor
8140 addition of ??? comment.
8141 * lib-xref.adb, exp_util.adb, gnat1drv.adb: Minor reformatting
8142 * exp_ch4.adb, sem_ch3.adb, sem_ch4.adb, sem_ch6.adb, sem_elab.adb,
8143 sem_eval.adb, sem_res.adb, sem_util.adb, sem_attr.adb, sem_aggr.adb:
8144 Make warnings on exceptions into errors in GNATprove mode.
8145 * sem_dim.adb: Minor reformatting throughout Quote [ and ]
8148 2014-01-20 Ed Schonberg <schonberg@adacore.com>
8150 * sem_ch13.adb: Code clean up.
8152 2014-01-20 Robert Dewar <dewar@adacore.com>
8154 * errout.ads, errout.adb: Implement >? >x? >X? sequences in error
8156 * sem_ch6.adb (Check_Statement_Sequence): Missing return is an
8157 error in GNATprove mode.
8159 2014-01-20 Ed Schonberg <schonberg@adacore.com>
8161 * par-ch4.adb (Is_Parameterless_Attribute): The Ada2012 attribute
8162 reference 'Old takes no parameters, and thus can appear as a
8165 2014-01-20 Eric Botcazou <ebotcazou@adacore.com>
8167 * exp_aggr.adb: Fix minor typos.
8169 2014-01-20 Ed Schonberg <schonberg@adacore.com>
8171 * sem_attr.adb (Analyze_Attribute, case 'Constrained): In an
8172 instance the attribute is legal, and its value is determined
8173 statically if the type has no discriminants. This choice is
8174 more useful than rechecking the legality rule in the instance,
8175 is consistent with older usage, and is also consistent with all
8178 2014-01-20 Arnaud Charlet <charlet@adacore.com>
8180 * sem_cat.adb (Validate_Static_Object_Name): Change error into
8181 warning in Relaxed_Semantic_Mode.
8183 2014-01-20 Ed Schonberg <schonberg@adacore.com>
8185 * sem_attr.adb: Code and comments cleanup.
8187 2014-01-20 Yannick Moy <moy@adacore.com>
8189 * debug.adb Free debug flags -gnatd.D, -gnatd.G and -gnatd.V *
8190 * errout.adb (Compilation_Errors): Remove special handling in
8192 * gnat1drv.adb (Adjust_Global_Switches): Remove handling of the
8193 removed debug flags.
8194 * gnat_rm.texi: Initial documentation for Abstract_State, Depends,
8195 Global, Initial_Condition, Initializes and Refined_State pragmas and
8197 * opt.ads (Frame_Condition_Mode, Formal_Extensions,
8198 SPARK_Strict_Mode): Remove global flags.
8199 * sem_ch3.adb (Analyze_Object_Declaration): Check of no hidden state
8200 always performed now, on packages declaring a null state.
8201 (Signed_Integer_Type_Declaration): Remove ill-designed attempt
8202 at providing pedantic mode for bounds of integer types.
8203 * sem_ch4.adb (Analyze_Quantified_Expression): Warning on suspicious
8204 "some" quantified expression now issued under control of -gnatw.t,
8205 like the other warning on unused bound variable.
8206 * sem_prag.adb (Check_Precondition_Postcondition): Remove useless test
8208 (Analyze_Pragma): Remove tests for SPARK 2014
8209 pragmas, not officially allowed by GNAT.
8211 2014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
8213 * sem_prag.adb (Analyze_Pragma): Ensure that
8214 the sole argument of pragmas Abstract_State, Contract_Cases,
8215 Depends, Global and Initializes in in aggregate form.
8216 (Analyze_Refined_Pragma): Ensure that the sole argument of
8217 pragmas Refined_Depends, Refined_Global and Refined_State is in
8219 (Ensure_Aggregate_Form): New routine.
8221 2014-01-20 Doug Rupp <rupp@adacore.com>
8223 * sem_attr.adb (Analyze_Attribute): case
8224 Attribute_Constrained => treat all prefixes as legal for Declib
8227 2014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
8229 * sem_prag.adb (Check_Mode): Reimplement the routine.
8230 (Find_Mode): New routine.
8232 2014-01-20 Robert Dewar <dewar@adacore.com>
8234 * sem_ch4.adb (Operator_Check): Handle additional
8235 Allow_Integer_Address cases.
8237 2014-01-20 Robert Dewar <dewar@adacore.com>
8239 * gnat_rm.texi (Allow_Integer_Address): Remove note about not
8240 allowed if address is non-private, no longer true.
8241 * sem_prag.adb (Analyze_Pragma, case Allow_Integer_Address):
8242 Remove check for address being private, causes difficulty when
8243 pragma used in gnat.adc file and is not needed, since we guard
8244 this in Address_Integer_Convert_OK.
8245 * exp_ch7.adb: Minor reformatting.
8246 * sem_ch4.adb: Handle operator operands in Allow_Integer_Address mode.
8248 2014-01-20 Robert Dewar <dewar@adacore.com>
8250 * checks.adb (Apply_Range_Check): Remove gnatprove special
8251 casing of exponentiation.
8252 * sem_res.adb (Resolve_Op_Expon): Apply range check to right
8253 operand for integer case to check range against Natural.
8255 2014-01-20 Robert Dewar <dewar@adacore.com>
8257 * s-tataat.adb: Minor reformatting.
8259 2014-01-20 Robert Dewar <dewar@adacore.com>
8261 * einfo.adb (Is_Descendent_Of_Address): Now applies to all
8262 entities, and also fix documentation to remove mention of visible
8263 integer type, since this is not what the implementation does.
8264 * einfo.ads (Is_Descendent_Of_Address): Now applies to all
8265 entities, and also fix documentation to remove mention of visible
8266 integer type, since this is not what the implementation does.
8267 * gnat_rm.texi: Minor clarification of Allow_Integer_Address
8269 * sem_ch4.adb (Analyze_One_Call): Handle Allow_Integer_Address
8270 case for parameter type check.
8271 * sem_res.adb (Resolve): Use new function
8272 Address_Integer_Convert_OK.
8273 * sem_type.adb: Minor code reorganization (use Ekind_In) Minor
8274 reformatting throughout.
8275 * sem_util.adb (Address_Integer_Convert_OK): New function.
8276 * sem_util.ads: Minor reformatting (put specs in alpha order)
8277 (Address_Integer_Convert_OK): New function.
8279 2014-01-20 Thomas Quinot <quinot@adacore.com>
8281 * exp_ch7.adb (Wrap_Transient_Expression):
8282 Insertion extra conditional expression only if
8283 Opt.Suppress_Control_Flow_Optimizations is set.
8285 2014-01-20 Arnaud Charlet <charlet@adacore.com>
8287 * s-tataat.adb (Initialize_Attributes): Abort might already be
8288 deferred in Create_Task.
8290 2014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
8292 * checks.adb (Apply_Scalar_Range_Check): Flag
8293 the exponent as requiring a range check when the expression is
8296 2014-01-20 Fedor Rybin <frybin@adacore.com>
8298 * gnat_ugn.texi: Documenting --passed-tests option for gnattest.
8300 2014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
8302 * sem_util.adb (Default_Initialization): New routine.
8303 * sem_util.ads: Add new type Default_Initialization_Kind.
8304 (Default_Initialization): New routine.
8306 2014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
8308 * sem_prag.adb (Check_Mode): Correct all error
8309 message logic dealing with in/in out parameters that may appear
8310 as inputs or have a self reference.
8312 2014-01-20 Robert Dewar <dewar@adacore.com>
8314 * exp_ch9.adb, checks.adb, exp_intr.adb: Minor reformatting.
8315 * sem_res.adb (Resolve): Fix error causing infinite loop for
8316 integer used as address. Allow addresses as integers.
8318 2014-01-20 Arnaud Charlet <charlet@adacore.com>
8320 * s-osinte-linux.ads (struct_sigaction): Fix rep clause.
8322 2014-01-20 Bob Duff <duff@adacore.com>
8324 * par-ch8.adb (P_Use_Type_Clause): Detect syntax
8325 error when "use all" is not followed by "type".
8327 2014-01-20 Bob Duff <duff@adacore.com>
8329 * exp_intr.adb (Expand_Unc_Deallocation): Remove warning on abort
8332 2014-01-20 Ed Schonberg <schonberg@adacore.com>
8334 * checks.adb (Apply_Address_Clause_Check): If there is an
8335 alignment check on the expression in an address clause, and there
8336 is no local exception propagation, add an additional explanatory
8337 message to clarify the cause of previous warning.
8339 2014-01-20 Robert Dewar <dewar@adacore.com>
8341 * exp_ch7.adb: Minor reformatting.
8342 * opt.ads: Minor comment updates.
8343 * sem.adb: Minor name change Is_Main_Unit =>
8344 Is_Main_Unit_Or_Main_Unit_Spec.
8345 * sem_ch6.adb: Minor reformatting and code reorganization.
8347 2014-01-20 Bob Duff <duff@adacore.com>
8349 * gnat_ugn.texi: Update gnatpp switches.
8351 2014-01-20 Thomas Quinot <quinot@adacore.com>
8353 * exp_ch9.adb: Minor comment edit.
8355 2014-01-20 Robert Dewar <dewar@adacore.com>
8357 * gnat_rm.texi: Document that Allow_Integer_Address is permitted
8358 only if System.Address is a private type.
8359 * opt.ads (Allow_Integer_Address): No longer set by -gnates.
8360 * sem_prag.adb (Analyze_Pragma, case Allow_Integer_Address):
8361 Allowed only if type System.Address is private, since otherwise
8363 * sem_res.adb: Fix failure to properly Analyze unchecked
8364 conversions that were introduced by Allow_Integer_Address.
8365 * switch-c.adb: Remove -gnates switch.
8366 * usage.adb: Remove -gnates switch.
8367 * gnat_ugn.texi: Remove documentation of -gnates flag.
8369 2014-01-20 Ed Schonberg <schonberg@adacore.com>
8371 * sem_ch6.adb (Analyze_Expression_Function): Pre-analyze and
8372 resolve expression to perform proper name capture.
8374 2014-01-20 Ed Schonberg <schonberg@adacore.com>
8376 * sem.adb (Semantics): When saving/restoring configuration
8377 switches, the spec of a pre- defined unit that is the main unit
8378 must be treated as a predefined unit as well.
8380 2014-01-20 Thomas Quinot <quinot@adacore.com>
8382 * exp_ch7.adb (Wrap_Transient_Expression): For a Boolean
8383 expression, insert an extra conditional expression when saving
8384 the value of the expression, for the benefit of control flow
8385 graph based coverage analysis.
8386 * exp_ch3.adb: Minor reformatting.
8388 2014-01-20 Robert Dewar <dewar@adacore.com>
8390 * gnat1drv.adb: Set Allow_Integer_Address in relaxed semantics mode.
8391 * gnat_rm.texi: Document pragma Allow_Integer_Address.
8392 * gnat_ugn.texi: Document pragma Allow_Integer_Address, -gnates.
8393 * opt.ads: New flag Allow_Integer_Address.
8394 * par-prag.adb: Dummy entry for pragma Allow_Integer_Address.
8395 * sem_ch5.adb: Minor reformatting.
8396 * sem_prag.adb: Implement pragma Allow_Integer_Address.
8397 * sem_res.adb (Resolve): Allow integer address value if
8399 * sem_util.adb: Minor reformatting.
8400 * snames.ads-tmpl: Add entry for pragma Allow_Integer_Address.
8401 * switch-c.adb: Recognize flag -gnates.
8402 * usage.adb: Document flag -gnates.
8404 2014-01-20 Thomas Quinot <quinot@adacore.com>
8406 * s-tadeca.adb: Fix minor typos in comment.
8408 2014-01-20 Pascal Obry <obry@adacore.com>
8410 * s-win32.ads (FreeLibrary): New import.
8412 2014-01-20 Robert Dewar <dewar@adacore.com>
8414 * sem_res.adb, sem_cat.adb: Minor reformatting.
8415 * sem_ch11.adb (Analyze_Raise_Statement): Only give warning about
8416 assigning to OUT parameters for the current subprogram scope.
8417 * exp_ch4.adb: Minor reformatting.
8419 2014-01-20 Ed Schonberg <schonberg@adacore.com>
8421 * exp_ch4.adb (Process_Transient_Object,
8422 Find_Enclosing_Contexts): If the top-level if-expression that
8423 generated the transient object is an actual in a call, the proper
8424 Hook_Context is a construct enclosing the call.
8425 * einfo.ads: Indicate that Related_Expression is used to link a
8426 loop variable to the container expression over which the loop
8428 (Analyze_Iterator_Specification): Set the Related_Expression of
8429 the loop variable in a container element iterator.
8430 (Note_Possible_Modification): If the variable is the loop
8431 variable in a container element iterator, indicate that the
8432 enclosing container is also modified.
8434 2014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
8436 * aspects.adb (Move_Or_Merge_Aspects): Reimplemented.
8438 2014-01-20 Robert Dewar <dewar@adacore.com>
8440 * s-taasde.ads, gnat_ugn.texi, s-tadeca.adb, sem_res.adb, s-tadeca.ads:
8441 Minor reformatting and code clean up.
8443 2014-01-20 Arnaud Charlet <charlet@adacore.com>
8445 * sem_cat.adb (Validate_Object_Declaration): Relax semantics
8446 of objects of private type if Relaxed_RM_Semantics.
8448 2014-01-20 Claire Dross <dross@adacore.com>
8450 * a-cofove.ads (Vector): Capacity discriminant
8451 should be in range of the index.
8453 2014-01-20 Thomas Quinot <quinot@adacore.com>
8455 * a-caldel.ads(To_Duration), s-taasde.ads(Time_Enqueue):
8456 Clarify specs s-tadeca.adb(Enqueue_Calendar): Compensate for
8457 possible difference between epoch of Ada.Calendar clock and Ada
8458 real-time/tasking clock.
8459 * s-taprop-posix.adb: Minor comment fix.
8461 2014-01-20 Doug Rupp <rupp@adacore.com>
8463 * sysdep.c [vxworks]: Remove Vxworks version noise for RTP.
8465 2014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
8467 * exp_attr.adb (Expand_N_Attribute_Reference): Generate validity
8468 checks on the prefix of attribute 'Old.
8469 * sem_ch3.adb (Process_Range_Expr_In_Decl): Suppress the
8470 generation of validity checks on a range that belongs to the
8471 iteration scheme of a quantified expression.
8472 * sem_ch5.adb (One_Bound): Suppress the generation of validity
8473 checks on a bound that belongs to the iteration scheme of a
8474 quantified expression, generate the check in all other cases.
8476 2014-01-20 Bob Duff <duff@adacore.com>
8478 * gnat_ugn.texi: Enable --pp-new by default. Minor reorganization.
8480 2014-01-20 Ed Schonberg <schonberg@adacore.com>
8482 * sem_res.adb (Resolve): When compiling a predefined unit, ignore
8483 interpretations that do not come from other predefined units,
8484 to prevent spurious ambiguities in the presence of user-defined
8485 operators in the context of (an instance of) a predefined unit.
8487 2014-01-20 Robert Dewar <dewar@adacore.com>
8489 * gnat_rm.texi: Document that Loop_Variant is included in
8490 Statement_Assertions.
8491 * sem_prag.adb (Check_Kind): Add Loop_Variant to
8492 Statement_Assertions (Check_Applicable_Policy): Add Loop_Variant
8493 to Statement_Assertions.
8495 2014-01-20 Doug Rupp <rupp@adacore.com>
8497 * sysdep.c (__gnat_is_file_not_found_error) [vxworks6]: Add case
8498 for errno ENOENT from RTP on NFS mounted file system.
8500 2014-01-20 Ed Schonberg <schonberg@adacore.com>
8502 * sem_util.adb (Check_Function_Writable_Actuals): 1) Do not
8503 examine code that does not come from source. The check does not
8504 apply to code generated for constraint checks, and such code may
8505 generate spurious error messages when compiled with expansion
8506 disabled (as in a generic unit) because side effects may not
8508 2) Make error messages more explicit: indicate the component
8509 of the construct whose value is indeterminate because of a
8510 call to a function with in-out parameter in another component,
8511 when there is no mandated order of execution between the two
8512 components (actuals, aggregate components, alternatives).
8514 2014-01-20 Robert Dewar <dewar@adacore.com>
8516 * gnat_rm.texi: Minor cleanup.
8518 2014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
8520 * sem_attr.adb (Analyze_Attribute): Attributes 'Old and 'Result
8521 can now apply to a refined postcondition.
8522 * sem_ch6.adb (Analyze_Subprogram_Contract): Remove local
8523 variable Result_Seen. Add variables Case_Prag, Post_Prag,
8524 Seen_In_Case and Seen_In_Post. Update the mechanism that detects
8525 whether postconditions and/or constract-cases mention attribute
8526 'Result and introduce a post-state when applied to functions.
8527 (Check_Result_And_Post_State): Removed.
8528 * sem_prag.adb (Analyze_Pragma): Add local variable
8529 Result_Seen. Verify that the expression of pragma Refined_Post
8530 mentions attribute 'Result and introduces a post-state.
8531 * sem_util.ads, sem_util.adb (Check_Result_And_Post_State): New routine.
8533 2014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
8535 * exp_ch7.adb (Is_Subprogram_Call): New routine.
8536 (Process_Transient_Objects): Make variable Must_Hook global with
8537 respect to all locally declared subprograms. Search the context
8538 for at least one subprogram call.
8539 (Requires_Hooking): Removed.
8541 2014-01-20 Claire Dross <dross@adacore.com>
8543 * a-cfdlli.ads a-cfhama.ads a-cfhase.ads a-cforma.ads
8544 * a-cforse.ads a-cofove.ads: Add pragma Annotate (GNATprove,
8545 External_Axiomatization);
8547 2014-01-20 Robert Dewar <dewar@adacore.com>
8549 * sem_attr.adb (Analyze_Attribute, case Loop_Entry): Allow
8550 Loop_Entry in Assert, Assert_And_Cut, and Assume pragmas.
8551 * sem_prag.adb (Analyze_Pragma, case Assert[_And_Cut], Assume):
8552 Allow Loop_Entry to be used in these pragmas if they appear in
8553 an appropriate context.
8554 (Placement_Error): Specialize error
8555 message for pragma Assert[_And_Cut] or pragma Assume containing
8556 Loop_Entry attribute.
8557 * a-exexpr-gcc.adb, sinput.adb: Minor reformatting.
8558 * s-excmac-arm.ads, s-except.ads, s-excmac-gcc.ads: Minor reformatting
8561 2014-01-20 Robert Dewar <dewar@adacore.com>
8563 * gnat1drv.adb: Minor comment update.
8565 2014-01-20 Tristan Gingold <gingold@adacore.com>
8567 * raise-gcc.c (PERSONALITY_FUNCTION/arm): Remove unused
8568 variables, comment out unused code.
8569 * a-exexpr-gcc.adb: Move declarations to s-excmac-gcc.ads
8570 * s-excmac-gcc.ads: New file, extracted from a-exexpr-gcc.adb
8571 * s-excmac-arm.ads: New file.
8573 2014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
8575 * exp_ch4.adb (Expand_N_Slice): Remove constant D and variables
8576 Drange and Index_Typ. Remove the circuitry which creates a
8577 range check to compare the index type of the array against the
8579 * sem_res.adb (Resolve_Slice): Add local variable Dexpr. Update
8580 the circuitry which creates a range check to handle a
8581 discrete_range denoted by a subtype indication.
8583 2014-01-20 Pierre-Marie Derodat <derodat@adacore.com>
8585 * sinput.adb, sinput.ads (Sloc_Range): Traverse the tree of original
8586 nodes to get the original sloc range.
8588 2014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
8590 * sem_prag.adb (Analyze_Pragma): Use Defining_Entity to obtain the
8591 entity of a [library level] package.
8593 2014-01-20 Tristan Gingold <gingold@adacore.com>
8595 * raise-gcc.c (exception_class_eq): New function.
8596 (is_handled_by): Use it to compare exception classes.
8597 (PERSONALITY_STORAGE): Define. (continue_unwind): New function to
8598 be called to return URC_CONTINUE_UNWIND.
8599 (personality_body): New function, extracted from PERSONALITY_ROUTINE.
8600 (PERSONALITY_ROUTINE): Add an implementation for the ARM unwinder.
8602 2014-01-20 Robert Dewar <dewar@adacore.com>
8604 * opt.ads: Minor comment update.
8606 2014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
8608 * exp_ch4.adb (Expand_N_Slice): Relocate some variables and
8609 constants to the "Local variables" area. Add new constant D. Add
8610 new variables Drange and Index_Typ. Rename Pfx to Rep and Ptp
8611 to Pref_Typ and update all occurrences. Add circuitry to extract
8612 the discrete_range and the index type and build a range check.
8614 2014-01-20 Arnaud Charlet <charlet@adacore.com>
8616 * gnat1drv.adb (Adjust_Global_Switches): Enable
8617 Treat_Categorization_Errors_As_Warnings when Relaxed_RM_Semantics
8620 2014-01-20 Thomas Quinot <quinot@adacore.com>
8622 * sem_ch5.adb, sem_ch4.adb: Minor reformatting.
8624 2014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
8626 * sem_ch13.adb (Analyze_Aspect_Specifications):
8627 When aspect SPARK_Mode appears on a package body, insert the
8628 generated pragma at the top of the body declarations.
8630 2014-01-20 Robert Dewar <dewar@adacore.com>
8632 * sem_aggr.adb, exp_prag.adb, sem_aux.adb, sinfo.ads, sem_ch10.adb,
8633 checks.adb, sem_prag.adb, sem_ch12.adb, freeze.adb, g-arrspl.adb,
8634 expander.adb, gnat1drv.adb, exp_ch4.adb, sem_ch6.adb,
8635 sem_ch8.adb, exp_dist.adb: Minor reformatting.
8637 2014-01-20 Yannick Moy <moy@adacore.com>
8639 * gnat1drv.adb (Gnat1drv): Call Write_ALI with Object=True in GNATprove
8642 2014-01-20 Pascal Obry <obry@adacore.com>
8644 * g-arrspl.ads (Slice_Set): New definition (will use a copy on
8646 * g-arrspl.adb: Adapt all routine to this new implementation.
8647 (Set): Copy the Slice_Set definition before reusing it.
8649 2014-01-20 Arnaud Charlet <charlet@adacore.com>
8651 * sem_prag.adb (Process_Import_Or_Interface): In
8652 Relaxed_RM_Semantics, support old Ada 83 style of pragma Import.
8653 (Analyze_Pragma): Ditto for pragma Export.
8654 * exp_prag.adb (Expand_Pragma_Import_Or_Interface): Handle old pragma
8657 2014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
8659 * einfo.ads: E_Abstract_State is now part of the entities that
8660 can be overloaded. Update type Overloadable_Kind to reflect the
8661 inclusion of abstract states.
8662 * sem_ch6.adb (New_Overloaded_Entity): A function can now
8663 overload an abstract state.
8664 * sem_prag.adb (Analyze_Constituent): Handle the overloading
8665 of states by functions. Use Entity_Of to obtain the entity of
8666 a constituent. (Analyze_Global_Item): Handle the overloading of
8667 states by functions.
8668 (Analyze_Initialization_Item): Handle the
8669 overloading of states by functions. Use Entity_Of to obtain the
8671 (Analyze_Input_Item): Handle the overloading
8672 of states by functions. Use Entity_Of to obtain the entity of an item.
8673 (Analyze_Input_Output): Handle the overloading of states by functions.
8674 (Analyze_Refinement_Clause): Handle the overloading
8675 of states by functions. Use Entity_Of to obtain the entity of an item.
8676 (Appears_In): Use Entity_Of to obtain the entity of an element.
8677 (Check_Usage): Use Entity_Of to obtain the entity of
8678 an item. Add a guard to prevent a crash due to a previous error.
8679 (Resolve_State): New routine.
8681 2014-01-20 Yannick Moy <moy@adacore.com>
8683 * spark_xrefs.ads, debug.adb, gnat1drv.adb, errout.adb, errout.ads,
8684 opt.ads: Minor comments updates.
8686 2014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
8688 * einfo.adb (Non_Limited_View): Applies to abstract states.
8689 (Set_From_Limited_With): Applies to abstract states.
8690 (Set_Non_Limited_View): Applies to abstract states.
8691 (Write_Field17): Output the non-limited view of an abstract state.
8692 * einfo.ads: Update the comment on usage and occurrences in
8693 nodes for attributes From_Limited_With and Non_Limited_View.
8694 * sem_aux.adb (Available_View): This routine can now handle
8696 * sem_aux.ads (Available_View): This routine can now handle
8697 abstract states. Update the comment on usage.
8698 * sem_ch8.adb (Find_Expanded_Name): Handle abstract views
8699 of states and variables.
8700 (In_Pragmas_Depends_Or_Global): New routine.
8701 * sem_ch10.adb (Build_Limited_Views): Implement
8702 abstract (limited) views of variables and states.
8703 (Build_Shadow_Entity): This routine is now a procedure. Add
8704 formal parameter Shadow. Update the comment on usage. Add
8705 context-specific decoration for states and variables.
8706 (Decorate_State): New routine. (Decorate_Variable): New routine.
8707 (Find_And_Process_States): New routine.
8708 (Process_Declarations): Renamed to Process_Declarations_And_States.
8709 (Process_Declarations_And_States): Add formal parameters
8710 Pack and Create_Abstract_Views. Update the comment on usage.
8711 (Process_States): New routine.
8712 * sem_prag.adb (Check_Dependency_Clause): Handle abstract
8713 views of states and variables. Match the abstract view of a state
8714 against its corresponding non-abstract view.
8715 (Is_Matching_Input):
8716 Handle abstract views of states and variables. Match the abstract
8717 view of a state against its corresponding non-abstract view.
8718 (Process_Global_Item): Handle abstract views of states and
8721 2014-01-20 Bob Duff <duff@adacore.com>
8723 * sem_ch10.adb (Expand_With_Clause): Don't
8724 recurse on the prefix if the current with-ed name refers to a
8725 package that renames its own parent, eg "package P.Q renames P;".
8727 2014-01-20 Yannick Moy <moy@adacore.com>
8729 * exp_spark.adb (Expand_SPARK_Call): Remove procedure.
8730 * opt.adb, opt.ads (Full_Expander_Active): Remove function.
8731 * checks.adb, exp_ch6.adb, exp_ch9.adb, exp_disp.adb, sem_aggr.adb,
8732 * sem_ch10.adb, sem_ch5.adb, sem_ch6.adb, sem_ch8.adb, sem_ch9.adb,
8733 * sem_disp.adb, sem_res.adb Replace Full_Expander_Active by
8736 2014-01-20 Yannick Moy <moy@adacore.com>
8738 * sinfo.ads Update documentation of GNATprove mode.
8740 2014-01-20 Yannick Moy <moy@adacore.com>
8742 * adabkend.adb, ali-util.adb, errout.adb, exp_ch7.adb,
8743 * exp_dbug.adb, freeze.adb, lib-xref.adb, restrict.adb,
8744 * sem_attr.adb, sem_ch4.adb, sem_ch5.adb, sem_ch6.adb, sem_ch8.adb,
8745 * sem_prag.adb, sem_res.adb, sem_util.adb Rename SPARK_Mode into
8747 * sem_ch13.adb: Remove blank.
8748 * exp_spark.adb, exp_spark.ads (Expand_SPARK_Call): Only replace
8749 subprograms by alias for renamings, not for inherited primitive
8751 * exp_util.adb (Expand_Subtype_From_Expr): Apply the expansion
8753 (Remove_Side_Effects): Apply the removal in
8754 GNATprove mode, for the full analysis of expressions.
8755 * expander.adb (Expand): Call the light SPARK expansion in GNATprove
8757 (Expander_Mode_Restore, Expander_Mode_Save_And_Set): Ignore
8758 save/restore actions for Expander_Active flag in GNATprove mode,
8759 similar to what is done in ASIS mode.
8760 * frontend.adb (Frontend): Generic bodies are instantiated in
8762 * gnat1drv.adb (Adjust_Global_Switches): Set operating
8763 mode to Check_Semantics in GNATprove mode, although a light
8764 expansion is still performed.
8765 (Gnat1drv): Set Back_End_Mode to
8766 Declarations_Only in GNATprove mode, and later on special case
8767 the GNATprove mode to continue analysis anyway.
8768 * lib-writ.adb (Write_ALI): Always generate ALI files in
8770 * opt.adb, opt.ads (Full_Expander_Active): Make it equivalent to
8772 (SPARK_Mode): Renamed as GNATprove_Mode.
8773 * sem_aggr.adb (Aggregate_Constraint_Checks): Add checks in the
8774 tree in GNATprove_Mode.
8775 * sem_ch12.adb (Analyze_Package_Instantiation): Always instantiate
8776 body in GNATprove mode.
8777 (Need_Subprogram_Instance_Body): Always instantiate body in GNATprove
8779 * sem_ch3.adb (Constrain_Index, Process_Range_Expr_In_Decl):
8780 Make sure side effects are removed in GNATprove mode.
8782 2014-01-20 Eric Botcazou <ebotcazou@adacore.com>
8784 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Robustify tests
8785 for aliased objects with an unconstrained nominal subtype.
8786 * gcc-interface/trans.c (Call_to_gnu): Likewise.
8787 (gnat_to_gnu) <case N_Op_Not>: Robustify test for private type.
8788 <case N_Op_Minus>: Remove useless code.
8789 (Exception_Handler_to_gnu_zcx): Minor tweaks.
8791 2014-01-20 Eric Botcazou <ebotcazou@adacore.com>
8793 * gcc-interface/decl.c (gnat_to_gnu_entity) <case E_Record_Subtype>:
8794 Tidy up. For a subtype with discriminants and variant part, if a
8795 variant is statically selected and the fields all have a constant
8796 position, put them in order of increasing position. Likewise if
8797 no variant part but representation clause is present.
8798 * gcc-interface/utils.c (make_packable_type): Robustify.
8799 (maybe_pad_type): Use local variable and tidy up condition. If no
8800 alignment is specified, use the original one.
8801 (create_type_stub_decl): Minor tweak.
8802 (convert) <case VECTOR_CST>: Fix typo.
8803 <case CONSTRUCTOR>: Deal with padding types around the same type.
8804 Do not punt on missing fields.
8805 (unchecked_convert): Call finish_record_type to lay out the special
8806 record types made for conversions from/to problematic integer types.
8807 Bump the alignment of CONSTRUCTORs before converting them to a more
8810 2014-01-20 Eric Botcazou <ebotcazou@adacore.com>
8812 * gcc-interface/decl.c (gnat_to_gnu_entity) <case E_Component>: Remove
8813 obsolete code for type_annotate_only mode, simplify code and slightly
8814 improve wording of comments.
8816 2014-01-12 Eric Botcazou <ebotcazou@adacore.com>
8819 * gcc-interface/cuintp.c (build_cst_from_int): Use 32-bit integer type
8820 as intermediate type.
8821 (UI_To_gnu): Likewise.
8823 2014-01-03 Eric Botcazou <ebotcazou@adacore.com>
8825 * gnatvsn.ads (Current_Year): Bump to 2014.
8827 2014-01-02 Tobias Burnus <burnus@net-b.de>
8829 * gnat_ugn.texi: Bump @copying's copyright year.
8831 Copyright (C) 2014 Free Software Foundation, Inc.
8833 Copying and distribution of this file, with or without modification,
8834 are permitted in any medium without royalty provided the copyright
8835 notice and this notice are preserved.