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