]> git.ipfire.org Git - thirdparty/gcc.git/blob - gcc/ada/ChangeLog
[multiple changes]
[thirdparty/gcc.git] / gcc / ada / ChangeLog
1 2014-07-29 Doug Rupp <rupp@adacore.com>
2
3 * sigtramp-armvxw.c: Enhance to handle RTP trampolining.
4 * init.c: Remove guard on sigtramp for ARM VxWorks RTP.
5
6 2014-07-29 Vincent Celier <celier@adacore.com>
7
8 * switch-c.adb (Scan_Front_End_Switches): Do not fail when two
9 runtime directorie specified with two switches --RTS= designate
10 the same directory, even when there are no literarily the same.
11
12 2014-07-29 Robert Dewar <dewar@adacore.com>
13
14 * gnat_ugn.texi: Minor documentation clarification.
15 * switch-c.adb: Minor reformatting.
16
17 2014-07-29 Robert Dewar <dewar@adacore.com>
18
19 * sem_prag.adb (Analyze_Pragma, case Allow_Integer_Address):
20 Fix incorrect RTE call which caused bomb if pragma was in
21 configuration pragma file.
22
23 2014-07-29 Jerome Lambourg <lambourg@adacore.com>
24
25 * expect.c (__gnat_expect_poll): Fix typo in previous change.
26 * g-expect.adb: Update comments.
27
28 2014-07-29 Arnaud Charlet <charlet@adacore.com>
29
30 * s-parame-hpux.ads, s-parame-vms-ia64.ads, s-parame.ads
31 (Default_Attribute_Count): Bump to 16 on native platforms.
32
33 2014-07-29 Ed Schonberg <schonberg@adacore.com>
34
35 * sem_res.adb: Add guard to front-end inlining for SPARK.
36
37 2014-07-29 Robert Dewar <dewar@adacore.com>
38
39 * sem_ch10.adb, debug.adb, sem_prag.adb, sem_res.adb, sem_ch6.adb:
40 Minor reformatting.
41
42 2014-07-29 Ed Schonberg <schonberg@adacore.com>
43
44 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Build body to
45 inline in GNATprove mode when subprogran is marked Inline_Always.
46 * sem_res.adb (Resolve_Call): Expand call in place in GNATProve
47 mode if body to inline is available.
48 * sem_prag.adb (Analyze_Pragma, case Inline_Always): Make pragma
49 effective in GNATprove mode.
50 * sem_ch10.adb (Analyze_Compilation_Unit): Call
51 Check_Package_Body_For_Inlining in GNATprove mode, so that body
52 containing subprograms with Inline_Always can be available before
53 calls to them.
54
55 2014-07-29 Ed Schonberg <schonberg@adacore.com>
56
57 * inline.ads, inline.adb, sem_ch10.adb: Rename Check_Body_For_Inlining
58 to Check_Package_Body_For_Inlining, to prevent confusion with other
59 inlining subprograms.
60
61 2014-07-29 Robert Dewar <dewar@adacore.com>
62
63 * opt.ads: Minor comment update.
64 * sem_attr.adb (Uneval_Old_Msg): Deal with case of aspect, where
65 we want setting of Uneval_Old at time of encountering the aspect.
66 * sem_ch13.adb (Analyze_Aspect_Specifications): Capture setting
67 of Opt.Uneval_Old.
68 * sinfo.adb (Uneval_Old_Accept): New function (Uneval_Old_Warn):
69 New function (Set_Uneval_Old_Accept): New procedure.
70 (Set_Uneval_Old_Warn): New procedure.
71 * sinfo.ads: Uneval_Old_Accept: New flag Uneval_Old_Warn: New flag.
72
73 2014-07-29 Robert Dewar <dewar@adacore.com>
74
75 * sinfo.ads, inline.adb, inline.ads, sem_ch6.adb: Minor reformatting.
76 * snames.ads-tmpl: Minor reformatting.
77 * xsnamest.adb (XSnamesT): Remove special casing of Name_Error
78 to give <Error>. Not clear why this was there, but the compiler
79 sources do not reference Name_Error, and this interfered with
80 the circuits for pragma Unevaluated_Use_Of_Old.
81
82 2014-07-29 Hristian Kirtchev <kirtchev@adacore.com>
83
84 * sem_prag.adb (Process_Atomic_Shared_Volatile): Allow volatile
85 types in SPARK 2014 (again).
86 * sem_res.adb (Is_OK_Volatile_Context): New routine.
87 (Resolve_Entity_Name): Ensure that a volatile object with
88 enabled properties Async_Writers or Effectire_Reads appears in
89 a non-interfering context.
90
91 2014-07-29 Ed Schonberg <schonberg@adacore.com>
92
93 * sem_ch6.adb: Move Build_Body_To_Inline,
94 Check_And_Buid_Body_To_Inline, and Cannot_Inline to package Inline.
95 * exp_ch6.adb: Mode Expand_Inlined_Body to package Inline.
96 * inline.ads, inline.adb: Package now contains subprograms that
97 implement front-end inlining. No functional changes, no test
98 needed.
99
100 2014-07-29 Robert Dewar <dewar@adacore.com>
101
102 * exp_dbug.adb, g-expect.adb, sem_elab.adb: Minor typo fix.
103
104 2014-07-29 Ed Schonberg <schonberg@adacore.com>
105
106 * sem_ch6.adb (Analyze_Return_Type): Reject a return type that
107 is a limited view when the context is a package body, because
108 there is no subsequent place at which the non-limited view may
109 become visible.
110 (Process_Formals): Ditto.
111 * sinfo.ads, par-ch3.adb: Minor reformatting.
112
113 2014-07-29 Jerome Lambourg <lambourg@adacore.com>
114
115 * expect.c (__gnat_expect_poll): New parameter dead_process
116 used to return the dead process among the array of file
117 descriptors. The Windows, VMS and HPUX implementations now
118 properly report the dead process via this parameter. Other unixes
119 don't need it.
120 * g-expect.adb (Poll): Adapt to the C profile.
121 (Expect_Internal): Use the new parameter to properly close the
122 File Descriptor. This then can be properly reported by the
123 function First_Dead_Process as is expected.
124
125 2014-07-29 Robert Dewar <dewar@adacore.com>
126
127 * gnat_ugn.texi: Minor clarification of -gnatQ switch.
128
129 2014-07-29 Robert Dewar <dewar@adacore.com>
130
131 * einfo.adb (Derived_Type_Link): New function
132 (Set_Derived_Type_Link): New procedure.
133 (Write_Field31_Name): Output Derived_Type_Link.
134 * einfo.ads: New field Derived_Type_Link.
135 * exp_ch6.adb (Expand_Call): Warn if change of representation
136 needed on call.
137 * sem_ch13.adb: Minor addition of ??? comment.
138 (Rep_Item_Too_Late): Warn on case that is legal but could cause an
139 expensive implicit conversion.
140 * sem_ch3.adb (Build_Derived_Type): Set Derived_Type_Link if needed.
141
142 2014-07-29 Hristian Kirtchev <kirtchev@adacore.com>
143
144 * exp_ch3.adb (Build_Init_Procedure): Renamed Local_DF_Id
145 to DF_Id. Add new local variable DF_Call. Do not perform any
146 elaboration-related checks on the call to the partial finalization
147 routine within an init proc to avoid generating bogus elaboration
148 warnings on expansion-related code.
149 * sem_elab.adb (Check_A_Call): Move constant Access_Case to
150 the top level of the routine. Ensure that Output_Calls takes
151 into account flags -gnatel and -gnatwl when emitting warnings
152 or info messages.
153 (Check_Internal_Call_Continue): Update the call to Output_Calls.
154 (Elab_Warning): Moved to the top level of routine Check_A_Call.
155 (Emit): New routines.
156 (Output_Calls): Add new formal parameter Check_Elab_Flag along with a
157 comment on usage. Output all warnings or info messages only when the
158 caller context demands it and the proper elaboration flag is set.
159
160 2014-07-29 Yannick Moy <moy@adacore.com>
161
162 * sem_attr.adb (Analyze_Attribute/Attribute_Old):
163 Check rule about Old appearing in potentially unevaluated
164 expression everywhere, not only in Post.
165
166 2014-07-29 Arnaud Charlet <charlet@adacore.com>
167
168 * sem_prag.adb: Update comment.
169 * a-except.adb, a-except-2005.adb: Minor editing.
170
171 2014-07-29 Pierre-Marie Derodat <derodat@adacore.com>
172
173 * exp_dbug.adb (Debug_Renaming_Declaration):
174 Do not create renaming entities for renamings of non-packed
175 objects and for exceptions.
176
177 2014-07-29 Robert Dewar <dewar@adacore.com>
178
179 * sem_ch3.adb, sinfo.ads, types.ads, sem_prag.adb, a-except-2005.adb,
180 sem_ch6.adb, par-ch3.adb: Minor reformatting.
181
182 2014-07-29 Ed Schonberg <schonberg@adacore.com>
183
184 * sem_ch6.adb (Check_Return_Subtype_Indication): Reject a return
185 subtype indication in an extended return statement when the
186 return value is an ancestor of the return type of the function,
187 and that return type is a null record extension.
188
189 2014-07-29 Thomas Quinot <quinot@adacore.com>
190
191 * sem_ch13.adb (Rep_Item_Too_Late): Specialize/clarify error
192 message produced for the case of a type-related representation
193 item that is made illegal by 13.10(1).
194 * gnat_rm.texi (Scalar_Storage_Order): Minor change in
195 documentation.
196
197 2014-07-29 Robert Dewar <dewar@adacore.com>
198
199 * gnat_ugn.texi: Add section on Wide_Wide_Character encodings.
200 * erroutc.adb (Output_Error_Msgs): Take wide characters into
201 account in computing position of error flags.
202 * sinput.adb (Get_Column_Number): Take wide characters into
203 account.
204
205 2014-07-29 Ed Schonberg <schonberg@adacore.com>
206
207 * par-ch3.adb (P_Access_Type_Definition): The subtype indication
208 in an access type definition can carry a null_exclusion indicator.
209 * sem_ch3.adb (Access_Type_Declaration): If the subtype indication
210 carries a null_exclusion indicator, verify that the subtype
211 indication denotes an access type, and create a null-excluding
212 subtype for it.
213 * sinfo.ads, sinfo.adb: New attribute Null_Excluding_Subtype,
214 defined on N_Access_To_Object_Definition to indicate that the
215 subtype indication carries a null_exclusion indicator.
216
217 2014-07-29 Hristian Kirtchev <kirtchev@adacore.com>
218
219 * exp_ch6.adb (Add_Extra_Actual): Do not construct
220 the extra actual by name, generate a reference instead.
221
222 2014-07-29 Arnaud Charlet <charlet@adacore.com>
223
224 * sem_prag.adb (Analyze_Pragma): Do not crash analyzing
225 Allow_Integer_Address if already set.
226 * a-except-2005.adb (Rcheck_PE_Stream_Operation_Not_Allowed):
227 Fix order, for consistency with Rmsg_xx declarations.
228
229 2014-07-29 Ed Schonberg <schonberg@adacore.com>
230
231 * sem_ch4.adb (Complete_Object_Operation): If the type of the
232 candidate subprogram is a limited view, use non-limited view
233 when available.
234
235 2014-07-29 Robert Dewar <dewar@adacore.com>
236
237 * sem_ch13.adb: Minor change in RM reference.
238 * sem_mech.ads: Minor reformatting.
239 * einfo.ads: Minor comment fix.
240 * types.ads: Minor correction to range given for Mechanism_Type.
241 * exp_ch6.adb (Add_Invariant_And_Predicate_Checks): Do not
242 check predicate on way out for OUT or IN OUT parameters.
243 * par-ch3.adb (P_Constraint_Opt): Handle missing RANGE keyword
244 better (P_Range_Constraint): Corresponding fix.
245 * checks.ads: Minor comment clarification.
246
247 2014-07-29 Gary Dismukes <dismukes@adacore.com>
248
249 * sem_ch8.adb (Analyze_Object_Renaming): Set the Is_Volatile
250 and Treat_As_Volatile flags based on whether the renamed object
251 is a volatile object.
252
253 2014-07-29 Olivier Hainque <hainque@adacore.com>
254
255 * g-debpoo.adb
256 (Default_Alignment): Rename as Storage_Alignment. This is not
257 a "default" that can be overriden. Augment comment to clarify
258 intent and document why we need to manage alignment padding.
259 (Header_Offset): Set to Header'Object_Size instead of 'Size
260 rounded up to Storage_Alignment. Storage_Alignment on the
261 allocation header is not required by our internals so was
262 overkill. 'Object_Size is enough to ensure proper alignment
263 of the header address when substracted from a storage address
264 aligned on Storage_Alignment.
265 (Minimum_Allocation): Rename as Extra_Allocation, conveying that
266 this is always added on top of the incoming allocation requests.
267 (Align): New function, to perform alignment rounding operations.
268 (Allocate): Add comments on the Storage_Address computation
269 scheme and adjust so that the alignment padding applies to that
270 (Storage_Address) only.
271
272 2014-07-29 Robert Dewar <dewar@adacore.com>
273
274 * exp_ch3.adb (Default_Initialize_Object): Remove incorrect
275 pragma Unreferenced.
276 * cstand.adb (Create_Standard): Use E_Array_Type for standard
277 string types. Make sure index of Any_String/Any_Array is in a list.
278 * errout.adb: Minor reformatting.
279
280 2014-07-29 Robert Dewar <dewar@adacore.com>
281
282 * gnat_ugn.texi: Clean up and correct documentation of warnings.
283 * usage.adb: Minor corrections to make sure warnings are properly
284 documented.
285 * warnsw.adb (Set_Warning_Switch): Remove redundant return statement.
286 (WA_Warnings): Add Warn_On_Suspicious_Modulus_Value.
287
288 2014-07-29 Ed Schonberg <schonberg@adacore.com>
289
290 * exp_ch3.adb (Expand_N_Object_Declaration): The dummy block
291 created to match internal sequence numbers between compilations
292 with/without abort must have its type properly set.
293
294 2014-07-29 Robert Dewar <dewar@adacore.com>
295
296 * ali.adb (Initialize_ALI): Initialize SSO_Default_Specified
297 (Scan_ALI): Set SSO_Default in ALIs_Record (Scan_ALI): Set
298 SSO_Default_Specified.
299 * ali.ads (ALIs_Record): Add field SSO_Default
300 (SSO_Default_Specified): New global switch.
301 * bcheck.adb (Check_Consistent_SSO_Default): New procedure
302 (Check_Configuration_Consistency): Call this procedure
303 * einfo.adb (SSO_Set_High_By_Default): New
304 function (SSO_Set_Low_By_Default): New function
305 (Set_SSO_Set_High_By_Default): New procedure
306 (Set_SSO_Set_Low_By_Default): New procedure (Write_Entity_Flags):
307 List new flags
308 * einfo.ads (SSO_Set_Low_By_Default): New flag
309 (SSO_Set_High_By_Default): New flag
310 * freeze.adb (Set_SSO_From_Default): New procedure
311 (Freeze_Array_Type): Call Set_SSO_From_Default
312 (Freeze_Record_Type): Call Set_SSO_From_Default
313 * gnat_rm.texi: Document pragma Default_Scalar_Storage_Order
314 * lib-writ.adb (Write_ALI): Set OL/OH in P line as needed
315 * lib-writ.ads: Add OL/OH parameters to P line
316 * opt.adb: Set Default_SSO, Default_SSO_Config as appropriate
317 * opt.ads (Default_SSO): New global switch (Default_SSO_Config):
318 New global switch
319 * repinfo.adb (List_Scalar_Storage_Order): List SSO when it is
320 set by default using pragma Default_Scalar_Storage_Order.
321 * sem.ads (Scope_Stack_Entry): Add component Save_Default_SSO
322 * sem_ch13.adb (Inherit_Delayed_Rep_Aspects):
323 Clear SSO defaults when explicit SSO is inherited.
324 (Analyze_Attribute_Definition_Clause): Clear SSO defaults when
325 explicit SSO is specified.
326 (Inherit_Aspects_At_Freeze_Point):
327 Clear SSO default when inheriting SSO.
328 * sem_ch3.adb (Set_Default_SSO): New procedure
329 (Analyze_Private_Extension_Declaration): Set defualt SSO
330 (Array_Type_Declaration): ditto (Build_Derived_Array_Type): ditto
331 (Build_Derived_Private_Type): ditto (Build_Derived_Record_Type):
332 ditto (Build_Derived_Type): ditto (Make_Class_Wide_Type): ditto
333 (Record_Type_Declaration): ditto
334 * sem_ch8.adb (Pop_Scope): Restore Default_SSO (Push_Scope):
335 Save Default_SSO
336 * sem_prag.adb (Analyze_Pragma, case
337 Default_Scalar_Storage_Order): Set Default_SSO
338
339 2014-07-29 Ed Schonberg <schonberg@adacore.com>
340
341 * sem_ch6.adb (Valid_Operator_Definition): Verify that
342 all parameter have mode IN. This check must be done here for
343 subprogram instantiations that have operator names, because their
344 analysis does not follow the same path as that for subprogram
345 declarations.
346
347 2014-07-29 Robert Dewar <dewar@adacore.com>
348
349 * freeze.adb (Freeze_Entity, Concurrent_Type case): Add a guard
350 to make sure that the Etype of a component of the corresponding
351 record type is present before trying to freeze it.
352 * sem_ch5.adb: Minor reformatting.
353
354 2014-07-29 Robert Dewar <dewar@adacore.com>
355
356 * exp_attr.adb, types.ads, types.h, exp_ch11.adb, a-except.adb,
357 a-except-2005.adb: Add new reason code PE_Stream_Operation_Not_Allowed,
358 and then use it when a stream operation is used from a library generic
359 when the restriction (No_Streams) is active.
360
361 2014-07-29 Thomas Quinot <quinot@adacore.com>
362
363 * projects.texi: Fix minor typo.
364
365 2014-07-29 Yannick Moy <moy@adacore.com>
366
367 * sem_attr.adb (Analyze_Attribute): Fix generation of warning.
368
369 2014-07-29 Arnaud Charlet <charlet@adacore.com>
370
371 * sem_ch5.adb (Check_Unreachable_Code): Do not remove code in
372 CodePeer mode.
373
374 2014-07-29 Hristian Kirtchev <kirtchev@adacore.com>
375
376 * exp_ch7.adb (Find_Last_Init): Add local variable
377 Deep_Init_Found. Check the statement immediately following the
378 declaration if [Deep_]Initialization was not found.
379
380 2014-07-29 Hristian Kirtchev <kirtchev@adacore.com>
381
382 * exp_util.adb (Is_Aliased): It appears that
383 'reference-d and renamed objects still play some role in Boolean
384 expression with actions and cannot be finalized immediately.
385
386 2014-07-29 Ed Schonberg <schonberg@adacore.com>
387
388 * exp_dbug.adb (Qualify_Needed): For debugging purposes,
389 Loop names are not part of the full qualification of entity names.
390
391 2014-07-29 Robert Dewar <dewar@adacore.com>
392
393 * einfo.adb (Has_Protected): Test base type.
394 * sem_ch4.adb (Analyze_Allocator): Reorganize code to make sure
395 that we always properly check No_Protected_Type_Allocators.
396
397 2014-07-29 Ed Schonberg <schonberg@adacore.com>
398
399 * sem_util.ads, sem_util.adb (Defining_Entity): Now applies to
400 loop declarations as well.
401 * exp_ch5.adb (Expand_Loop_Statement): Apply Qualify_Entity_Names
402 to an iterator loop, because it may contain local renaming
403 declarations that require debugging information.
404
405 2014-07-29 Robert Dewar <dewar@adacore.com>
406
407 * sem_util.ads, exp_util.adb, sem_attr.adb: Minor reformatting.
408
409 2014-07-29 Robert Dewar <dewar@adacore.com>
410
411 * einfo.ads, einfo.adb (Static_Real_Or_String_Predicate): New function
412 (Set_Static_Real_Or_String_Predicate): New procedure
413 * sem_ch13.adb (Build_Predicate_Functions): Accomodate static
414 string predicates (Is_Predicate_Static): Handle static string
415 predicates.
416 * sem_eval.adb (Real_Or_String_Static_Predicate_Matches):
417 New procedure (Check_Expression_Against_Static_Predicate):
418 Deal with static string predicates, now fully implemented
419 (Eval_Relational_Op): Allow string equality/inequality as static
420 if not comes from source.
421
422 2014-07-29 Robert Dewar <dewar@adacore.com>
423
424 * sem_aggr.adb, exp_ch5.adb, sem_ch5.adb, exp_util.adb, einfo.adb,
425 einfo.ads, sem_util.adb, sem_attr.adb, sem_case.adb, sem_eval.adb,
426 sem_eval.ads, sem_ch13.adb: General cleanup of static predicate
427 handling. Change name of Discrete_Predicate to
428 Discrete_Static_Predicate, and replace testing of the presence of this
429 field by testing the flag Has_Static_Expression.
430
431 2014-07-29 Robert Dewar <dewar@adacore.com>
432
433 * gnat_rm.texi: Document pragma Unevaluated_Use_Of_Old.
434 * opt.adb: Handle Uneval_Old.
435 * opt.ads (Uneval_Old, Uneval_Old_Config): New variables.
436 * par-prag.adb: Add dummy entry for pragma Unevaluated_Use_Of_Old.
437 * sem.ads (Save_Uneval_Old): New field in Scope_Stack_Entry.
438 * sem_attr.adb (Uneval_Old_Msg): New procedure.
439 * sem_ch8.adb (Push_Scope): Save Uneval_Old.
440 (Pop_Scope): Restore Uneval_Old.
441 * sem_prag.adb (Analyze_Pragma, case Unevaluated_Use_Of_Old):
442 Implemented.
443 * snames.ads-tmpl: Add entries for pragma Unevaluated_Use_Of_Old
444 Add entries for Name_Warn, Name_Allow.
445
446 2014-07-29 Robert Dewar <dewar@adacore.com>
447
448 * sem_aggr.adb (Resolve_Array_Aggregate): Change Is_Static_Range
449 to Is_OK_Static_Range.
450 * sem_attr.adb (Eval_Attribute): Make sure we properly flag
451 static attributes (Eval_Attribute, case Size): Handle size of
452 zero properly (Eval_Attribute, case Value_Size): Handle size of
453 zero properly.
454 * sem_ch13.adb: Minor reformatting.
455 * sem_ch3.adb (Process_Range_Expr_In_Decl): Change
456 Is_Static_Range to Is_OK_Static_Range.
457 * sem_eval.adb (Eval_Case_Expression): Total rewrite, was
458 wrong in several ways (Is_Static_Range): Moved here from spec
459 (Is_Static_Subtype): Moved here from spec Change some incorrect
460 Is_Static_Subtype calls to Is_OK_Static_Subtype.
461 * sem_eval.ads: Add comments to section on
462 Is_Static_Expression/Raises_Constraint_Error (Is_OK_Static_Range):
463 Add clarifying comments (Is_Static_Range): Moved to body
464 (Is_Statically_Unevaluated): New function.
465 * sem_util.ads, sem_util.adb (Is_Preelaborable_Expression): Change
466 Is_Static_Range to Is_OK_Static_Range.
467 * sinfo.ads: Additional commments for Is_Static_Expression noting
468 that clients should almost always use Is_OK_Static_Expression
469 instead. Many other changes throughout front end units to obey
470 this rule.
471 * tbuild.ads, tbuild.adb (New_Occurrence_Of): Set Is_Static_Expression
472 for enumeration literal.
473 * exp_ch5.adb, sem_intr.adb, sem_ch5.adb, exp_attr.adb, exp_ch9.adb,
474 lib-writ.adb, sem_ch9.adb, einfo.ads, checks.adb, checks.ads,
475 sem_prag.adb, sem_ch12.adb, freeze.adb, sem_res.adb, exp_ch4.adb,
476 exp_ch6.adb, sem_ch4.adb, sem_ch6.adb, exp_aggr.adb, sem_cat.adb:
477 Replace all occurrences of Is_Static_Expression by
478 Is_OK_Static_Expression.
479
480 2014-07-29 Hristian Kirtchev <kirtchev@adacore.com>
481
482 * exp_ch4.adb (Process_Transient_Object): Remove constant
483 In_Cond_Expr, use its initialization expression in place.
484 * exp_ch7.adb (Process_Declarations): There is no need to check
485 that a transient object being hooked is controlled as it would
486 not have been hooked in the first place.
487 * exp_util.adb (Is_Aliased): 'Reference-d or renamed transient
488 objects are not considered aliased when the related context is
489 a Boolean expression_with_actions.
490 (Requires_Cleanup_Actions): There is no need to check that a transient
491 object being hooked is controlled as it would not have been hooked in
492 the first place.
493
494 2014-07-29 Robert Dewar <dewar@adacore.com>
495
496 * errout.adb: Minor reformatting.
497
498 2014-07-29 Hristian Kirtchev <kirtchev@adacore.com>
499
500 * exp_ch3.adb (Default_Initialize_Object): Add new variables
501 Abrt_Blk and Dummy. Generate a dummy temporary when aborts are
502 not allowed to ensure the symmetrical generation of symbols.
503 * exp_ch7.adb (Build_Object_Declarations): Remove variables A_Expr
504 and E_Decl. Add new variables Decl and Dummy. Generate a dummy
505 temporary when aborts are not allowed to ensure symmertrical
506 generation of symbols.
507 * exp_intr.adb (Expand_Unc_Deallocation): Add new variable
508 Dummy. Generate a dummy temporary when aborts are not allowed
509 to ensure symmertrical generation of symbols.
510
511 2014-07-29 Ed Schonberg <schonberg@adacore.com>
512
513 * exp_dbug.adb (Debug_Renaming_Declaration): For an object
514 renaming, indicate that the renamed entity itself needs debug
515 information. This is necessary if that entity is a temporary,
516 e.g. part of the expansion of an explicit dereference in an
517 iterator.
518
519 2014-07-29 Thomas Quinot <quinot@adacore.com>
520
521 * errout.adb (Set_Error_Posted): When propagating flag to
522 an enclosing named association, also propagate to the parent
523 of that node, so that named and positional associations are
524 treated consistently.
525
526 2014-07-29 Ed Schonberg <schonberg@adacore.com>
527
528 * sem_attr.adb (Resolve_Attribute, case 'Update): Set
529 Do_Range_Check properly on array component expressions that
530 have a scalar type. In GNATprove mode, only checks on scalar
531 components must be marked by the front-end.
532
533 2014-07-29 Ed Schonberg <schonberg@adacore.com>
534
535 * sem_res.adb (Resolve_Type_Conversion): If the type of the
536 expression is a limited view, use the non-limited view when
537 available.
538
539 2014-07-29 Hristian Kirtchev <kirtchev@adacore.com>
540
541 * exp_ch4.adb (Expand_N_Case_Expression): Mark the generated
542 case statement as coming from a conditional expression.
543 (Expand_N_If_Expression): Mark the generated if statement as
544 coming from a conditional expression.
545 * exp_ch5.adb (Expand_N_Case_Statement): Do not process controlled
546 objects found in case statement alternatives when the case
547 statement is actually a case expression.
548 (Expand_N_If_Statement):
549 Do not process controlled objects found in an if statement when
550 the if statement is actually an if expression.
551 * sinfo.adb (From_Conditional_Expression): New routine.
552 (Set_From_Conditional_Expression): New routine.
553 * sinfo.ads Add new semantic flag From_Conditional_Expression and
554 update related nodes.
555 (From_Conditional_Expression): New routine along with pragma Inline.
556 (Set_From_Conditional_Expression): New routine along with pragma Inline.
557
558 2014-07-29 Hristian Kirtchev <kirtchev@adacore.com>
559
560 * exp_ch7.adb (Build_BIP_Cleanup_Stmts): Remove
561 formal parameter Obj_Id and update the comment on usage. Renamed
562 Obj_Typ to Func_Typ and update all occurrences.
563 (Find_Last_Init): Remove formal parameter Decl and update the comment
564 on usage.
565 Remove local constants Obj_Id and Obj_Typ. Remove local variables
566 Init_Typ and Is_Conc. Remove the extraction of the initialization type.
567 (Find_Last_Init_In_Block): Remove formal parameter
568 Init_Typ and update the comment on usage.
569 (Is_Init_Call): Remove formal parameter Init_Typ and update the comment
570 on usage. Check whether the procedure call is an initialization
571 procedure of either the object type or the initialization type.
572 (Is_Init_Proc_Of): New routine.
573 (Process_Object_Declaration): Obj_Id and Obj_Typ are now global to this
574 routine. Add new variable Init_Typ. Add circuitry to extract the object
575 type as well as the initialization type.
576
577 2014-07-29 Robert Dewar <dewar@adacore.com>
578
579 * sem_case.adb: Minor reformatting.
580 * sem_aux.ads: Minor reformatting.
581
582 2014-07-29 Ed Schonberg <schonberg@adacore.com>
583
584 * sinfo.adb (Set_Else_Actions, Set_Then_Actions): Set parent
585 pointer on these fields, even though they are semantic, because
586 subsequent analysis and expansion of action nades may require
587 exploring the tree, for example to locate a node to be wrapped
588 when a function with controlled result is called.
589
590 2014-07-29 Claire Dross <dross@adacore.com>
591
592 * sem_aux.adb (Get_Binary_Nkind): Use case on
593 Name_Id instead of an intermediate string.
594 (Get_Unary_Nkind): Use case on Name_Id instead of an intermediate
595 string.
596
597 2014-07-29 Sergey Rybin <rybin@adacore.com frybin>
598
599 * gnat_ugn.texi (gnatelim, gnatstub, gnatmetric): Add note
600 about processing sources with preprocessor directives.
601
602 2014-07-24 Martin Liska <mliska@suse.cz>
603
604 * gcc-interface/trans.c (finalize_nrv): Adjust function call.
605 * gcc-interface/utils.c (rest_of_subprog_body_compilation): Likewise.
606 (gnat_write_global_declarations): Likewise.
607
608 2014-07-19 David Wohlferd <dw@LimeGreenSocks.com>
609
610 * gnat_rm.texi: Clean up for makeinfo 5.2.
611
612 2014-07-19 David Wohlferd <dw@LimeGreenSocks.com>
613
614 * gnat_rm.texi (Machine Code Insertions): Clean up.
615
616 2014-07-18 Robert Dewar <dewar@adacore.com>
617
618 * exp_ch7.adb: Minor reformatting.
619
620 2014-07-18 Claire Dross <dross@adacore.com>
621
622 * sem_aux.ads (Get_Binary_Nkind): New function that returns
623 the Node_Kind value of an entity defining a binary operator.
624 (Get_Unary_Nkind): New function that returns the Node_Kind value
625 of an entity defining a unary operator.
626
627 2014-07-18 Pascal Obry <obry@adacore.com>
628
629 * sysdep.c: comment update.
630 * adaint.c (__gnat_fputwc): Use wchar_t on a limited set of
631 platforms where it is known to be supported.
632
633 2014-07-18 Thomas Quinot <quinot@adacore.com>
634
635 * sem_dist.adb (Process_Remote_AST_Declaration): Need
636 to set Fat_Type's Ekind in order to be able to use its
637 Corresponding_Remote_Type attribute.
638
639 2014-07-18 Hristian Kirtchev <kirtchev@adacore.com>
640
641 * einfo.adb Last_Aggregate_Assignment is now Node 30.
642 (Last_Aggregate_Assignment): Include
643 constants in the assertion. Update the underlying node.
644 (Set_Last_Aggregate_Assignment): Include constants in the
645 assertion. Update the underlying node. (Write_Field11_Name):
646 Remove the entry for Last_Aggregate_Assignment.
647 (Write_Field30_Name): Add an entry for Last_Aggregate_Assignment.
648 * einfo.ads Update the node designation and usage of attribute
649 Last_Aggregate_Assignment.
650 * exp_aggr.adb (Expand_Array_Aggregate): Store the last
651 assignment statement used to initialize a controlled object.
652 (Late_Expansion): Store the last assignment statement used to
653 initialize a controlled record or an array of controlled objects.
654 * exp_ch3.adb (Expand_N_Object_Declaration): Default
655 initialization of objects is now performed in a separate routine.
656 (Default_Initialize_Object): New routine.
657 * exp_ch7.adb (Build_BIP_Cleanup_Stmts): Add formal parameter
658 Obj_Id. Update the comment on usage.
659 (Find_Last_Init): Remove formal parameter Typ. Update comment on usage.
660 Reimplement the logic. (Find_Last_Init_In_Block): New routine.
661 (Is_Init_Call): Add formal parameter Init_Typ. Update the
662 comment on usage. Account for the type init proc when trying
663 to determine whether a statement is an initialization call.
664 (Make_Adjust_Call): Rename formal parameter For_Parent to
665 Skip_Self. Update all occurrences of For_Parent. Account for
666 non-tagged types. Update the call to Make_Call.
667 (Make_Call): Rename formal parameter For_Parent to Skip_Self. Update
668 comment on usage. Update all occurrences of For_Parent.
669 (Make_Final_Call): Rename formal parameter For_Parent to
670 Skip_Self. Update all occurrences of For_Parent. Account
671 for non-tagged types. Update the call to Make_Call.
672 (Process_Object_Declaration): Most variables and constants are
673 now local to the routine.
674 * exp_ch7.ads (Make_Adjust_Call): Rename formal parameter
675 For_Parent to Skip_Self. Update the comment on usage.
676 (Make_Final_Call): Rename formal parameter For_Parent to
677 Skip_Self. Update the comment on usage.
678
679 2014-07-18 Ed Schonberg <schonberg@adacore.com>
680
681 * sem_ch9.adb (Analyze_Requeue): The entry being referenced
682 can be a procedure that is implemented by entry, and have a
683 formal that is a synchronized interface. It does not have to
684 be declared as a protected operation.
685
686 2014-07-18 Robert Dewar <dewar@adacore.com>
687
688 * gnat_rm.texi: Remove mention of obsolete attributes
689 Max[_Interrupt]_Priority, which have never been implemented
690 (or at the very least were removed long ago if they ever were
691 implemented. Add documentation of Max[_Interrupt]_Priority
692 constants in package System.
693 * ttypes.ads: Document actual handling of package System,
694 rather than a historical fantasy version. Remove mention of
695 non-existent attributes Max[_Interrupt]_Priority.
696
697 2014-07-18 Pascal Obry <obry@adacore.com>
698
699 * a-witeio.adb (Put): No 16-bit character output when text
700 translation is disabled.
701 * i-cstrea.ads: Code clean up.
702
703 2014-07-18 Robert Dewar <dewar@adacore.com>
704
705 * gnat_rm.texi: Document that Wchar_T_Size and Word_Size are
706 static attributes.
707
708 2014-07-18 Arnaud Charlet <charlet@adacore.com>
709
710 * a-witeio.adb, initialize.c: Update comments. Minor clean ups.
711
712 2014-07-18 Pascal Obry <obry@adacore.com>
713
714 * adaint.c: Do not include wchar.h on VxWorks.
715 * mingw32.h: Remove obsolete definition.
716
717 2014-07-18 Pascal Obry <obry@adacore.com>
718
719 * a-textio.adb, a-witeio.adb, a-ztexio.adb: Use C_Streams Default_Text.
720 * i-cstrea.ads (Content_Encoding): Moved here, add convention C.
721 * s-ficobl.ads (Content_Encoding): Moved to C_Streams.
722 * s-fileio.adb (Open): Adjust to use Content_Encoding from C_Streams.
723
724 2014-07-18 Pascal Obry <obry@adacore.com>
725
726 * a-textio.adb: Rename Is_Text_File to Text_Encoding.
727 * a-ztexio.adb: Likewise.
728 * a-witeio.adb: Likewise.
729 (Open): Pass file's translation mode to set_text_mode.
730 * s-ficobl.ads (Content_Encoding): New type.
731 (Text_Content_Encoding): New subtype.
732 (AFCB): Rename Is_Text_File to Text_Encoding.
733 * s-fileio.adb (Open): Handles new text_translation
734 values. Remove Is_Text_File which is equivalent to Text_Encoding
735 in Text_Content_Encoding.
736 * adaint.h (__gnat_set_mode): New routine.
737 * sysdep.c (__gnat_set_wide_text_mode): Removed.
738 (__gnat_set_mode): New routine.
739
740 2014-07-18 Arnaud Charlet <charlet@adacore.com>
741
742 * gcc-interface/decl.c, gcc-interface/trans.c,
743 gcc-interface/utils.c (Is_Packed_Array_Type): Renamed
744 Is_Packed_Array_Impl_Type.
745
746 2014-07-18 Gary Dismukes <dismukes@adacore.com>
747
748 * sem_util.adb: Minor typo correction.
749
750 2014-07-18 Ben Brosgol <brosgol@adacore.com>
751
752 * gnat_rm.texi: Complete previous change.
753
754 2014-07-18 Pascal Obry <obry@adacore.com>
755
756 * s-fileio.adb: Minor style fix.
757
758 2014-07-18 Ed Schonberg <schonberg@adacore.com>
759
760 * sem_ch13.adb (Analyze_Aspect_Specifications): Detect improper
761 specification of stream attributes for subtypes that are not
762 first subtypes, to prevent malformed rep_item chains in the case
763 of such illegal specifications for discriminated private subtypes.
764 (Check_Overloaded_Name): Verify that the name is an entity name
765 before other checks.
766
767 2014-07-18 Pascal Obry <obry@adacore.com>
768
769 * adaint.c (__gnat_fputwc) Do not disable on cross-build.
770
771 2014-07-18 Robert Dewar <dewar@adacore.com>
772
773 * sem_prag.adb, sem_attr.adb,
774 sem_aggr.adb, sinfo.ads, sem_eval.ads: Minor reformatting.
775
776 2014-07-18 Pascal Obry <obry@adacore.com>
777
778 * sysdep.c (__gnat_wide_text_translation_required): Removed from here.
779 * initialize.c (__gnat_wide_text_translation_required): Defined here.
780
781 2014-07-18 Pascal Obry <obry@adacore.com>
782
783 * adaint.c (__gnat_fputwc): New routine.
784 * s-crtl.ads (fputwc): Now imported as __gnat_fputwc.
785
786 2014-07-18 Hristian Kirtchev <kirtchev@adacore.com>
787
788 * einfo.adb: Flag 270 is now used as Stores_Attribute_Old_Prefix.
789 (Set_Stores_Attribute_Old_Prefix): New routine.
790 (Stores_Attribute_Old_Prefix): New routine.
791 (Write_Entity_Flags):
792 Output flag Stores_Attribute_Old_Prefix.
793 * einfo.ads Add new flag Stores_Attribute_Old_Prefix along with
794 comment on usage.
795 (Set_Stores_Attribute_Old_Prefix): New routine
796 along with pragma Inline.
797 (Stores_Attribute_Old_Prefix): New
798 routine along with pragma Inline.
799 * exp_attr.adb (Expand_N_Attribute_Reference): Mark the generated
800 constant which captures the result of attribute 'Old's prefix.
801 * sem_util.adb (In_Assertion_Expression_Pragma): Recognize a
802 relocated expression which acted as a prefix of attribute 'Old.
803
804 2014-07-18 Bob Duff <duff@adacore.com>
805
806 * s-spsufi.adb (Finalize_And_Deallocate): Set Subpool.Owner to
807 null before dispatching to Deallocate_Subpool.
808 * s-stposu.ads (Default_Subpool_For_Pool): Change mode of
809 parameter of Default_Subpool_For_Pool to 'in out'.
810 * s-stposu.adb (Set_Pool_Of_Subpool): Use raise expression. Add
811 a message to the raise.
812 * sem_util.adb: Minor reformatting.
813
814 2014-07-18 Robert Dewar <dewar@adacore.com>
815
816 * sem_util.adb (Check_Expression_Against_Static_Predicate):
817 Mark expression as non-static if it fails static predicate check,
818 and issue additional warning.
819
820 2014-07-18 Pascal Obry <obry@adacore.com>
821
822 * a-witeio.adb (Put): Control translation based on
823 wide_text_translation_required.
824 * adaint.c (CurrentCCSEncoding): New variable.
825 * initialize.c (__gnat_initialize): On Windows initialize
826 CurrentCCSEncoding based on values in GNAT_CCS_ENCODING
827 environment variable.
828 * mingw32.h (CurrentCCSEncoding): New external.
829 (__gnat_wide_text_translation_required): Likewise.
830 * sysdep.c (wide_text_translation_required): New variable.
831 (__gnat_set_wide_text_mode): Set mode based on CurrentCCSEncoding.
832
833 2014-07-18 Hristian Kirtchev <kirtchev@adacore.com>
834
835 * sem_prag.adb (Analyze_Refined_Depends_In_Decl_Part): Remove global
836 variable Refined_States. Add global variable Matched_Items.
837 (Check_Dependency_Clause): Account for dependency
838 clauses utilizing states with visible null refinements.
839 (Is_Null_Refined_State): New routine.
840 (Match_Items): Record each successfully matched item of pragma Depends.
841 (Record_Item): New routine.
842
843 2014-07-18 Ed Schonberg <schonberg@adacore.com>
844
845 * sem_attr.adb (Analyze_Attribute, case 'Update): Set
846 Do_Range_Check flag on a dynamic index expression used in a
847 component association in the argument of Update.
848
849 2014-07-18 Gary Dismukes <dismukes@adacore.com>
850
851 * einfo.ads, sem_eval.ads, sem_ch13.adb: Minor reformatting.
852
853 2014-07-18 Hristian Kirtchev <kirtchev@adacore.com>
854
855 * exp_ch6.adb (Expand_Simple_Function_Return): Redo the marking
856 of enclosing blocks, loops and the enclosing function using a
857 parent-based traversal.
858 * exp_util.adb (Wrap_Statements_In_Block): Suppress the secondary
859 stack reclamation if the iterator loop contains a return statement
860 that uses the stack.
861 * sem_ch5.adb (Analyze_Loop_Statement): There is no need to
862 patch up the scope stack as the secondary stack management now
863 takes into account the enclosing function of the iterator loop.
864
865 2014-07-18 Robert Dewar <dewar@adacore.com>
866
867 * sem_ch3.adb, g-memdum.ads, i-cstrea.ads: Minor reformatting.
868
869 2014-07-18 Robert Dewar <dewar@adacore.com>
870
871 * einfo.adb (Has_Static_Predicate): New function.
872 (Set_Has_Static_Predicate): New procedure.
873 * einfo.ads (Has_Static_Predicate): New flag.
874 * sem_ch13.adb (Is_Predicate_Static): New function
875 (Build_Predicate_Functions): Use Is_Predicate_Static to reorganize
876 (Add_Call): Minor change in Sloc of generated expression
877 (Add_Predicates): Remove setting of Static_Pred, no longer used.
878 * sem_ch4.adb (Has_Static_Predicate): Removed this function,
879 replace by use of the entity flag Has_Static_Predicate_Aspect.
880 * sem_eval.adb (Eval_Static_Predicate_Check): Check real case
881 and issue warning that predicate is not checked for now.
882 * sem_eval.ads (Eval_Static_Predicate_Check): Fix comments in
883 spec.
884 * sem_util.adb (Check_Expression_Against_Static_Predicate):
885 Carry out check for any case where there is a static predicate,
886 and output appropriate message.
887 * sinfo.ads: Minor comment corrections.
888
889 2014-07-18 Ed Schonberg <schonberg@adacore.com>
890
891 * exp_ch3.adb (Expand_Freeze_Record_Type): If the type is derived
892 from an untagged private type whose full view is tagged, the type
893 is marked tagged for layout reasons, but it has no dispatch table,
894 so Set_All_DT_Position must not be called.
895 * exp_ch13.adb: If the freeze node is for a type internal to a
896 record declaration, as is the case for a class-wide subtype
897 of a parent component, the relevant scope is the scope of the
898 enclosing record.
899
900 2014-07-18 Thomas Quinot <quinot@adacore.com>
901
902 * g-memdum.adb, g-memdum.ads: Code clean ups.
903
904 2014-07-18 Hristian Kirtchev <kirtchev@adacore.com>
905
906 * sem_prag.adb (Check_Dependency_Clause):
907 Update the comment on usage. Reimplement the mechanism which
908 attempts to match a single clause of Depends against one or
909 more clauses of Refined_Depends.
910 (Input_Match): Removed.
911 (Inputs_Match): Removed.
912 (Is_Self_Referential): Removed.
913 (Normalize_Clause): Update the call to Split_Multiple_Outputs.
914 (Normalize_Outputs): Rename variable Split to New_Claue and update
915 all its occurrences.
916 (Report_Extra_Clauses): Update the comment on usage.
917 (Split_Multiple_Outputs): Renamed to Normalize_Outputs.
918
919 2014-07-18 Gary Dismukes <dismukes@adacore.com>
920
921 * i-cstrea.ads: Minor reformatting.
922
923 2014-07-18 Hristian Kirtchev <kirtchev@adacore.com>
924
925 * exp_util.adb (Wrap_Statements_In_Block): Propagate both
926 secondary stack-related flags to the generated block.
927 * sem_ch5.adb (Analyze_Loop_Statement): Update the scope chain
928 once the loop is relocated in a block.
929
930 2014-07-18 Robert Dewar <dewar@adacore.com>
931
932 * repinfo.ads: Add documentation on handling of back annotation
933 for dynamic case.
934
935 2014-07-18 Ed Schonberg <schonberg@adacore.com>
936
937 * sinfo.ads, sinfo.adb (Incomplete_View): New semantic attribute
938 of full type declaration, denotes previous declaration for
939 incomplete view of the type.
940 * sem_ch3.adb (Analyze_Full_Type_Declaration): Set Incomplete_View
941 of declaration if one is present.
942 (Replace_Type): When constructing the signature of an inherited
943 operation, handle properly the case where the operation has a
944 formal whose type is an incomplete view.
945 * sem_util.adb (Collect_Primitive_Operations): Handle properly
946 the case of an operation declared after an incomplete declaration
947 for a type T and before the full declaration of T.
948
949 2014-07-18 Pascal Obry <obry@adacore.com>
950
951 * i-cstrea.ads: Add documentation for set_wide_text_mode.
952
953 2014-07-18 Robert Dewar <dewar@adacore.com>
954
955 * a-witeio.adb: Minor code reorganization.
956 * i-cstrea.ads: Add comment.
957
958 2014-07-18 Thomas Quinot <quinot@adacore.com>
959
960 * s-oscons-tmplt.c (NAME_MAX): Minor cleaup and comment
961 clarifications.
962
963 2014-07-18 Robert Dewar <dewar@adacore.com>
964
965 * g-memdum.adb, g-memdum.ads, exp_strm.adb: Minor reformatting.
966
967 2014-07-18 Pascal Obry <obry@adacore.com>
968
969 * s-crtl.ads, i-cstrea.ads (fputwc): New routine.
970 * a-witeio.adb (Put): On platforms where there is translation
971 done by the OS output the raw text.
972 (New_Line): Use Put above to properly handle the LM wide characters.
973
974 2014-07-18 Thomas Quinot <quinot@adacore.com>
975
976 * g-memdum.adb, g-memdum.ads (Dump): New parameter Prefix, defaulted
977 to Absolute_Address.
978
979 2014-07-18 Eric Botcazou <ebotcazou@adacore.com>
980
981 * opt.ads (Suppress_Back_Annotation): Remove as unused.
982 * fe.h (Back_Annotate_Rep_Info): Likewise.
983 (Global_Discard_Names): Likewise.
984
985 2014-07-18 Robert Dewar <dewar@adacore.com>
986
987 * sem_ch13.adb (Is_Type_Ref): Check that type name is not
988 parenthesized.
989
990 2014-07-18 Vincent Celier <celier@adacore.com>
991
992 * s-osinte-vms.ads: Fix style errors.
993
994 2014-07-18 Thomas Quinot <quinot@adacore.com>
995
996 * s-oscons-tmplt.c (_POSIX_SOURCE): Define in order to get
997 NAME_MAX and PATH_MAX.
998
999 2014-07-18 Bob Duff <duff@adacore.com>
1000
1001 * exp_strm.adb (Build_Record_Or_Elementary_Input_Function,
1002 Build_Record_Or_Elementary_Output_Procedure): For Input and
1003 Output attributes, do not read/write the discriminants if they
1004 have default values; that will be done by Read/Write.
1005
1006 2014-07-18 Robert Dewar <dewar@adacore.com>
1007
1008 * sem_aggr.adb, exp_ch5.adb, sem_ch3.adb, layout.adb, sem_type.adb,
1009 exp_util.adb, exp_attr.adb, einfo.adb, einfo.ads, exp_pakd.adb,
1010 checks.adb, exp_pakd.ads, freeze.adb, sem_util.adb, exp_dbug.adb,
1011 exp_dbug.ads, exp_ch4.adb, sem_ch8.adb, exp_aggr.adb, sem_eval.adb,
1012 sem_ch13.adb: Change name Packed_Array_Type to Packed_Array_Impl_Type.
1013
1014 2014-07-18 Robert Dewar <dewar@adacore.com>
1015
1016 * lib-writ.adb, makeutl.adb, ali.ads: Minor reformatting.
1017
1018 2014-07-18 Vincent Celier <celier@adacore.com>
1019
1020 * lib-writ.ads: Update documentation about the D lines.
1021
1022 2014-07-18 Ed Schonberg <schonberg@adacore.com>
1023
1024 * sem_ch13.adb (Replace_Type_References_Generic): Use type entity
1025 as a parameter, rather than its Chars field, in order to locate
1026 freeze node of type. If the predicate or invariant has references
1027 to types other than the one to which the contract applies, these
1028 types must be frozen, and the corresponding predicate functions
1029 created, before that freeze node.
1030
1031 2014-07-18 Robert Dewar <dewar@adacore.com>
1032
1033 * freeze.adb, einfo.ads, einfo.adb: Minor code reorganization.
1034 * par_sco.adb: Minor reformatting.
1035
1036 2014-07-18 Gary Dismukes <dismukes@adacore.com>
1037
1038 * exp_ch4.adb (Real_Range_Check): Turn off
1039 the Do_Range_Check flag on the conversion's current Expression
1040 argument rather than on the originally captured Operand node,
1041 as Expression may reflect a rewriting (as in conversions to a
1042 fixed-point type).
1043
1044 2014-07-18 Vincent Celier <celier@adacore.com>
1045
1046 * ali.adb (Scan_ALI): Set Sdep_Record.Unit_Name, when the unit
1047 is not a subunit.
1048 * ali.ads (Sdep_Record): New component Unit_Name.
1049 * lib-writ.adb (Write_ALI): Write the unit name in D lines.
1050 * makeutl.adb (Check_Source_Info_In_ALI): Return False if a
1051 dependent unit is in a project and the source file name is not
1052 one of its sources.
1053
1054 2014-07-18 Bob Duff <duff@adacore.com>
1055
1056 * s-addima.ads: Minor: add comment.
1057
1058 2014-07-18 Thomas Quinot <quinot@adacore.com>
1059
1060 * freeze.adb (Check_Component_Storage_Order): Fix enforcement
1061 of nesting rules for composites with different SSOs.
1062
1063 2014-07-18 Thomas Quinot <quinot@adacore.com>
1064
1065 * par_sco.adb (Is_Logical_Operator): An If_Expression is not
1066 a proper logical operator.
1067 (Has_Decision): An If_Expression indicates the presence of a decision
1068 although it is not a logical operator.
1069
1070 2014-07-18 Robert Dewar <dewar@adacore.com>
1071
1072 * gnat_ugn.texi: Remove note that -gnatR not allowed with -gnatc.
1073 * switch-c.adb: Remove prohibition of -gnatR and -gnatc together.
1074
1075 2014-07-18 Eric Botcazou <ebotcazou@adacore.com>
1076
1077 * sem_ch13.adb (Kill_Rep_Clause): Clear Comes_From_Source flag
1078 on the null statement.
1079
1080 2014-07-18 Thomas Quinot <quinot@adacore.com>
1081
1082 * adaint.c: Minor comment rewording.
1083 * socket.c: Define macros _REENTRANT and _THREAD_SAFE so that
1084 use of errno in this file is thread safe.
1085
1086 2014-07-18 Arnaud Charlet <charlet@adacore.com>
1087
1088 * gnat_ugn.texi: Doc clarification.
1089 * sem_ch13.adb (Kill_Rep_Clause): Use Replace not Rewrite.
1090 * sem_ch13.ads: Minor comment update.
1091
1092 2014-07-18 Robert Dewar <dewar@adacore.com>
1093
1094 * repinfo.ads: Minor comment fix.
1095
1096 2014-07-18 Robert Dewar <dewar@adacore.com>
1097
1098 * par-prag.adb: Add dummy entry for Default_Scalar_Storage_Order.
1099 * sem_prag.adb: Add dummy implementation of
1100 Default_Scalar_Storage_Order.
1101 * snames.ads-tmpl: Add dummy entry for
1102 Default_Scalar_Storage_Order pragma.
1103
1104 2014-07-18 Robert Dewar <dewar@adacore.com>
1105
1106 * opt.adb (Tree_Read): Read Address_Is_Private,
1107 Ignore_Rep_Clauses, Ignore_Style_Check_Pragmas, Multiple_Unit_Index.
1108 (Tree_Write): Corresponding writes
1109 * opt.ads: Minor comment reformatting and fixes.
1110 * tree_io.ads: Increment ASIS_Version_Number.
1111
1112 2014-07-18 Robert Dewar <dewar@adacore.com>
1113
1114 * sem_attr.adb, s-os_lib.ads, prj-tree.adb: Minor reformatting.
1115 * types.h: Fix typo.
1116
1117 2014-07-18 Robert Dewar <dewar@adacore.com>
1118
1119 * freeze.adb (Check_Address_Clause): Use Kill_Rep_Clause (no
1120 functional change).
1121 * gnat_ugn.texi: Document that -gnatI removes rep clauses from
1122 ASIS trees.
1123 * sem_ch13.adb (Kill_Rep_Clause): New procedure
1124 (Analyze_Attribute_Definition_Clause): Use
1125 Kill_Rep_Clause. This is just a cleanup, no functional effect.
1126 (Analyze_Enumeration_Representation_Clause):
1127 Use Kill_Rep_Clause. This means that enum rep
1128 clauses are now properly removed from -gnatct trees.
1129 (Analyze_Record_Representation_Clause): Same change.
1130 * sem_ch13.ads (Kill_Rep_Clause): New procedure.
1131
1132 2014-07-18 Pascal Obry <obry@adacore.com>
1133
1134 * s-os_lib.ads, s-os_lib.adb (GM_Time_Of): New routine to create an
1135 OS_Time from time parts.
1136 * adaint.h, adaint.c (__gnat_to_os_time): New routine.
1137
1138 2014-07-18 Ed Schonberg <schonberg@adacore.com>
1139
1140 * sem_ch4.adb (Try_Container_Indexing): Refine previous patch for
1141 indexing over containers that are derived types: check whether
1142 signature of found operation has the correct first parameter
1143 before retrieving directly a primitive operation.
1144
1145 2014-07-18 Ed Schonberg <schonberg@adacore.com>
1146
1147 * sem_attr.adb (Analyze_Attribute, case 'Update): Set
1148 Do_Range_Check flag on dynamic bounds of a range used in a
1149 component association in the argument of Update.
1150
1151 2014-07-18 Thomas Quinot <quinot@adacore.com>
1152
1153 * adaint.c: #define _REENTRANT and _THREAD_SAFE in order for
1154 accesses to errno(3) to be thread safe.
1155
1156 2014-07-18 Vincent Celier <celier@adacore.com>
1157
1158 * prj-tree.adb (Imported_Or_Extended_Project_Of): For each non
1159 limited imported project that is an extending project, return
1160 a project being extended if it has the expected name.
1161
1162 2014-07-18 Pascal Obry <obry@adacore.com>
1163
1164 * s-os_lib.ads, s-os_lib.adb (Set_File_Last_Modify_Time_Stamp): New
1165 routine to set the last modification time stamp for the given file.
1166 * gnatchop.adb (File_Time_Stamp): Removed.
1167 (Write_Unit): Use
1168 Set_File_Last_Modify_Time_Stamp instead of ad-hoc implementation.
1169
1170 2014-07-18 Ed Schonberg <schonberg@adacore.com>
1171
1172 * sem_aggr.adb (Aggregate_Constraint_Checks): Moved to sem_util.
1173 * sem_util.ads, sem_util.adb (Aggregate_Constraint_Checks):
1174 Moved here, so it can be shared with the resolution of 'Update,
1175 whose argument shares some features with aggregates.
1176 * sem_attr.adb (Resolve_Attribute, case 'Update): Apply
1177 Aggregate_Constraint_Checks with the expression of each
1178 association, so that the Do_Range_Check flag is set when needed.
1179
1180 2014-07-18 Ed Schonberg <schonberg@adacore.com>
1181
1182 * sem_ch4.adb (Try_Container_Indexing): If the container
1183 type is a derived type, the value of the inherited aspect is
1184 the Reference operation declared for the parent type. However,
1185 Reference is also a primitive operation of the new type, and
1186 the inherited operation has a different signature. We retrieve
1187 the right one from the list of primitive operations of the
1188 derived type.
1189
1190 2014-07-18 Vincent Celier <celier@adacore.com>
1191
1192 * debug.adb: Update comment.
1193
1194 2014-07-18 Hristian Kirtchev <kirtchev@adacore.com>
1195
1196 * exp_util.adb (Needs_Finalization): There is no reason why a
1197 C type should not benefit from finalization actions.
1198
1199 2014-07-18 Thomas Quinot <quinot@adacore.com>
1200
1201 * s-oscons-tmplt.c (NAME_MAX): Fix definition for Solaris
1202 (FILENAME_MAX): Remove unneeded definition.
1203
1204 2014-07-18 Robert Dewar <dewar@adacore.com>
1205
1206 * exp_attr.adb, debug.adb: Update comments.
1207
1208 2014-07-18 Vincent Celier <celier@adacore.com>
1209
1210 * par-ch4.adb (Simple_Expression): Add missing style check
1211 for binary adding operators.
1212 (Term): Add missing style check for multiplying operators.
1213
1214 2014-07-18 Robert Dewar <dewar@adacore.com>
1215
1216 * impunit.adb: Minor comment correction.
1217 * widechar.adb, s-wchcon.ads: Minor comment corrections.
1218
1219 2014-07-18 Robert Dewar <dewar@adacore.com>
1220
1221 * sem_ch13.adb (Build_Discrete_Static_Predicate): New name
1222 for Build_Static_Predicate (Build_Predicate_Functions):
1223 Don't try to build discrete predicate for real type.
1224 (Build_Predicate_Functions): Report attempt to use
1225 Static_Predicate function on real type as unimplemented.
1226 * sem_util.adb (Check_Expression_Against_Static_Predicate):
1227 Add guard to prevent blow up on predicate for real type.
1228
1229 2014-07-18 Ed Schonberg <schonberg@adacore.com>
1230
1231 * einfo.adb (Set_Static_Predicate): Simplify assertion to handle
1232 properly static predicate on enumeration types and modular types
1233 (not subtypes).
1234
1235 2014-07-18 Pierre-Marie Derodat <derodat@adacore.com>
1236
1237 * scos.ads (SCO_Unit_Table_Entry): Add a field to keep track of
1238 the corresponding source file index.
1239 * get_scos.ads (Get_SCOs): Add a default value for it.
1240 * par_sco.adb (SCO_Record): Fill the corresponding value.
1241 * scos.h: New.
1242
1243 2014-07-18 Vincent Celier <celier@adacore.com>
1244
1245 * a-strunb-shared.adb, s-auxdec.ads, s-rannum.adb, atree.ads,
1246 urealp.adb, vms_data.ads, lib.ads, s-auxdec-vms_64.ads: Minor
1247 reformatting.
1248 * gnat_ugn.texi: Add documentation for new gnatmem switch -t.
1249
1250 2014-07-18 Thomas Quinot <quinot@adacore.com>
1251
1252 * g-sercom.ads (Set): document possible data loss.
1253
1254 2014-07-18 Ed Schonberg <schonberg@adacore.com>
1255
1256 * exp_attr.adb (Expand_N_Attribute_Reference, cases Input,
1257 Output, Read, Write): If the restriction No_Streams is active,
1258 replace each occurrence of a stream attribute by an explicit
1259 Raise statement.
1260
1261 2014-07-18 Robert Dewar <dewar@adacore.com>
1262
1263 * par_sco.adb, a-reatim.ads, exp_attr.adb, sem_util.adb: Minor
1264 reformatting.
1265
1266 2014-07-18 Robert Dewar <dewar@adacore.com>
1267
1268 * einfo.ads, einfo.adb (Has_Out_Or_In_Out_Parameter): New flag and
1269 function.
1270 (Set_Has_Out_Or_In_Out_Parameter): New procedure.
1271 * sem_ch6.adb (Set_Formal_Mode): Set Has_Out_Or_In_Out_Parameter flag.
1272 * sem_res.adb (Resolve_Call): Error if call of Ada 2012 function
1273 with OUT or IN OUT from earlier Ada mode (e.g. Ada 2005)
1274
1275 2014-07-18 Robert Dewar <dewar@adacore.com>
1276
1277 * bcheck.adb (Check_Consistent_Restrictions):
1278 Remove obsolete code checking for violation of
1279 No_Standard_Allocators_After_Elaboration (main program)
1280 * bindgen.adb (Gen_Adainit): Handle
1281 No_Standard_Allocators_After_Elaboration
1282 (Gen_Output_File_Ada): ditto.
1283 * exp_ch4.adb (Expand_N_Allocator): Handle
1284 No_Standard_Allocators_After_Elaboration.
1285 * Makefile.rtl: Add entry for s-elaall
1286 * rtsfind.ads: Add entry for Check_Standard_Allocator.
1287 * s-elaall.ads, s-elaall.adb: New files.
1288 * sem_ch4.adb (Analyze_Allocator): Handle
1289 No_Standard_Allocators_After_Elaboration.
1290
1291 2014-07-18 Robert Dewar <dewar@adacore.com>
1292
1293 * lib.adb, lib.ads, lib-writ.adb, lib-writ.ads, ali.adb,
1294 ali.ads, lib-load.adb: Remove Lib.Has_Allocator and all uses.
1295 Remove AB parameter from ali files and all uses.
1296 Remove Allocator_In_Body and all uses.
1297
1298 2014-07-18 Robert Dewar <dewar@adacore.com>
1299
1300 * g-expect-vms.adb: Add comment.
1301
1302 2014-07-18 Thomas Quinot <quinot@adacore.com>
1303
1304 * par_sco.adb (Is_Logical_Operation): return True for
1305 N_If_Expression.
1306
1307 2014-07-18 Ed Schonberg <schonberg@adacore.com>
1308
1309 * sem_attr.adb (Resolve_Attribute, case 'Update): Do full
1310 analysis and resolution of each choice in the associations within
1311 the argument of Update, because they may be variable names.
1312
1313 2014-07-18 Hristian Kirtchev <kirtchev@adacore.com>
1314
1315 * exp_attr.adb (Expand_Loop_Entry_Attribute): Insert any condition
1316 actions before the generated if statement.
1317
1318 2014-07-18 Hristian Kirtchev <kirtchev@adacore.com>
1319
1320 * gnat_ugn.texi Enhance the documentation of
1321 switches -gnateA and -gnateV.
1322
1323 2014-07-18 Ed Schonberg <schonberg@adacore.com>
1324
1325 * sem_util.adb (Build_Default_Subtype): Add missing condition
1326 so that code matches description: use the full view of the base
1327 only if the base is private and the subtype is not.
1328
1329 2014-07-17 Gary Dismukes <dismukes@adacore.com>
1330
1331 * exp_disp.adb: Minor reformatting.
1332 * exp_disp.adb: Minor code reorganization.
1333
1334 2014-07-17 Thomas Quinot <quinot@adacore.com>
1335
1336 * gnat_rm.texi, freeze.adb (Check_Component_Storage_Order): Do not
1337 require an explicit SSO attribute definition clause on a composite type
1338 just because one of its components has one.
1339
1340 2014-07-17 Robert Dewar <dewar@adacore.com>
1341
1342 * sem_attr.adb (Analyze_Attribute, case Loop_Entry): Rewrite
1343 attribute out of existence if the enclosing pragma is ignored.
1344 * sem_util.adb: Minor reformatting.
1345
1346 2014-07-17 Ed Schonberg <schonberg@adacore.com>
1347
1348 * exp_aggr.adb (Expand_Array_Aggregate): Handle properly an
1349 array aggregate expanded into assignments when it appears as a
1350 local declaration in an inlined body.
1351
1352 2014-07-17 Doug Rupp <rupp@adacore.com>
1353
1354 * init.c [__ANDROID__]: Modify for ZCX.
1355 * exp_aggr.adb: Minor reformatting
1356 * sigtramp-armvxw.c, sigtramp-ppcvxw.c: Update comments.
1357
1358 2014-07-17 Robert Dewar <dewar@adacore.com>
1359
1360 * a-strunb-shared.ads, a-stwiun-shared.ads, a-stzunb-shared.ads,
1361 exp_ch7.adb, g-pehage.ads, g-socket.ads, gnat_ugn.texi, gnat_ugx.texi,
1362 scng.adb: Remove incorrect usage "allow to" and "allows to".
1363
1364 2014-07-17 Robert Dewar <dewar@adacore.com>
1365
1366 * exp_dist.adb: Minor reformatting.
1367
1368 2014-07-17 Bob Duff <duff@adacore.com>
1369
1370 * gnat_ugn.texi: Improve documentation of Unrestricted_Access.
1371
1372 2014-07-17 Robert Dewar <dewar@adacore.com>
1373
1374 * sem_ch13.adb (Build_Invariant_Procedure): Add variable Nam
1375 (Add_Invariants): Set Nam to Name_Type_Invariant if from aspect.
1376
1377 2014-07-17 Thomas Quinot <quinot@adacore.com>
1378
1379 * exp_pakd.adb (Create_Packed_Array_Type.Install_PAT): For a
1380 non-bit-packed array, propagate Reverse_Storage_Order to the
1381 packed array type.
1382
1383 2014-07-17 Javier Miranda <miranda@adacore.com>
1384
1385 * exp_disp.adb: Fix comment.
1386 * exp_pakd.adb: Minor reformatting.
1387
1388 2014-07-17 Robert Dewar <dewar@adacore.com>
1389
1390 * bindgen.adb (Gen_Elab_Calls): Skip reference to elab
1391 entity if none exists (Gen_Elab_Calls): Complain if clash with
1392 No_Multiple_Elaboration.
1393 * s-rident.ads, restrict.ads: Add restriction No_Multiple_Elaboration.
1394 * sem_util.adb (Build_Elaboration_Entity): Skip building entity
1395 if not needed.
1396 * gnat_rm.texi: Document restriction No_Multiple_Elaboration.
1397 * sem_ch4.adb: Minor comment updates.
1398
1399 2014-07-17 Ed Schonberg <schonberg@adacore.com>
1400
1401 * exp_ch9.adb (Buid_Protected_Subprogram_Call): Preserve type
1402 of function call for later use when shared passive objects
1403 are involved.
1404
1405 2014-07-17 Hristian Kirtchev <kirtchev@adacore.com>
1406
1407 * par-ch13.adb (Get_Aspect_Specifications):
1408 Catch a case where the argument of SPARK aspect Refined_State
1409 is not properly parenthesized.
1410
1411 2014-07-17 Hristian Kirtchev <kirtchev@adacore.com>
1412
1413 * exp_ch6.adb (Expand_Ctrl_Function_Call): Do not extend
1414 the lifetime of a reference to an Ada 2012 container element.
1415 (Is_Element_Reference): New routine.
1416
1417 2014-07-17 Robert Dewar <dewar@adacore.com>
1418
1419 * ali.ads: Minor comment fix.
1420 * lib-writ.adb: Minor reformatting.
1421
1422 2014-07-17 Ed Schonberg <schonberg@adacore.com>
1423
1424 * sem_ch10.adb (Analyze_Proper_Body): When analyzing a subunit
1425 in ASIS mode, load another subunit only if it a subunit of the
1426 current one, not a sibling that has been reached through the
1427 analysis of an ancestor. This allows the construction of the
1428 ASIS tree for the subunit even when sibling subunits have errors.
1429
1430 2014-07-17 Hristian Kirtchev <kirtchev@adacore.com>
1431
1432 * sem_ch3.adb (Analyze_Declarations): Remove the guard which
1433 prevents the analysis of various contracts when the associated
1434 construct is erroneous.
1435 * sem_util.adb (Save_SPARK_Mode_And_Set): Do not query the
1436 SPARK_Pragma of an illegal or a partially decorated construct.
1437
1438 2014-07-17 Robert Dewar <dewar@adacore.com>
1439
1440 * s-imguns.ads: Minor reformatting.
1441
1442 2014-07-17 Hristian Kirtchev <kirtchev@adacore.com>
1443
1444 * exp_ch7.adb (Build_Finalization_Master): Move all local
1445 variables to the proper code section. When looking for an existing
1446 finalization master, inspect the ultimate ancestor type of the
1447 full view.
1448 * sem_util.ads, sem_util.adb (Root_Type_Of_Full_View): New routine.
1449
1450 2014-07-17 Robert Dewar <dewar@adacore.com>
1451
1452 * aspects.ads, aspects.adb: Add entries for aspect Annotate.
1453 * gnat_rm.texi: Document Entity argument for pragma Annotate and
1454 Annotate aspect.
1455 * sem_ch13.adb (Analyze_Aspect_Specification): Add processing
1456 for Annotate aspect.
1457 * sem_prag.adb (Analyze_Pragma, case Annotate): Allow optional
1458 Entity argument at end.
1459 * sinfo.ads (N_Aspect_Specification): Add note on Annotate aspect.
1460
1461 2014-07-17 Tristan Gingold <gingold@adacore.com>
1462
1463 * s-imguns.ads: Fix minor typo.
1464
1465 2014-07-17 Thomas Quinot <quinot@adacore.com>
1466
1467 * sprint.adb: Minor reformatting.
1468
1469 2014-07-17 Robert Dewar <dewar@adacore.com>
1470
1471 * sprint.adb (Write_Itype): Print proper header for string
1472 literal subtype.
1473
1474 2014-07-17 Steve Baird <baird@adacore.com>
1475
1476 * sinfo.ads, sem_scil.ads: Improve comments, minor reformatting.
1477
1478 2014-07-17 Vincent Celier <celier@adacore.com>
1479
1480 * gnatbind.adb: Change in message "try ... for more information".
1481
1482 2014-07-17 Robert Dewar <dewar@adacore.com>
1483
1484 * sprint.adb: Code clean up.
1485
1486 2014-07-17 Hristian Kirtchev <kirtchev@adacore.com>
1487
1488 * exp_ch7.adb (Find_Last_Init): Relocate local variables to
1489 the relevant code section. Add new local constant Obj_Id. When
1490 a limited controlled object is initialized by a function call,
1491 the build-in-place object access function call acts as the last
1492 initialization statement.
1493 * exp_util.adb (Is_Object_Access_BIP_Func_Call): New routine.
1494 (Is_Secondary_Stack_BIP_Func_Call): Code reformatting.
1495 * exp_util.ads (Is_Object_Access_BIP_Func_Call): New routine.
1496
1497 2014-07-17 Ed Schonberg <schonberg@adacore.com>
1498
1499 * sem_ch8.adb (Analyze_Generic_Renaming): For generic subprograms,
1500 propagate intrinsic flag to renamed entity, to allow e.g. renaming
1501 of Unchecked_Conversion.
1502 * sem_ch3.adb (Analyze_Declarations): Do not analyze contracts
1503 if the declaration has errors.
1504
1505 2014-07-17 Ed Schonberg <schonberg@adacore.com>
1506
1507 * a-rbtgbk.adb: a-rbtgbk.adb (Generic_Insert_Post): Check whether
1508 container is busy before checking whether capacity allows for
1509 a further insertion. Insertion in a busy container that is full
1510 raises Program_Error rather than Capacity_Error. Previous to that
1511 patch which exception was raised varied among container types.
1512
1513 2014-07-17 Robert Dewar <dewar@adacore.com>
1514
1515 * g-comlin.ads, g-comlin.adb: Minor clean up.
1516
1517 2014-07-17 Bob Duff <duff@adacore.com>
1518
1519 * gnat_ugn.texi: Update gnatpp doc.
1520
1521 2014-07-17 Robert Dewar <dewar@adacore.com>
1522
1523 * gnat_rm.texi: Document new restriction No_Long_Long_Integers.
1524 * exp_ch4.adb (Make_Array_Comparison_Op): Add note that we
1525 could do this by actually expanding a real generic.
1526 * a-tags.ads: Add comments about performance.
1527 * sprint.adb (Sprint_Node_Actual, case N_Object_Declaration):
1528 Print Etype of defining identifier, rather than the object
1529 definition. More information.
1530
1531 2014-07-17 Thomas Quinot <quinot@adacore.com>
1532
1533 * exp_dist.adb: Minor documentation clarification.
1534
1535 2014-07-17 Hristian Kirtchev <kirtchev@adacore.com>
1536
1537 * exp_util.adb (Is_Aliased): Revert previous change.
1538
1539 2014-07-17 Vincent Celier <celier@adacore.com>
1540
1541 * g-comlin.adb (Try_Help): New procedure.
1542 (Getopt): Use new procedure Try_Help.
1543 * g-comlin.ads (Try_Help): New procedure.
1544
1545 2014-07-17 Bob Duff <duff@adacore.com>
1546
1547 * gnat_ugn.texi: Minor update.
1548
1549 2014-07-17 Robert Dewar <dewar@adacore.com>
1550
1551 * gnat_rm.texi: Improve documentation of Unrestricted_Access.
1552 * sinfo.ads: Document restriction on aggregates (must expand to
1553 assignments if one or more assignments needs expansion, e.g. for
1554 controlled types).
1555 * sem_ch13.adb: All warning messages regarding bit order should
1556 be info: messages.
1557 * gnat_ugn.texi: Minor correction of missing @ on @code
1558
1559 2014-07-17 Robert Dewar <dewar@adacore.com>
1560
1561 * restrict.ads (Implementation_Restriction): Add No_Long_Long_Integer.
1562 * s-rident.ads (Partition_Boolean_Restrictions): Add
1563 No_Long_Long_Integer.
1564 * sem_ch3.adb (Modular_Type_Declaration): Size must be <=
1565 Long_Integer'Size if restriction No_Long_Long_Integer is active.
1566 (Signed_Integer_Type_Declaration): Do not allow Long_Long_Integer
1567 as the implicit base type for a signed integer type declaration
1568 if restriction No_Long_Long_Integer is active.
1569 * sem_util.ads, sem_util.adb (Set_Entity_With_Checks): Include check for
1570 No_Long_Long_Integer.
1571
1572 2014-07-17 Robert Dewar <dewar@adacore.com>
1573
1574 * sem_ch3.adb, a-ztexio.ads, exp_imgv.adb, casing.adb, casing.ads,
1575 einfo.ads, checks.adb, sem_ch12.adb, a-textio.ads, freeze.adb,
1576 repinfo.adb, exp_ch6.adb, sem_ch4.adb, a-witeio.ads, sem_ch8.adb,
1577 sem_warn.adb, exp_aggr.adb, exp_dist.adb, par-tchk.adb, s-fatgen.adb,
1578 treepr.adb, lib-xref.adb: Remove the word kludge from ada sources.
1579
1580 2014-07-17 Robert Dewar <dewar@adacore.com>
1581
1582 * debug.adb: Remove -gnatdQ.
1583 * exp_disp.adb: Remove -gnatdQ.
1584 * a-ztenio.ads, a-wtinio.ads, a-wtmoio.ads, a-ztcoau.ads, a-tiinio.ads,
1585 a-wtfiio.ads, a-timoio.ads, sem_ch12.adb, a-tifiio.ads, a-ztinio.ads,
1586 rtsfind.adb, rtsfind.ads, a-ztmoio.ads, a-wtdeio.ads, a-ztfiio.ads,
1587 a-tideio.ads, a-wtflio.ads, a-ztdeio.ads, sem_ch8.adb, a-tiflio.ads,
1588 sprint.adb, a-ztflio.ads, snames.ads-tmpl, a-wtenio.ads,
1589 a-tienio.ads: Rename Text_IO_Kludge to Text_IO_Special_Unit.
1590
1591 2014-07-17 Robert Dewar <dewar@adacore.com>
1592
1593 * back_end.adb: Minor reformatting and comment additions.
1594 * checks.ads, checks.adb (Duplicated_Tag_Checks_Suppressed): New
1595 function.
1596 * exp_disp.adb (Make_DT): Use Duplicated_Tag_Checks_Suppressed.
1597 (Make_VM_TSD): Use Duplicated_Tag_Checks_Suppressed.
1598 * gnat_rm.texi: Document new check Duplicated_Tag_Checks_Suppressed.
1599 * gnat_ugn.texi: Additional documentation for Duplicated_Tag_Check.
1600 * snames.ads-tmpl (Duplicated_Tag_Checks_Suppressed): New check.
1601 * types.ads (Duplicated_Tag_Checks_Suppressed): New check.
1602
1603 2014-07-17 Robert Dewar <dewar@adacore.com>
1604
1605 * gnat_rm.texi: Minor comment updates.
1606
1607 2014-07-17 Ed Schonberg <schonberg@adacore.com>
1608
1609 * sem_util.adb (Make_Explicit_Dereference): If the expression
1610 being dereferenced is a generalized indexing, reset the overloaded
1611 flag on the generalized indexing call, consistent with the
1612 resetting of the flag on the original indexed component.
1613
1614 2014-07-17 Robert Dewar <dewar@adacore.com>
1615
1616 * gnat_ugn.texi: Document advise not to mix -gnatV? and
1617 optimization.
1618
1619 2014-07-17 Robert Dewar <dewar@adacore.com>
1620
1621 * checks.adb (Insert_Valid_Check): Don't insist on a name
1622 for the prefix when we make calls to Force_Evaluation and
1623 Duplicate_Subexpr_No_Checks.
1624 * exp_util.adb (Is_Volatile_Reference): Handle all cases properly
1625 (Remove_Side_Effects): Handle all volatile references right
1626 (Side_Effect_Free): Volatile reference is never side effect free
1627 * sinfo.ads (N_Attribute_Reference): Add comments explaining
1628 that in the tree, the prefix can be a general expression.
1629
1630 2014-07-17 Hristian Kirtchev <kirtchev@adacore.com>
1631
1632 * sem_ch6.adb (Analyze_Subprogram_Body_Contract,
1633 Analyze_Subprogram_Contract): Add comments on SPARK_Mode save/restore.
1634 * sem_ch7.adb (Analyze_Package_Body_Contract,
1635 Analyze_Package_Contract): Add comments on SPARK_Mode save/restore.
1636
1637 2014-07-17 Robert Dewar <dewar@adacore.com>
1638
1639 * exp_ch7.ads, exp_util.ads: Document Insert_Action_After,
1640 Store_After_Actions_In_Scope.
1641
1642 2014-07-17 Robert Dewar <dewar@adacore.com>
1643
1644 * sem_aux.ads: Minor comment addition.
1645
1646 2014-07-17 Ed Schonberg <schonberg@adacore.com>
1647
1648 * sem_res.adb (Make_Call_Into_Operator): If the call is already
1649 a rewriting of an operator node, there are no actuals to be
1650 propagated from original node to rewritten node when in ASIS mode.
1651
1652 2014-07-17 Hristian Kirtchev <kirtchev@adacore.com>
1653
1654 * sem_ch6.adb (Analyze_Subprogram_Body_Contract,
1655 Analyze_Subprogram_Contract): Add new local variable Mode. Save
1656 and restore the SPARK mode of the related construct in a
1657 stack-like fashion.
1658 * sem_ch7.adb (Analyze_Package_Body_Contract,
1659 Analyze_Package_Contract): Add new local variable Mode. Save and
1660 restore the SPARK mode of the related construct in a stack-like fashion.
1661 * sem_util.adb Remove with and use clause for Opt.
1662 (Restore_SPARK_Mode): New routine.
1663 (Save_SPARK_Mode_And_Set): New routine.
1664 * sem_util.ads Add with and use clause for Opt.
1665 (Restore_SPARK_Mode): New routine.
1666 (Save_SPARK_Mode_And_Set): New routine.
1667
1668 2014-07-17 Hristian Kirtchev <kirtchev@adacore.com>
1669
1670 * exp_util.adb (Is_Aliased): Transient objects
1671 within an expression with actions cannot be considered aliased.
1672
1673 2014-07-17 Thomas Quinot <quinot@adacore.com>
1674
1675 * sem.ads (Scope_Stack_Entry): Reorganize storage of action lists;
1676 introduce a new list (cleanup actions) for each (transient) scope.
1677 * sinfo.ads, sinfo.adb (Cleanup_Actions): New attribute for
1678 N_Block_Statement
1679 * exp_ch7.ads (Store_Cleanup_Actions_In_Scope): New subprogram.
1680 * exp_ch7.adb (Store_Actions_In_Scope): New subprogram, common
1681 processing for Store_xxx_Actions_In_Scope.
1682 (Build_Cleanup_Statements): Allow for a list of additional
1683 cleanup statements to be passed by the caller.
1684 (Expand_Cleanup_Actions): Take custom cleanup actions associated
1685 with an N_Block_Statement into account.
1686 (Insert_Actions_In_Scope_Around): Account for Scope_Stack_Entry
1687 reorganization (refactoring only, no behaviour change).
1688 (Make_Transient_Block): Add assertion to ensure that the current
1689 scope is indeed a block (namely, the entity for the transient
1690 block being constructed syntactically, which has already been
1691 established as a scope). If cleanup actions are present in the
1692 transient scope, transfer them now to the transient block.
1693 * exp_ch6.adb (Expand_Protected_Subprogram_Call): Freeze the
1694 called function while it is still present as the name in a call
1695 in the tree. This may not be the case later on if the call is
1696 rewritten into a transient block.
1697 * exp_smem.adb (Add_Shared_Var_Lock_Procs): The post-actions
1698 inserted after calling a protected operation on a shared passive
1699 protected must be performed in a block finalizer, not just
1700 inserted in the tree, so that they are executed even in case of
1701 a normal (RETURN) or abnormal (exception) transfer of control
1702 outside of the current scope.
1703 * exp_smem.ads (Add_Shared_Var_Lock_Procs): Update documentation
1704 * sem_ch8.adb, expander.adb, exp_ch11.adb: Adjust for
1705 Scope_Stack_Entry reorganization.
1706
1707 2014-07-17 Thomas Quinot <quinot@adacore.com>
1708
1709 * exp_disp.adb (Make_DT, Make_VM_TSD): Do not omit Check_TSD
1710 call for types that do not have an explicit attribute definition
1711 clause for External_Tag, as their default tag may clash with an
1712 explicit tag defined for some other type.
1713
1714 2014-07-17 Hristian Kirtchev <kirtchev@adacore.com>
1715
1716 * exp_util.adb (Is_Controlled_Function_Call): Recognize a
1717 controlled function call with multiple actual parameters that
1718 appears in Object.Operation form.
1719
1720 2014-07-17 Thomas Quinot <quinot@adacore.com>
1721
1722 * einfo.ads, einfo.adb (Has_External_Tag_Rep_Clause): Remove
1723 entity flag.
1724 * sem_ch13.adb (Analyze_Attribute_Definition_Clause, case
1725 External_Tag): No need to set entity flag.
1726 * sem_aux.ads, sem_aux.adb (Has_External_Tag_Rep_Clause):
1727 Reimplement correctly in terms of Has_Rep_Item.
1728
1729 2014-07-17 Thomas Quinot <quinot@adacore.com>
1730
1731 * exp_ch7.adb (Establish_Transient_Scope.Find_Node_To_Be_Wrapped):
1732 Start examining the tree at the node passed to
1733 Establish_Transient_Scope (not its parent).
1734 * exp_ch6.adb (Make_Build_In_Place_Call_In_Object_Declaration):
1735 The access type for the variable storing the reference to
1736 the call must be declared and frozen prior to establishing a
1737 transient scope.
1738 * exp_ch9.adb: Minor reformatting.
1739
1740 2014-07-17 Pascal Obry <obry@adacore.com>
1741
1742 * s-os_lib.ads: Minor comment update.
1743
1744 2014-07-17 Tristan Gingold <gingold@adacore.com>
1745
1746 * sysdep.c: Add ATTRIBUTE_UNUSED to avoid warnings. Fix some
1747 indentation.
1748 * socket.c: Remove #warning to avoid warning.
1749 * expect.c: Indent some preprocessor directives to clarify
1750 nested if. Do not use wait.h on PikeOS. Add ATTRIBUTE_UNUSED
1751 to remove warnings.
1752 * env.c: Fix indentation. Port to PikeOS.
1753 * gsocket.h: Port to PikeOS. Remove #warning.
1754 * terminals.c: Port to PikeOS. Fix indentation of the stubs.
1755 Add ATTRIBUTE_UNUSED to stubs arguments. Fix return statement
1756 of stubbed __gnat_setup_parent_communication.
1757 * adaint.c: Port to PikeOS. Reindent some preprocessor
1758 directives to clarify nested if. Fix indentation. Add missing
1759 ATTRIBUTE_UNUSED.
1760
1761 2014-07-17 Robert Dewar <dewar@adacore.com>
1762
1763 * sem_attr.adb: Minor reformatting.
1764
1765 2014-07-17 Robert Dewar <dewar@adacore.com>
1766
1767 * exp_ch7.adb, exp_ch7.ads, sinfo.ads: Minor reformatting.
1768
1769 2014-07-17 Ed Schonberg <schonberg@adacore.com>
1770
1771 * sem_case.adb (Check_Choice_Set): If the case expression is the
1772 expression in a predicate, do not recheck coverage against itself,
1773 to prevent spurious errors.
1774 * sem_ch13.adb (Check_Aspect_At_End_Of_Declarations): Indicate that
1775 expression comes from an aspect specification, to prevent spurious
1776 errors when expression is a case expression in a predicate.
1777
1778 2014-07-17 Pascal Obry <obry@adacore.com>
1779
1780 * adaint.c, adaint.h (__gnat_set_executable): Add mode parameter.
1781 * s-os_lib.ads, s-os_lib.adb (Set_Executable): Add Mode parameter.
1782
1783 2014-07-17 Vincent Celier <celier@adacore.com>
1784
1785 * gnatchop.adb, make.adb, gnatbind.adb, clean.adb, gprep.adb,
1786 gnatxref.adb, gnatls.adb, gnatfind.adb, gnatname.adb: Do not output
1787 the usage for an erroneous invocation of a gnat tool.
1788
1789 2014-07-16 Vincent Celier <celier@adacore.com>
1790
1791 * gnatls.adb: Get the target parameters only if -nostdinc was
1792 not specified.
1793
1794 2014-07-16 Ed Schonberg <schonberg@adacore.com>
1795
1796 * checks.adb (Insert_Valid_Check): If the expression is a packed
1797 component of a modular type of the right size the data is always
1798 valid. This os particularly useful if the component is part of
1799 a volatile variable.
1800
1801 2014-07-16 Robert Dewar <dewar@adacore.com>
1802
1803 * gnat_rm.texi, sinfo.ads, freeze.adb, exp_aggr.adb: Minor reformatting
1804
1805 2014-07-16 Thomas Quinot <quinot@adacore.com>
1806
1807 * exp_ch7.ads: Minor documentation fix.
1808
1809 2014-07-16 Ed Schonberg <schonberg@adacore.com>
1810
1811 * sem_ch3.adb (Find_Type_Name): Diagnose properly
1812 a private extension completion that is an interface definition
1813 with an interface list.
1814
1815 2014-07-16 Arnaud Charlet <charlet@adacore.com>
1816
1817 * gnatls.adb (Gnatls): Code clean ups.
1818
1819 2014-07-16 Thomas Quinot <quinot@adacore.com>
1820
1821 * sinfo.ads, sinfo.adb (N_Compound_Statement): New node kind.
1822 * sem.adb (Analyze): Handle N_Compound_Statement.
1823 * sprint.adb (Sprint_Node_Actual): Ditto.
1824 * sem_ch5.ads, sem_ch5.adb (Analyze_Compound_Statement): New
1825 procedure to handle N_Compound_Statement.
1826 * exp_aggr.adb (Collect_Initialization_Statements):
1827 Use a proper compound statement node, instead of a bogus
1828 expression-with-actions with a NULL statement as its expression,
1829 to wrap collected initialization statements.
1830 * freeze.ads, freeze.adb
1831 (Explode_Initialization_Compound_Statement): New public procedure,
1832 lifted from Freeze_Entity.
1833 (Freeze_Entity): When freezing
1834 an object with captured initialization statements and without
1835 delayed freezing, explode compount statement.
1836 * sem_ch4.adb (Analyze_Expression_With_Actions): Remove special
1837 case that used to handle bogus EWAs with NULL statement as
1838 the expression.
1839 * exp_ch13.adb (Expand_N_Freeze_Entity): For an object with
1840 delayed freezing and captured initialization statements, explode
1841 compound statement.
1842
1843 2014-07-16 Gary Dismukes <dismukes@adacore.com>
1844
1845 * g-rewdat.adb, g-rewdat.ads: Minor reformatting.
1846
1847 2014-07-16 Doug Rupp <rupp@adacore.com>
1848
1849 * s-interr-hwint.adb: Casing error on parameter.
1850
1851 2014-07-16 Pascal Obry <obry@adacore.com>
1852
1853 * Makefile.rtl: Add g-rewdat.o dependencies in
1854 GNATRTL_NONTASKING_OBJS.
1855
1856 2014-07-16 Ed Schonberg <schonberg@adacore.com>
1857
1858 * sem_case.adb: Code clean up.
1859
1860 2014-07-16 Vincent Celier <celier@adacore.com>
1861
1862 * make.adb: Do not read gnat.adc when gnatmake is invoked
1863 with -gnatA.
1864
1865 2014-07-16 Pascal Obry <obry@adacore.com>
1866
1867 * gnat_rm.texi, impunit.adb, g-rewdat.adb, g-rewdat.ads: Initial
1868 implementation of GNAT.Rewrite_Data.
1869
1870 2014-07-16 Vincent Celier <celier@adacore.com>
1871
1872 * gnatls.adb (Normalize): New function.
1873 (Gnatls): Get the target parameters. On targets other than VMS,
1874 normalize the path names in the source search path, the object search
1875 path and the project search path.
1876
1877 2014-07-16 Ed Schonberg <schonberg@adacore.com>
1878
1879 * sem_case.adb: Avoid self-checking of case expressions in
1880 dynamic predicates.
1881
1882 2014-07-16 Robert Dewar <dewar@adacore.com>
1883
1884 * gnat_rm.texi: Document effect of Suppress_Initialization on tags and
1885 discriminants.
1886
1887 2014-07-16 Eric Botcazou <ebotcazou@adacore.com>
1888
1889 * switch-b.adb (Scan_Binder_Switches): Add missing guard.
1890
1891 2014-07-16 Ben Brosgol <brosgol@adacore.com>
1892
1893 * gnat_ugn.texi: Fix typo.
1894
1895 2014-07-16 Ed Schonberg <schonberg@adacore.com>
1896
1897 * exp_ch4.adb (Expand_N_Case_Expression): Do not expand case
1898 expression if it is the specification of a subtype predicate:
1899 it will be expanded when the return statement is analyzed, or
1900 when a static predicate is transformed into a static expression
1901 for evaluation by the front-end.
1902 * sem_ch13.adb (Get_RList): If the expression for a static
1903 predicate is a case expression, extract the alternatives of the
1904 branches with a True value to create the required statically
1905 evaluable expression.
1906
1907 2014-07-16 Thomas Quinot <quinot@adacore.com>
1908
1909 * exp_prag.adb (Expand_Pragma_Check): Use the location of the
1910 expression, not the location of the aspect, for all generated
1911 code, so that in particular the call to raise_assert_failure
1912 gets the sloc of the associated condition.
1913 * exp_ch6.adb
1914 (Expand_Subprogram_Contract.Build_Postconditions_Procedure):
1915 Set an explicit End_Label on the handled sequence of statements
1916 for the _Postconditions procedure so that the implicit return
1917 statement does not erroneously get associated with code generated
1918 for the last condition in postconditions.
1919
1920 2014-07-16 Thomas Quinot <quinot@adacore.com>
1921
1922 * ug_words: Fix name of VMS synonym for -gnatw.z (SIZE_ALIGNMENT,
1923 not SIZE_ALIGN) and -gnatw.Z (NOSIZE_ALIGNMENT, not NOSIZE_ALIGN).
1924 * vms_data.ads: Add missing spaces in VMS synonyms for -gnatw.z /
1925 -gnatw.Z.
1926
1927 2014-07-16 Robert Dewar <dewar@adacore.com>
1928
1929 * sem_ch3.adb, sem_prag.adb, sem_util.adb, sem_res.adb, sem_ch13.adb:
1930 Minor code reorganization (use Is_Access_Type, not in Access_Kind).
1931 * exp_ch3.adb: Minor code reorganization, use Is_Access_Type,
1932 not in Access_Kind.
1933 * par-ch4.adb (At_Start_Of_Attribute): New function
1934 (P_Simple_Expression): Better msg for bad attribute prefix.
1935 * scans.ads: Minor reformatting.
1936
1937 2014-07-16 Ed Schonberg <schonberg@adacore.com>
1938
1939 * sem_attr.adb (Resolve_Attribute, case 'Update): If choice is a
1940 static constant, check that in belongs to the corresponding index
1941 subtype, to produce the proer warning when expansion is disabled.
1942
1943 2014-07-16 Robert Dewar <dewar@adacore.com>
1944
1945 * freeze.adb (Freeze_Entity): Warn on incompatible size/alignment.
1946 * gnat_ugn.texi: Document -gnatw.z and -gnatw.Z.
1947 * ug_words: VMS synonyms (WARNINGS=[NO]SIZE_ALIGN) for -gnatw.z/-gnatw.Z
1948 * usage.adb: Add lines for -gnatw.z/-gnatw.Z.
1949 * vms_data.ads: VMS synonyms (WARNINGS=[NO]SIZE_ALIGN) for
1950 -gnatw.z/-gnatw.Z
1951 * warnsw.adb: Set Warn_On_Size_Alignment appropriately.
1952 * warnsw.ads (Warn_On_Size_Alignment): New flag Minor
1953 reformatting.
1954
1955 2014-07-16 Hristian Kirtchev <kirtchev@adacore.com>
1956
1957 * exp_ch7.adb (Process_Declarations): Reinstate the check on
1958 a hook object to ensure that the related transient declaration
1959 is finalizable.
1960 * exp_util.adb (Is_Aliased): Do not consider expresison with
1961 actions as a special context.
1962 (Requires_Cleanup_Actions): Reinstate the check on a hook object to
1963 ensure that the related transient declaration is finalizable.
1964
1965 2014-07-16 Robert Dewar <dewar@adacore.com>
1966
1967 * checks.ads, checks.adb (Allocation_Checks_Suppressed): New function.
1968 * snames.ads-tmpl: Add Allocation_Check to list of check names.
1969 * types.ads: Add Allocation_Check to list of check names.
1970
1971 2014-07-16 Thomas Quinot <quinot@adacore.com>
1972
1973 * sem_util.adb (Enter_Name): replace bogus test for presence of
1974 Corresponding_Remote_Type with correct test on Ekind.
1975 * sem_res.adb (Valid_Conversion): ditto; also clarify validity
1976 of calls to Corresponding_ Remote_Type (documentation fix).
1977
1978 2014-07-16 Robert Dewar <dewar@adacore.com>
1979
1980 * gnat_rm.texi: Document illegal case of Unrestricted_Access.
1981 * sem_attr.adb (Analyze_Access_Attribute): Set_Non_Aliased_Prefix
1982 where it applies.
1983 (Resolve_Attribute, case Access): Flag illegal Unrestricted_Access use.
1984 * sinfo.ads, sinfo.adb (Non_Aliased_Prefix): New flag.
1985
1986 2014-07-16 Robert Dewar <dewar@adacore.com>
1987
1988 * gnat_ugn.texi: Document binder switch -Ra.
1989 * gnatbind.adb (List_Closure_Display): Implement -Ra switch
1990 (List_Closure_All).
1991 * opt.ads (List_Closure_All): New switch.
1992 * switch-b.adb (Scan_Binder_Switches): Recognize -Ra to set
1993 List_Closure_All.
1994
1995 2014-07-16 Ben Brosgol <brosgol@adacore.com>
1996
1997 * gnat_rm.texi: Minor edits, to make case consistent in names
1998 of types and fields.
1999
2000 2014-07-16 Robert Dewar <dewar@adacore.com>
2001
2002 * gnat_rm.texi: Document erroneous mixing of thin pointers and
2003 unrestricted access
2004 * gnat_ugn.texi: Add note on size of access types about thin
2005 pointers and the use of attribute Unrestricted_Access.
2006
2007 2014-07-16 Ed Schonberg <schonberg@adacore.com>
2008
2009 * a-cbdlli.ads, a-cbdlli.adb, a-cbhama.ads, a-cbhama.adb,
2010 * a-cbhase.ads, a-cbhase.adb, a-cborma.ads, a-cborma.adb,
2011 * a-cborse.ads, a-cborse.adb, a-cobove.ads a-cobove.adb: Add Control
2012 machinery to detect tampering on bounded vectors.
2013
2014 2014-07-16 Robert Dewar <dewar@adacore.com>
2015
2016 * gnat_rm.texi: Document that leading/trailing asterisks are
2017 now implied for the pattern match string for pragma Warnings
2018 and Warning_As_Error.
2019 * sem_prag.adb (Acquire_Warning_Match_String): New procedure.
2020 (Analyze_Pragma, case Warning_As_Error): Call
2021 Acquire_Warning_Match_String.
2022 (Analyze_Pragma, case Warnings): Call Acquire_Warning_Match_String.
2023
2024 2014-07-16 Bob Duff <duff@adacore.com>
2025
2026 * gnat_ugn.texi: Document need for project file
2027 for --incremental switch for gnat2xml.
2028
2029 2014-07-16 Robert Dewar <dewar@adacore.com>
2030
2031 * gnat_rm.texi: Fix example of non-packable components in packed
2032 records section.
2033
2034 2014-07-16 Robert Dewar <dewar@adacore.com>
2035
2036 * s-tpoben.adb, s-tasren.adb, s-interr.adb, s-interr-hwint.adb,
2037 s-shasto.adb, s-interr-vms.adb, s-interr-sigaction.adb: Avoid use of
2038 upper case in exception messages.
2039
2040 2014-07-16 Robert Dewar <dewar@adacore.com>
2041
2042 * snames.ads-tmpl, sem_attr.adb, exp_attr.adb: Same_Storage attribute
2043 is renamed Has_Same_Storage.
2044 * gnat_rm.texi: Document missing SPARK pragmas and attributes.
2045 * sem_prag.adb: Minor comment fix (use LOCAL_NAME in syntax
2046 descriptions).
2047
2048 2014-07-16 Robert Dewar <dewar@adacore.com>
2049
2050 * exp_util.adb, sem_attr.adb, exp_ch4.adb, a-cohase.ads,
2051 a-coinho-shared.adb, a-coinho-shared.ads: Minor reformatting.
2052
2053 2014-07-16 Robert Dewar <dewar@adacore.com>
2054
2055 * gnat_ugn.texi: Add note that integrated
2056 preprocessing cannot be applied to configuration pragma files.
2057
2058 2014-07-16 Yannick Moy <moy@adacore.com>
2059
2060 * sem_attr.adb (Analyze_Attribute/cases Pred
2061 and Succ): Always enable range check on fixed-point types if
2062 not suppressed for the type.
2063
2064 2014-07-16 Hristian Kirtchev <kirtchev@adacore.com>
2065
2066 * sem_util.adb (State_Has_Enabled_Property):
2067 Account for an external property denoted by an others choice.
2068
2069 2014-07-16 Hristian Kirtchev <kirtchev@adacore.com>
2070
2071 * exp_ch4.ads, exp_ch4.adb (Find_Hook_Context): Relocated to Exp_Util.
2072 * exp_ch7.adb (Process_Declarations): There is no need to check
2073 that a transient object being hooked is controlled as it would
2074 not have been hooked in the first place.
2075 * exp_ch9.adb Remove with and use clause for Exp_Ch4.
2076 * exp_util.adb (Find_Hook_Context): Relocated from Exp_Ch4.
2077 (Is_Aliased): A renaming of a transient controlled object is
2078 not considered aliasing when it occurs within an expression
2079 with actions.
2080 (Requires_Cleanup_Actions): There is no need to
2081 check that a transient object being hooked is controlled as it
2082 would not have been hooked in the first place.
2083 * exp_util.ads (Find_Hook_Context): Relocated from Exp_Ch4.
2084
2085 2014-07-16 Hristian Kirtchev <kirtchev@adacore.com>
2086
2087 * sem_ch13.adb (Insert_After_SPARK_Mode): Moved to
2088 the outer level of routine Analyze_Aspect_Specifications. Ensure
2089 that the corresponding pragmas of aspects Initial_Condition and
2090 Initializes are inserted after pragma SPARK_Mode.
2091
2092 2014-07-16 Ed Schonberg <schonberg@adacore.com>
2093
2094 * sem_attr.adb (Analyze_Attribute, case 'Update): Handle
2095 properly a choice list with more than one choice, where each
2096 is an aggregate denoting a sequence of array indices for a
2097 multidimentional array. For SPARK use.
2098
2099 2014-07-16 Vadim Godunko <godunko@adacore.com>
2100
2101 * a-coinho-shared.adb (Adjust): Create
2102 copy of internal shared object and element when source container
2103 is locked.
2104 (Copy): Likewise.
2105 (Query_Element): Likewise.
2106 (Update_Element): Likewise.
2107 (Constant_Reference): Likewise. Raise Constraint_Error on attempt
2108 to get reference for empty holder.
2109 (Reference): Likewise.
2110
2111 2014-07-16 Thomas Quinot <quinot@adacore.com>
2112
2113 * exp_ch4.adb (Find_Hook_Context): New subprogram, extracted
2114 from Process_Transient_Oject.
2115 * exp_ch4.ads: Ditto.
2116 * exp_ch9.adb (Build_Class_Wide_Master): Insert the _master
2117 declaration as an action on the topmost enclosing expression,
2118 not on a possibly conditional subexpreession.
2119
2120 2014-07-16 Vadim Godunko <godunko@adacore.com>
2121
2122 * a-coinho.adb, a-coinho-shared.adb, a-coinho.ads, a-coinho-shared.ads:
2123 Fix parameter mode of Update_Element.
2124
2125 2014-07-16 Robert Dewar <dewar@adacore.com>
2126
2127 * a-coinho.adb, a-coinho-shared.adb, a-coinho-shared.ads: Minor
2128 reformatting.
2129
2130 2014-07-16 Ed Schonberg <schonberg@adacore.com>
2131
2132 * a-cohase.ads: Type Iterator must be controlled, so that the
2133 tampering bit is properly set through an iteration.
2134 * a-cohase.adb: Add Finalize operation for type Iterator.
2135
2136 2014-07-16 Ed Schonberg <schonberg@adacore.com>
2137
2138 * a-coinho-shared.adb, a-coinho-shared.ads: Proper structures for
2139 tampering checks.
2140
2141 2014-07-16 Ed Schonberg <schonberg@adacore.com>
2142
2143 * a-coinho-shared.adb: Fix spurious accessibility check.
2144
2145 2014-06-15 Jan Hubicka <hubicka@ucw.cz>
2146
2147 * gcc-interface/utils.c (process_attributes): Use set_decl_tls_model.
2148
2149 2014-06-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
2150
2151 PR ada/61505
2152 * gnat_rm.texi: Fix errors with makeinfo 5.1.
2153
2154 2014-06-14 Arnaud Charlet <charlet@adacore.com>
2155
2156 PR ada/61505
2157 * gnat_rm.texi: Attempt to fix error with makeinfo 5.1.
2158
2159 2014-06-13 Yannick Moy <moy@adacore.com>
2160
2161 * exp_attr.adb: Fix typo in comment.
2162 * gnat1drv.adb (Adjust_Global_Switches): Force float overflow
2163 checking in GNATprove_Mode.
2164
2165 2014-06-13 Ed Schonberg <schonberg@adacore.com>
2166
2167 * a-coinho-shared.adb, a-coinho-shared.ads: Update shared version.
2168
2169 2014-06-13 Robert Dewar <dewar@adacore.com>
2170
2171 * sem_ch3.adb, sem_ch9.adb, a-coinho.adb, a-coinho.ads: Minor
2172 reformatting.
2173
2174 2014-06-13 Hristian Kirtchev <kirtchev@adacore.com>
2175
2176 * sem_prag.adb (Analyze_Pragma): Add local
2177 variable Missing_Parentheses. Emit an error when a state
2178 declaration with options appears without parentheses. Add a
2179 guard to prevent a bogus error when a state declaration may be
2180 interpreted as an option if a previous declaration with options
2181 was not parenthesized.
2182
2183 2014-06-13 Robert Dewar <dewar@adacore.com>
2184
2185 * checks.adb: Validate_Alignment_Check_Warnings: New procedure
2186 (Apply_Address_Clause_Check): Make Aligment_Warnings table entry.
2187 * checks.ads (Alignment_Warnings_Record): New type.
2188 (Alignment_Warnings): New table
2189 (Validate_Alignment_Check_Warnings): New procedure.
2190 * errout.adb (Delete_Warning_And_Continuations): New procedure
2191 (Error_Msg_Internal): Set Warning_Msg (Delete_Warning): Handle
2192 Warnings_Treated_As_Errors (Finalize): Minor reformatting
2193 * errout.ads (Warning_Msg): New variable
2194 (Delete_Warning_And_Continuations): New procedure
2195 * erroutc.adb (Delete_Msg): Handle Warnings_Treated_As_Errors count.
2196 * gnat1drv.adb (Post_Compilation_Validation_Checks): New procedure.
2197
2198 2014-06-13 Ed Schonberg <schonberg@adacore.com>
2199
2200 * a-coinho.adb, a-coinho.ads: Add Reference machinery.
2201
2202 2014-06-13 Hristian Kirtchev <kirtchev@adacore.com>
2203
2204 * errout.adb (SPARK_Msg_N): New routine.
2205 (SPARK_Msg_NE): New routine.
2206 * errout.ads Add a section on SPARK-related error routines.
2207 (SPARK_Msg_N): New routine.
2208 (SPARK_Msg_NE): New routine.
2209 * sem_ch13.adb (Analyze_Aspect_Specifications): Ensure that
2210 pragma Abstract_State is always inserted after SPARK_Mode.
2211 (Insert_After_SPARK_Mode): New routine.
2212 * sem_prag.adb (Analyze_Abstract_State,
2213 Analyze_Constituent, Analyze_External_Property,
2214 Analyze_External_Property_In_Decl_Part, Analyze_Global_Item,
2215 Analyze_Global_List, Analyze_Initialization_Item,
2216 Analyze_Initialization_Item_With_Inputs, Analyze_Input_Item,
2217 Analyze_Input_List, Analyze_Input_Output, Analyze_Part_Of,
2218 Analyze_Pragma, Analyze_Refined_Depends_In_Decl_Part,
2219 Analyze_Refined_Global_In_Decl_Part,
2220 Analyze_Refined_State_In_Decl_Part, Analyze_Refinement_Clause,
2221 Check_Aspect_Specification_Order, Check_Constituent_Usage,
2222 Check_Declaration_Order, Check_Dependency_Clause,
2223 Check_Duplicate_Mode, Check_Duplicate_Option,
2224 Check_Duplicate_Property, Check_External_Properties,
2225 Check_External_Property, Check_Function_Return,
2226 Check_Matching_Constituent, Check_Matching_State,
2227 Check_Mode_Restriction_In_Enclosing_Context,
2228 Check_Mode_Restriction_In_Function, Check_Refined_Global_Item,
2229 Check_State_And_Constituent_Use, Create_Or_Modify_Clause,
2230 Has_Extra_Parentheses, Inconsistent_Mode_Error,
2231 Match_Error, Propagate_Part_Of, Report_Extra_Clauses,
2232 Report_Extra_Constituents_In_List, Report_Extra_Inputs,
2233 Report_Unrefined_States, Report_Unused_Constituents,
2234 Report_Unused_States, Role_Error, Usage_Error):
2235 Convert Error_Msg_XXX calls to SPARK_Msg_XXX calls
2236 to report semantic errors only when SPARK_Mode is on.
2237 (Analyze_Depends_In_Decl_Part): Do not check the syntax of
2238 pragma Depends explicitly, this is now done by the analysis.
2239 (Analyze_Global_In_Decl_List): Do not check the syntax of
2240 pragma Global explicitly, this is now done by the analysis.
2241 (Analyze_Initializes_In_Decl_Part): Do not check the syntax of
2242 pragma Initializes explicitly, this is now done by the analysis.
2243 (Analyze_Part_Of): Do not check the syntax of the encapsulating
2244 state, this is now done by the analysis.
2245 (Analyze_Pragma): Do
2246 not check the syntax of a state declaration, this is now done
2247 by the analysis.
2248 (Analyze_Refined_Depends_In_Decl_Part): Do not
2249 check the syntax of pragma Refined_Depends explicitly, this is now
2250 done by the analysis.
2251 (Analyze_Refined_Global_In_Decl_Part): Do
2252 not check the syntax of pragma Refined_Global explicitly, this is
2253 now done by the analysis.
2254 (Analyze_Refined_State_In_Decl_Part):
2255 Do not check the syntax of pragma Refined_State explicitly, this
2256 is now done by the analysis.
2257 (Check_Dependence_List_Syntax): Removed.
2258 (Check_Global_List_Syntax): Removed.
2259 (Check_Initialization_List_Syntax): Removed.
2260 (Check_Item_Syntax): Removed.
2261 (Check_Missing_Part_Of): Do not consider items from an instance.
2262 (Check_Refinement_List_Syntax): Removed.
2263 (Check_State_Declaration_Syntax): Removed.
2264 (Collect_Global_List): Do not raise Program_Error when the input is
2265 malformed.
2266 (Process_Global_List): Do not raise Program_Error when the input
2267 is malformed.
2268 * sem_ch13.adb: Minor reformatting.
2269
2270 2014-06-13 Ed Schonberg <schonberg@adacore.com>
2271
2272 * sem_ch3.adb (Find_Type_Name): Diagnose a private type completion
2273 that is an interface definition with an interface list.
2274 (Process_Full_View): Move error message on missmatched interfaces
2275 between views to the declaration of full view, for clarity.
2276 * sem_ch9.adb (Check_Interfaces): Move error message to full view,
2277 for clarity.
2278
2279 2014-06-13 Robert Dewar <dewar@adacore.com>
2280
2281 * exp_attr.adb (Expand_N_Attribute_Reference, case Pred/Succ): Change
2282 reason to Overflow.
2283
2284 2014-06-13 Robert Dewar <dewar@adacore.com>
2285
2286 * makeutl.adb: Minor reformatting.
2287
2288 2014-06-13 Gail Schenker <schenker@adacore.com>
2289
2290 * debug.adb, sem_eval.adb (Why_Not_Static): Remove temporary code and
2291 associated flag (d.z), no longer needed.
2292
2293 2014-06-13 Ed Schonberg <schonberg@adacore.com>
2294
2295 * sem_ch13.adb (Analyze_Aspect_Specifications): For Import and
2296 Export aspects, do not check whether a corresponding Convention
2297 aspect has been specified. Convention is optional in Ada2012,
2298 and defaults to Convention_Ada.
2299
2300 2014-06-13 Eric Botcazou <ebotcazou@adacore.com>
2301
2302 * checks.adb (Apply_Address_Clause_Check): Only issue the new
2303 warning if the propagation warning is issued.
2304
2305 2014-06-13 Thomas Quinot <quinot@adacore.com>
2306
2307 * exp_ch4.adb: Minor reformatting.
2308
2309 2014-06-13 Robert Dewar <dewar@adacore.com>
2310
2311 * exp_attr.adb (Expand_N_Attribute_Reference, case Pred):
2312 Handle float range check case (Expand_N_Attribute_Reference,
2313 case Succ): Handle float range check case.
2314 * sem_attr.adb (Analyze_Attribute, case Pred/Succ): Handle float
2315 range check case.
2316
2317 2014-06-13 Vincent Celier <celier@adacore.com>
2318
2319 * makeutl.ads (Compute_Builder_Switches): Change name of
2320 parameter Root_Environment to Env.
2321 * prj-conf.adb (Check_Switches): Call Locate_Runtime with the
2322 Env parameter of procedure Get_Or_Create_Configuration_File.
2323 (Locate_Runtime): Call Find_Rts_In_Path with the Project_Path
2324 of new parameter Env.
2325 * prj-conf.ads (Locate_Runtime): New parameter Env of type
2326 Prj.Tree.Environment.
2327
2328 2014-06-13 Robert Dewar <dewar@adacore.com>
2329
2330 * gnat_rm.texi: Minor comment clarification for Check_Float_Overflow.
2331
2332 2014-06-13 Robert Dewar <dewar@adacore.com>
2333
2334 * exp_attr.adb, exp_ch9.adb, lib-writ.adb, g-comlin.adb: Minor
2335 reformatting.
2336 * sem_attr.adb: Minor code reformatting and simplification.
2337 * checks.adb: Fix minor typo.
2338
2339 2014-06-13 Emmanuel Briot <briot@adacore.com>
2340
2341 * g-comlin.adb (Get_Argument): fix expansion
2342 of command line arguments (e.g. "*.adb") when using a custom
2343 parser. The parser was not passed to the recursive call, and
2344 thus we were trying to do the expansion on the default command
2345 line parser.
2346
2347 2014-06-13 Thomas Quinot <quinot@adacore.com>
2348
2349 * exp_ch9.adb: Minor reformatting.
2350
2351 2014-06-13 Ed Schonberg <schonberg@adacore.com>
2352
2353 * exp_attr.adb (Expand_N_Attribute_Reference, case 'Old):
2354 To determine whether the attribute should be expanded, examine
2355 whether the enclosing postcondition pragma is to be checked,
2356 rather than using the internal flag Assertions_Enabled.
2357
2358 2014-06-13 Ben Brosgol <brosgol@adacore.com>
2359
2360 * gnat_rm.texi: Minor fixes.
2361 * gnat_ugn.texi: Added a missing "@itemize".
2362
2363 2014-06-13 Robert Dewar <dewar@adacore.com>
2364
2365 * debug.adb: Remove -gnatd.1 flag documentation.
2366 * layout.adb (Layout_Type): Remove special handling of size
2367 for anonymous access type.
2368 * sem_ch3.adb (Replace_Type): Remove special handling of size
2369 for anonymous access type.
2370
2371 2014-06-13 Robert Dewar <dewar@adacore.com>
2372
2373 * debug.adb: Document debug flag -gnatd.1.
2374 * layout.adb (Layout_Type): Size change for anonymous access
2375 types under -gnatd.1.
2376 * sem_ch3.adb (Replace_Type): Size change for anonymous access
2377 types under -gnatd.1.
2378
2379 2014-06-13 Robert Dewar <dewar@adacore.com>
2380
2381 * layout.adb (Layout_Type): Anonymous access types designating
2382 unconstrained arrays are always thin pointers.
2383 * sem_ch3.adb (Replace_Type): Anonymous access types designating
2384 unconstrained arrays are always thin pointers.
2385
2386 2014-06-13 Ed Schonberg <schonberg@adacore.com>
2387
2388 * sem_attr.adb (Analyze_Attribute): Use Check_Parameterless_Call
2389 to resolve the prefix of an attribute that is an entity name
2390 and may be a parameterless call. Minor code reorganization.
2391
2392 2014-06-13 Robert Dewar <dewar@adacore.com>
2393
2394 * lib.ads, lib.adb, lib-writ.adb, lib-load.adb (Is_Compiler_Unit):
2395 Removed.
2396 * opt.ads (Compiler_Unit): New flag.
2397 * par-ch5.adb (Test_Statement_Required): Call Check_Compiler_Unit
2398 for null statement sequence (not allowed in compiler unit).
2399 * par-prag.adb (Prag): Handle Compiler_Unit[_Warning] during
2400 parsing.
2401 * restrict.ads, restrict.adb (Check_Compiler_Unit): New version and new
2402 calling sequence.
2403 * sem_ch11.adb, sem_ch3.adb, sem_ch4.adb: New calling sequence for
2404 Check_Compiler_Unit.
2405 * sem_ch6.adb (Analyze_Extended_Return_Statement): Call
2406 Check_Compiler_Unit (this construct is not allowed in compiler
2407 units).
2408 * sem_prag.adb (Analyze_Pragma, case Compiler_Unit[_Warning]):
2409 Set Opt.Compiler_Unit.
2410
2411 2014-06-13 Geert Bosch <bosch@adacore.com>
2412
2413 * gnat_rm.texi, s-tasinf-solaris.ads, sem_prag.adb, gnat_ugn.texi,
2414 s-tasinf-mingw.ads, s-tasinf.ads, s-tasinf-linux.ads,
2415 s-tasinf-vxworks.ads: Make Task_Info pragma and package obsolescent.
2416
2417 2014-06-13 Robert Dewar <dewar@adacore.com>
2418
2419 * s-tasini.adb, s-tarest.adb, s-taprob.adb: Minor reformatting.
2420
2421 2014-06-13 Hristian Kirtchev <kirtchev@adacore.com>
2422
2423 * freeze.adb (Freeze_Entity): Remove the check concerning volatile
2424 types in SPARK as it is poorly placed and poorly formulated. The
2425 check was flagging ALL volatile entities as illegal in SPARK.
2426 * sem_prag.adb (Process_Atomic_Shared_Volatile): Flag volatile
2427 types as illegal in SPARK.
2428
2429 2014-06-13 Robert Dewar <dewar@adacore.com>
2430
2431 * sem_cat.adb: Minor reformatting.
2432
2433 2014-06-13 Yannick Moy <moy@adacore.com>
2434
2435 * sem_prag.adb (Analyze_Pragma/Post_Class): Fix typo.
2436
2437 2014-06-13 Arnaud Charlet <charlet@adacore.com>
2438
2439 * gnat_rm.texi: Add detail on SPARK_05 restriction.
2440
2441 2014-06-13 Bob Duff <duff@adacore.com>
2442
2443 * s-solita.adb (Get_Sec_Stack_Addr, Init_Tasking_Soft_Links):
2444 Add assertions requiring the secondary stack to be initialized.
2445 * s-solita.ads (Init_Tasking_Soft_Links): Comment.
2446 * s-taprob.adb, s-tarest.adb, s-tasini.adb (elab code): Make sure the
2447 secondary stack is initialized before calling Init_Tasking_Soft_Links,
2448 by adding pragmas Elaborate_Body.
2449
2450 2014-06-13 Thomas Quinot <quinot@adacore.com>
2451
2452 * sem_ch13.adb (Analyze_Stream_TSS_Definition): Remove temporary
2453 kludge disabling new legality check.
2454
2455 2014-06-13 Hristian Kirtchev <kirtchev@adacore.com>
2456
2457 * freeze.adb (Freeze_Record_Type): Remove checks related to SPARK
2458 volatile types.
2459 (Freeze_Type): Volatile types are now illegal in SPARK.
2460
2461 2014-06-13 Robert Dewar <dewar@adacore.com>
2462
2463 * aspects.ads, aspects.adb: Add aspect Thread_Local_Storage.
2464 * gnat_rm.texi: Document aspect Thread_Local_Storage.
2465
2466 2014-06-13 Ed Schonberg <schonberg@adacore.com>
2467
2468 * sem_cat.adb (Validate_Static_Object_Name): A constant whose
2469 value is a temporary that renames an aggregate is legal in a
2470 preelaborated unit. Illegalities, if any will be detected in
2471 the aggregate components.
2472
2473 2014-06-13 Ed Schonberg <schonberg@adacore.com>
2474
2475 * einfo.ads: Minor reformatting an comment expansion.
2476
2477 2014-06-13 Robert Dewar <dewar@adacore.com>
2478
2479 * back_end.ads, back_end.adb: Make_Id, Make_SC, Set_RND are moved to
2480 Tbuild.
2481 * tbuild.ads, tbuild.adb: Make_Id, Make_SC, Set_RND are moved here from
2482 Back_End.
2483 * gnat1drv.adb: Make_Id, Make_SC, Set_RND are moved to Tbuild
2484 * sem_warn.adb: Minor reformatting.
2485
2486 2014-06-13 Doug Rupp <rupp@adacore.com>
2487
2488 * adaint.c (__gnat_open_new_temp) [VMS]: Open binary
2489 files with rfm=udf.
2490
2491 2014-06-13 Yannick Moy <moy@adacore.com>
2492
2493 * sem_warn.adb (Check_Unset_References): Take
2494 case of Refined_Post into account in Within_Postcondition check.
2495
2496 2014-06-13 Hristian Kirtchev <kirtchev@adacore.com>
2497
2498 * freeze.adb (Freeze_Record_Type): Volatile types are not allowed in
2499 SPARK.
2500
2501 2014-06-13 Yannick Moy <moy@adacore.com>
2502
2503 * sem_ch13.adb (Analyze_Aspect_Specifications/Aspect_Import,
2504 Aspect_Export): Consider that variables may be set outside the program.
2505
2506 2014-06-13 Robert Dewar <dewar@adacore.com>
2507
2508 * back_end.adb (Make_Id): New function.
2509 (Make_SC): New function.
2510 (Set_RND): New procedure.
2511 * back_end.ads (Make_Id): New function.
2512 (Make_SC): New function.
2513 (Set_RND): New procedure.
2514 * einfo.ads: Minor comment updates.
2515 * frontend.adb: Move Atree.Initialize call to Gnat1drv.
2516 * gnat1drv.adb (Gnat1drv): New calling sequence for
2517 Get_Target_Parameters.
2518 (Gnat1drv): Move Atree.Initialize here from Frontend.
2519 * targparm.adb (Get_Target_Parameters): New calling
2520 sequence (Get_Target_Parameters): Handle pragma Restriction
2521 (No_Dependence,..)
2522 * targparm.ads (Get_Target_Parameters): New calling sequence.
2523
2524 2014-06-13 Gary Dismukes <dismukes@adacore.com>
2525
2526 * sem_prag.adb (Process_Import_Or_Interface): Exit the homonym
2527 loop if the pragma does not come from source, so that an implicit
2528 pragma Import only applies to the first declaration, avoiding
2529 possible conflicts with earlier explicit and implicit declarations
2530 due to multiple Provide_Shift_Operators pragmas.
2531 (Set_Imported): Remove previous fix that bypassed pragma duplication
2532 error.
2533 * gnat_rm.texi: Change 'equivalent' to 'similar' in description
2534 of Provide_Shift_Operators.
2535
2536 2014-06-12 Jan Hubicka <hubicka@ucw.cz>
2537
2538 * gcc-interface/utils.c (process_attributes) <ATTR_LINK_SECTION>: Pass
2539 string pointer directly to set_decl_section_name.
2540
2541 2014-06-11 Robert Dewar <dewar@adacore.com>
2542
2543 * sem_ch13.adb: Minor reformatting.
2544
2545 2014-06-11 Hristian Kirtchev <kirtchev@adacore.com>
2546
2547 * sem_prag.adb (Check_Clause_Syntax): Add new
2548 local variable Outputs. Account for the case where multiple
2549 output items appear as an aggregate.
2550
2551 2014-06-11 Robert Dewar <dewar@adacore.com>
2552
2553 * sem_warn.adb (Output_Obsolescent_Entity_Warnings): Tag warning
2554 with ?j? not ??.
2555
2556 2014-06-11 Ed Schonberg <schonberg@adacore.com>
2557
2558 * einfo.ads: Minor reformatting.
2559
2560 2014-06-11 Hristian Kirtchev <kirtchev@adacore.com>
2561
2562 * a-cbdlli.adb, a-cdlili.adb, a-cidlli.adb, a-crdlli.adb (Insert): Add
2563 new variable First_Node. Update the position after all insertions have
2564 taken place to First_Node.
2565
2566 2014-06-11 Robert Dewar <dewar@adacore.com>
2567
2568 * debug.adb: Remove debug flag -gnatd.1, no longer needed.
2569 * layout.adb (Layout_Type): Remove test of -gnatd.1.
2570
2571 2014-06-11 Robert Dewar <dewar@adacore.com>
2572
2573 * sem_ch13.adb: Minor reformatting.
2574
2575 2014-06-11 Hristian Kirtchev <kirtchev@adacore.com>
2576
2577 * sem_prag.adb (Check_Clause_Syntax): Add new
2578 local variable Outputs. Account for the case where multiple
2579 output items appear as an aggregate.
2580
2581 2014-06-11 Robert Dewar <dewar@adacore.com>
2582
2583 * sem_warn.adb (Output_Obsolescent_Entity_Warnings): Tag warning
2584 with ?j? not ??.
2585
2586 2014-06-11 Ed Schonberg <schonberg@adacore.com>
2587
2588 * einfo.ads: Minor reformatting.
2589
2590 2014-06-11 Hristian Kirtchev <kirtchev@adacore.com>
2591
2592 * a-cbdlli.adb, a-cdlili.adb, a-cidlli.adb, a-crdlli.adb (Insert): Add
2593 new variable First_Node. Update the position after all insertions have
2594 taken place to First_Node.
2595
2596 2014-06-11 Robert Dewar <dewar@adacore.com>
2597
2598 * debug.adb: Remove debug flag -gnatd.1, no longer needed.
2599 * layout.adb (Layout_Type): Remove test of -gnatd.1.
2600
2601 2014-06-11 Thomas Quinot <quinot@adacore.com>
2602
2603 * freeze.ads: Minor reformatting.
2604 * checks.adb (Determine_Range): Do not attempt to determine
2605 the range of a deferred constant whose full view has not been
2606 seen yet.
2607 * sem_res.adb (Resolve): Remove undesirable guard against
2608 resolving expressions from expression functions.
2609
2610 2014-06-11 Robert Dewar <dewar@adacore.com>
2611
2612 * debug.adb (Debug_Flag_Dot_1): Set to enable fix for anonymous
2613 access types.
2614 * layout.adb (Layout_Type): Make anonymous access types for
2615 subprogram formal types and return types always thin. For now
2616 only enabled if -gnatd.1 set.
2617
2618 2014-06-11 Ed Schonberg <schonberg@adacore.com>
2619
2620 * sem_ch13.adb (Analyze_Stream_TSS_Definition): Apply legality
2621 rule for stream attributes of interface types (RM 13.13.2 (38/3)):
2622 subprogram must be a null procedure.
2623
2624 2014-06-11 Hristian Kirtchev <kirtchev@adacore.com>
2625
2626 * sem_prag.adb (Analyze_Input_Item): Allow formal
2627 parameters to appear as input_items in an initialization_list
2628 of pragma Initializes. Encapsulation now applies to states and
2629 variables only (as it should). Add RM references to key errors.
2630 * sem_prag.adb (Set_Imported): Suppress errors
2631 about preceding Imports when the pragma does not come from source,
2632 which can happen through use of pragma Provide_Shift_Operators.
2633
2634 2014-06-11 Thomas Quinot <quinot@adacore.com>
2635
2636 * sem_ch3.adb: Minor reformatting.
2637 * einfo.ads (Full_View): Minor comment update.
2638
2639 2014-06-11 Robert Dewar <dewar@adacore.com>
2640
2641 * einfo.adb (Is_Independent): New flag.
2642 * einfo.ads (Is_Independent): New flag.
2643 (Has_Independent_Components): Clean up and fix comments.
2644 * sem_prag.adb (Fix_Error): Deal with changing argument
2645 [of] to entity [for].
2646 (Analyze_Pragma, case Independent): Set Is_Independent flag
2647 (Analyze_Pragma, case Independent_Components): Set Is_Independent flag
2648 in all components of specified record.
2649
2650 2014-06-11 Thomas Quinot <quinot@adacore.com>
2651
2652 * sem_ch12.adb (Analyze_Formal_Decimal_Fixed_Point_Type):
2653 Set proper Etype on bounds of dummy type created for analysis
2654 of the generic.
2655
2656 2014-06-11 Robert Dewar <dewar@adacore.com>
2657
2658 * debug.adb: Minor comment fix (add missing section of dot
2659 numeric flags).
2660
2661 2014-06-11 Robert Dewar <dewar@adacore.com>
2662
2663 * gnat_rm.texi, switch-c.adb, sem_prag.adb, a-tgdico.ads, par-prag.adb,
2664 opt.ads, a-finali.ads, snames.ads-tmpl: Remove all traces of
2665 pragma/aspects Pure_05 Pure_12 Preelaborate_05.
2666 * errout.adb (Output_Messages): Avoid duplicate output for
2667 library level instance.
2668 * sem_elab.adb (Is_Call_Of_Generic_Formal): Moved to outer level
2669 (Check_Elab_Call): Add call to Is_Call_Of_Generic_Formal
2670 * exp_ch4.adb (Expand_N_Op_Expon): New interface for Exp_Modular.
2671 * s-expmod.ads, s-expmod.adb (Exp_Modular): Change interface to
2672 accomodate largest modulus value.
2673 * gnat_ugn.texi: Minor updates.
2674
2675 2014-06-11 Ed Schonberg <schonberg@adacore.com>
2676
2677 * sem_ch12.adb (Instantiate_Package_Body): Do not attempt to
2678 load body of generic package or its parent, if body is optional
2679 and the unit does not require a body.
2680
2681 2014-06-11 Robert Dewar <dewar@adacore.com>
2682
2683 * gnat_rm.texi: Document System.Unsigned_Types.
2684 * impunit.adb: System.Unsigned_Types (s-unstyp.ads) is user accessible.
2685 * s-unstyp.ads: Update comments (this is now user available unit).
2686
2687 2014-06-11 Robert Dewar <dewar@adacore.com>
2688
2689 * make.adb, sem_res.adb: Minor reformatting.
2690
2691 2014-06-11 Thomas Quinot <quinot@adacore.com>
2692
2693 * a-astaco.ads, a-tags.ads, s-excdeb.ads, a-tgdico.ads, a-stmaco.ads,
2694 a-except-2005.ads, s-except.ads, a-taside.ads, a-dynpri.ads,
2695 a-chahan.ads, a-sytaco.ads, s-stalib.ads, a-strmap.ads: Change pragmas
2696 Preelaborate_05 to just Preelaborate in runtime units, and similarly
2697 change Pure_05 to just Pure.
2698
2699 2014-06-11 Ed Schonberg <schonberg@adacore.com>
2700
2701 * sem_ch6.adb (Analyze_Subprogram_Body_Contract): Do not attempt
2702 analysis if error has been posted on subprogram body.
2703
2704 2014-06-11 Ed Schonberg <schonberg@adacore.com>
2705
2706 * sem_ch13.adb (Analyze_Stream_TSS_Definition): Apply legality
2707 rule given in RM 13.1 (8/1) for operational attributes to stream
2708 attributes: the attribute must apply to a first subtype. Fixes
2709 missing errors in ACATS test bdd2004.
2710
2711 2014-06-11 Robert Dewar <dewar@adacore.com>
2712
2713 * exp_ch3.adb (Build_Record_Init_Proc): Don't build for variant
2714 record type if restriction No_Implicit_Conditionals is active.
2715 (Expand_N_Object_Declaration): Don't allow default initialization
2716 for variant record type if restriction No_Implicit_Condition is active.
2717 (Build_Variant_Record_Equality): Don't build for variant
2718 record type if restriction No_Implicit_Conditionals is active.
2719 * exp_ch4.adb (Expand_N_Op_Eq): Error if variant records with
2720 No_Implicit_Conditionals.
2721 * sem_aux.ads, sem_aux.adb (Has_Variant_Part): New function.
2722
2723 2014-06-11 Ramon Fernandez <fernandez@adacore.com>
2724
2725 * i-cstrin.ads: Update comments.
2726
2727 2014-06-11 Ed Schonberg <schonberg@adacore.com>
2728
2729 * sem_res.adb (Resolve_Selected_Component): Handle properly a
2730 selected component whose prefix is overloaded, when none of the
2731 interpretations matches the expected type.
2732
2733 2014-06-11 Bob Duff <duff@adacore.com>
2734
2735 * make.adb (Wait_For_Available_Slot): Give a more
2736 informative error message; if the ALI file is not found, print
2737 the full path of what it's looking for.
2738
2739 2014-06-11 Sergey Rybin <rybin@adacore.com frybin>
2740
2741 * gnat_ugn.texi, vms_data.ads: add description of gnatstub -W<par>
2742 option to specify the result file encoding.
2743
2744 2014-06-11 Robert Dewar <dewar@adacore.com>
2745
2746 * errout.ads, sem_ch12.adb: Minor reformatting.
2747 * debug.adb, erroutc.adb: Remove -gnatd.q debug switch.
2748 * lib-xref.adb: Minor reformatting.
2749 * restrict.adb: Minor code reorganization (put routines in
2750 alpha order).
2751
2752 2014-06-11 Yannick Moy <moy@adacore.com>
2753
2754 * einfo.ads: Minor typo in comment
2755
2756 2014-06-11 Ed Schonberg <schonberg@adacore.com>
2757
2758 * sinfo.ads, sinfo.adb: New attribute Uninitialized_Variable, for
2759 formal private types and private type extensions, to indicate
2760 variable in a generic unit whose uninitialized use suggest that
2761 actual type should be fully initialized.
2762 Needs_Initialized_Actual: removed, functionaity replaced by
2763 the above.
2764 * lib-xref.adb (Generate_Reference): Generate a reference for
2765 variables of a formal type when the unit is not the main unit,
2766 to enable appropriate warnings in an instance.
2767 * sem_ch12.adb (Check_Ininialized_Type): Improve warning on use
2768 of variable in a generic unit that suggests that actual type
2769 should be full initialized.
2770 * sem_warn.adb; (May_Need_Initialized_Actual): Make into procedure
2771 and do not emot warning, which now only appears in an instance.
2772
2773 2014-06-11 Eric Botcazou <ebotcazou@adacore.com>
2774
2775 * gnat_ugn.texi: Fix minor typo.
2776
2777 2014-06-11 Hristian Kirtchev <kirtchev@adacore.com>
2778
2779 * sem_ch3.adb Add with and use clause for Sem_Ch10.
2780 (Analyze_Declarations): Code reformatting. Analyze the contract
2781 of a subprogram body stub at the end of the declarative region.
2782 * sem_ch6.adb (Analyze_Subprogram_Body_Contract): Spec_Id is
2783 now a variable. Do not process the body if its contract is not
2784 available. Account for subprogram body stubs when extracting
2785 the corresponding spec.
2786 * sem_ch6.ads (Analyze_Subprogram_Contract): Update the comment
2787 on usage.
2788 * sem_ch10.ads, sem_ch10.adb (Analyze_Subprogram_Body_Stub_Contract):
2789 New routine.
2790 * sem_prag.adb (Analyze_Depends_In_Decl_Part):
2791 Account for subprogram body stubs when extracting the
2792 corresponding spec.
2793 (Analyze_Global_In_Decl_List):
2794 Account for subprogram body stubs when extracting the
2795 corresponding spec.
2796 (Analyze_Refined_Depends_In_Decl_Part):
2797 Use Find_Related_Subprogram_Or_Body to retrieve the declaration
2798 of the related body. Spec_Is now a variable. Account for
2799 subprogram body stubs when extracting the corresponding spec.
2800 (Analyze_Refined_Global_In_Decl_Part): Use
2801 Find_Related_Subprogram_Or_Body to retrieve the declaration
2802 of the related body. Spec_Is now a variable. Account for
2803 subprogram body stubs when extracting the corresponding spec.
2804 (Collect_Subprogram_Inputs_Output): Account for subprogram body
2805 stubs when extracting the corresponding spec.
2806
2807 2014-06-11 Vincent Celier <celier@adacore.com>
2808
2809 * gnatcmd.adb (Process_Link): Do not invoke gnatlink with
2810 -lgnarl or -lgnat.
2811
2812 2014-06-11 Robert Dewar <dewar@adacore.com>
2813
2814 * debug.adb: Add debug flag -gnatd.q.
2815 * erroutc.adb (Prescan_Message): Bomb if untagged warning with
2816 -gnatd.q set.
2817 * styleg.adb (Check_Xtra_Parens): Message should be a style
2818 message.
2819 * sem_aggr.adb, sem_ch3.adb, exp_ch9.adb, checks.adb, sem_prag.adb,
2820 par-endh.adb, eval_fat.adb, freeze.adb, sem_util.adb, sem_attr.adb,
2821 sem_elab.adb, sem_ch6.adb, sem_warn.adb, sem_cat.adb,
2822 sem_ch13.adb, lib-xref.adb: Add remaining warning tags.
2823
2824 2014-06-11 Ben Brosgol <brosgol@adacore.com>
2825
2826 * gnat_rm.texi: Revised chapter on Implementation Defined
2827 Characteristics.
2828
2829 2014-06-11 Geert Bosch <bosch@adacore.com>
2830
2831 * s-exctab.adb: avoid race conditions in exception registration.
2832
2833 2014-06-11 Robert Dewar <dewar@adacore.com>
2834
2835 * errout.adb (Warn_Insertion): New function.
2836 (Error_Msg): Use Warn_Insertion and Prescan_Message.
2837 (Error_Msg_Internal): Set Info field of error object.
2838 (Error_Msg_NEL): Use Prescan_Message.
2839 (Set_Msg_Text): Don't store info: at start of message.
2840 (Skip_Msg_Insertion_Warning): New name for Set_Msg_Insertion_Warning.
2841 (Skip_Msg_Insertion_Warning): Now just skips warning insertion.
2842 * errout.ads: Document new ?$? and >$> insertion sequences
2843 Document use of "(style)" and "info: "
2844 * erroutc.adb (dmsg): Print several missing fields
2845 (Get_Warning_Tag): Handle -gnatel case (?$?) (Output_Msg_Text):
2846 Deal with new tagging of info messages
2847 * erroutc.ads: Is_Info_Msg: New global (Error_Msg_Object):
2848 Add field Info (Prescan_Message): New procedure, this procedure
2849 replaces the old Test_Style_Warning_Serious_Unconditional_Msg
2850 * errutil.adb, exp_util.adb, par-ch7.adb, sem_ch13.adb, sem_ch7.adb,
2851 sem_elab.adb: Follow new rules for info message (info belongs
2852 only at the start of a message, and only in the first message,
2853 not in any of the continuations).
2854 * gnat_ugn.texi: Document full set of warning tags.
2855
2856 2014-06-11 Gary Dismukes <dismukes@adacore.com>
2857
2858 * sem_util.adb: Minor typo fix.
2859
2860 2014-06-11 Ed Schonberg <schonberg@adacore.com>
2861
2862 * sem_warn.adb (Check_References): Do not emit spurious warnings
2863 on uninitialzed variable of a formal private type if variable
2864 is not read.
2865
2866 2014-06-09 Jan Hubicka <hubicka@ucw.cz>
2867
2868 * gcc-interface/utils.c (process_attributes) <ATTR_LINK_SECTION>: Use
2869 set_decl_section_name accessor.
2870
2871 2014-05-22 Thomas Schwinge <thomas@codesourcery.com>
2872
2873 * gcc-interface/utils.c (DEF_FUNCTION_TYPE_0, DEF_FUNCTION_TYPE_6)
2874 (DEF_FUNCTION_TYPE_7, DEF_FUNCTION_TYPE_8)
2875 (DEF_FUNCTION_TYPE_VAR_5): Cosmetic fixes.
2876
2877 2014-05-21 Robert Dewar <dewar@adacore.com>
2878
2879 * layout.adb: Minor reformatting.
2880 * sem_prag.adb (Analyze_Pragma, case Inspection_Point): Call
2881 dummy procedure ip.
2882
2883 2014-05-21 Robert Dewar <dewar@adacore.com>
2884
2885 * restrict.ads (Implementation_Restriction): Add entry for
2886 No_Fixed_IO.
2887 * rtsfind.ads: Add entries for Fixed_IO and Decimal_IO in
2888 Ada.[Wide_[Wide_]Text_IO.
2889 * s-rident.ads (Restriction_Id): Add entry for No_Fixed_IO.
2890 * sem_attr.adb (Analyze_Attribute): Disallow fixed point types
2891 for Img, Image, Value, Wide_Image, Wide_Value, Wide_Wide_Image,
2892 Wide_Wide_Value if restriction No_Fixed_IO is set.
2893 * sem_util.adb (Set_Entity_Checks): Check restriction No_Fixed_IO.
2894
2895 2014-05-21 Robert Dewar <dewar@adacore.com>
2896
2897 * gnatcmd.adb: Minor error msg changes (no upper case letter
2898 at start).
2899 * sem_ch12.adb, sem_ch5.adb, sem_res.adb, sem_util.adb: Minor
2900 reformatting.
2901
2902 2014-05-21 Robert Dewar <dewar@adacore.com>
2903
2904 * debug.adb: Debug flag -gnatd.G inhibits static elab tracing
2905 via generic formals.
2906 * sem_elab.adb (Is_Call_Of_Generic_Formal): Return False if
2907 -gnatd.G is set.
2908
2909 2014-05-21 Thomas Quinot <quinot@adacore.com>
2910
2911 * exp_pakd.adb (Revert_Storage_Order): Renamed from Byte_Swap to
2912 more accurately describe that this subprogram needs to come into
2913 play also in cases where no byte swapping is involved, because
2914 it also takes care of some required shifts (left-justification
2915 of values).
2916
2917 2014-05-21 Thomas Quinot <quinot@adacore.com>
2918
2919 * freeze.adb (Check_Component_Storage_Order): Indicate whether
2920 a Scalar_Storage_Order attribute definition is present for the
2921 component's type.
2922 (Freeze_Record_Type): Suppress junk warnings
2923 about purportedly junk Bit_Order / Scalar_Storage_Order attribute
2924 definitions.
2925
2926 2014-05-21 Robert Dewar <dewar@adacore.com>
2927
2928 * sem_ch8.adb (Analyze_Subprogram_Renaming): Put back call
2929 to Kill_Elaboration_Checks.
2930
2931 2014-05-21 Gary Dismukes <dismukes@adacore.com>
2932
2933 * layout.adb (Assoc_Add): Suppress the optimization of the (E
2934 - C1) + C2 case, when the expression type is unsigned and C1 <
2935 C2, to avoid creating a negative literal when folding.
2936
2937 2014-05-21 Hristian Kirtchev <kirtchev@adacore.com>
2938
2939 * freeze.adb (Freeze_Record_Type): Update the use of
2940 Is_SPARK_Volatile.
2941 * sem_ch3.adb (Analyze_Object_Contract): Update the use of
2942 Is_SPARK_Volatile.
2943 (Process_Discriminants): Update the use of Is_SPARK_Volatile.
2944 * sem_ch5.adb (Analyze_Iterator_Specification): Update the use
2945 of Is_SPARK_Volatile.
2946 (Analyze_Loop_Parameter_Specification):
2947 Update the use of Is_SPARK_Volatile.
2948 * sem_ch6.adb (Process_Formals): Catch an illegal use of an IN
2949 formal parameter when its type is volatile.
2950 * sem_prag.adb (Analyze_Global_Item): Update the use of
2951 Is_SPARK_Volatile.
2952 * sem_res.adb (Resolve_Entity_Name): Correct the guard which
2953 determines whether an entity is a volatile source SPARK object.
2954 * sem_util.adb (Has_Enabled_Property): Accout for external
2955 properties being set on objects other than abstract states
2956 and variables. An example would be a formal parameter.
2957 (Is_SPARK_Volatile): New routine.
2958 (Is_SPARK_Volatile_Object):
2959 Remove the entity-specific tests. Call routine Is_SPARK_Volatile
2960 when checking entities and/or types.
2961 * sem_util.ads (Is_SPARK_Volatile): New routine.
2962
2963 2014-05-21 Robert Dewar <dewar@adacore.com>
2964
2965 * sem_warn.adb: Minor fix to warning messages (use ?? instead
2966 of ?).
2967
2968 2014-05-21 Vincent Celier <celier@adacore.com>
2969
2970 * gnatcmd.adb (GNATCmd): For platforms other than VMS, recognize
2971 switch --version and --help.
2972
2973 2014-05-21 Robert Dewar <dewar@adacore.com>
2974
2975 * sem_elab.adb (Is_Call_Of_Generic_Formal): New function.
2976
2977 2014-05-21 Ed Schonberg <schonberg@adacore.com>
2978
2979 * sem_ch5.adb (Analyze_Iterator_Specification): Set type of
2980 iterator variable when the domain of iteration is a formal
2981 container and this is an element iterator.
2982
2983 2014-05-21 Bob Duff <duff@adacore.com>
2984
2985 * sem_ch12.adb: Minor reformatting.
2986
2987 2014-05-21 Robert Dewar <dewar@adacore.com>
2988
2989 * sinfo.ads, sem_ch12.adb, sem_warn.adb: Minor reformatting.
2990
2991 2014-05-21 Robert Dewar <dewar@adacore.com>
2992
2993 * sem_elab.adb: Minor reformatting.
2994 * s-taprop.ads: Minor comment fix.
2995 * sem_ch8.adb (Analyze_Subprogram_Renaming): Remove call to
2996 Kill_Elaboration_Checks.
2997 * errout.adb, erroutc.adb: Minor reformatting.
2998
2999 2014-05-21 Thomas Quinot <quinot@adacore.com>
3000
3001 * exp_pakd.adb (Byte_Swap): Handle the case of a sub-byte
3002 component. No byte swapping occurs, but this procedure also takes
3003 care of appropriately justifying the argument.
3004
3005 2014-05-21 Hristian Kirtchev <kirtchev@adacore.com>
3006
3007 * sem_ch6.adb: sem_ch6.adb (Analyze_Aspects_On_Body_Or_Stub):
3008 New routine.
3009 (Analyze_Subprogram_Body_Helper): Move the
3010 analysis of aspect specifications and the processing of the
3011 subprogram body contract after inlining has taken place.
3012 (Diagnose_Misplaced_Aspect_Specifications): Removed.
3013
3014 2014-05-21 Javier Miranda <miranda@adacore.com>
3015
3016 * sem_ch3.adb (Build_Derived_Record_Type): Revert previous change.
3017
3018 2014-05-21 Robert Dewar <dewar@adacore.com>
3019
3020 * sem_eval.ads, sem_eval.adb (Why_Not_Static): Messages are not
3021 continuations any more.
3022
3023 2014-05-21 Ed Schonberg <schonberg@adacore.com>
3024
3025 * sinfo.ads, sinfo.adb: New flag Needs_Initialized_Actual,
3026 present in formal_Private_Definitions and on private extension
3027 declarations of a formal derived type. Set when the use of the
3028 formal type in a generic suggests that the actual should be a
3029 fully initialized type.
3030 * sem_warn.adb (May_Need_Initialized_Actual): new subprogram
3031 to indicate that an entity of a generic type has default
3032 initialization, and that the corresponing actual type in any
3033 subsequent instantiation should be fully initialized.
3034 * sem_ch12.adb (Check_Initialized_Type): new subprogram,
3035 to emit a warning if the actual for a generic type on which
3036 Needs_Initialized_Actual is set is not a fully initialized type.
3037
3038 2014-05-21 Robert Dewar <dewar@adacore.com>
3039
3040 * sem_elab.adb, prj-dect.adb: Minor reformatting.
3041
3042 2014-05-21 Robert Dewar <dewar@adacore.com>
3043
3044 * erroutc.ads: Minor comment addition.
3045
3046 2014-05-21 Robert Dewar <dewar@adacore.com>
3047
3048 * errout.ads: Add documentation for use of >*> tag.
3049 * restrict.adb: Make sure we use >*> tag for restriction warnings.
3050
3051 2014-05-21 Gary Dismukes <dismukes@adacore.com>
3052
3053 * debug.adb: Add case of illegal overriding_indicator for a
3054 protected subprogram body to description of -gnatd.E switch.
3055 * sem_ch6.adb (Verify_Overriding_Indicator): Issue error message
3056 for cases of giving overriding_indicators on protected subprogram
3057 bodies, but change this to a warning if -gnatd.E is enabled. No
3058 longer give a style warning about missing indicators on protected
3059 subprogram bodies.
3060
3061 2014-05-21 Robert Dewar <dewar@adacore.com>
3062
3063 * prj.ads, sem_ch12.adb, prj.adb, exp_pakd.adb,
3064 sem_elab.ads: Minor reformatting.
3065 * erroutc.adb, erroutc.ads (Warning_Specifically_Suppressed): Make Tag
3066 parameter optional.
3067
3068 2014-05-21 Pascal Obry <obry@adacore.com>
3069
3070 * prj-dect.adb: Allow package Install in aggregate project.
3071
3072 2014-05-21 Robert Dewar <dewar@adacore.com>
3073
3074 * sem_ch13.adb (Analyze_Aspect_Specifications):
3075 Insert_Delayed_Pragma is now used for the case of Attach_Handler.
3076 * sem_prag.adb: Minor comment improvements.
3077
3078 2014-05-21 Ed Schonberg <schonberg@adacore.com>
3079
3080 * sem_ch12.adb (Install_Body): When checking whether freezing of
3081 instantiation must be delayed, verify that the common enclosing
3082 subprogram to generic and instance is in fact an overloadable
3083 entity.
3084
3085 2014-05-21 Vincent Celier <celier@adacore.com>
3086
3087 * makeutl.adb (Mains.Complete_Mains.Do_Complete): Look for all
3088 mains with the same name and fail if there is more than one.
3089 * prj.ads, prj.adb (Find_All_Sources): New function
3090
3091 2014-05-21 Robert Dewar <dewar@adacore.com>
3092
3093 * sem_ch13.adb: Minor reformatting.
3094 * lib-xref-spark_specific.adb, sem_util.adb: Minor reformatting.
3095 * sem_prag.adb: Minor error message improvement.
3096
3097 2014-05-21 Yannick Moy <moy@adacore.com>
3098
3099 * lib-xref-spark_specific.adb, lib-xref.ads, lib-xref.adb
3100 (Enclosing_Subprogram_Or_Package): Only return a library-level
3101 package.
3102
3103 2014-05-21 Javier Miranda <miranda@adacore.com>
3104
3105 * sem_ch3.adb (Build_Derived_Record_Type): Initialize Parent_Base
3106 to the full view of the parent type when processing a derived type
3107 which is the full view of a private type not defined in a generic
3108 unit which is derived from a private type with discriminants
3109 whose full view is a non-tagged record type.
3110
3111 2014-05-21 Javier Miranda <miranda@adacore.com>
3112
3113 * exp_ch4.adb (Expand_Allocator_Expression.Apply_Accessibility_Check):
3114 Complete previous patch.
3115
3116 2014-05-21 Thomas Quinot <quinot@adacore.com>
3117
3118 PR ada/9535
3119 * g-socket.adb (Read and Write for Datagram_Socket_Stream_Type):
3120 Provide a behaviour more consistent with underlying datagram
3121 socket: do not attempt to loop over Send_Socket/Receive_Socket
3122 iterating along the buffer.
3123
3124 2014-05-21 Hristian Kirtchev <kirtchev@adacore.com>
3125
3126 * freeze.adb (Freeze_Record_Type): Ensure that a discriminated
3127 or a tagged type is not labelled as volatile. Ensure that a
3128 non-volatile type has no volatile components.
3129 * sem_ch3.adb (Analyze_Object_Contract): Add local constant
3130 Obj_Typ. Code reformatting. Ensure that a discriminated or
3131 tagged object is not labelled as volatile.
3132 * sem_prag.adb (Process_Atomic_Shared_Volatile): Ensure that
3133 pragma Volatile applies to a full type declaration or an object
3134 declaration when SPARK mode is on.
3135
3136 2014-05-21 Sergey Rybin <rybin@adacore.com frybin>
3137
3138 * gnat_ugn.texi: For ASIS tools, reword the paragraph about
3139 providing options needed for compiling the argument source for
3140 the situation when a project file can be used as a tool parameter.
3141
3142 2014-05-21 Gary Dismukes <dismukes@adacore.com>
3143
3144 * gnat_rm.texi: Minor typo fix.
3145
3146 2014-05-21 Robert Dewar <dewar@adacore.com>
3147
3148 * stand.adb (Tree_Read): Read missing entities.
3149 (Tree_Write): Write missing entities.
3150
3151 2014-05-21 Ben Brosgol <brosgol@adacore.com>
3152
3153 * gnat_ugn.texi: Wordsmithing edits to Coupling Metrics Control
3154 section in gnatmetric chapter.
3155
3156 2014-05-21 Robert Dewar <dewar@adacore.com>
3157
3158 * exp_ch6.adb (Expand_Actuals): Spec moved here, since not used
3159 outside Exp_Ch6 (Expand_Actuals): Deal with proper insertion of
3160 post-call copy write back (see detailed comment in code).
3161 * exp_ch6.ads (Expand_Actuals): Moved to body, not used outside
3162 Exp_Ch6.
3163 * tbuild.ads: Minor reformatting.
3164
3165 2014-05-21 Robert Dewar <dewar@adacore.com>
3166
3167 * stand.ads: Add warning about adding new entities and
3168 Tree_Read/Tree_Write.
3169
3170 2014-05-21 Robert Dewar <dewar@adacore.com>
3171
3172 * sem_util.adb (Set_Entity_With_Checks): Don't complain about
3173 references to restricted entities within the units in which they
3174 are declared.
3175
3176 2014-05-21 Robert Dewar <dewar@adacore.com>
3177
3178 * gnat1drv.adb (Check_Bad_Body): Use Source_File_Is_Body to
3179 simplify the needed test, and also deal with failure to catch
3180 situations with non-standard names.
3181 * sinput-l.ads, sinput-l.adb (Source_File_Is_No_Body): New function
3182 (Source_File_Is_Subunit): Removed, no longer used.
3183
3184 2014-05-21 Javier Miranda <miranda@adacore.com>
3185
3186 * exp_ch4.adb
3187 (Expand_Allocator_Expression.Apply_Accessibility_Check): for a
3188 renaming of an access to interface object there is no need to
3189 generate extra code to reference the tag.
3190
3191 2014-05-21 Robert Dewar <dewar@adacore.com>
3192
3193 * errout.adb, erroutc.adb, erroutc.ads: Allow warning tag in pragma
3194 Warnings (Off, string).
3195
3196 2014-05-21 Robert Dewar <dewar@adacore.com>
3197
3198 * osint.adb: Fix three error messages to say invalid instead
3199 of erroneous.
3200 * par-ch4.adb, exp_aggr.adb, sem_attr.adb, sem_aux.adb, sem_ch3.adb,
3201 sem_ch5.adb, sem_ch6.adb, sem_ch7.adb, sem_dim.adb, sem_res.adb,
3202 sem_util.adb, sem_util.ads: Fix incorrect use of erroneous in comments.
3203
3204 2014-05-21 Ed Schonberg <schonberg@adacore.com>
3205
3206 * freeze.adb, sem_ch13.adb, sem_ch13.ads, sem_ch9.adb,
3207 sem_ch9.ads: Move discriminant manipulation routines for analysis of
3208 aspect specifications from sem_ch9 to sem_ch13, where they belong.
3209
3210 2014-05-21 Robert Dewar <dewar@adacore.com>
3211
3212 * gnat_ugn.texi: Clearly document -gnatw.g (GNAT warnings).
3213 Clearly document -gnatyg (GNAT style switches).
3214 * usage.adb: Add line line for -gnatw.g (GNAT warnings) More
3215 detail for line for -gnatyg (GNAT style switches) -gnatw.d/D is
3216 available for VMS after all.
3217 * warnsw.adb: Reorganize to eliminate duplicated code
3218 (Restore_Warnings): Add a couple of missing entries
3219 (Save_Warnings): Add a couple of missing entries.
3220 * warnsw.ads: Add missing entries to Warning_Record (not clear
3221 what the impact is).
3222
3223 2014-05-21 Robert Dewar <dewar@adacore.com>
3224
3225 * errout.adb (Set_Msg_Insertion_Warning): Handle ?*? (restriction
3226 warning) case.
3227 * errout.ads: Document ?*? (restriction warning) insertion.
3228 * erroutc.adb (Get_Warning_Tag): Deal with ?*? (restriction
3229 warning) case.
3230 * erroutc.ads: Document use of * for restriction warning tag.
3231 * restrict.adb (Restriction_Msg): Tag with ?*? instead of ??.
3232
3233 2014-05-21 Ed Schonberg <schonberg@adacore.com>
3234
3235 * sem_ch9.adb (Push_Scope_And_Install_Discriminants): Do not
3236 make discriminants immediately visible when analyzing an aspect
3237 of a subtype declaration.
3238 (Uninstall_Discriminants): Do not apply to the entity in a
3239 subtype declaration.
3240
3241 2014-05-21 Ed Schonberg <schonberg@adacore.com>
3242
3243 * sem_util.adb: Code clean up.
3244
3245 2014-05-21 Eric Botcazou <ebotcazou@adacore.com>
3246
3247 * gnat_ugn.texi: Document -Werror.
3248
3249 2014-05-21 Bob Duff <duff@adacore.com>
3250
3251 * sem_util.adb (Is_Dependent_Component_Of_Mutable_Object):
3252 This was returning False if the Object is a constant view. Fix
3253 it to return True in that case, because it might be a view of
3254 a variable.
3255 (Has_Discriminant_Dependent_Constraint): Fix latent
3256 bug; this function was crashing when passed a discriminant.
3257
3258 2014-05-21 Robert Dewar <dewar@adacore.com>
3259
3260 * gnat_ugn.texi: Remove misplaced section that is now obsolete.
3261 * s-arit64.adb: Minor code reorganization.
3262 * sem_prag.adb: Minor comment fix (remove erroneous use of the
3263 term erroneous).
3264
3265 2014-05-21 Robert Dewar <dewar@adacore.com>
3266
3267 * g-table.adb, g-dyntab.adb (Reallocate): Fix possible overflow in
3268 computing new table size.
3269
3270 2014-05-21 Robert Dewar <dewar@adacore.com>
3271
3272 * einfo.ads: Minor reformatting.
3273 * ceinfo.adb: Deal with slight format change of einfo.ads.
3274
3275 2014-05-21 Ed Schonberg <schonberg@adacore.com>
3276
3277 * sem_prag.adb (Analyze_Part_Of): Further work on the proper
3278 implementation of the SPARK 2014 rule concerning private child
3279 units (LRM 7.2.6).
3280
3281 2014-05-21 Vincent Celier <celier@adacore.com>
3282
3283 * makeusg.adb: Add switch -d to usage.
3284
3285 2014-05-21 Ed Schonberg <schonberg@adacore.com>
3286
3287 * sem_util.adb (Find_Actual): If an actual that is the prefix
3288 of an enclosing prefixed call has been rewritten, use Nkind
3289 and Sloc to identify the corresponding formal, when handling
3290 deferred references.
3291
3292 2014-05-21 Robert Dewar <dewar@adacore.com>
3293
3294 * debug.adb: Document -gnatd.z switch.
3295 * sem_eval.adb (Why_Non_Static): Test -gnatd.z switch.
3296
3297 2014-05-21 Robert Dewar <dewar@adacore.com>
3298
3299 * einfo.ads (Can_Never_Be_Null): Minor comment update.
3300 * sem_prag.adb (Check_Arg_Is_Task_Dispatching_Policy): Minor
3301 error message change.
3302 * s-arit64.adb ("abs"): New function. Use expression functions
3303 for the simple conversions and arithmetic.
3304
3305 2014-05-18 Eric Botcazou <ebotcazou@adacore.com>
3306
3307 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Rework comment and
3308 set function_start_locus.
3309
3310 2014-05-18 Eric Botcazou <ebotcazou@adacore.com>
3311
3312 * utils.c (gnat_write_global_declarations): Adjust the flags put on
3313 dummy_global.
3314
3315 2014-05-18 Eric Botcazou <ebotcazou@adacore.com>
3316
3317 * gcc-interface/decl.c (change_qualified_type): New static function.
3318 (gnat_to_gnu_entity): Use it throughout to add qualifiers on types.
3319 <E_Array_Type>: Set TYPE_VOLATILE on the array type directly.
3320 <E_Array_Subtype>: Likewise.
3321 Do not set flags on an UNCONSTRAINED_ARRAY_TYPE directly.
3322 (gnat_to_gnu_component_type): Likewise.
3323 (gnat_to_gnu_param): Likewise.
3324
3325 2014-05-18 Eric Botcazou <ebotcazou@adacore.com>
3326
3327 * fe.h (Set_Present_Expr): Move around.
3328 (End_Location): New macro.
3329 * gcc-interface/trans.c (Case_Statement_to_gnu): Use End_Location.
3330
3331 2014-05-18 Eric Botcazou <ebotcazou@adacore.com>
3332
3333 * gcc-interface/decl.c (gnat_to_gnu_entity): Use Underlying_Type in
3334 lieu of more verbose construct.
3335 * gcc-interface/trans.c (Call_to_gnu): Likewise.
3336 (gnat_to_gnu): Likewise. Remove obsolete code.
3337
3338 2014-05-18 Eric Botcazou <ebotcazou@adacore.com>
3339
3340 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Subtype>: Do not
3341 consider that regular packed arrays can never be superflat.
3342
3343 2014-05-17 Trevor Saunders <tsaunders@mozilla.com>
3344
3345 * gcc-interface/ada-tree.h: Remove usage of variable_size gty
3346 annotation.
3347 * gcc-interface/decl.c (annotate_value): Adjust.
3348 * gcc-interface/trans.c (Attribute_to_gnu): Likewise.
3349 (push_range_check_info): Likewise.
3350 (Loop_Statement_to_gnu): Likewise.
3351 (Subprogram_Body_to_gnu): Likewise.
3352 (Compilation_Unit_to_gnu): Likewise.
3353 (start_stmt_group): Likewise.
3354 * gcc-interface/utils.c (init_gnat_utils): Likewise.
3355 (gnat_pushlevel): Likewise.
3356 (maybe_pad_type): Likewise.
3357
3358 2014-05-14 Eric Botcazou <ebotcazou@adacore.com>
3359
3360 * seh_init.c: Fix copyright year.
3361
3362 2014-05-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
3363
3364 * seh_init.c (__gnat_map_SEH): Compile also when __CYGWIN__ and __SEH__
3365 are defined. Move include windows.h before system.h.
3366 * s-oscons-tmplt.c (DTR_CONTROL_ENABLE, RTS_CONTROL_ENABLE): Compile
3367 also when __CYGWIN__ is defined. Include windef.h before winbase.h.
3368
3369 2014-05-14 Richard Sandiford <r.sandiford@uk.ibm.com>
3370
3371 * gcc-interface/decl.c (gnat_to_gnu_entity): Convert integer_one_node
3372 to the appropriate type.
3373 * gcc-interface/trans.c (gnat_to_gnu): Likewise.
3374 (pos_to_constructor): Likewise.
3375
3376 2014-05-13 Eric Botcazou <ebotcazou@adacore.com>
3377
3378 * gcc-interface/decl.c (annotate_value): Fix thinko in latest change.
3379
3380 2014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
3381 Mike Stump <mikestump@comcast.net>
3382 Richard Sandiford <rdsandiford@googlemail.com>
3383
3384 * gcc-interface/cuintp.c (UI_From_gnu): Use wide-int interfaces.
3385 * gcc-interface/decl.c (gnat_to_gnu_entity): Use TYPE_SIGN.
3386 (annotate_value): Use wide-int interfaces.
3387 * gcc-interface/utils.c (get_nonnull_operand): Use tree_fits_uhwi_p.
3388
3389 2014-04-28 Richard Henderson <rth@redhat.com>
3390
3391 * gcc-interface/Makefile.in: Support aarch64-linux.
3392
3393 2014-04-28 Eric Botcazou <ebotcazou@adacore.com>
3394
3395 * exp_dbug.ads (Get_External_Name): Add 'False' default to Has_Suffix,
3396 add 'Suffix' parameter and adjust comment.
3397 (Get_External_Name_With_Suffix): Delete.
3398 * exp_dbug.adb (Get_External_Name_With_Suffix): Merge into...
3399 (Get_External_Name): ...here. Add 'False' default to Has_Suffix, add
3400 'Suffix' parameter.
3401 (Get_Encoded_Name): Remove 2nd argument in call to Get_External_Name.
3402 Call Get_External_Name instead of Get_External_Name_With_Suffix.
3403 (Get_Secondary_DT_External_Name): Likewise.
3404 * exp_cg.adb (Write_Call_Info): Likewise.
3405 * exp_disp.adb (Export_DT): Likewise.
3406 (Import_DT): Likewise.
3407 * comperr.ads (Compiler_Abort): Remove Code parameter and add From_GCC
3408 parameter with False default.
3409 * comperr.adb (Compiler_Abort): Likewise. Adjust accordingly.
3410 * types.h (Fat_Pointer): Rename into...
3411 (String_Pointer): ...this. Add comment on interfacing rules.
3412 * fe.h (Compiler_Abort): Adjust for above renaming.
3413 (Error_Msg_N): Likewise.
3414 (Error_Msg_NE): Likewise.
3415 (Get_External_Name): Likewise. Add third parameter.
3416 (Get_External_Name_With_Suffix): Delete.
3417 * gcc-interface/decl.c (STDCALL_PREFIX): Define.
3418 (create_concat_name): Adjust call to Get_External_Name, remove call to
3419 Get_External_Name_With_Suffix, use STDCALL_PREFIX, adjust for renaming.
3420 * gcc-interface/trans.c (post_error): Likewise.
3421 (post_error_ne): Likewise.
3422 * gcc-interface/misc.c (internal_error_function): Likewise.
3423
3424 2014-04-28 Richard Biener <rguenther@suse.de>
3425
3426 PR middle-end/60092
3427 * gcc-interface/utils.c: Define flag_isoc11.
3428
3429 2014-04-26 Eric Botcazou <ebotcazou@adacore.com>
3430
3431 * gnatvsn.ads (Library_Version): Bump to 4.10.
3432
3433 2014-04-23 Eric Botcazou <ebotcazou@adacore.com>
3434
3435 Revert
3436 2014-04-22 Richard Henderson <rth@redhat.com>
3437
3438 * gcc-interface/Makefile.in: Support aarch64-linux.
3439
3440 2014-04-22 Eric Botcazou <ebotcazou@adacore.com>
3441
3442 * fe.h (Compiler_Abort): Replace Fat_Pointer with String_Pointer.
3443 (Error_Msg_N): Likewise.
3444 (Error_Msg_NE): Likewise.
3445 (Get_External_Name_With_Suffix): Likewise.
3446 * types.h (Fat_Pointer): Delete.
3447 (String_Pointer): New type.
3448 (DECLARE_STRING_POINTER): New macro.
3449 * gcc-interface/decl.c (create_concat_name): Adjust.
3450 * gcc-interface/trans.c (post_error): Likewise.
3451 (post_error_ne): Likewise.
3452 * gcc-interface/misc.c (internal_error_function): Likewise.
3453
3454 2014-04-22 Richard Henderson <rth@redhat.com>
3455
3456 * gcc-interface/Makefile.in: Support aarch64-linux.
3457
3458 * init.c [__linux__] (HAVE_GNAT_ALTERNATE_STACK): New define.
3459 (__gnat_alternate_stack): Enable for all linux except ia64.
3460
3461 2014-04-22 Eric Botcazou <ebotcazou@adacore.com>
3462
3463 * fe.h (Compiler_Abort): Replace Fat_Pointer with String_Pointer.
3464 (Error_Msg_N): Likewise.
3465 (Error_Msg_NE): Likewise.
3466 (Get_External_Name_With_Suffix): Likewise.
3467 * types.h (Fat_Pointer): Delete.
3468 (String_Pointer): New type.
3469 (DECLARE_STRING_POINTER): New macro.
3470 * gcc-interface/decl.c (create_concat_name): Adjust.
3471 * gcc-interface/trans.c (post_error): Likewise.
3472 (post_error_ne): Likewise.
3473 * gcc-interface/misc.c (internal_error_function): Likewise.
3474
3475 2014-04-15 Eric Botcazou <ebotcazou@adacore.com>
3476 Pierre-Marie de Rodat <derodat@adacore.com>
3477
3478 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create a mere
3479 scalar constant instead of a reference for renaming of scalar literal.
3480 Do not create a new object for constant renaming except for a function
3481 call. Make sure a VAR_DECL is created for the renaming pointer.
3482 * gcc-interface/trans.c (constant_decl_with_initializer_p): New.
3483 (fold_constant_decl_in_expr): New function.
3484 (Identifier_to_gnu): Use constant_decl_with_initializer_p.
3485 For a constant renaming, try to fold a constant DECL in the result.
3486 (lvalue_required_p) <N_Object_Renaming_Declaration>: Always return 1.
3487 (Identifier_to_gnu): Reference the renamed object of constant renaming
3488 pointers directly.
3489 * gcc-interface/utils.c (invalidate_global_renaming_pointers): Do not
3490 invalidate constant renaming pointers.
3491
3492 2014-04-15 Eric Botcazou <ebotcazou@adacore.com>
3493
3494 * gcc-interface/utils.c (type_for_vector_element_p): New predicate.
3495 (build_vector_type_for_size): New function.
3496 (build_vector_type_for_array): Likewise.
3497 (unchecked_convert): Build an intermediate vector type to convert
3498 from a generic array type to a vector type.
3499 (handle_vector_size_attribute): Reimplement.
3500 (handle_vector_type_attribute): Likewise.
3501
3502 2014-04-15 Eric Botcazou <ebotcazou@adacore.com>
3503
3504 * gcc-interface/decl.c (prepend_one_attribute_pragma): Call
3505 Is_OK_Static_Expression in lieu of Is_Static_Expression to
3506 detect valid arguments.
3507
3508 2014-04-15 Eric Botcazou <ebotcazou@adacore.com>
3509
3510 * gcc-interface/trans.c (gnat_gimplify_stmt): Propagate loop hints.
3511
3512 2014-04-14 Paolo Carlini <paolo.carlini@oracle.com>
3513
3514 * gcc-interface/decl.c (gnat_to_gnu_entity): Use TYPE_IDENTIFIER.
3515 (components_to_record): Likewise.
3516 * gcc-interface/utils.c (make_aligning_type): Likewise.
3517 (maybe_pad_type): Likewise.
3518 (finish_record_type): Likewise.
3519 (rest_of_record_type_compilation): Likewise.
3520
3521 2014-04-14 Eric Botcazou <ebotcazou@adacore.com>
3522
3523 * snames.ads-tmpl (Name_Ivdep): New pragma-related name.
3524 * sem_prag.adb (Analyze_Pragma) <Pragma_Loop_Optimize>: Add support
3525 for Ivdep hint.
3526 * gnat_rm.texi (Implementation Defined Pragmas): Document new Ivdep
3527 hint for Loop_Optimize.
3528 * gnat_ugn.texi (Vectorization of loops): Mention new Ivdep hint.
3529 * gcc-interface/trans.c (Pragma_to_gnu) <Pragma_Loop_Optimize>: Deal
3530 with new Ivdep hint.
3531 * gcc-interface/ada-tree.h (LOOP_STMT_IVDEP): New macro.
3532 * gcc-interface/trans.c (Pragma_to_gnu) <Pragma_Loop_Optimize>: Deal
3533 with new Ivdep hint.
3534 (gnat_gimplify_stmt) <LOOP_STMT>: Propagate loop hints.
3535
3536 2014-04-14 Eric Botcazou <ebotcazou@adacore.com>
3537 Robert Dewar <dewar@adacore.com>
3538
3539 * opt.ads (Suppress_Back_Annotation): Remove as unused.
3540 * fe.h (Back_Annotate_Rep_Info): Likewise.
3541 (Global_Discard_Names): Likewise.
3542 (List_Representation_Info): Declare.
3543 * types.h (Uint_Minus_1): Likewise.
3544 * repinfo.ads: Document back-annotation change.
3545 * gcc-interface/gigi.h (init_gnat_decl): Declare.
3546 (destroy_gnat_decl): Likewise.
3547 * gcc-interface/decl.c (annotate_value): Do not create the cache of
3548 annotated values here but...
3549 <CALL_EXPR>: Only inline the call if -gnatR3 is specified or we are
3550 in ASIS mode.
3551 (init_gnat_decl): ...here instead. New function.
3552 (destroy_gnat_decl): Likewise.
3553 * gcc-interface/trans.c (gigi): Call {init|destroy}_gnat_decl.
3554 * gcc-interface/utils.c (init_gnat_utils): Minor reformatting.
3555
3556 2014-04-14 Eric Botcazou <ebotcazou@adacore.com>
3557
3558 * gcc-interface/decl.c (create_field_decl_from): Finalize non-constant
3559 offset for the field, if any.
3560
3561 2014-04-09 Eric Botcazou <ebotcazou@adacore.com>
3562 Svante Signell <svante.signell@gmail.com>
3563
3564 PR ada/54040
3565 PR ada/59346
3566 * s-osinte-x32.adb: New file.
3567 * s-linux.ads (Time): New section.
3568 * s-linux-alpha.ads (Time): Likewise.
3569 * s-linux-android.ads (Time: Likewise.
3570 * s-linux-hppa.ads (Time): Likewise.
3571 * s-linux-mipsel.ads (Time): Likewise.
3572 * s-linux-sparc.ads (Time): Likewise.
3573 * s-linux-x32.ads (Time): Likewise.
3574 * s-osprim-x32.ads (timespec): Adjust.
3575 (Clock): Likewise.
3576 (To_Timespec): Likewise.
3577 * s-osinte-linux.ads (Time): Define local subtypes for those defined
3578 in System.Linux.
3579 * s-taprop-linux.adb (Monotonic_Clock): Do not define timeval.
3580 * s-osinte-hpux.ads (timespec): Revert POSIX breakage.
3581 * s-osinte-kfreebsd-gnu.ads (timespec): Likewise.
3582 * s-osinte-solaris-posix.ads (timespec): Likewise.
3583 * s-osinte-posix.adb (To_Timespec): Likewise.
3584 * gcc-interface/Makefile.in (x32/Linux): Use s-osinte-x32.adb.
3585
3586 2014-04-08 Eric Botcazou <ebotcazou@adacore.com>
3587
3588 PR ada/60411
3589 * gcc-interface/Makefile.in (arm% linux-android): Switch to EHABI.
3590 * s-linux-android.ads: New file.
3591 * s-intman-android.adb: Likewise.
3592 * s-osinte-android.ads: Adjust.
3593 * sigtramp-armdroid.c: Likewise.
3594 * sigtramp.h: Add Android support.
3595
3596 2014-04-07 Eric Botcazou <ebotcazou@adacore.com>
3597
3598 * gcc-interface/Makefile.in (alpha-vms): Add missing line.
3599
3600 2014-03-30 Eric Botcazou <ebotcazou@adacore.com>
3601
3602 PR ada/60703
3603 * system-linux-alpha.ads: Adjust for Ada 2005.
3604 * system-linux-mips.ads: Likewise.
3605 * system-linux-mips64el.ads: Likewise.
3606 * system-linux-mipsel.ads: Likewise.
3607 * system-linux-s390.ads: Likewise.
3608 * system-linux-s390x.ads: Likewise.
3609 * system-linux-sparc.ads: Likewise.
3610 * system-linux-sparcv9.ads: Likewise.
3611 * system-rtems.ads: Likewise.
3612 * system-vxworks-arm.ads: Likewise.
3613
3614 2014-03-16 Andreas Schwab <schwab@linux-m68k.org>
3615
3616 PR ada/39172
3617 * gcc-interface/Makefile.in (target_cpu_default): Revert
3618 2013-10-11 change.
3619
3620 2014-03-13 Eric Botcazou <ebotcazou@adacore.com>
3621
3622 PR ada/51483
3623 * cstand.adb (Register_Float_Type): Add 'precision' parameter and use
3624 it to set the RM size. Use directly 'size' for the Esize.
3625 (Create_Back_End_Float_Types): Adjust call to above.
3626 * get_targ.ads (Register_Type_Proc): Add 'precision' parameter.
3627 * set_targ.ads (FPT_Mode_Entry): Add 'precision' component.
3628 (Write_Target_Dependent_Values): Adjust comment.
3629 * set_targ.adb (Register_Float_Type): Add 'precision' parameter and
3630 deal with it.
3631 (Write_Target_Dependent_Values): Write the precision in lieu of size.
3632 (Initialization): Read the precision in lieu of size and compute the
3633 size from the precision and the alignment.
3634 * gcc-interface/gigi.h (enumerate_modes): Add integer parameter.
3635 * gcc-interface/misc.c (enumerate_modes): Likewise. Do not register
3636 types for vector modes, pass the size in addition to the precision.
3637
3638 2014-03-10 Eric Botcazou <ebotcazou@adacore.com>
3639
3640 * gcc-interface/Make-lang.in (ADA_DEPFILES): Fix typo.
3641
3642 2014-03-07 Doug Rupp <rupp@adacore.com>
3643
3644 PR ada/60411
3645 * system-linux-armel.ads (Backend_Overflow_Checks): Set to True.
3646 (Support_64_Bit_Divides): Removed, no longer used.
3647 (ZCX_By_Default): Enabled.
3648
3649 2014-02-25 Doug Rupp <rupp@adacore.com>
3650
3651 * gcc-interface/Makefile.in (arm-linux):
3652 (EH_MECHANISM): Use ARM unwinder (-arm)
3653 (LIBGNAT_TARGET_PAIRS: Override defaults with a-exexpr-gcc.adb and
3654 s-excmac-arm.ads.
3655 (EXTRA_LIBGNAT_OBJS): Add raise-gcc.o
3656 (EXTRA_GNATRTL_NONTASKING_OBJS): Add g-cppexc.o s-excmac.o.
3657 (arm-wrs-vxworks): Add EH_MECHANISM=-gcc for kernel mode.
3658 (EXTRA_LIBGNAT_OBJS): Add sigtramp-armvxw.o
3659 Add dependencies for sigtramp-armvxw.o.
3660
3661 2014-02-25 Eric Botcazou <ebotcazou@adacore.com>
3662
3663 * gcc-interface/trans.c (Pragma_to_gnu): Deal with Warning_As_Error.
3664
3665 2014-02-25 Robert Dewar <dewar@adacore.com>
3666
3667 * rtsfind.adb (Is_RTE): Protect against entity with no scope
3668 field (previously this call blew up on the Standard entity).
3669 * sem_attr.adb (Analyze_Attribute, case Access): Remove
3670 test for No_Abort_Statements, this is now handled in
3671 Set_Entity_With_Checks.
3672 * exp_ch6.adb, sem_ch10.adb, sem_ch4.adb, sem_ch8.adb, sem_res.adb:
3673 Change name Set_Entity_With_Style_Check => Set_Entity_With_Checks.
3674 * sem_util.ads, sem_util.adb: Change name Set_Entity_With_Style_Check =>
3675 Set_Entity_With_Checks.
3676 (Set_Entity_With_Checks): Add checks for No_Dynamic_Attachment,
3677 Add checks for No_Abort_Statements.
3678
3679 2014-02-25 Robert Dewar <dewar@adacore.com>
3680
3681 * exp_ch9.adb (Expand_Entry_Barrier): Add comment that call to
3682 Check_Restriction is OK.
3683
3684 2014-02-25 Ed Schonberg <schonberg@adacore.com>
3685
3686 * sem_ch3.adb (Process_Full_View): Better error message when
3687 the full view of a private type without discriminants is an
3688 unconstrained type.
3689 * sem_ch7.adb (Uninstall_Declarations): Ditto.
3690
3691 2014-02-25 Eric Botcazou <ebotcazou@adacore.com>
3692
3693 * sigtramp-armvxw.c: Also restore r0.
3694
3695 2014-02-25 Robert Dewar <dewar@adacore.com>
3696
3697 * errout.adb (Error_Msg_Internal): Warning_Msg_Char set
3698 unconditionally (Set_Msg_Insertion_Warning): Warning_Msg_Char
3699 set unconditionally.
3700 * erroutc.adb (Get_Warning_Tag): Does not give a leading space
3701 any more (Output_Msg_Text): Rewritten with new convention on
3702 output of warnings that are treated as errors.
3703 * erroutc.ads (Error_Msg_Object): Warn_Chr is always set even
3704 if Warn is False.
3705 * gnat_rm.texi: Updates to documentation on pragma
3706 Warning_As_Error.
3707 * warnsw.adb (Set_Dot_Warning_Switch): -gnatw.e should not
3708 set Warning_Doc_Switch.
3709 * lib-writ.ads: Add documentation note on ALI file generation
3710 for C.
3711 * exp_ch6.adb (Expand_Call): Remove check for No_Abort_Statements
3712 (belongs in Sem).
3713 * sem_attr.adb (Resolve_Attribute, case Access):
3714 Abort_Task'Access violates the No_Abort_Statements restriction.
3715 * sem_res.adb (Resolve_Call): Check restriction
3716 No_Abort_Statements for call to Abort_Task or a renaming of it.
3717
3718 2014-02-25 Robert Dewar <dewar@adacore.com>
3719
3720 * sem_ch3.adb (Array_Type_Declaration): Check for case of using
3721 type name as index.
3722 * lib.ads: Minor reformatting.
3723 * einfo.ads: Minor reformatting.
3724
3725 2014-02-25 Doug Rupp <rupp@adacore.com>
3726
3727 * sem_mech.adb (Set_Mechanisms): For convention Fortran on VMS
3728 use Short_Descriptor(S) as the argument passing mechanism.
3729
3730 2014-02-25 Eric Botcazou <ebotcazou@adacore.com>
3731
3732 * sigtramp-ppcvxw.c (CFI_COMMON_REGS): Also include r0.
3733
3734 2014-02-25 Robert Dewar <dewar@adacore.com>
3735
3736 * atree.ads (Warnings_Treated_As_Errors): New variable.
3737 * errout.adb (Error_Msg_Internal): Set Warn_Err flag in
3738 error object (Initialize): Initialize Warnings_As_Errors_Count
3739 (Write_Error_Summary): Include count of warnings treated as errors.
3740 * erroutc.adb (Warning_Treated_As_Error): New function.
3741 (Matches): Function moved to outer level of package.
3742 * erroutc.ads (Error_Msg_Object): Add Warn_Err flag.
3743 (Warning_Treated_As_Error): New function.
3744 * gnat_rm.texi: Document pragma Treat_Warning_As_Error.
3745 * opt.adb: Add handling of Warnings_As_Errors_Count[_Config].
3746 * opt.ads (Config_Switches_Type): Add entry for
3747 Warnings_As_Errors_Count.
3748 (Warnings_As_Errors_Count): New variable.
3749 (Warnings_As_Errors): New array.
3750 * par-prag.adb: Add dummy entry for Warning_As_Error.
3751 * sem_prag.adb (Analyze_Pragma): Implement new pragma
3752 Warning_As_Error.
3753 * snames.ads-tmpl: Add entries for Warning_As_Error pragma.
3754
3755 2014-02-25 Eric Botcazou <ebotcazou@adacore.com>
3756
3757 * sigtramp.h: Fix minor inaccuracy.
3758
3759 2014-02-25 Ben Brosgol <brosgol@adacore.com>
3760
3761 * gnat_ugn.texi: Added description of kill command.
3762
3763 2014-02-25 Robert Dewar <dewar@adacore.com>
3764
3765 * gnat_rm.texi (Address_Clauses): Add a section discussing the
3766 problem of address clauses causing unexpected initialization,
3767 including the effect of Initialize_Scalars.
3768
3769 2014-02-25 Robert Dewar <dewar@adacore.com>
3770
3771 * errout.adb: Various changes for better msgs for anonmous access
3772 subprogram types.
3773 * erroutc.ads, erroutc.adb (Buffer_Ends_With): Version with character
3774 argument.
3775 (Buffer_Remove): Version with character argument.
3776 * sem_attr.adb (Resolve_Attribute, case Access): Better handling
3777 of mismatching conventions for access-to-subprogram case.
3778 * sem_prag.adb (Set_Convention_From_Pragma): Deal with anonymous
3779 access types in record.
3780 * sem_util.ads, sem_util.adb (Set_Convention): Handle anonymous access
3781 types, including in records.
3782
3783 2014-02-25 Doug Rupp <rupp@adacore.com>
3784
3785 * sigtramp-ppcvxw.c, sigtramp.h, sigtramp-armvxw.c: Comment
3786 enhancements and corrections.
3787
3788 2014-02-25 Robert Dewar <dewar@adacore.com>
3789
3790 * gnat_rm.texi: New section "Conventions and Anonymous Access Types"
3791
3792 2014-02-25 Robert Dewar <dewar@adacore.com>
3793
3794 * gnat_rm.texi: First set of documentation additions for
3795 predefined RM units.
3796 * checks.adb: Minor reformatting.
3797 * sem_elab.adb (Check_Task_Activation): Minor fix to error
3798 message.
3799 * sem_util.adb: Minor reformatting.
3800
3801 2014-02-25 Arnaud Charlet <charlet@adacore.com>
3802
3803 * usage.adb (Usage): Add help on -gnateC.
3804 * switch-c.adb (Scan_Front_End_Switches): Add handling of -gnateC.
3805 * opt.ads (Generate_CodePeer_Messages): New flag.
3806 * gnat_ugn.texi: Document new switch -gnateC.
3807
3808 2014-02-25 Ben Brosgol <brosgol@adacore.com>
3809
3810 * gnat_rm.texi: Corrected minor typos in Implementation Defined
3811 Aspects.
3812 * opt.ads: Minor reformatting.
3813
3814 2014-02-25 Robert Dewar <dewar@adacore.com>
3815
3816 * binde.adb: Change messages to mention -gnatel instead of -gnatwl.
3817 * gnat_ugn.texi: Update documentation of -gnatwl Add documentation
3818 of -gnatel/-gnateL.
3819 * opt.ads (Warn_Info_Messages): New flag.
3820 * sem_elab.adb: Use Elab_Warnings, Elab_Info_Messages to control
3821 messages.
3822 * sem_prag.adb: Use Elab_Warnings, Elab_Info_Messages to control
3823 messages.
3824 * switch-m.ad, switch-c.adb: Recognize new -gnatel/EL switches.
3825 * usage.adb: Add documentation of -gnatel/-gnateL Update
3826 documentation of -gnatwl/-gnatwL.
3827 * warnsw.adb: New handling of Elab_Warnings, Elab_Info_Messages
3828 * warnsw.ads (Elab_Info_Messages): New field in Warning_Record
3829
3830 2014-02-25 Robert Dewar <dewar@adacore.com>
3831
3832 * einfo.ads, einfo.adb (Has_Shift_Operator): New flag.
3833 * gnat_rm.texi: Document pragma Provide_Shift_Operators.
3834 * interfac.ads: Minor code reorganization (add pragma
3835 Compiler_Unit_Warning).
3836 * par-prag.adb: Add dummy entry for Provide_Shift_Operators.
3837 * sem_ch3.adb (Build_Derived_Numeric_Type): Copy
3838 Has_Shift_Operator flag.
3839 * sem_intr.adb (Check_Intrinsic_Subprogram): Make sure
3840 Check_Shift is always called (Check_Shift): Set Has_Shift_Operator.
3841 * sem_prag.adb: Implement pragma Provide_Shift_Operators.
3842 * snames.ads-tmpl: Add entries for pragma Provide_Shift_Operators
3843 Add entry for Name_Amount.
3844 * checks.adb (Selected_Range_Checks): When checking for a null
3845 range, make sure we use the base type, and not the subtype for
3846 deciding a range is null.
3847 * sem_ch5.adb (Analyze_Loop_Parameter_Specification): Check
3848 for suspicious loop bound which is outside the range of the
3849 loop subtype.
3850 * gnat_ugn.texi: Add documentation section "Determining the
3851 Chosen Elaboration Order"
3852 * sem_ch13.adb (UC_Entry): Add field Act_Unit
3853 (Validate_Unchecked_Conversion): Store Act_Unit
3854 (Validate_Unchecked_Conversions): Test Warnings_Off in Act_Unit
3855 * treepr.adb: Minor reformatting.
3856
3857 2014-02-25 Arnaud Charlet <charlet@adacore.com>
3858
3859 * usage.adb: Minor: fix typo.
3860
3861 2014-02-25 Robert Dewar <dewar@adacore.com>
3862
3863 * lib.ads, s-bitops.adb, s-bitops.ads, s-conca5.adb, gnat_rm.texi,
3864 s-conca5.ads, s-conca7.adb, s-conca7.ads, s-crc32.adb, s-crc32.ads,
3865 s-conca9.adb, s-conca9.ads, g-dyntab.adb, s-crtl.ads, g-dyntab.ads,
3866 s-excdeb.adb, s-addope.adb, s-addope.ads, s-carun8.adb, s-carun8.ads,
3867 g-htable.adb, g-htable.ads, g-hesora.adb, g-hesora.ads, s-conca2.adb,
3868 s-conca2.ads, a-comlin.adb, a-chlat1.ads, a-comlin.ads, errout.ads,
3869 a-except.adb, s-conca4.adb, a-except.ads, s-conca4.ads, s-conca6.adb,
3870 s-conca6.ads, g-spchge.adb, g-spchge.ads, g-u3spch.adb, g-u3spch.ads,
3871 a-strhas.ads, restrict.adb, aspects.adb, aspects.ads, s-conca8.adb,
3872 s-conca8.ads, back_end.adb, par-prag.adb, g-byorma.adb, g-byorma.ads,
3873 a-elchha.adb, a-elchha.ads, g-speche.adb, g-speche.ads, s-casuti.adb,
3874 s-assert.adb, s-casuti.ads, s-assert.ads, a-clrefi.adb, a-clrefi.ads,
3875 s-conca3.adb, s-conca3.ads, a-ioexce.ads: Implement pragma
3876 Compiler_Unit_Warning, change Compiler_Unit everywhere to
3877 Compiler_Unit_Warning.
3878
3879 2014-02-25 Sergey Rybin <rybin@adacore.com frybin>
3880
3881 * sem_prag.adb (Analyze_Depends_In_Decl_Part): Do not normalize
3882 in ASIS mode aggregates that are used as aspect definitions.
3883
3884 2014-02-25 Robert Dewar <dewar@adacore.com>
3885
3886 * exp_ch7.adb, sem_util.adb, sem_util.ads, exp_ch6.adb: Minor
3887 reformatting.
3888
3889 2014-02-25 Ed Schonberg <schonberg@adacore.com>
3890
3891 * freeze.adb (Freeze_Entity): If the return type of a function
3892 is a limited view, and the non-limited view has not been seen yet,
3893 defer freezing to some later point.
3894
3895 2014-02-25 Robert Dewar <dewar@adacore.com>
3896
3897 * sem_ch3.adb: Minor reformatting.
3898
3899 2014-02-25 Robert Dewar <dewar@adacore.com>
3900
3901 * s-excdeb.ads, s-except.ads, s-exctab.adb, s-exctab.ads, s-finmas.ads,
3902 s-htable.adb, s-htable.ads, s-imenne.adb, s-imenne.ads, s-imgenu.adb,
3903 s-imgenu.ads, s-mastop.adb, s-mastop.ads, s-memory-vms_64.adb,
3904 s-memory-vms_64.ads, s-memory.adb, s-memory.ads, s-os_lib.adb,
3905 s-os_lib.ads, s-parame.adb, s-parame.ads, s-purexc.ads, s-restri.adb,
3906 s-restri.ads, s-rident.ads, s-secsta.adb, s-secsta.ads, s-soflin.adb,
3907 s-soflin.ads, s-sopco3.adb, s-sopco3.ads, s-sopco4.adb, s-sopco4.ads,
3908 s-sopco5.adb, s-sopco5.ads, s-spsufi.ads, s-stache.adb, s-stache.ads,
3909 s-stalib.adb, s-stalib.ads, s-stoele.adb, s-stoele.ads, s-strcom.adb,
3910 s-strcom.ads, s-strhas.adb, s-string.adb, s-string.ads, s-strops.adb,
3911 s-strops.ads, s-ststop.adb, s-ststop.ads, s-traceb.adb, s-traceb.ads,
3912 s-traent.adb, s-traent.ads, s-unstyp.ads, s-utf_32.adb, s-utf_32.ads,
3913 s-wchcnv.adb, s-wchcnv.ads, s-wchcon.adb, s-wchcon.ads, s-wchjis.adb,
3914 s-wchjis.ads, sem_ch11.adb, sem_ch4.adb, sem_ch5.adb, sem_prag.adb,
3915 snames.ads-tmpl: Change Compiler_Unit everywhere to
3916 Compiler_Unit_Warning.
3917
3918 2014-02-25 Hristian Kirtchev <kirtchev@adacore.com>
3919
3920 * exp_ch6.adb (Add_Or_Save_Precondition): New routine.
3921 (Collect_Body_Postconditions_In_Decls): New routine.
3922 (Collect_Body_Postconditions_Of_Kind): Factor out code. Handle
3923 postcondition aspects or pragmas that appear on a subprogram
3924 body stub.
3925 (Collect_Spec_Preconditions): Factor out code. Handle
3926 precondition aspects or pragmas that appear on a subprogram
3927 body stub.
3928 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): The analysis of
3929 aspects that apply to a subprogram body stub is no longer delayed,
3930 the aspects are analyzed on the spot.
3931 (SPARK_Aspect_Error):
3932 Aspects that apply to a subprogram declaration cannot appear in
3933 a subunit.
3934 * sem_ch10.adb Remove with and use clause for Sem_Ch13.
3935 (Analyze_Proper_Body): Add local variable Comp_Unit. Unum
3936 is now a local variable. Code cleanup. Analysis related to
3937 the aspects of a subprogram body stub is now carried out by
3938 Analyze_Subprogram_Body_Helper. Do not propagate the aspects
3939 and/or pragmas of a subprogram body stub to the proper body
3940 as this is no longer needed. Do not analyze the aspects of a
3941 subprogram stub when the corresponding source unit is missing.
3942 (Analyze_Protected_Body_Stub): Flag the illegal use of aspects
3943 on a stub.
3944 (Analyze_Task_Body_Stub): Flag the illegal use of
3945 aspects on a stub.
3946 (Optional_Subunit): Add local variable Unum.
3947 * sem_ch13.adb (Insert_Delayed_Pragma): Do not analyze a generated
3948 pragma when it applies to a subprogram body stub.
3949 * sem_prag.adb (Analyze_Pragma): Pragmas Contract_Cases,
3950 Depends and Global can now apply to a subprogram body stub as
3951 long as it acts as its own spec.
3952 (Analyze_Refined_Pragma):
3953 Code reformatting. Refinement pragmas cannot apply to a subunit.
3954
3955 2014-02-25 Hristian Kirtchev <kirtchev@adacore.com>
3956
3957 * einfo.ads Update the usage of flag
3958 Uses_Sec_Stack. Uses_Sec_Stack now applies to E_Loop entities.
3959 * exp_ch5.adb (Expand_Iterator_Loop): The temporary for a cursor
3960 now starts with the letter 'C'. This makes reading expanded
3961 code easier.
3962 * exp_ch7.adb (Establish_Transient_Scope): Add local variable
3963 Iter_Loop. Signal that an Ada 2012 iterator loop requires
3964 secondary stack management when creating a transient scope for
3965 an element reference.
3966 * exp_util.adb (Process_Statements_For_Controlled_Objects):
3967 When wrapping the statements of a loop, pass the E_Loop entity
3968 to the wrapping machinery.
3969 (Wrap_Statements_In_Block): Add
3970 formal parameter Scop along with comment on usage. Add local
3971 variables Block_Id, Block_Nod and Iter_Loop. Mark the generated
3972 block as requiring secondary stack management when the block is
3973 created inside an Ada 2012 iterator loop. This ensures that any
3974 reference objects are reclaimed on each iteration of the loop.
3975 * sem_ch5.adb (Analyze_Loop_Statement): Mark the generated block
3976 tasked with the handling of container iterators as requiring
3977 secondary stack management. This ensures that iterators are
3978 reclaimed when the loop terminates or is exited in any fashion.
3979 * sem_util.adb (Add_Block_Identifier): New routine.
3980 (Find_Enclosing_Iterator_Loop): New routine.
3981 * sem_util.ads (Add_Block_Identifier): New routine.
3982 (Find_Enclosing_Iterator_Loop): New routine.
3983
3984 2014-02-25 Robert Dewar <dewar@adacore.com>
3985
3986 * sinfo.ads: Minor reformatting.
3987
3988 2014-02-25 Tristan Gingold <gingold@adacore.com>
3989
3990 * s-expllu.ads, s-expuns.ads, s-expmod.ads: Minor comment fix.
3991
3992 2014-02-25 Pascal Obry <obry@adacore.com>
3993
3994 * sinput-l.adb, osint.adb, osint.ads: Add Prep_Suffix to factorize code.
3995
3996 2014-02-25 Tristan Gingold <gingold@adacore.com>
3997
3998 * sem_ch10.adb: Minor comment fix.
3999
4000 2014-02-25 Bob Duff <duff@adacore.com>
4001
4002 * s-tasdeb.adb: Misc cleanup of this package,
4003 including printing addresses in hexadecimal.
4004 (Write): Fix minor bug when taking 'Address of an empty string.
4005
4006 2014-02-25 Ed Schonberg <schonberg@adacore.com>
4007
4008 * sem_prag.adb (Analyze_Part_Of): Reject state refinement in a
4009 public child unit when it does not refer to the abstract state
4010 of a public ancestor.
4011
4012 2014-02-25 Yannick Moy <moy@adacore.com>
4013
4014 * sem_prag.adb (Analyze_Pragma/Pragma_Validity_Checks): Ignore pragma
4015 Validity_Checks in GNATprove and CodePeer modes.
4016
4017 2014-02-25 Pascal Obry <obry@adacore.com>
4018
4019 * prj-attr.adb, projects.texi, snames.ads-tmpl: Add package Install's
4020 Artifacts attribute.
4021
4022 2014-02-25 Yannick Moy <moy@adacore.com>
4023
4024 * sem_prag.adb: Minor reformatting to get consistent messages.
4025
4026 2014-02-25 Robert Dewar <dewar@adacore.com>
4027
4028 * checks.adb: Minor reformatting.
4029 * sinfo.ads (Do_Range_Check): Document that this flag is never
4030 passed to the back end.
4031
4032 2014-02-25 Yannick Moy <moy@adacore.com>
4033
4034 * sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_prag.adb, sem_attr.adb,
4035 sem_ch6.adb: Remove useless references to SPARK RM in error messages.
4036
4037 2014-02-25 Hristian Kirtchev <kirtchev@adacore.com>
4038
4039 * sem_res.adb (Appears_In_Check): New routine.
4040 (Resolve_Entity_Name): Remove local variables Prev and
4041 Usage_OK. Par is now a constant. Remove the parent chain traversal
4042 as the placement of a volatile object with enabled property
4043 Async_Writers and/or Effective_Reads must appear immediately
4044 within a legal construct.
4045
4046 2014-02-25 Hristian Kirtchev <kirtchev@adacore.com>
4047
4048 * checks.adb (Apply_Selected_Range_Checks):
4049 Alphabetize local constants and variables. Add comments.
4050 Always insert a range check that requires runtime evaluation into
4051 the tree.
4052
4053 2014-02-25 Robert Dewar <dewar@adacore.com>
4054
4055 * sem_attr.adb, sem_ch6.adb, par-ch3.adb: Minor reformatting.
4056
4057 2014-02-25 Bob Duff <duff@adacore.com>
4058
4059 * s-tassta.adb (Finalize_Global_Tasks): Limit the number of loop
4060 iterations while waiting for independent tasks to terminate;
4061 if an independent task does not terminate, we do not want to
4062 hang here. In that case, the thread will be terminated when the
4063 process exits.
4064 * s-taprop-linux.adb (Abort_Task): Fix Assert to allow for ESRCH.
4065
4066 2014-02-25 Ed Schonberg <schonberg@adacore.com>
4067
4068 * sem_prag.adb (Check_SPARK_Aspect_For_ASIS): New subprogram,
4069 used to perform pre-analysis of the expression for SPARK
4070 aspects that have a non-standard syntax, such as GLobal and
4071 Initializes. The procedure applies to the original expression
4072 in an aspect specification, prior to the analysis of the
4073 corresponding pragma, in order to provide semantic information
4074 for ASIS navigation purposes.
4075 (Analyze_Global_In_Decl_List, Analyze_Initializes_In_Decl_Part):
4076 Call new subprogram.
4077
4078 2014-02-25 Yannick Moy <moy@adacore.com>
4079
4080 * sem_prag.adb: Remove obsolete reference to SPARK RM in error message.
4081
4082 2014-02-25 Doug Rupp <rupp@adacore.com>
4083
4084 * init.c (HAVE_GNAT_ADJUST_CONTEXT_FOR_RAISE): Enable for ARM.
4085 (__gnat_adjust_context_for_raise): Bump the PC by 2.
4086
4087 2014-02-25 Ed Schonberg <schonberg@adacore.com>
4088
4089 * par-ch3.adb (P_Basic_Declarative_Items): In the case of a
4090 misplaced IS, add a statement sequence to improper body only if
4091 one has not been parsed already.
4092
4093 2014-02-25 Ed Schonberg <schonberg@adacore.com>
4094
4095 * sem_attr.adb (Analyze_Attribute, case 'Update): Check for
4096 mismatch when multidimensional array is updated with a single
4097 index.
4098
4099 2014-02-25 Yannick Moy <moy@adacore.com>
4100
4101 * sem_ch3.adb, sem_ch5.adb, sem_prag.adb, sem_attr.adb, errout.ads,
4102 sem_ch6.adb: Mark most references to SPARK RM in error messages
4103 for removal.
4104
4105 2014-02-24 Ed Schonberg <schonberg@adacore.com>
4106
4107 * par-ch3.adb (P_Basic_Declarative_Items): If an improper body
4108 appears in a list of basic declarations, complete the tree with
4109 an empty statement list, to prevent cascaded errors and crashes
4110 if semantic analysis is attempted.
4111
4112 2014-02-24 Thomas Quinot <quinot@adacore.com>
4113
4114 * g-sercom-mingw.adb (Open): Fix incorrect test for error return
4115 value.
4116 * erroutc.adb: Minor reformatting.
4117
4118 2014-02-24 Hristian Kirtchev <kirtchev@adacore.com>
4119
4120 * sem_prag.adb (Check_Clause_Syntax): Account
4121 for a solitary input item in a dependency list.
4122
4123 2014-02-24 Yannick Moy <moy@adacore.com>
4124
4125 * gnat1drv.adb (Adjust_Global_Switches): Do not
4126 use validity checks at all in GNATprove_Mode.
4127
4128 2014-02-24 Robert Dewar <dewar@adacore.com>
4129
4130 * g-sercom-mingw.adb, g-sercom-linux.adb, sem_prag.adb, freeze.adb,
4131 atree.adb, atree.ads: Minor reformatting.
4132
4133 2014-02-24 Hristian Kirtchev <kirtchev@adacore.com>
4134
4135 * sem_ch6.adb (Analyze_Subprogram_Body_Contract): Do not enforce
4136 global and dependence refinement when SPARK_Mode is off.
4137 * sem_ch7.adb (Analyze_Package_Body_Contract): Do not enforce
4138 state refinement when SPARK_Mode is off.
4139 * sem_ch13.adb (Analyze_Aspect_Specifications): Add local
4140 variable Decl. Insert the generated pragma for Refined_State
4141 after a potential pragma SPARK_Mode.
4142 * sem_prag.adb (Analyze_Depends_In_Decl_Part): Add local
4143 constant Deps. Remove local variable Expr. Check the syntax
4144 of pragma Depends when SPARK_Mode is off. Factor out the
4145 processing for extra parenthesis around individual clauses.
4146 (Analyze_Global_In_Decl_List): Items is now a constant. Check
4147 the syntax of pragma Global when SPARK_Mode is off.
4148 (Analyze_Initializes_In_Decl_Part): Check the syntax of pragma
4149 Initializes when SPARK_Mode is off.
4150 (Analyze_Part_Of): Check
4151 the syntax of the encapsulating state when SPARK_Mode is off.
4152 (Analyze_Pragma): Check the syntax of pragma Abstract_State when
4153 SPARK_Mode is off. Move the declaration order check with respect
4154 to pragma Initializes to the end of the processing. Do not verify
4155 the declaration order for pragma Initial_Condition when SPARK_Mode
4156 is off. Do not complain about a useless package refinement when
4157 SPARK_Mode is off.
4158 (Analyze_Refined_Depends_In_Decl_Part): Refs
4159 is now a constant. Check the syntax of pragma Refined_Depends
4160 when SPARK_Mode is off.
4161 (Analyze_Refined_Global_In_Decl_Part):
4162 Check the syntax of pragma Refined_Global when SPARK_Mode is off.
4163 (Analyze_Refined_State_In_Decl_Part): Check the syntax of pragma
4164 Refined_State when SPARK_Mode is off.
4165 (Check_Dependence_List_Syntax): New routine.
4166 (Check_Global_List_Syntax): New routine.
4167 (Check_Initialization_List_Syntax): New routine.
4168 (Check_Item_Syntax): New routine.
4169 (Check_State_Declaration_Syntax): New routine.
4170 (Check_Refinement_List_Syntax): New routine.
4171 (Has_Extra_Parentheses): Moved to the top level of Sem_Prag.
4172
4173 2014-02-24 Robert Dewar <dewar@adacore.com>
4174
4175 * a-tags.adb, s-os_lib.adb: Minor reformatting.
4176
4177 2014-02-24 Thomas Quinot <quinot@adacore.com>
4178
4179 * g-sercom-mingw.adb, g-sercom-linux.adb (Raise_Error): Include
4180 strerror message, not just numeric errno value.
4181
4182 2014-02-24 Doug Rupp <rupp@adacore.com>
4183
4184 * raise-gcc.c (exception_class_eq): Make endian neutral.
4185
4186 2014-02-24 Ed Schonberg <schonberg@adacore.com>
4187
4188 * atree.ads, atree,adb (Copy_Separate_Tree): Remove Syntax_Only
4189 flag, and reset Etype and Analyzed attributes unconditionally
4190 when copying a tree that may be partly analyzed.
4191 * freeze.adb: Change calls to Copy_Separate_Tree accordingly.
4192 * sem_ch6.adb (Check_Inline_Pragma): If the Inline pragma appears
4193 within a subprogram body and applies to it, remove it from the
4194 body before making a copy of it, to prevent spurious errors when
4195 analyzing the copied body.
4196
4197 2014-02-24 Thomas Quinot <quinot@adacore.com>
4198
4199 * s-os_lib.adb (Errno_Message): Do not depend on Integer'Image.
4200 * s-oscons-tmplt.c: On VxWorks, include adaint.h only after
4201 vxWorks.h has been included. Also ensure that file attributes
4202 related definitions are output even in cases where socket support
4203 is not enabled.
4204 * a-tags.adb: Code clean up.
4205 * Make-generated.in (OSCONS_CPP, OSCONS_EXTRACT): Use -iquote
4206 instead of -I to add the main ada source directory to the header
4207 search path, in order to avoid conflict between our own "types.h"
4208 and VxWork's <types.h>.
4209
4210 2014-02-24 Robert Dewar <dewar@adacore.com>
4211
4212 * atree.ads, atree.adb (Copy_Separate_Tree): Add Syntax_Only parameter.
4213 * debug.adb: Remove documentation of -gnatd.X, no longer used.
4214 * freeze.adb (Wrap_Imported_Subprogram): Fixed and activated.
4215
4216 2014-02-24 Bob Duff <duff@adacore.com>
4217
4218 * gnat_ugn.texi: Improve documentation of gnatpp.
4219
4220 2014-02-24 Thomas Quinot <quinot@adacore.com>
4221
4222 * g-stheme.adb, g-socthi-vms.adb, g-socthi-vms.ads,
4223 g-socthi-vxworks.adb, g-socthi-vxworks.ads, g-stseme.adb,
4224 g-socthi-mingw.adb, g-socthi-mingw.ads, g-socthi.adb,
4225 g-socthi.ads, g-socket.adb (Host_Error_Message): Return a string, not
4226 a chars_ptr, because on Windows this is a renaming of
4227 Socket_Error_Message.
4228
4229 2014-02-24 Robert Dewar <dewar@adacore.com>
4230
4231 * a-direct.adb, sem_ch5.adb, a-cfdlli.adb, a-cfhase.adb, a-tags.adb,
4232 s-filatt.ads, a-cforma.adb, sem_ch6.adb, g-socthi-mingw.adb,
4233 a-cfhama.adb, a-cforse.adb, a-cofove.adb: Minor reformatting and code
4234 reorganization.
4235
4236 2014-02-24 Thomas Quinot <quinot@adacore.com>
4237
4238 * Make-generated.in (OSCONS_CPP, OSCONS_EXTRACT): Make sure
4239 that the source directory containing s-oscons-tmplt.c is on the
4240 include path, so that all internal header files are available.
4241
4242 2014-02-24 Ed Schonberg <schonberg@adacore.com>
4243
4244 * sem_ch5.adb (Analyze_Loop_Parameter_Specification): If the
4245 domain of iteration is an attribute reference 'Old, this is an
4246 Ada 2012 iterator and the loop must be rewritten as such.
4247
4248 2014-02-24 Thomas Quinot <quinot@adacore.com>
4249
4250 * s-fileio.adb (Errno_Message): Remove, use shared version from
4251 s-os_lib instead.
4252 * s-crtrun.ads, Makefile.rtl: Remove now unused unit.
4253 * g-stseme (Socket_Error_Message): Reimplement in terms of new
4254 s-os_lib function.
4255 * g-socthi.ads, g-socthi.adb: Change profile of
4256 Socket_Error_Message to return String to allow the above.
4257 * g-socket.adb, g-socthi-mingw.adb, g-socthi-mingw.ads,
4258 * g-socthi-vms.adb, g-socthi-vms.ads, g-socthi-vxworks.adb,
4259 * g-socthi-vxworks.ads: Update to account for the above profile
4260 change.
4261 * a-tags.adb: Use strlen builtin binding provided by s-crtl.
4262 * s-crtl.ads (strncpy): New procedure.
4263 * s-os_lib.adb (Copy_Attributes): Import just once (strncpy):
4264 Use import from s-crtl.
4265 * a-envvar.adb, osint.adb: Use imports of C runtime functions
4266 from s-crtl instead of re-importing locally.
4267
4268 2014-02-24 Hristian Kirtchev <kirtchev@adacore.com>
4269
4270 * sem_prag.adb (Analyze_Global_Item): Emit the
4271 variable related checks concerning volatile objects only when
4272 SPARK_Mode is on.
4273
4274 2014-02-24 Robert Dewar <dewar@adacore.com>
4275
4276 * sem_ch5.adb (Analyze_Iterator_Specification): use
4277 Error_Msg_Ada_2012_Feature.
4278
4279 2014-02-24 Jose Ruiz <ruiz@adacore.com>
4280
4281 * s-rident.ads (Profile_Info): For Ravenscar, the restrictions
4282 No_Local_Timing_Events and No_Specific_Termination_Handlers
4283 must be set, according to the Ravenscar profile definition
4284 in D.13(6/3).
4285
4286 2014-02-24 Ed Schonberg <schonberg@adacore.com>
4287
4288 * sem_ch6.adb (Analyze_Expression_Function): If this is a
4289 completion, freeze return type and its designated type if needed.
4290
4291 2014-02-24 Thomas Quinot <quinot@adacore.com>
4292
4293 * sem_ch13.adb (Analyze_Attribute_Definition_Clause, case
4294 'Address): When moving initialization statements to a freeze
4295 entity, keep them under a single node (i.e. do not unwrap
4296 expressions with actions), and set the Initialization_Statements
4297 attribute again so that processing of a later pragma Import can
4298 still remove them.
4299
4300 2014-02-24 Claire Dross <dross@adacore.com>
4301
4302 * a-cfdlli.adb, a-cfdlli.ads, a-cfhama.adb, a-cfhama.ads,
4303 a-cfhase.adb, a-cfhase.ads, a-cforma.adb, a-cforma.ads,
4304 a-cforse.adb, a-cforse.ads, a-cofove.adb, a-cofove.ads: Rename
4305 Left/Right to First_To_Previous/Current_To_Last.
4306
4307 2014-02-24 Thomas Quinot <quinot@adacore.com>
4308
4309 * adaint.h (struct file_attributes): New component "error"
4310 (__gnat_error_attributes): Accessor for the above.
4311 * adaint.c (__gnat_error_attributes): New subprogram
4312 (__gnat_stat): Fix returned value (expect errno value)
4313 (__gnat_stat_to_attr): Add management of error component (set to
4314 stat errno value, except for missing files where it is set to 0,
4315 and exists is set to 0).
4316 * osint.ads (File_Attributes_Size): Update per change above,
4317 also clarify documentation.
4318 * s-filatt.ads: New file, binding to file attributes related
4319 functions.
4320 * Makefile.rtl (s-filatt): New runtime unit.
4321 * s-crtl.ads (strlen): Expose binding to GCC builtin (falls back
4322 to library function if not available on target).
4323 * s-os_lib.ads, s-os_lib.adb (Errno_Message): New subprogram.
4324 * s-oscons-tmplt.c (SIZEOF_struct_file_attributes,
4325 SIZEOF_struct_dirent_alloc): New constants.
4326 * Make-generated.in (s-oscons.ads): Now requires adaint.h.
4327 * a-direct.adb (Fetch_Next_Entry): Fix incorrect buffer sizes.
4328 Perform appropriate error checking if stat fails (do not just
4329 ignore existing files if stat fails)
4330 * gcc-interface/Make-lang.in (GNAT_ADA_OBJS, GNATBIND_OBJS): Update
4331 dependencies.
4332
4333 2014-02-24 Hristian Kirtchev <kirtchev@adacore.com>
4334
4335 * sem_prag.adb (Analyze_Global_Item): Move the check concerning
4336 the use of volatile objects as global items in a function to
4337 the variable related checks section.
4338 * sem_util.adb (Async_Readers_Enabled): Directly call
4339 Has_Enabled_Property.
4340 (Async_Writers_Enabled): Directly call Has_Enabled_Property.
4341 (Effective_Reads_Enabled): Directly call Has_Enabled_Property.
4342 (Effective_Writes_Enabled): Directly call Has_Enabled_Property.
4343 (Has_Enabled_Property): Rename formal parameter State_Id to Item_Id.
4344 Update the comment on usage. State_Has_Enabled_Property how handles
4345 the original logic of the routine. Add processing for variables.
4346 (State_Has_Enabled_Property): New routine.
4347 (Variable_Has_Enabled_Property): New routine.
4348
4349 2014-02-24 Robert Dewar <dewar@adacore.com>
4350
4351 * sinfo.ads, sem_ch12.adb, sem_res.adb, sem_ch4.adb, par-ch12.adb:
4352 Minor reformatting.
4353 * atree.ads, atree.adb (Node35): New function.
4354 (Set_Node35): New procedure.
4355 * debug.adb: Define new debug flag -gnatd.X.
4356 * einfo.ads, einfo.adb (Import_Pragma): New field.
4357 * freeze.adb (Wrap_Imported_Procedure): New procedure (not
4358 really active yet, has to be activated with -gnatd.X.
4359 * sem_prag.adb (Set_Imported): Set new Import_Pragma
4360 field (Set_Imported): Don't set Is_Public (see
4361 Freeze.Wrap_Imported_Subprogram)
4362 * par-ch3.adb (P_Component_List): Handle unexpected null component.
4363
4364 2014-02-24 Yannick Moy <moy@adacore.com>
4365
4366 * sem_ch3.adb: Correct reference to SPARK RM in error messages.
4367 * gnat_rm.texi: Correct documentation of attribute Update.
4368
4369 2014-02-24 Ed Schonberg <schonberg@adacore.com>
4370
4371 * sem_ch5.adb (Analyze_Iterator_Specification): Reject container
4372 iterator in older versions of Ada.
4373
4374 2014-02-24 Gary Dismukes <dismukes@adacore.com>
4375
4376 * sem_ch5.adb, sem_aux.ads, sem_ch12.adb, gnat_ugn.texi, par.adb,
4377 par-ch12.adb: Change spelling 'parametrization' to 'parameterization'.
4378
4379 2014-02-24 Ed Schonberg <schonberg@adacore.com>
4380
4381 * sinfo.ads, sinfo.adb: New attribute Generalized_Indexing, for
4382 indexed_components that are instances of Ada 2012 container
4383 indexing operations. Analysis and resolution of such nodes
4384 is performed on the attribute, and the original source is
4385 preserved for ASIS operations. If expansion is enabled, the
4386 indexed component is replaced by the value of this attribute,
4387 which is in a call to an Indexing aspect, in most case wrapped
4388 in a dereference operation.
4389 * sem_ch4.adb (Analyze_Indexed_Component): Create
4390 Generalized_Indexing attribute when appropriate.
4391 (Analyze_Call): If prefix is not overloadable and has an indexing
4392 aspect, transform into an indexed component so it can be analyzed
4393 as a potential container indexing.
4394 (Analyze_Expression): If node is an indexed component with a
4395 Generalized_ Indexing, do not re-analyze.
4396 * sem_res.adb (Resolve_Generalized_Indexing): Complete resolution
4397 of an indexed_component that has been transformed into a container
4398 indexing operation.
4399 (Resolve_Indexed_Component): Call the above when required.
4400 (Resolve): Do not insert an explicit dereference operation on
4401 an indexed_component whose type has an implicit dereference:
4402 the operation is inserted when resolving the related
4403 Generalized_Indexing.
4404
4405 2014-02-24 Olivier Ramonat <ramonat@adacore.com>
4406
4407 * gnat_rm.texi, gnat_ugn.texi: Replace Ada Compiler by Ada Development
4408 Environment.
4409
4410 2014-02-24 Hristian Kirtchev <kirtchev@adacore.com>
4411
4412 * sem_prag.adb (Check_Constituent_Usage): Remove leading spaces in
4413 error messages.
4414 (Inconsistent_Mode_Error): Remove leading spaces in error messages.
4415 Merge the expected and available mode errors.
4416 (Report_Unused_Constituents): Remove leading spaces in error messages.
4417 (Report_Unused_States): Remove leading spaces in error messages.
4418
4419 2014-02-24 Thomas Quinot <quinot@adacore.com>
4420
4421 * par_sco.adb (Traverse_One): Refine categorization of statement
4422 SCOs.
4423
4424 2014-02-24 Robert Dewar <dewar@adacore.com>
4425
4426 * aspects.ads, aspects.adb: Remove aspects Ada_2005 and Ada_2012,
4427 Pure_05, Pure_12 and Preelaborate_05.
4428 * gnat_rm.texi: Update accordingly.
4429 * sem_prag.adb: Document one argument form of Ada_05/Ada_2005
4430 pragmas Document one argument form of Ada_12/Ada_2012 pragmas
4431 Recognize one argument form of these pragmas only in GNAT mode
4432 (-gnatg).
4433
4434 2014-02-24 Ed Schonberg <schonberg@adacore.com>
4435
4436 * s-dimmks.ads: Replace symbol for temperature, previously the
4437 Greek letter Theta, by the ASCII @ sign.
4438 * s-diflio.ads: ditto.
4439
4440 2014-02-24 Robert Dewar <dewar@adacore.com>
4441
4442 * exp_ch4.adb: Minor code reorganization (use OR for boolean
4443 variables).
4444 * sem_ch3.adb, sem_prag.adb, freeze.adb: Minor reformatting.
4445
4446 2014-02-24 Ben Brosgol <brosgol@adacore.com>
4447
4448 * gnat_ugn.texi, projects.texi: Added the necessary conditionalization
4449 so that references to gnatmem and ASIS tools do not appear in the FSF
4450 edition of the GNAT User's Guide.
4451
4452 2014-02-24 Yannick Moy <moy@adacore.com>
4453
4454 * freeze.adb (Freeze_Entity): Do not issue warning
4455 for pre/post being ignored on imported subprogram in GNATprove
4456 mode.
4457
4458 2014-02-24 Robert Dewar <dewar@adacore.com>
4459
4460 * exp_ch5.adb, sem_ch5.adb, sem_type.adb, sem_res.adb, sem_attr.adb,
4461 stand.ads, sem_eval.adb: Minor reformatting.
4462
4463 2014-02-24 Yannick Moy <moy@adacore.com>
4464
4465 * sem_prag.adb: Minor rewording in error message.
4466
4467 2014-02-24 Johannes Kanig <kanig@adacore.com>
4468
4469 * exp_util.adb (Expand_Subtype_From_Expr): Do not expand subtypes in
4470 GNATprove_mode, gnat2why doesn't need nor use these types.
4471
4472 2014-02-24 Gary Dismukes <dismukes@adacore.com>
4473
4474 * exp_ch4.adb (Expand_N_Op_Expon): On the AAMP
4475 target, in the case of signed integer exponentiation that uses a
4476 run-time routine, always select the Exp_* versions, since overflow
4477 checking is automatically done by AAMP arithmetic instructions.
4478
4479 2014-02-24 Hristian Kirtchev <kirtchev@adacore.com>
4480
4481 * sem_ch13.adb (Analyze_Aspect_Specifications):
4482 When the related context is a package instace, insert pragma
4483 Abstract_State after all internally-generated renamings related
4484 to the instance "header".
4485
4486 2014-02-24 Ed Schonberg <schonberg@adacore.com>
4487
4488 * sem_ch3.adb (Analyze_Declarations): Analyze Contract of abstract
4489 subprograms.
4490 * sem_disp.adb (Check_Dispatching_Context): A non-dispatching
4491 call to an abstract subprogram is legal if it appears in a
4492 pre/postcondition of another abstract operation.
4493
4494 2014-02-24 Sergey Rybin <rybin@adacore.com frybin>
4495
4496 * gnat_ugn.texi: Misc updates.
4497
4498 2014-02-24 Hristian Kirtchev <kirtchev@adacore.com>
4499
4500 * exp_prag.adb (Expand_Old): Set the type of the generated temporary.
4501
4502 2014-02-24 Gary Dismukes <dismukes@adacore.com>
4503
4504 * layout.adb (Layout_Variant_Record): Instantiate
4505 Generic_Check_Choices and call Check_Choices before calling
4506 Build_Discr_Checking_Funcs, since we need Others_Discrete_Choices
4507 set to prevent generating incorrect discriminant-checking
4508 functions for 'others' variants (functions that unconditionally
4509 return True rather than accounting for the values covered by the
4510 'others' choice).
4511 * sem_eval.ads (Subtypes_Statically_Compatible): Add formal
4512 Formal_Derived_Matching.
4513 (Subtypes_Statically_Match): Add formal Formal_Derived_Matching.
4514 * sem_eval.adb (Subtypes_Statically_Compatible): Pass new
4515 Formal_Derived_Matching formal to Subtypes_Statically_Match.
4516 (Subtypes_Statically_Match): Suppress the Object_Size matching
4517 test in the case where Formal_Derived_Matching is True.
4518 * sem_ch12.adb (Validate_Derived_Type_Instance): Pass
4519 True for Formal_Derived_Matching_Formal on the call to
4520 Subtypes_Statically_Compatible.
4521
4522 2014-02-23 Eric Botcazou <ebotcazou@adacore.com>
4523
4524 * gcc-interface/Make-lang.in (ADA_TOOLS_FLAGS_TO_PASS): Robustify.
4525
4526 2014-02-23 Eric Botcazou <ebotcazou@adacore.com>
4527
4528 * gcc-interface/utils2.c (build_simple_component_ref): Fix formatting.
4529 Look through a conversion between original and packable version to get
4530 the base object.
4531 (build_component_ref): Rework comment and fix formatting.
4532
4533 2014-02-20 Sergey Rybin <rybin@adacore.com frybin>
4534
4535 * gnat_ugn.texi, vms_data.ads (gnatelim): Add description of
4536 project-specific options.
4537
4538 2014-02-20 Ed Schonberg <schonberg@adacore.com>
4539
4540 * a-cbdlli.adb (Insert): When capacity exceeded, raise Capacity_Error,
4541 not Constraint_Error.
4542 * a-cbmutr.adb (Append_Child, Insert_Child, Prepend_Child): Ditto.
4543 * sem_ch5.adb: Code clean up.
4544
4545 2014-02-20 Hristian Kirtchev <kirtchev@adacore.com>
4546
4547 * sem_prag.adb (Usage_Error): Remove local
4548 constant Typ. Remove the specialized diagnostics for unconstrained
4549 or tagged items as those are not part of the explicit input set
4550 of the related subprogram and should not be flagged.
4551
4552 2014-02-20 Ed Schonberg <schonberg@adacore.com>
4553
4554 * sem_attr.adb: Add guard to preserve all errors.
4555
4556 2014-02-20 Vincent Celier <celier@adacore.com>
4557
4558 * switch-m.adb (Normalize_Compiler_Switches): Take into account
4559 switches that are recorded in ALI files: -gnateA, -gnateE,
4560 -gnateF, -gnateinn, -gnateu, -gnateV and -gnateY.
4561
4562 2014-02-20 Ed Schonberg <schonberg@adacore.com>
4563
4564 * sem_ch5.adb (Analyze_Iterator_Specification): Check legality
4565 of an element iterator form over a formal container with an
4566 Iterable aspect.
4567 * exp_ch5.adb (Build_Formal_Container_Iteration): Utility
4568 to create declaration and loop statements for both forms of
4569 container iterators.
4570 (Expand_Formal_Container_Element_Iterator): New procedure
4571 to handle loops of the form "for E of C" when C is a formal
4572 container.
4573 (Expand_Formal_Container_Iterator): Code cleanup.
4574
4575 2014-02-20 Hristian Kirtchev <kirtchev@adacore.com>
4576
4577 * sem_prag.adb (Add_Item_To_Name_Buffer): New routine.
4578 (Analyze_Contract_Case): Remove the use of
4579 "may". Replace "aspect Contract_Cases" to avoid categorization
4580 of aspect vs pragma.
4581 (Analyze_External_Property_In_Decl_Part): Remove the use of "formal".
4582 (Analyze_Global_Item): Remove
4583 the use of "formal", specify the subprogram. Split the
4584 error message about a state with visible refinement into
4585 two. Remove the use of "global" from "volatile global item".
4586 (Analyze_Initialization_Item): Ensure that the SPARK RM reference
4587 is on one line.
4588 (Analyze_Input_Output): Update the call to
4589 Check_Mode. Specify the duplicated item. Reword the error
4590 message concerning an input of a null output list. Use "\"
4591 for error message continuation.
4592 (Analyze_Part_Of): Remove
4593 the use of "may". Use "\" for error message continuation.
4594 (Analyze_Refined_Depends_In_Decl_Part): Update the error
4595 message concerning a useless refinement to match the format
4596 of Refined_Global.
4597 (Analyze_Refined_Global_In_Decl_Part): Reword the error message
4598 concerning a useless refinement.
4599 (Analyze_Refinement_Clause): Use "\" for error message continuation.
4600 (Check_Constituent_Usage): Use "\" for error message continuation.
4601 (Check_Dependency_Clause): Use "\" for error message continuation.
4602 (Check_Matching_Constituent): Use "\" for error message continuation.
4603 (Check_Missing_Part_Of): Use "\" for error message continuation.
4604 (Check_Mode): Renamed to
4605 Check_Role. Update the comment on usage. Redo the error reporting
4606 to use Role_Error.
4607 (Check_Mode_Restriction_In_Enclosing_Context): Use "\" for error
4608 message continuation.
4609 (Find_Mode): Renamed to Find_Role. Update the parameter profile along
4610 with comment on usage. Update all occurrences of Is_Input and Is_Output.
4611 (Inconsistent_Mode_Error): Use "\" for error message continuation.
4612 (Input_Match): Use "\" for error message continuation.
4613 (Role_Error): New routine.
4614 (Set_Convention_From_Pragma): Use "\" for error message continuation.
4615 (Usage_Error): Add local variable Error_Msg. Build specialized error
4616 message showcasing the offending item kind. Redo the diagnostics for
4617 unconstrained types.
4618
4619 2014-02-20 Ed Schonberg <schonberg@adacore.com>
4620
4621 * exp_util.adb (Is_Iterated_Container): Use high-level primitives
4622 to determine whether a type is a container type, rather than
4623 examining only its type declaration, so that subtypes and derived
4624 types are handled properly.
4625
4626 2014-02-20 Sergey Rybin <rybin@adacore.com frybin>
4627
4628 * gnat_ugn.texi: gnatmetric: add description of project-specific
4629 options.
4630
4631 2014-02-20 Ed Schonberg <schonberg@adacore.com>
4632
4633 * sem_attr.adb (Analyze_Attribute, case 'Update): Verify that
4634 all choices in an association for a record type have the same
4635 type, as is done for record aggregates.
4636
4637 2014-02-20 Robert Dewar <dewar@adacore.com>
4638
4639 * a-cborma.adb, a-cbhama.adb, a-cbdlli.adb, a-cbmutr.adb: Use pragma
4640 Unmodified rather than Warnings (Off). Make comments
4641 uniform in the four affected units.
4642
4643 2014-02-20 Robert Dewar <dewar@adacore.com>
4644
4645 * sem_ch13.adb (Analyze_Attribute_Definition_Clause, case
4646 Object_Size): For non-scalar types allow any value that is a
4647 multiple of 8.
4648 * gnat_rm.texi: Document Object_Size for composites more clearly.
4649
4650 2014-02-20 Yannick Moy <moy@adacore.com>
4651
4652 * sem_util.ads, sem_util.adb (Default_Initialization): Remove function.
4653
4654 2014-02-20 Ed Schonberg <schonberg@adacore.com>
4655
4656 * stand.ads: Raise_Type: new predefined entity, used as the type
4657 of a Raise_Expression prior to resolution.
4658 * cstand.adb: Build entity for Raise_Type.
4659 * sem_ch11.adb (Analyze_Raise_Expression): use Raise_Type as the
4660 initial type of the node.
4661 * sem_type.adb (Covers): Raise_Type is compatible with all
4662 other types.
4663 * sem_res.adb (Resolve): Remove special handling of Any_Type on
4664 Raise_Expression nodes.
4665 (Resolve_Raise_Expression): Signal ambiguity if the type of the
4666 context is still Raise_Type.
4667
4668 2014-02-20 Robert Dewar <dewar@adacore.com>
4669
4670 * sem_ch12.adb (Validate_Access_Type_Instance): Add message if
4671 mismatching predicates.
4672 * sem_ch6.adb (Check_Conformance): Give better messages on
4673 predicate mismatch.
4674 * sem_eval.adb (Predicates_Match): Move to spec.
4675 * sem_eval.ads (Predicates_Match): Moved here from body.
4676
4677 2014-02-20 Ed Schonberg <schonberg@adacore.com>
4678
4679 * a-cbmutr.adb: Use default value in Insert_Child.
4680
4681 2014-02-20 Vincent Celier <celier@adacore.com>
4682
4683 * gnatcmd.adb, make.adb, prj-makr.adb, clean.adb: Call
4684 Stringt.Initialize in all project aware tools.
4685
4686 2014-02-20 Doug Rupp <rupp@adacore.com>
4687
4688 * gnat_ugn.texi: Document gnatbind -X option.
4689 * vms_data.ads: Minor warnings documentation reformatting.
4690
4691 2014-02-20 Ed Schonberg <schonberg@adacore.com>
4692
4693 * exp_ch3.adb (Expand_Freeze_Array_Type): Only create invariant
4694 procedure for a base type.
4695
4696 2014-02-20 Robert Dewar <dewar@adacore.com>
4697
4698 * sem_ch4.adb (Analyze_Case_Expression): Get type from first
4699 expression with type info.
4700 * sem_ch13.adb: Minor reformatting.
4701 * sem_eval.adb (Subtypes_Statically_Match): Make sure we return
4702 False if predicates do not match on the two types.
4703
4704 2014-02-20 Arnaud Charlet <charlet@adacore.com>
4705
4706 * sem_prag.adb (Analyze_Pragma [pragma Attach_Handler]):
4707 In Relaxed_RM_Semantics mode, allow any static integer value,
4708 for compatibility with other compilers.
4709
4710 2014-02-20 Vincent Celier <celier@adacore.com>
4711
4712 * errutil.adb (Initialize): Properly initialize entry in table
4713 Warnings when warnings are suppressed.
4714
4715 2014-02-20 Robert Dewar <dewar@adacore.com>
4716
4717 * s-os_lib.ads: Add warning about non-portability of Rename_File.
4718 * sem_util.ads, sem_util.adb (Is_Junk_Name): New function.
4719 * sem_warn.adb: Use Is_Junk_Name to suppress some warnings.
4720 * gnat_ugn.texi: Document no warnings on junk variable names.
4721 * layout.adb: Minor code reorganization (use Ekind_In).
4722 * stringt.adb: Move initialization of Null_String_Id to Initialize
4723 routine.
4724
4725 2014-02-20 Ed Schonberg <schonberg@adacore.com>
4726
4727 * sem_ch13.adb: Initialize optional Element_Id.
4728
4729 2014-02-20 Robert Dewar <dewar@adacore.com>
4730
4731 * s-os_lib.ads (Rename_File): Minor commment addition.
4732
4733 2014-02-20 Thomas Quinot <quinot@adacore.com>
4734
4735 * einfo.ads: Minor reformatting.
4736
4737 2014-02-20 Hristian Kirtchev <kirtchev@adacore.com>
4738
4739 * aspects.adb (Exchange_Aspects): New routine.
4740 * aspects.ads (Exchange_Aspects): New routine.
4741 * atree.adb (Rewrite): Do not check whether the save node has
4742 aspects as it never will, instead check the node about to be clobbered.
4743 * einfo.adb (Write_Field25_Name): Abstract_States can appear in
4744 entities of generic packages.
4745 * sem_ch6.adb (Analyze_Expression_Function): Fix the parent
4746 pointer of an aspect specification list after rewriting takes place.
4747 * sem_ch7.adb (Analyze_Package_Body_Helper): Swap the aspect
4748 specifications of the generic template and the copy used for analysis.
4749 * sem_ch12.adb (Analyze_Generic_Package_Declaration): Swap
4750 the aspect specifications of the generic template and the
4751 copy used for analysis.
4752 (Analyze_Package_Instantiation): Propagate the aspect specifications
4753 from the generic template to the instantiation.
4754 (Build_Instance_Compilation_Unit_Nodes): Propagate the aspect
4755 specifications from the generic template to the instantiation.
4756 * sem_ch13.adb (Analyze_Aspect_Specifications): Handle aspects
4757 Abstract_State, Initializes and Initial_Condition when they
4758 apply to a package instantiation.
4759
4760 2014-02-20 Robert Dewar <dewar@adacore.com>
4761
4762 * stringt.adb: Add call to Initialize in package initialization.
4763
4764 2014-02-20 Robert Dewar <dewar@adacore.com>
4765
4766 * a-crbtgk.adb, a-cihama.adb, a-coinve.adb, a-ciorse.adb, a-crbtgo.adb,
4767 a-cidlli.adb, a-cimutr.adb, a-cihase.adb, a-cohama.adb, a-coorse.adb,
4768 a-chtgke.adb, a-chtgop.adb, a-comutr.adb, a-ciorma.adb, a-cobove.adb,
4769 a-convec.adb, a-cohase.adb, a-chtgbk.adb, a-chtgbo.adb: Minor
4770 reformatting.
4771
4772 2014-02-20 Bob Duff <duff@adacore.com>
4773
4774 * s-os_lib.ads: Minor: Remove incorrect comment.
4775
4776 2014-02-20 Robert Dewar <dewar@adacore.com>
4777
4778 * sem_elab.adb (Check_Elab_Assign): Clearer warning message.
4779
4780 2014-02-20 Ed Schonberg <schonberg@adacore.com>
4781
4782 * a-cborma.adb (Assign): When creating a node without a specified
4783 element, insert an uninitialized element in the map, because
4784 the instance may provide an element type with a default
4785 initialization, e.g a scalar with a Default_Value aspect.
4786 * a-cbhama.adb (Assign_Key): Remove useless Allocate procedure.
4787 (Insert): In the version without explicit element, provide an
4788 uninitialized element, as above.
4789 * a-cbdlli.adb (Append): In the version without explicit element,
4790 provide an uninitalized element, as above.
4791 (Allocate): Remove unused version.
4792
4793 2014-02-20 Robert Dewar <dewar@adacore.com>
4794
4795 * sem_elab.adb: Minor code reorganization (use Nkind_In).
4796 * stringt.adb: Remove temporary pragma Warnings (Off).
4797 * stringt.ads: Add pragma Elaborate_Body to ensure initialization
4798 of Null_String_Id.
4799
4800 2014-02-20 Matthew Heaney <heaney@adacore.com>
4801
4802 * a-chtgbk.adb (Replace): Use correct offset when calculating bucket
4803 index.
4804
4805 2014-02-20 Ed Schonberg <schonberg@adacore.com>
4806
4807 * sem_ch5.adb (Analyze_Iterator_Specification): Initialize
4808 properly the cursor type for subsequent volatile testing in SPARK
4809 mode, when domain is a formal container with an Iterabe aspect.
4810
4811 2014-02-20 Robert Dewar <dewar@adacore.com>
4812
4813 * errout.adb (Set_Warnings_Mode_Off): Add Reason argument.
4814 (Set_Specific_Warning_Off): Add Reason argument.
4815 * errout.ads (Set_Warnings_Mode_Off): Add Reason argument.
4816 (Set_Specific_Warning_Off): Add Reason argument.
4817 * erroutc.adb (Warnings_Entry): Add Reason field
4818 (Specific_Warning_Entry): Add Reason field.
4819 (Warnings_Suppressed): return String_Id for Reason.
4820 (Warning_Specifically_Suppressed): return String_Id for Reason.
4821 * erroutc.ads (Warnings_Entry): Add Reason field.
4822 (Specific_Warning_Entry): Add Reason field.
4823 (Set_Specific_Warning_Off): Add Reason argument.
4824 (Set_Warnings_Mode_Off): Add Reason argument.
4825 (Warnings_Suppressed): return String_Id for Reason.
4826 (Warning_Specifically_Suppressed): return String_Id for Reason.
4827 * errutil.adb (Warnings_Suppressed): returns String_Id for Reason
4828 (Warning_Specifically_Suppressed): returns String_Id for Reason
4829 * gnat_rm.texi: Document that Warning parameter is string literal
4830 or a concatenation of string literals.
4831 * par-prag.adb: New handling for Reason argument.
4832 * sem_prag.adb (Analyze_Pragma, case Warning): New handling
4833 for Reason argument.
4834 * sem_util.ads, sem_util.adb (Get_Reason_String): New procedure.
4835 * sem_warn.ads (Warnings_Off_Entry): Add reason field.
4836 * stringt.adb: Set Null_String_Id.
4837 * stringt.ads (Null_String_Id): New constant.
4838
4839 2014-02-20 Robert Dewar <dewar@adacore.com>
4840
4841 * einfo.ads: Minor comment addition: Etype of package is
4842 Standard_Void_Type.
4843 * checks.adb, exp_aggr.adb, exp_atag.adb, exp_attr.adb, exp_ch13.adb,
4844 exp_ch2.adb, exp_ch3.adb, exp_ch4.adb, exp_ch5.adb, exp_ch6.adb,
4845 exp_ch7.adb, exp_ch9.adb, exp_dbug.adb, exp_disp.adb, exp_imgv.adb,
4846 exp_intr.adb, exp_prag.adb, exp_sel.adb, exp_strm.adb, exp_util.adb,
4847 freeze.adb, rtsfind.adb, sem_aggr.adb, sem_attr.adb, sem_ch10.adb,
4848 sem_ch12.adb, sem_ch13.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
4849 sem_ch6.adb, sem_ch8.adb, sem_dim.adb, sem_prag.adb, sem_res.adb,
4850 sem_util.adb, tbuild.adb, tbuild.ads: Remove New_Reference_To.
4851 Replace all calls with calls to New_Occurrence_Of.
4852
4853 2014-02-20 Robert Dewar <dewar@adacore.com>
4854
4855 * par-util.adb (Ignore, case of right paren): Make this a
4856 serious error.
4857
4858 2014-02-19 Robert Dewar <dewar@adacore.com>
4859
4860 * sem_ch5.adb, sem_prag.adb, sem_attr.adb: Minor reformatting.
4861 * debug.adb: Remove -gnatd.X switch, no longer used.
4862 * styleg.adb (Check_Then): Remove check of -gnatd.X, check is
4863 now always made.
4864
4865 2014-02-19 Bob Duff <duff@adacore.com>
4866
4867 * g-socket.ads: Minor: Correct some comments.
4868
4869 2014-02-19 Ed Schonberg <schonberg@adacore.com>
4870
4871 * sem_ch5.adb: Inhibit iterator rewriting in ASIS mode.
4872
4873 2014-02-19 Arnaud Charlet <charlet@adacore.com>
4874
4875 * sem_ch13.adb (Analyze_Aspect_Specifications): Do not generate
4876 an error on out of range priorities if Relaxed_RM_Semantics.
4877 * sem_prag.adb (Analyze_Pragma): Ditto.
4878
4879 2014-02-19 Bob Duff <duff@adacore.com>
4880
4881 * sem_attr.adb (Resolve_Attribute): Detect the case of F'Access
4882 where F denotes the renaming of an enumeration literal, and
4883 issue a specialized error message.
4884
4885 2014-02-19 Matthew Heaney <heaney@adacore.com>
4886
4887 * a-chtgop.ads (Checked_Index): New operation.
4888 (Next): Changed mode of hash table.
4889 * a-chtgop.adb (Adjust, Delete_Node_Sans_Free): Detect tampering
4890 (Generic_Read, Reserve_Capacity): Ditto.
4891 (Generic_Equal): Detect tampering.
4892 (Next): Changed mode of hash table, detect tampering.
4893 * a-chtgke.ads (Checked_Index, Checked_Equivalent_Keys): New
4894 operation.
4895 (Find): Changed mode of hash table.
4896 * a-chtgke.adb (Checked_Equivalent_Keys): New operation
4897 (Delete_Key_Sans_Free, Generic_Conditional_Insert): Detect
4898 tampering.
4899 (Find): Changed mode of hash table, check for tampering.
4900 (Generic_Replace_Element): Check for tampering.
4901 * a-chtgbk.ads (Checked_Index, Checked_Equivalent_Keys): New operation.
4902 * a-chtgbk.adb (Checked_Index, Checked_Equivalent_Keys): New
4903 operation (Delete_Key_Sans_Free, Generic_Conditional_Insert):
4904 Detect tampering.
4905 (Find, Generic_Replace_Element): Check for tampering.
4906 * a-chtgbo.ads (Checked_Index): New operation.
4907 * a-chtgbo.adb (Checked_Index): New operation
4908 (Delete_Node_Sans_Free, Generic_Equal): Detect tampering.
4909 (Generic_Read, Next): Ditto.
4910 * a-cohase.adb, a-cihase.adb (Is_In): Changed mode of hash
4911 table (Difference, Intersection): Use variable view of
4912 source, detect tampering (Find, Is_Subset, Overlap): Use
4913 variable view of container (Symmetric_Difference, Union):
4914 Detect tampering (Vet): Use Checked_Index to detect tampering
4915 (Constant_Reference, Element, Find): Use variable view of
4916 container.
4917 (Update_Element_Preserving_Key): Detect tampering.
4918 * a-cbhase.adb (Difference, Find, Is_In): Use variable view
4919 of container.
4920 (Is_Subset): Ditto.
4921 (Equivalent_Sets, Overlap): Use Node's Next component.
4922 (Vet): Use Checked_Index to detect tampering.
4923 (Constant_Reference, Element, Find): Use variable view of container.
4924 (Update_Element_Preserving_Key): Detect tampering.
4925 * a-cohama.adb, a-cihama.adb, a-cbhama.adb (Constant_Reference,
4926 Element, Find): Use variable view of container.
4927 (Reference): Rename hash table component.
4928 (Vet): Use Checked_Index to detect tampering.
4929
4930 2014-02-19 Arnaud Charlet <charlet@adacore.com>
4931
4932 * adabkend.adb (Scan_Compiler_Arguments): Add missing handling
4933 of -nostdinc.
4934
4935 2014-02-19 Thomas Quinot <quinot@adacore.com>
4936
4937 * tbuild.adb (New_Occurrence_Of, New_Rerefence_To): Guard
4938 against calls without Def_Id.
4939
4940 2014-02-19 Claire Dross <dross@adacore.com>
4941
4942 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads, a-cforse.ads,
4943 a-cofove.ads: Add global annotations to subprograms.
4944
4945 2014-02-19 Hristian Kirtchev <kirtchev@adacore.com>
4946
4947 * sem_prag.adb (Analyze_Initial_Condition_In_Decl_Part): Remove
4948 constants Errors, Pack_Id and Pack_Init. Remove variable Vars.
4949 Initial_Condition no longer requires the presence of pragma
4950 Initialized. Do not try to diagnose whether all variables mentioned in
4951 pragma Initializes also appear in Initial_Condition.
4952 (Collect_Variables): Removed.
4953 (Match_Variable): Removed.
4954 (Match_Variables): Removed.
4955 (Report_Unused_Variables): Removed.
4956
4957 2014-02-19 Thomas Quinot <quinot@adacore.com>
4958
4959 * gnat_rm.texi (pragma Stream_Convert): Minor rewording.
4960
4961 2014-02-19 Robert Dewar <dewar@adacore.com>
4962
4963 * sem_util.adb, sem_util.ads, prj-conf.adb, s-os_lib.adb: Minor
4964 reformatting.
4965
4966 2014-02-19 Vincent Celier <celier@adacore.com>
4967
4968 * prj-part.adb (Parse_Single_Project): Use the fully resolved
4969 project path, with all symbolic links resolved, to check if the
4970 same project is imported with a different unresolved path.
4971 * prj-tree.ads (Project_Name_And_Node): Component Canonical_Path
4972 changed to Resolved_Path to reflect that all symbolic links
4973 are resolved.
4974
4975 2014-02-19 Ed Schonberg <schonberg@adacore.com>
4976
4977 * sem_util.ads, sem_util.adb (Get_Cursor_Type): Moved to sem_util
4978 from sem_ch13, for use elsewhere.
4979 * sem_ch13.adb (Get_Cursor_Type): Moved to sem_util.
4980 * sem_ch5.adb (Analyze_Iterator_Specification): Set properly the
4981 cursor type on the loop variable when the iteration is over o
4982 formal container.
4983
4984 2014-02-19 Vincent Celier <celier@adacore.com>
4985
4986 * prj-conf.adb (Add_Default_GNAT_Naming_Scheme): Add declaration
4987 for an empty Target (Check_Target): Never fail when an empty
4988 target is declared in the configuration project.
4989
4990 2014-02-19 Ed Schonberg <schonberg@adacore.com>
4991
4992 * sem_prag.adb (Check_Arg_Is_Local_Name): Argument is local if
4993 the pragma comes fron a predicate aspect and the context is a
4994 record declaration within the scope that declares the type.
4995
4996 2014-02-19 Robert Dewar <dewar@adacore.com>
4997
4998 * gnat_rm.texi: Minor clarifications.
4999 * expander.adb, sem_aggr.adb: Add comments.
5000
5001 2014-02-19 Ed Schonberg <schonberg@adacore.com>
5002
5003 * sem_prag.adb (Check_Arg_Is_Local_Name): For an aspect that
5004 applies to a subprogram body, the name is the current scope,
5005 rather than being declared in the current scope.
5006 (Analyze_Pragma, case No_Return): Handle properly a No_Return
5007 aspect applied to a subprogram body.
5008
5009 2014-02-19 Ed Schonberg <schonberg@adacore.com>
5010
5011 * sem_ch13.adb (Resolve_Iterable_Operation): Improve resolution
5012 of overloaded subprograms, and fix bug in handling of primitive
5013 operation Element.
5014
5015 2014-02-19 Pascal Obry <obry@adacore.com>
5016
5017 * s-os_lib.adb: Minor reformatting.
5018
5019 2014-02-19 Yannick Moy <moy@adacore.com>
5020
5021 * expander.adb (Expand): Do nothing inside generics.
5022 * sem_aggr.adb (Aggregate_Constraint_Checks): Do nothing inside
5023 generics.
5024
5025 2014-02-19 Yannick Moy <moy@adacore.com>
5026
5027 * exp_ch2.adb: Remove useless 'with' of unit Uintp.
5028
5029 2014-02-19 Robert Dewar <dewar@adacore.com>
5030
5031 * sem_ch3.adb, style.adb, sem_prag.adb, sem_ch13.adb: Minor reformatting
5032 * a-sequio.adb: Remove useless pragma Extensions_Allowed (no
5033 longer needed).
5034
5035 2014-02-19 Claire Dross <dross@adacore.com>
5036
5037 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
5038 a-cforse.ads, a-cofove.ads: Add Iterable aspect to formal containers.
5039
5040 2014-02-19 Hristian Kirtchev <kirtchev@adacore.com>
5041
5042 * sem_ch3.adb (Analyze_Declarations): Analyze
5043 a package contract at the end of the private declarations (if
5044 applicable), otherwise analyze it and the end of the visible
5045 declarations.
5046
5047 2014-02-19 Ed Schonberg <schonberg@adacore.com>
5048
5049 * style.adb (Missing_Overriding): If subprogram is an
5050 instantiation, place warning on the instance node itself,
5051 without mention of the original generic. Do not emit message
5052 if explicit Ada version is older than the introduction of the
5053 overriding indicator.
5054
5055 2014-02-19 Yannick Moy <moy@adacore.com>
5056
5057 * gnat_rm.texi: Doc clarifications.
5058
5059 2014-02-19 Yannick Moy <moy@adacore.com>
5060
5061 * exp_util.adb (Remove_Side_Effects): Do not remove side-effects
5062 inside a generic.
5063
5064 2014-02-19 Ed Schonberg <schonberg@adacore.com>
5065
5066 * sem_ch13.adb (Get_Cursor_Type): Obtain cursor type from
5067 specified First primitive, rather than by name.
5068 (Validate_Iterable_Aspect, Resolve_Iterable_Operation): Use it,
5069 and extend error checking for missing primitives and incorrect
5070 signatures.
5071
5072 2014-02-19 Ed Schonberg <schonberg@adacore.com>
5073
5074 * sem_ch3.adb (Check_Pragma_Implemented): Detect additional
5075 errors when a Synchronization aspect on an overriding protected
5076 operation does not match the given aspect on the overridden
5077 operation of an ancestor interface.
5078
5079 2014-02-19 Hristian Kirtchev <kirtchev@adacore.com>
5080
5081 * sem_prag.adb (Check_Loop_Pragma_Grouping): New routine.
5082 (Check_Loop_Pragma_Placement): Update
5083 comment on usage. Remove local variables Orig_Stmt and
5084 Within_Same_Sequence. Check that the current Loop_Invariant or
5085 Loop_Variant pragma is grouped together with other such pragmas.
5086 (Is_Loop_Pragma): New routine.
5087 (Prev_In_Loop): Removed.
5088
5089 2014-02-19 Robert Dewar <dewar@adacore.com>
5090
5091 * par-ch6.adb (P_Return): For extended return, end column lines
5092 up with RETURN.
5093 * par.adb: Minor documentation clarification.
5094
5095 2014-02-19 Yannick Moy <moy@adacore.com>
5096
5097 * sem_prag.adb (Check_Loop_Pragma_Placement): Add check
5098 that Loop_Invariant and Loop_Variant appear consecutively.
5099 * gnat_rm.texi Update documentation of Loop_Invariant and
5100 Loop_Variant pragmas.
5101
5102 2014-02-19 Robert Dewar <dewar@adacore.com>
5103
5104 * debug.adb: Document -gnatd.X.
5105 * par-ch5.adb (P_If_Statement): Always check THEN, even if not
5106 first token
5107 (Check_Then_Column): Ditto.
5108 * styleg.adb (Check_Then): Allow THEN on line after IF.
5109 (Check_Then): Check THEN placement under control of -gnatd.X
5110 * styleg.ads (Check_Then): Now called even if THEN is not first
5111 token on line.
5112 * stylesw.ads (Style_Check_If_Then_Layout): Document new
5113 relaxed rules.
5114 * gnat_ugn.texi: For -gnatyi, THEN can now be on line after IF.
5115
5116 2014-02-19 Robert Dewar <dewar@adacore.com>
5117
5118 * a-cfhama.adb, a-cfhase.adb, a-cforse.adb, a-cofove.adb, a-ngcefu.adb,
5119 a-teioed.adb, a-wtedit.adb, a-ztedit.adb, exp_ch5.adb, inline.adb,
5120 prj-pp.adb, prj-tree.adb, sem_ch12.adb, sem_ch8.adb,
5121 vms_conv.adb: Fix bad layout of IF statements
5122
5123 2014-02-19 Robert Dewar <dewar@adacore.com>
5124
5125 * exp_util.adb (Side_Effect_Free): Scalar if expressions can be SEF.
5126
5127 2014-02-19 Robert Dewar <dewar@adacore.com>
5128
5129 * exp_util.adb: Update comments.
5130
5131 2014-02-19 Doug Rupp <rupp@adacore.com>
5132
5133 * bindgen.adb (Gen_Adainit) [VMS] New global Float_Format.
5134 * init.c (__gl_float_format): [VMS] New global.
5135 (__gnat_set_features): Call FP_CONTROL to set FPSR for the float
5136 representation in effect.
5137
5138 2014-02-19 Hristian Kirtchev <kirtchev@adacore.com>
5139
5140 * exp_ch6.adb Add with and use clause for Exp_Prag.
5141 (Expand_Contract_Cases): Relocated to Exp_Prag.
5142 * exp_ch6.ads (Expand_Contract_Cases): Relocated to Exp_Prag.
5143 * exp_prag.adb Add with and use clauses for Checks and Validsw.
5144 (Expand_Contract_Cases): Relocated from Exp_Ch6. Update the
5145 structure of the expanded code to showcase the evaluation of
5146 attribute 'Old prefixes. Add local variable Old_Evals. Expand
5147 any attribute 'Old references found within a consequence. Add
5148 circuitry to evaluate the prefixes of attribute 'Old that
5149 belong to a selected consequence.
5150 (Expand_Old_In_Consequence): New routine.
5151 * exp_prag.ads (Expand_Contract_Cases): Relocated from Exp_Ch6.
5152 * sem_attr.adb (Check_Use_In_Contract_Cases): Warn that a
5153 potentially unevaluated prefix is always evaluated.
5154
5155 2014-02-19 Robert Dewar <dewar@adacore.com>
5156
5157 * exp_attr.adb (Expand_Min_Max_Attribute): Use Insert_Declaration
5158 (Expand_Min_Max_Attribute): Use Matching_Standard_Type.
5159 * exp_ch4.adb (Expand_N_Expression_With_Actions): Remove special
5160 handling for the case of Modify_Tree_For_C, this approach did
5161 not work.
5162 * exp_util.adb (Matching_Standard_Type): New function
5163 (Side_Effect_Free): New top level functions (from
5164 Remove_Side_Effects).
5165 * exp_util.ads (Side_Effect_Free): New top level functions
5166 (moved from body).
5167 * sinfo.ads: Minor comment updates.
5168
5169 2014-02-19 Ed Schonberg <schonberg@adacore.com>
5170
5171 * exp_ch6.adb (Expand_Simple_Function_Return): If return
5172 type is unconstrained and uses the secondary stack, mark the
5173 enclosing function accordingly, to ensure that the value is not
5174 prematurely removed.
5175
5176 2014-02-19 Hristian Kirtchev <kirtchev@adacore.com>
5177
5178 * par.adb Alphabetize the routines in Par.Sync.
5179 (Resync_Past_Malformed_Aspect): New routine.
5180 * par-ch13.adb (Get_Aspect_Specifications): Alphabetize local
5181 variables. Code and comment reformatting. Detect missing
5182 parentheses on aspects [Refined_]Global and [Refined_]Depends
5183 with a non-null definition.
5184 * par-sync.adb: Alphabetize all routines in this separate unit.
5185 (Resync_Past_Malformed_Aspect): New routine.
5186
5187 2014-02-19 Robert Dewar <dewar@adacore.com>
5188
5189 * sem_eval.ads, sem_eval.adb (Subtypes_Statically_Match): Return False
5190 if Esize values do not match.
5191
5192 2014-02-19 Yannick Moy <moy@adacore.com>
5193
5194 * sinfo.ads: Minor comment update.
5195
5196 2014-02-19 Hristian Kirtchev <kirtchev@adacore.com>
5197
5198 * atree.ads: Minor reformatting (change Entity_Info to Einfo).
5199
5200 2014-02-19 Thomas Quinot <quinot@adacore.com>
5201
5202 * exp_ch7.adb (Find_Node_To_Be_Wrapped): An assignment statement
5203 that has the No_Ctrl_Actions flag is a suitable node to be
5204 wrapped if the assigned expression has no finalization actions.
5205 * sem_eval.adb (Eval_Entity_Name): For a compile time known
5206 boolean value, mark the corresponding condition SCO as constant.
5207
5208 2014-02-19 Robert Dewar <dewar@adacore.com>
5209
5210 * exp_util.adb: Minor reformatting.
5211 * exp_util.ads (Matching_Standard_Type): New function.
5212 * exp_ch7.adb: Minor reformatting.
5213
5214 2014-02-19 Ed Schonberg <schonberg@adacore.com>
5215
5216 * sem_ch13.adb (Get_Cursor_Type): Use scope of iterable type
5217 to find declaration for Cursor, to handle properly the case of
5218 a discriminated iterable type.
5219
5220 2014-02-19 Vincent Celier <celier@adacore.com>
5221
5222 * gnatcmd.adb (GNATCmd): Always replace the object dirs of
5223 imported library projects with the library ALI dirs, when setting
5224 the object paths.
5225 * prj-env.ads (Ada_Objects_Path): Correct comments about
5226 argument Including_Libraries.
5227
5228 2014-02-19 Gary Dismukes <dismukes@adacore.com>
5229
5230 * gnat_rm.texi: Minor spelling fixes.
5231
5232 2014-02-19 Doug Rupp <rupp@adacore.com>
5233
5234 * init.c: Remove unneeded code.
5235 * fe.h (Float_Format): New macro
5236 * gcc-interface/trans.c (gigi): On VMS, set vms_float_format.
5237
5238 2014-02-19 Hristian Kirtchev <kirtchev@adacore.com>
5239
5240 * sem_prag.adb (Check_Refined_Global_Item):
5241 A state or variable acts as a constituent only it is part of an
5242 encapsulating state and the state has visible refinement.
5243
5244 2014-02-19 Ed Schonberg <schonberg@adacore.com>
5245
5246 * sem_ch6.adb (Analyze_Subprogram_Contract): Do not warn on a
5247 postcondition for a function when the expression does not mention
5248 'Result but the function has in-out parameters.
5249
5250 2014-02-19 Robert Dewar <dewar@adacore.com>
5251
5252 * gnat_rm.texi: Add documentation on Value_Size forcing biased
5253 representation.
5254
5255 2014-02-19 Hristian Kirtchev <kirtchev@adacore.com>
5256
5257 * lib-xref.ads Remove the small table of letter and symbol usage as we
5258 already have one.
5259
5260 2014-02-19 Hristian Kirtchev <kirtchev@adacore.com>
5261
5262 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Emit specific error
5263 messages depending on the offending misplaced aspect specifications.
5264 (Diagnose_Misplaced_Aspect_Specifications): New routine.
5265
5266 2014-02-19 Ed Schonberg <schonberg@adacore.com>
5267
5268 * sem_ch13.adb (Get_Cursor): Utility to retrieve cursor type
5269 for iterable aspect primitives.
5270 (Resolve_Iterable_Operation): Use expected signature of iterable
5271 aspect to resolve primitive when overloading is present.
5272 (Validate_Iterable_Aspect, Analyze_Aspects_At_Freeze_Point): use it.
5273 (Check_Signature): Removed.
5274
5275 2014-02-19 Yannick Moy <moy@adacore.com>
5276
5277 * sem_ch10.adb (Analyze_Proper_Body): Issue error on missing
5278 subunit in GNATprove_Mode.
5279 * sinfo.ads (GNATprove_Mode): Document error issued in GNATprove_Mode.
5280
5281 2014-02-19 Hristian Kirtchev <kirtchev@adacore.com>
5282
5283 * lib-xref.ads Alphabetize the contents of table
5284 Xref_Entity_Letters. Add an entry in table Xref_Entity_Letters
5285 for E_Abstract_State. List all letters and symbols in use.
5286 * sem_prag.adb (Analyze_Abstract_State): Update all calls
5287 to Create_Abstract_State to reflect the new signature.
5288 (Create_Abstract_State): Change subprogram profile and update
5289 the comment on usage. Use the proper location of the state
5290 declaration when creating a new abstract state entity. Do not
5291 generate an external name, but simply reuse the name coming from
5292 the state declaration.
5293
5294 2014-02-19 Robert Dewar <dewar@adacore.com>
5295
5296 * exp_ch4.adb (Expand_N_Expression_With_Actions): Make sure
5297 declarations get properly inserted in Modify_Tree_For_C mode.
5298 * sinfo.ads: Minor comment addition.
5299
5300 2014-02-19 Robert Dewar <dewar@adacore.com>
5301
5302 * par-ch9.adb, exp_ch5.adb, sem_ch5.adb, exp_attr.adb, sem_util.adb,
5303 sem_util.ads, sem_ch13.adb, sem_ch13.ads: Minor reformatting.
5304
5305 2014-02-19 Ed Schonberg <schonberg@adacore.com>
5306
5307 * style.adb (Missing_Overriding): Warning does not apply in
5308 language versions prior to Ada 2005.
5309 * snames.ads-tmpl: Add Name_Iterable and Attribute_Iterable.
5310 * sem_attr.adb: Add Attribute_Iterable where needed.
5311 * exp_attr.adb: ditto.
5312 * exp_ch5.adb (Expand_Formal_Container_Loop): New procedure to
5313 handle loops and quantified expressions over types that have an
5314 iterable aspect. Called from Expand_Iterator_Loop.
5315 * sem_ch5.adb (Analyze_Iterator_Specification): Recognize types
5316 with Iterable aspect.
5317 * sem_ch13.adb (Validate_Iterable_Aspect): Verify that the
5318 subprograms specified in the Iterable aspect have the proper
5319 signature involving container and cursor.
5320 (Check_Aspect_At_Freeze_Point): Analyze value of iterable aspect.
5321 * sem_ch13.ads (Validate_Iterable_Aspect): New subprogram.
5322 * sem_util.ads, sem_util.adb (Get_Iterable_Type_Primitive):
5323 New procedure to retrieve one of the primitives First, Last,
5324 or Has_Element, from the value of the iterable aspect of a
5325 formal container.
5326 (Is_Container_Element): Predicate to recognize expressions
5327 that denote an element of one of the predefined containers,
5328 for possible optimization. This subprogram is not currently
5329 used, pending ARG discussions on the legality of the proposed
5330 optimization. Worth preserving for eventual use.
5331 (Is_Iterator): Recognize formal container types.
5332 * aspects.ads, aspects.adb: Add Aspect_Iterable where needed.
5333
5334 2014-02-19 Robert Dewar <dewar@adacore.com>
5335
5336 * exp_attr.adb (Expand_Min_Max_Attribute): New procedure
5337 (Expand_N_Attribute_Reference): Use this procedure for Min and Max.
5338 * exp_ch4.adb (Expand_N_Expression_With_Actions): Remove object
5339 declarations from list of actions.
5340 * output.ads, output.adb (Delete_Last_Char): New procedure.
5341 * sinfo.ads: Document handling of Mod and expression with actions
5342 in Modify_Tree_For_C mode.
5343
5344 2014-02-19 Ed Schonberg <schonberg@adacore.com>
5345
5346 * par-ch9.adb (P_Task): Add a null statement to produce a
5347 well-formed task body when due to a previous syntax error the
5348 statement list is empty.
5349
5350 2014-02-19 Hristian Kirtchev <kirtchev@adacore.com>
5351
5352 * sem_prag.adb (Check_Dependency_Clause): Account
5353 for the case where a state with a non-null refinement matches a
5354 null output list. Comment reformatting.
5355 (Inputs_Match): Copy a solitary input to avoid an assertion failure
5356 when trying to match the same input in multiple clauses.
5357
5358 2014-02-19 Gary Dismukes <dismukes@adacore.com>
5359
5360 * sem_attr.adb: Minor typo fix.
5361
5362 2014-02-18 Robert Dewar <dewar@adacore.com>
5363
5364 * cstand.adb (Build_Signed_Integer_Type): Minor change of formal
5365 from Int to Nat (Build_Unsigned_Integer_Type): New procedure
5366 (Create_Standard): Create new unsigned types.
5367 * exp_ch4.adb (Expand_N_Op_Mod): Expand mod in Modify_Tree_For_C
5368 mode (Expand_N_Reference): Removed, problematic and not needed
5369 for now.
5370 * exp_ch4.ads (Expand_N_Reference): Removed, problematic and
5371 not needed for now.
5372 * exp_util.ads, exp_util.adb (Power_Of_Two): New function.
5373 * expander.adb: Remove call to Expand_N_Reference (problematic,
5374 and not needed now).
5375 * sem_aux.ads, sem_aux.adb (Corresponding_Unsigned_Type): New function.
5376 * stand.adb: Read and write unsigned type entities.
5377 * stand.ads: Add new unsigned types.
5378
5379 2014-02-18 Hristian Kirtchev <kirtchev@adacore.com>
5380
5381 * sem_ch4.adb (Analyze_Call): Do not mark a function call
5382 as being inside an assertion expression as the flag is now removed.
5383 (Check_Ghost_Subprogram_Call): Do not query the
5384 In_Assertion_Expression flag as it is now removed, instead use
5385 a predicate function.
5386 * sem_elab.adb (Check_Internal_Call_Continue): Do not query the
5387 In_Assertion_Expression flag as it is now removed, instead use
5388 a predicate function.
5389 * sem_prag.ads: Add new table Assertion_Expression_Pragma.
5390 * sem_util.adb Add with and use clause for Sem_Prag.
5391 (In_Assertion_Expression_Pragma): New routine.
5392 * sem_util.ads (In_Assertion_Expression_Pragma): New routine.
5393 * sinfo.adb (In_Assertion_Expression): Removed.
5394 (Set_In_Assertion_Expression): Removed.
5395 * sinfo.ads Remove flag In_Assertion_Expression along with its
5396 use in nodes.
5397 (In_Assertion_Expression): Removed along with
5398 pragma Inline. (Set_In_Assertion_Expression): Removed along
5399 with pragma Inline.
5400
5401 2014-02-18 Sergey Rybin <rybin@adacore.com frybin>
5402
5403 * gnat_ugn.texi: gnatpp section: add note that '-j' cannot be
5404 used together with '-r', '-rf' or '-rnb' options.
5405
5406 2014-02-18 Hristian Kirtchev <kirtchev@adacore.com>
5407
5408 * sem_attr.adb (Analyze_Attribute): Comment
5409 and code reformatting. Use separate routines to check the
5410 legality of attribute 'Old in certain pragmas. Verify
5411 the use of 'Old, 'Result and locally declared entities
5412 within the prefix of 'Old.
5413 (Check_References_In_Prefix): New routine.
5414 (Check_Use_In_Contract_Cases): New routine.
5415 (Check_Use_In_Test_Case): New routine.
5416
5417 2014-02-18 Vincent Celier <celier@adacore.com>
5418
5419 * sem_aux.adb (Is_By_Reference_Type): For each components of
5420 a record type, check also if the component is volatile as it
5421 may have an aspect that makes it volatile. If it is, then the
5422 record type is a by reference type.
5423
5424 2014-02-18 Robert Dewar <dewar@adacore.com>
5425
5426 * exp_attr.adb: Minor reformatting.
5427 * exp_ch4.ads, exp_ch4.adb (Expand_N_Reference): New procedure.
5428 * exp_util.adb (Remove_Side_Effects): Add conditional expressions
5429 as another case where we don't generate N_Reference nodes for
5430 primitive types.
5431 * expander.adb (Expand): Add call to Expand_N_Reference.
5432
5433 2014-02-06 Hristian Kirtchev <kirtchev@adacore.com>
5434
5435 * sem_prag.adb (Analyze_Refined_Pragma): Remove
5436 local variable Pack_Spec. Refinement pragmas may now apply to
5437 bodies of both visible and private subprograms.
5438
5439 2014-02-06 Robert Dewar <dewar@adacore.com>
5440
5441 * exp_attr.adb (Expand_Loop_Entry_Attribute):
5442 Minor change (Attr => N) (Expand_Pred_Succ): New name
5443 Expand_Pred_Succ_Attribute (Expand_N_Attribute_Reference, case
5444 Max): Expand into if expression if Modify_Tree_For_C mode.
5445 (Expand_N_Attribute_Reference, case Min): ditto
5446 * sinfo.ads: Modify_Tree_For_C takes care of expanding Min and
5447 Max attributes.
5448
5449 2014-02-06 Ed Schonberg <schonberg@adacore.com>
5450
5451 * sem_ch3.adb (Analyze_Object_Declaration): Do not generate
5452 predicate check if this is an internal declaration with
5453 No_Initialization set, as for an expanded aggregate component.
5454
5455 2014-02-06 Doug Rupp <rupp@adacore.com>
5456
5457 * init.c (__gnat_default_resignal_p) [VMS]: Test for and resignal
5458 conditions with severity of "SUCCESS" or "INFORMATIONAL".
5459
5460 2014-02-06 Yannick Moy <moy@adacore.com>
5461
5462 * sem_prag.adb (Analyze_Pragma): Analyze pragma
5463 Debug rewritten node before rewriting it as a null statement in
5464 GNATprove mode.
5465
5466 2014-02-06 Robert Dewar <dewar@adacore.com>
5467
5468 * sem_attr.adb (Min_Max): New procedure.
5469 (Max_Alignment_For_Allocation_Max_Size_In_Storage_Elements): New
5470 procedure.
5471
5472 2014-02-06 Sergey Rybin <rybin@adacore.com frybin>
5473
5474 * gnat_ugn.texi, vms_data.ads: Add documentation of '-t' option for
5475 gnatmetric/gnatpp.
5476
5477 2014-02-06 Hristian Kirtchev <kirtchev@adacore.com>
5478
5479 * sem_prag.adb (Analyze_Abstract_State): Update
5480 all calls to Create_Abstract_State to pass the proper state
5481 "declaration".
5482 (Create_Abstract_State): Add new formal parameter
5483 State_Decl along with comment on usage. Establish a link between
5484 the abstract state entity and the state declaration.
5485
5486 2014-02-06 Robert Dewar <dewar@adacore.com>
5487
5488 * sem_attr.adb (Analyze_Attribute, case Max): Check for improper
5489 comparison of unordered enumeration type.
5490 (Analyze_Attribute, case Max): Check for improper comparison of
5491 unordered enumeration type.
5492 * sem_res.adb (Bad_Unordered_Enumeration_Reference): Moved to
5493 sem_util.adb.
5494 * sem_util.ads, sem_util.adb (Bad_Unordered_Enumeration_Reference):
5495 Moved here from Sem_Res.
5496
5497 2014-02-06 Robert Dewar <dewar@adacore.com>
5498
5499 * sem_ch3.adb, sem_prag.adb, sem_res.adb, lib-xref.adb: Minor
5500 reformatting.
5501
5502 2014-02-06 Hristian Kirtchev <kirtchev@adacore.com>
5503
5504 * sem_ch6.adb (Process_Formals): Error message reformatting.
5505
5506 2014-02-06 Hristian Kirtchev <kirtchev@adacore.com>
5507
5508 * sem_ch3.adb (Handle_Late_Controlled_Primitive): Add local
5509 variable Spec. Do not inherit the null indicator from the
5510 subprogram body when generating the spec.
5511
5512 2014-02-06 Robert Dewar <dewar@adacore.com>
5513
5514 * casing.adb (Determine_Casing): Consider SPARK_Mode to be
5515 mixed case.
5516
5517 2014-02-06 Ed Schonberg <schonberg@adacore.com>
5518
5519 * exp_ch6.adb (Is_Build_In_Place_Function): Predicate is false
5520 when the function has a foreign convention, but not if only the
5521 limited return type has such a convention.
5522
5523 2014-02-06 Hristian Kirtchev <kirtchev@adacore.com>
5524
5525 * sem_ch3.adb (Handle_Late_Controlled_Primitive): Remove local
5526 variable Spec. Comment reformatting. Use Copy_Separate_Tree
5527 rather than New_Copy_Tree when building the corresponding
5528 subprogram declaration.
5529
5530 2014-02-06 Hristian Kirtchev <kirtchev@adacore.com>
5531
5532 * sem_prag.adb (Analyze_Global_Item): Remove
5533 the mode-related checks on abstract states with enabled external
5534 properties.
5535 (Property_Error): Removed.
5536
5537 2014-02-06 Javier Miranda <miranda@adacore.com>
5538
5539 * lib-xref.adb (Generate_Reference): When
5540 generating the reference to the first private entity take care
5541 of handling swapped entities.
5542
5543 2014-02-06 Sergey Rybin <rybin@adacore.com frybin>
5544
5545 * gnat_ugn.texi, vms_data.ads: Add documentation of -j option for
5546 gnatmetric.
5547
5548 2014-02-06 Robert Dewar <dewar@adacore.com>
5549
5550 * exp_ch4.adb (Expand_N_Shift_Left): Handle shift counts greater
5551 than the word size when operating in Modify_Tree_For_C mode.
5552 * sinfo.ads: Add documentation section on Modify_Tree_For_C mode.
5553
5554 2014-02-06 Robert Dewar <dewar@adacore.com>
5555
5556 * erroutc.adb (Warning_Specifically_Suppressed.Matches):
5557 compare is case insensitive.
5558 * gnat_rm.texi: Document that string compare for Warnings Off
5559 is now case insensitive.
5560
5561 2014-02-06 Eric Botcazou <ebotcazou@adacore.com>
5562
5563 * gnat_rm.texi: Small wording tweak.
5564
5565 2014-02-06 Pascal Obry <obry@adacore.com>
5566
5567 * prj-attr.adb, projects.texi, snames.ads-tmpl: Add Included_Patterns
5568 and Included_Artifact_Patterns attribute definitions.
5569
5570 2014-02-06 Yannick Moy <moy@adacore.com>
5571
5572 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Set
5573 SPARK_Mode pragma component for all subprograms, including stubs.
5574
5575 2014-02-06 Hristian Kirtchev <kirtchev@adacore.com>
5576
5577 * sem_ch10.adb (Analyze_Package_Body_Stub): Maintain
5578 the configuration options of the enclosing context in a
5579 stack-like fasion.
5580 (Analyze_Subprogram_Body_Stub): Maintain the
5581 configuration options of the enclosing context in a stack-like
5582 fashion.
5583
5584 2014-02-06 Robert Dewar <dewar@adacore.com>
5585
5586 * debug.adb: -gnatd.u sets Modify_Tree_For C
5587 * exp_ch4.adb (Expand_N_Op_Rotate_Left): Expand out
5588 if Modify_Tree_For_C (Expand_N_Op_Rotate_Right): ditto.
5589 (Expand_N_Op_Arithmetic_Right_Shift): ditto.
5590 * exp_intr.adb (Expand_Shift): Call expander so we do
5591 Modify_Tree_For_C expansions.
5592 * gnat1drv.adb (Adjust_Global_Switches): Set Modify_Tree_For_C
5593 if -gnatd.u set.
5594
5595 2014-02-06 Fedor Rybin <frybin@adacore.com>
5596
5597 * prj-proc.ads (Tree_Loaded_Callback): new type Callback used
5598 after the phase 1 of the processing of each aggregated project
5599 to get access to project trees of aggregated projects.
5600 (Process_Project_Tree_Phase_1): new parameter On_New_Tree_Loaded
5601 If specified, On_New_Tree_Loaded is called after each aggregated
5602 project has been processed succesfully.
5603 (Process): new parameter On_New_Tree_Loaded.
5604 * prj-proc.adb (Process_Aggregated_Projects): On_New_Tree_Loaded
5605 callback added after processing of each aggregated project.
5606 (Recursive_Process): new parameter On_New_Tree_Loaded.
5607 (Process): new parameter On_New_Tree_Loaded.
5608 (Process_Project_Tree_Phase_1): new parameter On_New_Tree_Loaded.
5609 * prj-conf.ads (Parse_Project_And_Apply_Config): new parameter
5610 On_New_Tree_Loaded.
5611 * prj-conf.adb (Parse_Project_And_Apply_Config): new parameter
5612 On_New_Tree_Loaded.
5613
5614 2014-02-06 Bob Duff <duff@adacore.com>
5615
5616 * gnat_ugn.texi: Implement --insert-blank-lines and
5617 --preserve-blank-lines switches.
5618
5619 2014-02-06 Sergey Rybin <rybin@adacore.com frybin>
5620
5621 * gnat_ugn.texi, vms_data.ads: Add documentation of -j option for
5622 gnatelim.
5623
5624 2014-02-06 Eric Botcazou <ebotcazou@adacore.com>
5625
5626 * gnat_rm.texi (Pragma Optimize_Alignment): Document the effect
5627 of the pragma on individual objects.
5628
5629 2014-02-06 Hristian Kirtchev <kirtchev@adacore.com>
5630
5631 * einfo.adb Node29 is now used as BIP_Initialization_Call.
5632 (BIP_Initialization_Call): New routine.
5633 (Set_BIP_Initialization_Call): New routine.
5634 (Write_Field29_Name): Add an entry for constants and variables.
5635 * einfo.ads Add new attribute BIP_Initialization_Call and update
5636 its usage in nodes.
5637 (BIP_Initialization_Call): New routine along with pragma Inline.
5638 (Set_BIP_Initialization_Call): New routine along with pragma Inline.
5639 * exp_ch6.adb (Make_Build_In_Place_Call_In_Object_Declaration):
5640 Add local declaration Res_Decl. Capture the build-in-place
5641 initialization call when the related object declaration has
5642 created a transient block.
5643 * exp_ch7.adb (Process_Transient_Objects): Add local variable
5644 Fin_Insrt. Recognize a scenario where an object declaration acts
5645 as a transient context and is initialized by a build-in-place
5646 function call.
5647
5648 2014-02-06 Pascal Obry <obry@adacore.com>
5649
5650 * prj-util.adb (For_Interface_Sources): Fix handling of required
5651 bodies for aggregate libs.
5652
5653 2014-02-06 Robert Dewar <dewar@adacore.com>
5654
5655 * nlists.ads: Minor comment clarifications.
5656
5657 2014-02-06 Robert Dewar <dewar@adacore.com>
5658
5659 * gnat1drv.adb (Adjust_Global_Switches): Set Modify_Tree_For_C
5660 if gnatd.V set.
5661 * opt.ads (Modify_Tree_For_C): New flag.
5662 * output.ads, output.adb (Last_Char): New function.
5663
5664 2014-02-06 Pascal Obry <obry@adacore.com>
5665
5666 * projects.texi, prj-env.adb (Initialize_Default_Project_Path): Add
5667 share/gpr for cross-builds.
5668
5669 2014-02-06 Robert Dewar <dewar@adacore.com>
5670
5671 * exp_util.ads, checks.adb, sem_prag.adb, prj-util.adb, sem_ch13.adb:
5672 Minor reformatting and code clean ups.
5673
5674 2014-02-06 Pascal Obry <obry@adacore.com>
5675
5676 * prj-util.adb (For_Interface_Sources): Skip non compilable languages.
5677 * prj.ads: Minor typo fix in comment.
5678
5679 2014-02-06 Hristian Kirtchev <kirtchev@adacore.com>
5680
5681 * sem_prag.adb (Analyze_Depends_In_Decl_Part): Add
5682 local variable Expr. Flag clauses with extra parenthesis as this
5683 is not allowed by the syntax of the pragma. Code reformatting.
5684
5685 2014-02-06 Hristian Kirtchev <kirtchev@adacore.com>
5686
5687 * exp_attr.adb (Expand_N_Attribute_Reference): Alphabetize
5688 variables. Rename variabme Tnn to Temp. Do not create a temporary
5689 if assertions are disabled. Find enclosing routine _Postconditions
5690 and insert the temporary that captures the value of the prefix
5691 before the routine.
5692 * exp_ch6.adb (Build_Postconditions_Procedure):
5693 Insert the generated _Postconditions routine
5694 before the first source declaration of the related
5695 subprogram.
5696 (Insert_After_Last_Declaration): Removed.
5697 (Insert_Before_First_Source_Declaration): New routine.
5698
5699 2014-02-06 Ed Schonberg <schonberg@adacore.com>
5700
5701 * exp_util.adb, exp_util.ads (Within_Internal_Subprogram):
5702 Utility to determine whether current expansion is for the body
5703 of a predefined primitive operation.
5704 (Make_Predicate_Check): Use Within_Internal_Subpgram
5705 * checks.adb (Apply_Predicate_Check): Use
5706 Within_Internal_Subprogram
5707 * sem_ch13.adb (Freeze_Entity_Checks): Ditto.
5708
5709 2014-02-06 Pascal Obry <obry@adacore.com>
5710
5711 * prj.ads, prj-util.adb: Minor reformatting.
5712
5713 2014-02-06 Ed Schonberg <schonberg@adacore.com>
5714
5715 * exp_ch6.adb (Expand_Subprogram_Contract, Append_Enabled_Item):
5716 Take into account the Split_PPC flag to ensure that conjuncts
5717 in a composite postcondition aspect are tested in source order.
5718
5719 2014-02-06 Hristian Kirtchev <kirtchev@adacore.com>
5720
5721 * sem_ch6.adb (Analyze_Generic_Subprogram_Body): Flag illegal
5722 use of SPARK_Mode.
5723 * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration): Flag
5724 illegal use of SPARK_Mode.
5725 (Instantiate_Subprogram_Body): Flag illegal use of SPARK_Mode.
5726 * sem_prag.adb (Analyze_Pragma): Code reformatting.
5727 * sem_util.adb Add with and use clause for Aspects.
5728 (Check_SPARK_Mode_In_Generic): New routine.
5729 * sem_util.ads (Check_SPARK_Mode_In_Generic): New routine.
5730
5731 2014-02-06 Thomas Quinot <quinot@adacore.com>
5732
5733 * a-calend.adb (Formatting_Operations.Split): Ensure that
5734 Time_Error is raised for invalid time values.
5735
5736 2014-02-06 Arnaud Charlet <charlet@adacore.com>
5737
5738 * sem_prag.adb (Analyze_Pragma): Rewrite as a null statement
5739 in GNATprove_Mode.
5740
5741 2014-02-06 Robert Dewar <dewar@adacore.com>
5742
5743 * einfo.ads, einfo.adb (Is_Discriminant_Check_Function): New flag.
5744 * exp_ch3.adb (Build_Dcheck_Function): Set
5745 Is_Discriminant_Check_Function.
5746
5747 2014-02-06 Hristian Kirtchev <kirtchev@adacore.com>
5748
5749 * exp_ch7.adb (Is_Subprogram_Call): Inspect
5750 the original tree in certain cases where a construct has been
5751 factored out and replaced by a reference to a temporary.
5752
5753 2014-02-06 Ed Schonberg <schonberg@adacore.com>
5754
5755 * sem_ch3.adb (Process_Full_View): Fix typo in the order of
5756 parameters when propagating predicate function to full view.
5757 (Find_Type_Of_Object): Freeze base type of object type to catch
5758 premature use of discriminated private type without a full view.
5759
5760 2014-02-06 Robert Dewar <dewar@adacore.com>
5761
5762 * sprint.adb: Minor reformatting.
5763
5764 2014-02-06 Hristian Kirtchev <kirtchev@adacore.com>
5765
5766 * exp_ch4.adb (Process_Transient_Object): Add local variable
5767 Temp_Ins. When the transient object is initialized by an
5768 aggregate, the hook must capture the object after the last
5769 component assignment takes place.
5770 * exp_ch7.adb (Detect_Subprogram_Call): Expose the subprogram to
5771 routine Is_Subprogram_Call.
5772 (Is_Subprogram_Call): Inspect an
5773 aggregate that has been heavily expanded for subprogram calls.
5774 (Process_Transient_Objects): Add local variables Expr, Ptr_Id
5775 and Temp_Ins. Remove the nested declare block and adjust the
5776 indentation. When the transient object is initialized by an
5777 aggregate, the hook must capture the object after the last
5778 component assignment takes place.
5779
5780 2014-02-06 Hristian Kirtchev <kirtchev@adacore.com>
5781
5782 * sem_prag.adb (Analyze_Global_Item): Detect illegal uses of
5783 external states with enabled properties that do not match the
5784 global mode.
5785 (Property_Error): New routine.
5786 * sem_res.adb (Property_Error): New routine.
5787 (Resolve_Actuals): Detect illegal uses of external variables with
5788 enabled properties in procedure calls that do not match the mode of
5789 the corresponding formal parameter.
5790
5791 2014-02-06 Hristian Kirtchev <kirtchev@adacore.com>
5792
5793 * sem_util.adb (Has_Enabled_Property): Rename
5794 formal parameter Prop_Nam to Property. Update the comment on usage
5795 and all occurrences in the body. Add local variable Prop_Nam. When
5796 inspecting a property with an expression, the property name
5797 appears as the first choice of the component association.
5798
5799 2014-02-04 Robert Dewar <dewar@adacore.com>
5800
5801 * exp_ch5.adb, einfo.ads, freeze.adb, sem_ch8.adb: Minor reformatting.
5802
5803 2014-02-04 Gary Dismukes <dismukes@adacore.com>
5804
5805 * sem_aggr.adb: Change "runtime" to "run time" in warning message,
5806 for consistency with other messages.
5807
5808 2014-02-04 Ed Schonberg <schonberg@adacore.com>
5809
5810 * exp_ch5.adb (Expand_Iterator_Loop): For a container element
5811 iterator, indicate that the element is a constant if the container
5812 type does not have a variable indexing aspect.
5813 * sem_ch8.adb (Analyze_Object_Renaming): If the entity is already
5814 marked as constant, do not reset its Ekind, to ensure that
5815 container elements in an element loop are not modified if the
5816 container (e.g. a hashed set) only has a constant indexing aspect.
5817
5818 2014-02-04 Arnaud Charlet <charlet@adacore.com>
5819
5820 * g-souinf.ads: Subprograms in this unit are actually not pure.
5821 * freeze.adb (Freeze_Subprogram): Do not reset Is_Pure for Intrinsics.
5822 * einfo.ads (Is_Pure): Update doc to match implementation.
5823
5824 2014-02-04 Gary Dismukes <dismukes@adacore.com>
5825
5826 * exp_ch13.adb: Minor spelling fix.
5827
5828 2014-02-04 Robert Dewar <dewar@adacore.com>
5829
5830 * opt.ads: Minor comment update.
5831
5832 2014-02-04 Robert Dewar <dewar@adacore.com>
5833
5834 * exp_ch4.adb (Expand_N_Expression_With_Actions): Use Rewrite
5835 instead of Replace.
5836
5837 2014-02-04 Ed Schonberg <schonberg@adacore.com>
5838
5839 * sem_aggr.adb (Resolve_Array_Aggregate): Suppress warnings
5840 on null expressions if component type is non-null, when the
5841 corresponding association covers an empty range of index values.
5842
5843 2014-02-04 Robert Dewar <dewar@adacore.com>
5844
5845 * sinfo.ads: Further comments on N_Expression_With_Actions node.
5846
5847 2014-02-04 Hristian Kirtchev <kirtchev@adacore.com>
5848
5849 * sem_prag.adb (Analyze_Refined_Depends_In_Decl_Part): Remove global
5850 variables Out_Items and Ref_Global. Remove local constant
5851 Body_Id along with dummy variables D1, D2, D3, D4, D5, D6, D7
5852 and D8. Remove the useless collection of global items as this
5853 was a leftover from an earlier version of the routine. Move
5854 several routines out to avoid deep nesting and indentation.
5855 (Inputs_Match): Add formal parameter Dep_Clause. Rename formal
5856 parameter Do_Checks to Post_Errors. Update the comment on usage.
5857 (Is_Matching_Input): Renamed to Input_Match. Add formal parameters
5858 Ref_Inputs and Do_Checks. Rename formal parameter Do_Checks
5859 to Post_Errors. Update the comment on usage. Account for the
5860 case where a self referential state may have a null input_list.
5861 (Is_Self_Referential): New routine.
5862
5863 2014-02-04 Ed Schonberg <schonberg@adacore.com>
5864
5865 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): If the
5866 entity renames an expression, as in the case of an object of
5867 an unconstrained type initialized by a function call, defer the
5868 rewriting of the expression to the expander.
5869 * exp_ch13.adb (Expand_N_Attribute_Definition_Clause, case
5870 'Alignment): If the entity renames an expression, introduce
5871 temporary to capture value, and rewrite original declaration to
5872 use temporary.
5873
5874 2014-02-04 Gary Dismukes <dismukes@adacore.com>
5875
5876 * g-comlin.adb: Minor typo fix.
5877
5878 2014-02-04 Ed Schonberg <schonberg@adacore.com>
5879
5880 * freeze.adb (Freeze_All): Types derived from a formal
5881 access_to_classwide type do not have a finalization master.
5882
5883 2014-02-04 Robert Dewar <dewar@adacore.com>
5884
5885 * sprint.adb: Minor reformatting.
5886
5887 2014-02-04 Robert Dewar <dewar@adacore.com>
5888
5889 * exp_ch4.adb (Expand_N_Expression_With_Actions): Eliminate
5890 cases where Actions is a null list.
5891 * sinfo.ads (N_Expression_With_Actions): Actions can be
5892 temporarily empty during semantic analysis, but must be non-empty
5893 in the final expanded tree.
5894
5895 2014-01-31 Robert Dewar <dewar@adacore.com>
5896
5897 * exp_ch9.adb: Minor reformatting.
5898
5899 2014-01-31 Emmanuel Briot <briot@adacore.com>
5900
5901 * g-comlin.adb (Set_Command_Line): Take the switches
5902 configuration from the Command_Line_Config.
5903
5904 2014-01-31 Hristian Kirtchev <kirtchev@adacore.com>
5905
5906 * sem_prag.adb (Analyze_Refinement_Clause): Guard against a malformed
5907 refinement clause.
5908
5909 2014-01-31 Vincent Celier <celier@adacore.com>
5910
5911 * projects.texi: Add more documentation about others used as an
5912 index in indexed attributes.
5913
5914 2014-01-31 Robert Dewar <dewar@adacore.com>
5915
5916 * gnat_ugn.texi: Minor update.
5917 * gnat_rm.texi: Add example to Restriction_Warnings documentation.
5918 * exp_util.adb: Minor reformatting.
5919
5920 2014-01-31 Ed Schonberg <schonberg@adacore.com>
5921
5922 * exp_ch9.adb (Expand_Entry_Barrier): Warn if the barrier
5923 depends on data that is not private to the protected object,
5924 and potentially modifiable in unsynchronized fashion.
5925
5926 2014-01-31 Yannick Moy <moy@adacore.com>
5927
5928 * erroutc.adb (Validate_Specific_Warnings): Remove special case for
5929 GNATprove_Mode.
5930
5931 2014-01-31 Robert Dewar <dewar@adacore.com>
5932
5933 * prj-attr.ads (First_Attribute_Of): Returns Empty_Attribute
5934 for Unknown_Package.
5935 * sem_ch6.adb, sem_attr.adb: Minor comment addition.
5936
5937 2014-01-31 Hristian Kirtchev <kirtchev@adacore.com>
5938
5939 * exp_util.adb (Build_Allocate_Deallocate_Proc): Rewrite
5940 the logic that generates a runtime check to determine the
5941 controlled status of the object about to be allocated or
5942 deallocated. Class-wide types now always use a runtime check
5943 even if they appear as generic actuals.
5944 (Find_Object): Detect
5945 a special case that involves interface class-wide types because
5946 the object appears as a complex expression.
5947
5948 2014-01-31 Ed Schonberg <schonberg@adacore.com>
5949
5950 * sem_ch6.adb (Process_Formals): In Ada2012 mode, place
5951 subprogram with an incomplete untagged formals on the list of
5952 private dependents, to verify that the type is properly completed
5953 in the private part.
5954 * sem_attr.adb: Code clean up.
5955
5956 2014-01-31 Robert Dewar <dewar@adacore.com>
5957
5958 * exp_ch6.adb: Minor reformatting.
5959
5960 2014-01-31 Vincent Celier <celier@adacore.com>
5961
5962 * prj-attr.adb (First_Attribute_Of): Return Unknown_Attribute
5963 when Pkg is unknown.
5964
5965 2014-01-31 Hristian Kirtchev <kirtchev@adacore.com>
5966
5967 * sem_res.adb (Resolve_Entity_Name): Comment
5968 reformatting. Allow volatile objects in various generated checks.
5969
5970 2014-01-31 Ed Schonberg <schonberg@adacore.com>
5971
5972 * sem_attr.adb (Analyze_Attribute, case 'Update): For a record
5973 component association, set the etype of the identifier, for
5974 SPARK use.
5975
5976 2014-01-31 Ed Schonberg <schonberg@adacore.com>
5977
5978 * exp_ch6.adb (Has_Visibility_Of_Subprogram): If type is not
5979 declared in a package, not checks can apply to the subprogram.
5980
5981 2014-01-31 Robert Dewar <dewar@adacore.com>
5982
5983 * erroutc.adb (Validate_Specific_Warnings): Warnings are
5984 controlled -gnatw.W.
5985 * gnat_ugn.texi: Document new warnings controlled by -gnatw.w.
5986 * opt.ads (Warn_On_Warnings_Off): Now controls more cases.
5987
5988 2014-01-31 Arnaud Charlet <charlet@adacore.com>
5989
5990 * exp_disp.adb: Update comments.
5991
5992 2014-01-31 Yannick Moy <moy@adacore.com>
5993
5994 * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration,
5995 Save_Global_References): Guard access to expression in aspect.
5996
5997 2014-01-31 Yannick Moy <moy@adacore.com>
5998
5999 * sem_prag.adb (Analyze_Pragma/Pragma_SPARK_Mode):
6000 Issue an error when the pragma is applied to a generic unit,
6001 a generic declaration, or inside a generic.
6002
6003 2014-01-31 Yannick Moy <moy@adacore.com>
6004
6005 * sem_ch8.adb (Analyze_Subprogram_Renaming): Set SPARK_Mode on renaming
6006 entity.
6007
6008 2014-01-31 Robert Dewar <dewar@adacore.com>
6009
6010 * exp_ch9.adb, s-tassta.adb, s-tposen.adb, s-tposen.ads: Minor
6011 reformatting.
6012
6013 2014-01-31 Tristan Gingold <gingold@adacore.com>
6014
6015 * exp_disp.adb: Add a historic note.
6016
6017 2014-01-31 Robert Dewar <dewar@adacore.com>
6018
6019 * sem_warn.adb (Warn_On_Useless_Assignments): Add call to
6020 Process_Deferred_References.
6021
6022 2014-01-31 Yannick Moy <moy@adacore.com>
6023
6024 * erroutc.adb (Validate_Specific_Warnings): Do not issue a message for
6025 ineffective pragma Warnings(Off) in GNATprove_Mode.
6026
6027 2014-01-31 Bob Duff <duff@adacore.com>
6028
6029 * s-taskin.ads: Minor comment fix.
6030 * s-tassta.adb (Abort_Dependents): Don't abort all dependents;
6031 just direct dependents. If this is actually an abort, each task
6032 will take care of aborting its dependents, so all dependents will
6033 get aborted, as before. However, when this is called the second
6034 time from Vulnerable_Complete_Master "for convenience" (i.e. to
6035 kill off tasks waiting at terminate alternatives), aborting
6036 indirect dependents is wrong, because it causes some unrelated
6037 tasks to get aborted.
6038
6039 2014-01-31 Robert Dewar <dewar@adacore.com>
6040
6041 * sem_ch4.adb: Minor reformatting.
6042
6043 2014-01-31 Robert Dewar <dewar@adacore.com>
6044
6045 * exp_ch2.adb: New calling sequence for Is_LHS.
6046 * frontend.adb: Add call to Process_Deferred_References.
6047 * lib-xref.ads, lib-xref.adb (Process_Deferred_References): New.
6048 (Deferred_References): New table.
6049 * sem_ch8.adb (Find_Direct_Name): Make deferred reference table
6050 entries.
6051 (Find_Expanded_Name): Ditto.
6052 * sem_res.adb: New calling sequence for Is_LHS.
6053 * sem_util.ads, sem_util.adb (Is_LHS): New calling sequence.
6054 * sem_warn.adb: Call Process_Deferred_References before issuing
6055 warnings.
6056
6057 2014-01-31 Tristan Gingold <gingold@adacore.com>
6058
6059 * exp_util.adb (Corresponding_Runtime_Package): Restrict the
6060 use of System_Tasking_Protected_Objects_Single_Entry.
6061 * exp_ch9.adb (Build_Simple_Entry_Call): Remove Mode parameter
6062 of Protected_Single_Entry_Call.
6063 (Expand_N_Timed_Entry_Call): Remove single_entry case.
6064 * exp_disp.adb (Make_Disp_Asynchronous_Select_Body): Remove
6065 single_entry case.
6066 (Make_Disp_Timed_Select_Body): Likewise.
6067 * rtsfind.ads (RE_Timed_Protected_Single_Entry_Call): Remove.
6068 * s-tposen.adb (Send_Program_Error, PO_Do_Or_Queue): Remove
6069 Self_Id parameter.
6070 (Wakeup_Entry_Caller): Remove Self_ID and New_State parameters.
6071 (Wait_For_Completion_With_Timeout): Remove.
6072 (Protected_Single_Entry_Call): Remove Mode parameter
6073 (always Simple_Call).
6074 (Service_Entry): Remove Self_Id constant (not used anymore).
6075 (Timed_Protected_Single_Entry_Call): Remove.
6076 * s-tposen.ads (Timed_Protected_Single_Entry_Call): Remove.
6077 (Protected_Single_Entry_Call): Remove Mode parameter.
6078
6079 2014-01-29 Hristian Kirtchev <kirtchev@adacore.com>
6080
6081 * einfo.adb (Get_Pragma): Handle the retrieval of pragma Refined_Post.
6082 * einfo.ads (Get_Pragma): Update the comment on special pragmas
6083 handled by this routine.
6084 * sem_prag.adb (Analyze_Pragma): Add a legal pragma Refined_Post
6085 to the contract of the related subprogram body.
6086 * sem_util.adb (Add_Contract_Item): Handle the insertion of
6087 pragma Refined_Post into the contract of a subprogram body.
6088 * sinfo.ads Update the documentation of node N_Contract.
6089 * sem_res.adb (Resolve_Entity_Name): Add a guard
6090 to detect abstract states and variables only when checking the
6091 SPARK 2014 rules concerning volatile object placement.
6092
6093 2014-01-29 Ed Schonberg <schonberg@adacore.com>
6094
6095 * sem_ch4.adb (Find_Equality_Types, Try_One_Interp): within an instance,
6096 null is compatible with any access type.
6097
6098 2014-01-29 Hristian Kirtchev <kirtchev@adacore.com>
6099
6100 * sem_util.adb (Find_Placement_In_State_Space): Assume that the default
6101 placement is not in a package.
6102
6103 2014-01-29 Hristian Kirtchev <kirtchev@adacore.com>
6104
6105 * sem_util.adb (Has_Enabled_Property): Compare the character field of
6106 the sole property.
6107
6108 2014-01-29 Robert Dewar <dewar@adacore.com>
6109
6110 * sem_intr.adb, a-ztexio.ads, sinfo.ads, sem_res.adb, gnatlink.adb,
6111 vms_conv.adb, a-except.ads, a-except-2005.ads, a-teioed.adb,
6112 sem_warn.ads, treepr.ads, erroutc.ads, a-excach.adb: Minor reformatting.
6113
6114 2014-01-29 Robert Dewar <dewar@adacore.com>
6115
6116 * sem_util.ads, sem_util.adb (In_Pragma_Expression): New function.
6117 * sem_warn.adb (Check_References): Suppress warnings if inside
6118 Initial_Condition pragma.
6119
6120 2014-01-29 Hristian Kirtchev <kirtchev@adacore.com>
6121
6122 * sem_prag.adb (Check_Missing_Part_Of): List all values of
6123 State_Space_Kind for readability reasons. Do not emit an error on
6124 a private item when the enclosing package lacks aspect/pragma
6125 Abstract_State. Do not emit an error on a private package
6126 instantiation when the corresponding generic template lacks
6127 visible state.
6128 (Has_Visible_State): New routine.
6129 * sem_util.adb (Find_Placement_In_State_Space): The visible
6130 declarations of any kind of child units in general act as proper
6131 placement location.
6132
6133 2014-01-29 Robert Dewar <dewar@adacore.com>
6134
6135 * a-except-2005.adb, a-except.adb, a-excpol-abort.adb, a-exstat.adb,
6136 ali.adb, a-numaux.ads, a-numaux-darwin.ads, a-numaux-libc-x86.ads,
6137 a-numaux-vms.ads, a-numaux-vxworks.ads, a-numaux-x86.ads, aspects.ads,
6138 a-taside.adb, a-teioed.adb, a-textio.adb, a-textio.ads, atree.adb,
6139 atree.ads, a-witeio.adb, a-witeio.ads, a-wtedit.adb, a-ztedit.adb,
6140 a-ztexio.adb, bcheck.adb, binde.adb, checks.adb, comperr.adb,
6141 cstand.adb, debug_a.adb, einfo.ads, errout.adb, erroutc.adb,
6142 eval_fat.adb, exp_aggr.adb, exp_attr.adb, exp_ch11.adb, exp_ch3.adb,
6143 exp_ch4.adb, exp_ch5.adb, exp_ch6.adb, exp_ch9.adb, exp_dbug.adb,
6144 exp_disp.adb, exp_fixd.adb, exp_imgv.adb, exp_intr.adb, exp_util.adb,
6145 freeze.adb, frontend.adb, g-comlin.ads, g-mbdira.adb, gnat1drv.adb,
6146 gprep.adb, g-spipat.adb, i-cpp.ads, i-vxwork.ads, i-vxwork-x86.ads,
6147 krunch.ads, layout.adb, lib-load.adb, lib-writ.adb, lib-writ.ads,
6148 live.adb, namet.ads, osint.adb, osint-c.adb, output.ads, par.adb,
6149 par-ch10.adb, par-ch13.adb, par-ch3.adb, par-ch4.adb, par-ch5.adb,
6150 par-ch6.adb, par-ch9.adb, par-endh.adb, par-labl.adb, par-prag.adb,
6151 par-sync.adb, par-tchk.adb, par-util.adb, prj.adb, repinfo.adb,
6152 rtsfind.adb, s-arit64.adb, s-asthan-vms-alpha.adb,
6153 s-asthan-vms-ia64.adb, s-bignum.adb, scans.adb, scng.adb, s-dimmks.ads,
6154 sem_aggr.adb, sem_attr.adb, sem_aux.adb, sem_cat.adb, sem_ch10.adb,
6155 sem_ch12.adb, sem_ch13.adb, sem_ch13.ads, sem_ch3.adb, sem_ch4.adb,
6156 sem_ch5.adb, sem_ch6.adb, sem_ch8.adb, sem_disp.adb, sem_elab.adb,
6157 sem_elim.adb, sem_eval.adb, sem_intr.adb, sem_prag.adb, sem_res.adb,
6158 sem_type.adb, sem_util.adb, sem_warn.adb, set_targ.adb, s-fatgen.adb,
6159 s-fatgen.ads, s-fileio.adb, s-imgcha.adb, s-imgrea.adb, sinfo.ads,
6160 sinput-c.adb, snames.ads-tmpl, s-os_lib.adb, sprint.adb,
6161 s-regpat.adb, s-secsta.adb, s-stalib.ads,
6162 s-stchop.adb, s-stoele.ads, stand.ads, s-taprop-solaris.adb,
6163 s-tasdeb-vms.adb, s-tasini.adb, s-tassta.adb, s-valdec.adb,
6164 s-valuti.adb, s-wchjis.adb, s-wchwts.adb, system.ads, system-vms_64.ads,
6165 system-vms-ia64.ads, treepr.adb, types.ads, uintp.adb, uname.adb,
6166 urealp.adb, usage.adb, vxaddr2line.adb: Minor reformatting.
6167
6168 2014-01-29 Robert Dewar <dewar@adacore.com>
6169
6170 * expander.adb: Minor reformatting.
6171
6172 2014-01-29 Javier Miranda <miranda@adacore.com>
6173
6174 * exp_ch3.adb (Predefined_Primitive_Bodies): Adding documentation to
6175 previous patch.
6176
6177 2014-01-29 Javier Miranda <miranda@adacore.com>
6178
6179 * exp_ch3.adb (Predefined_Primitive_Bodies): Complete the code
6180 that checks if an interface types defines the predefined "="
6181 function because the compiler was erroneously not generating the
6182 predefined "=" primitive as soon as the name of some interface
6183 primitive is "=" (formals were not checked).
6184
6185 2014-01-29 Ed Schonberg <schonberg@adacore.com>
6186
6187 * expander.adb (Expander): In GNATprove mode, do not process
6188 transient scopes: they are in general not created in this mode,
6189 and an attempt to examine them will lead to constraint errors when
6190 processing configuration pragmas that have analyzable expressions.
6191
6192 2014-01-29 Vincent Celier <celier@adacore.com>
6193
6194 * clean.adb (Gnatclean): Fail if main project is an aggregate
6195 project or if there is an aggregate library project in the
6196 project tree.
6197 * gnatcmd.adb: Fail if the main project is an aggregate project
6198 or if there is an aggegate library project in the project tree.
6199 * make.adb (Initialize): : Fail if main project is an aggregate
6200 project or if there is an aggregate library project in the
6201 project tree.
6202 * makeutl.ads (Aggregate_Libraries_In): New Boolean function.
6203 * prj-makr.adb (Initialize): Fail if the main project is an
6204 aggregate project or an aggregate library project.
6205
6206 2014-01-29 Vincent Celier <celier@adacore.com>
6207
6208 * prj-part.adb (Check_Import_Aggregate): New procedure
6209 to check if an imported project is an aggregate project.
6210 (Parse_Single_Project): Call Check_Import_Aggregate
6211 * projects.texi: Document that aggregate projects cannot be
6212 extended or imported.
6213
6214 2014-01-29 Robert Dewar <dewar@adacore.com>
6215
6216 * exp_ch9.adb, sem_ch7.ads, s-regexp.adb, sem_ch13.adb: Minor
6217 reformatting and code clean up.
6218 * gnat_ugn.texi: Add documentation section on Atomic Variables
6219 and Optimization.
6220
6221 2014-01-29 Hristian Kirtchev <kirtchev@adacore.com>
6222
6223 * einfo.adb Flag264 is now unused.
6224 (Has_Body_References): Removed.
6225 (Set_Has_Body_References): Removed.
6226 (Write_Entity_Flags): Remove the output for flag Has_Body_References.
6227 * einfo.ads Update the comment on usage of attribute
6228 Body_References. Remove attribute Has_Body_References and its
6229 usage in nodes.
6230 (Has_Body_References): Removed along with pragma Inline.
6231 (Set_Has_Body_References): Removed along with pragma Inline.
6232 * sem_prag.adb (Analyze_Global_Item): Move the call to
6233 Record_Possible_Body_Reference in the state related checks
6234 section. Add a comment intended function.
6235 (Analyze_Input_Output): Move the call to Record_Possible_Body_Reference
6236 in the state related checks section. Add a comment intended function.
6237 (Analyze_Refinement_Clause): Cleanup the illegal body reference
6238 reporting. Add a comment on timing of error reporting.
6239 (Record_Possible_Body_Reference): Reimplement the routine.
6240
6241 2014-01-29 Vincent Celier <celier@adacore.com>
6242
6243 * makeutl.adb (Mains.Find_File_Add_Extension): Only look for specs for
6244 unit-based languages.
6245 (Mains.Complete_Mains.Do_Complete): Use the source file project
6246 tree when calling Find_File_Add_Extension. Use the correct
6247 project name when reporting an error.
6248
6249 2014-01-29 Hristian Kirtchev <kirtchev@adacore.com>
6250
6251 * aspects.adb Add an entry for aspect Part_Of in table
6252 Canonical_Aspect.
6253 * aspects.ads Add an entry for aspect Part_Of in tables Aspect_Id,
6254 Aspect_Argument, Aspect_Names and Aspect_Delay.
6255 * atree.h Define Elist9.
6256 * atree.adb (Elist9): New routine.
6257 (Set_Elist9): New routine.
6258 * atree.ads (Elist9): New routine.
6259 (Set_Elist9): New routine.
6260 * einfo.adb Add Part_Of_Constituents and Encapsulating_State to
6261 the list of node usage. Remove Refined_State from the list of
6262 node usage.
6263 (Encapsulating_State): New routine.
6264 (Get_Pragma):
6265 Handle pragma Part_Of; (Part_Of_Constituents): New routine.
6266 (Refined_State): Removed.
6267 (Set_Encapsulating_State): New routine.
6268 (Set_Part_Of_Constituents): New routine.
6269 (Set_Refined_State): Removed.
6270 (Write_Field9_Name): Add an entry
6271 for Part_Of_Constituents (Write_Field10_Name): Add an entry for
6272 Encapsulating_State. Remove the entry for Refined_State.
6273 * einfo.ads Add new attributes Encapsulating_State
6274 and Part_Of_Constituents alond with their usage in
6275 entities. Remove attribute Refined_State along with its
6276 usage in entities.
6277 (Encapsulating_State): New routine and
6278 pragma Inline. (Get_Pragma): Update the comment on usage.
6279 (Part_Of_Constituents): New routine and pragma Inline.
6280 (Refined_State): Removed along with pragma Inline.
6281 (Set_Encapsulating_State): New routine and pragma Inline.
6282 (Set_Part_Of_Constituents): New routine and pragma Inline.
6283 (Set_Refined_State): Removed along with pragma Inline.
6284 * par-prag.adb Pragma Part_Of does not need any special processing
6285 by the parser.
6286 * sem_ch3.adb (Analyze_Declarations): Remove local variables
6287 Body_Id and Prag. Call separate routines to analyze the
6288 contract of a package [body].
6289 (Analyze_Object_Contract):
6290 Update the comment on usage. Remove local variables
6291 Items and Nam. Use Get_Pragma rather than traversing the
6292 classification list. Verify whether the lack of indicator
6293 Part_Of agrees with the placement of the variable in state space.
6294 (Analyze_Object_Declaration): Initialize the encapsulating state
6295 of a variable. (Requires_State_Refinement): Moved to sem_util.
6296 * sem_ch7.adb (Analyze_Package_Body_Contract): New routine.
6297 (Analyze_Package_Contract): New routine.
6298 * sem_ch7.ads (Analyze_Package_Body_Contract): New routine.
6299 (Analyze_Package_Contract): New routine.
6300 * sem_ch10.adb (Decorate_State): Initialize the encapsulating
6301 state and Part_Of constituents.
6302 * sem_ch13.adb (Analyze_Aspect_Specifications):
6303 Add processing for aspect Part_Of. Update all
6304 calls to Decorate_Delayed_Aspect_And_Pragma.
6305 (Check_Aspect_At_Freeze_Point): Aspect Part_Of does
6306 not need any special processing at freeze time.
6307 (Decorate_Delayed_Aspect_And_Pragma): Renamed to
6308 Decorate_Aspect_And_Pragma. Add formal parameter Delayed and
6309 update the associated comment.
6310 * sem_prag.adb Add an entry for pragma Part_Of in table Sig_Flags.
6311 (Analyze_Abstract_State): Add new global variable State_Id. Remove
6312 local constants Errors and Loc. Remove local variables Is_Null
6313 and State_Nam. Create the entity of the abstract state on the
6314 spot, before all remaining checks are performed. Verify that a
6315 missing Part_Of option agrees with the placement of the abstract
6316 state within the state space.
6317 (Analyze_Depends_In_Decl_Part):
6318 Add new global variables Constits_Seen and States_Seen. Check
6319 that a state and a corresponding constituent do not appear
6320 in pragma [Refined_]Depends.
6321 (Analyze_Global_In_Decl_Part):
6322 Add new global variables Constits_Seen and States_Seen. Check
6323 that a state and a corresponding constituent do not appear
6324 in pragma [Refined_]Global.
6325 (Analyze_Global_Item):
6326 Remove the now obsolete code that deals with Part_Of.
6327 Add the entity of the global item to the list of processed
6328 items. (Analyze_Initializes_In_Decl_Part): Add new global
6329 variables Constits_Seen and States_Seen. Check that a state
6330 and a corresponding constituent do not appear in pragma
6331 Initializes.
6332 (Analyze_Initialization_Item): Add the entity
6333 of the initialization item to the list of processed items.
6334 (Analyze_Input_Item): Add the entity of the initialization
6335 item to the list of processed items.
6336 (Analyze_Input_Output):
6337 Remove the now obsolete code that deals with Part_Of. Add the
6338 entity of the input/output to the list of processed items.
6339 (Analyze_Part_Of): New routine.
6340 (Analyze_Part_Of_Option): Remove
6341 local constant Par_State. Add local constant Encaps and local
6342 variables Encaps_Id and Legal. Use Analyze_Part of to analyze
6343 the option. Turn the related state into a Part_Of constituent
6344 if the option is legal.
6345 (Analyze_Pragma): Add processing
6346 for pragma Part_Of.
6347 (Analyze_Refined_State_In_Decl_Part):
6348 Remove global constants Pack_Body and Spec_Id. Remove
6349 global variables Abstr_States and Hidden_States. Add new
6350 global variables Available_States, Body_Id, Body_States and
6351 Spec_Id. Add new local constant Body_Decl. Reimplement the
6352 logic that extracts the states available for refinement from
6353 the related package and the body hidden states of the said
6354 package.
6355 (Analyze_Refinement_Clause): Add local variable Part_Of_Constits.
6356 (Check_Applicable_Policy): Alphabetize body.
6357 (Check_Dependency_Clause): Replace Refined_State
6358 with Encapsulating_State.
6359 (Check_Matching_Constituent):
6360 Reimplement the logic that determines whether an item is a valid
6361 / invalid constituent of the current refined state. Return when
6362 a construct does not denote a valid abstract state. Extract the
6363 list of Part_Of constituents for further analysis. Check that all
6364 Part_Of constituents of a state have been used in its refinement.
6365 (Check_Matching_State): Update the comment on usage. Operate
6366 on the list of available states.
6367 (Check_Missing_Part_Of): New routine.
6368 (Check_Refined_Global_Item): Replace Refined_State
6369 with Encapsulating_State.
6370 (Check_State_And_Constituent_Use): New routine.
6371 (Create_Abstract_State): New routine.
6372 (Is_Matching_Input): Replace Refined_State with Encapsulating_State.
6373 (Is_Part_Of): Removed.
6374 (Collect_Body_States): New routine.
6375 (Collect_Constituent): Replace Refined_State with Encapsulating_State.
6376 (Collect_Hidden_States): Removed.
6377 (Report_Unrefined_States): Change the profile of the procedure along
6378 with the comment on usage.
6379 (Report_Unused_Constituents): New routine.
6380 (Report_Unused_Hidden_States): Removed.
6381 (Report_Unused_States): New routine.
6382 * sem_prag.ads (Check_Missing_Part_Of): New routine.
6383 * sem_util.adb (Add_Contract_Item): Pragma Part_Of can now
6384 appear in the classification pragmas of a package instantiation
6385 or a variable.
6386 (Find_Placement_In_State_Space): New routine.
6387 (Is_Child): Removed.
6388 (Is_Child_Or_Sibling): Remove formal
6389 parameter Private_Child. Remove the private child checks.
6390 (Requires_State_Refinement): Moved from sem_ch3.
6391 * sem_util.ads Add new type State_Space_Kind along with
6392 comment on its usage and values.
6393 (Add_Contract_Item): Update the comment on usage.
6394 (Find_Body_Discriminal): Alphabetize spec.
6395 (Find_Placement_In_State_Space): New routine.
6396 (Is_Child_Or_Sibling): Remove formal parameter Private_Child
6397 and update the comment on usage.
6398 (Requires_State_Refinement): Moved from sem_ch3.
6399 * sinfo.ads: Update the documentation of N_Contract.
6400 * snames.ads-tmpl The predefined name for Part_Of is now used
6401 to denote a pragma. Add Pragma_Id for Part_Of.
6402
6403 2014-01-29 Emmanuel Briot <briot@adacore.com>
6404
6405 * s-regexp.adb (Create_Secondary_Table): Automatically grow the state
6406 machine as needed.
6407 (Dump): New subprogram.
6408
6409 2014-01-29 Tristan Gingold <gingold@adacore.com>
6410
6411 * exp_ch9.adb (Expand_N_Protected_Type_Declaration): Add
6412 Expand_Entry_Declaration to factorize code.
6413
6414 2014-01-29 Ed Schonberg <schonberg@adacore.com>
6415
6416 * checks.adb: minor clarification.
6417 * sem_ch7.adb (Declare_Inherited_Private_Subprograms): Limit
6418 search for primitive operations to the entities that immediately
6419 follow the type declaration.
6420
6421 2014-01-29 Tristan Gingold <gingold@adacore.com>
6422
6423 * exp_ch9.adb (Build_Protected_Entry): Do not call
6424 Complete_Entry_Body anymore.
6425 * rtsfind.ads (RE_Complete_Single_Entry_Body): Remove.
6426 * s-tposen.ads, s-tposen.adb (Complete_Single_Entry_Body): Remove.
6427
6428 2014-01-29 Pierre-Marie Derodat <derodat@adacore.com>
6429
6430 * s-os_lib.adb, s-os_lib.ads (Normalize_Pathname): Return an empty
6431 string when the Name input bigger than allowed. Adapt the function
6432 specification.
6433
6434 2014-01-29 Ed Schonberg <schonberg@adacore.com>
6435
6436 * checks.adb (Install_Null_Excluding_Check): Do not emit warning
6437 if expression is within a case_expression of if_expression.
6438
6439 2014-01-29 Robert Dewar <dewar@adacore.com>
6440
6441 * exp_ch9.adb, inline.ads: Minor reformatting.
6442
6443 2014-01-29 Tristan Gingold <gingold@adacore.com>
6444
6445 * exp_ch9.adb (Is_Exception_Safe): Return true if no exceptions.
6446
6447 2014-01-29 Yannick Moy <moy@adacore.com>
6448
6449 * inline.ads (Pending_Body_Info): Add SPARK_Mode and
6450 SPARK_Mode_Pragma components to be able to analyze generic
6451 instance.
6452 * sem_ch12.adb (Analyze_Package_Instantiation,
6453 Inline_Instance_Body, Need_Subprogram_Instance_Body,
6454 Load_Parent_Of_Generic): Pass in SPARK_Mode from instantiation
6455 for future analysis of the instance.
6456 (Instantiate_Package_Body,
6457 Instantiate_Subprogram_Body, Set_Instance_Inv): Set SPARK_Mode
6458 from instantiation to analyze the instance.
6459
6460 2014-01-29 Robert Dewar <dewar@adacore.com>
6461
6462 * sem_ch7.adb, sem_prag.adb, sem_ch4.adb, sem_ch6.adb: Minor code
6463 reorganization.
6464
6465 2014-01-29 Yannick Moy <moy@adacore.com>
6466
6467 * gnat_rm.texi: Update description of SPARK_Mode pragma.
6468
6469 2014-01-29 Tristan Gingold <gingold@adacore.com>
6470
6471 * exp_ch9.adb (Expand_N_Protected_Body): Remove Num_Entries.
6472
6473 2014-01-29 Thomas Quinot <quinot@adacore.com>
6474
6475 * sem_ch4.adb (Find_Component_In_Instance): Update comment.
6476
6477 2014-01-29 Ed Schonberg <schonberg@adacore.com>
6478
6479 * exp_util.adb (Build_Task_Image_Prefix): Indicate that the
6480 resulting string is an internal entity. and thus requires no
6481 initialization. This is relevant when Initialize_ Scalars is
6482 enabled, because the resultant spurious initialization may lead to
6483 secondary stack anomalies that produce a mangled name for a task.
6484
6485 2014-01-29 Yannick Moy <moy@adacore.com>
6486
6487 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): SPARK_Mode
6488 not inherited from spec anymore. Check consistency
6489 rules after processing of declarations.
6490 * sem_ch7.adb (Analyze_Package_Body_Helper): SPARK_Mode not inherited
6491 from spec anymore. Check consistency rules after processing of
6492 declarations.
6493 (Analyze_Package_Declaration): Set SPARK_Mode only for non-generic
6494 packages.
6495 * sem_prag.adb (Analyze_Pragma/Pragma_SPARK_Mode): Implement new
6496 consistency rules.
6497
6498 2014-01-27 Robert Dewar <dewar@adacore.com>
6499
6500 * sem_res.adb (Resolve_Comparison_Op): Add type name/location
6501 to unordered msg.
6502 (Resolve_Range): Add type name/location to unordered msg.
6503
6504 2014-01-27 Claire Dross <dross@adacore.com>
6505
6506 * a-cofove.adb/s (Copy): Add precondition so that Copy (Source,
6507 Capacity) is only called with Capacity >= Length (Source) and
6508 Capacity in Capacity_Range.
6509 * a-cfdlli.adb/s, a-cfhase.adb/s, a-cfhama.adb/s, a-cforse.adb/s,
6510 a-cforma.adb/s (Copy): Add precondition so that Copy (Source, Capacity)
6511 is only called with Capacity >= Source.Capacity. Raise Capacity_Error
6512 in the code is this is not the case.
6513
6514 2014-01-27 Thomas Quinot <quinot@adacore.com>
6515
6516 * sem_ch4.adb (Analyze_Selected_Component): Fix handling of
6517 selected component in an instance where the component of the
6518 actual is not visibile at instantiation.
6519
6520 2014-01-27 Ed Schonberg <schonberg@adacore.com>
6521
6522 * sem_ch6.adb: sem_ch6.adb (Set_Actual_Subtypes): If the type
6523 has a dynamic predicate, generate freeze node for Actual_Subtype
6524 at once, because the declaration of the corresponding predicate
6525 function will make reference to it.
6526
6527 2014-01-27 Tristan Gingold <gingold@adacore.com>
6528
6529 * exp_ch7.adb, exp_ch9.adb: Adjust comments.
6530
6531 2014-01-27 Robert Dewar <dewar@adacore.com>
6532
6533 * exp_ch4.adb (Expand_N_Op_Expon): Remove unsigned type test
6534 for 2**X optimization.
6535
6536 2014-01-27 Ed Schonberg <schonberg@adacore.com>
6537
6538 * a-suenst.adb: strings.utf_encoding.strings (Decode): Check
6539 explicitly whether value is in range of Character, because the
6540 library is typically compiled with range checks disabled, and
6541 we cannot rely on the implicit check on the argument of 'Val.
6542
6543 2014-01-27 Vincent Celier <celier@adacore.com>
6544
6545 * a-ciorma.adb, a-cihama.adb (Assign): Copy the Source to the Target,
6546 not the Target to itself.
6547
6548 2014-01-27 Robert Dewar <dewar@adacore.com>
6549
6550 * vms_conv.ads, ali.adb, sem_ch6.ads, opt.ads, vms_cmds.ads: Minor
6551 changes to avoid incorrect use of unordered enum types.
6552
6553 2014-01-27 Thomas Quinot <quinot@adacore.com>
6554
6555 * sem_ch4.adb: Minor reformatting.
6556
6557 2014-01-27 Robert Dewar <dewar@adacore.com>
6558
6559 * scn.adb (Check_End_Of_Line): Removed.
6560 (Error_Long_Line): Removed.
6561 (Determine_License): Use versions of above routines from Scanner.
6562 * scng.adb (Check_End_Of_Line): Moved to spec.
6563 (Error_Long_Line): Removed, no longer used.
6564 * scng.ads (Check_End_Of_Line): Moved here from body.
6565
6566 2014-01-27 Tristan Gingold <gingold@adacore.com>
6567
6568 * exp_ch7.adb (Build_Cleanup_Statements): Call
6569 Build_Protected_Subprogram_Call_Cleanup to insert the cleanup
6570 for protected body.
6571 * exp_ch9.adb (Build_Protected_Subprogram_Body): Likewise.
6572 Remove Service_Name variable.
6573 (Build_Protected_SUbprogam_Call_Cleanup): New procedure that
6574 factorize code from the above subprograms.
6575 * exp_ch9.ads (Build_Protected_Subprogram_Call_Cleanup): New procedure.
6576
6577 2014-01-27 Hristian Kirtchev <kirtchev@adacore.com>
6578
6579 * einfo.adb (Has_Option): Reimplemented.
6580 * sem_prag.adb (Analyze_Refinement_Clause): Add global
6581 variables AR_Constit, AW_Constit, ER_Constit, EW_Constit,
6582 External_Constit_Seen and State. Add local variables Body_Ref,
6583 Body_Ref_Elmt and Extra_State. Reimplement part of the logic to
6584 avoid a cumbersome while pool. Verify the legality of an external
6585 state and relevant properties.
6586 (Check_External_Property): New routine.
6587 (Check_Matching_State): Remove parameter profile
6588 and update comment on usage.
6589 (Collect_Constituent): Store the
6590 relevant external property of a constituent.
6591 * sem_util.adb (Async_Readers_Enabled): Update the call to
6592 Has_Enabled_Property.
6593 (Async_Writers_Enabled): Update the call to Has_Enabled_Property.
6594 (Effective_Reads_Enabled): Update the call to Has_Enabled_Property.
6595 (Effective_Writes_Enabled): Update the call to Has_Enabled_Property.
6596 (Has_Enabled_Property): Rename formal parameter Extern to State_Id.
6597 Update comment on usage. Reimplement the logic to recognize the various
6598 formats of properties.
6599
6600 2014-01-27 Ed Schonberg <schonberg@adacore.com>
6601
6602 * par-ch5.adb: Minor reformatting.
6603
6604 2014-01-27 Tristan Gingold <gingold@adacore.com>
6605
6606 * s-tposen.ads: Harmonize style and comments.
6607
6608 2014-01-27 Vincent Celier <celier@adacore.com>
6609
6610 * projects.texi: Document that shared library projects, by
6611 default, cannot import projects that are not shared library
6612 projects.
6613
6614 2014-01-27 Robert Dewar <dewar@adacore.com>
6615
6616 * sem_ch8.adb (Find_Selected_Component): Use Replace instead
6617 of Rewrite.
6618
6619 2014-01-27 Ed Schonberg <schonberg@adacore.com>
6620
6621 * a-suenco.adb, a-suenst.adb (Decode): Raise encoding error if
6622 any other exception is raised.
6623 (Convert): If both Input_Scheme and Output_Scheme are UTF_8 it is
6624 still necessary to perform a conversion in order to remove overlong
6625 encodings.
6626
6627 2014-01-27 Robert Dewar <dewar@adacore.com>
6628
6629 * exp_smem.adb: Minor reformatting.
6630
6631 2014-01-27 Thomas Quinot <quinot@adacore.com>
6632
6633 * a-calfor.ads: Fix incorrect reference to operator "-" in comment.
6634
6635 2014-01-27 Ed Schonberg <schonberg@adacore.com>
6636
6637 * sem_res.adb (Make_Call_Into_Operator): In ASIS mode, relocate
6638 nodes for operands to the original node for the call, to preserve
6639 Original_Node pointers within the resolved operands, given that
6640 they may have been rewritten as well. Previous approach copied
6641 the operands into a new tree and lost those pointers.
6642
6643 2014-01-27 Claire Dross <dross@adacore.com>
6644
6645
6646 * a-cofove.adb, a-cofove.ads: Add Strict_Equal function to the API.
6647
6648 2014-01-27 Ed Schonberg <schonberg@adacore.com>
6649
6650 * sem_util.adb (Check_Internal_Protected_Use): A call through
6651 an anonymous access parameter of the current protected function
6652 is not a potential modification of the current object.
6653
6654 2014-01-27 Ed Schonberg <schonberg@adacore.com>
6655
6656 * a-cobove.adb (Reserve_Capacity): Procedure raises
6657 Capacity_Error, not Constraint_Error, when request cannot be
6658 satisfied.
6659
6660 2014-01-27 Vincent Celier <celier@adacore.com>
6661
6662 * a-coorma.adb, a-cohama.adb (Assign): Copy the Source to the Target,
6663 not the Target to itself.
6664
6665 2014-01-27 Ed Schonberg <schonberg@adacore.com>
6666
6667 * exp_ch4.adb (Expand_Concatenate): If the target of the
6668 concatenation is a library-level entity, always use the off-line
6669 version of concatenation, regardless of optimization level. This
6670 is space-efficient, and prevents linking problems when some
6671 units are compiled with different optimization levels.
6672
6673 2014-01-27 Ed Schonberg <schonberg@adacore.com>
6674
6675 * sem_ch5.adb: Code clean up.
6676
6677 2014-01-27 Ed Schonberg <schonberg@adacore.com>
6678
6679 * par-ch5.adb (P_Iterator_Specification): Improve error recovery
6680 when an array or container iterator includes a subtype indication,
6681 which is only legal in an element iterator.
6682
6683 2014-01-27 Thomas Quinot <quinot@adacore.com>
6684
6685 * exp_ch7.adb: Minor reformatting.
6686
6687 2014-01-27 Robert Dewar <dewar@adacore.com>
6688
6689 * opt.adb (SPARK_Mode): Default for library units is None rather
6690 than Off.
6691 * opt.ads: Remove AUTO from SPARK_Mode_Type SPARK_Mode_Type is
6692 no longer ordered.
6693 * sem_prag.adb (Analyze_Pragma, case SPARK_Mode): Remove AUTO
6694 possibility.
6695 * snames.ads-tmpl (Name_Auto): Removed, no longer used.
6696
6697 2014-01-27 Robert Dewar <dewar@adacore.com>
6698
6699 * par-ch5.adb (P_Sequence_Of_Statements): Make entry in
6700 Suspicious_Labels table if we have identifier; followed by loop
6701 or block.
6702 * par-endh.adb (Evaluate_End_Entry): Search Suspicious_Labels table.
6703 * par.adb (Suspicious_Labels): New table.
6704
6705 2014-01-27 Robert Dewar <dewar@adacore.com>
6706
6707 * exp_aggr.adb (Check_Bounds): Reason is range check, not
6708 length check.
6709
6710 2014-01-27 Yannick Moy <moy@adacore.com>
6711
6712 * get_spark_xrefs.adb (Get_SPARK_Xrefs): Accept new type 'c' for
6713 reference.
6714 * lib-xref-spark_specific.adb (Is_Global_Constant): Remove useless
6715 function now.
6716 (Add_SPARK_Xrefs): Include references to constants.
6717 * spark_xrefs.ads Document new character 'c' for references to
6718 constants.
6719
6720 2014-01-27 Thomas Quinot <quinot@adacore.com>
6721
6722 * exp_smem.adb (Add_Write_After): For a function call, insert write as
6723 an after action in a transient scope.
6724
6725 2014-01-27 Thomas Quinot <quinot@adacore.com>
6726
6727 * exp_smem.adb (Expand_Shared_Passive_Variable): For a reference
6728 to a shared variable as an OUT formal in a call to an init proc,
6729 the 'Read call must be emitted after, not before, the call.
6730
6731 2014-01-27 Robert Dewar <dewar@adacore.com>
6732
6733 * gnat_rm.texi: Remove mention of AUTO mode for SPARK_Mode pragma.
6734
6735 2014-01-27 Robert Dewar <dewar@adacore.com>
6736
6737 * a-wichha.adb (Character_Set_Version): Change to output proper
6738 value.
6739
6740 2014-01-27 Hristian Kirtchev <kirtchev@adacore.com>
6741
6742 * einfo.adb (Is_Input_Only_State): Removed.
6743 (Is_Non_Volatile_State): Removed.
6744 (Is_Output_State): Removed.
6745 * einfo.ads (Is_Input_Only_State): Remove attribute and
6746 subprogram. Update related entity.
6747 (Is_Non_Volatile_State):
6748 Remove attribute and subprogram. Update related entity.
6749 (Is_Output_State): Removed attribute and subprogram. Update
6750 related entity.
6751 * exp_ch6.adb (Expand_Subprogram_Contract): Update comment on
6752 generated code.
6753 * sem_ch3.adb (Analyze_Declarations): Analyze the contract of
6754 an object, not just variables.
6755 (Analyze_Object_Contract): New routine.
6756 (Analyze_Variable_Contract): Removed.
6757 (Process_Discriminants): Detect an illegal use of volatile
6758 discriminant in SPARK mode.
6759 * sem_ch5.adb (Analyze_Iterator_Specification):
6760 Detect an illegal use of volatile loop variable.
6761 (Analyze_Loop_Parameter_Specification): Detect an illegal use
6762 of volatile loop variable.
6763 * sem_ch6.adb (Process_Formals): Update the volatile object
6764 detection. Detect an illegal formal of mode IN OUT or OUT in
6765 SPARK mode. Enhance the error messages with references.
6766 * sem_ch12.adb (Instantiate_Object): Update the volatile object
6767 detection. Enhance the error messages with references.
6768 * sem_prag.adb (Analyze_Abstract_State): Enhance the error
6769 messages with references.
6770 (Analyze_Contract_Case): Enhance the error messages with references.
6771 (Analyze_External_Property): Call Check_Duplicate_Property to process
6772 an external property.
6773 (Analyze_External_Property_In_Decl_Part): New routine.
6774 (Analyze_External_State_In_Decl_Part): Removed.
6775 (Analyze_Global_Item): Detect an illegal
6776 use of a volatile constant. Detect an illegal use
6777 of a variable with enabled Effective_Reads. Enhance
6778 the error messages with references. Remove obsolete
6779 checks concerning Input_Only and Output_Only states.
6780 (Analyze_Initialization_Item): Enhance the error messages
6781 with references.
6782 (Analyze_Initializes_In_Decl_Part): Do not
6783 collect the states and variables when the initialization list
6784 is null.
6785 (Analyze_Input_Item): Enhance the error messages with references.
6786 (Analyze_Input_Output): Enhance the error messages with references.
6787 (Analyze_Pragma): Enhance the error messages with references.
6788 (Analyze_Refinement_Clause): Code reformatting.
6789 (Analyze_Refined_Depends_In_Decl_Part):
6790 Rename global variable Global to Reg_Global and update all
6791 occurrences. Add local variables D7 and D8. Update the error
6792 messages with references. Update the call to Collect_Global_Items.
6793 (Analyze_Refined_Global_In_Decl_Part): Add local variables
6794 Has_Proof_In_State, Proof_In_Constits and Proof_In_Items. Update
6795 the call to Collect_Global_Items. Account for a Proof_In state
6796 in null / useless refinement checks. Verify the coverage of
6797 Proof_In states.
6798 (Check_Dependency_Clause): Remove local variable
6799 Out_Constits. Remove the retrieval and removal of constituents
6800 for an Output_Only state. Remove the reporting of unused
6801 Output_Only state constituents.
6802 (Check_Duplicate_Mode): Enhance
6803 the error message with a reference.
6804 (Check_Duplicate_Property): New routine.
6805 (Check_Duplicate_Option): Enhance the error message with a reference.
6806 (Check_External_Properties): Enhance the error message with a reference.
6807 (Check_Function_Return): Enhance the error message with a reference.
6808 (Check_In_Out_States): Update
6809 comment on usage. Add a specialized error message for Proof_In
6810 constituents. Enhance the error message with a reference.
6811 (Check_Input_States): Update comment on usage. Account for
6812 possible Proof_In constituents. Enhance the error message
6813 with a areference.
6814 (Check_Matching_Constituent): Enhance the error message with a
6815 reference.
6816 (Check_Matching_State): Enchance the error message with a reference.
6817 (Check_Mode): Add local variable From_Global. Update the call to
6818 Find_Mode. Emit more precise error messages concerning extra items
6819 (Check_Mode_Restriction_In_Enclosing_Context): Consider
6820 pragma Refined_Global. Enhance the error message with a
6821 reference.
6822 (Check_Mode_Restriction_In_Function): Enhance the error message with
6823 a reference.
6824 (Check_Output_States): Update comment on usage. Add local variable
6825 Posted. Account for possible Proof_In constituents. Produce a detailed
6826 list of missing constituents.
6827 (Check_Proof_In_States): New routine.
6828 (Check_Refined_Global_Item): Handle Proof_In
6829 constituents. Enchance the error message with a reference.
6830 (Collect_Global_Items): Add formal parameters Proof_In_Items
6831 and Has_Proof_In_State. Update the comment on usage. Account
6832 for Proof_In items.
6833 (Create_Or_Modify_Clause): Enchance
6834 the error message with a reference.
6835 (Find_Mode): Add
6836 formal parameter From_Global. Update the comment on usage.
6837 Detect when the mode is governed by pragma [Refined_]Global.
6838 (Output_Constituents): Removed.
6839 (Report_Extra_Constituents):
6840 Report extra Proof_In constituents.
6841 (Report_Unused_Constituents): Removed.
6842 (Usage_Error): Code reformatting. Enhance the error
6843 messages with reference.
6844 * sem_prag.ads (Analyze_External_Property_In_Decl_Part): New routine.
6845 (Analyze_External_State_In_Decl_Part): Removed.
6846 * sem_res.adb (Resolve_Actuals): Update the volatile object
6847 detection. Enhance the error message with a reference.
6848 (Resolve_Entity_Name): Update the volatile object
6849 detection. Enhance the error message with a reference.
6850 * sem_util.adb (Is_Refined_State): Add a guard to avoid a crash.
6851 (Is_SPARK_Volatile_Object): New routine.
6852 (Has_Volatile_Component): New routine.
6853 * sem_util.ads (Is_Delegate): Alphabetized.
6854 (Is_SPARK_Volatile_Object): New routine.
6855 (Has_Volatile_Component): New routine.
6856 * snames.ads-tmpl: Remove names Name_Input_Only and Name_Output_Only.
6857
6858 2014-01-27 Ed Schonberg <schonberg@adacore.com>
6859
6860 * sem_attr.adb: Resolve fully prefix of 'Update.
6861
6862 2014-01-27 Ben Brosgol <brosgol@adacore.com>
6863
6864 * gnat_rm.texi: Minor clarifications.
6865
6866 2014-01-27 Robert Dewar <dewar@adacore.com>
6867
6868 * sem_elab.adb (Check_Internal_Call_Continue): Avoid complaining
6869 about call that is generated as part of an Initial_Condition
6870 check.
6871 * sem_prag.adb: Minor spelling correction.
6872
6873 2014-01-27 Robert Dewar <dewar@adacore.com>
6874
6875 * sem_prag.adb (Set_Convention_From_Pragma): Check that
6876 convention Ghost can only apply to functions.
6877 * einfo.ads, einfo.adb (Is_Ghost_Subprogram): Add clarifying comment.
6878
6879 2014-01-27 Robert Dewar <dewar@adacore.com>
6880
6881 * gnat_ugn.texi: Add Short_Enums to documentation of
6882 -gnatet/-gnateT.
6883
6884 2014-01-27 Robert Dewar <dewar@adacore.com>
6885
6886 * sem_prag.adb (Analyze_Input_Item): Correct check for input
6887 item in same package.
6888 * sem_util.ads, sem_util.adb (Within_Scope): New function.
6889
6890 2014-01-26 Arnaud Charlet <charlet@adacore.com>
6891
6892 * a-intnam-lynxos.ads, mlib-tgt-specific-lynxos.adb,
6893 s-osinte-lynxos-3.adb, s-osinte-lynxos-3.ads, s-osinte-lynxos.adb,
6894 s-osinte-lynxos.ads, s-taprop-lynxos.adb, s-tpopsp-lynxos.adb,
6895 system-lynxos-ppc.ads, system-lynxos-x86.ads: Removed, no longer
6896 maintained.
6897
6898 2014-01-25 Eric Botcazou <ebotcazou@adacore.com>
6899
6900 * gcc-interface/Makefile.in: Fix oversight.
6901
6902 2014-01-25 Eric Botcazou <ebotcazou@adacore.com>
6903
6904 * gcc-interface/utils.c (convert_to_fat_pointer): Un-obfuscate the
6905 conversion from a thin pointer with a shifted value.
6906 * gcc-interface/utils2.c (gnat_build_constructor): Propagate the
6907 read-only flag from the values onto the result.
6908 (gnat_invariant_expr): Accept read-only CONSTRUCTORs.
6909
6910 2014-01-25 Tristan Gingold <gingold@adacore.com>
6911
6912 * gcc-interface/decl.c (gnat_to_gnu_entity): Always build a variable
6913 for E_Variable with a pragma Linker_Section.
6914
6915 2014-01-25 Robert Dewar <dewar@adacore.com>
6916
6917 * gcc-interface/decl.c (gnat_to_gnu_param): Make sure an Out parameter
6918 with Default_Value aspect is passed in by copy.
6919
6920 2014-01-24 Eric Botcazou <ebotcazou@adacore.com>
6921
6922 * set_targ.adb: Set Short_Enums.
6923 * gcc-interface/lang.opt (fshort-enums): New option.
6924 * gcc-interface/misc.c (gnat_handle_option): Handle it.
6925 (gnat_post_options): Do not modify the global settings.
6926
6927 2014-01-24 Robert Dewar <dewar@adacore.com>
6928
6929 * g-rannum.ads, g-rannum.adb (Random_Ordinary_Fixed): New generic
6930 function.
6931 (Random_Decimal_Fixed): New generic function.
6932 * s-rannum.ads: Minor comment clarifications.
6933
6934 2014-01-24 Robert Dewar <dewar@adacore.com>
6935
6936 * back_end.adb: Remove Short_Enums handling (handled in
6937 Ttypes/Get_Targ now) Minor added comments.
6938 * freeze.adb: Change name Short_Enums_On_Target to
6939 Target_Short_Enums.
6940 * get_targ.ads, get_targ.adb (Get_Short_Enums): New function.
6941 * opt.ads: Minor comment updates.
6942 * sem_ch13.adb: Change name Short_Enums_On_Target to
6943 Target_Short_Enums.
6944 * set_targ.adb: Set Short_Enums from gcc back end.
6945 * set_targ.ads (Short_Enums): New variable.
6946 * targparm.ads, targparm.adb: Remove Short_Enums entries (handled in
6947 Ttypes/Get_Targ now).
6948 * ttypes.ads (Target_Short_Enums): New constant boolean switch
6949
6950 2014-01-24 Pascal Obry <obry@adacore.com>
6951
6952 * g-sercom-mingw.adb: Fix serial port name for port number > 10.
6953
6954 2014-01-24 Gary Dismukes <dismukes@adacore.com>
6955
6956 * exp_disp.adb (Expand_Dispatching_Call): Call Unqualify on Param when
6957 comparing it with Ctrl_Arg, since Ctrl_Arg may have had qualification
6958 stripped off.
6959
6960 2014-01-24 Robert Dewar <dewar@adacore.com>
6961
6962 * sinfo.ads, make.adb, prj-env.adb: Minor reformatting.
6963
6964 2014-01-24 Vincent Celier <celier@adacore.com>
6965
6966 * prj.adb (Add_Aggregated_Project): Do not add a project in
6967 the list if it is already there.
6968
6969 2014-01-24 Yannick Moy <moy@adacore.com>
6970
6971 * lib-xref-spark_specific.adb (Enclosing_Subprogram_Or_Package):
6972 Correct the search for a subrogram declaration to which a pragma is
6973 attached.
6974
6975 2014-01-24 Bob Duff <duff@adacore.com>
6976
6977 * gnat_ugn.texi: Document --decimal-grouping and
6978 --based-grouping switches in gnatpp.
6979
6980 2014-01-24 Ed Schonberg <schonberg@adacore.com>
6981
6982 * sinfo.ads: Documentation update.
6983
6984 2014-01-24 Ed Schonberg <schonberg@adacore.com>
6985
6986 * sem_ch3.adb (Constant_Redeclaration): New declaration is
6987 illegal if previous one has an initial expression that is an
6988 aggregate expanded into assignments.
6989
6990 2014-01-24 Ed Schonberg <schonberg@adacore.com>
6991
6992 * sem_ch5.adb (Analyze_Loop_Parameter_Specification): Small
6993 code reorganization to remove spurious warning on a loop with
6994 an array element iterator that has a null range.
6995
6996 2014-01-24 Vincent Celier <celier@adacore.com>
6997
6998 * make.adb (Binding_Phase): When setting the Ada paths, use
6999 the library ALI dir, not the object dir in libraries.
7000
7001 2014-01-24 Yannick Moy <moy@adacore.com>
7002
7003 * sinfo.ads: Add documentation of check flag fields.
7004
7005 2014-01-24 Ed Schonberg <schonberg@adacore.com>
7006
7007 * sem_res.adb (Resolve_Actuals): If an actual is a view
7008 conversion of a discriminated object, and the formal type is
7009 discriminated and constrained, apply a discriminant check to
7010 the object itself.
7011
7012 2014-01-24 Robert Dewar <dewar@adacore.com>
7013
7014 * prj.adb, prj-env.adb, back_end.adb: Add comment, minor code clean ups.
7015
7016 2014-01-24 Ed Schonberg <schonberg@adacore.com>
7017
7018 * sem_ch3.adb (Analyze_Declarations): At the end of an
7019 appropriate declarative part, call Freeze_All from the first
7020 declaration in the scope, not from the first unfrozen one. This
7021 is necessary to apply visibility checks to entities with delayed
7022 aspects. Otherwise, in the presence of instantiations and cleanups
7023 that they may generate, the delayed aspects may be analyzed too
7024 late and produce spurious visibility errors.
7025 * sem_attr.adb: Place etype on range.
7026 * sem_ch6.adb: Documentation expression functions.
7027
7028 2014-01-24 Robert Dewar <dewar@adacore.com>
7029
7030 * exp_ch7.adb: Minor change of Indices to Indexes (preferred
7031 terminology in compiler).
7032
7033 2014-01-24 Robert Dewar <dewar@adacore.com>
7034
7035 * scans.ads: Remove Tok_Raise from Sterm, Eterm, After_SM
7036 categories, now that Ada 95 supports raise expressions.
7037
7038 2014-01-24 Robert Dewar <dewar@adacore.com>
7039
7040 * freeze.adb (Freeze_Enumeration_Type): Use new target parameter
7041 Short_Enums_On_Target.
7042 * sem_ch13.adb (Set_Enum_Esize): Take Short_Enums_On_Target
7043 into account.
7044 * targparm.ads, targparm.adb: Add new target parameter Short_Enums.
7045
7046 2014-01-24 Ed Schonberg <schonberg@adacore.com>
7047
7048 * sem_ch5.adb (Analyze_Iterator_Specification): If subtype
7049 indication is given explicity, check that it matches the array
7050 component type or the container element type of the domain
7051 of iteration.
7052
7053 2014-01-24 Tristan Gingold <gingold@adacore.com>
7054
7055 * back_end.adb (Scan_Compiler_Arguments): Set Short_Enums_On_Target.
7056 * gcc-interface/misc.c (flag_short_enums): Declare.
7057 (gnat_post_options): Set it.
7058
7059 2014-01-24 Vincent Celier <celier@adacore.com>
7060
7061 * prj-env.adb (Ada_Objects_Path): Use Ada_Objects_Path_No_Libs
7062 to cache the result when Including_Libraries is False.
7063 * prj-env.ads (Ada_Objects_Path): Update documentation
7064 * prj.adb (Free (Project_Id)): Also free Ada_Objects_Path_No_Libs
7065 (Get_Object_Directory): Return the Library_Ali_Dir only when
7066 when Including_Libraries is True.
7067 * prj.ads (Get_Object_Directory): Fix and complete documentation
7068 (Project_Data): New component Ada_Objects_Path_No_Libs
7069
7070 2014-01-24 Robert Dewar <dewar@adacore.com>
7071
7072 * checks.adb (Expr_Known_Valid): Result of fpt operator never
7073 considered valid.
7074
7075 2014-01-24 Eric Botcazou <ebotcazou@adacore.com>
7076
7077 * back_end.adb: Minor fix in comment.
7078
7079 2014-01-24 Javier Miranda <miranda@adacore.com>
7080
7081 * sem_ch3.adb (Check_Abstract_Overriding): Code reestructuration
7082 required to report the error in case of task types.
7083
7084 2014-01-24 Ed Schonberg <schonberg@adacore.com>
7085
7086 * sem_attr.adb: Additional index checking.
7087
7088 2014-01-24 Ed Schonberg <schonberg@adacore.com>
7089
7090 * sem_attr.adb (Analyze_Attribute, case 'Update): Analyze
7091 expressions in each component association, and for records note
7092 the entity in each association choice, for subsequent resolution.
7093 (Resolve_Attribute, case 'Update): Complete resolution of
7094 expressions in each component association.
7095
7096 2014-01-24 Robert Dewar <dewar@adacore.com>
7097
7098 * sem.adb (Sem): Avoid premature reference to Current_Sem_Unit
7099 (this was causing Is_Main_Unit_Or_Main_Unit_Spec to be set wrong,
7100 leading to wrong handling of SPARK_Mode for library units).
7101
7102 2014-01-24 Robert Dewar <dewar@adacore.com>
7103
7104 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Set SPARK_Mode
7105 on generic instances (do not consider them to be internally
7106 generated)
7107
7108 2014-01-24 Doug Rupp <rupp@adacore.com>
7109
7110 * s-osinte-android.ads (pthread_sigmask): Import sigprocmask
7111 vice pthread_sigmask.
7112
7113 2014-01-24 Vincent Celier <celier@adacore.com>
7114
7115 * prj.adb (Debug_Output (Str, Str2)): Output if verbosity is
7116 not default.
7117
7118 2014-01-24 Vincent Celier <celier@adacore.com>
7119
7120 * prj-ext.adb (Add): Do not output anything when Silent is True,
7121 whatever the verbosity. When Source is From_External_Attribute,
7122 set the corresponding environment variable if it is not already set.
7123 * prj-ext.ads (Add): New Boolean parameter Silent, defaulted
7124 to False
7125 * prj-proc.adb (Process_Expression_For_Associative_Array):
7126 For attribute External, call Prj.Ext.Add with Silent set to
7127 True for the child environment, to avoid useless output in non
7128 default verbosity.
7129
7130 2014-01-24 Ed Schonberg <schonberg@adacore.com>
7131
7132 * sem_res.adb (Set_Slice_Subtype): Handle properly a discrete
7133 range given by a subtype indication, and force evaluation of
7134 the bounds, as for a simple range.
7135 * exp_util.adb (Evaluate_Slice_Bounds): Utility to force evaluation
7136 of bounds of slice for various kinds of discrete ranges.
7137 (Evaluate_Name, Evaluate_Subtype_From_Expr): use
7138 Evaluate_Slice_Bounds.
7139
7140 2014-01-24 Bob Duff <duff@adacore.com>
7141
7142 * s-taskin.ads (Activator): Make this Atomic, because
7143 Activation_Is_Complete reads it, and that can be called
7144 from any task. Previously, this component was only
7145 modified by the activator before activation, and by
7146 Self after activation.
7147 * a-taside.ads, a-taside.adb (Environment_Task,
7148 Activation_Is_Complete): Implement these missing functions.
7149
7150 2014-01-24 Doug Rupp <rupp@adacore.com>
7151
7152 * init.c: Add a handler section for Android.
7153
7154 2014-01-24 Arnaud Charlet <charlet@adacore.com>
7155
7156 * i-cexten.ads (Unsigned_33..64, Unsigned_33..64): New types.
7157
7158 2014-01-24 Ed Schonberg <schonberg@adacore.com>
7159
7160 * sem_ch4.adb (Operator_Check): If one operand is a
7161 Raise_Expression, set its type to that of the other operand.
7162 * sem_res.adb (Resolve_Raise_Expression): new procedure.
7163 (Resolve_Actuals): For an actual that is a Raise_Expression,
7164 set the type to that of the formal.
7165 * sem_type.adb (Find_Unique_Type): If one of the operands is a
7166 Raise_Expression, return type of the other operand.
7167
7168 2014-01-24 Ed Schonberg <schonberg@adacore.com>
7169
7170 * sem_aggr.adb (Resolve_Record_Aggregate): If a scalar
7171 component of the record has a type with a default aspect, and
7172 the corresponding aggregate component is initiaized with a box,
7173 use the default value in the rewritten aggregate.
7174
7175 2014-01-24 Tristan Gingold <gingold@adacore.com>
7176
7177 * s-interr.ads, s-interr.adb, s-interr-hwint.adb, s-interr-vms.adb,
7178 s-interr-sigaction.adb,
7179 s-interr-dummy.adb (Install_Restricted_Handlers): Add Prio parameter.
7180 * exp_ch9.adb (Make_Initialize_Protection): Add Prio parameter
7181 to the call to Install_Restricted_Handlers.
7182
7183 2014-01-24 Emmanuel Briot <briot@adacore.com>
7184
7185 * prj-nmsc.adb (Check_File): Add protection when the source is
7186 not fully initialized.
7187
7188 2014-01-24 Ed Schonberg <schonberg@adacore.com>
7189
7190 * sem_util.adb (Is_Post_State): In a postcondition, a selected
7191 component that denotes an implicit dereference is a reference
7192 to the post state of the subprogram.
7193
7194 2014-01-24 Robert Dewar <dewar@adacore.com>
7195
7196 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): SPARK_Mode OFF
7197 for generated subprograms.
7198 (Analyze_Subprogram_Specification): Ditto.
7199
7200 2014-01-24 Vincent Celier <celier@adacore.com>
7201
7202 * prj-dect.adb (Check_Attribute_Allowed): Detect more forbidden
7203 attributes in package Builder of aggregate and aggregate library
7204 projects.
7205 * prj-nmsc.adb (Process_Naming_Scheme.Check.Check_Aggregate):
7206 Remove procedure (Process_Naming_Scheme.Check.Check_Aggregated):
7207 Remove parameters. Change error message from "... externally
7208 build library ..." to "... externally built project ...".
7209 (Process_Naming_Scheme.Check): Do not do any check in aggregate
7210 project, as attribute Library_Dir and Library_Name have already
7211 been detected as forbidden.
7212
7213 2014-01-24 Vincent Celier <celier@adacore.com>
7214
7215 * prj-env.adb (Find_Project): If cached project path is not in
7216 project directory, look in current directory first and use cached
7217 project path only if project is not found in project directory.
7218
7219 2014-01-24 Robert Dewar <dewar@adacore.com>
7220
7221 * sem_util.adb, lib-xref.adb: Correct false positive warnings.
7222
7223 2014-01-24 Vincent Celier <celier@adacore.com>
7224
7225 * projects.texi: Document that aggregate projects are only
7226 supported by gprbuild, but not by gnatmake. Document that the
7227 only attribute Switches in package Binder of aggregate projects
7228 will be ignored if its index is not others. Document that
7229 attribute Global_Config_File is allowed in package Binder of
7230 aggregate projects.
7231
7232 2014-01-24 Robert Dewar <dewar@adacore.com>
7233
7234 * sem_prag.adb: Minor code reorganization.
7235 * sem_util.adb: Minor fix of potential latent bug in Is_LHS.
7236
7237 2014-01-24 Pascal Obry <obry@adacore.com>
7238
7239 * prj-attr.adb, projects.texi, snames.ads-tmpl: Add Excluded_Patterns
7240 attribute definition.
7241
7242 2014-01-24 Vincent Celier <celier@adacore.com>
7243
7244 * makeutl.adb (Queue.Insert_No_Roots): In gprbuild, do not put
7245 in the Queue the same source (same path, same multi-source index)
7246 from the same project file, to avoid compiling several times
7247 the same source.
7248
7249 2014-01-24 Eric Botcazou <ebotcazou@adacore.com>
7250
7251 * einfo.ads (First_Rep_Item): Remove obsolete stuff.
7252 (Has_Gigi_Rep_Item): Likewise.
7253 * sem_prag.adb (Analyze_Pragma) <Pragma_Linker_Section>: Do not set
7254 Has_Gigi_Rep_Item for objects.
7255 * gcc-interface/decl.c (prepend_one_attribute_to): Rename into...
7256 (prepend_one_attribute): ...this.
7257 (prepend_one_attribute_pragma): New function extracted from...
7258 (prepend_attributes): ...here. Swap the parameters for consistency.
7259 (gnat_to_gnu_entity): Adjust calls to prepend_one_attribute_to and to
7260 prepend_attributes.
7261 <object>: Deal with a pragma Linker_Section on a constant
7262 or variable. <E_Function>: Deal with a pragma Linker_Section
7263 on a subprogram.
7264 (get_minimal_subprog_decl): Adjust calls to prepend_one_attribute_to.
7265
7266 2014-01-24 Vincent Celier <celier@adacore.com>
7267
7268 * opt.ads: Minor comment update.
7269
7270 2014-01-24 Robert Dewar <dewar@adacore.com>
7271
7272 * sem_prag.adb (Analyze_Input_Output): Add missing error check
7273 for junk operand.
7274 * sem_util.adb (Is_Refined_State): Add defense against junk
7275 tree from error.
7276
7277 2014-01-24 Pascal Obry <obry@adacore.com>
7278
7279 * projects.texi: Removes Build_Slaves attribute documentation.
7280
7281 2014-01-23 Robert Dewar <dewar@adacore.com>
7282
7283 * opt.adb (Register_Opt_Config_Switches): Save SPARK_Mode_Pragma
7284 setting.
7285
7286 2014-01-23 Ed Schonberg <schonberg@adacore.com>
7287
7288 * sem_util.adb (Is_Potentially_Unevaluated): Predicate only
7289 applies to expressions that come from source.
7290 * sem_attr.adb (Analyze_Attribute, case 'Old): Improve error
7291 message.
7292 (Analyze_Attribute, case 'Loop_Entry): Apply SPARK 2014 legality
7293 rule regarding potentially unevaluated expressions, to prefix
7294 of attribute.
7295
7296 2014-01-23 Ed Schonberg <schonberg@adacore.com>
7297
7298 * exp_util.adb (Make_Invqriant_Call): If type of expression is
7299 a private extension, get invariant from base type.
7300
7301 2014-01-23 Robert Dewar <dewar@adacore.com>
7302
7303 * sem_util.adb, sem_attr.adb: Minor reformatting.
7304
7305 2014-01-23 Robert Dewar <dewar@adacore.com>
7306
7307 * opt.adb (Save_Opt_Config_Switches): Save SPARK_Mode_Pragma
7308 (Restore_Opt_Config_Switches): Restore SPARK_Mode_Pragma.
7309 * sem.adb (Semantics): Remove save/restore of
7310 SPARK_Mode[_Pragma]. Not needed since already done in
7311 Save/Restore_Opt_Config_Switches.
7312
7313 2014-01-23 Robert Dewar <dewar@adacore.com>
7314
7315 * gnat_rm.texi, einfo.adb, einfo.ads, sem_prag.adb, gnat_ugn.texi,
7316 freeze.adb, repinfo.adb, aspects.adb, aspects.ads, sem_ch13.adb:
7317 Linker_Section enhancements.
7318
7319 2014-01-23 Tristan Gingold <gingold@adacore.com>
7320
7321 * gnat_rm.texi: Minor editing.
7322
7323 2014-01-23 Robert Dewar <dewar@adacore.com>
7324
7325 * opt.adb (Set_Opt_Config_Switches): Reset SPARK mode for
7326 with'ed internal units.
7327 * sem.adb (Semantics): Save and restore SPARK_Mode[_Pragma].
7328
7329 2014-01-23 Javier Miranda <miranda@adacore.com>
7330
7331 * lib-xref.adb (Generate_Reference): As part of processing the
7332 "end-of-spec" reference generate an extra reference to the first
7333 private entity of the package.
7334 * xr_tabls.adb (Add_Reference): No action needed for the extra
7335 'E' reference associated; similar to the processing of the
7336 'e' reference.
7337
7338 2014-01-23 Bob Duff <duff@adacore.com>
7339
7340 * gnat_ugn.texi: Change "--&pp off" to "--!pp off".
7341
7342 2014-01-23 Ed Schonberg <schonberg@adacore.com>
7343
7344 * sem_util.ads, sem_util.adb (Is_Potentially_Unevaluated): new
7345 predicate to implement rule given in 6.1.1 (20/3).
7346 * sem_attr.adb (Analyze_Attribute, case 'Old): Reject prefix of
7347 'Old in a postcondition, if it is potentially unevaluated and
7348 it is not an entity name.
7349
7350 2014-01-23 Bob Duff <duff@adacore.com>
7351
7352 * gnat_ugn.texi: Document the new "--&pp off" feature of gnatpp.
7353
7354 2014-01-23 Robert Dewar <dewar@adacore.com>
7355
7356 * gnatlink.adb (Gnatlink): Fix problem of generating bad name
7357 msg on VMS.
7358
7359 2014-01-23 Bob Duff <duff@adacore.com>
7360
7361 * g-dynhta.ads: Minor comment fix.
7362
7363 2014-01-23 Yannick Moy <moy@adacore.com>
7364
7365 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Inherit SPARK_Mode
7366 from spec on body only when not already inherited on spec. Set
7367 SPARK_Mode from context on body without previous spec. *
7368 * sem_prag.adb (Analyze_Pragma): Check placement of pragma on
7369 library-level entities. Correct retrieval of entity from
7370 declaration, for cases where the declaration is not a unit.
7371 * sem_ch12.adb (Instantiate_Object): Avoid
7372 calling Is_Volatile_Object on an empty node.
7373
7374 2014-01-23 Robert Dewar <dewar@adacore.com>
7375
7376 * gnatlink.adb (Gnatlink): Check for suspicious executable file
7377 names on windows.
7378
7379 2014-01-23 Robert Dewar <dewar@adacore.com>
7380
7381 * a-ngelfu.ads: Remove bad uses of AND which should be AND THEN.
7382 * sem_res.adb (Check_No_Direct_Boolean_Operators): Don't give
7383 style errors in instances.
7384 * g-dynhta.ads (Static_HTable): Comment updates.
7385
7386 2014-01-23 Vincent Celier <celier@adacore.com>
7387
7388 * prj-conf.adb (Get_Or_Create_Configuration_File): Do not attempt
7389 to find a configuration project file when Config_File_Name is
7390 No_Configuration_File.
7391 * prj-conf.ads (No_Configuration_File): New constant String.
7392 * prj-pars.adb (Parse): Call Get_Or_Create_Configuration_File
7393 with Config_File_Name set to No_Configuration_File, so that
7394 no existing configuration project file will be used, and the
7395 configuration project will be only created in memory when
7396 Add_Default_GNAT_Naming_Scheme is called.
7397 * projects.texi: Minor reformatting.
7398
7399 2014-01-23 Vincent Celier <celier@adacore.com>
7400
7401 * prj-conf.adb (Get_Or_Create_Configuration_File): Never parse
7402 a config project file if On_Load_Config is not null.
7403 * prj-pars.adb: Minor comment changes.
7404
7405 2014-01-23 Ed Schonberg <schonberg@adacore.com>
7406
7407 * lib-xref.adb (Output_References): Output progenitors of
7408 synchronized tagged types, for source navigation.
7409
7410 2014-01-23 Robert Dewar <dewar@adacore.com>
7411
7412 * exp_util.adb, sinfo.adb, sinfo.ads, sem.adb, sem_res.adb,
7413 expander.adb, exp_ch11.adb, exp_ch11.ads, sem_ch11.adb, sem_ch11.ads,
7414 sprint.adb, sprint.ads: Remove unused node N_Subprogram_Info.
7415
7416 2014-01-23 Emmanuel Briot <briot@adacore.com>
7417
7418 * prj-conf.adb (Get_Or_Create_Configuration_File): call
7419 On_Load_Config later.
7420
7421 2014-01-23 Hristian Kirtchev <kirtchev@adacore.com>
7422
7423 * sem_ch3.adb (Analyze_Declarations): Do not
7424 generate the spec of the late primitive in ASIS mode. Add two
7425 comments to explain the special cases when the expansion is
7426 not performed.
7427
7428 2014-01-23 Robert Dewar <dewar@adacore.com>
7429
7430 * sem_util.adb (Note_Possible_Modification): Fix error of
7431 misbehaving for implicit dereference cases in -gnatc mode.
7432
7433 2014-01-23 Emmanuel Briot <briot@adacore.com>
7434
7435 * prj-pars.adb: Minor reformatting.
7436
7437 2014-01-22 Ed Schonberg <schonberg@adacore.com>
7438
7439 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): A subprogram
7440 body generated for an expression function within a protected body
7441 needs a set of renaming declarations if the expression function
7442 comes from source.
7443
7444 2014-01-22 Ed Schonberg <schonberg@adacore.com>
7445
7446 * lib-xref.adb (Get_Type_Reference): In semantics-only mode,
7447 list interface progenitor of a tagged concurrent type, for better
7448 source navigation.
7449
7450 2014-01-22 Robert Dewar <dewar@adacore.com>
7451
7452 * lib.adb (In_Extended_Main_Code_Unit): Return False for
7453 Standard_Location.
7454 (In_Extended_Main_Source_Unit): Return False for Standard_Location.
7455 * lib.ads (In_Extended_Main_Code_Unit): Add documentation on
7456 treatment of Slocs No_Location and Standard_Location.
7457 * restrict.adb (Check_Restriction_No_Dependence): Explicitly
7458 check for entity with Standard_Location Sloc, rather than relying
7459 on Lib routines to do that.
7460 * sem_res.adb (Resolve_Call): Implement SPARK_05 restriction
7461 that a call cannot occur before a later occuring body within
7462 the same unit.
7463
7464 2014-01-22 Thomas Quinot <quinot@adacore.com>
7465
7466 * rtsfind.adb: Update comment.
7467
7468 2014-01-22 Hristian Kirtchev <kirtchev@adacore.com>
7469
7470 * sem_aux.ads, sem_aux.adb (Is_Body): New routine.
7471 * sem_ch3.adb (Analyze_Declarations): Add local variable
7472 Body_Seen. Generate the spec of a late controlled
7473 primitive body that is about to freeze its related type.
7474 (Handle_Late_Controlled_Primitive): New routine.
7475
7476 2014-01-22 Robert Dewar <dewar@adacore.com>
7477
7478 * a-stream.adb: Minor reformatting.
7479
7480 2014-01-22 Ed Schonberg <schonberg@adacore.com>
7481
7482 * sem_ch8.adb (From_Actual_Package): Introduce a recursive
7483 sub-procedure Declared_In_Actual to handle properly the visibility
7484 of actuals in actual packages, that are themselves actuals to a
7485 actual package of the current instance. This mimics properly the
7486 visibility of formals of formal packages declared with a box,
7487 within the corresponding generic unit.
7488
7489 2014-01-22 Robert Dewar <dewar@adacore.com>
7490
7491 * checks.adb: Do not assume that a volatile variable is valid.
7492
7493 2014-01-22 Thomas Quinot <quinot@adacore.com>
7494
7495 * g-catiio.ads (Image, Value): Clarify that these functions
7496 operate in the local time zone. Minor documentation update.
7497
7498 2014-01-22 Thomas Quinot <quinot@adacore.com>
7499
7500 * csets.adb, csets.ads, opt.ads: Minor documentation fixes.
7501
7502 2014-01-22 Robert Dewar <dewar@adacore.com>
7503
7504 * sem_aux.adb, sem_aux.ads, sem_ch3.adb (Has_Unconstrained_Elements):
7505 Moved to sem_aux.adb.
7506
7507 2014-01-22 Robert Dewar <dewar@adacore.com>
7508
7509 * vms_data.ads: Minor reformatting.
7510
7511 2014-01-22 Robert Dewar <dewar@adacore.com>
7512
7513 * debug.adb: Document messages affected by -gnatd.E including
7514 the new ones that relate to late definition of equality.
7515 * sem_ch6.adb (Check_Untagged_Equality): In Ada 2012 mode, if
7516 debug flag -gnatd.E is set, then generate warnings rather than
7517 errors.
7518 (Check_Untagged_Equality): In earlier versions of Ada,
7519 generate warnings if Warn_On_Ada_2012_Incompatibility flag is set.
7520
7521 2014-01-22 Robert Dewar <dewar@adacore.com>
7522
7523 * sem_prag.adb (Usage_Error): Output additional messages for
7524 unconstrained OUT parameters lacking an input dependency.
7525
7526 2014-01-22 Robert Dewar <dewar@adacore.com>
7527
7528 * sem_ch4.adb: Minor reformatting.
7529
7530 2014-01-22 Robert Dewar <dewar@adacore.com>
7531
7532 * restrict.ads: Minor reformatting.
7533 * sem_res.adb (Resolve_Call): Check for SPARK_05 restriction that
7534 forbids a call from within a subprogram to the same subprogram.
7535
7536 2014-01-22 Thomas Quinot <quinot@adacore.com>
7537
7538 * a-stream.ads (Read_SEA, Write_SEA): New subprograms, optimized
7539 stream attributes for Stream_Element_Array.
7540 * a-stream.adb (Read_SEA, Write_SEA): Bodies for the above.
7541 * rtsfind.adb (Check_CRT): Do not reject a reference to an entity
7542 defined in the current scope.
7543
7544 2014-01-22 Robert Dewar <dewar@adacore.com>
7545
7546 * debug.adb, exp_ch4.adb, erroutc.adb: Minor reformatting.
7547
7548 2014-01-22 Thomas Quinot <quinot@adacore.com>
7549
7550 * sem_ch7.adb, sem_ch8.adb, exp_ch3.adb: Minor reformatting.
7551
7552 2014-01-22 Thomas Quinot <quinot@adacore.com>
7553
7554 * sem_ch3.adb (Analyze_Object_Declaration): For a constant
7555 declaration initialized with a function call, whose type
7556 has variable size, need to remove side effects so that the
7557 initialization expression becomes a dereference of a temporary
7558 reference to the function result.
7559
7560 2014-01-22 Yannick Moy <moy@adacore.com>
7561
7562 * errout.adb (Initialize): Remove trick to add dummy entry
7563 in Warnings table.
7564 * erroutc.adb (Set_Warnings_Mode_Off,
7565 Set_Warnings_Mode_On): Do nothing if warnings are suppressed by
7566 command line switch.
7567 * opt.ads (Warning_Mode): Document behavior
7568 wrt pragma Warnings, in normal mode and in GNATprove_Mode.
7569
7570 2014-01-22 Robert Dewar <dewar@adacore.com>
7571
7572 * sem_ch3.adb, errout.adb, erroutc.adb: Minor reformatting.
7573
7574 2014-01-22 Robert Dewar <dewar@adacore.com>
7575
7576 * sem_ch13.adb (Check_Pool_Size_Clash): New procedure
7577 (Analyze_Attribute_Definition_Clause, case Storage_Pool): call
7578 Check_Pool_Size_Clash (Analyze_Attribute_Definition_Clause,
7579 case Storage_Size): call Check_Pool_Size_Clash.
7580
7581 2014-01-22 Robert Dewar <dewar@adacore.com>
7582
7583 * sem_ch3.adb, exp_util.adb, sem_dim.adb, sem_elab.adb, sem_ch8.adb,
7584 sem_eval.ads: Minor reformatting.
7585
7586 2014-01-22 Thomas Quinot <quinot@adacore.com>
7587
7588 * sem_eval.adb (Compile_Time_Known_Bounds): Return False for
7589 Any_Composite to prevent cascaded errors.
7590
7591 2014-01-22 Yannick Moy <moy@adacore.com>
7592
7593 * errout.adb (Initialize): Do not insert special entry in Warnings
7594 table in GNATprove_Mode.
7595 * erroutc.adb (Set_Warnings_Mode_On): Add info in Warnings table in
7596 GNATprove_Mode.
7597 * gnat1drv.adb (Adjust_Global_Switches): Do not suppress frontend
7598 warnings anymore.
7599
7600 2014-01-22 Robert Dewar <dewar@adacore.com>
7601
7602 * sem_prag.adb (Analyze_Initializes_In_Decl_Part): Handle null
7603 initializes case.
7604
7605 2014-01-22 Robert Dewar <dewar@adacore.com>
7606
7607 * snames.ads-tmpl: Update header.
7608
7609 2014-01-22 Thomas Quinot <quinot@adacore.com>
7610
7611 * exp_util.adb (Insert_Actions): When inserting actions on a
7612 short circuit operator that has already been analyzed, do not park
7613 actions in node; instead introduce an N_Expression_With_Actions
7614 and insert actions immediately.
7615 Add guard for unexpected case of climbing up through statement
7616 in Actions list of an N_Expression_With_Actions.
7617 * sem_elab.adb (Insert_Elab_Check): Remove complex
7618 specialized circuitry for the case where the context is already
7619 analyzed, as it is not needed and introduces irregularities in
7620 finalization. Instead rely on the above change to Insert_Actions
7621 to ensure that late insertion on short circuit operators works
7622 as expected.
7623
7624 2014-01-22 Ed Schonberg <schonberg@adacore.com>
7625
7626 * sem_ch4.adb (Operator_Check): Improve error message when an
7627 operand of concatenation is an access type.
7628
7629 2014-01-22 Thomas Quinot <quinot@adacore.com>
7630
7631 * sem_dim.adb (Analyze_Dimension_Identifier): Add guard against
7632 cascaded error.
7633
7634 2014-01-22 Ed Schonberg <schonberg@adacore.com>
7635
7636 * sem_ch8.adb (Find_Selected_Component): Handle properly the case
7637 of an expanded name in a proper body, whose prefix is a package
7638 in the context of the proper body, when there is a homonym of
7639 the package declared in the parent unit.
7640
7641 2014-01-22 Robert Dewar <dewar@adacore.com>
7642
7643 * sem_warn.adb (Check_Use_Clause): Don't give no entities used
7644 msg if errors found.
7645 (Check_One_Unit): Same change.
7646
7647 2014-01-22 Robert Dewar <dewar@adacore.com>
7648
7649 * ug_words: Add missing/wrong entries for VMS warning switches.
7650 * sem_prag.adb (Check_Duplicate_Pragma): Avoid flagging parent type.
7651
7652 2014-01-22 Jerome Guitton <guitton@adacore.com>
7653
7654 * mlib-tgt-specific-vxworks.adb (Get_Target_Suffix): Replace xscale by
7655 arm.
7656
7657 2014-01-22 Robert Dewar <dewar@adacore.com>
7658
7659 * gnat_rm.texi, gnat_ugn.texi: Document passive task optimization
7660
7661 2014-01-22 Eric Botcazou <ebotcazou@adacore.com>
7662
7663 * gcc-interface/Makefile.in: Minor fixes.
7664
7665 2014-01-21 Robert Dewar <dewar@adacore.com>
7666
7667 * par-ch4.adb (P_If_Expression): Rewritten to improve error recovery.
7668 * par-ch5.adb (P_Condition): New version with expression prescanned.
7669 * par.adb (P_Condition): New version with expression prescanned.
7670
7671 2014-01-21 Robert Dewar <dewar@adacore.com>
7672
7673 * gnat_rm.texi: Document that Allow_Integer_Address is ignored
7674 if Address is not a private type.
7675 * sem_prag.adb (Analyze_Pragma, case Allow_Integer_Address):
7676 Ignore pragma if System.Address is not a private type.
7677
7678 2014-01-21 Arnaud Charlet <charlet@adacore.com>
7679
7680 * namet.ads (Name_Len): Initialize to 0 to avoid accessing an
7681 uninitialized value.
7682
7683 2014-01-21 Thomas Quinot <quinot@adacore.com>
7684
7685 * gnat_rm.texi (Scalar_Storage_Order): Update documentation.
7686
7687 2014-01-21 Ed Schonberg <schonberg@adacore.com>
7688
7689 * sem_ch12.adb (Set_Instance_Env): In Ada 2012 mode, preserve
7690 the value of Assertions_Enabled flag when compiling an instance of
7691 an internal unit. This facilitates the use of pre/postconditions
7692 in generic internal units, such as the new elementary function
7693 libraries.
7694
7695 2014-01-21 Robert Dewar <dewar@adacore.com>
7696
7697 * exp_aggr.adb: Minor reformatting.
7698 * sem_attr.adb: Minor reformatting.
7699 * sem_res.adb: Minor comment addition.
7700 * einfo.adb: Minor comment updates.
7701 * freeze.adb: Minor reformatting and code reorganization.
7702
7703 2014-01-21 Ed Schonberg <schonberg@adacore.com>
7704
7705 * par-ch4.adb (P_If_Expression): Handle more gracefully an
7706 elsif clause that does not have an else part.
7707
7708 2014-01-21 Robert Dewar <dewar@adacore.com>
7709
7710 * checks.adb, sem_util.ads, sem_ch4.adb: Minor reformatting.
7711 * gcc-interface/Makefile.in: clean up target pairs.
7712
7713 2014-01-21 Pascal Obry <obry@adacore.com>
7714
7715 * projects.texi: Minor typo fix.
7716
7717 2014-01-21 Thomas Quinot <quinot@adacore.com>
7718
7719 * freeze.adb (Check_Component_Storage_Order): If a record type
7720 has an explicit Scalar_Storage_Order attribute definition clause,
7721 reject any component that itself is of a composite type and does
7722 not have one.
7723
7724 2014-01-21 Ed Schonberg <schonberg@adacore.com>
7725
7726 * sem_ch10.adb (Generate_Parent_Reference): Make public so it
7727 can be used to generate proper cross-reference information for
7728 the parent units of proper bodies.
7729
7730 2014-01-21 Thomas Quinot <quinot@adacore.com>
7731
7732 * exp_pakd.adb (Expand_Packed_Element_Set,
7733 Expand_Packed_Element_Reference): No byte swapping required in
7734 the front-end for the case of a reverse storage order array,
7735 as this is now handled uniformly in the back-end. However we
7736 still need to swap back an extracted element if it is itself a
7737 nested composite with reverse storage order.
7738
7739 2014-01-21 Hristian Kirtchev <kirtchev@adacore.com>
7740
7741 * sem_prag.adb (Analyze_External_Property): Add processing for "others".
7742 (Analyze_Pragma): Update the grammar of pragma Abstract_State to
7743 include "others".
7744
7745 2014-01-21 Arnaud Charlet <charlet@adacore.com>
7746
7747 * gnat_ugn.texi: Minor updates.
7748
7749 2014-01-21 Thomas Quinot <quinot@adacore.com>
7750
7751 * exp_pakd.adb: Update comment, minor reformatting.
7752
7753 2014-01-21 Hristian Kirtchev <kirtchev@adacore.com>
7754
7755 * sem_ch3.adb (Analyze_Variable_Contract): Trigger the volatile
7756 object check when SPARK_Mode is on.
7757 * sem_ch6.adb (Process_Formals): Trigger the volatile object
7758 check when SPARK_Mode is on.
7759 * sem_ch12.adb (Instantiate_Object): Trigger the volatile object
7760 check when SPARK_Mode is on.
7761 * sem_ch13.adb (Analyze_Aspect_Specifications): Insert the
7762 corresponding pragma of aspect SPARK_Mode in the visible
7763 declarations of a package declaration.
7764 * sem_prag.adb (Analyze_Pragma): Trigger the volatile object
7765 check when SPARK_Mode is on.
7766 * sem_res.adb (Resolve_Actuals): Trigger the volatile object
7767 check when SPARK_Mode is on.
7768 (Resolve_Entity_Name): Trigger
7769 the volatile object check when SPARK_Mode is on.
7770
7771 2014-01-21 Robert Dewar <dewar@adacore.com>
7772
7773 * sem_ch3.adb, sem_prag.adb, sem_prag.ads, sem_ch12.adb, sem_res.adb,
7774 sem_ch6.adb, a-except-2005.adb: Minor reformatting.
7775
7776 2014-01-21 Ed Schonberg <schonberg@adacore.com>
7777
7778 * exp_ch3.adb (Expand_N_Object_Declaration): When a class-wide
7779 object is declared, it is rewritten as a renaming of an dynamic
7780 expression that wraps the initial value. The renaming declaration
7781 is first given an internal name, to prevent collisions with the
7782 entity already declared, and then the name is modified to reflect
7783 the original one. the modification of the name must preserve
7784 the source location of the original, to prevent spurious errors
7785 when compiling with style checks if the declaration involves
7786 more than one entity.
7787
7788 2014-01-21 Hristian Kirtchev <kirtchev@adacore.com>
7789
7790 * aspects.adb Add entries for Async_Readers, Async_Writers,
7791 Effective_Reads and Effective_Writes in table Canonical_Aspect.
7792 * aspects.ads Add entries for Async_Readers, Async_Writers,
7793 Effective_Reads and Effective_Writes in tables Aspect_Id,
7794 Aspect_Names, Aspect_Delay and Implementation_Defined_Aspect.
7795 * atree.adb (Ekind_In): New version with 8 parameters.
7796 (Node34): New routine.
7797 (Set_Node34): New routine.
7798 * atree.ads (Ekind_In): New version with 8 parameters.
7799 (Node34): New routine.
7800 (Set_Node34): New routine.
7801 * einfo.adb Contract is now Node34.
7802 (Contract): Update the assertion and node usage.
7803 (Get_Pragma): Include pragmas Async_Readers, Async_Writers,
7804 Effective_Reads and Effective_Writes.
7805 (Set_Contract): Update the assertion and node usage.
7806 (Write_Field24_Name): Remove the output for a contract.
7807 (Write_Field34_Name): Add output for a contract.
7808 * einfo.ads Contract is now Node34. Update the comment on
7809 attribute usage and related node structures.
7810 (Get_Pragma): Update the comment on usage.
7811 * par-prag.adb (Prag): Pragmas Async_Readers, Async_Writers,
7812 Effective_Reads and Effective_Writes do not require special
7813 processing by the parser.
7814 * sem_ch3.adb (Analyze_Variable_Contract): New routine.
7815 (Analyze_Declarations): Analyze the contract of a variable at
7816 the end of the declarative region.
7817 (Analyze_Object_Declaration): Create a contract for a variable.
7818 * sem_ch6.adb (Analyze_Subprogram_Contract): Update the retrieval
7819 of classification pragmas.
7820 (Process_Formals): Detect an illegal
7821 use of a volatile object as a formal in a function.
7822 * sem_ch12.adb (Instantiate_Object): Detect an illegal use of
7823 a volatile object as an actual in generic instantiation.
7824 * sem_prag.adb Add entries for Async_Readers, Async_Writers,
7825 Effective_Reads and Effective_Writes in table Sig_Flags.
7826 (Analyze_External_State_In_Decl_Part): New routine.
7827 (Analyze_Global_Item): Detect an illegal use of a volatile object
7828 as a global item of a function.
7829 (Analyze_Pragma): Reimplement
7830 pragma Abstract_State. Add support for pragmas Async_Readers,
7831 Async_Writers, Effective_Reads and Effective_Writes.
7832 (Check_External_Properties): New routine.
7833 * sem_prag.ads (Analyze_External_State_In_Decl_Part): New routine.
7834 (Check_External_Properties): New routine.
7835 * sem_res.adb (Resolve_Actuals): Detect an illegal use of a
7836 volatile object as an actual in a call.
7837 (Resolve_Entity_Name):
7838 Add local variables Par, Prev and Usage_OK. Detect illegal
7839 contexts of volatile objects.
7840 * sem_util.adb (Add_Contract_Item): Add support for
7841 pragmas associated with the contract of a variable.
7842 (Async_Readers_Enabled): New routine.
7843 (Async_Writers_Enabled): New routine.
7844 (Effective_Reads_Enabled): New routine.
7845 (Effective_Writes_Enabled): New routine.
7846 (Has_Enabled_Property):
7847 New routine.
7848 (Is_Unchecked_Conversion_Instance): New routine.
7849 (Is_Volatile_Object): Add support for entities that may denote
7850 a volatile object.
7851 * sem_util.ads (Add_Contract_Item): Update the
7852 comment on usage.
7853 (Async_Readers_Enabled): New routine.
7854 (Async_Writers_Enabled): New routine.
7855 (Effective_Reads_Enabled): New routine.
7856 (Effective_Writes_Enabled): New routine.
7857 (Is_Unchecked_Conversion_Instance): New routine.
7858 * sinfo.ads Update the comment on the structure of N_Contract.
7859 * snames.ads-tmpl Add predefined names for Async_Readers,
7860 Async_Writers, Effective_Reads and Effective_Writes. Add
7861 pragma ids for Async_Readers, Async_Writers, Effective_Reads
7862 and Effective_Writes.
7863
7864 2014-01-21 Robert Dewar <dewar@adacore.com>
7865
7866 * exp_ch4.adb (Eval_Op_Expon): Use CRT_Safe_Compile_Time_Known_Value
7867 * sem_eval.adb (Compile_Time_Known_Value): Remove special
7868 handling of CRT mode (CRT_Safe_Compile_Time_Known_Value): New
7869 function (Eval_Op_Expon): Add CRT_Safe in call to Test_Foldable
7870 (Test_Foldable): Add CRT_Safe parameter
7871 * sem_eval.ads (Compile_Time_Known_Value): Remove special
7872 handling of CRT mode.
7873 (CRT_Safe_Compile_Time_Known_Value): New function.
7874
7875 2014-01-21 Robert Dewar <dewar@adacore.com>
7876
7877 * sem_prag.adb (Analyze_Pragma, case SPARK_Mode): Fix problem
7878 with pragma or aspect that applies to package spec or subprogram
7879 spec.
7880
7881 2014-01-21 Robert Dewar <dewar@adacore.com>
7882
7883 * exp_aggr.adb: Minor reformatting.
7884
7885 2014-01-21 Johannes Kanig <kanig@adacore.com>
7886
7887 * gnat1drv.adb (Gnat1drv) remove obsolete reference to -gnatd.H.
7888
7889 2014-01-21 Bob Duff <duff@adacore.com>
7890
7891 * gnat_ugn.texi: Document the "checks" attribute in gnat2xml.
7892
7893 2014-01-21 Steve Baird <baird@adacore.com>
7894
7895 * gnat_rm.texi: Improve description of SPARK_Mode pragma.
7896
7897 2014-01-21 Vincent Celier <celier@adacore.com>
7898
7899 * prj-part.adb (Parse_Single_Project): Accept to extend a project
7900 if it has only be imported by an project being extended. When a
7901 project that has only been imported by a project being extended
7902 is imported by another project that is not being extended,
7903 reset the previous indication, so that it will be an error if
7904 this project is extended later.
7905 * prj-tree.adb (Create_Project): Include component From_Extended
7906 in table Projects_HT
7907 * prj-tree.ads (Project_Name_And_Node): New Boolean component
7908 From_Extended
7909
7910 2014-01-21 Robert Dewar <dewar@adacore.com>
7911
7912 * atree.ads, atree.adb: Add Node33 and Set_Node33.
7913 * einfo.ads, einfo.adb (SPARK_Pragma): New field (SPARK_Aux_Pragma):
7914 New field (SPARK_Pragma_Inherited): New flag
7915 (SPARK_Aux_Pragma_Inherited): New flag (SPARK_Mode_Pragmas):
7916 Removed.
7917 * lib.ads, lib.adb: Remove SPARK_Mode_Pragma, no longer used.
7918 * opt.ads (SPARK_Mode_Pragma): New global variable.
7919 * sem.ads: Add Save_SPARK_Mode_Pragma field to Scope_Stack_Entry.
7920 * sem_ch3.adb: Use new SPARK_Mode data structures.
7921 * sem_ch6.adb: Set SPARK_Mode fields in subprogram specs and bodies.
7922 * sem_ch7.adb: Set SPARK_Mode fields in package spec and body entities.
7923 * sem_ch8.adb (Push_Scope): Save SPARK_Mode_Pragma.
7924 (Pop_Scope): Restore SPARK_Mode_Pragma.
7925 * sem_prag.adb (Analyze_Pragma, case SPARK_Mode): Rewrite for
7926 new data structures.
7927
7928 2014-01-21 Arnaud Charlet <charlet@adacore.com>
7929
7930 * back_end.adb: Undo previous change, not needed. Minor reformatting.
7931
7932 2014-01-21 Thomas Quinot <quinot@adacore.com>
7933
7934 * exp_ch5.adb: Fix comment.
7935 * switch-c.adb: Minor comment update.
7936 * exp_ch3.adb: Minor reformatting.
7937
7938 2014-01-21 Arnaud Charlet <charlet@adacore.com>
7939
7940 * back_end.adb (Scan_Compiler_Arguments): Do not store object
7941 filename in gnatprove mode.
7942
7943 2014-01-21 Thomas Quinot <quinot@adacore.com>
7944
7945 * sinfo.ads (No_Ctrl_Actions): Clarify documentation (flag also
7946 suppresses usage of primitive _assign for tagged types).
7947 * exp_aggr.adb (Build_Array_Aggr_Code.Gen_Assign): Set
7948 No_Ctrl_Actions for a tagged type that does not require
7949 finalization, as we want to disable usage of _assign (which
7950 may cause undesirable discriminant checks on an uninitialized,
7951 invalid target).
7952
7953 2014-01-21 Ed Schonberg <schonberg@adacore.com>
7954
7955 * sem_prag.adb: Reject invariant'class on completion.
7956
7957 2014-01-21 Javier Miranda <miranda@adacore.com>
7958
7959 * exp_ch3.adb (Build_Init_Procedure): For
7960 derivations of interfaces, do not move the the initialization
7961 of the _parent field since such assignment is not generated.
7962
7963 2014-01-21 Ed Schonberg <schonberg@adacore.com>
7964
7965 * sem_res.adb (Rewrite_Renamed_Operator): Do not replace entity
7966 with the operator it renames if we are within an expression of
7967 a pre/postcondition, because the expression will be reanalyzed
7968 at a later point, and the analysis of the renaming may affect
7969 the visibility of the operator when in an instance.
7970
7971 2014-01-21 Robert Dewar <dewar@adacore.com>
7972
7973 * sinfo.ads, sinfo.adb: Change Do_Discriminant_Check to use new Flag1.
7974 Add this flag to type conversion nodes and assignment nodes.
7975 * treepr.adb: Deal properly with Flag 1,2,3.
7976 * treeprs.adt: Minor comment update.
7977
7978 2014-01-21 Robert Dewar <dewar@adacore.com>
7979
7980 * sem_eval.adb (Compile_Time_Known_Value): Add Ignore_CRT
7981 parameter.
7982 * sem_eval.ads (Compile_Time_Known_Value): Add Ignore_CRT
7983 parameter, completely rewrite spec.
7984
7985 2014-01-21 Ed Schonberg <schonberg@adacore.com>
7986
7987 * sem_ch10.adb (Install_Withed_Unit): If the unit is a subprogram
7988 instance that is inlined, it may have been rewritten as a wrapper
7989 package. In that case the unit that must be made visible is the
7990 related instance of the package.
7991
7992 2014-01-21 Arnaud Charlet <charlet@adacore.com>
7993
7994 * exp_ch9.adb (Expand_N_Selective_Accept.Add_Accept): Refine
7995 previous change in codepeer mode.
7996
7997 2014-01-21 Arnaud Charlet <charlet@adacore.com>
7998
7999 * exp_ch9.adb (Expand_N_Selective_Accept.Add_Accept): Always add
8000 call to Abort_Undefer, as expected by the runtime.
8001 * s-tasren.adb (Local_Complete_Rendezvous): Replace
8002 Defer_Abort_Nestable by Defer_Abort, since we do not expect abort to be
8003 deferred at this point. Update comments.
8004
8005 2014-01-21 Thomas Quinot <quinot@adacore.com>
8006
8007 * exp_ch4.adb, exp_ch5.adb, checks.adb: Minor reformatting.
8008
8009 2014-01-21 Arnaud Charlet <charlet@adacore.com>
8010
8011 * switch-c.adb, usage.adb, gnat_ugn.texi: Mark -gnates as internal,
8012 remove from doc.
8013
8014 2014-01-21 Robert Dewar <dewar@adacore.com>
8015
8016 * switch-c.adb, usage.adb, atree.adb, atree.ads: Minor reformatting.
8017
8018 2014-01-21 Thomas Quinot <quinot@adacore.com>
8019
8020 * atree.adb, atree.ads (Num_Extension_Nodes): Switch to Node_Id, since
8021 this is value is used in Node_Id arithmetic operations.
8022 (Copy_Node, Exchange_Entities): Use loops indexed by Num_Extension_Nodes
8023 instead of hard-coded unrolled code.
8024
8025 2014-01-21 Yannick Moy <moy@adacore.com>
8026
8027 * gnat1drv.adb: Minor code cleanup, removing useless code.
8028
8029 2014-01-21 Arnaud Charlet <charlet@adacore.com>
8030
8031 * opt.ads (SPARK_Switches_File_Name): New.
8032 * switch-c.adb (Scan_Front_End_Switches): Add handling of -gnates=xxx *
8033 * usage.adb (Usage): Document -gnates, in gnatprove mode only.
8034 * gnat_ugn.texi: Document -gnates.
8035
8036 2014-01-21 Yannick Moy <moy@adacore.com>
8037
8038 * errout.adb (Special_Msg_Delete): Update comment. Remove
8039 special case for GNATprove which should not ignore mismatch
8040 in sizes for representation clauses.
8041 * sem_prag.adb (Analyze_Pragma): Remove special case for GNATprove
8042 which should not ignore pragma Pack.
8043
8044 2014-01-21 Ed Schonberg <schonberg@adacore.com>
8045
8046 * sem_ch4.adb: Code clean up.
8047
8048 2014-01-21 Steve Baird <baird@adacore.com>
8049
8050 * gnat_rm.texi: Improve GNAT RM description of SPARK_Mode pragma.
8051
8052 2014-01-21 Robert Dewar <dewar@adacore.com>
8053
8054 * gcc-interface/gigi.h: Get Flags array address.
8055 * gcc-interface/trans.c: Acquire Flags array address.
8056 * atree.adb: Add support for Flags array and Flag0,1,2,3.
8057 * atree.ads: Add support for Flags array and Flag0,1,2,3.
8058 * atree.h: Add support for Flags array and Flag0,1,2,3.
8059 * back_end.adb: Pass Flags array address to gigi.
8060
8061 2014-01-21 Ed Schonberg <schonberg@adacore.com>
8062
8063 * sem_ch8.adb (Attribute_Renaming): Transfer original attribute
8064 reference to generated body so that legality checks on stream
8065 attributes are properly applied. If type is tagged and already
8066 frozen, insert generated body at the point of the renaming
8067 declaration.
8068
8069 2014-01-21 Ed Schonberg <schonberg@adacore.com>
8070
8071 * sem_ch12.adb: Code clean up.
8072 * sem_ch8.adb: Minor reformatting
8073
8074 2014-01-20 Robert Dewar <dewar@adacore.com>
8075
8076 * checks.adb: Check SPARK_Mode instead of GNATProve_Mode for
8077 converting warnings on inevitable exceptions to errors.
8078 * exp_ch4.adb: Check SPARK_Mode instead of GNATProve_Mode for
8079 converting warnings on inevitable exceptions to errors.
8080 * opt.adb (SPARK_Mode_Config): Handled like other config flags
8081 * opt.ads (SPARK_Mode_Type): Moved here from types (renamed from
8082 SPARK_Mode_Id) (SPARK_Mode_Type): Add pragma Ordered, remove
8083 SPARK_ from names (SPARK_Mode): New flag (SPARK_Mode_Config):
8084 New flag (Config_Switches_Type): Add SPARK_Mode field
8085 * sem.adb: Minor code reorganization (remove unnecessary with)
8086 * sem.ads (Scope_Stack_Entry): Add Save_SPARK_Mode field
8087 * sem_aggr.adb: Check SPARK_Mode instead of GNATProve_Mode for
8088 converting warnings on inevitable exceptions to errors.
8089 * sem_attr.adb: Check SPARK_Mode instead of GNATProve_Mode for
8090 converting warnings on inevitable exceptions to errors.
8091 * sem_ch3.adb: Check SPARK_Mode instead of GNATProve_Mode for
8092 converting warnings on inevitable exceptions to errors.
8093 * sem_ch4.adb: Check SPARK_Mode instead of GNATProve_Mode for
8094 converting warnings on inevitable exceptions to errors.
8095 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Reset SPARK_Mode
8096 from spec if needed
8097 * sem_ch7.adb (Analyze_Package_Body_Helper): Reset SPARK_Mode
8098 from spec if needed
8099 * sem_ch8.adb (Push_Scope): Save SPARK_Mode (Pop_Scope):
8100 Restore SPARK_Mode
8101 * sem_elab.adb: Check SPARK_Mode instead of GNATProve_Mode for
8102 converting warnings on inevitable exceptions to errors.
8103 * sem_prag.adb (Get_SPARK_Mode_From_Pragma): New function
8104 (Get_SPARK_Mode_Id): Removed (Get_SPARK_Mode_Type): New name
8105 of Get_SPARK_Mode_Id
8106 * sem_prag.ads (Get_SPARK_Mode_From_Pragma): New function
8107 * sem_res.adb: Check SPARK_Mode instead of GNATProve_Mode for
8108 converting warnings on inevitable exceptions to errors.
8109 * sem_util.adb: Check SPARK_Mode instead of GNATProve_Mode for
8110 converting warnings on inevitable exceptions to errors.
8111 * types.ads (SPARK_Mode_Id): Moved to opt.ads and renamed
8112 SPARK_Mode_Type
8113
8114 2014-01-20 Ed Schonberg <schonberg@adacore.com>
8115
8116 * sem_ch13.adb: Add semantic information to rewritten type
8117 reference.
8118
8119 2014-01-20 Ed Schonberg <schonberg@adacore.com>
8120
8121 * exp_ch5.adb (Expand_N_Assignment_Statement): If both sides
8122 are of a type with unknown discriminants, convert both to the
8123 underlying view of the type, so that the proper constraint check
8124 can be applied to the right-hand side.
8125
8126 2014-01-20 Robert Dewar <dewar@adacore.com>
8127
8128 * atree.adb (Copy_Node): Fix failure to copy last component
8129 (Exchange_Entities): Fix failure to exchange last entity
8130
8131 2014-01-20 Ed Schonberg <schonberg@adacore.com>
8132
8133 * sem_ch12.adb: Code clean up.
8134
8135 2014-01-20 Robert Dewar <dewar@adacore.com>
8136
8137 * gnat_rm.texi, sem_ch4.adb: Minor reformatting.
8138
8139 2014-01-20 Ed Schonberg <schonberg@adacore.com>
8140
8141 * sem_ch4.adb (Analyze_Quantified_Expression): If after
8142 pre-analysis the loop parameter specification has been
8143 rewritten as a iterator specification, propagate the change to
8144 the quantified expression, for ASIS navigtion needs.
8145
8146 2014-01-20 Vincent Celier <celier@adacore.com>
8147
8148 * par-ch10.adb: Minor error message change: escape [ and ].
8149
8150 2014-01-20 Robert Dewar <dewar@adacore.com>
8151
8152 * checks.adb: Make warnings on exceptions into errors in GNATprove mode.
8153 * errout.adb: Implement [ and ] insertion characters.
8154 * errout.ads: Document new [ and ] insertion characters.
8155 * sem_ch12.adb, restrict.adb, frontend.adb, exp_ch7.adb: Minor
8156 addition of ??? comment.
8157 * lib-xref.adb, exp_util.adb, gnat1drv.adb: Minor reformatting
8158 * exp_ch4.adb, sem_ch3.adb, sem_ch4.adb, sem_ch6.adb, sem_elab.adb,
8159 sem_eval.adb, sem_res.adb, sem_util.adb, sem_attr.adb, sem_aggr.adb:
8160 Make warnings on exceptions into errors in GNATprove mode.
8161 * sem_dim.adb: Minor reformatting throughout Quote [ and ]
8162 in error messages.
8163
8164 2014-01-20 Ed Schonberg <schonberg@adacore.com>
8165
8166 * sem_ch13.adb: Code clean up.
8167
8168 2014-01-20 Robert Dewar <dewar@adacore.com>
8169
8170 * errout.ads, errout.adb: Implement >? >x? >X? sequences in error
8171 messages.
8172 * sem_ch6.adb (Check_Statement_Sequence): Missing return is an
8173 error in GNATprove mode.
8174
8175 2014-01-20 Ed Schonberg <schonberg@adacore.com>
8176
8177 * par-ch4.adb (Is_Parameterless_Attribute): The Ada2012 attribute
8178 reference 'Old takes no parameters, and thus can appear as a
8179 prefix of a slice.
8180
8181 2014-01-20 Eric Botcazou <ebotcazou@adacore.com>
8182
8183 * exp_aggr.adb: Fix minor typos.
8184
8185 2014-01-20 Ed Schonberg <schonberg@adacore.com>
8186
8187 * sem_attr.adb (Analyze_Attribute, case 'Constrained): In an
8188 instance the attribute is legal, and its value is determined
8189 statically if the type has no discriminants. This choice is
8190 more useful than rechecking the legality rule in the instance,
8191 is consistent with older usage, and is also consistent with all
8192 existing tests.
8193
8194 2014-01-20 Arnaud Charlet <charlet@adacore.com>
8195
8196 * sem_cat.adb (Validate_Static_Object_Name): Change error into
8197 warning in Relaxed_Semantic_Mode.
8198
8199 2014-01-20 Ed Schonberg <schonberg@adacore.com>
8200
8201 * sem_attr.adb: Code and comments cleanup.
8202
8203 2014-01-20 Yannick Moy <moy@adacore.com>
8204
8205 * debug.adb Free debug flags -gnatd.D, -gnatd.G and -gnatd.V *
8206 * errout.adb (Compilation_Errors): Remove special handling in
8207 GNATprove mode.
8208 * gnat1drv.adb (Adjust_Global_Switches): Remove handling of the
8209 removed debug flags.
8210 * gnat_rm.texi: Initial documentation for Abstract_State, Depends,
8211 Global, Initial_Condition, Initializes and Refined_State pragmas and
8212 aspects.
8213 * opt.ads (Frame_Condition_Mode, Formal_Extensions,
8214 SPARK_Strict_Mode): Remove global flags.
8215 * sem_ch3.adb (Analyze_Object_Declaration): Check of no hidden state
8216 always performed now, on packages declaring a null state.
8217 (Signed_Integer_Type_Declaration): Remove ill-designed attempt
8218 at providing pedantic mode for bounds of integer types.
8219 * sem_ch4.adb (Analyze_Quantified_Expression): Warning on suspicious
8220 "some" quantified expression now issued under control of -gnatw.t,
8221 like the other warning on unused bound variable.
8222 * sem_prag.adb (Check_Precondition_Postcondition): Remove useless test
8223 on removed flag.
8224 (Analyze_Pragma): Remove tests for SPARK 2014
8225 pragmas, not officially allowed by GNAT.
8226
8227 2014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
8228
8229 * sem_prag.adb (Analyze_Pragma): Ensure that
8230 the sole argument of pragmas Abstract_State, Contract_Cases,
8231 Depends, Global and Initializes in in aggregate form.
8232 (Analyze_Refined_Pragma): Ensure that the sole argument of
8233 pragmas Refined_Depends, Refined_Global and Refined_State is in
8234 aggregate form.
8235 (Ensure_Aggregate_Form): New routine.
8236
8237 2014-01-20 Doug Rupp <rupp@adacore.com>
8238
8239 * sem_attr.adb (Analyze_Attribute): case
8240 Attribute_Constrained => treat all prefixes as legal for Declib
8241 compatibility.
8242
8243 2014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
8244
8245 * sem_prag.adb (Check_Mode): Reimplement the routine.
8246 (Find_Mode): New routine.
8247
8248 2014-01-20 Robert Dewar <dewar@adacore.com>
8249
8250 * sem_ch4.adb (Operator_Check): Handle additional
8251 Allow_Integer_Address cases.
8252
8253 2014-01-20 Robert Dewar <dewar@adacore.com>
8254
8255 * gnat_rm.texi (Allow_Integer_Address): Remove note about not
8256 allowed if address is non-private, no longer true.
8257 * sem_prag.adb (Analyze_Pragma, case Allow_Integer_Address):
8258 Remove check for address being private, causes difficulty when
8259 pragma used in gnat.adc file and is not needed, since we guard
8260 this in Address_Integer_Convert_OK.
8261 * exp_ch7.adb: Minor reformatting.
8262 * sem_ch4.adb: Handle operator operands in Allow_Integer_Address mode.
8263
8264 2014-01-20 Robert Dewar <dewar@adacore.com>
8265
8266 * checks.adb (Apply_Range_Check): Remove gnatprove special
8267 casing of exponentiation.
8268 * sem_res.adb (Resolve_Op_Expon): Apply range check to right
8269 operand for integer case to check range against Natural.
8270
8271 2014-01-20 Robert Dewar <dewar@adacore.com>
8272
8273 * s-tataat.adb: Minor reformatting.
8274
8275 2014-01-20 Robert Dewar <dewar@adacore.com>
8276
8277 * einfo.adb (Is_Descendent_Of_Address): Now applies to all
8278 entities, and also fix documentation to remove mention of visible
8279 integer type, since this is not what the implementation does.
8280 * einfo.ads (Is_Descendent_Of_Address): Now applies to all
8281 entities, and also fix documentation to remove mention of visible
8282 integer type, since this is not what the implementation does.
8283 * gnat_rm.texi: Minor clarification of Allow_Integer_Address
8284 function.
8285 * sem_ch4.adb (Analyze_One_Call): Handle Allow_Integer_Address
8286 case for parameter type check.
8287 * sem_res.adb (Resolve): Use new function
8288 Address_Integer_Convert_OK.
8289 * sem_type.adb: Minor code reorganization (use Ekind_In) Minor
8290 reformatting throughout.
8291 * sem_util.adb (Address_Integer_Convert_OK): New function.
8292 * sem_util.ads: Minor reformatting (put specs in alpha order)
8293 (Address_Integer_Convert_OK): New function.
8294
8295 2014-01-20 Thomas Quinot <quinot@adacore.com>
8296
8297 * exp_ch7.adb (Wrap_Transient_Expression):
8298 Insertion extra conditional expression only if
8299 Opt.Suppress_Control_Flow_Optimizations is set.
8300
8301 2014-01-20 Arnaud Charlet <charlet@adacore.com>
8302
8303 * s-tataat.adb (Initialize_Attributes): Abort might already be
8304 deferred in Create_Task.
8305
8306 2014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
8307
8308 * checks.adb (Apply_Scalar_Range_Check): Flag
8309 the exponent as requiring a range check when the expression is
8310 an exponentiation.
8311
8312 2014-01-20 Fedor Rybin <frybin@adacore.com>
8313
8314 * gnat_ugn.texi: Documenting --passed-tests option for gnattest.
8315
8316 2014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
8317
8318 * sem_util.adb (Default_Initialization): New routine.
8319 * sem_util.ads: Add new type Default_Initialization_Kind.
8320 (Default_Initialization): New routine.
8321
8322 2014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
8323
8324 * sem_prag.adb (Check_Mode): Correct all error
8325 message logic dealing with in/in out parameters that may appear
8326 as inputs or have a self reference.
8327
8328 2014-01-20 Robert Dewar <dewar@adacore.com>
8329
8330 * exp_ch9.adb, checks.adb, exp_intr.adb: Minor reformatting.
8331 * sem_res.adb (Resolve): Fix error causing infinite loop for
8332 integer used as address. Allow addresses as integers.
8333
8334 2014-01-20 Arnaud Charlet <charlet@adacore.com>
8335
8336 * s-osinte-linux.ads (struct_sigaction): Fix rep clause.
8337
8338 2014-01-20 Bob Duff <duff@adacore.com>
8339
8340 * par-ch8.adb (P_Use_Type_Clause): Detect syntax
8341 error when "use all" is not followed by "type".
8342
8343 2014-01-20 Bob Duff <duff@adacore.com>
8344
8345 * exp_intr.adb (Expand_Unc_Deallocation): Remove warning on abort
8346 followed by free.
8347
8348 2014-01-20 Ed Schonberg <schonberg@adacore.com>
8349
8350 * checks.adb (Apply_Address_Clause_Check): If there is an
8351 alignment check on the expression in an address clause, and there
8352 is no local exception propagation, add an additional explanatory
8353 message to clarify the cause of previous warning.
8354
8355 2014-01-20 Robert Dewar <dewar@adacore.com>
8356
8357 * exp_ch7.adb: Minor reformatting.
8358 * opt.ads: Minor comment updates.
8359 * sem.adb: Minor name change Is_Main_Unit =>
8360 Is_Main_Unit_Or_Main_Unit_Spec.
8361 * sem_ch6.adb: Minor reformatting and code reorganization.
8362
8363 2014-01-20 Bob Duff <duff@adacore.com>
8364
8365 * gnat_ugn.texi: Update gnatpp switches.
8366
8367 2014-01-20 Thomas Quinot <quinot@adacore.com>
8368
8369 * exp_ch9.adb: Minor comment edit.
8370
8371 2014-01-20 Robert Dewar <dewar@adacore.com>
8372
8373 * gnat_rm.texi: Document that Allow_Integer_Address is permitted
8374 only if System.Address is a private type.
8375 * opt.ads (Allow_Integer_Address): No longer set by -gnates.
8376 * sem_prag.adb (Analyze_Pragma, case Allow_Integer_Address):
8377 Allowed only if type System.Address is private, since otherwise
8378 it makes no sense.
8379 * sem_res.adb: Fix failure to properly Analyze unchecked
8380 conversions that were introduced by Allow_Integer_Address.
8381 * switch-c.adb: Remove -gnates switch.
8382 * usage.adb: Remove -gnates switch.
8383 * gnat_ugn.texi: Remove documentation of -gnates flag.
8384
8385 2014-01-20 Ed Schonberg <schonberg@adacore.com>
8386
8387 * sem_ch6.adb (Analyze_Expression_Function): Pre-analyze and
8388 resolve expression to perform proper name capture.
8389
8390 2014-01-20 Ed Schonberg <schonberg@adacore.com>
8391
8392 * sem.adb (Semantics): When saving/restoring configuration
8393 switches, the spec of a pre- defined unit that is the main unit
8394 must be treated as a predefined unit as well.
8395
8396 2014-01-20 Thomas Quinot <quinot@adacore.com>
8397
8398 * exp_ch7.adb (Wrap_Transient_Expression): For a Boolean
8399 expression, insert an extra conditional expression when saving
8400 the value of the expression, for the benefit of control flow
8401 graph based coverage analysis.
8402 * exp_ch3.adb: Minor reformatting.
8403
8404 2014-01-20 Robert Dewar <dewar@adacore.com>
8405
8406 * gnat1drv.adb: Set Allow_Integer_Address in relaxed semantics mode.
8407 * gnat_rm.texi: Document pragma Allow_Integer_Address.
8408 * gnat_ugn.texi: Document pragma Allow_Integer_Address, -gnates.
8409 * opt.ads: New flag Allow_Integer_Address.
8410 * par-prag.adb: Dummy entry for pragma Allow_Integer_Address.
8411 * sem_ch5.adb: Minor reformatting.
8412 * sem_prag.adb: Implement pragma Allow_Integer_Address.
8413 * sem_res.adb (Resolve): Allow integer address value if
8414 switch set.
8415 * sem_util.adb: Minor reformatting.
8416 * snames.ads-tmpl: Add entry for pragma Allow_Integer_Address.
8417 * switch-c.adb: Recognize flag -gnates.
8418 * usage.adb: Document flag -gnates.
8419
8420 2014-01-20 Thomas Quinot <quinot@adacore.com>
8421
8422 * s-tadeca.adb: Fix minor typos in comment.
8423
8424 2014-01-20 Pascal Obry <obry@adacore.com>
8425
8426 * s-win32.ads (FreeLibrary): New import.
8427
8428 2014-01-20 Robert Dewar <dewar@adacore.com>
8429
8430 * sem_res.adb, sem_cat.adb: Minor reformatting.
8431 * sem_ch11.adb (Analyze_Raise_Statement): Only give warning about
8432 assigning to OUT parameters for the current subprogram scope.
8433 * exp_ch4.adb: Minor reformatting.
8434
8435 2014-01-20 Ed Schonberg <schonberg@adacore.com>
8436
8437 * exp_ch4.adb (Process_Transient_Object,
8438 Find_Enclosing_Contexts): If the top-level if-expression that
8439 generated the transient object is an actual in a call, the proper
8440 Hook_Context is a construct enclosing the call.
8441 * einfo.ads: Indicate that Related_Expression is used to link a
8442 loop variable to the container expression over which the loop
8443 takes place.
8444 (Analyze_Iterator_Specification): Set the Related_Expression of
8445 the loop variable in a container element iterator.
8446 (Note_Possible_Modification): If the variable is the loop
8447 variable in a container element iterator, indicate that the
8448 enclosing container is also modified.
8449
8450 2014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
8451
8452 * aspects.adb (Move_Or_Merge_Aspects): Reimplemented.
8453
8454 2014-01-20 Robert Dewar <dewar@adacore.com>
8455
8456 * s-taasde.ads, gnat_ugn.texi, s-tadeca.adb, sem_res.adb, s-tadeca.ads:
8457 Minor reformatting and code clean up.
8458
8459 2014-01-20 Arnaud Charlet <charlet@adacore.com>
8460
8461 * sem_cat.adb (Validate_Object_Declaration): Relax semantics
8462 of objects of private type if Relaxed_RM_Semantics.
8463
8464 2014-01-20 Claire Dross <dross@adacore.com>
8465
8466 * a-cofove.ads (Vector): Capacity discriminant
8467 should be in range of the index.
8468
8469 2014-01-20 Thomas Quinot <quinot@adacore.com>
8470
8471 * a-caldel.ads(To_Duration), s-taasde.ads(Time_Enqueue):
8472 Clarify specs s-tadeca.adb(Enqueue_Calendar): Compensate for
8473 possible difference between epoch of Ada.Calendar clock and Ada
8474 real-time/tasking clock.
8475 * s-taprop-posix.adb: Minor comment fix.
8476
8477 2014-01-20 Doug Rupp <rupp@adacore.com>
8478
8479 * sysdep.c [vxworks]: Remove Vxworks version noise for RTP.
8480
8481 2014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
8482
8483 * exp_attr.adb (Expand_N_Attribute_Reference): Generate validity
8484 checks on the prefix of attribute 'Old.
8485 * sem_ch3.adb (Process_Range_Expr_In_Decl): Suppress the
8486 generation of validity checks on a range that belongs to the
8487 iteration scheme of a quantified expression.
8488 * sem_ch5.adb (One_Bound): Suppress the generation of validity
8489 checks on a bound that belongs to the iteration scheme of a
8490 quantified expression, generate the check in all other cases.
8491
8492 2014-01-20 Bob Duff <duff@adacore.com>
8493
8494 * gnat_ugn.texi: Enable --pp-new by default. Minor reorganization.
8495
8496 2014-01-20 Ed Schonberg <schonberg@adacore.com>
8497
8498 * sem_res.adb (Resolve): When compiling a predefined unit, ignore
8499 interpretations that do not come from other predefined units,
8500 to prevent spurious ambiguities in the presence of user-defined
8501 operators in the context of (an instance of) a predefined unit.
8502
8503 2014-01-20 Robert Dewar <dewar@adacore.com>
8504
8505 * gnat_rm.texi: Document that Loop_Variant is included in
8506 Statement_Assertions.
8507 * sem_prag.adb (Check_Kind): Add Loop_Variant to
8508 Statement_Assertions (Check_Applicable_Policy): Add Loop_Variant
8509 to Statement_Assertions.
8510
8511 2014-01-20 Doug Rupp <rupp@adacore.com>
8512
8513 * sysdep.c (__gnat_is_file_not_found_error) [vxworks6]: Add case
8514 for errno ENOENT from RTP on NFS mounted file system.
8515
8516 2014-01-20 Ed Schonberg <schonberg@adacore.com>
8517
8518 * sem_util.adb (Check_Function_Writable_Actuals): 1) Do not
8519 examine code that does not come from source. The check does not
8520 apply to code generated for constraint checks, and such code may
8521 generate spurious error messages when compiled with expansion
8522 disabled (as in a generic unit) because side effects may not
8523 have been removed.
8524 2) Make error messages more explicit: indicate the component
8525 of the construct whose value is indeterminate because of a
8526 call to a function with in-out parameter in another component,
8527 when there is no mandated order of execution between the two
8528 components (actuals, aggregate components, alternatives).
8529
8530 2014-01-20 Robert Dewar <dewar@adacore.com>
8531
8532 * gnat_rm.texi: Minor cleanup.
8533
8534 2014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
8535
8536 * sem_attr.adb (Analyze_Attribute): Attributes 'Old and 'Result
8537 can now apply to a refined postcondition.
8538 * sem_ch6.adb (Analyze_Subprogram_Contract): Remove local
8539 variable Result_Seen. Add variables Case_Prag, Post_Prag,
8540 Seen_In_Case and Seen_In_Post. Update the mechanism that detects
8541 whether postconditions and/or constract-cases mention attribute
8542 'Result and introduce a post-state when applied to functions.
8543 (Check_Result_And_Post_State): Removed.
8544 * sem_prag.adb (Analyze_Pragma): Add local variable
8545 Result_Seen. Verify that the expression of pragma Refined_Post
8546 mentions attribute 'Result and introduces a post-state.
8547 * sem_util.ads, sem_util.adb (Check_Result_And_Post_State): New routine.
8548
8549 2014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
8550
8551 * exp_ch7.adb (Is_Subprogram_Call): New routine.
8552 (Process_Transient_Objects): Make variable Must_Hook global with
8553 respect to all locally declared subprograms. Search the context
8554 for at least one subprogram call.
8555 (Requires_Hooking): Removed.
8556
8557 2014-01-20 Claire Dross <dross@adacore.com>
8558
8559 * a-cfdlli.ads a-cfhama.ads a-cfhase.ads a-cforma.ads
8560 * a-cforse.ads a-cofove.ads: Add pragma Annotate (GNATprove,
8561 External_Axiomatization);
8562
8563 2014-01-20 Robert Dewar <dewar@adacore.com>
8564
8565 * sem_attr.adb (Analyze_Attribute, case Loop_Entry): Allow
8566 Loop_Entry in Assert, Assert_And_Cut, and Assume pragmas.
8567 * sem_prag.adb (Analyze_Pragma, case Assert[_And_Cut], Assume):
8568 Allow Loop_Entry to be used in these pragmas if they appear in
8569 an appropriate context.
8570 (Placement_Error): Specialize error
8571 message for pragma Assert[_And_Cut] or pragma Assume containing
8572 Loop_Entry attribute.
8573 * a-exexpr-gcc.adb, sinput.adb: Minor reformatting.
8574 * s-excmac-arm.ads, s-except.ads, s-excmac-gcc.ads: Minor reformatting
8575 and code clean ups.
8576
8577 2014-01-20 Robert Dewar <dewar@adacore.com>
8578
8579 * gnat1drv.adb: Minor comment update.
8580
8581 2014-01-20 Tristan Gingold <gingold@adacore.com>
8582
8583 * raise-gcc.c (PERSONALITY_FUNCTION/arm): Remove unused
8584 variables, comment out unused code.
8585 * a-exexpr-gcc.adb: Move declarations to s-excmac-gcc.ads
8586 * s-excmac-gcc.ads: New file, extracted from a-exexpr-gcc.adb
8587 * s-excmac-arm.ads: New file.
8588
8589 2014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
8590
8591 * exp_ch4.adb (Expand_N_Slice): Remove constant D and variables
8592 Drange and Index_Typ. Remove the circuitry which creates a
8593 range check to compare the index type of the array against the
8594 discrete_range.
8595 * sem_res.adb (Resolve_Slice): Add local variable Dexpr. Update
8596 the circuitry which creates a range check to handle a
8597 discrete_range denoted by a subtype indication.
8598
8599 2014-01-20 Pierre-Marie Derodat <derodat@adacore.com>
8600
8601 * sinput.adb, sinput.ads (Sloc_Range): Traverse the tree of original
8602 nodes to get the original sloc range.
8603
8604 2014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
8605
8606 * sem_prag.adb (Analyze_Pragma): Use Defining_Entity to obtain the
8607 entity of a [library level] package.
8608
8609 2014-01-20 Tristan Gingold <gingold@adacore.com>
8610
8611 * raise-gcc.c (exception_class_eq): New function.
8612 (is_handled_by): Use it to compare exception classes.
8613 (PERSONALITY_STORAGE): Define. (continue_unwind): New function to
8614 be called to return URC_CONTINUE_UNWIND.
8615 (personality_body): New function, extracted from PERSONALITY_ROUTINE.
8616 (PERSONALITY_ROUTINE): Add an implementation for the ARM unwinder.
8617
8618 2014-01-20 Robert Dewar <dewar@adacore.com>
8619
8620 * opt.ads: Minor comment update.
8621
8622 2014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
8623
8624 * exp_ch4.adb (Expand_N_Slice): Relocate some variables and
8625 constants to the "Local variables" area. Add new constant D. Add
8626 new variables Drange and Index_Typ. Rename Pfx to Rep and Ptp
8627 to Pref_Typ and update all occurrences. Add circuitry to extract
8628 the discrete_range and the index type and build a range check.
8629
8630 2014-01-20 Arnaud Charlet <charlet@adacore.com>
8631
8632 * gnat1drv.adb (Adjust_Global_Switches): Enable
8633 Treat_Categorization_Errors_As_Warnings when Relaxed_RM_Semantics
8634 is set.
8635
8636 2014-01-20 Thomas Quinot <quinot@adacore.com>
8637
8638 * sem_ch5.adb, sem_ch4.adb: Minor reformatting.
8639
8640 2014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
8641
8642 * sem_ch13.adb (Analyze_Aspect_Specifications):
8643 When aspect SPARK_Mode appears on a package body, insert the
8644 generated pragma at the top of the body declarations.
8645
8646 2014-01-20 Robert Dewar <dewar@adacore.com>
8647
8648 * sem_aggr.adb, exp_prag.adb, sem_aux.adb, sinfo.ads, sem_ch10.adb,
8649 checks.adb, sem_prag.adb, sem_ch12.adb, freeze.adb, g-arrspl.adb,
8650 expander.adb, gnat1drv.adb, exp_ch4.adb, sem_ch6.adb,
8651 sem_ch8.adb, exp_dist.adb: Minor reformatting.
8652
8653 2014-01-20 Yannick Moy <moy@adacore.com>
8654
8655 * gnat1drv.adb (Gnat1drv): Call Write_ALI with Object=True in GNATprove
8656 mode.
8657
8658 2014-01-20 Pascal Obry <obry@adacore.com>
8659
8660 * g-arrspl.ads (Slice_Set): New definition (will use a copy on
8661 write scheme).
8662 * g-arrspl.adb: Adapt all routine to this new implementation.
8663 (Set): Copy the Slice_Set definition before reusing it.
8664
8665 2014-01-20 Arnaud Charlet <charlet@adacore.com>
8666
8667 * sem_prag.adb (Process_Import_Or_Interface): In
8668 Relaxed_RM_Semantics, support old Ada 83 style of pragma Import.
8669 (Analyze_Pragma): Ditto for pragma Export.
8670 * exp_prag.adb (Expand_Pragma_Import_Or_Interface): Handle old pragma
8671 Import style.
8672
8673 2014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
8674
8675 * einfo.ads: E_Abstract_State is now part of the entities that
8676 can be overloaded. Update type Overloadable_Kind to reflect the
8677 inclusion of abstract states.
8678 * sem_ch6.adb (New_Overloaded_Entity): A function can now
8679 overload an abstract state.
8680 * sem_prag.adb (Analyze_Constituent): Handle the overloading
8681 of states by functions. Use Entity_Of to obtain the entity of
8682 a constituent. (Analyze_Global_Item): Handle the overloading of
8683 states by functions.
8684 (Analyze_Initialization_Item): Handle the
8685 overloading of states by functions. Use Entity_Of to obtain the
8686 entity of an item.
8687 (Analyze_Input_Item): Handle the overloading
8688 of states by functions. Use Entity_Of to obtain the entity of an item.
8689 (Analyze_Input_Output): Handle the overloading of states by functions.
8690 (Analyze_Refinement_Clause): Handle the overloading
8691 of states by functions. Use Entity_Of to obtain the entity of an item.
8692 (Appears_In): Use Entity_Of to obtain the entity of an element.
8693 (Check_Usage): Use Entity_Of to obtain the entity of
8694 an item. Add a guard to prevent a crash due to a previous error.
8695 (Resolve_State): New routine.
8696
8697 2014-01-20 Yannick Moy <moy@adacore.com>
8698
8699 * spark_xrefs.ads, debug.adb, gnat1drv.adb, errout.adb, errout.ads,
8700 opt.ads: Minor comments updates.
8701
8702 2014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
8703
8704 * einfo.adb (Non_Limited_View): Applies to abstract states.
8705 (Set_From_Limited_With): Applies to abstract states.
8706 (Set_Non_Limited_View): Applies to abstract states.
8707 (Write_Field17): Output the non-limited view of an abstract state.
8708 * einfo.ads: Update the comment on usage and occurrences in
8709 nodes for attributes From_Limited_With and Non_Limited_View.
8710 * sem_aux.adb (Available_View): This routine can now handle
8711 abstract states.
8712 * sem_aux.ads (Available_View): This routine can now handle
8713 abstract states. Update the comment on usage.
8714 * sem_ch8.adb (Find_Expanded_Name): Handle abstract views
8715 of states and variables.
8716 (In_Pragmas_Depends_Or_Global): New routine.
8717 * sem_ch10.adb (Build_Limited_Views): Implement
8718 abstract (limited) views of variables and states.
8719 (Build_Shadow_Entity): This routine is now a procedure. Add
8720 formal parameter Shadow. Update the comment on usage. Add
8721 context-specific decoration for states and variables.
8722 (Decorate_State): New routine. (Decorate_Variable): New routine.
8723 (Find_And_Process_States): New routine.
8724 (Process_Declarations): Renamed to Process_Declarations_And_States.
8725 (Process_Declarations_And_States): Add formal parameters
8726 Pack and Create_Abstract_Views. Update the comment on usage.
8727 (Process_States): New routine.
8728 * sem_prag.adb (Check_Dependency_Clause): Handle abstract
8729 views of states and variables. Match the abstract view of a state
8730 against its corresponding non-abstract view.
8731 (Is_Matching_Input):
8732 Handle abstract views of states and variables. Match the abstract
8733 view of a state against its corresponding non-abstract view.
8734 (Process_Global_Item): Handle abstract views of states and
8735 variables.
8736
8737 2014-01-20 Bob Duff <duff@adacore.com>
8738
8739 * sem_ch10.adb (Expand_With_Clause): Don't
8740 recurse on the prefix if the current with-ed name refers to a
8741 package that renames its own parent, eg "package P.Q renames P;".
8742
8743 2014-01-20 Yannick Moy <moy@adacore.com>
8744
8745 * exp_spark.adb (Expand_SPARK_Call): Remove procedure.
8746 * opt.adb, opt.ads (Full_Expander_Active): Remove function.
8747 * checks.adb, exp_ch6.adb, exp_ch9.adb, exp_disp.adb, sem_aggr.adb,
8748 * sem_ch10.adb, sem_ch5.adb, sem_ch6.adb, sem_ch8.adb, sem_ch9.adb,
8749 * sem_disp.adb, sem_res.adb Replace Full_Expander_Active by
8750 Expander_Active.
8751
8752 2014-01-20 Yannick Moy <moy@adacore.com>
8753
8754 * sinfo.ads Update documentation of GNATprove mode.
8755
8756 2014-01-20 Yannick Moy <moy@adacore.com>
8757
8758 * adabkend.adb, ali-util.adb, errout.adb, exp_ch7.adb,
8759 * exp_dbug.adb, freeze.adb, lib-xref.adb, restrict.adb,
8760 * sem_attr.adb, sem_ch4.adb, sem_ch5.adb, sem_ch6.adb, sem_ch8.adb,
8761 * sem_prag.adb, sem_res.adb, sem_util.adb Rename SPARK_Mode into
8762 GNATprove_Mode.
8763 * sem_ch13.adb: Remove blank.
8764 * exp_spark.adb, exp_spark.ads (Expand_SPARK_Call): Only replace
8765 subprograms by alias for renamings, not for inherited primitive
8766 operations.
8767 * exp_util.adb (Expand_Subtype_From_Expr): Apply the expansion
8768 in GNATprove mode.
8769 (Remove_Side_Effects): Apply the removal in
8770 GNATprove mode, for the full analysis of expressions.
8771 * expander.adb (Expand): Call the light SPARK expansion in GNATprove
8772 mode.
8773 (Expander_Mode_Restore, Expander_Mode_Save_And_Set): Ignore
8774 save/restore actions for Expander_Active flag in GNATprove mode,
8775 similar to what is done in ASIS mode.
8776 * frontend.adb (Frontend): Generic bodies are instantiated in
8777 GNATprove mode.
8778 * gnat1drv.adb (Adjust_Global_Switches): Set operating
8779 mode to Check_Semantics in GNATprove mode, although a light
8780 expansion is still performed.
8781 (Gnat1drv): Set Back_End_Mode to
8782 Declarations_Only in GNATprove mode, and later on special case
8783 the GNATprove mode to continue analysis anyway.
8784 * lib-writ.adb (Write_ALI): Always generate ALI files in
8785 GNATprove mode.
8786 * opt.adb, opt.ads (Full_Expander_Active): Make it equivalent to
8787 Expander_Active.
8788 (SPARK_Mode): Renamed as GNATprove_Mode.
8789 * sem_aggr.adb (Aggregate_Constraint_Checks): Add checks in the
8790 tree in GNATprove_Mode.
8791 * sem_ch12.adb (Analyze_Package_Instantiation): Always instantiate
8792 body in GNATprove mode.
8793 (Need_Subprogram_Instance_Body): Always instantiate body in GNATprove
8794 mode.
8795 * sem_ch3.adb (Constrain_Index, Process_Range_Expr_In_Decl):
8796 Make sure side effects are removed in GNATprove mode.
8797
8798 2014-01-20 Eric Botcazou <ebotcazou@adacore.com>
8799
8800 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Robustify tests
8801 for aliased objects with an unconstrained nominal subtype.
8802 * gcc-interface/trans.c (Call_to_gnu): Likewise.
8803 (gnat_to_gnu) <case N_Op_Not>: Robustify test for private type.
8804 <case N_Op_Minus>: Remove useless code.
8805 (Exception_Handler_to_gnu_zcx): Minor tweaks.
8806
8807 2014-01-20 Eric Botcazou <ebotcazou@adacore.com>
8808
8809 * gcc-interface/decl.c (gnat_to_gnu_entity) <case E_Record_Subtype>:
8810 Tidy up. For a subtype with discriminants and variant part, if a
8811 variant is statically selected and the fields all have a constant
8812 position, put them in order of increasing position. Likewise if
8813 no variant part but representation clause is present.
8814 * gcc-interface/utils.c (make_packable_type): Robustify.
8815 (maybe_pad_type): Use local variable and tidy up condition. If no
8816 alignment is specified, use the original one.
8817 (create_type_stub_decl): Minor tweak.
8818 (convert) <case VECTOR_CST>: Fix typo.
8819 <case CONSTRUCTOR>: Deal with padding types around the same type.
8820 Do not punt on missing fields.
8821 (unchecked_convert): Call finish_record_type to lay out the special
8822 record types made for conversions from/to problematic integer types.
8823 Bump the alignment of CONSTRUCTORs before converting them to a more
8824 aligned type.
8825
8826 2014-01-20 Eric Botcazou <ebotcazou@adacore.com>
8827
8828 * gcc-interface/decl.c (gnat_to_gnu_entity) <case E_Component>: Remove
8829 obsolete code for type_annotate_only mode, simplify code and slightly
8830 improve wording of comments.
8831
8832 2014-01-12 Eric Botcazou <ebotcazou@adacore.com>
8833
8834 PR ada/59772
8835 * gcc-interface/cuintp.c (build_cst_from_int): Use 32-bit integer type
8836 as intermediate type.
8837 (UI_To_gnu): Likewise.
8838
8839 2014-01-03 Eric Botcazou <ebotcazou@adacore.com>
8840
8841 * gnatvsn.ads (Current_Year): Bump to 2014.
8842
8843 2014-01-02 Tobias Burnus <burnus@net-b.de>
8844
8845 * gnat_ugn.texi: Bump @copying's copyright year.
8846 \f
8847 Copyright (C) 2014 Free Software Foundation, Inc.
8848
8849 Copying and distribution of this file, with or without modification,
8850 are permitted in any medium without royalty provided the copyright
8851 notice and this notice are preserved.