14be35157876ce38542e9a210eef11928faf0881
[gcc.git] / gcc / ada / ChangeLog
1 2014-01-23 Tristan Gingold <gingold@adacore.com>
2
3 * gnat_rm.texi: Minor editing.
4
5 2014-01-23 Robert Dewar <dewar@adacore.com>
6
7 * opt.adb (Set_Opt_Config_Switches): Reset SPARK mode for
8 with'ed internal units.
9 * sem.adb (Semantics): Save and restore SPARK_Mode[_Pragma].
10
11 2014-01-23 Javier Miranda <miranda@adacore.com>
12
13 * lib-xref.adb (Generate_Reference): As part of processing the
14 "end-of-spec" reference generate an extra reference to the first
15 private entity of the package.
16 * xr_tabls.adb (Add_Reference): No action needed for the extra
17 'E' reference associated; similar to the processing of the
18 'e' reference.
19
20 2014-01-23 Bob Duff <duff@adacore.com>
21
22 * gnat_ugn.texi: Change "--&pp off" to "--!pp off".
23
24 2014-01-23 Ed Schonberg <schonberg@adacore.com>
25
26 * sem_util.ads, sem_util.adb (Is_Potentially_Unevaluated): new
27 predicate to implement rule given in 6.1.1 (20/3).
28 * sem_attr.adb (Analyze_Attribute, case 'Old): Reject prefix of
29 'Old in a postcondition, if it is potentially unevaluated and
30 it is not an entity name.
31
32 2014-01-23 Bob Duff <duff@adacore.com>
33
34 * gnat_ugn.texi: Document the new "--&pp off" feature of gnatpp.
35
36 2014-01-23 Robert Dewar <dewar@adacore.com>
37
38 * gnatlink.adb (Gnatlink): Fix problem of generating bad name
39 msg on VMS.
40
41 2014-01-23 Bob Duff <duff@adacore.com>
42
43 * g-dynhta.ads: Minor comment fix.
44
45 2014-01-23 Yannick Moy <moy@adacore.com>
46
47 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Inherit SPARK_Mode
48 from spec on body only when not already inherited on spec. Set
49 SPARK_Mode from context on body without previous spec. *
50 * sem_prag.adb (Analyze_Pragma): Check placement of pragma on
51 library-level entities. Correct retrieval of entity from
52 declaration, for cases where the declaration is not a unit.
53 * sem_ch12.adb (Instantiate_Object): Avoid
54 calling Is_Volatile_Object on an empty node.
55
56 2014-01-23 Robert Dewar <dewar@adacore.com>
57
58 * gnatlink.adb (Gnatlink): Check for suspicious executable file
59 names on windows.
60
61 2014-01-23 Robert Dewar <dewar@adacore.com>
62
63 * a-ngelfu.ads: Remove bad uses of AND which should be AND THEN.
64 * sem_res.adb (Check_No_Direct_Boolean_Operators): Don't give
65 style errors in instances.
66 * g-dynhta.ads (Static_HTable): Comment updates.
67
68 2014-01-23 Vincent Celier <celier@adacore.com>
69
70 * prj-conf.adb (Get_Or_Create_Configuration_File): Do not attempt
71 to find a configuration project file when Config_File_Name is
72 No_Configuration_File.
73 * prj-conf.ads (No_Configuration_File): New constant String.
74 * prj-pars.adb (Parse): Call Get_Or_Create_Configuration_File
75 with Config_File_Name set to No_Configuration_File, so that
76 no existing configuration project file will be used, and the
77 configuration project will be only created in memory when
78 Add_Default_GNAT_Naming_Scheme is called.
79 * projects.texi: Minor reformatting.
80
81 2014-01-23 Vincent Celier <celier@adacore.com>
82
83 * prj-conf.adb (Get_Or_Create_Configuration_File): Never parse
84 a config project file if On_Load_Config is not null.
85 * prj-pars.adb: Minor comment changes.
86
87 2014-01-23 Ed Schonberg <schonberg@adacore.com>
88
89 * lib-xref.adb (Output_References): Output progenitors of
90 synchronized tagged types, for source navigation.
91
92 2014-01-23 Robert Dewar <dewar@adacore.com>
93
94 * exp_util.adb, sinfo.adb, sinfo.ads, sem.adb, sem_res.adb,
95 expander.adb, exp_ch11.adb, exp_ch11.ads, sem_ch11.adb, sem_ch11.ads,
96 sprint.adb, sprint.ads: Remove unused node N_Subprogram_Info.
97
98 2014-01-23 Emmanuel Briot <briot@adacore.com>
99
100 * prj-conf.adb (Get_Or_Create_Configuration_File): call
101 On_Load_Config later.
102
103 2014-01-23 Hristian Kirtchev <kirtchev@adacore.com>
104
105 * sem_ch3.adb (Analyze_Declarations): Do not
106 generate the spec of the late primitive in ASIS mode. Add two
107 comments to explain the special cases when the expansion is
108 not performed.
109
110 2014-01-23 Robert Dewar <dewar@adacore.com>
111
112 * sem_util.adb (Note_Possible_Modification): Fix error of
113 misbehaving for implicit dereference cases in -gnatc mode.
114
115 2014-01-23 Emmanuel Briot <briot@adacore.com>
116
117 * prj-pars.adb: Minor reformatting.
118
119 2014-01-22 Ed Schonberg <schonberg@adacore.com>
120
121 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): A subprogram
122 body generated for an expression function within a protected body
123 needs a set of renaming declarations if the expression function
124 comes from source.
125
126 2014-01-22 Ed Schonberg <schonberg@adacore.com>
127
128 * lib-xref.adb (Get_Type_Reference): In semantics-only mode,
129 list interface progenitor of a tagged concurrent type, for better
130 source navigation.
131
132 2014-01-22 Robert Dewar <dewar@adacore.com>
133
134 * lib.adb (In_Extended_Main_Code_Unit): Return False for
135 Standard_Location.
136 (In_Extended_Main_Source_Unit): Return False for Standard_Location.
137 * lib.ads (In_Extended_Main_Code_Unit): Add documentation on
138 treatment of Slocs No_Location and Standard_Location.
139 * restrict.adb (Check_Restriction_No_Dependence): Explicitly
140 check for entity with Standard_Location Sloc, rather than relying
141 on Lib routines to do that.
142 * sem_res.adb (Resolve_Call): Implement SPARK_05 restriction
143 that a call cannot occur before a later occuring body within
144 the same unit.
145
146 2014-01-22 Thomas Quinot <quinot@adacore.com>
147
148 * rtsfind.adb: Update comment.
149
150 2014-01-22 Hristian Kirtchev <kirtchev@adacore.com>
151
152 * sem_aux.ads, sem_aux.adb (Is_Body): New routine.
153 * sem_ch3.adb (Analyze_Declarations): Add local variable
154 Body_Seen. Generate the spec of a late controlled
155 primitive body that is about to freeze its related type.
156 (Handle_Late_Controlled_Primitive): New routine.
157
158 2014-01-22 Robert Dewar <dewar@adacore.com>
159
160 * a-stream.adb: Minor reformatting.
161
162 2014-01-22 Ed Schonberg <schonberg@adacore.com>
163
164 * sem_ch8.adb (From_Actual_Package): Introduce a recursive
165 sub-procedure Declared_In_Actual to handle properly the visibility
166 of actuals in actual packages, that are themselves actuals to a
167 actual package of the current instance. This mimics properly the
168 visibility of formals of formal packages declared with a box,
169 within the corresponding generic unit.
170
171 2014-01-22 Robert Dewar <dewar@adacore.com>
172
173 * checks.adb: Do not assume that a volatile variable is valid.
174
175 2014-01-22 Thomas Quinot <quinot@adacore.com>
176
177 * g-catiio.ads (Image, Value): Clarify that these functions
178 operate in the local time zone. Minor documentation update.
179
180 2014-01-22 Thomas Quinot <quinot@adacore.com>
181
182 * csets.adb, csets.ads, opt.ads: Minor documentation fixes.
183
184 2014-01-22 Robert Dewar <dewar@adacore.com>
185
186 * sem_aux.adb, sem_aux.ads, sem_ch3.adb (Has_Unconstrained_Elements):
187 Moved to sem_aux.adb.
188
189 2014-01-22 Robert Dewar <dewar@adacore.com>
190
191 * vms_data.ads: Minor reformatting.
192
193 2014-01-22 Robert Dewar <dewar@adacore.com>
194
195 * debug.adb: Document messages affected by -gnatd.E including
196 the new ones that relate to late definition of equality.
197 * sem_ch6.adb (Check_Untagged_Equality): In Ada 2012 mode, if
198 debug flag -gnatd.E is set, then generate warnings rather than
199 errors.
200 (Check_Untagged_Equality): In earlier versions of Ada,
201 generate warnings if Warn_On_Ada_2012_Incompatibility flag is set.
202
203 2014-01-22 Robert Dewar <dewar@adacore.com>
204
205 * sem_prag.adb (Usage_Error): Output additional messages for
206 unconstrained OUT parameters lacking an input dependency.
207
208 2014-01-22 Robert Dewar <dewar@adacore.com>
209
210 * sem_ch4.adb: Minor reformatting.
211
212 2014-01-22 Robert Dewar <dewar@adacore.com>
213
214 * restrict.ads: Minor reformatting.
215 * sem_res.adb (Resolve_Call): Check for SPARK_05 restriction that
216 forbids a call from within a subprogram to the same subprogram.
217
218 2014-01-22 Thomas Quinot <quinot@adacore.com>
219
220 * a-stream.ads (Read_SEA, Write_SEA): New subprograms, optimized
221 stream attributes for Stream_Element_Array.
222 * a-stream.adb (Read_SEA, Write_SEA): Bodies for the above.
223 * rtsfind.adb (Check_CRT): Do not reject a reference to an entity
224 defined in the current scope.
225
226 2014-01-22 Robert Dewar <dewar@adacore.com>
227
228 * debug.adb, exp_ch4.adb, erroutc.adb: Minor reformatting.
229
230 2014-01-22 Thomas Quinot <quinot@adacore.com>
231
232 * sem_ch7.adb, sem_ch8.adb, exp_ch3.adb: Minor reformatting.
233
234 2014-01-22 Thomas Quinot <quinot@adacore.com>
235
236 * sem_ch3.adb (Analyze_Object_Declaration): For a constant
237 declaration initialized with a function call, whose type
238 has variable size, need to remove side effects so that the
239 initialization expression becomes a dereference of a temporary
240 reference to the function result.
241
242 2014-01-22 Yannick Moy <moy@adacore.com>
243
244 * errout.adb (Initialize): Remove trick to add dummy entry
245 in Warnings table.
246 * erroutc.adb (Set_Warnings_Mode_Off,
247 Set_Warnings_Mode_On): Do nothing if warnings are suppressed by
248 command line switch.
249 * opt.ads (Warning_Mode): Document behavior
250 wrt pragma Warnings, in normal mode and in GNATprove_Mode.
251
252 2014-01-22 Robert Dewar <dewar@adacore.com>
253
254 * sem_ch3.adb, errout.adb, erroutc.adb: Minor reformatting.
255
256 2014-01-22 Robert Dewar <dewar@adacore.com>
257
258 * sem_ch13.adb (Check_Pool_Size_Clash): New procedure
259 (Analyze_Attribute_Definition_Clause, case Storage_Pool): call
260 Check_Pool_Size_Clash (Analyze_Attribute_Definition_Clause,
261 case Storage_Size): call Check_Pool_Size_Clash.
262
263 2014-01-22 Robert Dewar <dewar@adacore.com>
264
265 * sem_ch3.adb, exp_util.adb, sem_dim.adb, sem_elab.adb, sem_ch8.adb,
266 sem_eval.ads: Minor reformatting.
267
268 2014-01-22 Thomas Quinot <quinot@adacore.com>
269
270 * sem_eval.adb (Compile_Time_Known_Bounds): Return False for
271 Any_Composite to prevent cascaded errors.
272
273 2014-01-22 Yannick Moy <moy@adacore.com>
274
275 * errout.adb (Initialize): Do not insert special entry in Warnings
276 table in GNATprove_Mode.
277 * erroutc.adb (Set_Warnings_Mode_On): Add info in Warnings table in
278 GNATprove_Mode.
279 * gnat1drv.adb (Adjust_Global_Switches): Do not suppress frontend
280 warnings anymore.
281
282 2014-01-22 Robert Dewar <dewar@adacore.com>
283
284 * sem_prag.adb (Analyze_Initializes_In_Decl_Part): Handle null
285 initializes case.
286
287 2014-01-22 Robert Dewar <dewar@adacore.com>
288
289 * snames.ads-tmpl: Update header.
290
291 2014-01-22 Thomas Quinot <quinot@adacore.com>
292
293 * exp_util.adb (Insert_Actions): When inserting actions on a
294 short circuit operator that has already been analyzed, do not park
295 actions in node; instead introduce an N_Expression_With_Actions
296 and insert actions immediately.
297 Add guard for unexpected case of climbing up through statement
298 in Actions list of an N_Expression_With_Actions.
299 * sem_elab.adb (Insert_Elab_Check): Remove complex
300 specialized circuitry for the case where the context is already
301 analyzed, as it is not needed and introduces irregularities in
302 finalization. Instead rely on the above change to Insert_Actions
303 to ensure that late insertion on short circuit operators works
304 as expected.
305
306 2014-01-22 Ed Schonberg <schonberg@adacore.com>
307
308 * sem_ch4.adb (Operator_Check): Improve error message when an
309 operand of concatenation is an access type.
310
311 2014-01-22 Thomas Quinot <quinot@adacore.com>
312
313 * sem_dim.adb (Analyze_Dimension_Identifier): Add guard against
314 cascaded error.
315
316 2014-01-22 Ed Schonberg <schonberg@adacore.com>
317
318 * sem_ch8.adb (Find_Selected_Component): Handle properly the case
319 of an expanded name in a proper body, whose prefix is a package
320 in the context of the proper body, when there is a homonym of
321 the package declared in the parent unit.
322
323 2014-01-22 Robert Dewar <dewar@adacore.com>
324
325 * sem_warn.adb (Check_Use_Clause): Don't give no entities used
326 msg if errors found.
327 (Check_One_Unit): Same change.
328
329 2014-01-22 Robert Dewar <dewar@adacore.com>
330
331 * ug_words: Add missing/wrong entries for VMS warning switches.
332 * sem_prag.adb (Check_Duplicate_Pragma): Avoid flagging parent type.
333
334 2014-01-22 Jerome Guitton <guitton@adacore.com>
335
336 * mlib-tgt-specific-vxworks.adb (Get_Target_Suffix): Replace xscale by
337 arm.
338
339 2014-01-22 Robert Dewar <dewar@adacore.com>
340
341 * gnat_rm.texi, gnat_ugn.texi: Document passive task optimization
342
343 2014-01-22 Eric Botcazou <ebotcazou@adacore.com>
344
345 * gcc-interface/Makefile.in: Minor fixes.
346
347 2014-01-21 Robert Dewar <dewar@adacore.com>
348
349 * par-ch4.adb (P_If_Expression): Rewritten to improve error recovery.
350 * par-ch5.adb (P_Condition): New version with expression prescanned.
351 * par.adb (P_Condition): New version with expression prescanned.
352
353 2014-01-21 Robert Dewar <dewar@adacore.com>
354
355 * gnat_rm.texi: Document that Allow_Integer_Address is ignored
356 if Address is not a private type.
357 * sem_prag.adb (Analyze_Pragma, case Allow_Integer_Address):
358 Ignore pragma if System.Address is not a private type.
359
360 2014-01-21 Arnaud Charlet <charlet@adacore.com>
361
362 * namet.ads (Name_Len): Initialize to 0 to avoid accessing an
363 uninitialized value.
364
365 2014-01-21 Thomas Quinot <quinot@adacore.com>
366
367 * gnat_rm.texi (Scalar_Storage_Order): Update documentation.
368
369 2014-01-21 Ed Schonberg <schonberg@adacore.com>
370
371 * sem_ch12.adb (Set_Instance_Env): In Ada 2012 mode, preserve
372 the value of Assertions_Enabled flag when compiling an instance of
373 an internal unit. This facilitates the use of pre/postconditions
374 in generic internal units, such as the new elementary function
375 libraries.
376
377 2014-01-21 Robert Dewar <dewar@adacore.com>
378
379 * exp_aggr.adb: Minor reformatting.
380 * sem_attr.adb: Minor reformatting.
381 * sem_res.adb: Minor comment addition.
382 * einfo.adb: Minor comment updates.
383 * freeze.adb: Minor reformatting and code reorganization.
384
385 2014-01-21 Ed Schonberg <schonberg@adacore.com>
386
387 * par-ch4.adb (P_If_Expression): Handle more gracefully an
388 elsif clause that does not have an else part.
389
390 2014-01-21 Robert Dewar <dewar@adacore.com>
391
392 * checks.adb, sem_util.ads, sem_ch4.adb: Minor reformatting.
393 * gcc-interface/Makefile.in: clean up target pairs.
394
395 2014-01-21 Pascal Obry <obry@adacore.com>
396
397 * projects.texi: Minor typo fix.
398
399 2014-01-21 Thomas Quinot <quinot@adacore.com>
400
401 * freeze.adb (Check_Component_Storage_Order): If a record type
402 has an explicit Scalar_Storage_Order attribute definition clause,
403 reject any component that itself is of a composite type and does
404 not have one.
405
406 2014-01-21 Ed Schonberg <schonberg@adacore.com>
407
408 * sem_ch10.adb (Generate_Parent_Reference): Make public so it
409 can be used to generate proper cross-reference information for
410 the parent units of proper bodies.
411
412 2014-01-21 Thomas Quinot <quinot@adacore.com>
413
414 * exp_pakd.adb (Expand_Packed_Element_Set,
415 Expand_Packed_Element_Reference): No byte swapping required in
416 the front-end for the case of a reverse storage order array,
417 as this is now handled uniformly in the back-end. However we
418 still need to swap back an extracted element if it is itself a
419 nested composite with reverse storage order.
420
421 2014-01-21 Hristian Kirtchev <kirtchev@adacore.com>
422
423 * sem_prag.adb (Analyze_External_Property): Add processing for "others".
424 (Analyze_Pragma): Update the grammar of pragma Abstract_State to
425 include "others".
426
427 2014-01-21 Arnaud Charlet <charlet@adacore.com>
428
429 * gnat_ugn.texi: Minor updates.
430
431 2014-01-21 Thomas Quinot <quinot@adacore.com>
432
433 * exp_pakd.adb: Update comment, minor reformatting.
434
435 2014-01-21 Hristian Kirtchev <kirtchev@adacore.com>
436
437 * sem_ch3.adb (Analyze_Variable_Contract): Trigger the volatile
438 object check when SPARK_Mode is on.
439 * sem_ch6.adb (Process_Formals): Trigger the volatile object
440 check when SPARK_Mode is on.
441 * sem_ch12.adb (Instantiate_Object): Trigger the volatile object
442 check when SPARK_Mode is on.
443 * sem_ch13.adb (Analyze_Aspect_Specifications): Insert the
444 corresponding pragma of aspect SPARK_Mode in the visible
445 declarations of a package declaration.
446 * sem_prag.adb (Analyze_Pragma): Trigger the volatile object
447 check when SPARK_Mode is on.
448 * sem_res.adb (Resolve_Actuals): Trigger the volatile object
449 check when SPARK_Mode is on.
450 (Resolve_Entity_Name): Trigger
451 the volatile object check when SPARK_Mode is on.
452
453 2014-01-21 Robert Dewar <dewar@adacore.com>
454
455 * sem_ch3.adb, sem_prag.adb, sem_prag.ads, sem_ch12.adb, sem_res.adb,
456 sem_ch6.adb, a-except-2005.adb: Minor reformatting.
457
458 2014-01-21 Ed Schonberg <schonberg@adacore.com>
459
460 * exp_ch3.adb (Expand_N_Object_Declaration): When a class-wide
461 object is declared, it is rewritten as a renaming of an dynamic
462 expression that wraps the initial value. The renaming declaration
463 is first given an internal name, to prevent collisions with the
464 entity already declared, and then the name is modified to reflect
465 the original one. the modification of the name must preserve
466 the source location of the original, to prevent spurious errors
467 when compiling with style checks if the declaration involves
468 more than one entity.
469
470 2014-01-21 Hristian Kirtchev <kirtchev@adacore.com>
471
472 * aspects.adb Add entries for Async_Readers, Async_Writers,
473 Effective_Reads and Effective_Writes in table Canonical_Aspect.
474 * aspects.ads Add entries for Async_Readers, Async_Writers,
475 Effective_Reads and Effective_Writes in tables Aspect_Id,
476 Aspect_Names, Aspect_Delay and Implementation_Defined_Aspect.
477 * atree.adb (Ekind_In): New version with 8 parameters.
478 (Node34): New routine.
479 (Set_Node34): New routine.
480 * atree.ads (Ekind_In): New version with 8 parameters.
481 (Node34): New routine.
482 (Set_Node34): New routine.
483 * einfo.adb Contract is now Node34.
484 (Contract): Update the assertion and node usage.
485 (Get_Pragma): Include pragmas Async_Readers, Async_Writers,
486 Effective_Reads and Effective_Writes.
487 (Set_Contract): Update the assertion and node usage.
488 (Write_Field24_Name): Remove the output for a contract.
489 (Write_Field34_Name): Add output for a contract.
490 * einfo.ads Contract is now Node34. Update the comment on
491 attribute usage and related node structures.
492 (Get_Pragma): Update the comment on usage.
493 * par-prag.adb (Prag): Pragmas Async_Readers, Async_Writers,
494 Effective_Reads and Effective_Writes do not require special
495 processing by the parser.
496 * sem_ch3.adb (Analyze_Variable_Contract): New routine.
497 (Analyze_Declarations): Analyze the contract of a variable at
498 the end of the declarative region.
499 (Analyze_Object_Declaration): Create a contract for a variable.
500 * sem_ch6.adb (Analyze_Subprogram_Contract): Update the retrieval
501 of classification pragmas.
502 (Process_Formals): Detect an illegal
503 use of a volatile object as a formal in a function.
504 * sem_ch12.adb (Instantiate_Object): Detect an illegal use of
505 a volatile object as an actual in generic instantiation.
506 * sem_prag.adb Add entries for Async_Readers, Async_Writers,
507 Effective_Reads and Effective_Writes in table Sig_Flags.
508 (Analyze_External_State_In_Decl_Part): New routine.
509 (Analyze_Global_Item): Detect an illegal use of a volatile object
510 as a global item of a function.
511 (Analyze_Pragma): Reimplement
512 pragma Abstract_State. Add support for pragmas Async_Readers,
513 Async_Writers, Effective_Reads and Effective_Writes.
514 (Check_External_Properties): New routine.
515 * sem_prag.ads (Analyze_External_State_In_Decl_Part): New routine.
516 (Check_External_Properties): New routine.
517 * sem_res.adb (Resolve_Actuals): Detect an illegal use of a
518 volatile object as an actual in a call.
519 (Resolve_Entity_Name):
520 Add local variables Par, Prev and Usage_OK. Detect illegal
521 contexts of volatile objects.
522 * sem_util.adb (Add_Contract_Item): Add support for
523 pragmas associated with the contract of a variable.
524 (Async_Readers_Enabled): New routine.
525 (Async_Writers_Enabled): New routine.
526 (Effective_Reads_Enabled): New routine.
527 (Effective_Writes_Enabled): New routine.
528 (Has_Enabled_Property):
529 New routine.
530 (Is_Unchecked_Conversion_Instance): New routine.
531 (Is_Volatile_Object): Add support for entities that may denote
532 a volatile object.
533 * sem_util.ads (Add_Contract_Item): Update the
534 comment on usage.
535 (Async_Readers_Enabled): New routine.
536 (Async_Writers_Enabled): New routine.
537 (Effective_Reads_Enabled): New routine.
538 (Effective_Writes_Enabled): New routine.
539 (Is_Unchecked_Conversion_Instance): New routine.
540 * sinfo.ads Update the comment on the structure of N_Contract.
541 * snames.ads-tmpl Add predefined names for Async_Readers,
542 Async_Writers, Effective_Reads and Effective_Writes. Add
543 pragma ids for Async_Readers, Async_Writers, Effective_Reads
544 and Effective_Writes.
545
546 2014-01-21 Robert Dewar <dewar@adacore.com>
547
548 * exp_ch4.adb (Eval_Op_Expon): Use CRT_Safe_Compile_Time_Known_Value
549 * sem_eval.adb (Compile_Time_Known_Value): Remove special
550 handling of CRT mode (CRT_Safe_Compile_Time_Known_Value): New
551 function (Eval_Op_Expon): Add CRT_Safe in call to Test_Foldable
552 (Test_Foldable): Add CRT_Safe parameter
553 * sem_eval.ads (Compile_Time_Known_Value): Remove special
554 handling of CRT mode.
555 (CRT_Safe_Compile_Time_Known_Value): New function.
556
557 2014-01-21 Robert Dewar <dewar@adacore.com>
558
559 * sem_prag.adb (Analyze_Pragma, case SPARK_Mode): Fix problem
560 with pragma or aspect that applies to package spec or subprogram
561 spec.
562
563 2014-01-21 Robert Dewar <dewar@adacore.com>
564
565 * exp_aggr.adb: Minor reformatting.
566
567 2014-01-21 Johannes Kanig <kanig@adacore.com>
568
569 * gnat1drv.adb (Gnat1drv) remove obsolete reference to -gnatd.H.
570
571 2014-01-21 Bob Duff <duff@adacore.com>
572
573 * gnat_ugn.texi: Document the "checks" attribute in gnat2xml.
574
575 2014-01-21 Steve Baird <baird@adacore.com>
576
577 * gnat_rm.texi: Improve description of SPARK_Mode pragma.
578
579 2014-01-21 Vincent Celier <celier@adacore.com>
580
581 * prj-part.adb (Parse_Single_Project): Accept to extend a project
582 if it has only be imported by an project being extended. When a
583 project that has only been imported by a project being extended
584 is imported by another project that is not being extended,
585 reset the previous indication, so that it will be an error if
586 this project is extended later.
587 * prj-tree.adb (Create_Project): Include component From_Extended
588 in table Projects_HT
589 * prj-tree.ads (Project_Name_And_Node): New Boolean component
590 From_Extended
591
592 2014-01-21 Robert Dewar <dewar@adacore.com>
593
594 * atree.ads, atree.adb: Add Node33 and Set_Node33.
595 * einfo.ads, einfo.adb (SPARK_Pragma): New field (SPARK_Aux_Pragma):
596 New field (SPARK_Pragma_Inherited): New flag
597 (SPARK_Aux_Pragma_Inherited): New flag (SPARK_Mode_Pragmas):
598 Removed.
599 * lib.ads, lib.adb: Remove SPARK_Mode_Pragma, no longer used.
600 * opt.ads (SPARK_Mode_Pragma): New global variable.
601 * sem.ads: Add Save_SPARK_Mode_Pragma field to Scope_Stack_Entry.
602 * sem_ch3.adb: Use new SPARK_Mode data structures.
603 * sem_ch6.adb: Set SPARK_Mode fields in subprogram specs and bodies.
604 * sem_ch7.adb: Set SPARK_Mode fields in package spec and body entities.
605 * sem_ch8.adb (Push_Scope): Save SPARK_Mode_Pragma.
606 (Pop_Scope): Restore SPARK_Mode_Pragma.
607 * sem_prag.adb (Analyze_Pragma, case SPARK_Mode): Rewrite for
608 new data structures.
609
610 2014-01-21 Arnaud Charlet <charlet@adacore.com>
611
612 * back_end.adb: Undo previous change, not needed. Minor reformatting.
613
614 2014-01-21 Thomas Quinot <quinot@adacore.com>
615
616 * exp_ch5.adb: Fix comment.
617 * switch-c.adb: Minor comment update.
618 * exp_ch3.adb: Minor reformatting.
619
620 2014-01-21 Arnaud Charlet <charlet@adacore.com>
621
622 * back_end.adb (Scan_Compiler_Arguments): Do not store object
623 filename in gnatprove mode.
624
625 2014-01-21 Thomas Quinot <quinot@adacore.com>
626
627 * sinfo.ads (No_Ctrl_Actions): Clarify documentation (flag also
628 suppresses usage of primitive _assign for tagged types).
629 * exp_aggr.adb (Build_Array_Aggr_Code.Gen_Assign): Set
630 No_Ctrl_Actions for a tagged type that does not require
631 finalization, as we want to disable usage of _assign (which
632 may cause undesirable discriminant checks on an uninitialized,
633 invalid target).
634
635 2014-01-21 Ed Schonberg <schonberg@adacore.com>
636
637 * sem_prag.adb: Reject invariant'class on completion.
638
639 2014-01-21 Javier Miranda <miranda@adacore.com>
640
641 * exp_ch3.adb (Build_Init_Procedure): For
642 derivations of interfaces, do not move the the initialization
643 of the _parent field since such assignment is not generated.
644
645 2014-01-21 Ed Schonberg <schonberg@adacore.com>
646
647 * sem_res.adb (Rewrite_Renamed_Operator): Do not replace entity
648 with the operator it renames if we are within an expression of
649 a pre/postcondition, because the expression will be reanalyzed
650 at a later point, and the analysis of the renaming may affect
651 the visibility of the operator when in an instance.
652
653 2014-01-21 Robert Dewar <dewar@adacore.com>
654
655 * sinfo.ads, sinfo.adb: Change Do_Discriminant_Check to use new Flag1.
656 Add this flag to type conversion nodes and assignment nodes.
657 * treepr.adb: Deal properly with Flag 1,2,3.
658 * treeprs.adt: Minor comment update.
659
660 2014-01-21 Robert Dewar <dewar@adacore.com>
661
662 * sem_eval.adb (Compile_Time_Known_Value): Add Ignore_CRT
663 parameter.
664 * sem_eval.ads (Compile_Time_Known_Value): Add Ignore_CRT
665 parameter, completely rewrite spec.
666
667 2014-01-21 Ed Schonberg <schonberg@adacore.com>
668
669 * sem_ch10.adb (Install_Withed_Unit): If the unit is a subprogram
670 instance that is inlined, it may have been rewritten as a wrapper
671 package. In that case the unit that must be made visible is the
672 related instance of the package.
673
674 2014-01-21 Arnaud Charlet <charlet@adacore.com>
675
676 * exp_ch9.adb (Expand_N_Selective_Accept.Add_Accept): Refine
677 previous change in codepeer mode.
678
679 2014-01-21 Arnaud Charlet <charlet@adacore.com>
680
681 * exp_ch9.adb (Expand_N_Selective_Accept.Add_Accept): Always add
682 call to Abort_Undefer, as expected by the runtime.
683 * s-tasren.adb (Local_Complete_Rendezvous): Replace
684 Defer_Abort_Nestable by Defer_Abort, since we do not expect abort to be
685 deferred at this point. Update comments.
686
687 2014-01-21 Thomas Quinot <quinot@adacore.com>
688
689 * exp_ch4.adb, exp_ch5.adb, checks.adb: Minor reformatting.
690
691 2014-01-21 Arnaud Charlet <charlet@adacore.com>
692
693 * switch-c.adb, usage.adb, gnat_ugn.texi: Mark -gnates as internal,
694 remove from doc.
695
696 2014-01-21 Robert Dewar <dewar@adacore.com>
697
698 * switch-c.adb, usage.adb, atree.adb, atree.ads: Minor reformatting.
699
700 2014-01-21 Thomas Quinot <quinot@adacore.com>
701
702 * atree.adb, atree.ads (Num_Extension_Nodes): Switch to Node_Id, since
703 this is value is used in Node_Id arithmetic operations.
704 (Copy_Node, Exchange_Entities): Use loops indexed by Num_Extension_Nodes
705 instead of hard-coded unrolled code.
706
707 2014-01-21 Yannick Moy <moy@adacore.com>
708
709 * gnat1drv.adb: Minor code cleanup, removing useless code.
710
711 2014-01-21 Arnaud Charlet <charlet@adacore.com>
712
713 * opt.ads (SPARK_Switches_File_Name): New.
714 * switch-c.adb (Scan_Front_End_Switches): Add handling of -gnates=xxx *
715 * usage.adb (Usage): Document -gnates, in gnatprove mode only.
716 * gnat_ugn.texi: Document -gnates.
717
718 2014-01-21 Yannick Moy <moy@adacore.com>
719
720 * errout.adb (Special_Msg_Delete): Update comment. Remove
721 special case for GNATprove which should not ignore mismatch
722 in sizes for representation clauses.
723 * sem_prag.adb (Analyze_Pragma): Remove special case for GNATprove
724 which should not ignore pragma Pack.
725
726 2014-01-21 Ed Schonberg <schonberg@adacore.com>
727
728 * sem_ch4.adb: Code clean up.
729
730 2014-01-21 Steve Baird <baird@adacore.com>
731
732 * gnat_rm.texi: Improve GNAT RM description of SPARK_Mode pragma.
733
734 2014-01-21 Robert Dewar <dewar@adacore.com>
735
736 * gcc-interface/gigi.h: Get Flags array address.
737 * gcc-interface/trans.c: Acquire Flags array address.
738 * atree.adb: Add support for Flags array and Flag0,1,2,3.
739 * atree.ads: Add support for Flags array and Flag0,1,2,3.
740 * atree.h: Add support for Flags array and Flag0,1,2,3.
741 * back_end.adb: Pass Flags array address to gigi.
742
743 2014-01-21 Ed Schonberg <schonberg@adacore.com>
744
745 * sem_ch8.adb (Attribute_Renaming): Transfer original attribute
746 reference to generated body so that legality checks on stream
747 attributes are properly applied. If type is tagged and already
748 frozen, insert generated body at the point of the renaming
749 declaration.
750
751 2014-01-21 Ed Schonberg <schonberg@adacore.com>
752
753 * sem_ch12.adb: Code clean up.
754 * sem_ch8.adb: Minor reformatting
755
756 2014-01-20 Robert Dewar <dewar@adacore.com>
757
758 * checks.adb: Check SPARK_Mode instead of GNATProve_Mode for
759 converting warnings on inevitable exceptions to errors.
760 * exp_ch4.adb: Check SPARK_Mode instead of GNATProve_Mode for
761 converting warnings on inevitable exceptions to errors.
762 * opt.adb (SPARK_Mode_Config): Handled like other config flags
763 * opt.ads (SPARK_Mode_Type): Moved here from types (renamed from
764 SPARK_Mode_Id) (SPARK_Mode_Type): Add pragma Ordered, remove
765 SPARK_ from names (SPARK_Mode): New flag (SPARK_Mode_Config):
766 New flag (Config_Switches_Type): Add SPARK_Mode field
767 * sem.adb: Minor code reorganization (remove unnecessary with)
768 * sem.ads (Scope_Stack_Entry): Add Save_SPARK_Mode field
769 * sem_aggr.adb: Check SPARK_Mode instead of GNATProve_Mode for
770 converting warnings on inevitable exceptions to errors.
771 * sem_attr.adb: Check SPARK_Mode instead of GNATProve_Mode for
772 converting warnings on inevitable exceptions to errors.
773 * sem_ch3.adb: Check SPARK_Mode instead of GNATProve_Mode for
774 converting warnings on inevitable exceptions to errors.
775 * sem_ch4.adb: Check SPARK_Mode instead of GNATProve_Mode for
776 converting warnings on inevitable exceptions to errors.
777 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Reset SPARK_Mode
778 from spec if needed
779 * sem_ch7.adb (Analyze_Package_Body_Helper): Reset SPARK_Mode
780 from spec if needed
781 * sem_ch8.adb (Push_Scope): Save SPARK_Mode (Pop_Scope):
782 Restore SPARK_Mode
783 * sem_elab.adb: Check SPARK_Mode instead of GNATProve_Mode for
784 converting warnings on inevitable exceptions to errors.
785 * sem_prag.adb (Get_SPARK_Mode_From_Pragma): New function
786 (Get_SPARK_Mode_Id): Removed (Get_SPARK_Mode_Type): New name
787 of Get_SPARK_Mode_Id
788 * sem_prag.ads (Get_SPARK_Mode_From_Pragma): New function
789 * sem_res.adb: Check SPARK_Mode instead of GNATProve_Mode for
790 converting warnings on inevitable exceptions to errors.
791 * sem_util.adb: Check SPARK_Mode instead of GNATProve_Mode for
792 converting warnings on inevitable exceptions to errors.
793 * types.ads (SPARK_Mode_Id): Moved to opt.ads and renamed
794 SPARK_Mode_Type
795
796 2014-01-20 Ed Schonberg <schonberg@adacore.com>
797
798 * sem_ch13.adb: Add semantic information to rewritten type
799 reference.
800
801 2014-01-20 Ed Schonberg <schonberg@adacore.com>
802
803 * exp_ch5.adb (Expand_N_Assignment_Statement): If both sides
804 are of a type with unknown discriminants, convert both to the
805 underlying view of the type, so that the proper constraint check
806 can be applied to the right-hand side.
807
808 2014-01-20 Robert Dewar <dewar@adacore.com>
809
810 * atree.adb (Copy_Node): Fix failure to copy last component
811 (Exchange_Entities): Fix failure to exchange last entity
812
813 2014-01-20 Ed Schonberg <schonberg@adacore.com>
814
815 * sem_ch12.adb: Code clean up.
816
817 2014-01-20 Robert Dewar <dewar@adacore.com>
818
819 * gnat_rm.texi, sem_ch4.adb: Minor reformatting.
820
821 2014-01-20 Ed Schonberg <schonberg@adacore.com>
822
823 * sem_ch4.adb (Analyze_Quantified_Expression): If after
824 pre-analysis the loop parameter specification has been
825 rewritten as a iterator specification, propagate the change to
826 the quantified expression, for ASIS navigtion needs.
827
828 2014-01-20 Vincent Celier <celier@adacore.com>
829
830 * par-ch10.adb: Minor error message change: escape [ and ].
831
832 2014-01-20 Robert Dewar <dewar@adacore.com>
833
834 * checks.adb: Make warnings on exceptions into errors in GNATprove mode.
835 * errout.adb: Implement [ and ] insertion characters.
836 * errout.ads: Document new [ and ] insertion characters.
837 * sem_ch12.adb, restrict.adb, frontend.adb, exp_ch7.adb: Minor
838 addition of ??? comment.
839 * lib-xref.adb, exp_util.adb, gnat1drv.adb: Minor reformatting
840 * exp_ch4.adb, sem_ch3.adb, sem_ch4.adb, sem_ch6.adb, sem_elab.adb,
841 sem_eval.adb, sem_res.adb, sem_util.adb, sem_attr.adb, sem_aggr.adb:
842 Make warnings on exceptions into errors in GNATprove mode.
843 * sem_dim.adb: Minor reformatting throughout Quote [ and ]
844 in error messages.
845
846 2014-01-20 Ed Schonberg <schonberg@adacore.com>
847
848 * sem_ch13.adb: Code clean up.
849
850 2014-01-20 Robert Dewar <dewar@adacore.com>
851
852 * errout.ads, errout.adb: Implement >? >x? >X? sequences in error
853 messages.
854 * sem_ch6.adb (Check_Statement_Sequence): Missing return is an
855 error in GNATprove mode.
856
857 2014-01-20 Ed Schonberg <schonberg@adacore.com>
858
859 * par-ch4.adb (Is_Parameterless_Attribute): The Ada2012 attribute
860 reference 'Old takes no parameters, and thus can appear as a
861 prefix of a slice.
862
863 2014-01-20 Eric Botcazou <ebotcazou@adacore.com>
864
865 * exp_aggr.adb: Fix minor typos.
866
867 2014-01-20 Ed Schonberg <schonberg@adacore.com>
868
869 * sem_attr.adb (Analyze_Attribute, case 'Constrained): In an
870 instance the attribute is legal, and its value is determined
871 statically if the type has no discriminants. This choice is
872 more useful than rechecking the legality rule in the instance,
873 is consistent with older usage, and is also consistent with all
874 existing tests.
875
876 2014-01-20 Arnaud Charlet <charlet@adacore.com>
877
878 * sem_cat.adb (Validate_Static_Object_Name): Change error into
879 warning in Relaxed_Semantic_Mode.
880
881 2014-01-20 Ed Schonberg <schonberg@adacore.com>
882
883 * sem_attr.adb: Code and comments cleanup.
884
885 2014-01-20 Yannick Moy <moy@adacore.com>
886
887 * debug.adb Free debug flags -gnatd.D, -gnatd.G and -gnatd.V *
888 * errout.adb (Compilation_Errors): Remove special handling in
889 GNATprove mode.
890 * gnat1drv.adb (Adjust_Global_Switches): Remove handling of the
891 removed debug flags.
892 * gnat_rm.texi: Initial documentation for Abstract_State, Depends,
893 Global, Initial_Condition, Initializes and Refined_State pragmas and
894 aspects.
895 * opt.ads (Frame_Condition_Mode, Formal_Extensions,
896 SPARK_Strict_Mode): Remove global flags.
897 * sem_ch3.adb (Analyze_Object_Declaration): Check of no hidden state
898 always performed now, on packages declaring a null state.
899 (Signed_Integer_Type_Declaration): Remove ill-designed attempt
900 at providing pedantic mode for bounds of integer types.
901 * sem_ch4.adb (Analyze_Quantified_Expression): Warning on suspicious
902 "some" quantified expression now issued under control of -gnatw.t,
903 like the other warning on unused bound variable.
904 * sem_prag.adb (Check_Precondition_Postcondition): Remove useless test
905 on removed flag.
906 (Analyze_Pragma): Remove tests for SPARK 2014
907 pragmas, not officially allowed by GNAT.
908
909 2014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
910
911 * sem_prag.adb (Analyze_Pragma): Ensure that
912 the sole argument of pragmas Abstract_State, Contract_Cases,
913 Depends, Global and Initializes in in aggregate form.
914 (Analyze_Refined_Pragma): Ensure that the sole argument of
915 pragmas Refined_Depends, Refined_Global and Refined_State is in
916 aggregate form.
917 (Ensure_Aggregate_Form): New routine.
918
919 2014-01-20 Doug Rupp <rupp@adacore.com>
920
921 * sem_attr.adb (Analyze_Attribute): case
922 Attribute_Constrained => treat all prefixes as legal for Declib
923 compatibility.
924
925 2014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
926
927 * sem_prag.adb (Check_Mode): Reimplement the routine.
928 (Find_Mode): New routine.
929
930 2014-01-20 Robert Dewar <dewar@adacore.com>
931
932 * sem_ch4.adb (Operator_Check): Handle additional
933 Allow_Integer_Address cases.
934
935 2014-01-20 Robert Dewar <dewar@adacore.com>
936
937 * gnat_rm.texi (Allow_Integer_Address): Remove note about not
938 allowed if address is non-private, no longer true.
939 * sem_prag.adb (Analyze_Pragma, case Allow_Integer_Address):
940 Remove check for address being private, causes difficulty when
941 pragma used in gnat.adc file and is not needed, since we guard
942 this in Address_Integer_Convert_OK.
943 * exp_ch7.adb: Minor reformatting.
944 * sem_ch4.adb: Handle operator operands in Allow_Integer_Address mode.
945
946 2014-01-20 Robert Dewar <dewar@adacore.com>
947
948 * checks.adb (Apply_Range_Check): Remove gnatprove special
949 casing of exponentiation.
950 * sem_res.adb (Resolve_Op_Expon): Apply range check to right
951 operand for integer case to check range against Natural.
952
953 2014-01-20 Robert Dewar <dewar@adacore.com>
954
955 * s-tataat.adb: Minor reformatting.
956
957 2014-01-20 Robert Dewar <dewar@adacore.com>
958
959 * einfo.adb (Is_Descendent_Of_Address): Now applies to all
960 entities, and also fix documentation to remove mention of visible
961 integer type, since this is not what the implementation does.
962 * einfo.ads (Is_Descendent_Of_Address): Now applies to all
963 entities, and also fix documentation to remove mention of visible
964 integer type, since this is not what the implementation does.
965 * gnat_rm.texi: Minor clarification of Allow_Integer_Address
966 function.
967 * sem_ch4.adb (Analyze_One_Call): Handle Allow_Integer_Address
968 case for parameter type check.
969 * sem_res.adb (Resolve): Use new function
970 Address_Integer_Convert_OK.
971 * sem_type.adb: Minor code reorganization (use Ekind_In) Minor
972 reformatting throughout.
973 * sem_util.adb (Address_Integer_Convert_OK): New function.
974 * sem_util.ads: Minor reformatting (put specs in alpha order)
975 (Address_Integer_Convert_OK): New function.
976
977 2014-01-20 Thomas Quinot <quinot@adacore.com>
978
979 * exp_ch7.adb (Wrap_Transient_Expression):
980 Insertion extra conditional expression only if
981 Opt.Suppress_Control_Flow_Optimizations is set.
982
983 2014-01-20 Arnaud Charlet <charlet@adacore.com>
984
985 * s-tataat.adb (Initialize_Attributes): Abort might already be
986 deferred in Create_Task.
987
988 2014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
989
990 * checks.adb (Apply_Scalar_Range_Check): Flag
991 the exponent as requiring a range check when the expression is
992 an exponentiation.
993
994 2014-01-20 Fedor Rybin <frybin@adacore.com>
995
996 * gnat_ugn.texi: Documenting --passed-tests option for gnattest.
997
998 2014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
999
1000 * sem_util.adb (Default_Initialization): New routine.
1001 * sem_util.ads: Add new type Default_Initialization_Kind.
1002 (Default_Initialization): New routine.
1003
1004 2014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
1005
1006 * sem_prag.adb (Check_Mode): Correct all error
1007 message logic dealing with in/in out parameters that may appear
1008 as inputs or have a self reference.
1009
1010 2014-01-20 Robert Dewar <dewar@adacore.com>
1011
1012 * exp_ch9.adb, checks.adb, exp_intr.adb: Minor reformatting.
1013 * sem_res.adb (Resolve): Fix error causing infinite loop for
1014 integer used as address. Allow addresses as integers.
1015
1016 2014-01-20 Arnaud Charlet <charlet@adacore.com>
1017
1018 * s-osinte-linux.ads (struct_sigaction): Fix rep clause.
1019
1020 2014-01-20 Bob Duff <duff@adacore.com>
1021
1022 * par-ch8.adb (P_Use_Type_Clause): Detect syntax
1023 error when "use all" is not followed by "type".
1024
1025 2014-01-20 Bob Duff <duff@adacore.com>
1026
1027 * exp_intr.adb (Expand_Unc_Deallocation): Remove warning on abort
1028 followed by free.
1029
1030 2014-01-20 Ed Schonberg <schonberg@adacore.com>
1031
1032 * checks.adb (Apply_Address_Clause_Check): If there is an
1033 alignment check on the expression in an address clause, and there
1034 is no local exception propagation, add an additional explanatory
1035 message to clarify the cause of previous warning.
1036
1037 2014-01-20 Robert Dewar <dewar@adacore.com>
1038
1039 * exp_ch7.adb: Minor reformatting.
1040 * opt.ads: Minor comment updates.
1041 * sem.adb: Minor name change Is_Main_Unit =>
1042 Is_Main_Unit_Or_Main_Unit_Spec.
1043 * sem_ch6.adb: Minor reformatting and code reorganization.
1044
1045 2014-01-20 Bob Duff <duff@adacore.com>
1046
1047 * gnat_ugn.texi: Update gnatpp switches.
1048
1049 2014-01-20 Thomas Quinot <quinot@adacore.com>
1050
1051 * exp_ch9.adb: Minor comment edit.
1052
1053 2014-01-20 Robert Dewar <dewar@adacore.com>
1054
1055 * gnat_rm.texi: Document that Allow_Integer_Address is permitted
1056 only if System.Address is a private type.
1057 * opt.ads (Allow_Integer_Address): No longer set by -gnates.
1058 * sem_prag.adb (Analyze_Pragma, case Allow_Integer_Address):
1059 Allowed only if type System.Address is private, since otherwise
1060 it makes no sense.
1061 * sem_res.adb: Fix failure to properly Analyze unchecked
1062 conversions that were introduced by Allow_Integer_Address.
1063 * switch-c.adb: Remove -gnates switch.
1064 * usage.adb: Remove -gnates switch.
1065 * gnat_ugn.texi: Remove documentation of -gnates flag.
1066
1067 2014-01-20 Ed Schonberg <schonberg@adacore.com>
1068
1069 * sem_ch6.adb (Analyze_Expression_Function): Pre-analyze and
1070 resolve expression to perform proper name capture.
1071
1072 2014-01-20 Ed Schonberg <schonberg@adacore.com>
1073
1074 * sem.adb (Semantics): When saving/restoring configuration
1075 switches, the spec of a pre- defined unit that is the main unit
1076 must be treated as a predefined unit as well.
1077
1078 2014-01-20 Thomas Quinot <quinot@adacore.com>
1079
1080 * exp_ch7.adb (Wrap_Transient_Expression): For a Boolean
1081 expression, insert an extra conditional expression when saving
1082 the value of the expression, for the benefit of control flow
1083 graph based coverage analysis.
1084 * exp_ch3.adb: Minor reformatting.
1085
1086 2014-01-20 Robert Dewar <dewar@adacore.com>
1087
1088 * gnat1drv.adb: Set Allow_Integer_Address in relaxed semantics mode.
1089 * gnat_rm.texi: Document pragma Allow_Integer_Address.
1090 * gnat_ugn.texi: Document pragma Allow_Integer_Address, -gnates.
1091 * opt.ads: New flag Allow_Integer_Address.
1092 * par-prag.adb: Dummy entry for pragma Allow_Integer_Address.
1093 * sem_ch5.adb: Minor reformatting.
1094 * sem_prag.adb: Implement pragma Allow_Integer_Address.
1095 * sem_res.adb (Resolve): Allow integer address value if
1096 switch set.
1097 * sem_util.adb: Minor reformatting.
1098 * snames.ads-tmpl: Add entry for pragma Allow_Integer_Address.
1099 * switch-c.adb: Recognize flag -gnates.
1100 * usage.adb: Document flag -gnates.
1101
1102 2014-01-20 Thomas Quinot <quinot@adacore.com>
1103
1104 * s-tadeca.adb: Fix minor typos in comment.
1105
1106 2014-01-20 Pascal Obry <obry@adacore.com>
1107
1108 * s-win32.ads (FreeLibrary): New import.
1109
1110 2014-01-20 Robert Dewar <dewar@adacore.com>
1111
1112 * sem_res.adb, sem_cat.adb: Minor reformatting.
1113 * sem_ch11.adb (Analyze_Raise_Statement): Only give warning about
1114 assigning to OUT parameters for the current subprogram scope.
1115 * exp_ch4.adb: Minor reformatting.
1116
1117 2014-01-20 Ed Schonberg <schonberg@adacore.com>
1118
1119 * exp_ch4.adb (Process_Transient_Object,
1120 Find_Enclosing_Contexts): If the top-level if-expression that
1121 generated the transient object is an actual in a call, the proper
1122 Hook_Context is a construct enclosing the call.
1123 * einfo.ads: Indicate that Related_Expression is used to link a
1124 loop variable to the container expression over which the loop
1125 takes place.
1126 (Analyze_Iterator_Specification): Set the Related_Expression of
1127 the loop variable in a container element iterator.
1128 (Note_Possible_Modification): If the variable is the loop
1129 variable in a container element iterator, indicate that the
1130 enclosing container is also modified.
1131
1132 2014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
1133
1134 * aspects.adb (Move_Or_Merge_Aspects): Reimplemented.
1135
1136 2014-01-20 Robert Dewar <dewar@adacore.com>
1137
1138 * s-taasde.ads, gnat_ugn.texi, s-tadeca.adb, sem_res.adb, s-tadeca.ads:
1139 Minor reformatting and code clean up.
1140
1141 2014-01-20 Arnaud Charlet <charlet@adacore.com>
1142
1143 * sem_cat.adb (Validate_Object_Declaration): Relax semantics
1144 of objects of private type if Relaxed_RM_Semantics.
1145
1146 2014-01-20 Claire Dross <dross@adacore.com>
1147
1148 * a-cofove.ads (Vector): Capacity discriminant
1149 should be in range of the index.
1150
1151 2014-01-20 Thomas Quinot <quinot@adacore.com>
1152
1153 * a-caldel.ads(To_Duration), s-taasde.ads(Time_Enqueue):
1154 Clarify specs s-tadeca.adb(Enqueue_Calendar): Compensate for
1155 possible difference between epoch of Ada.Calendar clock and Ada
1156 real-time/tasking clock.
1157 * s-taprop-posix.adb: Minor comment fix.
1158
1159 2014-01-20 Doug Rupp <rupp@adacore.com>
1160
1161 * sysdep.c [vxworks]: Remove Vxworks version noise for RTP.
1162
1163 2014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
1164
1165 * exp_attr.adb (Expand_N_Attribute_Reference): Generate validity
1166 checks on the prefix of attribute 'Old.
1167 * sem_ch3.adb (Process_Range_Expr_In_Decl): Suppress the
1168 generation of validity checks on a range that belongs to the
1169 iteration scheme of a quantified expression.
1170 * sem_ch5.adb (One_Bound): Suppress the generation of validity
1171 checks on a bound that belongs to the iteration scheme of a
1172 quantified expression, generate the check in all other cases.
1173
1174 2014-01-20 Bob Duff <duff@adacore.com>
1175
1176 * gnat_ugn.texi: Enable --pp-new by default. Minor reorganization.
1177
1178 2014-01-20 Ed Schonberg <schonberg@adacore.com>
1179
1180 * sem_res.adb (Resolve): When compiling a predefined unit, ignore
1181 interpretations that do not come from other predefined units,
1182 to prevent spurious ambiguities in the presence of user-defined
1183 operators in the context of (an instance of) a predefined unit.
1184
1185 2014-01-20 Robert Dewar <dewar@adacore.com>
1186
1187 * gnat_rm.texi: Document that Loop_Variant is included in
1188 Statement_Assertions.
1189 * sem_prag.adb (Check_Kind): Add Loop_Variant to
1190 Statement_Assertions (Check_Applicable_Policy): Add Loop_Variant
1191 to Statement_Assertions.
1192
1193 2014-01-20 Doug Rupp <rupp@adacore.com>
1194
1195 * sysdep.c (__gnat_is_file_not_found_error) [vxworks6]: Add case
1196 for errno ENOENT from RTP on NFS mounted file system.
1197
1198 2014-01-20 Ed Schonberg <schonberg@adacore.com>
1199
1200 * sem_util.adb (Check_Function_Writable_Actuals): 1) Do not
1201 examine code that does not come from source. The check does not
1202 apply to code generated for constraint checks, and such code may
1203 generate spurious error messages when compiled with expansion
1204 disabled (as in a generic unit) because side effects may not
1205 have been removed.
1206 2) Make error messages more explicit: indicate the component
1207 of the construct whose value is indeterminate because of a
1208 call to a function with in-out parameter in another component,
1209 when there is no mandated order of execution between the two
1210 components (actuals, aggregate components, alternatives).
1211
1212 2014-01-20 Robert Dewar <dewar@adacore.com>
1213
1214 * gnat_rm.texi: Minor cleanup.
1215
1216 2014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
1217
1218 * sem_attr.adb (Analyze_Attribute): Attributes 'Old and 'Result
1219 can now apply to a refined postcondition.
1220 * sem_ch6.adb (Analyze_Subprogram_Contract): Remove local
1221 variable Result_Seen. Add variables Case_Prag, Post_Prag,
1222 Seen_In_Case and Seen_In_Post. Update the mechanism that detects
1223 whether postconditions and/or constract-cases mention attribute
1224 'Result and introduce a post-state when applied to functions.
1225 (Check_Result_And_Post_State): Removed.
1226 * sem_prag.adb (Analyze_Pragma): Add local variable
1227 Result_Seen. Verify that the expression of pragma Refined_Post
1228 mentions attribute 'Result and introduces a post-state.
1229 * sem_util.ads, sem_util.adb (Check_Result_And_Post_State): New routine.
1230
1231 2014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
1232
1233 * exp_ch7.adb (Is_Subprogram_Call): New routine.
1234 (Process_Transient_Objects): Make variable Must_Hook global with
1235 respect to all locally declared subprograms. Search the context
1236 for at least one subprogram call.
1237 (Requires_Hooking): Removed.
1238
1239 2014-01-20 Claire Dross <dross@adacore.com>
1240
1241 * a-cfdlli.ads a-cfhama.ads a-cfhase.ads a-cforma.ads
1242 * a-cforse.ads a-cofove.ads: Add pragma Annotate (GNATprove,
1243 External_Axiomatization);
1244
1245 2014-01-20 Robert Dewar <dewar@adacore.com>
1246
1247 * sem_attr.adb (Analyze_Attribute, case Loop_Entry): Allow
1248 Loop_Entry in Assert, Assert_And_Cut, and Assume pragmas.
1249 * sem_prag.adb (Analyze_Pragma, case Assert[_And_Cut], Assume):
1250 Allow Loop_Entry to be used in these pragmas if they appear in
1251 an appropriate context.
1252 (Placement_Error): Specialize error
1253 message for pragma Assert[_And_Cut] or pragma Assume containing
1254 Loop_Entry attribute.
1255 * a-exexpr-gcc.adb, sinput.adb: Minor reformatting.
1256 * s-excmac-arm.ads, s-except.ads, s-excmac-gcc.ads: Minor reformatting
1257 and code clean ups.
1258
1259 2014-01-20 Robert Dewar <dewar@adacore.com>
1260
1261 * gnat1drv.adb: Minor comment update.
1262
1263 2014-01-20 Tristan Gingold <gingold@adacore.com>
1264
1265 * raise-gcc.c (PERSONALITY_FUNCTION/arm): Remove unused
1266 variables, comment out unused code.
1267 * a-exexpr-gcc.adb: Move declarations to s-excmac-gcc.ads
1268 * s-excmac-gcc.ads: New file, extracted from a-exexpr-gcc.adb
1269 * s-excmac-arm.ads: New file.
1270
1271 2014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
1272
1273 * exp_ch4.adb (Expand_N_Slice): Remove constant D and variables
1274 Drange and Index_Typ. Remove the circuitry which creates a
1275 range check to compare the index type of the array against the
1276 discrete_range.
1277 * sem_res.adb (Resolve_Slice): Add local variable Dexpr. Update
1278 the circuitry which creates a range check to handle a
1279 discrete_range denoted by a subtype indication.
1280
1281 2014-01-20 Pierre-Marie Derodat <derodat@adacore.com>
1282
1283 * sinput.adb, sinput.ads (Sloc_Range): Traverse the tree of original
1284 nodes to get the original sloc range.
1285
1286 2014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
1287
1288 * sem_prag.adb (Analyze_Pragma): Use Defining_Entity to obtain the
1289 entity of a [library level] package.
1290
1291 2014-01-20 Tristan Gingold <gingold@adacore.com>
1292
1293 * raise-gcc.c (exception_class_eq): New function.
1294 (is_handled_by): Use it to compare exception classes.
1295 (PERSONALITY_STORAGE): Define. (continue_unwind): New function to
1296 be called to return URC_CONTINUE_UNWIND.
1297 (personality_body): New function, extracted from PERSONALITY_ROUTINE.
1298 (PERSONALITY_ROUTINE): Add an implementation for the ARM unwinder.
1299
1300 2014-01-20 Robert Dewar <dewar@adacore.com>
1301
1302 * opt.ads: Minor comment update.
1303
1304 2014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
1305
1306 * exp_ch4.adb (Expand_N_Slice): Relocate some variables and
1307 constants to the "Local variables" area. Add new constant D. Add
1308 new variables Drange and Index_Typ. Rename Pfx to Rep and Ptp
1309 to Pref_Typ and update all occurrences. Add circuitry to extract
1310 the discrete_range and the index type and build a range check.
1311
1312 2014-01-20 Arnaud Charlet <charlet@adacore.com>
1313
1314 * gnat1drv.adb (Adjust_Global_Switches): Enable
1315 Treat_Categorization_Errors_As_Warnings when Relaxed_RM_Semantics
1316 is set.
1317
1318 2014-01-20 Thomas Quinot <quinot@adacore.com>
1319
1320 * sem_ch5.adb, sem_ch4.adb: Minor reformatting.
1321
1322 2014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
1323
1324 * sem_ch13.adb (Analyze_Aspect_Specifications):
1325 When aspect SPARK_Mode appears on a package body, insert the
1326 generated pragma at the top of the body declarations.
1327
1328 2014-01-20 Robert Dewar <dewar@adacore.com>
1329
1330 * sem_aggr.adb, exp_prag.adb, sem_aux.adb, sinfo.ads, sem_ch10.adb,
1331 checks.adb, sem_prag.adb, sem_ch12.adb, freeze.adb, g-arrspl.adb,
1332 expander.adb, gnat1drv.adb, exp_ch4.adb, sem_ch6.adb,
1333 sem_ch8.adb, exp_dist.adb: Minor reformatting.
1334
1335 2014-01-20 Yannick Moy <moy@adacore.com>
1336
1337 * gnat1drv.adb (Gnat1drv): Call Write_ALI with Object=True in GNATprove
1338 mode.
1339
1340 2014-01-20 Pascal Obry <obry@adacore.com>
1341
1342 * g-arrspl.ads (Slice_Set): New definition (will use a copy on
1343 write scheme).
1344 * g-arrspl.adb: Adapt all routine to this new implementation.
1345 (Set): Copy the Slice_Set definition before reusing it.
1346
1347 2014-01-20 Arnaud Charlet <charlet@adacore.com>
1348
1349 * sem_prag.adb (Process_Import_Or_Interface): In
1350 Relaxed_RM_Semantics, support old Ada 83 style of pragma Import.
1351 (Analyze_Pragma): Ditto for pragma Export.
1352 * exp_prag.adb (Expand_Pragma_Import_Or_Interface): Handle old pragma
1353 Import style.
1354
1355 2014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
1356
1357 * einfo.ads: E_Abstract_State is now part of the entities that
1358 can be overloaded. Update type Overloadable_Kind to reflect the
1359 inclusion of abstract states.
1360 * sem_ch6.adb (New_Overloaded_Entity): A function can now
1361 overload an abstract state.
1362 * sem_prag.adb (Analyze_Constituent): Handle the overloading
1363 of states by functions. Use Entity_Of to obtain the entity of
1364 a constituent. (Analyze_Global_Item): Handle the overloading of
1365 states by functions.
1366 (Analyze_Initialization_Item): Handle the
1367 overloading of states by functions. Use Entity_Of to obtain the
1368 entity of an item.
1369 (Analyze_Input_Item): Handle the overloading
1370 of states by functions. Use Entity_Of to obtain the entity of an item.
1371 (Analyze_Input_Output): Handle the overloading of states by functions.
1372 (Analyze_Refinement_Clause): Handle the overloading
1373 of states by functions. Use Entity_Of to obtain the entity of an item.
1374 (Appears_In): Use Entity_Of to obtain the entity of an element.
1375 (Check_Usage): Use Entity_Of to obtain the entity of
1376 an item. Add a guard to prevent a crash due to a previous error.
1377 (Resolve_State): New routine.
1378
1379 2014-01-20 Yannick Moy <moy@adacore.com>
1380
1381 * spark_xrefs.ads, debug.adb, gnat1drv.adb, errout.adb, errout.ads,
1382 opt.ads: Minor comments updates.
1383
1384 2014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
1385
1386 * einfo.adb (Non_Limited_View): Applies to abstract states.
1387 (Set_From_Limited_With): Applies to abstract states.
1388 (Set_Non_Limited_View): Applies to abstract states.
1389 (Write_Field17): Output the non-limited view of an abstract state.
1390 * einfo.ads: Update the comment on usage and occurrences in
1391 nodes for attributes From_Limited_With and Non_Limited_View.
1392 * sem_aux.adb (Available_View): This routine can now handle
1393 abstract states.
1394 * sem_aux.ads (Available_View): This routine can now handle
1395 abstract states. Update the comment on usage.
1396 * sem_ch8.adb (Find_Expanded_Name): Handle abstract views
1397 of states and variables.
1398 (In_Pragmas_Depends_Or_Global): New routine.
1399 * sem_ch10.adb (Build_Limited_Views): Implement
1400 abstract (limited) views of variables and states.
1401 (Build_Shadow_Entity): This routine is now a procedure. Add
1402 formal parameter Shadow. Update the comment on usage. Add
1403 context-specific decoration for states and variables.
1404 (Decorate_State): New routine. (Decorate_Variable): New routine.
1405 (Find_And_Process_States): New routine.
1406 (Process_Declarations): Renamed to Process_Declarations_And_States.
1407 (Process_Declarations_And_States): Add formal parameters
1408 Pack and Create_Abstract_Views. Update the comment on usage.
1409 (Process_States): New routine.
1410 * sem_prag.adb (Check_Dependency_Clause): Handle abstract
1411 views of states and variables. Match the abstract view of a state
1412 against its corresponding non-abstract view.
1413 (Is_Matching_Input):
1414 Handle abstract views of states and variables. Match the abstract
1415 view of a state against its corresponding non-abstract view.
1416 (Process_Global_Item): Handle abstract views of states and
1417 variables.
1418
1419 2014-01-20 Bob Duff <duff@adacore.com>
1420
1421 * sem_ch10.adb (Expand_With_Clause): Don't
1422 recurse on the prefix if the current with-ed name refers to a
1423 package that renames its own parent, eg "package P.Q renames P;".
1424
1425 2014-01-20 Yannick Moy <moy@adacore.com>
1426
1427 * exp_spark.adb (Expand_SPARK_Call): Remove procedure.
1428 * opt.adb, opt.ads (Full_Expander_Active): Remove function.
1429 * checks.adb, exp_ch6.adb, exp_ch9.adb, exp_disp.adb, sem_aggr.adb,
1430 * sem_ch10.adb, sem_ch5.adb, sem_ch6.adb, sem_ch8.adb, sem_ch9.adb,
1431 * sem_disp.adb, sem_res.adb Replace Full_Expander_Active by
1432 Expander_Active.
1433
1434 2014-01-20 Yannick Moy <moy@adacore.com>
1435
1436 * sinfo.ads Update documentation of GNATprove mode.
1437
1438 2014-01-20 Yannick Moy <moy@adacore.com>
1439
1440 * adabkend.adb, ali-util.adb, errout.adb, exp_ch7.adb,
1441 * exp_dbug.adb, freeze.adb, lib-xref.adb, restrict.adb,
1442 * sem_attr.adb, sem_ch4.adb, sem_ch5.adb, sem_ch6.adb, sem_ch8.adb,
1443 * sem_prag.adb, sem_res.adb, sem_util.adb Rename SPARK_Mode into
1444 GNATprove_Mode.
1445 * sem_ch13.adb: Remove blank.
1446 * exp_spark.adb, exp_spark.ads (Expand_SPARK_Call): Only replace
1447 subprograms by alias for renamings, not for inherited primitive
1448 operations.
1449 * exp_util.adb (Expand_Subtype_From_Expr): Apply the expansion
1450 in GNATprove mode.
1451 (Remove_Side_Effects): Apply the removal in
1452 GNATprove mode, for the full analysis of expressions.
1453 * expander.adb (Expand): Call the light SPARK expansion in GNATprove
1454 mode.
1455 (Expander_Mode_Restore, Expander_Mode_Save_And_Set): Ignore
1456 save/restore actions for Expander_Active flag in GNATprove mode,
1457 similar to what is done in ASIS mode.
1458 * frontend.adb (Frontend): Generic bodies are instantiated in
1459 GNATprove mode.
1460 * gnat1drv.adb (Adjust_Global_Switches): Set operating
1461 mode to Check_Semantics in GNATprove mode, although a light
1462 expansion is still performed.
1463 (Gnat1drv): Set Back_End_Mode to
1464 Declarations_Only in GNATprove mode, and later on special case
1465 the GNATprove mode to continue analysis anyway.
1466 * lib-writ.adb (Write_ALI): Always generate ALI files in
1467 GNATprove mode.
1468 * opt.adb, opt.ads (Full_Expander_Active): Make it equivalent to
1469 Expander_Active.
1470 (SPARK_Mode): Renamed as GNATprove_Mode.
1471 * sem_aggr.adb (Aggregate_Constraint_Checks): Add checks in the
1472 tree in GNATprove_Mode.
1473 * sem_ch12.adb (Analyze_Package_Instantiation): Always instantiate
1474 body in GNATprove mode.
1475 (Need_Subprogram_Instance_Body): Always instantiate body in GNATprove
1476 mode.
1477 * sem_ch3.adb (Constrain_Index, Process_Range_Expr_In_Decl):
1478 Make sure side effects are removed in GNATprove mode.
1479
1480 2014-01-20 Eric Botcazou <ebotcazou@adacore.com>
1481
1482 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Robustify tests
1483 for aliased objects with an unconstrained nominal subtype.
1484 * gcc-interface/trans.c (Call_to_gnu): Likewise.
1485 (gnat_to_gnu) <case N_Op_Not>: Robustify test for private type.
1486 <case N_Op_Minus>: Remove useless code.
1487 (Exception_Handler_to_gnu_zcx): Minor tweaks.
1488
1489 2014-01-20 Eric Botcazou <ebotcazou@adacore.com>
1490
1491 * gcc-interface/decl.c (gnat_to_gnu_entity) <case E_Record_Subtype>:
1492 Tidy up. For a subtype with discriminants and variant part, if a
1493 variant is statically selected and the fields all have a constant
1494 position, put them in order of increasing position. Likewise if
1495 no variant part but representation clause is present.
1496 * gcc-interface/utils.c (make_packable_type): Robustify.
1497 (maybe_pad_type): Use local variable and tidy up condition. If no
1498 alignment is specified, use the original one.
1499 (create_type_stub_decl): Minor tweak.
1500 (convert) <case VECTOR_CST>: Fix typo.
1501 <case CONSTRUCTOR>: Deal with padding types around the same type.
1502 Do not punt on missing fields.
1503 (unchecked_convert): Call finish_record_type to lay out the special
1504 record types made for conversions from/to problematic integer types.
1505 Bump the alignment of CONSTRUCTORs before converting them to a more
1506 aligned type.
1507
1508 2014-01-20 Eric Botcazou <ebotcazou@adacore.com>
1509
1510 * gcc-interface/decl.c (gnat_to_gnu_entity) <case E_Component>: Remove
1511 obsolete code for type_annotate_only mode, simplify code and slightly
1512 improve wording of comments.
1513
1514 2014-01-12 Eric Botcazou <ebotcazou@adacore.com>
1515
1516 PR ada/59772
1517 * gcc-interface/cuintp.c (build_cst_from_int): Use 32-bit integer type
1518 as intermediate type.
1519 (UI_To_gnu): Likewise.
1520
1521 2014-01-03 Eric Botcazou <ebotcazou@adacore.com>
1522
1523 * gnatvsn.ads (Current_Year): Bump to 2014.
1524
1525 2014-01-02 Tobias Burnus <burnus@net-b.de>
1526
1527 * gnat_ugn.texi: Bump @copying's copyright year.
1528 \f
1529 Copyright (C) 2014 Free Software Foundation, Inc.
1530
1531 Copying and distribution of this file, with or without modification,
1532 are permitted in any medium without royalty provided the copyright
1533 notice and this notice are preserved.