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