1 2015-01-07 Robert Dewar <dewar@adacore.com>
3 * sem_warn.adb (Check_One_Unit): Don't give unused entities
4 warning for a package which is used as a generic parameter.
6 2015-01-07 Bob Duff <duff@adacore.com>
8 * usage.adb (Usage): Correct documentation of
11 2015-01-07 Robert Dewar <dewar@adacore.com>
13 * s-fileio.adb: Minor reformatting.
15 2015-01-07 Ed Schonberg <schonberg@adacore.com>
17 * sem_ch12.adb (Instantiate_Object): If formal is an anonymous
18 access to subprogram, replace its formals with new entities when
19 building the object declaration, both if actual is present and
22 2015-01-07 Ed Schonberg <schonberg@adacore.com>
24 * sem_ch5.adb (Analyze_Assignment): If left-hand side is a view
25 conversion and type of expression has invariant, apply invariant
28 2015-01-07 Ed Schonberg <schonberg@adacore.com>
30 * sem_ch3.adb (Create_Constrained_Components): A call to
31 Gather_Components may detect an error if an inherited discriminant
32 that controls a variant is non-static.
33 * sem_aggr.adb (Resolve_Record_Aggregate, Step 5): The call to
34 Gather_Components may report an error if an inherited discriminant
35 in a variant in non-static.
36 * sem_util.adb (Gather_Components): If a non-static discriminant
37 is inherited do not report error here, but let caller handle it.
38 (Find_Actual): Small optimization.
40 2015-01-07 Bob Duff <duff@adacore.com>
42 * usage.adb (Usage): Document -gnatw.f switch.
44 2015-01-07 Ed Schonberg <schonberg@adacore.com>
46 * sem_ch12.adb: Code clean up and minor reformatting.
48 2015-01-07 Robert Dewar <dewar@adacore.com>
50 * exp_ch4.adb (Expand_N_Type_Conversion): Add guard for
51 Raise_Accessibility_Error call.
52 * s-valllu.ads (Scan_Raw_Long_Long_Unsigned): Add documentation
53 on handling of invalid digits in based constants.
54 * s-fatgen.ads: Minor reformatting.
55 * sem_attr.adb (Analyze_Attribute, case Unrestricted_Access):
56 Avoid noting bogus modification for Valid test.
57 * snames.ads-tmpl (Name_Attr_Long_Float): New Name.
58 * einfo.ads: Minor reformatting.
59 * sem_warn.adb: Minor comment clarification.
60 * sem_ch12.adb: Minor reformatting.
62 2015-01-07 Ed Schonberg <schonberg@adacore.com>
64 * exp_ch5.adb (Expand_Predicated_Loop): Handle properly loops
65 over static predicates when the loop parameter specification
66 carries a Reverse indicator.
68 2015-01-07 Ed Schonberg <schonberg@adacore.com>
70 * sem_ch12.adb (Instantiate_Object): If formal has a default,
71 actual is missing and formal has an anonymous access type, copy
72 access definition in full so that tree for instance is properly
73 formatted for ASIS use.
75 2015-01-07 Bob Duff <duff@adacore.com>
77 * sem_elab.adb (Check_Internal_Call_Continue): Give a warning
78 for P'Access, where P is a subprogram in the same package as
79 the P'Access, and the P'Access is evaluated at elaboration
80 time, and occurs before the body of P. For example, "X : T :=
81 P'Access;" would allow a subsequent call to X.all to be an
82 access-before-elaboration error; hence the warning. This warning
83 is enabled by the -gnatw.f switch.
84 * opt.ads (Warn_On_Elab_Access): New flag for warning switch.
85 * warnsw.adb (Set_Dot_Warning_Switch): Set Warn_On_Elab_Access.
86 * gnat_ugn.texi: Document the new warning.
88 2015-01-07 Johannes Kanig <kanig@adacore.com>
90 * lib-xref-spark_specific.adb (Collect_SPARK_Xrefs): Skip unneeded
93 2015-01-07 Robert Dewar <dewar@adacore.com>
95 * s-taprop-linux.adb, clean.adb: Minor reformatting.
97 2015-01-07 Arnaud Charlet <charlet@adacore.com>
99 * s-tassta.adb: Relax some overzealous assertions.
101 2015-01-07 Ed Schonberg <schonberg@adacore.com>
103 * sem_ch6.adb (Analyze_Return_Type): An call that returns a limited
104 view of a type is legal when context is a thunk generated for
105 operation inherited from an interface.
106 * exp_ch6.adb (Expand_Simple_Function_Return): If context is
107 a thunk and return type is an incomplete type do not continue
108 expansion; thunk will be fully elaborated when generating code.
110 2015-01-07 Doug Rupp <rupp@adacore.com>
112 * s-osinte-mingw.ads (LARGE_INTEGR): New subtype.
113 (QueryPerformanceFrequency): New imported procedure.
114 * s-taprop-mingw.adb (RT_Resolution): Call above and return
115 resolution vice a hardcoded value.
116 * s-taprop-solaris.adb (RT_Resolution): Call clock_getres and return
117 resolution vice a hardcoded value.
118 * s-linux-android.ads (clockid_t): New subtype.
119 * s-osinte-aix.ads (clock_getres): New imported subprogram.
120 * s-osinte-android.ads (clock_getres): Likewise.
121 * s-osinte-freebsd.ads (clock_getres): Likewise.
122 * s-osinte-solaris-posix.ads (clock_getres): Likewise.
123 * s-osinte-darwin.ads (clock_getres): New subprogram.
124 * s-osinte-darwin.adb (clock_getres): New subprogram.
125 * thread.c (__gnat_clock_get_res) [__APPLE__]: New function.
126 * s-taprop-posix.adb (RT_Resolution): Call clock_getres to
127 calculate resolution vice hard coded value.
129 2015-01-07 Ed Schonberg <schonberg@adacore.com>
131 * exp_util.adb (Make_CW_Equivalent_Type): If root type is a
132 limited view, use non-limited view when available to create
133 equivalent record type.
135 2015-01-07 Vincent Celier <celier@adacore.com>
137 * gnatcmd.adb: Remove command Sync and any data and processing
138 related to this command. Remove project processing for gnatstack.
139 * prj-attr.adb: Remove package Synchonize and its attributes.
141 2015-01-07 Vincent Celier <celier@adacore.com>
143 * clean.adb: Minor error message change.
145 2015-01-07 Tristan Gingold <gingold@adacore.com>
148 * env.c (__gnat_environ): Adjust for darwin9/darwin10.
150 2015-01-07 Javier Miranda <miranda@adacore.com>
152 * sem_ch10.adb (Analyze_With_Clause): Compiling under -gnatq
153 protect the frontend against never ending recursion caused by
154 circularities in the sources.
156 2015-01-07 Robert Dewar <dewar@adacore.com>
158 * a-reatim.adb, make.adb, exp_pakd.adb, i-cpoint.adb, sem_ch8.adb,
159 exp_ch3.adb: Minor reformatting.
161 2015-01-07 Doug Rupp <rupp@adacore.com>
163 * s-linux.ads (clockid_t): New subtype.
164 * s-osinte-linux.ads (pragma Linker Options): Add -lrt.
165 (clockid_t): New subtype.
166 (clock_getres): Import system call.
167 * s-taprop-linux.adb (System.OS_Constants): With and rename.
168 (RT_Resolution): Remove
169 hardcoded value and call clock_getres.
170 * s-linux-sparc.ads, s-linux-mipsel.ads, s-linux-hppa.ads,
171 s-linux-alpha.ads, s-linux-x32.ads (clockid_t): Add new subtype.
173 2015-01-07 Robert Dewar <dewar@adacore.com>
175 * sem_warn.adb (Check_One_Unit): Guard against context item
176 with no Entity field.
178 2015-01-07 Vincent Celier <celier@adacore.com>
180 * clean.adb (Gnatclean): Warn that 'gnatclean -P' is obsolete.
181 * make.adb (Initialize): Warn that 'gnatmake -P' is obsolete.
183 2015-01-07 Vincent Celier <celier@adacore.com>
185 * prj-conf.adb (Parse_Project_And_Apply_Config): Always finalize
186 errors/warnings in the first parsing of the project files,
187 to display the warnings when there is no errors.
189 2015-01-07 Tristan Gingold <gingold@adacore.com>
191 * i-cpoint.adb (Copy_Terminated_Array): Nicely handle null target.
193 2015-01-07 Doug Rupp <rupp@adacore.com>
195 * s-taprop-vxworks.adb (Stop_All_Tasks): Pass return
196 value from Int_Lock as parameter to Int_Unlock.
197 * s-osinte-vxworks.ads (Int_Unlock): Add parameter.
198 * s-vxwext.ads (Int_Unlock): Likewise.
199 * s-vxwext-kernel.adb (intUnlock, Int_Unlock): Likewise.
200 * s-vxwext-kernel.ads (Int_Unlock): Likewise.
201 * s-vxwext-rtp.adb (Int_Unlock): Likewise.
202 * s-vxwext-rtp.ads (Int_Unlock): Likewise.
204 2015-01-07 Pierre-Marie de Rodat <derodat@adacore.com>
206 * exp_pakd.adb: Add a comment in exp_pakd.adb to explain why we
209 2015-01-07 Tristan Gingold <gingold@adacore.com>
211 * i-cpoint.adb (Copy_Terminated_Array): Use Copy_Array to
214 2015-01-07 Eric Botcazou <ebotcazou@adacore.com>
216 * sem_ch3.adb (Analyze_Full_Type_Declaration): Do not
217 automatically set No_Strict_Aliasing on access types.
218 * fe.h (No_Strict_Aliasing_CP): Declare.
219 * gcc-interface/trans.c (gigi): Force flag_strict_aliasing to 0 if
220 No_Strict_Aliasing_CP is set.
222 2015-01-07 Johannes Kanig <kanig@adacore.com>
224 * sem_ch8.adb (Analyze_Subprogram_Renaming) do
225 not build function wrapper in gnatprove mode when the package
226 is externally axiomatized.
228 2015-01-07 Jose Ruiz <ruiz@adacore.com>
230 * a-reatim.adb (Time_Of): Reduce the number of spurious overflows in
231 intermediate computations when the parameters have different signs.
233 2015-01-07 Javier Miranda <miranda@adacore.com>
235 * exp_ch3.adb (Build_Init_Procedure): For derived types,
236 improve the code which takes care of identifying and moving to
237 the beginning of the init-proc the call to the init-proc of the
240 2015-01-07 Olivier Hainque <hainque@adacore.com>
242 * gcc-interface/trans.c (gnat_to_gnu, <N_Expression_With_Action>):
243 Elaborate the expression as part of the same stmt group as the actions.
245 2015-01-07 Robert Dewar <dewar@adacore.com>
247 * sem_ch3.adb: Minor error message change.
249 2015-01-07 Ed Schonberg <schonberg@adacore.com>
251 * sem_prag.adb (Analyze_Pragma, case Preelaborable_Initialization):
252 Following AI05-028, the pragam applies legally to any composite type.
254 2015-01-07 Arnaud Charlet <charlet@adacore.com>
256 * s-osinte-vxworks.adb, s-osinte-vxworks.ads
257 (sigwait, sigwaitinfo): Removed, not needed after all on any
258 VxWorks configurations.
260 2015-01-07 Robert Dewar <dewar@adacore.com>
262 * sem_ch3.adb, freeze.adb, exp_disp.adb: Minor reformatting.
264 2015-01-07 Javier Miranda <miranda@adacore.com>
266 * exp_disp.adb (Expand_Interface_Conversion): Adding missing
267 generation of accessibility check.
269 2015-01-07 Ed Schonberg <schonberg@adacore.com>
271 * sem_ch3.adb (Derived_Type_Declaration): In the case of an
272 illegal completion from a class- wide type, set etype of the
273 derived type properly to prevent cascaded errors.
275 2015-01-07 Robert Dewar <dewar@adacore.com>
277 * prj.ads, i-cpoint.adb, freeze.adb, ghost.adb, prj-err.adb: Minor
280 2015-01-07 Robert Dewar <dewar@adacore.com>
282 * restrict.adb (Check_Restriction_No_Use_Of_Attribute):
284 (OK_No_Use_Of_Entity_Name): New function.
285 (Set_Restriction_No_Use_Of_Entity): New procedure.
286 * restrict.ads (Check_Restriction_No_Use_Of_Attribute):
288 (OK_No_Use_Of_Entity_Name): New function.
289 (Set_Restriction_No_Use_Of_Entity): New procedure.
290 * sem_ch8.adb (Find_Direct_Name): Add check for violation of
292 * sem_prag.adb (Process_Restrictions_Or_Restriction_Warnings):
293 Add processing for new restriction No_Use_Of_Entity.
295 2015-01-07 Eric Botcazou <ebotcazou@adacore.com>
297 * freeze.adb (Freeze_Array_Type): Apply same handling to Is_Atomic
298 component type as to Has_Atomic_Components type. Remove useless
299 test on Is_Aliased component type.
301 2015-01-07 Hristian Kirtchev <kirtchev@adacore.com>
303 * alloc.ads Alphabetize several declarations. Add constants
304 Ignored_Ghost_Units_Initial and Ignored_Ghost_Units_Increment.
305 * atree.adb Add with and use clauses for Opt.
306 (Allocate_Initialize_Node): Mark a node as ignored Ghost
307 if it is created in an ignored Ghost region.
308 (Ekind_In): New variant.
309 (Is_Ignored_Ghost_Node): New routine.
310 (Set_Is_Ignored_Ghost_Node): New routine.
311 * atree.adb Aplhabetize several subprograms declarations. Flag
312 Spare0 is now known as Is_Ignored_Ghost_Node.
313 (Ekind_In): New variant.
314 (Is_Ignored_Ghost_Node): New routine.
315 (Set_Is_Ignored_Ghost_Node): New routine.
316 * einfo.adb: Flag 279 is now known as Contains_Ignored_Ghost_Code.
317 (Contains_Ignored_Ghost_Code): New routine.
318 (Set_Contains_Ignored_Ghost_Code): New routine.
319 (Set_Is_Checked_Ghost_Entity, Set_Is_Ignored_Ghost_Entity):
320 It is now possible to set this property on an unanalyzed entity.
321 (Write_Entity_Flags): Output the status of flag
322 Contains_Ignored_Ghost_Code.
323 * einfo.ads New attribute Contains_Ignored_Ghost_Code along with
325 (Contains_Ignored_Ghost_Code): New routine
326 along with pragma Inline.
327 (Set_Contains_Ignored_Ghost_Code): New routine along with pragma Inline.
328 * exp_ch3.adb Add with and use clauses for Ghost.
329 (Freeze_Type): Capture/restore the value of Ghost_Mode on entry/exit.
330 Set the Ghost_Mode in effect.
331 (Restore_Globals): New routine.
332 * exp_ch7.adb (Process_Declarations): Do not process a context
333 that invoves an ignored Ghost entity.
334 * exp_dbug.adb (Qualify_All_Entity_Names): Skip an ignored Ghost
335 construct that has been rewritten as a null statement.
336 * exp_disp.adb Add with and use clauses for Ghost.
337 (Make_DT): Capture/restore the value of Ghost_Mode on entry/exit. Set
338 the Ghost_Mode in effect.
339 (Restore_Globals): New routine.
340 * exp_util.adb (Requires_Cleanup_Actions): An ignored Ghost entity
341 does not require any clean up. Add two missing cases that deal
342 with block statements.
343 * freeze.adb Add with and use clauses for Ghost.
344 (Freeze_Entity): Capture/restore the value of Ghost_Mode on entry/exit.
345 Set the Ghost_Mode in effect.
346 (Restore_Globals): New routine.
347 * frontend.adb Add with and use clauses for Ghost. Remove any
348 ignored Ghost code from all units that qualify.
349 * ghost.adb New unit.
350 * ghost.ads New unit.
351 * gnat1drv.adb Add with clause for Ghost. Initialize and lock
352 the table in package Ghost.
353 * lib.ads: Alphabetize several subprogram declarations.
354 * lib-xref.adb (Output_References): Do not generate reference
355 information for ignored Ghost entities.
356 * opt.ads Add new type Ghost_Mode_Type and new global variable
358 * rtsfind.adb (Load_RTU): Provide a clean environment when
359 loading a runtime unit.
360 * sem.adb (Analyze): Capture/restore the value of Ghost_Mode on
361 entry/exit as the node may set a different mode.
363 Capture/restore the value of Ghost_Mode on entry/exit as the
364 unit may be withed from a unit with a different Ghost mode.
365 * sem_ch3.adb Add with and use clauses for Ghost.
366 (Analyze_Full_Type_Declaration, Analyze_Incomplete_Type_Decl,
367 Analyze_Number_Declaration, Analyze_Private_Extension_Declaration,
368 Analyze_Subtype_Declaration): Set the Ghost_Mode in effect. Mark
369 the entity as Ghost when there is a Ghost_Mode in effect.
370 (Array_Type_Declaration): The implicit base type inherits the
371 "ghostness" from the array type.
372 (Derive_Subprogram): The
373 alias inherits the "ghostness" from the parent subprogram.
374 (Make_Implicit_Base): The implicit base type inherits the
375 "ghostness" from the parent type.
376 * sem_ch5.adb Add with and use clauses for Ghost.
377 (Analyze_Assignment): Set the Ghost_Mode in effect.
378 * sem_ch6.adb Add with and use clauses for Ghost.
379 (Analyze_Abstract_Subprogram_Declaration, Analyze_Procedure_Call,
380 Analyze_Subprogram_Body_Helper, Analyze_Subprogram_Declaration):
381 Set the Ghost_Mode in effect. Mark the entity as Ghost when
382 there is a Ghost_Mode in effect.
383 * sem_ch7.adb Add with and use clauses for Ghost.
384 (Analyze_Package_Body_Helper, Analyze_Package_Declaration,
385 Analyze_Private_Type_Declaration): Set the Ghost_Mode in
386 effect. Mark the entity as Ghost when there is a Ghost_Mode
388 * sem_ch8.adb Add with and use clauses for Ghost.
389 (Analyze_Exception_Renaming, Analyze_Generic_Renaming,
390 Analyze_Object_Renaming, Analyze_Package_Renaming,
391 Analyze_Subprogram_Renaming): Set the Ghost_Mode in effect. Mark
392 the entity as Ghost when there is a Ghost_Mode in effect.
393 (Find_Type): Check the Ghost context of a type.
394 * sem_ch11.adb Add with and use clauses for Ghost.
395 (Analyze_Exception_Declaration): Set the Ghost_Mode in
396 effect. Mark the entity as Ghost when there is a Ghost_Mode
398 * sem_ch12.adb Add with and use clauses for Ghost.
399 (Analyze_Generic_Package_Declaration,
400 Analyze_Generic_Subprogram_Declaration): Set the Ghost_Mode in effect.
401 Mark the entity as Ghost when there is a Ghost_Mode in effect.
402 * sem_prag.adb Add with and use clauses for Ghost.
403 (Analyze_Pragma): Ghost-related checks are triggered when there
404 is a Ghost mode in effect.
405 (Create_Abstract_State): Mark the
406 entity as Ghost when there is a Ghost_Mode in effect.
407 * sem_res.adb Add with and use clauses for Ghost.
408 (Check_Ghost_Context): Removed.
409 * sem_util.adb (Check_Ghost_Completion): Removed.
410 (Check_Ghost_Derivation): Removed.
411 (Incomplete_Or_Partial_View):
412 Add a guard in case the entity has not been analyzed yet
413 and does carry a scope.
414 (Is_Declaration): New routine.
415 (Is_Ghost_Entity): Removed.
416 (Is_Ghost_Statement_Or_Pragma):
418 (Is_Subject_To_Ghost): Removed.
419 (Set_Is_Ghost_Entity):
421 (Within_Ghost_Scope): Removed.
422 * sem_util.adb (Check_Ghost_Completion): Removed.
423 (Check_Ghost_Derivation): Removed.
424 (Is_Declaration): New routine.
425 (Is_Ghost_Entity): Removed.
426 (Is_Ghost_Statement_Or_Pragma): Removed.
427 (Is_Subject_To_Ghost): Removed.
428 (Set_Is_Ghost_Entity): Removed.
429 (Within_Ghost_Scope): Removed.
430 * sinfo.ads Add a section on Ghost mode.
431 * treepr.adb (Print_Header_Flag): New routine.
432 (Print_Node_Header): Factor out code. Output flag
433 Is_Ignored_Ghost_Node.
434 * gcc-interface/Make-lang.in: Add dependency for unit Ghost.
436 2015-01-06 Eric Botcazou <ebotcazou@adacore.com>
438 * freeze.adb (Freeze_Array_Type) <Complain_CS>: Remove always
439 true test and unreachable 'else' arm.
441 2015-01-06 Vincent Celier <celier@adacore.com>
443 * prj-conf.adb (Check_Target): Improve error message when
444 there are mismatched targets between the on in the configuration
445 project file and the specified one, either in the main project
446 file or in the --target= switch.
448 2015-01-06 Pascal Obry <obry@adacore.com>
450 * prj-attr.adb, projects.texi, snames.ads-tmpl: Add Mode and
451 Install_Name attribute definitions.
453 2015-01-06 Ed Schonberg <schonberg@adacore.com>
455 * freeze.adb (Wrap_Imported_Subprogram): Indicate that the
456 generated Import pragma for the internal imported procedure does
457 not come from an aspect, so that Is_Imported can be properly
460 2015-01-06 Gary Dismukes <dismukes@adacore.com>
462 * sem_ch12.adb (Might_Inline_Subp): Record whether
463 any subprograms in the generic package are marked with
464 pragma Inline_Always (setting flag Has_Inline_Always).
465 (Analyze_Package_Instantiation): Add test of Has_Inline_Always
466 alongside existing test of Front_End_Inlining as alternative
467 conditions for setting Inline_Now. Also add test of
468 Has_Inline_Always along with Front_End_Inlining test as an
469 alternative condition for setting Needs_Body to False.
471 2015-01-06 Tristan Gingold <gingold@adacore.com>
473 * i-cpoint.adb (Copy_Array): Handle overlap.
475 2015-01-06 Pascal Obry <obry@adacore.com>
477 * bindgen.adb: Minor style fix.
479 2015-01-06 Robert Dewar <dewar@adacore.com>
481 * sem_util.ads, sem_util.adb: Minor reformatting.
483 2015-01-06 Vincent Celier <celier@adacore.com>
485 * prj-conf.adb (Parse_Project_And_Apply_Config): Reset incomplete
486 with flags before parsing the projects.
487 * prj-err.adb (Error_Msg): Do nothing if there are incomplete withs.
488 * prj-part.adb (Post_Parse_Context_Clause): Set Incomplete_Withs
489 to True in the flags, when Ignore_Missing_With is True and an
490 imported project cannot be found.
491 * prj-proc.adb (Expression): When there are incomplete withs and
492 a variable or attribute is not found, set the variable/attribute
494 * prj.ads (Processing_Flags): New flag Incomplete_Withs,
497 2015-01-06 Vasiliy Fofanov <fofanov@adacore.com>
499 * prj-proc.adb, prj-part.adb, prj.adb, prj.ads, prj-conf.adb,
500 prj-err.adb: Add new switch --no-command-line.
502 2015-01-06 Ed Schonberg <schonberg@adacore.com>
504 * sem_ch12.adb: Sloc of wrapper is that of instantiation.
506 2015-01-06 Robert Dewar <dewar@adacore.com>
508 * sem_ch11.adb: Minor reformatting.
510 2015-01-06 Ed Schonberg <schonberg@adacore.com>
512 * exp_aggr.adb (Get_Assoc_Expr): New routine internal to
513 Build_Array_Aggr_Code, used to initialized components covered
514 by a box association. If the component type is scalar and has
515 a default aspect, use it to initialize such components.
517 2015-01-06 Pascal Obry <obry@adacore.com>
519 * rtinit.c (__gnat_runtime_initialize): Add a parameter to
520 control the setup of the exception handler.
521 * initialize.c: Remove unused declaration.
522 * bindgen.adb: Always call __gnat_runtime_initialize and pass
523 whether the exeception handler must be set or not.
525 2015-01-06 Thomas Quinot <quinot@adacore.com>
527 * freeze.adb (Set_SSO_From_Defaults): When setting scalar storage
528 order to native from default, make sure to also adjust bit order.
529 * exp_aggr.adb: Minor reformatting.
531 2015-01-06 Robert Dewar <dewar@adacore.com>
533 * s-valllu.adb, s-valllu.ads, s-valuti.ads, s-valuns.adb, s-valuns.ads,
534 s-valrea.adb, s-valrea.ads: Add some additional guards for
535 Str'Last = Positive'Last.
537 2015-01-06 Ed Schonberg <schonberg@adacore.com>
539 * sem_ch12.adb, sem_ch8.adb: Ongoing work for wrappers for actual
542 2015-01-06 Javier Miranda <miranda@adacore.com>
544 * exp_disp.adb (Expand_Interface_Conversion): Reapply patch.
546 2015-01-06 Thomas Quinot <quinot@adacore.com>
548 * sem_util.ads: Minor reformatting.
549 * sem_cat.adb (In_RCI_Visible_Declarations): Change back to...
550 (In_RCI_Declaration) Return to old name, as proper checking of
551 entity being in the visible part depends on entity kind and must
552 be done by the caller.
554 2015-01-06 Ed Schonberg <schonberg@adacore.com>
556 * sem_ch12.adb, sem_ch12.ads, sem_ch8.adb: Ongoing work for wrappers
557 for operators in SPARK.
559 2015-01-06 Ed Schonberg <schonberg@adacore.com>
561 * sem_aggr.adb (Get_Value): In ASIS mode, preanalyze the
562 expression in an others association before making copies for
563 separate resolution and accessibility checks. This ensures that
564 the type of the expression is available to ASIS in all cases,
565 in particular if the expression is itself an aggregate.
567 2015-01-06 Eric Botcazou <ebotcazou@adacore.com>
569 * einfo.ads (Has_Independent_Components): Document extended
571 * einfo.adb (Has_Independent_Components): Remove obsolete assertion.
572 (Set_Has_Independent_Components): Adjust assertion.
573 * sem_prag.adb (Analyze_Pragma): Also set Has_Independent_Components
574 for pragma Atomic_Components. Set Has_Independent_Components
575 on the object instead of the type for an object declaration with
576 pragma Independent_Components.
578 2015-01-06 Olivier Hainque <hainque@adacore.com>
580 * set_targ.adb (Read_Target_Dependent_Values): Set
581 Long_Double_Index when "long double" is read.
582 (elaboration code): Register_Back_End_Types only when not reading from
583 config files. Doing otherwise is pointless and error prone.
585 2015-01-06 Robert Dewar <dewar@adacore.com>
587 * s-valrea.adb (Value_Real): Check for Str'Last = Positive'Last
589 2015-01-06 Robert Dewar <dewar@adacore.com>
591 * a-wtgeau.adb, a-ztgeau.adb, a-tigeau.adb (String_Skip): Raise PE if
592 Str'Last = Positive'Last.
594 2015-01-06 Ed Schonberg <schonberg@adacore.com>
596 * sem_ch6.adb (Matches_Limited_View): Handle properly the case
597 where the non-limited type is a generic actual and appears as
598 a subtype of the non-limited view of the other.
599 * freeze.adb (Build_Renamed_Body): If the return type of the
600 declaration that is being completed is a limited view and the
601 non-limited view is available, use it in the specification of
604 2015-01-06 Ed Schonberg <schonberg@adacore.com>
606 * sem_ch3.adb (Find_Type_Name): If there is a previous tagged
607 incomplete view, the type of the classwide type common to both
608 views is the type being declared.
610 2015-01-06 Eric Botcazou <ebotcazou@adacore.com>
612 * einfo.ads (Is_Independent): Further document extended usage.
614 2015-01-06 Eric Botcazou <ebotcazou@adacore.com>
616 * einfo.ads (Is_Independent): Document extended usage.
617 * einfo.adb (Is_Independent): Remove obsolete assertion.
618 (Set_Is_Independent): Likewise.
619 * sem_prag.adb (Process_Atomic_Shared_Volatile): Rename into...
620 (Process_Atomic_Independent_Shared_Volatile): ...this.
621 Deal with pragma Independent here.
622 (Analyze_Pragma): Adjust
623 to above renaming and also invoke it for pragma Independent.
624 Adjust comment for Independent_Components.
626 2015-01-06 Robert Dewar <dewar@adacore.com>
628 * snames.ads-tmpl: Remove entries for attribute Enum_Image.
629 * exp_attr.adb: Remove reference to Attribute_Enum_Image.
631 2015-01-06 Robert Dewar <dewar@adacore.com>
633 * s-vallli.adb (Value_Long_Long_Integer): Handle case of Str'Last
635 * s-valllu.adb (Value_Long_Long_Unsigned): Handle case of
636 Str'Last = Positive'Last.
638 2015-01-06 Robert Dewar <dewar@adacore.com>
640 * sem_prag.adb (Process_Inline): Remove redundant construct
641 warning (-gnatw.r) for an ineffective pragma Inline.
643 2015-01-06 Robert Dewar <dewar@adacore.com>
645 * s-valint.adb: Fix typo in last checkin.
646 * s-valuns.adb (Value_Unsigned): More efficient fix for
648 * sem_attr.adb (Analyze_Attribute): Minor reformatting
649 (Eval_Attribute): Static ervaluation of 'Img for enumeration types.
651 2015-01-06 Robert Dewar <dewar@adacore.com>
653 * s-valint.adb, s-valuns.adb (Value_Integer): Deal with case where
654 Str'Last = Positive'Last
656 2015-01-06 Thomas Quinot <quinot@adacore.com>
658 * xoscons.adb: Display exception information and return non-zero
659 exit status in top level exception handler.
661 2015-01-06 Ed Schonberg <schonberg@adacore.com>
663 * sem_ch8.adb: Code clean up.
665 2015-01-06 Tristan Gingold <gingold@adacore.com>
667 * targparm.ads: Remove obsolete comment.
669 2015-01-06 Olivier Hainque <hainque@adacore.com>
671 * gcc-interface/decl.c (gnat_to_gnu_entity, case E_Variable): When
672 constructing a ref to variable, update inner_const_flag from the
673 variable TREE_READONLY attribute.
674 * gcc-interface/targtyps.c (WIDEST_HARDWARE_FP_SIZE): Remove default
676 (get_target_float_size): Remove.
677 (get_target_double_size): Remove.
678 (get_target_long_double_size): Remove.
680 2015-01-06 Pascal Obry <obry@adacore.com>
682 * adaint.c (ProcListEvt): Set to NULL.
683 * rtinit.c: New file.
684 (__gnat_rt_init_count): New reference counter set to 0.
685 (__gnat_runtime_initialize): Move code here from __gnat_initialize when
686 this code is actually needed for the runtime initialization. This
687 routine returns immediately if the initialization has already been done.
688 * final.c: Revert previous change.
689 * rtfinal.c: New file.
690 (__gnat_runtime_finalize)[Win32]: Add finalization of the critical
691 section and event. The default version of this routine is empty (except
692 for the reference counting code). This routine returns immediately if
693 some others libraries are referencing the runtime.
694 * bindgen.adb (Gen_Adainit): Generate call to Runtime_Initialize
695 remove circuitry to initialize the signal handler as this is
696 now done by the runtime initialization routine.
697 (Gen_Adafinal): Generate call to Runtime_Finalize.
698 * gnat_ugn.texi: Update documentation about concurrency and
699 initialization/finalization of the run-time.
700 * gcc-interface/Makefile.in, gcc-interface/Make-lang.in: Add
701 references to rtfinal.o and rtinit.o
703 2015-01-06 Robert Dewar <dewar@adacore.com>
705 * exp_attr.adb (Expand_N_Attribute_Reference): Add dummy entry
707 * sem_attr.adb: Implement Enum_Image attribute.
708 * snames.ads-tmpl: Add entries for Enum_Image attribute.
710 2015-01-06 Robert Dewar <dewar@adacore.com>
712 * namet.ads: Document use of Boolean2 for No_Use_Of_Entity.
713 * restrict.ads (No_Use_Of_Entity): New table.
714 * sem_prag.adb (Process_Restrictions_Or_Restriction_Warnings):
715 Ignore No_Use_Of_Entity (will be processed in parser).
716 * snames.ads-tmpl: Add entry for Name_No_Use_Of_Entity.
718 2015-01-06 Vincent Celier <celier@adacore.com>
720 * prj-tree.adb (Imported_Or_Extended_Project_Of): Do not try
721 to check for an extended project, if a project does not have
722 yet a project declaration.
724 2015-01-06 Pierre-Marie Derodat <derodat@adacore.com>
726 * scos.ads: Update documentation about the SCO table build
727 process and about table records format.
728 * par_sco.ads (SCO_Record): Rename to SCO_Record_Raw.
729 (SCO_Record_Filtered): New procedure.
730 (Set_SCO_Logical_Operator): New procedure.
731 (dsco): Update documentation.
732 * par_sco.adb: Update library-level comments.
733 (SCO_Generation_State_Type): New type.
734 (SCO_Generation_State): New variable.
735 (SCO_Raw_Table): New package instanciation.
736 (Condition_Pragma_Hash_Table): Rename to SCO_Raw_Hash_Table.
738 (Tristate): New type.
739 (Is_Logical_Operator): Return Tristate and update documentation.
740 (Has_Decision): Update call to Is_Logical_Operator and complete
742 (Set_Table_Entry): Rename to Set_Raw_Table_Entry, update
743 comment, add an assertion for state checking and change
744 references to SCO_Table into SCO_Raw_Table.
745 (dsco): Refactor to dump the raw and the filtered tables.
746 (Process_Decisions.Output_Decision_Operand): Handle putative
747 short-circuit operators.
748 (Process_Decisions.Output_Element): Update references
749 to Set_Table_Entry and to Condition_Pragma_Hash_Table.
750 (Process_Decisions.Process_Decision_Operand): Update call
751 to Is_Logical_Operator.
752 (Process_Decisions.Process_Node): Handle putative short-circuit
753 operators and change references to
754 SCO_Table into SCO_Raw_Table.
755 (SCO_Output): Add an assertion
756 for state checking and remove code that used to stamp out SCO entries.
757 (SCO_Pragma_Disabled): Change reference to SCO_Table
759 (SCO_Record): Rename to SCO_Record_Raw,
760 add an assertion for state checking and change references
761 to SCO_Table into SCO_Raw_Table.
762 (Set_SCO_Condition): Add an assertion for state checking, update
763 references to Condition_Pragma_Hash_Table and change references to
764 SCO_Table into SCO_Raw_Table.
765 (Set_SCO_Pragma_Enabled): Add an assertion for state checking and
766 change references to SCO_Table into SCO_Raw_Table.
767 (Set_SCO_Logical_Operator): New procedure.
768 (Traverse_Declarations_Or_Statements.Set_Statement_Entry): Update
769 references to Set_Table_Entry and to Condition_Pragma_Hash_Table.
770 (SCO_Record_Fildered): New procedure.
771 * gnat1drv.adb (Gnat1drv): Invoke the SCO filtering pass.
772 * lib-writ.adb (Write_ALI): Invoke the SCO filtering pass and
774 * par-load.adb (Load): Update reference to SCO_Record.
775 * par.adb (Par): Update reference to SCO_Record.
776 * put_scos.adb (Put_SCOs): Add an assertion to check that no
777 putative SCO condition reaches this end.
778 * sem_ch10.adb (Analyze_Proper_Body): Update reference to SCO_Record.
779 * sem_res.adb (Resolve_Logical_Op): Validate putative SCOs
780 when corresponding to an "and"/"or" operator affected by the
781 Short_Circuit_And_Or pragma.
783 2015-01-06 Robert Dewar <dewar@adacore.com>
785 * sem_ch8.adb (Analyze_Use_Package): Give more specific error
786 msg for attempted USE of generic subprogram or subprogram.
788 2015-01-06 Robert Dewar <dewar@adacore.com>
790 * s-valllu.adb, a-tiinau.adb, a-timoau.adb, a-ztinau.adb, a-ztmoau.adb,
791 s-valuns.adb, s-valrea.adb, a-wtflau.adb, a-tiflau.adb, a-ztflau.adb,
792 a-wtinau.adb, a-wtmoau.adb: Document recognition of : in place of #.
794 2015-01-06 Ed Schonberg <schonberg@adacore.com>
796 * sem_ch13.adb (Analyze_Aspect_Specifications): For aspects
797 that specify stream subprograms, if the prefix is a class-wide
798 type then the generated attribute definition clause must apply
799 to the same class-wide type.
800 (Default_Iterator): An iterator defined by an aspect of some
801 container type T must have a first parameter of type T, T'class,
802 or an access to such (from code reading RM 5.5.1 (2/3)).
804 2015-01-06 Arnaud Charlet <charlet@adacore.com>
806 * gnat1drv.adb: Minor: complete previous change.
808 2015-01-06 Olivier Hainque <hainque@adacore.com>
810 * set_targ.ads (C_Type_For): New function. Return the name of
811 a C type supported by the back-end and suitable as a basis to
812 construct the standard Ada floating point type identified by
813 the T parameter. This is used as a common ground to feed both
814 ttypes values and the GNAT tree nodes for the standard floating
816 * set_targ.adb (Long_Double_Index): The index at which "long
817 double" gets registered in the FPT_Mode_Table. This is useful to
818 know whether we have a "long double" available at all and get at
819 it's characteristics without having to search the FPT_Mode_Table
820 when we need to decide which C type should be used as the
821 basis for Long_Long_Float in Ada.
822 (Register_Float_Type): Fill Long_Double_Index.
823 (FPT_Mode_Index_For): New function. Return the index in
824 FPT_Mode_Table that designates the entry corresponding to the
825 provided C type name.
826 (FPT_Mode_Index_For): New function. Return the index in
827 FPT_Mode_Table that designates the entry for a back-end type
828 suitable as a basis to construct the standard Ada floating point
829 type identified by the input T parameter.
830 (elaboration code): Register_Back_End_Types unconditionally,
831 so C_Type_For can operate regardless of -gnateT. Do it
832 early so we can query it for the floating point sizes, via
833 FPT_Mode_Index_For. Initialize Float_Size, Double_Size and
834 Long_Double_Size from the FPT_Mode_Table, as cstand will do.
835 * cstand.adb (Create_Float_Types): Use C_Type_For to determine
836 which C type should be used as the basis for the construction
837 of the Standard Ada floating point types.
838 * get_targ.ads (Get_Float_Size, Get_Double_Size,
839 Get_Long_Double_Size): Remove.
840 * get_targ.adb: Likewise.
842 2015-01-06 Thomas Quinot <quinot@adacore.com>
844 * sem_cat.adb (In_RCI_Declaration): Remove unnecessary
845 parameter and rename to...
846 (In_RCI_Visible_Declarations): Fix handling of private part of nested
848 (Validate_RCI_Subprogram_Declaration): Reject illegal function
849 returning anonymous access in RCI unit.
851 2015-01-06 Ed Schonberg <schonberg@adacore.com>
853 * sem_ch6.adb (New_Overloaded_Entity): In GNATprove mode, a
854 function wrapper may be a homonym of another local declaration.
855 * sem_ch8.adb (Analyze_Subprogram_Renaming): In GNATprove mode,
856 build function and operator wrappers after the actual subprogram
857 has been resolved, and replace the standard renaming declaration
858 with the declaration of wrapper.
859 * sem_ch12.ads (Build_Function_Wrapper, Build_Operator_Wraooer):
860 make public for use elsewhere.
861 * sem_ch12.adb (Build_Function_Wrapper, Build_Operator_Wraooer):
862 rewrite, now that actual is fully resolved when wrapper is
865 2015-01-06 Javier Miranda <miranda@adacore.com>
867 * exp_disp.adb: Revert previous change.
869 2015-01-06 Robert Dewar <dewar@adacore.com>
871 * exp_util.adb: Change name Name_Table_Boolean to
873 * namet.adb: Change name Name_Table_Boolean to Name_Table_Boolean1
874 Introduce Name_Table_Boolean2/3.
875 * namet.ads: Change name Name_Table_Boolean to Name_Table_Boolean1
876 Introduce Name_Table_Boolean2/3.
877 * par-ch13.adb: Change name Name_Table_Boolean to
880 2015-01-06 Bob Duff <duff@adacore.com>
882 * gnat_rm.texi: Improve documentation regarding No_Task_Termination.
884 2015-01-06 Ed Schonberg <schonberg@adacore.com>
886 * sem_aggr.adb (Resolve_Record_Aggregte, Get_Value): For an
887 others choice that covers multiple components, analyze each
888 copy with the type of the component even in compile-only mode,
889 to detect potential accessibility errors.
891 2015-01-06 Hristian Kirtchev <kirtchev@adacore.com>
893 * sem_res.adb (Is_Assignment_Or_Object_Expression): New routine.
894 (Resolve_Actuals): An effectively volatile out
895 parameter cannot act as an in or in out actual in a call.
896 (Resolve_Entity_Name): An effectively volatile out parameter
899 2015-01-06 Ed Schonberg <schonberg@adacore.com>
901 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): If the body is
902 the expansion of an expression function it may be pre-analyzed
903 if a 'access attribute is applied to the function, in which case
904 last_entity may have been assigned already.
906 2015-01-06 Ed Schonberg <schonberg@adacore.com>
908 * sem_ch4.adb (Analyze_One_Call): If formal has an incomplete
909 type and actual has the corresponding full view, there is no
910 error, but a case of use of incomplete type in a predicate or
911 invariant expression.
913 2015-01-06 Vincent Celier <celier@adacore.com>
915 * makeutl.adb (Insert_No_Roots): Make sure that the same source
916 in two different project tree is checked in both trees, if they
917 are sources of two different projects, extended or not.
919 2015-01-06 Arnaud Charlet <charlet@adacore.com>
921 * gnat1drv.adb: Minor code clean up.
922 (Adjust_Global_Switches): Ignore gnatprove_mode in codepeer_mode.
924 2015-01-06 Bob Duff <duff@adacore.com>
926 * osint.adb (Read_Source_File): Don't print out
927 file name unless T = Source.
929 2015-01-06 Ed Schonberg <schonberg@adacore.com>
931 * sem_util.adb (Is_Variable, Is_OK_Variable_For_Out_Formal):
932 recognize improper uses of constant_reference types as actuals
933 for in-out parameters.
934 (Check_Function_Call): Do not collect identifiers if function
935 name is missing because of previous error.
937 2015-01-06 Robert Dewar <dewar@adacore.com>
939 * ali-util.adb, sem_prag.adb, rtsfind.adb, sem_util.adb, sem_res.adb,
940 ali.adb, binde.adb, namet.adb, namet.ads, gnatls.adb, bcheck.adb:
941 Minor change of name Name_Table_Info => Name_Table_Int.
943 2015-01-06 Robert Dewar <dewar@adacore.com>
945 * exp_strm.adb (Build_Elementary_Input_Call): Clarify comments
947 * freeze.adb (Freeze_Fixed_Point_Type): Add warning for shaving
949 * sem_prag.adb, sem_ch10.adb, sem_ch6.adb: Minor reformatting.
951 2015-01-06 Vincent Celier <celier@adacore.com>
953 * a-strsup.adb (Times (Natural;String;Positive)): Raise
954 Length_Error, not Index_Error, when the result is too long.
956 2015-01-06 Thomas Quinot <quinot@adacore.com>
958 * a-direct.adb (Create_Path): Minor error handling and
959 performance improvement.
961 2015-01-06 Robert Dewar <dewar@adacore.com>
963 * checks.ads, sem_ch12.adb: Minor reformatting.
964 * exp_ch4.adb (Expand_N_Op_Divide): Generate explicit divide by
965 zero check for fixed-point case if Backend_Divide_Checks_On_Target
968 2015-01-06 Robert Dewar <dewar@adacore.com>
970 * sem_prag.adb (Analyze_Pragma, case No_Elaboration_Code_All):
971 Do not set restriction No_Elaboration_Code unless the pragma
972 appears in the main unit).
974 2015-01-06 Ed Schonberg <schonberg@adacore.com>
976 * sem_ch10.adb (Is_Regular_With_Clause): Add guard to verify
977 that with clause has already been analyzed before checking kind
980 2015-01-06 Robert Dewar <dewar@adacore.com>
982 * exp_strm.adb (Build_Elementary_Input_Call): Return base type
985 2015-01-06 Arnaud Charlet <charlet@adacore.com>
987 * a-reatim.adb ("/"): Add explicit pragma Unsuppress (Division_Check).
989 2015-01-06 Robert Dewar <dewar@adacore.com>
991 * sem_prag.adb (Process_Suppress_Unsuppress): Add extra warning
992 for ignoring pragma Suppress (Elaboration_Check) in SPARK mode.
994 2015-01-06 Javier Miranda <miranda@adacore.com>
996 * exp_disp.adb (Expand_Interface_Conversion): No displacement
997 of the pointer to the object needed when the type of the operand
998 is not an interface type and the interface is one of its parent
999 types (since they share the primary dispatch table).
1001 2015-01-06 Vincent Celier <celier@adacore.com>
1003 * prj-env.adb: Minor comment update.
1005 2015-01-06 Javier Miranda <miranda@adacore.com>
1007 * sem_res.adb (Valid_Conversion): Restrict the checks on anonymous
1008 access types whose target type is an interface type to operands
1009 that are access types; required to report an error when the
1010 operand is not an access type.
1012 2015-01-06 Bob Duff <duff@adacore.com>
1014 * a-cfinve.adb (Copy): Set the discriminant to the Length when
1016 * a-cofove.ads (Capacity): Add a postcondition.
1017 * a-cfinve.ads (Capacity): Add a postcondition.
1018 (Reserve_Capacity): Correct the postcondition in the case where
1019 Capacity = 0; that means "Capacity => Length (Container)".
1020 * a-cofove.adb (Elems[c]): Add a comment
1021 explaining the dangers and how to avoid them.
1023 2015-01-06 Ed Schonberg <schonberg@adacore.com>
1025 * sem_ch12.adb: Code clean up.
1027 2015-01-06 Arnaud Charlet <charlet@adacore.com>
1029 * gnatvsn.ads: Bump copyright year.
1031 2015-01-06 Robert Dewar <dewar@adacore.com>
1033 * s-taskin.ads, s-traces.ads: Minor reformatting.
1034 * exp_util.adb: Minor typo fix.
1036 2015-01-06 Vincent Celier <celier@adacore.com>
1038 * gnatls.adb (Search_RTS): Invoke Initialize_Default_Project_Path
1039 with the runtime name.
1040 * prj-env.adb (Initialize_Default_Project_Path): When both
1041 Target_Name and Runtime_Name are not empty string, add to the
1042 project path the two directories .../lib/gnat and .../share/gpr
1043 related to the runtime.
1044 * prj-env.ads (Initialize_Default_Project_Path): New String
1045 parameter Runtime_Name, defaulted to the empty string.
1047 2015-01-06 Hristian Kirtchev <kirtchev@adacore.com>
1049 * frontend.adb: Guard against the case where a configuration
1050 pragma may be split into multiple pragmas and the original
1051 rewritten as a null statement.
1052 * sem_prag.adb (Analyze_Pragma): Insert a brand new Check_Policy
1053 pragma using Insert_Before rather than Insert_Action. This
1054 takes care of the configuration pragma case where Insert_Action
1057 2015-01-06 Bob Duff <duff@adacore.com>
1059 * a-coboho.ads (Element_Access): Add "pragma
1060 No_Strict_Aliasing (Element_Access);". This is needed because
1061 we are unchecked-converting from Address to Element_Access.
1062 * a-cofove.ads, a-cofove.adb (Elems,Elemsc): Fix bounds of the
1065 2015-01-06 Hristian Kirtchev <kirtchev@adacore.com>
1067 * sem_res.adb (Resolve_Actuals): Remove the
1068 restriction which prohibits volatile actual parameters with
1069 enabled external propery Async_Writers to act appear in procedure
1070 calls where the corresponding formal is of mode OUT.
1072 2015-01-05 Jakub Jelinek <jakub@redhat.com>
1074 * gnat_ugn.texi: Bump @copying's copyright year.
1076 2015-01-05 Eric Botcazou <ebotcazou@adacore.com>
1079 * gcc-interface/Makefile.in (../stamp-tools): Reinstate dropped code.
1081 2015-01-04 Uros Bizjak <ubizjak@gmail.com>
1083 * gcc-interface/misc.c (internal_error_function): Use xasprintf instead
1084 of unchecked asprintf.
1087 Copyright (C) 2015 Free Software Foundation, Inc.
1089 Copying and distribution of this file, with or without modification,
1090 are permitted in any medium without royalty provided the copyright
1091 notice and this notice are preserved.