1 2011-08-03 Emmanuel Briot <briot@adacore.com>
3 * gnatcmd.adb, prj-proc.adb, prj-proc.ads, make.adb, mlib-prj.adb,
4 prj.adb, prj.ads, makeutl.adb, makeutl.ads, clean.adb, prj-nmsc.adb,
5 prj-util.adb, prj-util.ads, prj-conf.adb, prj-conf.ads, prj-env.adb,
6 prj-env.ads (Shared_Project_Tree_Data): new type
7 An aggregate project and its aggregated trees need to share the common
8 data structures used for lists of strings, packages,... This makes the
9 code simpler since otherwise we have to pass the root tree (also used
10 for the configuration file data) in addition to the current project
11 tree. This also avoids ambiguities as to which tree should be used.
12 And finally this saves a bit of memory.
13 (For_Every_Project_Imported): new parameter Tree.
14 Since aggregated projects are using a different tree, we need to let
15 the caller know which tree to use to manipulate the returned project.
17 2011-08-03 Robert Dewar <dewar@adacore.com>
19 * prj-proc.adb, exp_util.ads, exp_ch9.adb, make.adb, prj-ext.adb,
20 prj-ext.ads, alfa.ads, sem_ch4.adb, makeutl.adb, makeutl.ads,
21 lib-xref-alfa.adb, sem_cat.adb, exp_dist.adb, get_alfa.adb,
22 prj-env.adb, prj-env.ads, prj-tree.adb, alfa.ads: Minor reformatting.
24 2011-08-03 Javier Miranda <miranda@adacore.com>
26 * exp_util.adb, sem_aux.adb, exp_util.ads, sem_aux.ads:
27 Move routine Is_VM_By_Copy_Actual from sem_aux to exp_util.
29 2011-08-03 Bob Duff <duff@adacore.com>
31 * sem_ch8.adb (Is_Primitive_Operator_In_Use): Always check In_Use on
34 2011-08-03 Joel Brobecker <brobecker@adacore.com brobecker>
36 * g-sha256.ads, g-sha512.ads, g-sha1.ads, g-sha224.ads, g-sha384.ads,
37 g-sehash.ads: Fix typo. Update header.
39 2011-08-03 Thomas Quinot <quinot@adacore.com>
41 * exp_ch6.adb (Expand_Actuals): Remove Ada_2005 guard on build-in-place
44 2011-08-03 Gary Dismukes <dismukes@adacore.com>
46 * sem_ch4.adb (Analyze_Overloaded_Selected_Component): Consider
47 prefixes of private types along with records, since the selector may be
49 * sem_res.adb (Resolve_Selected_Component): Consider prefixes of
50 private types along with records, since the selector may be a
53 2011-08-03 Emmanuel Briot <briot@adacore.com>
55 * prj-pp.adb (Pretty_Print): remove trailing blank line in the file
57 2011-08-03 Javier Miranda <miranda@adacore.com>
59 * sem_aux.adb (Is_VM_By_Copy_Actual): Fix wrong use of
60 Tagged_Type_Expansion.
62 2011-08-03 Yannick Moy <moy@adacore.com>
65 (Resolve_Op_Concat_Arg): do not issue a SPARK violation when argument of
66 concatenation is the name of a constant
68 2011-08-03 Emmanuel Briot <briot@adacore.com>
70 * prj-proc.adb, prj-ext.adb, prj-ext.ads, prj-env.adb, prj-env.ads,
71 prj-tree.adb, prj-tree.ads (Initialize_And_Copy, Copy): new subprograms
72 (Process_Declarative_Items): new parameter Child_Env.
74 2011-08-03 Yannick Moy <moy@adacore.com>
76 * alfa.ads Update format of ALFA section in ALI file in order to add a
77 mapping from bodies to specs when both are present
78 (ALFA_Scope_Record): add components for spec file/scope
79 * get_alfa.adb (Get_ALFA): read the new file/scope for spec when present
81 (Collect_ALFA): after all scopes have been collected, fill in the spec
82 information when relevant
83 * put_alfa.adb (Put_ALFA): write the new file/scope for spec when
86 2011-08-03 Eric Botcazou <ebotcazou@adacore.com>
88 * inline.adb (Add_Inlined_Subprogram): Do not consider the enclosing
89 code unit to decide whether to add internally generated subprograms.
91 2011-08-03 Javier Miranda <miranda@adacore.com>
93 * sem_aux.ads, sem_aux.adb (Is_VM_By_Copy_Actual): New subprogram.
95 (Build_Simple_Entry_Call): Handle actuals that must be handled by copy
98 2011-08-03 Emmanuel Briot <briot@adacore.com>
100 * make.adb, makeutl.adb, makeutl.ads (Make.Switches_Of): now shares
101 code with Makeutl.Get_Switches.
102 * prj-tree.adb: Update comment.
104 2011-08-03 Thomas Quinot <quinot@adacore.com>
106 * sem_cat.adb (Validate_RCI_Subprogram_Declaration): Reject a remote
107 subprogram with a limited formal that does not support external
110 2011-08-03 Yannick Moy <moy@adacore.com>
112 * get_alfa.adb (Get_ALFA): add missing Skip_Spaces at start of
114 * lib-xref-alfa.adb (Add_ALFA_File): split removal of scopes that are
115 not from current unit in two phases, because it is not possible to
116 change the table while iterating over its content.
117 * put_alfa.adb (Put_ALFA): reset current file/scope at each new entity
119 2011-08-03 Sergey Rybin <rybin@adacore.com>
121 * vms_data.ads: Add qualifier for gnatmetric --no-static-loop option
122 * gnat_ugn.texi: Update description of complexity metrics (gnatmetric)
124 2011-08-03 Ed Schonberg <schonberg@adacore.com>
126 * sem_res.adb (Resolve_Op_Concat_Arg): if the argument is an aggregate
127 and the component type is composite, this is ambiguous for predefined
128 concatenation, but if the node is not overloaded and the entity is a use
129 -defined function its profile can be used to resolve that aggregate.
131 2011-08-03 Robert Dewar <dewar@adacore.com>
133 * exp_ch4.adb: Minor code cleanup.
135 2011-08-03 Thomas Quinot <quinot@adacore.com>
137 * exp_dist.adb: Do not generate distribution stubs if serious errors
140 2011-08-03 Ed Schonberg <schonberg@adacore.com>
142 * sem_ch4.adb (Try_Primitive_Operation): when checking the validity of
143 the first formal of a primitive operation, go to the base type to
144 handle properly an access to a derived type with constrained
146 * sem_type.adb (Disambiguate): an immediately visible operator hides a
147 user-defined function that is only use-visible.
149 2011-08-03 Robert Dewar <dewar@adacore.com>
151 * sem_aggr.adb, sem_ch3.adb, lib.ads, gnatcmd.adb, prj-proc.adb,
152 make.adb, lib-writ.adb, prj-part.adb, prj-part.ads, prj-ext.adb,
153 fname-uf.adb, prj-ext.ads, prj.adb, prj.ads, sem_attr.adb, alfa.adb,
154 prj-makr.adb, errout.adb, makeutl.adb, makeutl.ads, restrict.ads,
155 sem_ch6.adb, g-pehage.adb, clean.adb, put_alfa.adb, lib-xref-alfa.adb,
156 prj-nmsc.adb, prj-nmsc.ads, sem_ch8.adb, prj-pars.ads, exp_aggr.adb,
157 prj-attr.ads, sem_ch13.adb, get_alfa.adb, prj-env.adb, prj-env.ads,
158 alfa_test.adb, prj-tree.adb, prj-tree.ads, einfo.ads: Minor reformatting
160 2011-08-03 Robert Dewar <dewar@adacore.com>
162 * repinfo.adb (List_Mechanism): Add handling of
163 Convention_Ada_Pass_By_XXX.
164 * sem_mech.adb (Set_Mechanism): Ditto.
165 * sem_prag.adb (Process_Convention): Add entries for
166 Convention_Ada_Pass_By_XXX.
167 * snames.adb-tmpl, snames.ads-tmpl: Ditto.
169 2011-08-03 Pascal Obry <obry@adacore.com>
171 * makeutl.adb: Minor reformatting.
173 2011-08-03 Vincent Celier <celier@adacore.com>
176 (Get_File_Name) If the file cannot be found when there are no config
177 pragmas file and May_Fail is True, return No_File instead of the file
178 name, to be consistent.
180 2011-08-03 Pascal Obry <obry@adacore.com>
182 * adaint.c (__gnat_is_executable_file_attr): Avoid access
185 2011-08-03 Javier Miranda <miranda@adacore.com>
188 (Same_Representation): In VM targets the representation of arrays with
189 aliased components differs from arrays with non-aliased components.
191 2011-08-03 Emmanuel Briot <briot@adacore.com>
193 * prj-proc.adb, prj-attr.adb, prj-attr.ads (Get_Attribute_Index): do
194 not systematically lower case attribute indexes that contain no "."
195 Fix definition of several Naming attributes, which take
196 a unit name as index and therefore should be case insensitive.
197 Minor refactoring (reduce length of variable names).
199 2011-08-03 Emmanuel Briot <briot@adacore.com>
201 * makeutl.adb, makeutl.ads (Get_Switches): new subprogram.
203 2011-08-03 Emmanuel Briot <briot@adacore.com>
205 * gnatcmd.adb, prj-proc.adb, prj-proc.ads, make.adb, prj-part.adb,
206 prj-part.ads, switch-m.adb, switch-m.ads, prj-makr.adb, clean.adb,
207 prj-pars.adb, prj-pars.ads, prj-conf.adb, prj-conf.ads, prj-tree.adb,
208 prj-tree.ads (Prj.Tree.Environment): new type.
210 2011-08-03 Emmanuel Briot <briot@adacore.com>
212 * prj-proc.adb, prj.ads, makeutl.adb, makeutl.ads, prj-conf.adb,
213 prj-tree.adb, prj-tree.ads (Environment): new type.
215 2011-08-03 Emmanuel Briot <briot@adacore.com>
217 * prj-tree.ads: Remove unused variable.
219 2011-08-03 Yannick Moy <moy@adacore.com>
221 * restrict.adb (Restriction_Msg): set "SPARK" all in upper case for
222 issuing messages related to SPARK restriction violation.
224 2011-08-03 Ed Schonberg <schonberg@adacore.com>
226 * sem_ch6.adb: guard against error nodes in return statements.
228 2011-08-03 Arnaud Charlet <charlet@adacore.com>
230 * errout.adb (Error_Msg_Internal): the main unit has not been read yet,
231 a warning can only appear on a configuration file, so emit warning
232 without further checks.
234 2011-08-03 Arnaud Charlet <charlet@adacore.com>
236 * s-interr.ads: add overriding keyword.
238 2011-08-03 Geert Bosch <bosch@adacore.com>
240 * exp_attr.adb: Fix minor typo.
242 2011-08-03 Ed Schonberg <schonberg@adacore.com>
244 * par-ch4.adb: improve error recovery.
246 2011-08-03 Emmanuel Briot <briot@adacore.com>
248 * prj-part.adb, prj-part.ads, prj-makr.adb, prj-pars.adb, prj-conf.adb,
249 prj-env.adb (Prj.Part.Parse): change parameter Always_Errout_Finalize
252 2011-08-03 Emmanuel Briot <briot@adacore.com>
254 * prj-dect.adb (Parse_Attribute_Declaration): make sure we can use
255 "external" as an attribute name in aggregate projects.
257 2011-08-03 Jose Ruiz <ruiz@adacore.com>
259 * s-taprop-vxworks.adb: (Create_Task, Initialize): Ada 2012 pragma CPU
260 uses CPU numbers starting 1, while VxWorks uses CPU numbers starting
261 from 0, so we need to adjust.
263 2011-08-03 Emmanuel Briot <briot@adacore.com>
265 * prj-proc.adb, prj-ext.adb, prj-ext.ads, makeutl.adb, prj-tree.adb,
266 prj-tree.ads, gnatcmd.adb, clean.adb (External_References): new type.
268 2011-08-03 Yannick Moy <moy@adacore.com>
270 * sem_ch6.adb (New_Overloaded_Entity): only issue error for SPARK
271 restriction on overloaded entity if the entity is not an operator.
273 2011-08-03 Yannick Moy <moy@adacore.com>
275 * sem_ch7.adb, sem_res.adb, sem_attr.adb, restrict.adb,
276 restrict.ads: Rename remaining Check_Formal_Restriction* into
277 Check_SPARK_Restriction*.
279 2011-08-03 Emmanuel Briot <briot@adacore.com>
281 * prj-proc.adb, prj-part.adb, prj.adb, prj.ads, prj-nmsc.adb,
282 prj-nmsc.ads, prj-err.adb (Project_Data): now discriminated on its
284 (Project_Empty): removed
285 (Empty_Project): new parameter Qualifier
286 This is used to have fields specific to aggregate projects, cleaner
287 New field to store the list of aggregated projects.
288 (Check_Aggregate_Project): removed
289 (Process_Aggregated_Projects, Free): new subprograms.
291 2011-08-03 Olivier Hainque <hainque@adacore.com>
293 * tracebak.c (STOP_FRAME ppc AIX): Stop at null return address as well.
295 2011-08-03 Ed Schonberg <schonberg@adacore.com>
297 * sem_ch8.adb (Analyze_Object_Renaming): if the renamed object is an
298 explicit dereference of an unconstrained type, create a constrained
299 subtype for it, as is done for function calls that return an
302 2011-08-03 Thomas Quinot <quinot@adacore.com>
304 * g-pehage.adb (Finalize): Avoid possible double-free.
306 2011-08-03 Steve Baird <baird@adacore.com>
308 * exp_attr.adb (Expand_N_Attribute_Reference): Don't expand
309 Elab_Spec/Body attrs in CodePeer_Mode.
311 2011-08-03 Javier Miranda <miranda@adacore.com>
313 * exp_aggr.adb (Flatten): Convert to positional form aggregates whose
314 low bound is not known at compile time but they have no others choice.
315 Done because in this case the bounds can be obtained directly from the
318 2011-08-03 Ed Falis <falis@adacore.com>
320 * s-tasinf-vxworks.ads: Update comment to reflect 0 indexing of CPUs
321 on VxWorks SMP. Remove unusable constant ANY_CPU.
323 2011-08-03 Emmanuel Briot <briot@adacore.com>
325 * gnatcmd.adb, make.adb, prj-part.adb, prj-part.ads, prj-makr.adb,
326 clean.adb, prj-nmsc.adb, prj-pars.adb, prj-conf.adb, prj-env.adb,
327 prj-env.ads (Prj.Env.Initialize_Default_Project_Path,
328 Prj.Env.Initialize_Empty): new subprograms
329 (Get_Env, Find_Project): remove parameter Target_Name.
331 2011-08-03 Gary Dismukes <dismukes@adacore.com>
333 * sem_ch3.adb (Build_Derived_Record_Type): Test the Derive_Subps formal
334 as a condition for the delayed call to Derived_Subprograms done for the
335 case of the rewriting of a derived type that constrains the
336 discriminants of its parent type.
337 Avoids redundant subprogram derivations for private subtype derivations.
339 2011-08-03 Javier Miranda <miranda@adacore.com>
341 * exp_aggr.adb (Init_Hidden_Discriminants): New subprogram of
342 Build_Record_Aggr_Code.
343 (Build_Record_Aggr_Code): Add missing support to initialize hidden
344 discriminants in extension aggregates.
346 2011-08-03 Emmanuel Briot <briot@adacore.com>
348 * prj-pp.adb (Print): also output project qualifiers, since in
349 particular "aggregate" is mandatory in an aggregate project.
351 2011-08-03 Emmanuel Briot <briot@adacore.com>
353 * prj-part.adb, prj.adb, prj.ads, prj-nmsc.adb, prj-env.adb:
354 (Debug_Output): new function.
356 2011-08-03 Eric Botcazou <ebotcazou@adacore.com>
358 * gnat_ugn.texi: Document -Wstack-usage.
359 * gcc-interface/misc.c (enumerate_modes): Add guard for ghost FP modes.
361 2011-08-03 Thomas Quinot <quinot@adacore.com>
363 * sem_prag.adb Issue an error (not a warning) when a C++ type does not
364 have keyword LIMITED.
366 2011-08-03 Yannick Moy <moy@adacore.com>
368 * alfa.adb, alfa.ads, alfa_test.adb: New files.
369 * ali.adb (Known_ALI_Lines): add 'C' lines (SCO) and 'F' lines (ALFA)
370 (Scan_ALI): do not issue a fatal error if parsing known lines after Xref
371 section (does not happen in compiler, only if code directly calls
373 * get_alfa.adb, get_alfa.ads: New files.
374 * lib-writ.adb, lib-writ.ads (Write_ALI): output ALFA information if
376 * lib-xref-alfa.adb: New file.
377 * lib-xref.adb, lib-xref.ads
378 (Xref_Entry): redefine information needed in cross-references for ALFA.
379 Push ALFA treatments in separated local package.
380 (Enclosing_Subpragram_Or_Package): treat specially subprogram
381 identifiers. Return entity of package body instead of spec. Return
382 Empty for a scope with no location.
383 (Generate_Reference): adapt to new components for ALFA information.
384 Remove the need for D references on definitions.
385 (Is_Local_Reference): moved to ALFA local package
386 (Output_References): extract subfunction as Extract_Source_Name
387 (Output_Local_References): remove procedure, replaced by filtering of
388 cross-references in package ALFA and printing in Put_ALFA.
389 (Write_Entity_Name): remove procedure
390 * lib.adb, lib.ads (Extract_Source_Name): extract here function to
391 print exact name of entity as it appears in source file
392 (Unit_Ref_Table): make type public for use in Lib.Xref.ALFA
393 * put_alfa.adb, put_alfa.ads: New files.
394 * xref_lib.adb (Search_Xref): protect read of cross-references against
395 reading other sections of the ALI file, in gnatxref
396 (Search): protect read of cross-references against reading other
397 sections of the ALI file, in gnatfind.
398 * gcc-interface/Make-lang.in: Update dependencies.
400 2011-08-03 Thomas Quinot <quinot@adacore.com>
402 * sem_ch3.adb: Minor reformatting.
404 2011-08-03 Jose Ruiz <ruiz@adacore.com>
406 * s-inmaop-vxworks.adb (Setup_Interrupt_Mask): Do nothing instead of
407 raising an exception.
409 2011-08-03 Ed Schonberg <schonberg@adacore.com>
411 * sem_res.adb (Set_String_Literal_Subtype): if index type is an integer
412 type, always use 1 as the lower bound or string, even if lower bound of
413 context is not static, to handle properly null strings in a non-static
416 2011-08-03 Bob Duff <duff@adacore.com>
418 * sem_prag.adb (Resolve_Aggregate): An array aggregate with 'others' is
419 always legal on the right-hand side of an assignment statement; there
420 is always an applicable index constraint in this case. Therefore, the
421 check for Pkind = N_Assignment_Statement is now unconditional -- it
422 doesn't depend on whether Is_Constrained (Typ).
424 2011-08-03 Robert Dewar <dewar@adacore.com>
426 * exp_ch5.adb, sem_prag.adb, exp_ch4.adb: Minor reformatting.
428 2011-08-03 Ed Schonberg <schonberg@adacore.com>
430 * sem_ch3.adb (Build_Itype_Reference): do not create an itype reference
431 for an itype created within a generic unit.
433 2011-08-03 Eric Botcazou <ebotcazou@adacore.com>
435 * gnat_ugn.texi (Switches for gcc): Make it clearer that -fno-inline
436 suppresses all inlining.
438 2011-08-03 Robert Dewar <dewar@adacore.com>
440 * sem_ch3.adb, sem_res.adb, exp_ch13.adb, exp_disp.adb,
441 exp_aggr.adb: Minor reformatting.
443 2011-08-03 Thomas Quinot <quinot@adacore.com>
445 * exp_ch5.adb (Expand_N_Assignment_Statement): Do not force inlining of
446 tagged assignment when discriminant checks are suppressed. This is
447 useless and extremely costly in terms of static stack usage.
449 2011-08-03 Bob Duff <duff@adacore.com>
451 * sem_prag.adb (Get_Base_Subprogram): Do not follow Alias for instances
452 of generics, because this leads to the wrong entity in the wrong scope,
453 causing (e.g.) pragma Export_Procedure to get an error if the entity is
455 (Process_Interface_Name): Follow Alias for instances of generics, to
456 correct for the above change.
458 2011-08-03 Ed Schonberg <schonberg@adacore.com>
460 * exp_ch4.adb (Expand_N_Selected_Component): If the discriminant value
461 is an integer literal it is always safe to replace the reference. In
462 addition, if the reference appears in the generated code for an object
463 declaration it is necessary to copy because otherwise the reference
464 might be to the uninitilized value of the discriminant of the object
467 2011-08-03 Pascal Obry <obry@adacore.com>
469 * adaint.c (__gnat_is_executable_file_attr): Fix Win32 circuitry when no
470 ACL used, in this case we want to check for ending .exe, not .exe
471 anywhere in the path.
473 2011-08-03 Sergey Rybin <rybin@adacore.com>
475 * tree_io.ads (ASIS_Version_Number): Update because of the changes in
476 the tree structure (semantic decoration of references to record
479 2011-08-03 Gary Dismukes <dismukes@adacore.com>
481 * sem_aggr.adb (Analyze_Array_Aggregate): When checking the discrete
482 choices of a named array aggregate, bail out when any choices are
483 marked as Errors_Posted.
485 2011-08-03 Ed Schonberg <schonberg@adacore.com>
487 * exp_ch13.adb (Expand_N_Freeze_Entity): cleanup determination of scope
488 in which entity is frozen, to handle properly loop variables in
491 2011-08-03 Ed Schonberg <schonberg@adacore.com>
493 * sem_res.adb (Set_String_Literal_Subtype): if the lower bound of the
494 subtype is not static, compute the upper bound using attributes, to
495 handle properly index types that are not integer types.
497 2011-08-03 Bob Duff <duff@adacore.com>
499 * gnat_rm.texi, gnat_ugn.texi: Fix some dangling URLs.
500 Update copyright notice.
502 2011-08-03 Ed Schonberg <schonberg@adacore.com>
504 * sem_ch3.adb (Build_Discriminant_Constraints): Only use
505 Original_Discriminant if within an instance.
506 * sem_ch4.adb (Analyze_Selected_Component): Ditto.
508 2011-08-03 Thomas Quinot <quinot@adacore.com>
510 * einfo.ads: Minor reformatting.
512 2011-08-03 Ed Schonberg <schonberg@adacore.com>
514 * exp_disp.adb (Check_Premature_Freezing): diagnose the presence of a
515 composite type with an unfrozen subcomponent, in the profile of a
518 2011-08-03 Robert Dewar <dewar@adacore.com>
520 * sem_util.ads, exp_aggr.adb, exp_ch3.adb: Minor reformatting.
522 2011-08-03 Ed Schonberg <schonberg@adacore.com>
524 * sem_ch3.adb (Analyze_Object_Declaration): if a constant object of an
525 unconstrained type with discriminants is initialized with an aggregate,
526 use the constrained subtype of the aggregate as the type of the object,
527 because it is immutable, and this allows the back-end to generate no
528 code for the object declaration.
530 2011-08-03 Robert Dewar <dewar@adacore.com>
532 * exp_ch4.adb (Optimize_Length_Check): Fix bad handling of case where
533 comparison operand is variable, and turns out to be zero or negative.
535 2011-08-03 Javier Miranda <miranda@adacore.com>
538 (Expand_Dispatching_Constructor_Call): Disable expansion of
539 code required for native targets. Done to avoid generating
540 references to unavailable runtime entities in VM targets.
542 (Expand_N_Object_Declaration): Add missing support to handle
543 the explicit initialization of class-wide interface objects.
546 2011-08-03 Matthew Heaney <heaney@adacore.com>
548 * a-cobove.adb (Merge): Move source onto target, instead of using Assign
550 2011-08-03 Matthew Heaney <heaney@adacore.com>
552 * a-cbdlli.adb (Splice): move source items from first to last
554 2011-08-03 Yannick Moy <moy@adacore.com>
556 * sem_util.ads: comment added.
558 2011-08-03 Javier Miranda <miranda@adacore.com>
561 (Expand_Record_Aggregate): In VM targets disable the expansion into
562 assignments of aggregates whose type is not known at compile time.
564 2011-08-03 Ed Schonberg <schonberg@adacore.com>
566 * exp_ch9.adb (Build_Renamed_Formal_Declaration): common procedure for
567 protected entries and task entries, to build the proper renaming
568 declaration for entry formals, used in debugging.
569 * exp_ch2.adb (Expand_Entry_Parameter): handle task and entry
570 parameters in the same way.
572 2011-08-02 Robert Dewar <dewar@adacore.com>
574 * a-direct.adb, sinfo.ads, exp_ch9.adb, scng.adb, sem_util.adb,
575 sem_util.ads, restrict.ads, par-prag.adb: Minor reformatting and/or
578 2011-08-02 Robert Dewar <dewar@adacore.com>
580 * debug.adb: Debug flag d.P to suppress length comparison optimization
581 * exp_ch4.adb (Optimize_Length_Comparison): New routine to optimize
582 comparison of Length by comparing First/Last instead.
584 2011-08-02 Matthew Heaney <heaney@adacore.com>
586 * a-cobove.ads: Code clean up.
588 2011-08-02 Vincent Celier <celier@adacore.com>
590 * adaint.c (file_names_case_sensitive_cache): New static int.
591 (__gnat_get_file_names_case_sensitive): Cache the return value in
592 file_names_case_sensitive_cache at the first invocation, to avoid
593 multiple calls to getenv.
595 2011-08-02 Bob Duff <duff@adacore.com>
597 * sem_ch12.adb (Validate_Derived_Type_Instance): Implement AI05-0218-1.
599 2011-08-02 Yannick Moy <moy@adacore.com>
601 * sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_prag.adb, sem.ads,
602 sem_util.adb, sem_util.ads, sem_res.adb, sem_ch2.adb, sem_ch4.adb,
603 sem_ch6.adb, sem_ch11.adb: Add semantic flag In_Pre_Post_Expression to
604 indicate that we are in a precondition or postcondition. This is used in
605 Mark_Non_ALFA_Subprogram (renaming of Mark_Non_ALFA_Subprogram_Body) to
606 decide whether to flag the spec or body of the current subprogram as
609 2011-08-02 Fabien Chouteau <chouteau@adacore.com>
611 * impunit.adb: Add Ada.Execution_Time.Interrupts in the Ada2012 package
613 * a-extiin.ads: New file.
615 2011-08-02 Bob Duff <duff@adacore.com>
617 * a-direct.adb (Rename): Implement AI05-0231-1. In particular, Rename
618 now raises Name_Error instead of Use_Error in certain cases. The other
619 parts of this AI were already implemented properly.
621 2011-08-02 Vincent Celier <celier@adacore.com>
623 * link.c: Only import "auto-host.h" when building the gnattools.
625 2011-08-02 Yannick Moy <moy@adacore.com>
627 * sem_util.adb: Inter-unit inlining does not work for a subprogram
628 which calls a local subprogram, so extract subprogram
629 from Mark_Non_ALFA_Subprogram_Body.
631 2011-08-02 Javier Miranda <miranda@adacore.com>
634 (Extract_Dispatching_Call): If the type of the dispatching object is an
635 access type then return an explicit dereference in the Object out-mode
638 2011-08-02 Gary Dismukes <dismukes@adacore.com>
640 * sem_ch3.adb (Analyze_Subtype_Declaration): Generate range
641 compatibility checks for all indexes of an array subtype, not just the
642 first. Reset Has_Dynamic_Range_Check on the subtype before each
643 potential check to ensure that Insert_Range_Checks will not elide any
644 of the dynamic checks.
646 2011-08-02 Yannick Moy <moy@adacore.com>
648 * par-prag.ad (Process_Restrictions_Or_Restriction_Warnings): recognize
649 SPARK restriction at parsing time.
650 * scng.adb (Scan): Generate a token Tok_SPARK_Hide for a SPARK HIDE
651 directive only if the SPARK restriction is set for this unit.
653 2011-08-02 Yannick Moy <moy@adacore.com>
655 * sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_util.adb, sem_util.ads,
656 sem_res.adb, sem_ch2.adb, sem_ch4.adb, sem_ch6.adb,
657 sem_ch11.adb: Protect call to Current_Subprogram which might be costly
658 when repeated. Rename Current_Subprogram_Is_Not_In_ALFA into
659 Mark_Non_ALFA_Subprogram_Body.
660 Split body of Mark_Non_ALFA_Subprogram_Body to get body small and
663 2011-08-02 Yannick Moy <moy@adacore.com>
665 * sem_res.adb: Protect calls to Matching_Static_Array_Bounds which
668 2011-08-02 Robert Dewar <dewar@adacore.com>
670 * exp_ch9.adb, exp_sel.adb, restrict.ads, exp_disp.adb, erroutc.ads,
671 exp_ch3.adb: Minor reformatting.
673 2011-08-02 Emmanuel Briot <briot@adacore.com>
675 * adaint.c (__gnat_locate_exec_on_path): only returns executable
676 files, not any regular file.
677 (__gnat_locate_file_with_predicate): new subprogram.
679 2011-08-02 Yannick Moy <moy@adacore.com>
681 * sinfo.adb, sinfo.ads: Restrict the use of flags
682 Has_Dynamic_Length_Check and Has_Dynamic_Range_Check to expression
683 nodes, plus N_Subtype_Declaration for the 2nd one.
685 2011-08-02 Sergey Rybin <rybin@adacore.com>
687 * gnat_rm.texi: Ramification of pragma Eliminate documentation
688 - fix bugs in the description of Source_Trace;
689 - get rid of UNIT_NAME;
691 2011-08-02 Javier Miranda <miranda@adacore.com>
694 (Build_Dispatching_Requeue): Adding support for VM targets
695 since we cannot directly reference the Tag entity.
696 * exp_sel.adb (Build_K): Adding support for VM targets.
697 (Build_S_Assignment): Adding support for VM targets.
699 (Default_Prim_Op_Position): In VM targets do not restrict availability
700 of predefined interface primitives to compiling in Ada 2005 mode.
701 (Is_Predefined_Interface_Primitive): In VM targets this service is not
702 restricted to compiling in Ada 2005 mode.
703 (Make_VM_TSD): Generate code that declares and initializes the OSD
704 record. Needed to support dispatching calls through synchronized
707 (Make_Predefined_Primitive_Specs): Enable generation of predefined
708 primitives associated with synchronized interfaces.
709 (Make_Predefined_Primitive_Bodies): Enable generation of predefined
710 primitives associated with synchronized interfaces.
712 2011-08-02 Yannick Moy <moy@adacore.com>
714 * par-ch11.adb (P_Handled_Sequence_Of_Statements): mark a sequence of
715 statements hidden in SPARK if preceded by the HIDE directive
716 (Parse_Exception_Handlers): mark each exception handler in a sequence of
717 exception handlers as hidden in SPARK if preceded by the HIDE directive
718 * par-ch6.adb (P_Subprogram): mark a subprogram body hidden in SPARK
719 if starting with the HIDE directive
720 * par-ch7.adb (P_Package): mark a package body hidden in SPARK if
721 starting with the HIDE directive; mark the declarations in a private
722 part as hidden in SPARK if the private part starts with the HIDE
724 * restrict.adb, restrict.ads
725 (Set_Hidden_Part_In_SPARK): record a range of slocs as hidden in SPARK
726 (Is_In_Hidden_Part_In_SPARK): new function which returns whether its
727 argument node belongs to a part which is hidden in SPARK
728 (Check_SPARK_Restriction): do not issue violations on nodes in hidden
729 parts in SPARK; protect the possibly costly call to
730 Is_In_Hidden_Part_In_SPARK by a check that the SPARK restriction is on
731 * scans.ads (Token_Type): new value Tok_SPARK_Hide in enumeration
732 * scng.adb (Accumulate_Token_Checksum_GNAT_6_3,
733 Accumulate_Token_Checksum_GNAT_5_03): add case for new token
735 (Scan): recognize special comment starting with '#' and followed by
736 SPARK keyword "hide" as a HIDE directive.
738 2011-08-02 Yannick Moy <moy@adacore.com>
740 * types.ads, erroutc.ads: Minor reformatting.
742 2011-08-02 Vincent Celier <celier@adacore.com>
744 * link.c: Add response file support for cross platforms.
746 2011-08-02 Ed Schonberg <schonberg@adacore.com>
748 * sem_aggr.adb (Resolve_Array_Aggregate): when copying the expression
749 in an association, set parent field of copy before partial analysis.
750 * sem_res.adb (Resolve_Slice): create reference to itype only when
751 expansion is enabled.
753 2011-08-02 Yannick Moy <moy@adacore.com>
755 * einfo.adb, einfo.ads (Body_Is_In_ALFA, Set_Body_Is_In_ALFA): get/set
756 for new flag denoting which subprogram bodies are in ALFA
757 * restrict.adb, sem_ch7.adb: Update comment
758 * sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
759 sem_ch9.adb, sem_res.adb: Add calls to
760 Current_Subprogram_Body_Is_Not_In_ALFA on unsupported constructs.
761 * sem_ch6.adb (Analyze_Function_Return): add calls to
762 Current_Subprogram_Body_Is_Not_In_ALFA on return statement in the
763 middle of the body, and extended return.
764 (Check_Missing_Return): add calls to Set_Body_Is_In_ALFA with argument
765 False when missing return.
766 (Analyze_Subprogram_Body_Helper): initialize the flag Body_Is_In_ALFA
767 to True for subprograms whose spec is in ALFA. Remove later on the flag
768 on the entity used for a subprogram body when there exists a separate
770 * sem_util.adb, sem_util.ads (Current_Subprogram_Body_Is_Not_In_ALFA):
771 if Current_Subprogram is not Empty, set its flag Body_Is_In_ALFA to
772 False, otherwise do nothing.
774 2011-08-02 Robert Dewar <dewar@adacore.com>
776 * inline.adb, stand.ads, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
778 2011-08-02 Yannick Moy <moy@adacore.com>
780 * sem_ch4.ads: minor formatting.
782 2011-08-02 Yannick Moy <moy@adacore.com>
784 * sem_aggr.adb, err_vars.ads, sem_ch3.adb, sem_ch5.adb, sem_ch9.adb,
785 debug.adb, sem_util.adb, sem_res.adb, sem_attr.adb, gnat1drv.adb,
786 errout.adb, errout.ads, exp_ch6.adb, sem_ch4.adb, restrict.adb,
787 restrict.ads, sem_ch6.adb, sem_ch8.adb, sem_ch11.adb,
788 opt.ads: cleanup of SPARK mode
790 2011-08-02 Yannick Moy <moy@adacore.com>
792 * cstand.adb (Create_Standard): sets Is_In_ALFA component of standard
794 * einfo.adb, einfo.ads (Is_In_ALFA): add flag for all entities
795 (Is_In_ALFA, Set_Is_In_ALFA): new subprograms to access flag Is_In_ALFA
797 (Analyze_Object_Declaration): set Is_In_ALFA flag for objects
798 (Constrain_Enumeration): set Is_In_ALFA flag for enumeration subtypes
799 (Constrain_Integer): set Is_In_ALFA flag for integer subtypes
800 (Enumeration_Type_Declaration): set Is_In_ALFA flag for enumeration
802 (Set_Scalar_Range_For_Subtype): unset Is_In_ALFA flag for subtypes with
804 * sem_ch6.adb (Analyze_Return_Type): unset Is_In_ALFA flag for
805 functions whose return type is not in ALFA.
806 (Analyze_Subprogram_Specification): set Is_In_ALFA flag for subprogram
808 (Process_Formals): unset Is_In_ALFA flag for subprograms if a
809 parameter's type is not in ALFA.
810 * stand.ads (Standard_Type_Is_In_ALFA): array defines which standard
813 2011-08-02 Ed Schonberg <schonberg@adacore.com>
815 * sem_ch6 (Analyze_Expression_Function): treat the function as
816 Inline_Always, and introduce a subprogram declaration for it when it is
818 * inline.adb (Add_Inlined_Body): recognize bodies that come from
819 expression functions, so that the back-end can determine whether they
820 can in fact be inlined.
821 * sem_util.adb (Is_Expression_Function): predicate to determine whether
822 a function body comes from an expression function.
824 2011-08-02 Gary Dismukes <dismukes@adacore.com>
826 * sem_ch6.adb (Check_Conformance): Revise the check for nonconforming
827 null exclusions to test Can_Never_Be_Null on the anonymous access types
828 of the formals rather than testing the formals themselves. Exclude this
829 check in cases where the Old_Formal is marked as a controlling formal,
830 to avoid issuing spurious errors for bodies completing dispatching
831 operations (due to the flag not getting set on controlling access
832 formals in body specs).
833 (Find_Corresponding_Spec): When checking full and subtype conformance of
834 subprogram bodies in instances, pass Designated and E in that order, for
835 consistency with the expected order of the formals (New_Id followed by
838 2011-08-02 Robert Dewar <dewar@adacore.com>
840 * sem_ch8.adb: Minor reformatting.
842 2011-08-02 Ed Schonberg <schonberg@adacore.com>
844 * sem_ch8.adb (Analyze_Subprogram_Renaming): new procedure
845 Check_Class_Wide_Actual, to implement AI05-0071, on defaulted
846 primitive operations of class-wide actuals.
848 2011-08-02 Javier Miranda <miranda@adacore.com>
850 * exp_atag.ads, exp_atag.adb
851 (Build_Common_Dispatching_Select_Statements): Remove argument Loc
852 since its value is implicitly passed in argument Typ.
853 * exp_disp.adb (Make_Disp_Conditional_Select_Body,
854 Make_Disp_Timed_Select_Body): Remove Loc in calls to routine
855 Build_Common_Dispatching_Select_Statements.
857 2011-08-02 Robert Dewar <dewar@adacore.com>
859 * sem_ch3.adb, exp_atag.ads, get_scos.adb, get_scos.ads,
860 exp_disp.adb, lib-xref.adb, lib-xref.ads: Update comments.
863 2011-08-02 Robert Dewar <dewar@adacore.com>
865 * sem_res.adb: Minor reformatting.
866 * sem_prag.adb: Minor reformatting.
868 2011-08-02 Javier Miranda <miranda@adacore.com>
870 * exp_atag.adb, exp_atags.ads
871 (Build_Common_Dispatching_Select_Statement): Replace argument DT_Ptr
872 by the tagged type Entity. Required to use this routine in the VM
873 targets since we do not have available the Tag entity in the VM
876 (Expand_N_Subprogram_Body): Do not invoke Build_VM_TSDs if package
877 Ada.Tags has not been previously loaded.
879 (Expand_N_Package_Declaration, Expand_N_Package_Body): Do not invoke
880 Build_VM_TSDs if package Ada.Tags has not been previously loaded.
882 (Enclosing_Dynamic_Scope): Add missing support to handle the full
883 view of enclosing scopes. Required to handle enclosing scopes that
884 are synchronized types whose full view is a task type.
886 (Build_VM_TSDs): Minor code improvement to avoid generating and
887 analyzing lists with empty nodes.
888 (Make_Disp_Asynchronous_Select_Body): Add support for VM targets.
889 (Make_Disp_Conditional_Select_Body): Add support for VM targets.
890 (Make_Disp_Get_Prim_Op_Kind): Add support for VM targets.
891 (Make_Disp_Timed_Select_Body): Add support for VM targets.
892 (Make_Select_Specific_Data_Table): Add support for VM targets.
893 (Make_VM_TSD): Generate code to initialize the SSD structure of
896 2011-08-02 Yannick Moy <moy@adacore.com>
898 * lib-writ.adb (Write_ALI): when ALFA mode is set, write local
899 cross-references section in ALI.
900 * lib-xref.adb, lib-xref.ads (Xref_Entry): add components Sub
901 (enclosing subprogram), Slc (location of Sub) and Sun (unit number of
903 (Enclosing_Subprogram_Or_Package): new function to return the enclosing
904 subprogram or package entity of a node
905 (Is_Local_Reference_Type): new function returns True for references
906 selected in local cross-references.
907 (Lt): function extracted from Lt in Output_References
908 (Write_Entity_Name): function extracted from Output_References
909 (Generate_Definition): generate reference with type 'D' for definition
910 of objects (object declaration and parameter specification), with
911 appropriate locations and units, for use in local cross-references.
912 (Generate_Reference): update fields Sub, Slc and Sun. Keep newly created
913 references of type 'I' for initialization in object definition.
914 (Output_References): move part of function Lt and procedure
915 Write_Entity_Name outside of the body. Ignore references of types 'D'
916 and 'I' introduced for local cross-references.
917 (Output_Local_References): new procedure to output the local
918 cross-references sections.
919 (Lref_Entity_Status): new array defining whether an entity is a local
920 * sem_ch3.adb (Analyze_Object_Declaration): call Generate_Reference
921 with 'I' type when initialization expression is present.
922 * get_scos.adb, get_scos.ads: Correct comments and typos
924 2011-08-02 Javier Miranda <miranda@adacore.com>
926 * exp_ch6.adb (Expand_N_Subprogram_Body): Enable generation of TSDs in
928 * exp_ch7.adb (Expand_N_Package_Body): Enable generation of TSDs in
930 * exp_disp.adb (Build_VM_TSDs): No action needed if the runtime has no
933 2011-08-02 Vincent Celier <celier@adacore.com>
935 * prj-nmsc.adb (File_Found): New components Excl_File and Excl_Line
936 (No_Space_Img): New function
937 (Find_Excluded_Sources): When reading from a file, record the file name
938 and the line number for each excluded source.
939 (Mark_Excluded_Sources): When reporting an error, if the excluded
940 sources were read from a file, include file name and line number in
943 2011-08-02 Ed Schonberg <schonberg@adacore.com>
945 * sem_res.adb (Resolve_Call): implement rule in RM 12.5.1 (23.3/2).
947 2011-08-02 Robert Dewar <dewar@adacore.com>
949 * exp_ch7.adb exp_ch6.adb, exp_disp.adb: Minor reformatting
951 2011-08-02 Javier Miranda <miranda@adacore.com>
953 * exp_ch6.adb (Expand_N_Subprogram_Body): Temporarily restrict the
954 generation of TSDs to the DOTNET compiler.
955 * exp_ch7.adb (Expand_N_Package_Body): Temporarily restrict the
956 generation of TSDs to the DOTNET compiler.
958 2011-08-02 Javier Miranda <miranda@adacore.com>
960 * exp_disp.ads (Build_VM_TSDs): Build the runtime Type Specific Data
961 record of all the tagged types declared inside library level package
962 declarations, library level package bodies or library level subprograms.
963 * exp_disp.adb (Make_VM_TSD): New subprogram that builds the TSD
964 associated with a given tagged type.
965 (Build_VM_TSDs): New subprogram.
966 * exp_ch6.adb (Expand_N_Subprogram_Body): Generate TSDs records of main
967 compilation units that are subprograms.
968 * exp_ch7.adb (Expand_N_Package_Body): Generate TSDs of main
969 compilation units that are package bodies.
970 (Expand_N_Package_Declaration): Generate TSDs of the main compilation
971 units that are a package declaration or a package instantiation.
972 * exp_intr.adb (Expand_Dispatching_Constructor_Call): Minor code
973 reorganization to improve the error generated by the frontend when the
974 function Ada.Tags.Secondary_Tag is not available.
975 * rtsfind.ads (RE_Register_TSD): New runtime entity.
976 * exp_ch4.adb (Expand_N_Type_Conversion): Minor code cleanup.
978 2011-08-02 Javier Miranda <miranda@adacore.com>
980 * exp_disp.adb (Make_DT): Generate call to Check_TSD in Ada 2005 mode.
982 2011-08-02 Robert Dewar <dewar@adacore.com>
984 * s-imenne.ads: Minor reformatting.
986 2011-08-02 Robert Dewar <dewar@adacore.com>
988 * a-stunau.ads: Add pragma Suppress_Initialization for Big_String
989 * freeze.adb (Warn_Overlay): Don't warn if initialization suppressed
990 * s-stalib.ads: Add pragma Suppress_Initialization for Big_String
992 2011-08-02 Robert Dewar <dewar@adacore.com>
994 * einfo.ads (Materialize_Entity): Document this is only for renamings
995 * exp_ch3.adb (Expand_N_Object_Declaration): Make sure we generate
996 required debug information in the case where we transform the object
997 declaration into a renaming declaration.
998 * exp_ch4.adb (Expand_Concatenate): Generate debug info for result
1000 * exp_dbug.ads (Debug_Renaming_Declaration): Document setting of
1003 2011-08-02 Robert Dewar <dewar@adacore.com>
1005 * einfo.ads, einfo.adb (Suppress_Initialization): Replaces
1006 Suppress_Init_Procs.
1007 * exp_ch3.adb, exp_disp.adb, freeze.adb: Use
1008 Suppress_Initialization/Initialization_Suppressed.
1009 * gnat_rm.texi: New documentation for pragma Suppress_Initialization
1010 * sem_aux.ads, sem_aux.adb (Initialization_Suppressed): New function
1011 * sem_dist.adb: Use Suppress_Initialization/Initialization_Suppressed
1012 * sem_prag.adb: New processing for pragma Suppress_Initialization.
1014 2011-08-02 Robert Dewar <dewar@adacore.com>
1016 * gnat_rm.texi, a-tags.ads, sem_prag.adb, sem_ch12.adb, exp_disp.adb:
1019 2011-08-02 Ed Schonberg <schonberg@adacore.com>
1021 * sem_prag.adb (Chain_PPC): Implement AI04-0230: null procedures can
1022 only have inheritable classwide pre/postconditions.
1024 2011-08-02 Javier Miranda <miranda@adacore.com>
1026 * a-tags.ads, a-tags.adb (Check_TSD): New subprogram.
1027 * rtsfind.ads (RE_Check_TSD): New runtime entity.
1028 * exp_disp.adb (Make_DT): Generate call to the new runtime routine that
1029 checks if the external tag of a type is the same as the external tag
1030 of some other declaration.
1032 2011-08-02 Thomas Quinot <quinot@adacore.com>
1034 * s-taskin.ads: Minor reformatting.
1036 2011-08-02 Emmanuel Briot <briot@adacore.com>
1038 * g-comlin.adb (Display_Help): swap the order in which it prints the
1039 short help and the general usage.
1041 2011-08-02 Ed Schonberg <schonberg@adacore.com>
1043 * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration): copy properly
1044 the aspect declarations and attach them to the generic copy for
1045 subsequent analysis.
1046 (Analyze_Subprogram_Instantiation): copy explicitly the aspect
1047 declarations of the generic tree to the new subprogram declarations.
1048 * sem_attr.adb (Check_Precondition_Postcondition): recognize
1049 conditions that apply to a subprogram instance.
1051 2011-08-02 Robert Dewar <dewar@adacore.com>
1053 * gnat_rm.texi: Clarify doc on pragma Source_File_Name[_Project].
1055 2011-08-02 Ed Schonberg <schonberg@adacore.com>
1057 * sem_ch3.adb (Derived_Type_Declaration): When checking that a untagged
1058 private type with a tagged full view is not derived in the immediate
1059 scope of the partial view, (RM 7.3 (7)) use the scope of the base type.
1061 2011-08-02 Robert Dewar <dewar@adacore.com>
1063 * exp_ch4.adb: Minor reformatting.
1065 2011-08-02 Ed Schonberg <schonberg@adacore.com>
1067 * sem_ch5.adb (Analyze_Loop_Statement): If the iteration scheme is an
1068 Ada2012 iterator, the loop will be rewritten during expansion into a
1069 while loop with a cursor and an element declaration. Do not analyze the
1070 body in this case, because if the container is for indefinite types the
1071 actual subtype of the elements will only be determined when the cursor
1072 declaration is analyzed.
1074 2011-08-02 Arnaud Charlet <charlet@adacore.com>
1076 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Ignore
1077 size/alignment related attributes in CodePeer_Mode.
1079 2011-08-02 Gary Dismukes <dismukes@adacore.com>
1081 * sem_ch3.adb (Check_Ops_From_Incomplete_Type): Remove call to
1082 Prepend_Element, since this can result in the operation getting the
1083 wrong slot in the full type's dispatch table if the full type has
1084 inherited operations. The incomplete type's operation will get added
1085 to the proper position in the full type's primitives
1086 list later in Sem_Disp.Check_Operation_From_Incomplete_Type.
1087 (Process_Incomplete_Dependents): Add Is_Primitive test when checking for
1088 dispatching operations, since there are cases where nonprimitive
1089 subprograms can get added to the list of incomplete dependents (such
1090 as subprograms in nested packages).
1091 * sem_ch6.adb (Process_Formals): First, remove test for being in a
1092 private part when determining whether to add a primitive with a
1093 parameter of a tagged incomplete type to the Private_Dependents list.
1094 Such primitives can also occur in the visible part, and should not have
1095 been excluded from being private dependents.
1096 * sem_ch7.adb (Uninstall_Declarations): When checking the rule of
1097 RM05-3.10.1(9.3/2), test that a subprogram in the Private_Dependents
1098 list of a Taft-amendment incomplete type is a primitive before issuing
1099 an error that the full type must appear in the same unit. There are
1100 cases where nonprimitives can be in the list (such as subprograms in
1102 * sem_disp.adb (Derives_From): Use correct condition for checking that
1103 a formal's type is derived from the type of the corresponding formal in
1104 the parent subprogram (the condition was completely wrong). Add
1105 checking that was missing for controlling result types being derived
1106 from the result type of the parent operation.
1108 2011-08-02 Yannick Moy <moy@adacore.com>
1110 * errout.adb (First_Node): minor renaming
1111 * restrict.adb (Check_Formal_Restriction): put restriction warning on
1114 2011-08-02 Yannick Moy <moy@adacore.com>
1116 * sem_res.adb (Resolve_Logical_Op): ensure N is a binary operator
1117 before accessing operands.
1118 * sem_util.adb (Is_SPARK_Initialization_Expr): follow original nodes to
1119 decide whether an initialization expression respects SPARK rules, as
1120 the plain node is the expanded one. This allows for more valid warnings
1122 * gnat_rm.texi: Minor update.
1124 2011-08-02 Arnaud Charlet <charlet@adacore.com>
1126 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Revert
1129 2011-08-02 Robert Dewar <dewar@adacore.com>
1131 * sem_ch3.adb, sem_ch4.adb: Minor reformatting.
1133 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
1135 * exp_ch5.adb (Expand_Iterator_Loop): Reformatting. Wrap the original
1136 loop statements and the element renaming declaration with a block when
1137 the element type is controlled.
1139 2011-08-02 Yannick Moy <moy@adacore.com>
1141 * sinfo.ads: Minor formatting.
1143 2011-08-02 Ed Schonberg <schonberg@adacore.com>
1145 * sem_aggr.adb (Add_Association): if the association has a box and no
1146 expression, use the Sloc of the aggregate itself for the new
1148 * errout.adb (First_Node): Exclude nodes with no Sloc, and always use
1151 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
1153 * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and refactoring.
1154 When a container is provided via a function call, generate a renaming
1155 of the function result. This avoids the creation of a transient scope
1156 and the premature finalization of the container.
1157 * exp_ch7.adb (Is_Container_Cursor): Removed.
1158 (Wrap_Transient_Declaration): Remove the supression of the finalization
1159 of the list controller when the declaration denotes a container cursor,
1162 2011-08-02 Yannick Moy <moy@adacore.com>
1164 * restrict.adb (Check_Formal_Restriction): only issue a warning if the
1165 node is from source, instead of the original node being from source.
1167 (Resolve_Array_Aggregate): refine the check for a static expression, to
1168 recognize also static ranges
1169 * sem_ch3.adb, sem_ch3.ads (Analyze_Component_Declaration,
1170 Array_Type_Declaration): postpone the test for the type being a subtype
1171 mark after the type has been resolved, so that component-selection and
1172 expanded-name are discriminated.
1173 (Make_Index, Process_Range_Expr_In_Decl): add a parameter In_Iter_Schm
1174 to distinguish the case of an iteration scheme, so that an error is
1175 issed on a non-static range in SPARK except in an iteration scheme.
1176 * sem_ch5.adb (Analyze_Iteration_Scheme): call Make_Index with
1177 In_Iter_Schm = True.
1178 * sem_ch6.adb (Analyze_Subprogram_Specification): refine the check for
1179 user-defined operators so that they are allowed in renaming
1181 (Find_Selected_Component): refine the check for prefixing of operators
1182 so that they are allowed in renaming. Move the checks for restrictions
1183 on selector name after analysis discriminated between
1184 component-selection and expanded-name.
1185 * sem_res.adb (Resolve_Op_Concat_Arg): do not issue a warning on
1186 concatenation argument of string type if it is static.
1187 * sem_util.adb, sem_util.ads
1188 (Check_Later_Vs_Basic_Declarations): add a new function
1189 Is_Later_Declarative_Item to decice which declarations are allowed as
1190 later items, in the two different modes Ada 83 and SPARK. In the SPARK
1191 mode, add that renamings are considered as later items.
1192 (Enclosing_Package): new function to return the enclosing package
1193 (Enter_Name): correct the rule for homonyms in SPARK
1194 (Is_SPARK_Initialization_Expr): default to returning True on nodes not
1195 from source (result of expansion) to avoid issuing wrong warnings.
1197 2011-08-02 Ed Schonberg <schonberg@adacore.com>
1199 * errout.adb: On anything but an expression First_Node returns its
1202 2011-08-02 Pascal Obry <obry@adacore.com>
1204 * prj-proc.adb, make.adb, makeutl.adb: Minor reformatting.
1206 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
1208 * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and reorganization.
1209 Set the associated loop as the related expression of internally
1211 * exp_ch7.adb (Is_Container_Cursor): New routine.
1212 (Wrap_Transient_Declaration): Supress the finalization of the list
1213 controller when the declaration denotes a container cursor.
1215 2011-08-02 Yannick Moy <moy@adacore.com>
1217 * opt.ads (SPARK_Mode): update comment, SPARK_Mode only set through
1219 * par-ch3.adb (P_Delta_Constraint): remove check in SPARK mode that the
1220 expression is a simple expression. This check cannot be performed in
1221 the semantics, so just drop it.
1222 (P_Index_Or_Discriminant_Constraint): move check that the index or
1223 discriminant is a subtype mark to Analyze_Subtype_Declaration in the
1224 semantics. Other cases were previously checked in the semantics.
1225 * par-ch4.adb (P_Name): move checks that a selector name is not
1226 character literal or an operator symbol to Find_Selected_Component in
1228 * par-ch5.adb (Parse_Decls_Begin_End): move check that basic
1229 declarations are not placed after later declarations in a separate
1230 procedure in Sem_Util (possibly not the best choice?), to be used both
1231 during parsing, for Ada 83 mode, and during semantic analysis, for
1233 * par-endh.adb (Check_End): move check that end label is not missing
1234 to Process_End_Label in the semantics
1235 * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): remove
1236 the special case for SPARK restriction
1237 * par.adb: use and with Sem_Util, for use in Parse_Decls_Begin_End
1238 * restrict.adb, restrict.ads (Check_Formal_Restriction): add a
1239 parameter Force to issue the error message even on internal node (used
1240 for generated end label). Call Check_Restriction to check when an error
1241 must be issued. In SPARK mode, issue an error message even if the
1242 restriction is not set.
1243 (Check_Restriction): new procedure with an additional out parameter to
1244 inform the caller that a message has been issued
1245 * sem_aggr.adb: Minor modification of message
1246 * sem_attr.adb (Analyze_Attribute): call Check_Formal_Restriction
1247 instead of issuing an error message directly
1248 * sem_ch3.adb (Analyze_Declarations): move here the check that basic
1249 declarations are not placed after later declarations, by calling
1250 Check_Later_Vs_Basic_Declarations
1251 (Analyze_Subtype_Declaration): move here the check that an index or
1252 discriminant constraint must be a subtype mark. Change the check that
1253 a subtype of String must start at one so that it works on subtype marks.
1254 * sem_ch4.adb (Analyze_Call): move here the check that a named
1255 association cannot follow a positional one in a call
1256 * sem_ch5.adb (Check_Unreachable_Code): call Check_Formal_Restriction
1257 instead of issuing an error message directly
1258 * sem_ch8.adb (Find_Selected_Component): move here the check that a
1259 selector name is not a character literal or an operator symbol. Move
1260 here the check that the prefix of an expanded name cannot be a
1261 subprogram or a loop statement.
1262 * sem_util.adb, sem_util.ads (Check_Later_Vs_Basic_Declarations): new
1263 procedure called from parsing and semantics to check that basic
1264 declarations are not placed after later declarations
1265 (Process_End_Label): move here the check that end label is not missing
1267 2011-08-02 Arnaud Charlet <charlet@adacore.com>
1269 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Ignore enum
1270 representation clause in codepeer mode, since it confuses CodePeer and
1271 does not bring useful info.
1273 2011-08-02 Ed Falis <falis@adacore.com>
1275 * init.c: initialize fp hw on MILS.
1277 2011-08-02 Ed Schonberg <schonberg@adacore.com>
1279 * errout.adb (First_Node): for bodies, return the node itself (small
1280 optimization). For other nodes, do not check source_unit if the node
1281 comes from Standard.
1283 2011-08-02 Robert Dewar <dewar@adacore.com>
1285 * exp_ch3.adb: Minor comment additions.
1286 * sem_ch13.adb: Minor reformatting.
1288 2011-08-02 Pascal Obry <obry@adacore.com>
1290 * make.adb, makeutl.adb: Removes some superfluous directory separator.
1292 2011-08-02 Robert Dewar <dewar@adacore.com>
1294 * sem_attr.adb: Minor reformatting.
1296 2011-08-02 Robert Dewar <dewar@adacore.com>
1298 * einfo.adb (Has_Default_Aspect): Replaces Has_Default_Value
1299 (Has_Default_Component_Value): Removed
1300 * einfo.ads Comment updates
1301 (Has_Default_Aspect): Replaces Has_Default_Value
1302 (Has_Default_Component_Value): Removed
1304 (Expand_N_Freeze_Entity): Handle Default[_Component]_Value aspects
1306 (Build_Array_Init_Proc): Handle Default_[Component_]Value aspects
1307 (Get_Simple_Init_Val): Handle Default_Value aspect
1308 (Needs_Simple_Initialization): Handle Default_Value aspect
1309 * exp_ch3.ads: Needs_Simple_Initialization
1310 * freeze.adb (Freeze_Entity): Handle Default_[Component_]Value aspect
1311 * par-prag.adb (Pragma_Default[_Component]Value) Removed
1313 (Analyze_Aspect_Specifications): Fix Default[_Component]_Value aspects
1314 * sem_prag.adb (Pragma_Default[_Component]Value) Removed
1315 * snames.ads-tmpl (Pragma_Default[_Component]Value) Removed
1317 2011-08-02 Ed Schonberg <schonberg@adacore.com>
1319 * sem_ch5.adb (Analyze_Iterator_Specification): use base type to locate
1320 package containing iteration primitives.
1321 exp_ch5.adb (Expand_Iterator_Loop): ditto.
1323 2011-08-02 Ed Schonberg <schonberg@adacore.com>
1325 * sem_ch5.adb (Analyze_Iteration_Scheme): For an Ada2012 iterator with
1326 "of", pre-analyze expression in case it is a function call with
1327 finalization actions that must be placed ahead of the loop.
1328 * exp_ch5.adb (Expand_Iterator_Loop): If condition_actions are present
1329 on an Ada2012 iterator, insert them ahead of the rewritten loop.
1331 2011-08-02 Geert Bosch <bosch@adacore.com>
1333 * cstand.adb (Create_Float_Types): Only consider C's long double for
1334 Long_Long_Float, in addition to double.
1336 2011-08-02 Robert Dewar <dewar@adacore.com>
1338 * sem_ch3.adb, sem_ch5.adb, sem_type.adb, switch-c.adb, switch-c.ads,
1339 sem_prag.adb, sem_util.adb, sem_util.ads, sem_res.adb, warnsw.ads,
1340 prepcomp.ads, cstand.adb, stand.ads, a-calfor.adb, s-stusta.adb:
1343 2011-08-02 Ed Schonberg <schonberg@adacore.com>
1345 * sem_attr.adb: handle properly 'Result when it is a prefix of an
1348 2011-08-02 Javier Miranda <miranda@adacore.com>
1350 * einfo.ads, einfo.adb
1351 (Original_Access_Type): Move this attribute to Node26 since there was
1352 an undocumented use of Node21 in E_Access_Subprogram_Type entities
1353 which causes conflicts and breaks the generation of the .NET compiler.
1354 (Interface_Name): Add missing documentation on JGNAT only uses of
1357 2011-08-02 Geert Bosch <bosch@adacore.com>
1359 * cstand.adb (Back_End_Float_Types): Use Elist instead of Nlist
1360 (Find_Back_End_Float_Type): Likewise
1361 (Create_Back_End_Float_Types): Likewise
1362 (Create_Float_Types): Likewise
1363 (Register_Float_Type): Likewise
1364 * sem_ch3.adb (Floating_Point_Type_Declaration): Use Elist instead of
1365 Nlist and split out type selection in new local Find_Base_Type function.
1366 * sem_prag.adb (Process_Import_Predefined_Type): Use Elist instead of
1368 * stand.ads (Predefined_Float_Types): Use Elist instead of Nlist
1370 2011-08-02 Robert Dewar <dewar@adacore.com>
1372 * inline.adb: Minor code reorganization (put Get_Code_Unit_Entity in
1374 * opt.ads: Minor comment change.
1375 * sem_ch12.adb: Minor code reorganization.
1377 2011-08-02 Gary Dismukes <dismukes@adacore.com>
1379 * sem_ch3.adb (Complete_Private_Subtype): Don't append the private
1380 subtype's list of rep items to the list on the full subtype in the case
1381 where the lists are the same.
1383 2011-08-02 Geert Bosch <bosch@adacore.com>
1385 * switch-c.adb (Free): New deallocation procedure to avoid implicitly
1386 using the one from System.Strings, which also deallocates all strings.
1388 2011-08-02 Geert Bosch <bosch@adacore.com>
1390 * gcc-interface/gigi.h, gcc-interface/misc.c (enumerate_modes): New
1392 * gcc-interface/Make-lang.in: Update dependencies.
1394 2011-08-02 Olivier Hainque <hainque@adacore.com>
1396 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Set the function
1399 2011-08-02 Javier Miranda <miranda@adacore.com>
1401 * sem_ch3.adb (Check_Anonymous_Access_Components): Create extra formals
1402 associated with anonymous access to subprograms.
1404 2011-08-02 Geert Bosch <bosch@adacore.com>
1407 (Preprocessing_Symbol_Defs): Move from Prepcomp.Symbol_Definitions.
1408 (Preprocessing_Symbol_Last): Move from Prepcomp.Last_Definition.
1409 * prepcomp.adb (Symbol_Definitions, Last_Definition): Move to opt.ads
1410 (Add_Symbol_Definition): Move to switch-c.adb
1411 (Process_Command_Line_Symbol_Definitions): Adjust references to above.
1412 * prepcomp.ads: Remove dependency on Ada.Unchecked_Deallocation.
1413 (Add_Symbol_Definition): Move to switch-c.adb.
1414 * sem_ch13.adb, sem_prag.adb: Add dependency on Warnsw.
1416 (Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
1418 * sem_warn.ads (Warn_On_Record_Holes, Warn_On_Overridden_Size,
1419 Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
1421 * switch-c.adb: Replace dependency on Prepcomp and Sem_Warn by Warnsw.
1422 (Add_Symbol_Definition): Moved from Prepcomp.
1423 * switch-c.ads: Update copyright notice. Use String_List instead of
1424 Argument_List, removing dependency on System.OS_Lib.
1426 2011-08-02 Yannick Moy <moy@adacore.com>
1428 * sem_ch3.adb (Analyze_Object_Declaration): issue an error in formal
1429 mode on initialization expression which does not respect SPARK
1431 * sem_util.adb, sem_util.ads (Is_SPARK_Initialization_Expr): determines
1432 if the tree referenced by its argument represents an initialization
1433 expression in SPARK, suitable for initializing an object in an object
1436 2011-08-02 Javier Miranda <miranda@adacore.com>
1438 * exp_ch9.adb (Expand_Access_Protected_Subprogram_Type): Link the
1439 internally generated access to subprogram with its associated protected
1441 * einfo.ads, einfo.adb (Original_Access_Type): New attribute.
1443 2011-08-02 Geert Bosch <bosch@adacore.com>
1445 * cstand.adb (Register_Float_Type): Print information about type to
1446 register, if the Debug_Flag_Dot_B is set.
1447 * debug.adb (Debug_Flag_Dot_B): Document d.b debug option.
1448 * rtsfind.ads (RE_Max_Base_Digits): New run time entity.
1449 * sem_ch3.adb (Floating_Point_Type_Declaration): Allow declarations
1450 with a requested precision of more than Max_Digits digits and no more
1451 than Max_Base_Digits digits, if a range specification is present and the
1452 Predefined_Float_Types list has a suitable type to derive from.
1453 * sem_ch3.adb (Rep_Item_Too_Early): Avoid generating error in the
1454 case of type completion with pragma Import
1456 (Process_Import_Predefined_Type): Processing to complete a type
1457 with pragma Import. Currently supports floating point types only.
1458 (Set_Convention_From_Pragma): Do nothing without underlying type.
1459 (Process_Convention): Guard against absence of underlying type,
1460 which may happen when importing incomplete types.
1461 (Process_Import_Or_Interface): Handle case of importing predefined
1462 types. Tweak error message.
1464 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
1466 * inline.adb (Add_Inlined_Body): Adjust check for library-level inlined
1467 functions to previous change. Reorganize code slightly.
1469 2011-08-02 Geert Bosch <bosch@adacore.com>
1471 * back_end.ads (Register_Type_Proc): New call back procedure type for
1472 allowing the back end to provide information about available types.
1473 (Register_Back_End_Types): New procedure to register back end types.
1474 * back_end.adb (Register_Back_End_Types): Call the back end to enumerate
1476 * cstand.adb (Back_End_Float_Types): New list for floating point types
1477 supported by the back end.
1478 (Build_Float_Type): Add extra parameter for Float_Rep_Kind.
1479 (Copy_Float_Type): New procedure to make new copies of predefined types.
1480 (Register_Float_Type): New call back procedure to populate the BEFT list
1481 (Find_Back_End_Float_Type): New procedure to find a BEFT by name
1482 (Create_Back_End_Float_Types): New procedure to populate the BEFT list.
1483 (Create_Float_Types): New procedure to create entities for floating
1484 point types predefined in Standard, and put these and any remaining
1485 BEFTs on the Predefined_Float_Types list.
1486 * stand.ads (Predefined_Float_Types): New list for predefined floating
1487 point types that do not have declarations in package Standard.
1489 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
1491 * inline.adb (Get_Code_Unit_Entity): New local function. Returns the
1492 entity node for the unit containing the parameter.
1493 (Add_Inlined_Body): Use it to find the unit containing the subprogram.
1494 (Add_Inlined_Subprogram): Likewise.
1495 * gcc-interface/Make-lang.in: Update dependencies.
1497 2011-08-02 Thomas Quinot <quinot@adacore.com>
1499 * s-stusta.adb (Print): Make sure Pos is always initialized to a
1502 2011-08-02 Geert Bosch <bosch@adacore.com>
1504 * a-calfor.adb (Image): Simplify, removing unnecessary uses of 'Image.
1506 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
1508 * sem_type.adb (Covers): Move trivial case to the top and reuse the
1509 computed value of Base_Type.
1511 2011-08-02 Yannick Moy <moy@adacore.com>
1513 * restrict.adb (Check_Restriction): issue an error for any use of
1514 class-wide, even if the No_Dispatch restriction is not set.
1515 * sem_aggr.adb: Correct typos in comments and messages in formal mode
1516 * sem_ch3.adb (Process_Full_View): issue an error in formal mode is,
1517 when completing a private extension, the type named in the private part
1518 is not the same as that named in the visible part.
1519 * sem_res.adb (Resolve_Call): issue an error in formal mode on the use
1520 of an inherited primitive operations of a tagged type or type extension
1521 that returns the tagged type.
1522 * sem_util.adb, sem_util.ads (Is_Inherited_Operation_For_Type): new
1523 function which returns True for an implicit operation inherited by the
1524 derived type declaration for the argument type.
1525 (Is_SPARK_Object_Reference): move to appropriate place in alphabetic
1528 2011-08-02 Ed Schonberg <schonberg@adacore.com>
1530 * sem_ch5.adb (Pre_Analyze_Range): new procedure extracted from
1531 Process_Bounds, to perform analysis with expansion of a range or an
1532 expression that is the iteration scheme for a loop.
1533 (Analyze_Iterator_Specification): If domain of iteration is given by a
1534 function call with a controlled result, as is the case if call returns
1535 a predefined container, ensure that finalization actions are properly
1537 * par-ch3.adb: accept Ada2012 iterator form in P_Discrete_Range.
1539 2011-08-02 Javier Miranda <miranda@adacore.com>
1541 * sem_ch5.adb (Analyze_Iteration_Scheme): Fix typo.
1542 * gcc-interface/Make-lang.in: Update dependencies.
1544 2011-08-02 Javier Miranda <miranda@adacore.com>
1546 * sem_util.ads, sem_util.adb (Is_Variable): Add a new formal to
1547 determine if the analysis is performed using N or Original_Node (N).
1548 * exp_util.adb (Side_Effect_Free): Code cleanup since the new
1549 functionality of routine Is_Variable avoids code duplication.
1550 * checks.adb (Determine_Range): Handle temporaries generated by
1551 Remove_Side_Effects.
1553 2011-08-02 Javier Miranda <miranda@adacore.com>
1555 * exp_ch4.adb (Expand_N_Quantified_Expression): Force reanalysis and
1556 expansion of the condition. Required since the previous analysis was
1557 done with expansion disabled (see Resolve_Quantified_Expression) and
1558 hence checks were not inserted and record comparisons have not been
1561 2011-08-02 Ed Falis <falis@adacore.com>
1563 * s-taprop-vxworks.adb, s-intman-vxworks.adb, s-intman-vxworks.ads:
1566 2011-08-02 Bob Duff <duff@adacore.com>
1568 * opt.ads: Minor comment fix.
1570 2011-08-02 Bob Duff <duff@adacore.com>
1572 * sem_ch12.adb (Analyze_Package_Instantiation,
1573 Analyze_Subprogram_Instantiation): Turn off style checking while
1574 analyzing an instance. Whatever style checks that apply to the generic
1575 unit should apply, so it makes no sense to apply them in an instance.
1576 This was causing trouble when compiling an instance of a runtime
1577 unit that violates the -gnatyO switch.
1578 * stylesw.adb (Set_Style_Check_Options): "when 'O' =>" was missing from
1579 one of the two case statements, causing spurious errors.
1581 2011-08-02 Robert Dewar <dewar@adacore.com>
1583 * uname.adb: Minor reformatting.
1584 * gnatcmd.adb: Minor reformatting.
1585 * exp_attr.adb: Minor reformatting.
1587 2011-08-02 Ed Schonberg <schonberg@adacore.com>
1589 * exp_ch5.adb (Expand_N_Assignment_Statement): under restriction
1590 No_Dispatching_Calls, do not look for the Assign primitive, because
1591 predefined primitives are not created in this case.
1593 2011-08-02 Bob Duff <duff@adacore.com>
1595 * stylesw.ads: Minor comment fixes.
1597 2011-08-02 Robert Dewar <dewar@adacore.com>
1599 * freeze.adb (Add_To_Result): New procedure.
1601 2011-08-02 Jose Ruiz <ruiz@adacore.com>
1603 * exp_attr.adb (Find_Stream_Subprogram): When using a configurable run
1604 time, if the specific run-time routines for handling streams of strings
1605 are not available, use the default mechanism.
1607 2011-08-02 Arnaud Charlet <charlet@adacore.com>
1609 * s-regpat.ads: Fix typo.
1611 2011-08-02 Vincent Celier <celier@adacore.com>
1613 * prj-conf.adb (Get_Or_Create_Configuration_File): If On_Load_Config is
1614 not null, call it to create the in memory config project file without
1615 parsing an existing default config project file.
1617 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
1619 * atree.adb (Allocate_Initialize_Node): Remove useless temporaries.
1621 2011-08-02 Ed Schonberg <schonberg@adacore.com>
1623 * sem_elim.adb: an abstract subprogram does not need an eliminate
1624 pragma for its descendant to be eliminable.
1626 2011-08-02 Ed Falis <falis@adacore.com>
1628 * init.c: revert to handling before previous checkin for VxWorks
1629 * s-intman-vxworks.adb: delete unnecessary declarations related to
1630 using Ada interrupt facilities for handling signals.
1631 Delete Initialize_Interrupts. Use __gnat_install_handler instead.
1632 * s-intman-vxworks.ads: Import __gnat_install_handler as
1633 Initialize_Interrupts.
1634 * s-taprop-vxworks.adb: Delete Signal_Mask.
1635 (Abort_Handler): change construction of mask to unblock exception
1638 2011-08-02 Jerome Guitton <guitton@adacore.com>
1640 * a-except-2005.adb (Raise_From_Signal_Handler): Call
1641 Debug_Raise_Exception before propagation starts.
1643 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
1645 * exp_ch6.adb (Expand_Call): Guard restriction checks with a call
1646 to Restriction_Check_Required.
1647 * sem_ch3.adb (Analyze_Object_Declaration): Likewise.
1648 * sem_res.adb (Resolve_Call): Likewise.
1649 * sem_attr.adb (Check_Stream_Attribute): Likewise.
1651 2011-08-02 Bob Duff <duff@adacore.com>
1653 * stylesw.ads: Update comment.
1654 * style.adb: Minor: Use Error_Msg_NE instead of Error_Msg_N.
1655 * errout.ads: Remove obsolete comment.
1657 2011-08-02 Javier Miranda <miranda@adacore.com>
1659 * einfo.ads, einfo.adb (Is_Safe_To_Reevaluate): new function.
1660 (Set_Is_Safe_To_Reevaluate): new procedure.
1661 * sem_ch5.adb (Analyze_Assignment): Add one assertion to ensure that no
1662 assignment is allowed on safe-to-reevaluate variables.
1663 (Analyze_Iteration_Schine.Process_Bounds.One_Bound): Decorate the
1664 temporary created to remove side effects in expressions that use
1665 the secondary stack as safe-to-reevaluate.
1666 * exp_util.adb (Side_Effect_Free): Add missing code to handle well
1667 variables that are not true constants.
1669 2011-08-02 Robert Dewar <dewar@adacore.com>
1671 * sem_ch5.adb, sem_ch7.adb, einfo.ads, sem_util.adb, sem_util.ads,
1672 sem_res.adb, sem_ch6.adb: Minor reformatting.
1674 2011-08-02 Jerome Guitton <guitton@adacore.com>
1676 * a-except-2005.adb (Raise_Current_Excep): Remove obsolete dead code.
1678 2011-08-02 Ed Schonberg <schonberg@adacore.com>
1680 * sem_ch6.adb (New_Overloaded_Entity, Check_Overriding_Indicator): Do
1681 not set Overridden_Operation if subprogram is an initialization
1684 2011-08-02 Yannick Moy <moy@adacore.com>
1686 * par-ch6.adb: Correct obsolete name in comments
1687 * restrict.adb, restrict.ads (Check_Formal_Restriction): new function
1688 which takes two message arguments (existing function takes one), with
1689 second message used for continuation.
1690 * sem_ch5.adb (Analyze_Block_Statement): in formal mode, only reject
1691 block statements that originate from a source block statement, not
1692 generated block statements
1693 * sem_ch6.adb (Analyze_Function_Call): rename L into Actuals, for
1694 symmetry with procedure case
1695 * sem_ch7.adb (Check_One_Tagged_Type_Or_Extension_At_Most): new
1696 function to issue an error in formal mode if a package specification
1697 contains more than one tagged type or type extension.
1698 * sem_res.adb (Resolve_Actuals): in formal mode, check that actual
1699 parameters matching formals of tagged types are objects (or ancestor
1700 type conversions of objects), not general expressions. Issue an error
1701 on view conversions that are not involving ancestor conversion of an
1703 (Resolve_Type_Conversion): in formal mode, issue an error on the
1704 operand of an ancestor type conversion which is not an object
1705 * sem_util.adb, sem_util.ads (Find_Actual): extend the behavior of the
1706 procedure so that it works also for actuals of function calls
1707 (Is_Actual_Tagged_Parameter): new function which determines if its
1708 argument is an actual parameter of a formal of tagged type in a
1710 (Is_SPARK_Object_Reference): new function which determines if the tree
1711 referenced by its argument represents an object in SPARK
1713 2011-08-02 Robert Dewar <dewar@adacore.com>
1715 * sem_ch3.adb: Minor reformatting
1716 Minor comment addition
1717 Minor error msg text change
1719 2011-08-02 Javier Miranda <miranda@adacore.com>
1721 * sem_ch5.adb (Analyze_Iteration_Scheme.Uses_Secondary_Stack): New
1722 function. Used to be more precise when we generate a variable plus one
1723 assignment to remove side effects in the evaluation of the Bound
1725 (Analyze_Iteration_Scheme): Clean attribute analyzed in all the nodes
1726 of the bound expression to force its re-analysis and thus expand the
1727 associated transient scope (if required). Code cleanup replacing the
1728 previous code that declared the constant entity by an invocation to
1729 routine Force_Evaluation which centralizes this work in the frontend.
1731 2011-08-02 Robert Dewar <dewar@adacore.com>
1733 * einfo.adb (Is_Base_Type): Improve efficiency by using a flag table
1734 (Base_Type): Now uses improved Is_Base_Type function
1735 * einfo.ads (Base_Type): Inline this function
1737 2011-08-02 Robert Dewar <dewar@adacore.com>
1739 * sem_prag.adb (Analyze_Pragma): Defend against infinite recursion
1740 (Analyze_Aspect_Specifications): Fix Sloc values for constructed pragmas
1742 2011-08-02 Arnaud Charlet <charlet@adacore.com>
1744 * gcc-interface/Make-lang.in: Update dependencies.
1745 * gcc-interface/Makefile.in: Use s-inmapop-vxworks.adb for all VxWorks
1748 2011-08-02 Yannick Moy <moy@adacore.com>
1750 * par-ch3.adb (P_Delta_Constraint): issue an error in formal mode on
1751 non-simple expression used in delta constraint
1752 (P_Index_Or_Discriminant_Constraint): issue an error in formal mode on
1753 index constraint which is not a subtype mark
1754 * par.adb: With and use Restrict
1755 * sem_ch3.adb (Analyze_Component_Declaration): issue an error in formal
1756 mode on component type which is not a subtype mark and default
1757 expression on component
1758 (Analyze_Subtype_Declaration): issue an error in formal mode on subtype
1759 of string which does not have a lower index bound equal to 1
1760 (Array_Type_Declaration): issue an error in formal mode on index or
1761 component type which is not a subtype mark, and on aliased keyword on
1763 (Derived_Type_Declaration): issue an error in formal mode on interface,
1764 limited or abstract type
1765 (Record_Type_Declaration): issue an error in formal mode on interface
1766 (Record_Type_Definition): issue an error in formal mode on tagged types
1767 and type extensions not declared in the specification of a library unit
1768 package; on null non-tagged record; on variant part
1770 2011-08-02 Vincent Celier <celier@adacore.com>
1772 * prj-nmsc.adb (Check_Library_Attributes): Do not report Library_Dir
1773 not declared for qualified library project when Library_Name is not
1774 declared, but Library_Dir is.
1776 2011-08-02 Robert Dewar <dewar@adacore.com>
1778 * sem_ch13.adb (Analyze_Aspect_Specification): Fix slocs on generated
1779 pragmas (affects aspects [Component_]Default_Value
1780 (Check_Aspect_At_Freeze_Point): For Component_Default_Value, use
1781 component type for the resolution
1783 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
1785 * einfo.adb (Base_Type): Tune implementation for speed.
1787 2011-08-02 Robert Dewar <dewar@adacore.com>
1789 * freeze.adb: Minor reformatting.
1791 2011-08-02 Thomas Quinot <quinot@adacore.com>
1793 * scos.ads: Update comments.
1795 2011-08-02 Ed Schonberg <schonberg@adacore.com>
1797 * sem_ch3.adb (Build_Derived_Type): Inherit the convention from the
1798 base type, because the parent may be a subtype of a private type whose
1799 convention is established in a private part.
1801 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
1803 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Wrap the return
1804 statement in a block when the expansion of the return expression has
1805 created a finalization chain.
1806 * freeze.adb (Freeze_Expression): Alphabetize all choices associated
1807 with the parent node.
1808 Add N_Extended_Return_Statement to handle the case where a transient
1809 object declaration appears in the Return_Object_Declarations list of
1810 an extended return statement.
1812 2011-08-02 Matthew Gingell <gingell@adacore.com>
1814 * adaint.c (__gnat_is_symbolic_link_attr): Supress warning on possibly
1815 unused parameter 'name'.
1817 2011-08-02 Ed Schonberg <schonberg@adacore.com>
1819 * sem_elim.adb (Set_Eliminated): If the overridden operation is an
1820 inherited operation, check whether its alias, which is the source
1821 operastion that it renames, has been marked eliminated.
1823 2011-08-02 Javier Miranda <miranda@adacore.com>
1825 * exp_util.adb (Safe_Prefixed_Reference): Do not consider safe an
1826 in-mode parameter whose type is an access type since it can be used to
1827 modify its designated object. Enforce code that handles as safe an
1828 access type that is not access-to-constant but it is the result of a
1829 previous removal of side-effects.
1830 (Remove_Side_Effects): Minor code reorganization of cases which require
1831 no action. Done to incorporate documentation on new cases uncovered
1832 working in this ticket: no action needed if this routine was invoked
1833 too early and the nodes are not yet decorated.
1834 * sem_res.adb (Resolve_Slice): Minor code cleanup replacling two calls
1835 to routine Remove_Side_Effects by calls to Force_Evaluation since they
1836 were issued with actuals that are implicitly provided by
1839 2011-08-02 Robert Dewar <dewar@adacore.com>
1841 * sem_ch3.adb, sem_res.adb: Minor reformatting.
1843 2011-08-02 Yannick Moy <moy@adacore.com>
1845 * sem_attr.adb (Check_Formal_Restriction_On_Attribute): new procedure
1846 to issue an error in formal mode on attribute not supported in this mode
1847 (Analyze_Attribute): issue errors on standard attributes not supported
1849 * sem_ch3.adb (Modular_Type_Declaration): remove obsolete part of
1850 comment, and issue error in formal mode on modulus which is not a power
1852 (Process_Range_Expr_In_Decl): issue error in formal mode on non-static
1854 * sem_ch8.adb (Find_Type): issue error in formal mode on 'Base in
1856 * sem_res.adb (Resolve_Unary_Op): issue error in formal mode on unary
1857 operator on modular type (except 'not').
1859 2011-08-02 Robert Dewar <dewar@adacore.com>
1861 * gnat_rm.texi: Minor reformatting.
1863 2011-08-02 Arnaud Charlet <charlet@adacore.com>
1865 * s-osinte-linux.ads: Minor comment update and reformatting.
1866 * i-cexten.ads: Make this unit pure, as for its parent.
1867 Will allow its usage in more contexts if needed.
1869 2011-08-02 Robert Dewar <dewar@adacore.com>
1871 * s-utf_32.ads: Minor comment fix.
1873 2011-08-02 Ed Schonberg <schonberg@adacore.com>
1875 * sem_res.adb (Resolve_Actuals): if the subprogram is a primitive
1876 operation of a tagged synchronized type, handle the case where the
1877 controlling argument is overloaded.
1879 2011-08-02 Yannick Moy <moy@adacore.com>
1881 * gnat_rm.texi, opt.ads, sem_prag.adb, snames.ads-tmpl:
1882 Replace pragma SPARK_95 with pragma Restrictions (SPARK)
1883 * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): set
1884 SPARK mode and formal verification mode on processing SPARK restriction
1885 * s-rident.ads (Restriction_Id): add SPARK restriction in those not
1886 requiring consistency checking.
1888 2011-08-02 Robert Dewar <dewar@adacore.com>
1890 * sem_res.adb: Minor reformatting.
1892 2011-08-02 Robert Dewar <dewar@adacore.com>
1894 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
1895 a-cforse.ads: Remove unneeded with of Ada.Containers
1896 Remove commented out pragma Inline's
1897 Move specifications of new subprograms to the actual specs
1899 2011-08-02 Yannick Moy <moy@adacore.com>
1901 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
1902 a-cforse.ads: Update comments.
1904 2011-08-02 Ed Schonberg <schonberg@adacore.com>
1906 * sem_attr.adb: add attribute name when 'Result has the wrong prefix.
1908 2011-08-02 Robert Dewar <dewar@adacore.com>
1910 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
1911 a-cforse.ads, a-cofove.ads: Minor reformatting.
1913 2011-08-02 Claire Dross <dross@adacore.com>
1915 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads, a-cforse.ads,
1916 a-cofove.ads: Add comments.
1918 2011-08-02 Yannick Moy <moy@adacore.com>
1920 * gnat_rm.texi: Document formal containers.
1922 2011-08-02 Emmanuel Briot <briot@adacore.com>
1924 * g-comlin.adb (Goto_Section, Getopt): fix handling of "*" when there
1927 2011-08-02 Robert Dewar <dewar@adacore.com>
1929 * mlib-prj.adb, restrict.ads, sem_aggr.adb, sem_ch12.adb: Minor
1932 2011-08-02 Robert Dewar <dewar@adacore.com>
1934 * aspects.adb: New aspects Default_Value and Default_Component_Value
1935 New format of Aspect_Names table checks for omitted entries
1936 * aspects.ads: Remove mention of Aspect_Cancel and add documentation on
1937 handling of boolean aspects for derived types.
1938 New aspects Default_Value and Default_Component_Value
1939 New format of Aspect_Names table checks for omitted entries
1940 * einfo.ads, einfo.adb (Has_Default_Component_Value): New flag
1941 (Has_Default_Value): New flag
1942 (Has_Default_Component_Value): New flag
1943 (Has_Default_Value): New flag
1944 * par-ch13.adb (P_Aspect_Specifications): New format of Aspect_Names
1946 * par-prag.adb: New pragmas Default_Value and Default_Component_Value
1947 * sem_ch13.adb (Analyze_Aspect_Specifications): New aspects
1948 Default_Value and Default_Component_Value
1949 * sem_prag.adb: New pragmas Default_Value and Default_Component_Value
1950 New aspects Default_Value and Default_Component_Value
1951 * snames.ads-tmpl: New pragmas Default_Value and Default_Component_Value
1952 * sprint.adb: Print N_Aspect_Specification node when called from gdb
1954 2011-08-02 Vincent Celier <celier@adacore.com>
1956 * prj-nmsc.adb (Check_Library_Attributes): For virtual library project,
1957 inherit library kind.
1959 2011-08-02 Ed Schonberg <schonberg@adacore.com>
1961 * sem_res.adb: Add guards in calls to Matching_Static_Array_Bounds.
1964 2011-08-02 Robert Dewar <dewar@adacore.com>
1966 * i-cstrin.ads: Updates to make Interfaces.C.Strings match RM
1968 2011-08-02 Yannick Moy <moy@adacore.com>
1970 * sem_aggr.adb (Resolve_Aggregate): Fix thinko.
1972 2011-08-02 Robert Dewar <dewar@adacore.com>
1974 * impunit.adb: Add comment.
1976 2011-08-02 Yannick Moy <moy@adacore.com>
1978 * sem_aggr.adb (Check_Qualified_Aggregate): new procedure which checks
1979 qualification of aggregates in formal mode
1980 (Is_Top_Level_Aggregate): returns True for an aggregate not contained in
1982 (Resolve_Aggregate): complete the test that an aggregate is adequately
1983 qualified in formal mode
1985 2011-08-02 Pascal Obry <obry@adacore.com>
1987 * make.adb, bindgen.adb, gnatbind.adb: Minor reformatting.
1988 * mlib-prj.adb: Supress warning when compiling binder generated file.
1989 (Build_Library): Supress all warnings when compiling the binder
1992 2011-08-02 Yannick Moy <moy@adacore.com>
1994 * errout.adb, errout.ads (Check_Formal_Restriction): move procedure
1996 * restrict.adb, restrict.ads (Check_Formal_Restriction): ...to here
1997 * sem_aggr.adb, sem_ch5.adb, sem_util.adb:
1998 Add with/use clauses to make Check_Formal_Restriction visible
2000 2011-08-02 Ed Schonberg <schonberg@adacore.com>
2002 * sem_ch12.adb (Check_Generic_Actuals): handle properly actual
2003 in-parameters when type of the generic formal is private in the generic
2004 spec and non-private in the body.
2006 2011-08-02 Claire Dross <dross@adacore.com>
2008 * a-cfdlli.adb, a-cfdlli.ads, a-cfhase.adb, a-cfhase.ads, a-cfhama.adb,
2009 a-cfhama.ads, a-cforse.adb, a-cforse.ads, a-cforma.adb, a-cforma.ads,
2010 a-cofove.adb, a-cofove.ads: New files implementing formal containers.
2011 * impunit.adb, Makefile.rtl: Take new files into account.
2013 2011-08-02 Robert Dewar <dewar@adacore.com>
2015 * sem_aggr.adb, sem_ch3.adb, sem_ch5.adb, make.adb, sem_res.adb,
2016 sem_attr.adb, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
2018 2011-08-02 Yannick Moy <moy@adacore.com>
2020 * sem_aggr.adb (Resolve_Aggregate): disable incorrectly placed check in
2022 * sem_util.adb (Matching_Static_Array_Bounds): proper detection of
2023 matching static array bounds, taking into account the special case of
2025 * sem_ch3.adb: Typo in comment.
2027 2011-08-02 Yannick Moy <moy@adacore.com>
2029 * errout.adb, errout.ads (Check_Formal_Restriction): new procedure
2030 which issues an error in formal mode if its argument node is originally
2032 * sem_ch3.adb (Analyze_Full_Type_Declaration): move test that a type
2033 has a discriminant specification so that it does not include the case
2035 (Derived_Type_Declaration): move here the test that a derived type has a
2036 discriminant specification
2037 * sem_aggr.adb (Resolve_Record_Aggregate): test the presence of the
2038 first element of a component association before accessing its choices
2039 (presence of component association is not enough)
2040 * exp_ch6.adb (Expand_N_Subprogram_Declaration): test if a subprogram
2041 declaration is a library item before accessing the next element in a
2042 list, as library items are not member of lists
2043 * sem_attr.adb, sem_ch11.adb, sem_ch4.adb, sem_ch5.adb, sem_ch6.adb,
2044 sem_ch8.adb, sem_ch9.adb, sem_res.adb, sem_util.adb: use
2045 Check_Formal_Restriction whenever possible.
2047 2011-08-02 Ed Schonberg <schonberg@adacore.com>
2049 * sem_ch3.adb (Find_Type_Of_Object): In ASIS mode, create an itype
2050 reference when needed.
2052 2011-08-02 Bob Duff <duff@adacore.com>
2054 * gnat_ugn.texi: Fix typo.
2056 2011-08-02 Vincent Celier <celier@adacore.com>
2058 * make.adb (Gnatmake): Use MLib.Tgt.Archive_Ext as the extension of
2059 archive file name. Do not use the full path name of archives for Open
2062 2011-08-02 Robert Dewar <dewar@adacore.com>
2064 * sem_ch12.adb, sem_ch11.adb: New calling sequence for
2065 Analyze_Aspect_Specifications
2067 (Analyze_Aspect_Specifications): New handling for boolean aspects
2068 * sem_ch13.ads (Analyze_Aspect_Specifications): New calling sequence
2069 * sem_ch3.adb, sem_ch6.adb, sem_ch7.adb, sem_ch9.adb: New calling
2070 sequence for Analyze_Aspect_Specifications
2071 * sem_prag.adb (Analyze_Pragma): Remove use of Aspect_Cancel entirely
2072 * sinfo.ads, sinfo.adb (Aspect_Cancel): Remove, no longer used
2074 2011-08-02 Robert Dewar <dewar@adacore.com>
2076 * freeze.adb (Freeze_Entity): Remove handling of delayed boolean
2077 aspects, since these no longer exist.
2079 2011-08-02 Robert Dewar <dewar@adacore.com>
2081 * par-ch13.adb (Aspect_Specifications_Present): Always return false on
2082 semicolon, do not try to see if there are aspects following it.
2083 * par-ch3.adb (P_Declarative_Items): Better message for unexpected
2086 2011-08-02 Robert Dewar <dewar@adacore.com>
2088 * sem_ch8.adb, aspects.ads: Minor reformatting.
2090 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
2092 * sem_ch13.ads (Analyze_Aspect_Specification): Add pragma Inline.
2093 * sem_ch13.adb (Analyze_Non_Null_Aspect_Specifications): New procedure
2095 (Analyze_Aspect_Specifications): ...here. Call above procedure.
2097 2011-08-02 Yannick Moy <moy@adacore.com>
2099 * exp_ch6.adb (Expand_N_Subprogram_Declaration): issue error in formal
2100 mode on subprogram declaration outside of package specification, unless
2101 it is followed by a pragma Import
2102 * sem_ch3.adb (Access_Definition, Access_Subprogram_Declaration,
2103 Access_Type_Declaration): issue error in formal mode on access type
2104 (Analyze_Incomplete_Type_Decl): issue error in formal mode on
2106 (Analyze_Object_Declaration): issue error in formal mode on object
2107 declaration which does not respect SPARK restrictions
2108 (Analyze_Subtype_Declaration): issue error in formal mode on subtype
2109 declaration which does not respect SPARK restrictions
2110 (Constrain_Decimal, Constrain_Float, Constrain_Ordinary_Fixed): issue
2111 error in formal mode on digits or delta constraint
2112 (Decimal_Fixed_Point_Type_Declaration): issue error in formal mode on
2113 decimal fixed point type
2114 (Derived_Type_Declaration): issue error in formal mode on derived type
2115 other than type extensions of tagged record types
2116 * sem_ch6.adb (Process_Formals): remove check in formal mode, redundant
2117 with check on access definition
2118 * sem_ch9.adb (Analyze_Protected_Definition): issue error in formal
2119 mode on protected definition.
2120 (Analyze_Task_Definition): issue error in formal mode on task definition
2122 2011-08-02 Robert Dewar <dewar@adacore.com>
2124 * make.adb, sem_ch8.adb, s-inmaop-vxworks.adb: Minor reformatting.
2126 2011-08-02 Javier Miranda <miranda@adacore.com>
2128 * sem_ch6.adb (Can_Override_Operator): New function.
2129 (Verify_Overriding_Indicator): Add missing code to check overriding
2130 indicator in operators. Fixes regression.
2131 (Check_Overriding_Indicator): Minor reformating after replacing the
2132 code that evaluates if the subprogram can override an operator by
2133 invocations to the above new function.
2135 (Write_Field26_Name): Add missing code to ensure that, following
2136 the documentation in einfo.ads, this field is not shown as attribute
2137 "Static_Initialization" on non-dispatching functions.
2139 2011-08-02 Jose Ruiz <ruiz@adacore.com>
2141 * sem_res.adb (Resolve_Call): A call to
2142 Ada.Real_Time.Timing_Events.Set_Handler violates restriction
2143 No_Relative_Delay (AI-0211) only when it sets a relative timing event,
2144 i.e., when the second parameter is of type Time_Span.
2146 2011-08-02 Vincent Celier <celier@adacore.com>
2148 * make.adb (Gnatmake): use <library dir>/lib<library name>.a to link
2149 with an archive instead of -L<library dir> -l<library name>.
2151 2011-08-02 Ed Schonberg <schonberg@adacore.com>
2153 * sem_ch8.adb (Analyze_Use_Type): If the clause is being re-analyzed,
2154 mark the base types In_Use in addition to making the operations
2157 2011-08-02 Ed Falis <falis@adacore.com>
2159 * init.c: add and setup __gnat_signal_mask for the exception signals
2160 * s-inmaop-vxworks.adb: new file.
2161 * s-intman-vxworks.adb: remove unnecessary initializations and
2163 * s-intman-vxworks.ads: remove unnecessary variable
2164 * s-taprop-vxworks.adb: simplify signal initialization
2166 2011-08-02 Robert Dewar <dewar@adacore.com>
2168 * sem_ch8.adb: Minor code reorganization, comment updates.
2170 2011-08-02 Robert Dewar <dewar@adacore.com>
2172 * sem_res.adb (Matching_Static_Array_Bounds): Moved to Sem_Util
2173 * sem_util.ads, sem_util.adb (Matching_Static_Array_Bounds): Moved
2175 (Matching_Static_Array_Bounds): Use Is_Ok_Static_Expression
2176 (Matching_Static_Array_Bounds): Moved here from Sem_Res
2178 2011-08-02 Ed Schonberg <schonberg@adacore.com>
2180 * atree.h, atree.ads, atree.adb: New subprograms to manipulate Elist5.
2181 * par_ch8.adb (P_Use_Type): initialize Used_Operations for node.
2182 * sinfo.ads, sinfo.adb (Used_Operations): new attribute of
2183 use_type_clauses, to handle more efficiently use_type and use_all_type
2185 * sem_ch8.adb: Rewrite Use_One_Type and End_Use_Type to handle the
2186 Ada2012 Use_All_Type clause.
2187 (Use_Class_Wide_Operations): new procedure.
2189 2011-08-02 Robert Dewar <dewar@adacore.com>
2191 * exp_util.adb, par-ch10.adb, par-ch6.adb, sem.adb, sem_ch6.adb,
2192 sem_ch6.ads, sinfo.adb, sinfo.ads, sprint.adb: Change parameterized
2193 expression to expression function.
2195 2011-08-02 Ed Schonberg <schonberg@adacore.com>
2197 * sem_ch4.adb: transform simple Ada2012 membership into equality only
2198 if types are compatible.
2200 2011-08-02 Yannick Moy <moy@adacore.com>
2202 * sem_res.adb (Matching_Static_Array_Bounds): new function which
2203 returns True if its argument array types have same dimension and same
2204 static bounds at each index.
2205 (Resolve_Actuals): issue an error in formal mode on actuals passed as
2206 OUT or IN OUT paramaters which are not view conversions in SPARK.
2207 (Resolve_Arithmetic_Op): issue an error in formal mode on
2208 multiplication or division with operands of fixed point types which are
2209 not qualified or explicitly converted.
2210 (Resolve_Comparison_Op): issue an error in formal mode on comparisons of
2211 Boolean or array type (except String) operands.
2212 (Resolve_Equality_Op): issue an error in formal mode on equality
2213 operators for array types other than String with non-matching static
2215 (Resolve_Logical_Op): issue an error in formal mode on logical operators
2216 for array types with non-matching static bounds. Factorize the code in
2217 Matching_Static_Array_Bounds.
2218 (Resolve_Qualified_Expression): issue an error in formal mode on
2219 qualified expressions for array types with non-matching static bounds.
2220 (Resolve_Type_Conversion): issue an error in formal mode on type
2221 conversion for array types with non-matching static bounds
2223 2011-08-02 Robert Dewar <dewar@adacore.com>
2225 * par-ch10.adb: Minor code reorganization (use Nkind_In).
2227 2011-08-02 Ed Schonberg <schonberg@adacore.com>
2229 * par-ch9.adb: save location of entry for proper error message.
2231 2011-08-02 Javier Miranda <miranda@adacore.com>
2233 * sem_type.ads, sem_type.adb (Is_Ancestor): Addition of a new formal
2234 (Use_Full_View) which permits this routine to climb through the
2235 ancestors using the full-view of private parents.
2236 * sem_util.adb (Collect_Interfaces_Info, Implements_Interface): Set
2237 Use_Full_View to true in calls to Is_Ancestor.
2238 * sem_disp.adb (Override_Dispatching_Operation): Set Use_Full_View to
2239 true in call to Is_Ancestor.
2240 * exp_ch3.adb (Build_Offset_To_Top_Functions, Initialize_Tag): Set
2241 Use_Full_View to true in call to Is_Ancestor.
2242 * exp_ch7.adb (Controller_Component): Set Use_Full_View to true in
2243 call to Is_Ancestor.
2244 * exp_ch4.adb (Expand_N_Type_Conversion, Tagged_Membership): Set
2245 Use_Full_View to true in calls to Is_Ancestor.
2246 * exp_disp.adb (Expand_Interface_Actuals, Make_Secondary_DT, Make_DT,
2247 Make_Select_Specific_Data_Table, Register_Primitive,
2248 Set_All_DT_Position): Set Use_Full_View to true in calls to Is_Ancestor.
2249 * exp_intr.adb (Expand_Dispatching_Constructor_Call): Set Use_Full_View
2250 to true in call to Is_Ancestor.
2251 * exp_util.adb (Find_Interface_ADT, Find_Interface_Tag): Set
2252 Use_Full_View to true in calls to Is_Ancestor.
2254 (Write_Call_Info): Set Use_Full_View to true in call to Is_Ancestor.
2255 (Write_Type_Info): Set Use_Full_View to true in call to Is_Ancestor.
2257 2011-08-02 Robert Dewar <dewar@adacore.com>
2259 * gnat_rm.texi: Minor reformatting.
2260 * sem_prag.adb: Minor reformatting.
2262 2011-08-02 Tristan Gingold <gingold@adacore.com>
2264 * vms_data.ads: Add VMS qualifier for -gnateP.
2266 2011-08-02 Robert Dewar <dewar@adacore.com>
2268 * par-ch13.adb (P_Aspect_Specification): New meaning of Decl = Empty
2269 * par-ch7.adb (P_Package): Proper placement of aspects for package
2271 * par-endh.adb (Check_End): Ad Is_Sloc parameter
2272 (End_Statements): Add Is_Sloc parameterr
2273 * par.adb (P_Aspect_Specification): New meaning of Decl = Empty
2274 (Check_End): Ad Is_Sloc parameter
2275 (End_Statements): Add Is_Sloc parameterr
2277 2011-08-02 Vincent Celier <celier@adacore.com>
2279 * ug_words: Add VMS qualifier equivalent to -gnateP:
2280 /SYMBOL_PREPROCESSING.
2282 2011-08-02 Jose Ruiz <ruiz@adacore.com>
2284 * gnat-style.texi: For hexadecimal numeric literals the typical
2285 grouping of digits is 4 to represent 2 bytes.
2286 A procedure spec which is split into several lines is indented two
2289 2011-08-02 Yannick Moy <moy@adacore.com>
2291 * exp_aggr.adb (Is_Others_Aggregate): move function to other unit.
2292 * sem_aggr.adb, sem_aggr.ads (Is_Others_Aggregate): move function here
2293 (Resolve_Aggregate): issue errors in formal modes when aggregate is not
2295 (Resolve_Array_Aggregate): issue errors in formal modes on non-static
2296 choice in array aggregate
2297 (Resolve_Extension_Aggregate): issue errors in formal modes on subtype
2299 (Resolve_Record_Aggregate): issue errors in formal modes on mixed
2300 positional and named aggregate for record, or others in record
2301 aggregate, or multiple choice in record aggregate
2302 * sem_res.adb (Resolve_Logical_Op): issue errors in formal mode when
2303 array operands to logical operations AND, OR and XOR do not have the
2304 same static lower and higher bounds
2305 * sem_ch5.adb, sinfo.ads: Correct typos in comments
2307 2011-08-01 Robert Dewar <dewar@adacore.com>
2309 * sem_util.ads, sem_util.adb, sem_ch6.adb (Last_Source_Statement):
2310 Replaces Last_Source_Node_In_Sequence.
2311 * err_vars.ads (Error_Msg_Lang): 16 is OK, don't need 4K
2312 * errout.adb (Set_Error_Msg_Lang): Takes arg with no parens, but stores
2313 parens and blank in string (this was inconsistently implemented).
2315 (Set_Error_Msg_Lang): Takes arg with no parens, but stores parens and
2316 blank in string (this was inconsistently implemented).
2318 (Set_Global_Switches): Set formal mode switches appropriately
2319 * opt.ads, opt.adb: Formal mode is now global switches, more consistent
2321 (Analyze_Pragma, case SPARK_95): Set opt switches appropriately and
2322 call Set_Error_Msg_Lang to set "spark" as language name.
2323 * par.adb: Remove unnecessary call to set formal language for errout
2324 * sem_prag.adb (P_Pragma, case SPARK_95): Set opt switches
2325 appropriately and call Set_Error_Msg_Lang to set "spark" as language
2327 * sem_ch4.adb (Analyze_Concatenation_Operand): remove procedure and
2328 calls to it, moved after resolution so that types are known
2329 * sem_res.adb (Resolve_Op_Concat): issue an error in formal mode if
2330 result of concatenation is not of type String
2331 (Resolve_Op_Concat_Arg): issue an error in formal mode if an operand of
2332 concatenation is not properly restricted
2333 * gnat_rm.texi: Add doc on pragma Spark_95.
2334 * gcc-interface/Makefile.in: Remove obsolete target pairs for
2335 Interfaces.C.* on VMS. Remove s-parame-vms-restrict.ads.
2336 * gcc-interface/Make-lang.in: Update dependencies.
2338 2011-08-01 Javier Miranda <miranda@adacore.com>
2340 * sem_disp.adb (Override_Dispatching_Operation): Enforce strictness of
2341 condition that detects if the overridden operation must replace an
2344 2011-08-01 Javier Miranda <miranda@adacore.com>
2346 * exp_ch4.adb (Expand_N_Case_Expression): Propagate to the expanded
2347 code declarations inserted by Insert_Actions in each alternative of the
2348 N_Case_Expression node.
2350 2011-08-01 Robert Dewar <dewar@adacore.com>
2352 * sem_ch6.adb: Minor code reorganization.
2353 * sem_util.adb: Minor reformatting.
2355 2011-08-01 Pascal Obry <obry@adacore.com>
2357 * prj-env.adb: Remove <prefix>/lib/gpr/<target> project search path.
2358 * gnat_ugn.texi: Add documentation for VERSIONINFO Windows resource.
2360 2011-08-01 Yannick Moy <moy@adacore.com>
2362 * par-ch4.adb (P_Name): issue a syntax error in SPARK mode on character
2363 literal or operator symbol which is prefixed
2364 * sem_attr.adb (Analyze_Access_Attribute): issue an error in formal
2365 mode on access attributes.
2366 * sem_ch4.adb (Analyze_Concatenation_Operand): new procedure to check
2367 that concatenation operands are properly restricted in formal mode
2368 (Analyze_Concatenation, Analyze_Concatenation_Rest): call new procedure
2369 Analyze_Concatenation_Operand. Issue an error in formal mode if the
2370 result of the concatenation has a type different from String.
2371 (Analyze_Conditional_Expression, Analyze_Explicit_Dereference,
2372 Analyze_Quantified_Expression, Analyze_Slice,
2373 Analyze_Null): issue an error in formal mode on unsupported constructs
2375 (Analyze_Block_Statement): only issue error on source block statement
2376 * sem_util.ads, sem_util.adb (Last_Source_Node_In_Sequence): new
2377 function which returns the last node in a list of nodes for which
2378 Comes_From_Source returns True, if any
2379 * sem_ch6.adb (Check_Missing_Return): minor refactoring to use
2380 Last_Source_Node_In_Sequence
2381 * sem_ch8.adb (Analyze_Exception_Renaming, Analyze_Generic_Renaming,
2382 Analyze_Object_Renaming, Analyze_Use_Package): issue an error in formal
2383 mode on unsupported constructs
2384 * sem_ch9.adb Do not return after issuing error in formal mode, as the
2385 rest of the actions may be needed later on since the error is marked as
2387 * sinfo.ads: Typos in comments.
2389 2011-08-01 Pascal Obry <obry@adacore.com>
2391 * projects.texi: Minor editing.
2393 2011-08-01 Yannick Moy <moy@adacore.com>
2395 * err_vars.ads (Error_Msg_Lang, Error_Msg_Langlen): new variables for
2396 insertion character ~~
2397 * errout.ads, errout.adb (Formal_Error_Msg_...): remove procedures
2398 (Set_Error_Msg_Lang): new procedure which fixes the language for use
2399 with insertion character ~~
2400 (Set_Msg_Text): treat insertion character ~~
2401 * par-ch4.adb, par-ch5.adb, par-endh.adb, sem_attr.adb, sem_ch11.adb,
2402 sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_util.adb: Replace calls to
2403 Formal_Error_Msg_... procedures by equivalent Error_Msg_...
2404 procedures. Favor calls to Error_Msg_F(E) over Error_Msg_N(E). Make
2405 errors related to the formal language restriction not serious
2406 (insertion character |).
2407 * par.adb (Par): set formal language for error messages if needed
2408 * sem_ch6.adb (Check_Missing_Return): take into account possible
2409 generated statements at the end of the function
2410 * snames.ads-tmpl (Name_SPARK_95, Pragma_SPARK_95): new variable and
2411 enumeration value to define a new pragma SPARK_95
2412 * opt.ads, opt.adb (SPARK_Version_Type, SPARK_Version_Default,
2413 SPARK_Version): new type and variables to store the SPARK version
2415 (SPARK_Mode): return True when SPARK_Version is set
2416 * par-prag.adb: Correct indentation
2417 (Prag): take Pragma_SPARK_95 into account
2418 * sem_prag.adb (Set_Mechanism_Value, Sig_Flags): take Pragma_SPARK_95
2421 2011-08-01 Robert Dewar <dewar@adacore.com>
2423 * sem_ch3.adb, sem_ch3.ads, sem_ch5.adb, prj-part.adb, par-ch4.adb,
2424 sem_util.adb, sem_ch4.adb, sem_ch6.adb, sem_ch6.ads, sem_ch8.adb,
2425 sem_ch8.ads, sem_ch13.ads, par-ch5.adb, prj-env.ads: Minor reformatting
2427 2011-08-01 Pascal Obry <obry@adacore.com>
2429 * prj-part.ads, prj-part.adb (Parse): Add Target_Name parameter. Pass
2430 Target_Name to Get_Path call.
2431 (Parse_Single_Project): Likewise.
2432 (Post_Parse_Context_Clause): Likewise.
2433 * prj-env.ads, prj-env.adb (Find_Project): Add Target_Name parameter.
2434 Call Initialise_Project_Path with the proper Target_Name.
2435 (Initialize_Project_Path): Add <gnat_root>/<target_name>/lib/gnat
2437 (Get_Path): Add Target_Name parameter. Call Initialise_Project_Path
2438 with the proper Target_Name.
2439 * prj-conf.adb (Get_Or_Create_Configuration_File): Pass Target_Name to
2441 (Parse_Project_And_Apply_Config): Likewise.
2442 * prj-makr.adb (Initialize): Pass empty Target_Name to Parse routine.
2443 This is fine as this part of the code is supporting only native
2445 * prj-pars.adb (Parse): Pass empty Target_Name to Parse routine. This
2446 is fine as this part of the code is supporting only native compilation.
2448 2011-08-01 Yannick Moy <moy@adacore.com>
2450 * sem_util.adb (Enter_Name): issue error in formal mode on declaration
2451 of homonym, unless the homonym is one of the cases allowed in SPARK
2452 * par-ch5.adb (Parse_Decls_Begin_End): issue error in SPARK mode for
2453 package declaration occurring after a body.
2455 2011-08-01 Robert Dewar <dewar@adacore.com>
2457 * checks.adb, exp_ch4.adb: Minor reformatting.
2459 2011-08-01 Javier Miranda <miranda@adacore.com>
2461 * einfo.ads (Access_Disp_Table): Fix documentation.
2462 (Dispatch_Table_Wrappers): Fix documentation.
2464 2011-08-01 Pascal Obry <obry@adacore.com>
2466 * prj-env.adb, prj-env.ads: Minor reformatting.
2468 2011-08-01 Yannick Moy <moy@adacore.com>
2470 * sem_util.ads, sem_util.adb, par.adb, par_util.adb
2471 (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
2472 procedures out of these packages.
2473 * errout.ads, errout.adb
2474 (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
2475 procedures in of this package
2476 (Formal_Error_Msg_NE): new procedure for wrapper on Error_Msg_NE
2477 * par-ch5.adb (Parse_Decls_Begin_End): issue syntax error in SPARK mode
2478 on misplaced later vs initial declarations, like in Ada 83
2479 * sem_attr.adb (Processing for Analyze_Attribute): issue error in
2480 formal mode on attribute of private type whose full type declaration
2482 * sem_ch3.adb (Analyze_Declarations): issue error in formal mode on a
2483 package declaration inside a package specification
2484 (Analyze_Full_Type_Declaration): issue error in formal mode on
2485 controlled type or discriminant type
2486 * sem_ch6.adb (Analyze_Subprogram_Specification): only issue error on
2487 user-defined operator means that it should come from the source
2488 (New_Overloaded_Entity): issue error in formal mode on overloaded
2490 * sem_ch6.ads, sem_ch13.ads: typos in comments.
2492 2011-08-01 Thomas Quinot <quinot@adacore.com>
2494 * atree.adb: Minor reformatting.
2495 * checks.adb: Minor reformatting.
2497 2011-08-01 Vincent Celier <celier@adacore.com>
2499 * s-parame-vms-ia64.ads: Fix typo in comment
2501 * s-parame-vms-restrict.ads: Removed, unused.
2503 2011-08-01 Javier Miranda <miranda@adacore.com>
2506 (Is_Variable_Size_Array): Remove local subprogram Is_Constant_Bound.
2508 (Constrain_Index): Remove side effects in the evaluation of the bounds.
2509 * sem_ch3.ads, sem_ch3.adb
2510 (Is_Constant_Bound): New extended version of the subprogram that was
2511 previously located inside function Exp_Ch3.Is_Variable_Size_Array.
2512 Moved here since it is shared by routines of sem_ch3 and exp_ch3.
2513 * sem_aux.ads (Constant_Value): Fix typo in comment.
2514 * checks.adb (Generate_Index_Checks): New implementation which, for
2515 array objects with constant bounds, generates the runtime check
2516 referencing the bounds of the array type. For other cases this routine
2517 provides its previous behavior obtaining such values from the array
2519 * sem_res.adb (Set_Slice_Subtype): Link a copied range subtree with its
2521 * atree.adb (New_Copy): Reset flag Is_Overloaded in the new copy since
2522 we cannot have semantic interpretations of the new node.
2524 2011-08-01 Ed Schonberg <schonberg@adacore.com>
2526 * sem_ch6.adb (Fully_Conformant_Expressions): handle quantified
2529 2011-08-01 Arnaud Charlet <charlet@adacore.com>
2531 * sem_ch8.adb: Minor code editing.
2532 * s-vxwext.adb: Remove trailing space.
2533 * freeze.adb, freeze.ads, errout.ads, erroutc.adb: Fix GPLv3 header for
2534 consistency with other files.
2536 2011-08-01 Thomas Quinot <quinot@adacore.com>
2538 * s-auxdec.ads, s-auxdec-vms_64.ads: Minor reformatting.
2540 2011-08-01 Ed Schonberg <schonberg@adacore.com>
2542 * par-ch10.adb: reject parameterized expressions as compilation unit.
2543 * sem_ch4.adb: handle properly conditional expression with overloaded
2544 then_clause and no else_clause.
2546 2011-08-01 Tristan Gingold <gingold@adacore.com>
2548 * s-parame-vms-alpha.ads, s-parame-vms-ia64.ads: Redeclare C_Address
2549 like done by System.Aux_DEC.
2550 * env.c (__gnat_setenv) [VMS]: Put logicals into LNM$PROCESS table.
2552 2011-08-01 Yannick Moy <moy@adacore.com>
2554 * par-endh.adb (Check_End): issue a syntax error in SPARK mode for
2555 missing label at end of declaration (subprogram or package)
2556 * par-ch4.adb (P_Name): issue a syntax error in SPARK mode for mixing
2557 of positional and named parameter association
2558 * par.adb, par-util.adb (Formal_Error_Msg_SP): new wrapper on
2559 Error_Msg_SP which adds a prefix to the error message giving the name
2560 of the formal language analyzed
2561 * sem_ch6.adb (Analyze_Return_Type): issue an error in formal mode for
2562 access result type in subprogram, unconstrained array as result type,.
2563 (Analyze_Subprogram_Declaration): issue an error in formal mode for null
2565 * sem_ch8.adb: Code clean up.
2567 2011-08-01 Javier Miranda <miranda@adacore.com>
2569 * sem_ch7.adb (Uninstall_Declarations): Remove useless code.
2570 * einfo.ads (Access_Disp_Table): Fix documentation.
2571 (Dispatch_Table_Wrappers): Fix documentation.
2572 * einfo.adb (Access_Disp_Table, Dispatch_Table_Wrappers,
2573 Set_Access_Disp_Table, Set_Dispatch_Table_Wrappers): Fix the assertions
2574 to enforce the documentation of this attribute.
2575 (Set_Is_Interface): Cleanup the assertion.
2576 * exp_ch4.adb (Expand_Allocator_Expression, Tagged_Membership): Locate
2577 the Underlying_Type entity before reading attribute Access_Disp_Table.
2578 * exp_disp.adb (Expand_Dispatching_Call, Expand_Interface_Conversion):
2579 Locate the Underlying_Type before reading attribute Access_Disp_Table.
2580 * exp_aggr.adb (Build_Array_Aggr_Code, Build_Record_Aggr_Code): Locate
2581 the Underlying_Type entity before reading attribute Access_Disp_Table.
2582 * exp_ch3.adb (Build_Record_Init_Proc, Expand_N_Object_Declaration):
2583 Locate the Underlying_Type entity before reading attribute
2586 2011-08-01 Ed Schonberg <schonberg@adacore.com>
2588 * s-poosiz.ads: Additional overriding indicators.
2590 2011-08-01 Yannick Moy <moy@adacore.com>
2592 * sem_ch5.adb (Analyze_Exit_Statement): add return after error in
2594 (Analyze_Iteration_Scheme): issue error in formal mode when loop
2595 parameter specification does not include a subtype mark.
2596 * sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration): issue error in
2597 formal mode on abstract subprogram.
2598 (Analyze_Subprogram_Specification): issue error in formal mode on
2599 user-defined operator.
2600 (Process_Formals): issue error in formal mode on access parameter and
2602 * sem_ch9.adb (Analyze_Abort_Statement,
2603 Analyze_Accept_Statement, Analyze_Asynchronous_Select,
2604 Analyze_Conditional_Entry_Call, Analyze_Delay_Relative,
2605 Analyze_Delay_Until, Analyze_Entry_Call_Alternative,
2606 Analyze_Requeue, Analyze_Selective_Accept,
2607 Analyze_Timed_Entry_Call): issue error in formal mode on such constructs
2608 * sem_ch11.adb (Analyze_Raise_Statement, Analyze_Raise_xxx_Error):
2609 issue error in formal mode on user-defined raise statement.
2611 2011-08-01 Thomas Quinot <quinot@adacore.com>
2613 * sem_ch6.adb (Enter_Overloaded_Entity): Do not warn about a
2614 declaration being hidden when overriding an implicit inherited
2616 * par-ch10.adb (P_Compilation_Unit): In syntax check only mode
2617 (-gnats), do not complain about a source file that contains only a
2620 2011-08-01 Ed Schonberg <schonberg@adacore.com>
2622 * sem_ch5.adb (Analyze_Iterator_Scheme): Do not overwrite type of loop
2623 variable if already set.
2625 2011-08-01 Arnaud Charlet <charlet@adacore.com>
2627 * g-socket-dummy.adb, s-osinte-linux.ads, g-socket-dummy.ads,
2628 g-debuti.adb, g-tasloc.adb, g-debuti.ads, g-tasloc.ads,
2629 s-osinte-hpux.ads, g-sercom.adb, g-soliop-solaris.ads, g-sercom.ads,
2630 g-sptain.ads, g-curexc.ads, s-tasloc.adb, s-tasloc.ads, s-tataat.adb,
2631 g-ctrl_c.adb, a-reatim.adb, s-tataat.ads, g-dirope.adb, g-ctrl_c.ads,
2632 g-dirope.ads, g-boubuf.adb, g-calend.adb, g-boubuf.ads, g-souinf.ads,
2633 g-table.adb, g-bytswa-x86.adb, g-wispch.adb, g-io.adb, g-table.ads,
2634 g-wispch.ads, g-io.ads, g-memdum.adb, g-memdum.ads, g-busorg.adb,
2635 g-busorg.ads, g-regpat.adb, g-sothco-dummy.adb, g-encstr.adb,
2636 g-regpat.ads, g-sothco-dummy.ads, s-osinte-aix.ads, g-encstr.ads,
2637 g-sercom-mingw.adb, s-mastop-vms.adb, g-diopit.adb, g-diopit.ads,
2638 s-vxwext.adb, g-dyntab.adb, g-dyntab.ads, g-crc32.adb,
2639 g-sercom-linux.adb, g-crc32.ads, s-regpat.adb, g-flocon.ads,
2640 s-regpat.ads, g-stheme.adb, g-sestin.ads, s-taspri-posix-noaltstack.ads,
2641 g-soliop.ads, s-inmaop-posix.adb, g-locfil.ads, g-enblsp-vms-alpha.adb,
2642 g-socthi-dummy.adb, g-socthi-dummy.ads, gnat.ads, g-moreex.adb,
2643 g-moreex.ads, g-dynhta.adb, g-dynhta.ads, g-deutst.ads, g-htable.adb,
2644 g-cgicoo.adb, g-htable.ads, g-cgicoo.ads, a-interr.adb,
2645 g-socthi-vms.adb, g-socthi-vms.ads, g-hesora.adb, g-bubsor.adb,
2646 g-hesora.ads, g-bubsor.ads, g-md5.adb, g-md5.ads, s-intman-irix.adb,
2647 s-htable.adb, s-osinte-vms.adb, s-htable.ads, s-osinte-vms.ads,
2648 s-taprob.adb, g-bytswa.adb, g-bytswa.ads, s-osinte-solaris-posix.ads,
2649 a-suenco.adb, g-comver.adb, g-comver.ads, g-exctra.adb,
2650 s-osinte-solaris.adb, g-exctra.ads, s-osinte-irix.ads,
2651 s-osinte-solaris.ads, a-caldel-vms.adb, g-socthi-vxworks.adb,
2652 g-expect.adb, g-socthi-vxworks.ads, g-expect.ads, g-comlin.ads,
2653 g-heasor.adb, g-heasor.ads, g-traceb.adb, g-traceb.ads, g-decstr.adb,
2654 g-spipat.adb, g-decstr.ads, g-spipat.ads, s-mastop-tru64.adb,
2655 g-except.ads, g-thread.adb, g-hesorg.adb, g-thread.ads, g-hesorg.ads,
2656 g-expect-vms.adb, a-stuten.ads, g-spchge.adb, g-spchge.ads,
2657 g-u3spch.adb, g-u3spch.ads, g-spitbo.adb, g-spitbo.ads,
2658 s-osinte-dummy.ads, s-osinte-posix.adb, g-pehage.adb, g-pehage.ads,
2659 s-gloloc-mingw.adb, g-sha1.ads, s-traceb-hpux.adb,
2660 g-trasym-unimplemented.adb, g-trasym-unimplemented.ads, g-io_aux.adb,
2661 g-regexp.adb, g-io_aux.ads, g-socthi-mingw.adb, g-regexp.ads,
2662 s-osinte-hpux-dce.adb, g-socthi-mingw.ads, g-cgi.adb,
2663 s-osinte-hpux-dce.ads, g-cgi.ads, g-byorma.adb, g-boumai.ads,
2664 g-byorma.ads, a-caldel.adb, s-regexp.adb, s-regexp.ads,
2665 g-soliop-mingw.ads, g-sptavs.ads, s-osinte-tru64.ads, g-speche.adb,
2666 g-speche.ads, g-socthi.adb, g-stsifd-sockets.adb, g-socthi.ads,
2667 s-osinte-darwin.ads, i-vxwork-x86.ads, g-awk.adb, i-vxwork.ads,
2668 g-awk.ads, g-zspche.adb, g-zspche.ads, g-socket.adb, g-sptabo.ads,
2669 g-socket.ads, g-semaph.adb, g-semaph.ads, s-taspri-posix.ads,
2670 g-enblsp-vms-ia64.adb, g-cgideb.adb, g-cgideb.ads, g-sothco.adb,
2671 s-osinte-freebsd.ads, g-sothco.ads, g-catiio.adb, g-casuti.adb,
2672 g-catiio.ads, g-casuti.ads, g-trasym.adb, g-trasym.ads, s-casuti.adb,
2673 g-os_lib.adb, s-traceb-mastop.adb, g-busora.adb, s-interr-dummy.adb,
2674 g-busora.ads, g-enutst.ads, s-os_lib.adb, a-tasatt.adb,
2675 s-osinte-mingw.ads: Update to GPLv3 run-time license.
2676 Use GNAT instead of GNARL.
2678 2011-08-01 Bob Duff <duff@adacore.com>
2680 * a-cdlili.ads, a-cihama.ads, a-coinve.ads, a-ciorse.ads, a-coorma.ads,
2681 a-cidlli.ads, a-ciormu.ads, a-cihase.ads, a-cohama.ads, a-coorse.ads,
2682 a-ciorma.ads, a-coormu.ads, a-convec.ads, a-cohase.ads: Minor
2685 2011-08-01 Yannick Moy <moy@adacore.com>
2687 * debug.adb (d.D) reverve flag for the SPARK mode
2688 (d.E) reverve flag for SPARK generation mode
2689 (d.F) reverve flag for Why generation mode
2690 * opt.ads, opt.adb (ALFA_Mode, ALFA_Through_SPARK_Mode,
2691 ALFA_Through_Why_Mode, Formal_Verification_Mode, SPARK_Mode): New
2692 functions which return True when the corresponding modes are set
2693 (Formal_Language): return "spark" or "alfa" when in formal verification
2695 * sem_util.ads, sem_util.adb (Formal_Error_Msg): new wrapper on
2696 Error_Msg to prefix the error message with a tag giving the formal
2698 (Formal_Error_Msg_N): new wrapper on Error_Msg_N to prefix the error
2699 message with a tag giving the formal language
2700 * sem_ch5.adb (Analyze_Block_Statement): issue error in formal mode on
2702 (Analyze_Case_Statement): issue error in formal mode on case statement
2703 with a single "others" case alternative
2704 (Analyze_Exit_Statement): issue errors in formal mode on exit
2705 statements which do not respect SPARK restrictions
2706 (Analyze_Goto_Statement): issue error in formal mode on goto statement
2707 (Check_Unreachable_Code): always issue an error (not a warning) in
2708 formal mode on unreachable code (concerns both code after an infinite
2709 loop and after an unconditional jump, both not allowed in SPARK)
2710 * sem_ch6.adb (Analyze_Return_Statement): add call to
2711 Set_Return_Present for a procedure containing a return statement
2712 (already done for functions in Analyze_Function_Return)
2713 (Analyze_Function_Return): issue error in formal mode on extended
2714 return or if return is not last statement in function
2715 (Check_Missing_Return): issue error in formal mode if function does
2716 not end with return or if procedure contains a return
2717 * sem_ch8.ads, sem_ch8.adb (Has_Loop_In_Inner_Open_Scopes): new
2718 function to detect if there is an inner scope of its parameter S which
2721 2011-08-01 Thomas Quinot <quinot@adacore.com>
2723 * sem_ch6.ads: Minor reformatting.
2725 2011-08-01 Javier Miranda <miranda@adacore.com>
2727 * sem_util.adb (Abstract_Interface_List): Complete condition when
2728 processing private type declarations to avoid reading unavailable
2730 (Is_Synchronized_Tagged_Type): Complete condition when processing
2731 private extension declaration nodes to avoid reading unavailable
2734 2011-08-01 Thomas Quinot <quinot@adacore.com>
2736 * sem_ch3.adb: Minor reformatting.
2738 2011-08-01 Thomas Quinot <quinot@adacore.com>
2740 * s-parame-ae653.ads, s-parame-vms-alpha.ads, s-parame-hpux.ads,
2741 i-cpoint.adb, i-cstrin.adb, i-cpoint.ads, i-cstrin.ads,
2742 s-parame-vms-ia64.ads, s-parame.ads, i-c.ads, s-parame-vxworks.ads,
2743 s-parame-vms-restrict.ads: Remove duplicated Interfaces.C.* packages
2744 for VMS, instead parametrize the common implementation with
2745 System.Parameters declarations.
2747 2011-08-01 Eric Botcazou <ebotcazou@adacore.com>
2749 * gnat_rm.texi: Document limitation of Pragma No_Strict_Aliasing.
2751 2011-08-01 Tristan Gingold <gingold@adacore.com>
2753 * seh_init.c: Fix SEH handler installation on win64.
2755 2011-08-01 Ed Schonberg <schonberg@adacore.com>
2757 * sem_ch3.adb (Access_Subprogram_Declaration): in Asis mode, prevent
2758 double analysis of an anonymous access to subprogram, because it can
2759 lead to improper sharing of profiles and a back-end crash.
2761 2011-08-01 Robert Dewar <dewar@adacore.com>
2763 * make.adb, sem_ch4.adb: Minor reformatting.
2764 * gcc-interface/Make-lang.in: Update dependencies.
2765 * sem_util.adb, exp_ch5.adb: Minor reformatting.
2767 2011-08-01 Arnaud Charlet <charlet@adacore.com>
2769 * gnat_rm.texi: Fix definition of Long_Integer.
2771 2011-08-01 Ed Schonberg <schonberg@adacore.com>
2773 * exp_aggr.adb: check limit size of static aggregate unconditionally,
2774 to prevent storage exhaustion.
2775 * exp_ch7.adb (Clean_Simple_Protected_Objects): if the scope being
2776 finalized is a function body, insert the cleanup code before the final
2777 return statement, to prevent spurious warnings.
2778 * s-pooglo.ads: add overriding indicator.
2780 2011-08-01 Ed Schonberg <schonberg@adacore.com>
2782 * sem_ch4.adb (Operator_Check): improve error message when both a
2783 with_clause and a use_clause are needed to make operator usage legal.
2784 * sem_util.ads, sem_util.adb (Unit_Is_Visible): new predicate to
2785 determine whether a compilation unit is visible within an other,
2786 either through a with_clause in the current unit, or a with_clause in
2787 its library unit or one one of its parents.
2789 2011-08-01 Ed Schonberg <schonberg@adacore.com>
2791 * exp_ch5.adb (Expand_N_Iterator_Loop): handle properly an iterator
2792 over an arbitrary expression of an array or container type.
2793 * lib-xref.adb: clarify comment.
2795 2011-08-01 Bob Duff <duff@adacore.com>
2797 * einfo.ads: Minor reformatting.
2798 * debug.adb: Minor comment improvement.
2800 2011-08-01 Javier Miranda <miranda@adacore.com>
2802 * sem_ch4.adb (Try_Object_Operation): For class-wide subprograms do not
2803 consider hidden subprograms as valid candidates.
2805 2011-08-01 Arnaud Charlet <charlet@adacore.com>
2807 * make.adb (Compile): Strip -mxxx switches in CodePeer mode.
2809 2011-08-01 Vasiliy Fofanov <fofanov@adacore.com>
2811 * gnat_ugn.texi: Fix typo.
2813 2011-08-01 Robert Dewar <dewar@adacore.com>
2815 * i-cstrin.adb, sem_util.adb, exp_ch11.adb, sem_ch8.adb,
2816 lib-xref.adb: Minor reformatting
2818 2011-08-01 Gary Dismukes <dismukes@adacore.com>
2820 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Replace test of
2821 when to generate a call to Move_Final_List.
2822 (Has_Controlled_Parts): Remove this function.
2824 2011-08-01 Geert Bosch <bosch@adacore.com>
2826 * par-ch3.adb (P_Discrete_Choice_List): Improve error message for extra
2829 2011-08-01 Thomas Quinot <quinot@adacore.com>
2831 * exp_ch11.adb (Expand_N_Raise_Statement): Mark N_Raise_xxx_Error for
2832 explicit raise of a predefined exception as Comes_From_Source if the
2833 original N_Raise_Statement comes from source.
2835 2011-08-01 Robert Dewar <dewar@adacore.com>
2837 * sinfo.ads: Add comment.
2838 * sem_ch6.adb: Minor reformatting.
2840 2011-08-01 Robert Dewar <dewar@adacore.com>
2842 * freeze.adb (Freeze_Entity): Refine check for bad component size
2843 clause to avoid rejecting confirming clause when atomic/aliased present.
2845 2011-08-01 Ed Schonberg <schonberg@adacore.com>
2847 * sem_ch8.adb (Find_Direct_Name, Analyze_Expanded_Name): use Is_LHS to
2848 better determine whether an entity reference is a write.
2849 * sem_util.adb (Is_LHS): refine predicate to handle assignment to a
2851 * lib-xref.adb (Output_References): Do no suppress a read reference at
2852 the same location as an immediately preceeding modify-reference, to
2853 handle properly in-out actuals.
2855 2011-08-01 Tristan Gingold <gingold@adacore.com>
2857 * env.c (__gnat_setenv) [VMS]: Refine previous change.
2859 2011-08-01 Quentin Ochem <ochem@adacore.com>
2861 * i-cstrin.adb (New_String): Changed implementation, now uses only the
2862 heap to compute the result.
2864 2011-08-01 Robert Dewar <dewar@adacore.com>
2866 * atree.ads: Minor reformatting.
2868 2011-08-01 Emmanuel Briot <briot@adacore.com>
2870 * g-expect.adb (Get_Command_Output): Fix memory leak.
2872 2011-08-01 Geert Bosch <bosch@adacore.com>
2874 * cstand.adb (P_Float_Type): New procedure to print the definition of
2875 predefined fpt types.
2876 (P_Mixed_Name): New procedure to print a name using mixed case
2877 (Print_Standard): Use P_Float_Type for printing floating point types
2878 * einfo.adb (Machine_Emax_Value): Add preliminary support for quad
2879 precision IEEE float.
2881 2011-08-01 Thomas Quinot <quinot@adacore.com>
2883 * sem_ch3.adb: Minor reformatting.
2885 2011-08-01 Ed Schonberg <schonberg@adacore.com>
2887 * sem_ch6.adb (Analyze_Parameterized_Expression): If the expression is
2888 the completion of a generic function, insert the new body rather than
2889 rewriting the original.
2891 2011-08-01 Yannick Moy <moy@adacore.com>
2893 * sinfo.ads, errout.ads: Typos in comments.
2895 2011-08-01 Robert Dewar <dewar@adacore.com>
2897 * par-endh.adb: Minor reformatting.
2899 2011-08-01 Robert Dewar <dewar@adacore.com>
2901 * aspects.ads, aspects.adb: Add aspects for library unit pragmas
2902 (Pre_Post_Aspects): New subtype.
2903 * par-ch12.adb (P_Generic): New syntax for aspects in packages
2904 * par-ch13.adb (P_Aspect_Specifications): Add Semicolon parameter
2905 * par-ch7.adb (P_Package): Remove Decl parameter
2906 (P_Package): Handle new syntax for aspects (before IS)
2907 * par-ch9.adb (P_Protected_Definition): Remove Decl parameter, handle
2909 (P_Task_Definition): Remove Decl parameter, handle new aspect syntax
2910 * par.adb (P_Aspect_Specifications): Add Semicolon parameter
2911 (P_Package): Remove Decl parameter
2912 * sem_ch13.adb (Analyze_Aspect_Specifications): Handle library unit
2914 * sem_ch7.adb (Analyze_Package_Declaration): Analyze new format aspect
2916 * sem_util.ads, sem_util.adb (Static_Boolean): New function
2917 * sinfo.ads: Document new syntax for aspects in packages etc.
2918 * sprint.adb: Handle new syntax of aspects before IS in package
2920 2011-08-01 Thomas Quinot <quinot@adacore.com>
2922 * atree.ads: Minor reformatting.
2923 * sem_prag.adb: Minor reformatting.
2925 2011-08-01 Robert Dewar <dewar@adacore.com>
2927 * exp_util.adb (Insert_Actions): Fix error in handling Actions for
2928 case expr alternative.
2930 2011-08-01 Ed Schonberg <schonberg@adacore.com>
2932 * sem_ch12.adb: Fix typo.
2934 2011-08-01 Geert Bosch <bosch@adacore.com>
2936 * sem_prag.adb (Check_No_Link_Name): New procedure.
2937 (Process_Import_Or_Interface): Use Check_No_Link_Name.
2938 * cstand.adb (Create_Standard): Use Esize (Standard_Long_Long_Float)
2939 instead of Standard_Long_Long_Float_Size global. Preparation for
2940 eventual removal of per type constants.
2941 * exp_util.ads (Get_Stream_Size): New function returning the stream
2942 size value of subtype E.
2943 * exp_util.adb (Get_Stream_Size): Implement new function.
2944 * exp_strm.adb (Build_Elementary_Input_Call): Use Get_Stream_Size
2946 * exp_attr.adb (Attribute_Stream_Size): Use Get_Stream_Size
2948 (Machine_Mantissa_Value): Handle 128-bit quad precision IEEE floats
2950 2011-08-01 Geert Bosch <bosch@adacore.com>
2952 * cstand.adb: Fix comments.
2953 * sem_prag.adb (Analyze_Pragma): Use List_Length instead of explicit
2956 2011-08-01 Robert Dewar <dewar@adacore.com>
2958 * exp_ch4.adb, sem_cat.adb: Minor reformatting.
2960 2011-08-01 Geert Bosch <bosch@adacore.com>
2962 * atree.ads: Fix comment.
2964 2011-08-01 Robert Dewar <dewar@adacore.com>
2966 * aspects.ads, aspects.adb (Aspect_Names): Moved from body to spec.
2967 * par-ch13.adb (P_Aspect_Specifications): Check misspelled aspect name.
2968 * par.adb: Add with for Namet.Sp.
2969 * par-tchk.adb: Minor reformatting.
2971 2011-08-01 Vincent Celier <celier@adacore.com>
2973 * mlib-tgt-specific-vms-alpha.adb, mlib-tgt-specific-vms-ia64.adb
2974 (Build_Dynamic_Library): Use new function Init_Proc_Name to get the name
2975 of the init procedure of a SAL.
2976 * mlib-tgt-vms_common.ads, mlib-tgt-vms_common.adb (Init_Proc_Name):
2979 2011-08-01 Thomas Quinot <quinot@adacore.com>
2981 * exp_ch4.adb, s-tasini.ads, sem_attr.adb, s-soflin.ads: Minor
2984 2011-08-01 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
2986 * adaint.c (__gnat_file_time_name_attr): Get rid of warning.
2988 2011-08-01 Thomas Quinot <quinot@adacore.com>
2990 * sem_util.adb, sem_util.ads (Has_Overriding_Initialize): Make function
2991 conformant with its spec (return True only for types that have
2992 an overriding Initialize primitive operation that prevents them from
2993 having preelaborable initialization).
2994 * sem_cat.adb (Validate_Object_Declaration): Fix test for preelaborable
2995 initialization for controlled types in Ada 2005 or later mode.
2997 2011-08-01 Robert Dewar <dewar@adacore.com>
2999 * aspects.ads, aspects.adb: Add aspect Type_Invariant, Precondition,
3001 (Same_Aspect): New function.
3002 * sem_ch13.adb (Analyze_Aspect_Specifications): Add aspect
3003 Type_Invariant, Precondition, Postcondition.
3004 * snames.ads-tmpl: Add Name_Type_Invariant.
3006 2011-08-01 Robert Dewar <dewar@adacore.com>
3008 * freeze.adb (Freeze_Entity): Don't call Check_Aspect_At_Freeze_Point
3010 (Freeze_All_Ent): Fix error in handling inherited aspects.
3011 * sem_ch13.adb (Analyze_Aspect_Specifications): Skip aspect that is
3012 already analyzed, but don't skip entire processing of a declaration,
3013 that's wrong in some cases of declarations being rewritten.
3014 (Analyze_Aspect_Specification): Set Is_Delayed_Aspect in aspects.
3015 Don't delay for integer, string literals
3016 Treat predicates in usual manner for delay, remove special case code,
3018 (Analyze_Freeze_Entity): Make call to Check_Aspect_At_Freeze_Point
3019 (Build_Predicate_Function): Update saved expression in aspect
3020 (Build_Invariant_Procedure): Update saved expression in aspect
3021 * exp_ch4.adb (Expand_N_Selected_Component): Only do the optimization
3022 of replacement of discriminant references if the reference is simple.
3024 2011-08-01 Robert Dewar <dewar@adacore.com>
3026 * aspects.ads, aspects.adb: Add Static_Predicate and Dynamic_Predicate.
3027 * sem_ch13.adb (Analyze_Aspect_Specification): Add processing for
3028 Static_Predicate and Dynamic_Predicate.
3029 (Build_Predicate_Function): Add processing for Static_Predicate
3030 and Dynamic_Predicate.
3031 * sinfo.ads, sinfo.adb (From_Dynamic_Predicate): New flag
3032 (From_Static_Predicate): New flag
3033 * snames.ads-tmpl: Add Name_Static_Predicate and Name_Dynamic_Predicate
3035 2011-08-01 Robert Dewar <dewar@adacore.com>
3037 * usage.adb: Documentation cleanup for Ada version modes in usage.
3038 * expander.adb: Minor reformatting.
3040 2011-08-01 Robert Dewar <dewar@adacore.com>
3042 * atree.ads: Minor comment fix.
3043 * a-stwifi.adb, a-stzfix.adb, a-strfix.adb, a-ztexio.ads, a-textio.ads,
3044 a-witeio.ads, sem_prag.adb: Minor reformatting.
3046 2011-08-01 Doug Rupp <rupp@adacore.com>
3048 * env.c (__gnat_setenv) [VMS]: Force 32bit on item list structure
3049 pointers. Use descrip.h header file for convenience. Add some
3052 2011-08-01 Robert Dewar <dewar@adacore.com>
3054 * freeze.adb (Freeze_Entity): Call Check_Aspect_At_Freeze_Point
3055 (Freeze_All): Call Check_Aspect_At_End_Of_Declarations
3056 * sem_ch13.ads, sem_ch13.adb (Check_Aspect_At_Freeze_Point):
3058 (Check_Aspect_At_End_Of_Declarations): New procedure
3059 (Analye_Aspect_Specification): Minor changes for above procedures
3060 * sinfo.ads, sinfo.adb (Is_Delayed_Aspect): Now set in aspect
3061 specification node as well.
3063 2011-08-01 Pascal Obry <obry@adacore.com>
3065 * adaint.c (_gnat_stat): GetFilesAttributesEx() would fail on special
3066 Windows files. Use GetFilesAttributes() in this case to check for file
3067 existence instead of returning with an error code.
3069 2011-08-01 Vincent Celier <celier@adacore.com>
3071 * a-stzfix.adb, a-stwifi.adb (Replace_Slice): Fixed computation when
3072 High is above Source length.
3074 2011-08-01 Robert Dewar <dewar@adacore.com>
3076 * a-ztexio.ads, a-textio.ads, a-witeio.ads: Fix comment.
3078 2011-08-01 Robert Dewar <dewar@adacore.com>
3080 * aspects.ads (Boolean_Aspects): New subtype.
3081 * exp_ch13.adb (Expand_Freeze_Entity): Fix errors in handling aspects
3082 for derived types in cases where the parent type and derived type have
3084 * freeze.adb (Freeze_Entity): Fix problems in handling derived type
3085 with aspects when parent type also has aspects.
3086 (Freeze_Entity): Deal with delay of boolean aspects (must evaluate
3087 boolean expression at this point).
3088 * sem_ch13.adb (Analyze_Aspect_Specifications): Delay all aspects in
3089 accordance with final decision on the Ada 2012 feature.
3090 * sinfo.ads, sinfo.adb (Is_Boolean_Aspect): New flag.
3092 2011-08-01 Matthew Heaney <heaney@adacore.com>
3094 * a-chtgbo.adb (Delete_Node_Sans_Free): Replace iterator with selector.
3096 2011-08-01 Pascal Obry <obry@adacore.com>
3098 * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb:
3099 Fix Replace_Slice when High is above current string size.
3100 (Replace_Slice): Fix DL computation when High is above current
3103 2011-08-01 Gary Dismukes <dismukes@adacore.com>
3105 * gnat_rm.texi: Add documentation for pragma Static_Elaboration_Desired.
3107 2011-08-01 Matthew Heaney <heaney@adacore.com>
3109 * a-rbtgbo.adb (Delete_Node_Sans_Free): Fixed assignment to left child
3112 2011-08-01 Pascal Obry <obry@adacore.com>
3114 * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb: Minor
3117 2011-08-01 Ed Schonberg <schonberg@adacore.com>
3119 * sem_attr.adb (Analyze_Attribute, case 'Access): Handle properly named
3120 access to protected subprograms in generic bodies.
3121 * sem_ch6.adb (Analyze_Subprogram_Declaration): If the context is a
3122 protected type, indicate that the convention of the subprogram is
3123 Convention_Protected, because it may be used in subsequent declarations
3124 within the protected declaration.
3126 2011-08-01 Vincent Celier <celier@adacore.com>
3128 * mlib-prj.adb (Build_Library): Use "ada_" as the prefix for the "init"
3129 and "final" procedures when the name of the library is "ada", to avoid
3130 duplicate symbols "adainit" and "adafinal" in executables.
3132 2011-08-01 Ed Schonberg <schonberg@adacore.com>
3134 * sem_attr.adb (Analyze_Attribute, case 'Result): Handle properly a
3135 quantified expression that appears within a postcondition and uses the
3136 Ada2012 'Result attribute.
3138 2011-07-28 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
3140 * init.c (__gnat_error_handler): Cast reason to int.
3141 (__gnat_install_handler): Explain sa_sigaction use.
3143 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
3145 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: If the
3146 subprogram has copy-in copy-out parameters, try to promote the mode of
3147 the return type if it is passed in registers.
3149 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
3151 * gcc-interface/utils2.c (build_binary_op) <ARRAY_REF>: Do not mark the
3152 left operand as addressable.
3154 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
3156 * gcc-interface/gigi.h (build_function_stub): Remove.
3157 (build_return_expr): Likewise.
3158 (convert_vms_descriptor): Declare.
3159 * gcc-interface/utils.c (convert_vms_descriptor): Make global.
3160 (build_function_stub): Move to...
3161 * gcc-interface/utils2.c (build_return_expr): Move to...
3162 * gcc-interface/trans.c (build_function_stub): ...here.
3163 (build_return_expr): ...here.
3164 (Subprogram_Body_to_gnu): Add local variable for language_function.
3165 Disconnect the parameter attributes cache, if any, once done with it.
3166 Call end_subprog_body only after setting the end_locus.
3167 Build the stub associated with the function, if any, at the very end.
3168 (gnat_to_gnu) <N_Return_Statement>: Remove couple of useless local
3169 variables and streamline control flow.
3171 2011-07-23 Arnaud Charlet <charlet@adacore.com>
3174 * gcc-interface/Makefile.in (powerpc-linux): Remove reference to
3177 2011-07-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
3180 * init.c [sun && __SVR4 && !__vxworks] (__gnat_install_handler):
3181 Assign to act.sa_sigaction.
3182 * tracebak.c [USE_GENERIC_UNWINDER] (__gnat_backtrace): Cast
3183 current->return_address to char * before arithmetic.
3185 2011-07-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
3187 * init.c [sgi] (__gnat_error_handler): Update sigaction(2) citation.
3188 Correct argument types.
3189 Extract code from reason.
3190 (__gnat_install_handler): Assign to act.sa_sigaction.
3192 2011-07-21 Eric Botcazou <ebotcazou@adacore.com>
3194 * gcc-interface/Make-lang.in (GNAT1_ADA_OBJS): Move ada/b_gnat1.o to...
3195 (GNAT1_OBJS): ...here.
3197 2011-07-15 Eric Botcazou <ebotcazou@adacore.com>
3200 * g-socthi-mingw.adb (Fill): Fix formatting.
3202 * gcc-interface/gigi.h: Move around comment.
3204 2011-07-14 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
3207 * s-taprop-hpux-dce.adb (Abort_Task): Remove unnecessary cast.
3209 2011-07-14 Florian Weimer <fw@deneb.enyo.de>
3212 * g-socthi-mingw.adb (Fill): Guard against invalid MSG_WAITALL.
3214 2011-07-13 Eric Botcazou <ebotcazou@adacore.com>
3216 * gcc-interface/utils.c (build_vms_descriptor32): Skip the 32-bit
3217 range comparison if Pmode is SImode.
3219 2011-07-12 Laurent GUERBY <laurent@guerby.net>
3220 Eric Botcazou <ebotcazou@adacore.com>
3222 * adadecode.c: Wrap up in extern "C" block.
3223 * adadecode.h: Likewise.
3224 * adaint.c: Likewise. Remove 'const' keyword.
3225 * adaint.h: Likewise.
3227 * atree.h: Likewise.
3229 * cstreams.c: Likewise.
3233 * final.c: Likewise.
3235 * initialize.c: Likewise.
3237 * namet.h: Likewise.
3238 * nlists.h: Likewise.
3239 * raise.c: Likewise.
3240 * raise.h: Likewise.
3241 * repinfo.h: Likewise.
3242 * seh_init.c: Likewise.
3243 * targext.c: Likewise.
3244 * tracebak.c: Likewise.
3245 * uintp.h: Likewise.
3246 * urealp.h: Likewise.
3247 * xeinfo.adb: Wrap up generated C code in extern "C" block.
3248 * xsinfo.adb: Likewise.
3249 * xsnamest.adb: Likewise.
3250 * gcc-interface/gadaint.h: Wrap up in extern "C" block.
3251 * gcc-interface/gigi.h: Wrap up some prototypes in extern "C" block.
3252 * gcc-interface/misc.c: Likewise.
3253 * gcc-interface/Make-lang.in (GCC_LINK): Use LINKER.
3254 (GNAT1_C_OBJS): Remove ada/b_gnat1.o. List ada/seh_init.o and
3255 ada/targext.o here...
3256 (GNAT_ADA_OBJS): ...and not here.
3257 (GNAT1_ADA_OBJS): Add ada/b_gnat1.o.
3258 (GNATBIND_OBJS): Reorder.
3260 2011-07-07 Richard Henderson <rth@redhat.com>
3262 * gcc-interface/misc.c (gnat_init_gcc_eh): Don't call
3263 dwarf2out_frame_init.
3265 2011-07-07 Eric Botcazou <ebotcazou@adacore.com>
3267 * gcc-interface/misc.c (gnat_init): Tweak previous change.
3269 2011-07-07 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
3272 * gcc-interface/Makefile.in: Handle x86_64-solaris2.
3274 2011-07-06 Richard Guenther <rguenther@suse.de>
3276 * gcc-interface/misc.c (gnat_init): Merge calls to
3277 build_common_tree_nodes and build_common_tree_nodes_2.
3278 Re-initialize boolean_false_node.
3280 2011-07-02 Eric Botcazou <ebotcazou@adacore.com>
3281 Olivier Hainque <hainque@adacore.com>
3282 Nicolas Setton <setton@adacore.com>
3284 * gcc-interface/utils.c (record_builtin_type): Set TYPE_ARTIFICIAL on
3285 the type according to the ARTIFICIAL_P parameter.
3286 (create_type_decl): Likewise.
3287 (create_type_stub_decl): Set TYPE_ARTIFICIAL on the type to 1.
3289 2011-07-01 Eric Botcazou <ebotcazou@adacore.com>
3291 * gcc-interface/Make-lang.in (gnat1): Prepend '+' to the command.
3292 (gnatbind): Likewise.
3294 2011-06-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
3296 * gcc-interface/Makefile.in (TOOLS_LIBS): Add $(LIBINTL).
3298 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
3300 * gcc-interface/decl.c (gnat_to_gnu_component_type): Use GNAT_TYPE
3301 local variable throughout. Remove useless call to Base_Type.
3302 (gnat_to_gnu_field): Use GNAT_FIELD_TYPE local variable throughout.
3303 Take it also into account for the volatileness of the field. Set the
3304 TREE_SIDE_EFFECTS flag as well in this case. Reorder some warnings.
3306 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
3308 * gcc-interface/trans.c (Identifier_to_gnu): Don't set TREE_THIS_NOTRAP
3309 on a dereference built for a by-ref object if it has an address clause.
3311 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
3313 * einfo.ads (Address_Taken): Document use for the second argument of
3314 Asm_Input and Asm_Output attributes.
3315 * sem_attr.adb (Analyze_Attribute) <Attribute_Asm_Input>: If the second
3316 argument is an entity name, then set Address_Taken on it.
3317 <Attribute_Asm_Output>: Likewise.
3318 * gcc-interface/trans.c (lvalue_required_for_attribute_p): Handle the
3319 Attr_Asm_Input and Attr_Asm_Output attributes explicitly.
3320 (gnat_to_gnu) <N_Code_Statement>: If an operand is going to end up in
3321 memory and is a CONST_DECL, retrieve its corresponding VAR_DECL.
3323 2011-06-16 Joern Rennecke <joern.rennecke@embecosm.com>
3326 * gcc-interface/decl.c (gnat_to_gnu_param): Use pack_cumulative_args.
3328 2011-06-14 Joseph Myers <joseph@codesourcery.com>
3330 * gcc-interface/Make-lang.in (gnatbind$(exeext)): Use ggc-none.o.
3331 (ada/utils.o): Update dependencies.
3332 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Add
3333 ../../../libcpp/libcpp.a.
3334 * gcc-interface/utils.c: Include common/common-target.h.
3335 (process_attributes): Use targetm_common.have_named_sections.
3337 2011-06-07 Richard Guenther <rguenther@suse.de>
3339 * gcc-interface/misc.c (gnat_init): Do not set size_type_node or call
3342 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
3344 * gcc-interface/utils2.c (gnat_stabilize_reference): Propagate the
3345 TREE_THIS_NOTRAP flag.
3347 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
3349 * gcc-interface/utils2.c (gnat_stabilize_reference) <COMPOUND_EXPR>:
3352 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
3354 * gcc-interface/trans.c (Identifier_to_gnu): Also handle deferred
3355 constants whose full view has discriminants specially.
3357 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
3359 * gcc-interface/utils.c: Include diagnostic.h.
3360 (gnat_write_global_declarations): Output debug information for all
3361 global type declarations before finalizing the compilation unit.
3362 * gcc-interface/Make-lang.in (ada/utils.o): Add dependency.
3364 2011-05-25 Jakub Jelinek <jakub@redhat.com>
3366 * gcc-interface/utils.c (def_fn_type): Remove extra va_end.
3368 2011-05-25 Kai Tietz <ktietz@redhat.com>
3370 * adaint.c (__gnat_to_canonical_file_list_next): Use array
3371 initialization instead of const/none-const pointer assignment.
3373 2011-05-24 Joseph Myers <joseph@codesourcery.com>
3375 * gcc-interface/Make-lang.in (GNAT1_OBJS): Don't include
3376 $(EXTRA_GNAT1_OBJS).
3377 (GNATBIND_OBJS): Don't include $(EXTRA_GNATBIND_OBJS).
3378 (EXTRA_GNAT1_OBJS, EXTRA_GNATBIND_OBJS): Remove.
3379 (gnat1$(exeext), gnatbind$(exeext)): Use libcommon-target.a.
3380 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use
3381 libcommon-target.a instead of prefix.o.
3383 2011-05-21 Joseph Myers <joseph@codesourcery.com>
3386 * gcc-interface/Make-lang.in (gnatbind$(exeext)): Depend on $(LIBDEPS).
3388 2011-05-20 Joseph Myers <joseph@codesourcery.com>
3390 * gcc-interface/Make-lang.in (EXTRA_GNATBIND_OBJS): Remove version.o.
3391 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use libcommon.a
3392 instead of version.o.
3394 2011-05-18 Kai Tietz <ktietz@redhat.com>
3396 * gcc-interface/trans.c (Exception_Handler_to_gnu_sjlj): Use
3397 boolean_false_node instead of integer_zero_node.
3398 (convert_with_check): Likewise.
3399 * gcc-interface/decl.c (choices_to_gnu): Likewise.
3401 2011-05-12 Eric Botcazou <ebotcazou@adacore.com>
3403 * gcc-interface/trans.c (call_to_gnu): In the by-reference case, if the
3404 type of the parameter is an unconstrained array, convert the actual to
3405 the type of the formal in the In Out and Out cases as well.
3407 2011-05-11 Nathan Froyd <froydnj@codesourcery.com>
3409 * gcc-interface/utils.c (def_fn_type): Don't call build_function_type;
3410 call build_function_type_array or build_varargs_function_type_array
3412 (create_subprog_type): Don't call build_function_type; call
3413 build_function_type_vec instead.
3415 2011-05-11 Nathan Froyd <froydnj@codesourcery.com>
3417 * gcc-interface/ada-tree.h (TYPE_OBJECT_RECORD_TYPE): Use TYPE_MINVAL.
3418 (TYPE_GCC_MIN_VALUE): Use TYPE_MINVAL.
3419 (TYPE_GCC_MAX_VALUE): Use TYPE_MAXVAL.
3421 2011-05-07 Eric Botcazou <ebotcazou@adacore.com>
3423 * gcc-interface/decl.c (intrin_arglists_compatible_p): Remove spaces.
3425 * gcc-interface/gigi.h (global_bindings_p): Adjust prototype.
3426 * gcc-interface/utils.c (global_bindings_p): Return bool and simplify.
3428 2011-05-05 Nathan Froyd <froydnj@codesourcery.com>
3430 * gcc-interface/trans.c (Case_Statement_to_gnu): Call build_case_label.
3432 2011-05-05 Nathan Froyd <froydnj@codesourcery.com>
3434 * gcc-interface/decl.c (intrin_arglists_compatible_p): Use iterators
3435 instead of accessing TYPE_ARG_TYPES directly.
3436 * gcc-interface/utils.c (handle_nonnull_attribute): Likewise.
3438 2011-05-05 Eric Botcazou <ebotcazou@adacore.com>
3441 * gcc-interface/gigi.h (get_variant_part): Declare.
3442 * gcc-interface/decl.c (get_variant_part): Make global.
3443 * gcc-interface/utils2.c (find_common_type): Do not return T1 if the
3444 types have the same constant size, are record types and T1 has a
3445 variant part while T2 doesn't.
3447 2011-05-05 Eric Botcazou <ebotcazou@adacore.com>
3449 * gcc-interface/utils.c (begin_subprog_body): Do not call
3451 (end_subprog_body): Likewise.
3453 2011-05-04 Richard Guenther <rguenther@suse.de>
3455 * gcc-interface/trans.c (gnat_to_gnu): Remove zero notrunc argument to
3457 (pos_to_constructor): Likewise.
3459 2011-05-03 Nathan Froyd <froydnj@codesourcery.com>
3460 Eric Botcazou <ebotcazou@adacore.com>
3462 * gcc-interface/trans.c (gigi): Call build_function_type_list instead
3463 of build_function_type. Adjust calls to...
3464 (build_raise_check): ...this. Do not take a void_tree parameter.
3465 Call build_function_type_list instead of build_function_type.
3466 Fix head comment and swap couple of conditional blocks.
3468 2011-04-30 Eric Botcazou <ebotcazou@adacore.com>
3470 * gnatvsn.ads (Library_Version): Bump to 4.7.
3471 (Current_Year): Bump to 2011.
3473 2011-04-29 Michael Matz <matz@suse.de>
3475 * gcc-interface/misc.c (gnat_handle_option): Set
3476 warn_maybe_uninitialized.
3478 2011-04-23 Gerald Pfeifer <gerald@pfeifer.com>
3480 * gnat_ugn.texi (Complexity Metrics Control): Update link to
3481 the Watson/McCabe paper.
3483 2011-04-23 Jim Meyering <meyering@redhat.com>
3485 * gnat_ugn.texi (Examples of gnatxref Usage): Fix typo: s/it it/it is/
3487 2011-04-22 Eric Botcazou <ebotcazou@adacore.com>
3489 * gcc-interface/decl.c (make_packable_type): Copy DECL_PARALLEL_TYPE
3492 2011-04-22 Eric Botcazou <ebotcazou@adacore.com>
3494 * gcc-interface/gigi.h (create_subprog_decl): Add ARTIFICIAL_FLAG
3496 * gcc-interface/utils.c (create_subprog_decl): Likewise. Set
3497 DECL_ARTIFICIAL and DECL_NO_INLINE_WARNING_P on the DECL accordingly.
3498 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: Add
3499 ARTIFICIAL_FLAG local variable and pass it to create_subprog_decl.
3500 <all>: Do not set flags on the reused DECL node coming from an alias.
3501 Set DECL_IGNORED_P on the DECL node built for subprograms if they
3502 don't need debug info here...
3503 * gcc-interface/trans.c (Subprogram_Body_to_gnu): ...and not here.
3504 (gigi): Adjust calls to create_subprog_decl.
3505 (build_raise_check): Likewise.
3506 (establish_gnat_vms_condition_handler): Likewise.
3507 (Compilation_Unit_to_gnu): Likewise.
3508 (gnat_to_gnu): Likewise.
3510 2011-04-21 Eric Botcazou <ebotcazou@adacore.com>
3512 * gcc-interface/Makefile.in (NO_SIBLING_ADAFLAGS): Always define.
3513 (NO_REORDER_ADAFLAGS): New variable.
3514 (EXTRA_GNATTOOLS): Always define.
3515 (../stamp-gnatlib1-$(RTSDIR): Copy tsystem.h.
3516 Clean up and adjust list of files compiled with special options.
3517 * gcc-interface/Make-lang.in: Likewise.
3518 (ada/decl.o): Cosmetical change.
3519 (ada/misc.o): Remove dependency on $(PLUGIN_H).
3521 2011-04-20 Jim Meyering <meyering@redhat.com>
3523 * initialize.c (__gnat_initialize): Remove useless if-before-free.
3525 2011-04-17 Eric Botcazou <ebotcazou@adacore.com>
3527 * gcc-interface/Make-lang.in (gnatbind): Replace $(ALL_CFLAGS) with
3528 $(CFLAGS) on the link line.
3530 2011-04-17 Eric Botcazou <ebotcazou@adacore.com>
3532 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Function>: Declare the
3533 padded type built for the return type if it is unconstrained.
3535 2011-04-14 Nathan Froyd <froydnj@codesourcery.com>
3537 * gcc-interface/utils.c (gnat_poplevel): Use block_chainon.
3539 2011-04-12 Nathan Froyd <froydnj@codesourcery.com>
3541 * gcc-interface/ada-tree.h (union lang_tree_node): Check for TS_COMMON
3542 before calling TREE_CHAIN.
3543 * gcc-interface/misc.c (gnat_init_ts): New function.
3544 (LANG_HOOKS_INIT_TS): Define.
3546 2011-04-12 Martin Jambor <mjambor@suse.cz>
3548 * gcc-interface/utils.c (end_subprog_body): Call cgraph_get_create_node
3549 instead of cgraph_node.
3551 2011-04-08 Eric Botcazou <ebotcazou@adacore.com>
3553 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Procedure>: Set minimum
3554 alignment on fields of the RETURN type built for the Copy-In Copy-Out
3557 2011-04-08 Eric Botcazou <ebotcazou@adacore.com>
3559 * gcc-interface/trans.c (Identifier_to_gnu): Do not return initializers
3560 of aggregate types that contain a placeholder.
3562 2011-04-08 Nathan Froyd <froydnj@codesourcery.com>
3564 * gcc-interface/utils.c (handle_sentinel_attribute): Don't use
3566 (handle_type_generic_attribute): Likewise.
3568 2011-04-04 Eric Botcazou <ebotcazou@adacore.com>
3571 * s-oscons-tmplt.c (MSG_WAITALL): Fix thinko in previous change.
3573 2011-04-04 Kai Tietz <ktietz@redhat.com>
3576 * s-oscons-tmplt.c (MSG_WAITALL): Define it for native windows targets
3579 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
3581 * gcc-interface/utils2.c (build_allocator): In the unconstrained array
3582 type case, do not strip a padding type around the array type.
3584 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
3586 * gcc-interface/utils.c (update_pointer_to): Finalize named pointer
3589 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
3591 * gcc-interface/lang.opt (feliminate-unused-debug-types): Delete.
3592 * gcc-interface/misc.c (gnat_handle_option): Remove special handling
3593 code for -feliminate-unused-debug-types.
3594 (gnat_post_options): Likewise.
3596 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
3598 * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
3599 declaration of a pointer type, then set DECL_ORIGINAL_TYPE to a
3602 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
3604 * gcc-interface/decl.c (gnat_to_gnu_entity): Do not force the
3605 DECL_ARTIFICIAL flag on enumeration types.
3607 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
3609 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: Do not make
3610 fat pointer types artificial unconditionally.
3611 <E_Array_Subtype>: Attach the base array type as a parallel type if it
3614 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
3616 * gcc-interface/gigi.h (get_dummy_type): Declare.
3617 (build_dummy_unc_pointer_types): Likewise.
3618 (finish_fat_pointer_type): Likewise.
3619 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: If a dummy
3620 fat pointer type has been built, complete it in place.
3621 <E_Access_Type>: Call build_dummy_unc_pointer_types to build dummy fat
3622 and thin pointers. Remove useless variable.
3623 (finish_fat_pointer_type): Make global and move to...
3624 * gcc-interface/utils.c (finish_fat_pointer_type): ...here.
3625 (get_dummy_type): New function.
3626 (build_dummy_unc_pointer_types): Likewise.
3627 (gnat_pushdecl): Propage the name to the anonymous variants only.
3628 (update_pointer_to): Only adjust the pointer types in the unconstrained
3631 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
3633 * gcc-interface/ada-tree.h (DECL_TAFT_TYPE_P): New flag.
3634 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Incomplete_Type>: Set it
3635 if this is a Taft amendment type and the full declaration is available.
3636 * gcc-interface/trans.c (process_type): Likewise.
3637 If there is an old type, mark the new one as used if DECL_TAFT_TYPE_P.
3638 (process_freeze_entity): Likewise.
3639 * gcc-interface/utils.c (dummy_global): New static variable.
3640 (gnat_write_global_declarations): If there are types declared as used
3641 at the global level, insert them in the global hash table.
3643 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
3645 * gcc-interface/gigi.h (record_builtin_type): Add ARTIFICIAL_P param.
3646 * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
3647 declaration of an array type, then set DECL_ORIGINAL_TYPE to a distinct
3649 (record_builtin_type): Add ARTIFICIAL_P parameter. Set DECL_ARTIFICIAL
3650 flag of the type accordingly.
3651 * gcc-interface/trans.c (gigi): Adjust calls to record_builtin_type.
3653 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
3655 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
3656 finalizing types when updating the pointers to the designated type.
3657 <all>: Finalize the deferred types even if we didn't defer processing
3658 of incomplete types in this invocation.
3660 2011-04-01 Olivier Hainque <hainque@adacore.com>
3661 Nicolas Setton <setton@adacore.com>
3662 Eric Botcazou <ebotcazou@adacore.com>
3664 * gcc-interface/misc.c (gnat_descriptive_type): New function.
3665 (LANG_HOOKS_DESCRIPTIVE_TYPE): Redefine to gnat_descriptive_type.
3667 2011-03-28 Kai Tietz <ktietz@redhat.com>
3669 * gcc-interface/Makefile.in (SO_LIB): Handle multilib build for native
3671 (EH_MECHANISM): Use GCC exception mechanism for native Windows targets.
3672 * system-mingw.ads (System): Change ZCX_By_Default default to True.
3674 * raise-gcc.c (PERSONALITY_FUNCTION): Add prototype.
3676 2011-03-28 Tristan Gingold <gingold@adacore.com>
3679 * gcc-interface/Make-lang.in (ada/b_gnat1.adb): Replace ada/b_gnat1.c.
3680 Use ada output of gnatbind.
3681 (ada/b_gnatb.adb): Ditto.
3682 (ada/b_gnat1.o, ada/b_gnatb.o): New rules.
3683 (ada.mostlyclean, ada.stage1)
3684 (ada.stage2, ada.stage3, ada.stage4, ada.stageprofile)
3685 (ada.stagefeedback): Adjust.
3686 * gcc-interface/Makefile.in (b_gnatl.adb): Replace b_gnatl.c.
3687 Use ada output of gnatbind.
3688 (b_gnatm.adb): Ditto.
3689 (b_gnatl.o, b_gnatm.o): New rules.
3691 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
3693 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
3694 for the padded type built to support a specified size or alignment.
3696 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
3698 * gcc-interface/gigi.h (finalize_from_with_types): Adjust comment.
3699 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
3700 unconditionally to the end of the unit when the designated type is
3702 <all>: Rename local variable. Attempt to un-defer types only and do it
3703 for limited_with'ed types as well.
3704 (finalize_from_with_types): Adjust comment. Rename variable and tidy.
3705 * gcc-interface/trans.c (Compilation_Unit_to_gnu): Use GNAT_UNIT
3706 consistently and remove redundant call to finalize_from_with_types.
3708 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
3710 * inline.adb (Back_End_Cannot_Inline): Lift restriction on calls to
3711 subprograms without a previous spec declared in the same unit.
3712 * gcc-interface/trans.c (Compilation_Unit_to_gnu): Process inlined
3713 subprograms at the end of the unit instead of at the beginning.
3714 * gcc-interface/utils.c (create_subprog_decl): Check that the entity
3715 isn't public for the special handling of non-inline functions nested
3716 inside inline external functions.
3718 2011-03-25 Jeff Law <law@redhat.com>
3720 * gcc-interface/utils.c (def_fn_type): Add missing va_end.
3722 2011-03-24 Eric Botcazou <ebotcazou@adacore.com>
3724 * einfo.ads (Size_Depends_On_Discriminant): Adjust description.
3725 * layout.adb (Compute_Size_Depends_On_Discriminant): New procedure
3726 to compute Set_Size_Depends_On_Discriminant.
3727 (Layout_Type): Call it on array types in back-end layout mode.
3728 * sem_util.adb (Requires_Transient_Scope): Return true for array
3729 types only if the size depends on the value of discriminants.
3730 * gcc-interface/utils2.c (build_binary_op) <MODIFY_EXPR>: Use the RHS
3731 type if the RHS is a call to a function that returns an unconstrained
3732 type with default discriminant.
3734 2011-03-24 Eric Botcazou <ebotcazou@adacore.com>
3736 * gcc-interface/trans.c (gnat_to_gnu): Remove obsolete case of
3737 non-conversion to the nominal result type at the end.
3739 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
3741 * gcc-interface/trans.c (create_temporary): New function taken from...
3742 (create_init_temporary): ...here. Call it.
3743 (call_to_gnu): Create the temporary for the return value early, if any.
3744 Create it for a function with copy-in/copy-out parameters if there is
3745 no target; in other cases of copy-in/copy-out, use another temporary.
3746 Push the new binding level lazily. Add and rename local variables.
3748 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
3750 * gcc-interface/decl.c (validate_size): Improve comments and tweak
3752 (set_rm_size): Likewise.
3754 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
3756 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
3757 for the padded type built in order to support a specified alignment.
3758 Fix incorrect formatting.
3760 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
3763 * gcc-interface/decl.c (elaborate_expression_1): Localize GNU_DECL.
3765 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
3767 * gcc-interface/decl.c (components_to_record): Add REORDER parameter,
3768 rename DEBUG_INFO_P into DEBUG_INFO and move P_GNU_REP_LIST parameter
3769 to the end of the list. Adjust recursive call. Rename local variable.
3770 If REORDER is true, reorder components of the record type.
3771 (gnat_to_gnu_entity): Pass OK_To_Reorder_Components flag as argument to
3772 components_to_record and adjust the parameter list.
3774 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
3776 * gcc-interface/decl.c (elaborate_expression_1): When optimization is
3777 disabled, use the variable for bounds of loop iteration scheme.
3779 2011-03-21 Kai Tietz <ktietz@redhat.com>
3782 * gcc-interface/utils.c (gnat_internal_attribute_table): Add column.
3784 2011-03-17 Eric Botcazou <ebotcazou@adacore.com>
3786 * gcc-interface/decl.c (elaborate_expression_1): Try harder to find
3787 out whether the expression is read-only. Short-circuit placeholder
3788 case and rename a couple of local variables.
3790 2011-03-17 Eric Botcazou <ebotcazou@adacore.com>
3792 * gcc-interface/gigi.h (smaller_form_type_p): Declare.
3793 * gcc-interface/trans.c (smaller_form_type_p): Make global and move...
3794 * gcc-interface/utils.c (smaller_form_type_p): ...to here.
3795 (convert): Deal with conversions from a smaller form type specially.
3797 2011-02-14 Eric Botcazou <ebotcazou@adacore.com>
3799 * gcc-interface/misc.c (gnat_init_options): Do not concatenate -I and
3800 its argument, except for the special -I- switch.
3802 2011-02-12 Gerald Pfeifer <gerald@pfeifer.com>
3804 * gnat_ugn.texi (Compiling Different Versions of Ada): Update link to
3807 2011-02-08 Eric Botcazou <ebotcazou@adacore.com>
3809 * gcc-interface/Makefile.in (x86-64 darwin): Handle multilibs.
3811 2011-02-03 Eric Botcazou <ebotcazou@adacore.com>
3813 * gcc-interface/gigi.h (fill_vms_descriptor): Take GNU_TYPE instead of
3815 * gcc-interface/utils2.c (fill_vms_descriptor): Move from here to...
3816 * gcc-interface/utils.c (fill_vms_descriptor): ...here. Take GNU_TYPE
3817 instead of GNAT_FORMAL. Protect the expression against multiple uses.
3818 Do not generate the check directly, instead instantiate the template
3819 check present in the descriptor.
3820 (make_descriptor_field): Move around.
3821 (build_vms_descriptor32): Build a template check in the POINTER field.
3822 (build_vms_descriptor): Remove useless suffixes.
3823 * gcc-interface/trans.c (call_to_gnu): Adjust fill_vms_descriptor call.
3825 2011-01-26 Eric Botcazou <ebotcazou@adacore.com>
3828 * targext.c: Include target files if IN_RTS is defined.
3830 2011-01-26 Richard Guenther <rguenther@suse.de>
3833 * targext.c: Include config.h.
3834 * gcc-interface/Make-lang.in (ada/targext.o): Add $(CONFIG_H)
3837 2011-01-04 Pascal Obry <obry@adacore.com>
3838 Eric Botcazou <ebotcazou@adacore.com>
3840 * gcc-interface/decl.c: Disable Stdcall convention handling for 64-bit.
3842 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
3844 * gcc-interface/trans.c (Case_Statement_to_gnu): Put the SLOC of the
3845 end-of-case on the end label and its associated gotos, if any.
3847 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
3849 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Evaluate the
3850 expressions of the parameter cache within the statement group of
3853 2011-01-04 Olivier Hainque <hainque@adacore.com>
3854 Eric Botcazou <ebotcazou@adacore.com>
3856 * gcc-interface/trans.c (BLOCK_SOURCE_END_LOCATION): Provide default.
3857 (set_end_locus_from_node): New function.
3858 (Subprogram_Body_to_gnu): Use it to mark both the inner BIND_EXPR we
3859 make and the function end_locus.
3860 (Compilation_Unit_to_gnu): Call it instead of a straight Sloc_to_locus
3861 for the elaboration subprogram.
3862 (set_gnu_expr_location_from_node) <default case>: Use it to attempt to
3863 set the end_locus of the expression as well.
3865 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
3868 * gcc-interface/trans.c (Identifier_to_gnu): In SJLJ mode, do not make
3869 variables that are referenced in exception handlers volatile.
3873 Copyright (C) 2011 Free Software Foundation, Inc.
3875 Copying and distribution of this file, with or without modification,
3876 are permitted in any medium without royalty provided the copyright
3877 notice and this notice are preserved.
3879 * gnat_rm.texi: Ramification of pragma Eliminate documentation
3880 - fix bugs in the description of Source_Trace;
3881 - get rid of UNIT_NAME;
3883 2011-08-02 Javier Miranda <miranda@adacore.com>
3886 (Build_Dispatching_Requeue): Adding support for VM targets
3887 since we cannot directly reference the Tag entity.
3888 * exp_sel.adb (Build_K): Adding support for VM targets.
3889 (Build_S_Assignment): Adding support for VM targets.
3891 (Default_Prim_Op_Position): In VM targets do not restrict availability
3892 of predefined interface primitives to compiling in Ada 2005 mode.
3893 (Is_Predefined_Interface_Primitive): In VM targets this service is not
3894 restricted to compiling in Ada 2005 mode.
3895 (Make_VM_TSD): Generate code that declares and initializes the OSD
3896 record. Needed to support dispatching calls through synchronized
3899 (Make_Predefined_Primitive_Specs): Enable generation of predefined
3900 primitives associated with synchronized interfaces.
3901 (Make_Predefined_Primitive_Bodies): Enable generation of predefined
3902 primitives associated with synchronized interfaces.
3904 2011-08-02 Yannick Moy <moy@adacore.com>
3906 * par-ch11.adb (P_Handled_Sequence_Of_Statements): mark a sequence of
3907 statements hidden in SPARK if preceded by the HIDE directive
3908 (Parse_Exception_Handlers): mark each exception handler in a sequence of
3909 exception handlers as hidden in SPARK if preceded by the HIDE directive
3910 * par-ch6.adb (P_Subprogram): mark a subprogram body hidden in SPARK
3911 if starting with the HIDE directive
3912 * par-ch7.adb (P_Package): mark a package body hidden in SPARK if
3913 starting with the HIDE directive; mark the declarations in a private
3914 part as hidden in SPARK if the private part starts with the HIDE
3916 * restrict.adb, restrict.ads
3917 (Set_Hidden_Part_In_SPARK): record a range of slocs as hidden in SPARK
3918 (Is_In_Hidden_Part_In_SPARK): new function which returns whether its
3919 argument node belongs to a part which is hidden in SPARK
3920 (Check_SPARK_Restriction): do not issue violations on nodes in hidden
3921 parts in SPARK; protect the possibly costly call to
3922 Is_In_Hidden_Part_In_SPARK by a check that the SPARK restriction is on
3923 * scans.ads (Token_Type): new value Tok_SPARK_Hide in enumeration
3924 * scng.adb (Accumulate_Token_Checksum_GNAT_6_3,
3925 Accumulate_Token_Checksum_GNAT_5_03): add case for new token
3927 (Scan): recognize special comment starting with '#' and followed by
3928 SPARK keyword "hide" as a HIDE directive.
3930 2011-08-02 Yannick Moy <moy@adacore.com>
3932 * types.ads, erroutc.ads: Minor reformatting.
3934 2011-08-02 Vincent Celier <celier@adacore.com>
3936 * link.c: Add response file support for cross platforms.
3938 2011-08-02 Ed Schonberg <schonberg@adacore.com>
3940 * sem_aggr.adb (Resolve_Array_Aggregate): when copying the expression
3941 in an association, set parent field of copy before partial analysis.
3942 * sem_res.adb (Resolve_Slice): create reference to itype only when
3943 expansion is enabled.
3945 2011-08-02 Yannick Moy <moy@adacore.com>
3947 * einfo.adb, einfo.ads (Body_Is_In_ALFA, Set_Body_Is_In_ALFA): get/set
3948 for new flag denoting which subprogram bodies are in ALFA
3949 * restrict.adb, sem_ch7.adb: Update comment
3950 * sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
3951 sem_ch9.adb, sem_res.adb: Add calls to
3952 Current_Subprogram_Body_Is_Not_In_ALFA on unsupported constructs.
3953 * sem_ch6.adb (Analyze_Function_Return): add calls to
3954 Current_Subprogram_Body_Is_Not_In_ALFA on return statement in the
3955 middle of the body, and extended return.
3956 (Check_Missing_Return): add calls to Set_Body_Is_In_ALFA with argument
3957 False when missing return.
3958 (Analyze_Subprogram_Body_Helper): initialize the flag Body_Is_In_ALFA
3959 to True for subprograms whose spec is in ALFA. Remove later on the flag
3960 on the entity used for a subprogram body when there exists a separate
3962 * sem_util.adb, sem_util.ads (Current_Subprogram_Body_Is_Not_In_ALFA):
3963 if Current_Subprogram is not Empty, set its flag Body_Is_In_ALFA to
3964 False, otherwise do nothing.
3966 2011-08-02 Robert Dewar <dewar@adacore.com>
3968 * inline.adb, stand.ads, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
3970 2011-08-02 Yannick Moy <moy@adacore.com>
3972 * sem_ch4.ads: minor formatting.
3974 2011-08-02 Yannick Moy <moy@adacore.com>
3976 * sem_aggr.adb, err_vars.ads, sem_ch3.adb, sem_ch5.adb, sem_ch9.adb,
3977 debug.adb, sem_util.adb, sem_res.adb, sem_attr.adb, gnat1drv.adb,
3978 errout.adb, errout.ads, exp_ch6.adb, sem_ch4.adb, restrict.adb,
3979 restrict.ads, sem_ch6.adb, sem_ch8.adb, sem_ch11.adb,
3980 opt.ads: cleanup of SPARK mode
3982 2011-08-02 Yannick Moy <moy@adacore.com>
3984 * cstand.adb (Create_Standard): sets Is_In_ALFA component of standard
3986 * einfo.adb, einfo.ads (Is_In_ALFA): add flag for all entities
3987 (Is_In_ALFA, Set_Is_In_ALFA): new subprograms to access flag Is_In_ALFA
3989 (Analyze_Object_Declaration): set Is_In_ALFA flag for objects
3990 (Constrain_Enumeration): set Is_In_ALFA flag for enumeration subtypes
3991 (Constrain_Integer): set Is_In_ALFA flag for integer subtypes
3992 (Enumeration_Type_Declaration): set Is_In_ALFA flag for enumeration
3994 (Set_Scalar_Range_For_Subtype): unset Is_In_ALFA flag for subtypes with
3996 * sem_ch6.adb (Analyze_Return_Type): unset Is_In_ALFA flag for
3997 functions whose return type is not in ALFA.
3998 (Analyze_Subprogram_Specification): set Is_In_ALFA flag for subprogram
4000 (Process_Formals): unset Is_In_ALFA flag for subprograms if a
4001 parameter's type is not in ALFA.
4002 * stand.ads (Standard_Type_Is_In_ALFA): array defines which standard
4005 2011-08-02 Ed Schonberg <schonberg@adacore.com>
4007 * sem_ch6 (Analyze_Expression_Function): treat the function as
4008 Inline_Always, and introduce a subprogram declaration for it when it is
4010 * inline.adb (Add_Inlined_Body): recognize bodies that come from
4011 expression functions, so that the back-end can determine whether they
4012 can in fact be inlined.
4013 * sem_util.adb (Is_Expression_Function): predicate to determine whether
4014 a function body comes from an expression function.
4016 2011-08-02 Gary Dismukes <dismukes@adacore.com>
4018 * sem_ch6.adb (Check_Conformance): Revise the check for nonconforming
4019 null exclusions to test Can_Never_Be_Null on the anonymous access types
4020 of the formals rather than testing the formals themselves. Exclude this
4021 check in cases where the Old_Formal is marked as a controlling formal,
4022 to avoid issuing spurious errors for bodies completing dispatching
4023 operations (due to the flag not getting set on controlling access
4024 formals in body specs).
4025 (Find_Corresponding_Spec): When checking full and subtype conformance of
4026 subprogram bodies in instances, pass Designated and E in that order, for
4027 consistency with the expected order of the formals (New_Id followed by
4030 2011-08-02 Robert Dewar <dewar@adacore.com>
4032 * sem_ch8.adb: Minor reformatting.
4034 2011-08-02 Ed Schonberg <schonberg@adacore.com>
4036 * sem_ch8.adb (Analyze_Subprogram_Renaming): new procedure
4037 Check_Class_Wide_Actual, to implement AI05-0071, on defaulted
4038 primitive operations of class-wide actuals.
4040 2011-08-02 Javier Miranda <miranda@adacore.com>
4042 * exp_atag.ads, exp_atag.adb
4043 (Build_Common_Dispatching_Select_Statements): Remove argument Loc
4044 since its value is implicitly passed in argument Typ.
4045 * exp_disp.adb (Make_Disp_Conditional_Select_Body,
4046 Make_Disp_Timed_Select_Body): Remove Loc in calls to routine
4047 Build_Common_Dispatching_Select_Statements.
4049 2011-08-02 Robert Dewar <dewar@adacore.com>
4051 * sem_ch3.adb, exp_atag.ads, get_scos.adb, get_scos.ads,
4052 exp_disp.adb, lib-xref.adb, lib-xref.ads: Update comments.
4055 2011-08-02 Robert Dewar <dewar@adacore.com>
4057 * sem_res.adb: Minor reformatting.
4058 * sem_prag.adb: Minor reformatting.
4060 2011-08-02 Javier Miranda <miranda@adacore.com>
4062 * exp_atag.adb, exp_atags.ads
4063 (Build_Common_Dispatching_Select_Statement): Replace argument DT_Ptr
4064 by the tagged type Entity. Required to use this routine in the VM
4065 targets since we do not have available the Tag entity in the VM
4068 (Expand_N_Subprogram_Body): Do not invoke Build_VM_TSDs if package
4069 Ada.Tags has not been previously loaded.
4071 (Expand_N_Package_Declaration, Expand_N_Package_Body): Do not invoke
4072 Build_VM_TSDs if package Ada.Tags has not been previously loaded.
4074 (Enclosing_Dynamic_Scope): Add missing support to handle the full
4075 view of enclosing scopes. Required to handle enclosing scopes that
4076 are synchronized types whose full view is a task type.
4078 (Build_VM_TSDs): Minor code improvement to avoid generating and
4079 analyzing lists with empty nodes.
4080 (Make_Disp_Asynchronous_Select_Body): Add support for VM targets.
4081 (Make_Disp_Conditional_Select_Body): Add support for VM targets.
4082 (Make_Disp_Get_Prim_Op_Kind): Add support for VM targets.
4083 (Make_Disp_Timed_Select_Body): Add support for VM targets.
4084 (Make_Select_Specific_Data_Table): Add support for VM targets.
4085 (Make_VM_TSD): Generate code to initialize the SSD structure of
4088 2011-08-02 Yannick Moy <moy@adacore.com>
4090 * lib-writ.adb (Write_ALI): when ALFA mode is set, write local
4091 cross-references section in ALI.
4092 * lib-xref.adb, lib-xref.ads (Xref_Entry): add components Sub
4093 (enclosing subprogram), Slc (location of Sub) and Sun (unit number of
4095 (Enclosing_Subprogram_Or_Package): new function to return the enclosing
4096 subprogram or package entity of a node
4097 (Is_Local_Reference_Type): new function returns True for references
4098 selected in local cross-references.
4099 (Lt): function extracted from Lt in Output_References
4100 (Write_Entity_Name): function extracted from Output_References
4101 (Generate_Definition): generate reference with type 'D' for definition
4102 of objects (object declaration and parameter specification), with
4103 appropriate locations and units, for use in local cross-references.
4104 (Generate_Reference): update fields Sub, Slc and Sun. Keep newly created
4105 references of type 'I' for initialization in object definition.
4106 (Output_References): move part of function Lt and procedure
4107 Write_Entity_Name outside of the body. Ignore references of types 'D'
4108 and 'I' introduced for local cross-references.
4109 (Output_Local_References): new procedure to output the local
4110 cross-references sections.
4111 (Lref_Entity_Status): new array defining whether an entity is a local
4112 * sem_ch3.adb (Analyze_Object_Declaration): call Generate_Reference
4113 with 'I' type when initialization expression is present.
4114 * get_scos.adb, get_scos.ads: Correct comments and typos
4116 2011-08-02 Javier Miranda <miranda@adacore.com>
4118 * exp_ch6.adb (Expand_N_Subprogram_Body): Enable generation of TSDs in
4120 * exp_ch7.adb (Expand_N_Package_Body): Enable generation of TSDs in
4122 * exp_disp.adb (Build_VM_TSDs): No action needed if the runtime has no
4125 2011-08-02 Vincent Celier <celier@adacore.com>
4127 * prj-nmsc.adb (File_Found): New components Excl_File and Excl_Line
4128 (No_Space_Img): New function
4129 (Find_Excluded_Sources): When reading from a file, record the file name
4130 and the line number for each excluded source.
4131 (Mark_Excluded_Sources): When reporting an error, if the excluded
4132 sources were read from a file, include file name and line number in
4135 2011-08-02 Ed Schonberg <schonberg@adacore.com>
4137 * sem_res.adb (Resolve_Call): implement rule in RM 12.5.1 (23.3/2).
4139 2011-08-02 Robert Dewar <dewar@adacore.com>
4141 * exp_ch7.adb exp_ch6.adb, exp_disp.adb: Minor reformatting
4143 2011-08-02 Javier Miranda <miranda@adacore.com>
4145 * exp_ch6.adb (Expand_N_Subprogram_Body): Temporarily restrict the
4146 generation of TSDs to the DOTNET compiler.
4147 * exp_ch7.adb (Expand_N_Package_Body): Temporarily restrict the
4148 generation of TSDs to the DOTNET compiler.
4150 2011-08-02 Javier Miranda <miranda@adacore.com>
4152 * exp_disp.ads (Build_VM_TSDs): Build the runtime Type Specific Data
4153 record of all the tagged types declared inside library level package
4154 declarations, library level package bodies or library level subprograms.
4155 * exp_disp.adb (Make_VM_TSD): New subprogram that builds the TSD
4156 associated with a given tagged type.
4157 (Build_VM_TSDs): New subprogram.
4158 * exp_ch6.adb (Expand_N_Subprogram_Body): Generate TSDs records of main
4159 compilation units that are subprograms.
4160 * exp_ch7.adb (Expand_N_Package_Body): Generate TSDs of main
4161 compilation units that are package bodies.
4162 (Expand_N_Package_Declaration): Generate TSDs of the main compilation
4163 units that are a package declaration or a package instantiation.
4164 * exp_intr.adb (Expand_Dispatching_Constructor_Call): Minor code
4165 reorganization to improve the error generated by the frontend when the
4166 function Ada.Tags.Secondary_Tag is not available.
4167 * rtsfind.ads (RE_Register_TSD): New runtime entity.
4168 * exp_ch4.adb (Expand_N_Type_Conversion): Minor code cleanup.
4170 2011-08-02 Javier Miranda <miranda@adacore.com>
4172 * exp_disp.adb (Make_DT): Generate call to Check_TSD in Ada 2005 mode.
4174 2011-08-02 Robert Dewar <dewar@adacore.com>
4176 * s-imenne.ads: Minor reformatting.
4178 2011-08-02 Robert Dewar <dewar@adacore.com>
4180 * a-stunau.ads: Add pragma Suppress_Initialization for Big_String
4181 * freeze.adb (Warn_Overlay): Don't warn if initialization suppressed
4182 * s-stalib.ads: Add pragma Suppress_Initialization for Big_String
4184 2011-08-02 Robert Dewar <dewar@adacore.com>
4186 * einfo.ads (Materialize_Entity): Document this is only for renamings
4187 * exp_ch3.adb (Expand_N_Object_Declaration): Make sure we generate
4188 required debug information in the case where we transform the object
4189 declaration into a renaming declaration.
4190 * exp_ch4.adb (Expand_Concatenate): Generate debug info for result
4192 * exp_dbug.ads (Debug_Renaming_Declaration): Document setting of
4195 2011-08-02 Robert Dewar <dewar@adacore.com>
4197 * einfo.ads, einfo.adb (Suppress_Initialization): Replaces
4198 Suppress_Init_Procs.
4199 * exp_ch3.adb, exp_disp.adb, freeze.adb: Use
4200 Suppress_Initialization/Initialization_Suppressed.
4201 * gnat_rm.texi: New documentation for pragma Suppress_Initialization
4202 * sem_aux.ads, sem_aux.adb (Initialization_Suppressed): New function
4203 * sem_dist.adb: Use Suppress_Initialization/Initialization_Suppressed
4204 * sem_prag.adb: New processing for pragma Suppress_Initialization.
4206 2011-08-02 Robert Dewar <dewar@adacore.com>
4208 * gnat_rm.texi, a-tags.ads, sem_prag.adb, sem_ch12.adb, exp_disp.adb:
4211 2011-08-02 Ed Schonberg <schonberg@adacore.com>
4213 * sem_prag.adb (Chain_PPC): Implement AI04-0230: null procedures can
4214 only have inheritable classwide pre/postconditions.
4216 2011-08-02 Javier Miranda <miranda@adacore.com>
4218 * a-tags.ads, a-tags.adb (Check_TSD): New subprogram.
4219 * rtsfind.ads (RE_Check_TSD): New runtime entity.
4220 * exp_disp.adb (Make_DT): Generate call to the new runtime routine that
4221 checks if the external tag of a type is the same as the external tag
4222 of some other declaration.
4224 2011-08-02 Thomas Quinot <quinot@adacore.com>
4226 * s-taskin.ads: Minor reformatting.
4228 2011-08-02 Emmanuel Briot <briot@adacore.com>
4230 * g-comlin.adb (Display_Help): swap the order in which it prints the
4231 short help and the general usage.
4233 2011-08-02 Ed Schonberg <schonberg@adacore.com>
4235 * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration): copy properly
4236 the aspect declarations and attach them to the generic copy for
4237 subsequent analysis.
4238 (Analyze_Subprogram_Instantiation): copy explicitly the aspect
4239 declarations of the generic tree to the new subprogram declarations.
4240 * sem_attr.adb (Check_Precondition_Postcondition): recognize
4241 conditions that apply to a subprogram instance.
4243 2011-08-02 Robert Dewar <dewar@adacore.com>
4245 * gnat_rm.texi: Clarify doc on pragma Source_File_Name[_Project].
4247 2011-08-02 Ed Schonberg <schonberg@adacore.com>
4249 * sem_ch3.adb (Derived_Type_Declaration): When checking that a untagged
4250 private type with a tagged full view is not derived in the immediate
4251 scope of the partial view, (RM 7.3 (7)) use the scope of the base type.
4253 2011-08-02 Robert Dewar <dewar@adacore.com>
4255 * exp_ch4.adb: Minor reformatting.
4257 2011-08-02 Ed Schonberg <schonberg@adacore.com>
4259 * sem_ch5.adb (Analyze_Loop_Statement): If the iteration scheme is an
4260 Ada2012 iterator, the loop will be rewritten during expansion into a
4261 while loop with a cursor and an element declaration. Do not analyze the
4262 body in this case, because if the container is for indefinite types the
4263 actual subtype of the elements will only be determined when the cursor
4264 declaration is analyzed.
4266 2011-08-02 Arnaud Charlet <charlet@adacore.com>
4268 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Ignore
4269 size/alignment related attributes in CodePeer_Mode.
4271 2011-08-02 Gary Dismukes <dismukes@adacore.com>
4273 * sem_ch3.adb (Check_Ops_From_Incomplete_Type): Remove call to
4274 Prepend_Element, since this can result in the operation getting the
4275 wrong slot in the full type's dispatch table if the full type has
4276 inherited operations. The incomplete type's operation will get added
4277 to the proper position in the full type's primitives
4278 list later in Sem_Disp.Check_Operation_From_Incomplete_Type.
4279 (Process_Incomplete_Dependents): Add Is_Primitive test when checking for
4280 dispatching operations, since there are cases where nonprimitive
4281 subprograms can get added to the list of incomplete dependents (such
4282 as subprograms in nested packages).
4283 * sem_ch6.adb (Process_Formals): First, remove test for being in a
4284 private part when determining whether to add a primitive with a
4285 parameter of a tagged incomplete type to the Private_Dependents list.
4286 Such primitives can also occur in the visible part, and should not have
4287 been excluded from being private dependents.
4288 * sem_ch7.adb (Uninstall_Declarations): When checking the rule of
4289 RM05-3.10.1(9.3/2), test that a subprogram in the Private_Dependents
4290 list of a Taft-amendment incomplete type is a primitive before issuing
4291 an error that the full type must appear in the same unit. There are
4292 cases where nonprimitives can be in the list (such as subprograms in
4294 * sem_disp.adb (Derives_From): Use correct condition for checking that
4295 a formal's type is derived from the type of the corresponding formal in
4296 the parent subprogram (the condition was completely wrong). Add
4297 checking that was missing for controlling result types being derived
4298 from the result type of the parent operation.
4300 2011-08-02 Yannick Moy <moy@adacore.com>
4302 * errout.adb (First_Node): minor renaming
4303 * restrict.adb (Check_Formal_Restriction): put restriction warning on
4306 2011-08-02 Yannick Moy <moy@adacore.com>
4308 * sem_res.adb (Resolve_Logical_Op): ensure N is a binary operator
4309 before accessing operands.
4310 * sem_util.adb (Is_SPARK_Initialization_Expr): follow original nodes to
4311 decide whether an initialization expression respects SPARK rules, as
4312 the plain node is the expanded one. This allows for more valid warnings
4314 * gnat_rm.texi: Minor update.
4316 2011-08-02 Arnaud Charlet <charlet@adacore.com>
4318 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Revert
4321 2011-08-02 Robert Dewar <dewar@adacore.com>
4323 * sem_ch3.adb, sem_ch4.adb: Minor reformatting.
4325 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
4327 * exp_ch5.adb (Expand_Iterator_Loop): Reformatting. Wrap the original
4328 loop statements and the element renaming declaration with a block when
4329 the element type is controlled.
4331 2011-08-02 Yannick Moy <moy@adacore.com>
4333 * sinfo.ads: Minor formatting.
4335 2011-08-02 Ed Schonberg <schonberg@adacore.com>
4337 * sem_aggr.adb (Add_Association): if the association has a box and no
4338 expression, use the Sloc of the aggregate itself for the new
4340 * errout.adb (First_Node): Exclude nodes with no Sloc, and always use
4343 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
4345 * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and refactoring.
4346 When a container is provided via a function call, generate a renaming
4347 of the function result. This avoids the creation of a transient scope
4348 and the premature finalization of the container.
4349 * exp_ch7.adb (Is_Container_Cursor): Removed.
4350 (Wrap_Transient_Declaration): Remove the supression of the finalization
4351 of the list controller when the declaration denotes a container cursor,
4354 2011-08-02 Yannick Moy <moy@adacore.com>
4356 * restrict.adb (Check_Formal_Restriction): only issue a warning if the
4357 node is from source, instead of the original node being from source.
4359 (Resolve_Array_Aggregate): refine the check for a static expression, to
4360 recognize also static ranges
4361 * sem_ch3.adb, sem_ch3.ads (Analyze_Component_Declaration,
4362 Array_Type_Declaration): postpone the test for the type being a subtype
4363 mark after the type has been resolved, so that component-selection and
4364 expanded-name are discriminated.
4365 (Make_Index, Process_Range_Expr_In_Decl): add a parameter In_Iter_Schm
4366 to distinguish the case of an iteration scheme, so that an error is
4367 issed on a non-static range in SPARK except in an iteration scheme.
4368 * sem_ch5.adb (Analyze_Iteration_Scheme): call Make_Index with
4369 In_Iter_Schm = True.
4370 * sem_ch6.adb (Analyze_Subprogram_Specification): refine the check for
4371 user-defined operators so that they are allowed in renaming
4373 (Find_Selected_Component): refine the check for prefixing of operators
4374 so that they are allowed in renaming. Move the checks for restrictions
4375 on selector name after analysis discriminated between
4376 component-selection and expanded-name.
4377 * sem_res.adb (Resolve_Op_Concat_Arg): do not issue a warning on
4378 concatenation argument of string type if it is static.
4379 * sem_util.adb, sem_util.ads
4380 (Check_Later_Vs_Basic_Declarations): add a new function
4381 Is_Later_Declarative_Item to decice which declarations are allowed as
4382 later items, in the two different modes Ada 83 and SPARK. In the SPARK
4383 mode, add that renamings are considered as later items.
4384 (Enclosing_Package): new function to return the enclosing package
4385 (Enter_Name): correct the rule for homonyms in SPARK
4386 (Is_SPARK_Initialization_Expr): default to returning True on nodes not
4387 from source (result of expansion) to avoid issuing wrong warnings.
4389 2011-08-02 Ed Schonberg <schonberg@adacore.com>
4391 * errout.adb: On anything but an expression First_Node returns its
4394 2011-08-02 Pascal Obry <obry@adacore.com>
4396 * prj-proc.adb, make.adb, makeutl.adb: Minor reformatting.
4398 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
4400 * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and reorganization.
4401 Set the associated loop as the related expression of internally
4403 * exp_ch7.adb (Is_Container_Cursor): New routine.
4404 (Wrap_Transient_Declaration): Supress the finalization of the list
4405 controller when the declaration denotes a container cursor.
4407 2011-08-02 Yannick Moy <moy@adacore.com>
4409 * opt.ads (SPARK_Mode): update comment, SPARK_Mode only set through
4411 * par-ch3.adb (P_Delta_Constraint): remove check in SPARK mode that the
4412 expression is a simple expression. This check cannot be performed in
4413 the semantics, so just drop it.
4414 (P_Index_Or_Discriminant_Constraint): move check that the index or
4415 discriminant is a subtype mark to Analyze_Subtype_Declaration in the
4416 semantics. Other cases were previously checked in the semantics.
4417 * par-ch4.adb (P_Name): move checks that a selector name is not
4418 character literal or an operator symbol to Find_Selected_Component in
4420 * par-ch5.adb (Parse_Decls_Begin_End): move check that basic
4421 declarations are not placed after later declarations in a separate
4422 procedure in Sem_Util (possibly not the best choice?), to be used both
4423 during parsing, for Ada 83 mode, and during semantic analysis, for
4425 * par-endh.adb (Check_End): move check that end label is not missing
4426 to Process_End_Label in the semantics
4427 * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): remove
4428 the special case for SPARK restriction
4429 * par.adb: use and with Sem_Util, for use in Parse_Decls_Begin_End
4430 * restrict.adb, restrict.ads (Check_Formal_Restriction): add a
4431 parameter Force to issue the error message even on internal node (used
4432 for generated end label). Call Check_Restriction to check when an error
4433 must be issued. In SPARK mode, issue an error message even if the
4434 restriction is not set.
4435 (Check_Restriction): new procedure with an additional out parameter to
4436 inform the caller that a message has been issued
4437 * sem_aggr.adb: Minor modification of message
4438 * sem_attr.adb (Analyze_Attribute): call Check_Formal_Restriction
4439 instead of issuing an error message directly
4440 * sem_ch3.adb (Analyze_Declarations): move here the check that basic
4441 declarations are not placed after later declarations, by calling
4442 Check_Later_Vs_Basic_Declarations
4443 (Analyze_Subtype_Declaration): move here the check that an index or
4444 discriminant constraint must be a subtype mark. Change the check that
4445 a subtype of String must start at one so that it works on subtype marks.
4446 * sem_ch4.adb (Analyze_Call): move here the check that a named
4447 association cannot follow a positional one in a call
4448 * sem_ch5.adb (Check_Unreachable_Code): call Check_Formal_Restriction
4449 instead of issuing an error message directly
4450 * sem_ch8.adb (Find_Selected_Component): move here the check that a
4451 selector name is not a character literal or an operator symbol. Move
4452 here the check that the prefix of an expanded name cannot be a
4453 subprogram or a loop statement.
4454 * sem_util.adb, sem_util.ads (Check_Later_Vs_Basic_Declarations): new
4455 procedure called from parsing and semantics to check that basic
4456 declarations are not placed after later declarations
4457 (Process_End_Label): move here the check that end label is not missing
4459 2011-08-02 Arnaud Charlet <charlet@adacore.com>
4461 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Ignore enum
4462 representation clause in codepeer mode, since it confuses CodePeer and
4463 does not bring useful info.
4465 2011-08-02 Ed Falis <falis@adacore.com>
4467 * init.c: initialize fp hw on MILS.
4469 2011-08-02 Ed Schonberg <schonberg@adacore.com>
4471 * errout.adb (First_Node): for bodies, return the node itself (small
4472 optimization). For other nodes, do not check source_unit if the node
4473 comes from Standard.
4475 2011-08-02 Robert Dewar <dewar@adacore.com>
4477 * exp_ch3.adb: Minor comment additions.
4478 * sem_ch13.adb: Minor reformatting.
4480 2011-08-02 Pascal Obry <obry@adacore.com>
4482 * make.adb, makeutl.adb: Removes some superfluous directory separator.
4484 2011-08-02 Robert Dewar <dewar@adacore.com>
4486 * sem_attr.adb: Minor reformatting.
4488 2011-08-02 Robert Dewar <dewar@adacore.com>
4490 * einfo.adb (Has_Default_Aspect): Replaces Has_Default_Value
4491 (Has_Default_Component_Value): Removed
4492 * einfo.ads Comment updates
4493 (Has_Default_Aspect): Replaces Has_Default_Value
4494 (Has_Default_Component_Value): Removed
4496 (Expand_N_Freeze_Entity): Handle Default[_Component]_Value aspects
4498 (Build_Array_Init_Proc): Handle Default_[Component_]Value aspects
4499 (Get_Simple_Init_Val): Handle Default_Value aspect
4500 (Needs_Simple_Initialization): Handle Default_Value aspect
4501 * exp_ch3.ads: Needs_Simple_Initialization
4502 * freeze.adb (Freeze_Entity): Handle Default_[Component_]Value aspect
4503 * par-prag.adb (Pragma_Default[_Component]Value) Removed
4505 (Analyze_Aspect_Specifications): Fix Default[_Component]_Value aspects
4506 * sem_prag.adb (Pragma_Default[_Component]Value) Removed
4507 * snames.ads-tmpl (Pragma_Default[_Component]Value) Removed
4509 2011-08-02 Ed Schonberg <schonberg@adacore.com>
4511 * sem_ch5.adb (Analyze_Iterator_Specification): use base type to locate
4512 package containing iteration primitives.
4513 exp_ch5.adb (Expand_Iterator_Loop): ditto.
4515 2011-08-02 Ed Schonberg <schonberg@adacore.com>
4517 * sem_ch5.adb (Analyze_Iteration_Scheme): For an Ada2012 iterator with
4518 "of", pre-analyze expression in case it is a function call with
4519 finalization actions that must be placed ahead of the loop.
4520 * exp_ch5.adb (Expand_Iterator_Loop): If condition_actions are present
4521 on an Ada2012 iterator, insert them ahead of the rewritten loop.
4523 2011-08-02 Geert Bosch <bosch@adacore.com>
4525 * cstand.adb (Create_Float_Types): Only consider C's long double for
4526 Long_Long_Float, in addition to double.
4528 2011-08-02 Robert Dewar <dewar@adacore.com>
4530 * sem_ch3.adb, sem_ch5.adb, sem_type.adb, switch-c.adb, switch-c.ads,
4531 sem_prag.adb, sem_util.adb, sem_util.ads, sem_res.adb, warnsw.ads,
4532 prepcomp.ads, cstand.adb, stand.ads, a-calfor.adb, s-stusta.adb:
4535 2011-08-02 Ed Schonberg <schonberg@adacore.com>
4537 * sem_attr.adb: handle properly 'Result when it is a prefix of an
4540 2011-08-02 Javier Miranda <miranda@adacore.com>
4542 * einfo.ads, einfo.adb
4543 (Original_Access_Type): Move this attribute to Node26 since there was
4544 an undocumented use of Node21 in E_Access_Subprogram_Type entities
4545 which causes conflicts and breaks the generation of the .NET compiler.
4546 (Interface_Name): Add missing documentation on JGNAT only uses of
4549 2011-08-02 Geert Bosch <bosch@adacore.com>
4551 * cstand.adb (Back_End_Float_Types): Use Elist instead of Nlist
4552 (Find_Back_End_Float_Type): Likewise
4553 (Create_Back_End_Float_Types): Likewise
4554 (Create_Float_Types): Likewise
4555 (Register_Float_Type): Likewise
4556 * sem_ch3.adb (Floating_Point_Type_Declaration): Use Elist instead of
4557 Nlist and split out type selection in new local Find_Base_Type function.
4558 * sem_prag.adb (Process_Import_Predefined_Type): Use Elist instead of
4560 * stand.ads (Predefined_Float_Types): Use Elist instead of Nlist
4562 2011-08-02 Robert Dewar <dewar@adacore.com>
4564 * inline.adb: Minor code reorganization (put Get_Code_Unit_Entity in
4566 * opt.ads: Minor comment change.
4567 * sem_ch12.adb: Minor code reorganization.
4569 2011-08-02 Gary Dismukes <dismukes@adacore.com>
4571 * sem_ch3.adb (Complete_Private_Subtype): Don't append the private
4572 subtype's list of rep items to the list on the full subtype in the case
4573 where the lists are the same.
4575 2011-08-02 Geert Bosch <bosch@adacore.com>
4577 * switch-c.adb (Free): New deallocation procedure to avoid implicitly
4578 using the one from System.Strings, which also deallocates all strings.
4580 2011-08-02 Geert Bosch <bosch@adacore.com>
4582 * gcc-interface/gigi.h, gcc-interface/misc.c (enumerate_modes): New
4584 * gcc-interface/Make-lang.in: Update dependencies.
4586 2011-08-02 Olivier Hainque <hainque@adacore.com>
4588 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Set the function
4591 2011-08-02 Javier Miranda <miranda@adacore.com>
4593 * sem_ch3.adb (Check_Anonymous_Access_Components): Create extra formals
4594 associated with anonymous access to subprograms.
4596 2011-08-02 Geert Bosch <bosch@adacore.com>
4599 (Preprocessing_Symbol_Defs): Move from Prepcomp.Symbol_Definitions.
4600 (Preprocessing_Symbol_Last): Move from Prepcomp.Last_Definition.
4601 * prepcomp.adb (Symbol_Definitions, Last_Definition): Move to opt.ads
4602 (Add_Symbol_Definition): Move to switch-c.adb
4603 (Process_Command_Line_Symbol_Definitions): Adjust references to above.
4604 * prepcomp.ads: Remove dependency on Ada.Unchecked_Deallocation.
4605 (Add_Symbol_Definition): Move to switch-c.adb.
4606 * sem_ch13.adb, sem_prag.adb: Add dependency on Warnsw.
4608 (Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
4610 * sem_warn.ads (Warn_On_Record_Holes, Warn_On_Overridden_Size,
4611 Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
4613 * switch-c.adb: Replace dependency on Prepcomp and Sem_Warn by Warnsw.
4614 (Add_Symbol_Definition): Moved from Prepcomp.
4615 * switch-c.ads: Update copyright notice. Use String_List instead of
4616 Argument_List, removing dependency on System.OS_Lib.
4618 2011-08-02 Yannick Moy <moy@adacore.com>
4620 * sem_ch3.adb (Analyze_Object_Declaration): issue an error in formal
4621 mode on initialization expression which does not respect SPARK
4623 * sem_util.adb, sem_util.ads (Is_SPARK_Initialization_Expr): determines
4624 if the tree referenced by its argument represents an initialization
4625 expression in SPARK, suitable for initializing an object in an object
4628 2011-08-02 Javier Miranda <miranda@adacore.com>
4630 * exp_ch9.adb (Expand_Access_Protected_Subprogram_Type): Link the
4631 internally generated access to subprogram with its associated protected
4633 * einfo.ads, einfo.adb (Original_Access_Type): New attribute.
4635 2011-08-02 Geert Bosch <bosch@adacore.com>
4637 * cstand.adb (Register_Float_Type): Print information about type to
4638 register, if the Debug_Flag_Dot_B is set.
4639 * debug.adb (Debug_Flag_Dot_B): Document d.b debug option.
4640 * rtsfind.ads (RE_Max_Base_Digits): New run time entity.
4641 * sem_ch3.adb (Floating_Point_Type_Declaration): Allow declarations
4642 with a requested precision of more than Max_Digits digits and no more
4643 than Max_Base_Digits digits, if a range specification is present and the
4644 Predefined_Float_Types list has a suitable type to derive from.
4645 * sem_ch3.adb (Rep_Item_Too_Early): Avoid generating error in the
4646 case of type completion with pragma Import
4648 (Process_Import_Predefined_Type): Processing to complete a type
4649 with pragma Import. Currently supports floating point types only.
4650 (Set_Convention_From_Pragma): Do nothing without underlying type.
4651 (Process_Convention): Guard against absence of underlying type,
4652 which may happen when importing incomplete types.
4653 (Process_Import_Or_Interface): Handle case of importing predefined
4654 types. Tweak error message.
4656 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
4658 * inline.adb (Add_Inlined_Body): Adjust check for library-level inlined
4659 functions to previous change. Reorganize code slightly.
4661 2011-08-02 Geert Bosch <bosch@adacore.com>
4663 * back_end.ads (Register_Type_Proc): New call back procedure type for
4664 allowing the back end to provide information about available types.
4665 (Register_Back_End_Types): New procedure to register back end types.
4666 * back_end.adb (Register_Back_End_Types): Call the back end to enumerate
4668 * cstand.adb (Back_End_Float_Types): New list for floating point types
4669 supported by the back end.
4670 (Build_Float_Type): Add extra parameter for Float_Rep_Kind.
4671 (Copy_Float_Type): New procedure to make new copies of predefined types.
4672 (Register_Float_Type): New call back procedure to populate the BEFT list
4673 (Find_Back_End_Float_Type): New procedure to find a BEFT by name
4674 (Create_Back_End_Float_Types): New procedure to populate the BEFT list.
4675 (Create_Float_Types): New procedure to create entities for floating
4676 point types predefined in Standard, and put these and any remaining
4677 BEFTs on the Predefined_Float_Types list.
4678 * stand.ads (Predefined_Float_Types): New list for predefined floating
4679 point types that do not have declarations in package Standard.
4681 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
4683 * inline.adb (Get_Code_Unit_Entity): New local function. Returns the
4684 entity node for the unit containing the parameter.
4685 (Add_Inlined_Body): Use it to find the unit containing the subprogram.
4686 (Add_Inlined_Subprogram): Likewise.
4687 * gcc-interface/Make-lang.in: Update dependencies.
4689 2011-08-02 Thomas Quinot <quinot@adacore.com>
4691 * s-stusta.adb (Print): Make sure Pos is always initialized to a
4694 2011-08-02 Geert Bosch <bosch@adacore.com>
4696 * a-calfor.adb (Image): Simplify, removing unnecessary uses of 'Image.
4698 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
4700 * sem_type.adb (Covers): Move trivial case to the top and reuse the
4701 computed value of Base_Type.
4703 2011-08-02 Yannick Moy <moy@adacore.com>
4705 * restrict.adb (Check_Restriction): issue an error for any use of
4706 class-wide, even if the No_Dispatch restriction is not set.
4707 * sem_aggr.adb: Correct typos in comments and messages in formal mode
4708 * sem_ch3.adb (Process_Full_View): issue an error in formal mode is,
4709 when completing a private extension, the type named in the private part
4710 is not the same as that named in the visible part.
4711 * sem_res.adb (Resolve_Call): issue an error in formal mode on the use
4712 of an inherited primitive operations of a tagged type or type extension
4713 that returns the tagged type.
4714 * sem_util.adb, sem_util.ads (Is_Inherited_Operation_For_Type): new
4715 function which returns True for an implicit operation inherited by the
4716 derived type declaration for the argument type.
4717 (Is_SPARK_Object_Reference): move to appropriate place in alphabetic
4720 2011-08-02 Ed Schonberg <schonberg@adacore.com>
4722 * sem_ch5.adb (Pre_Analyze_Range): new procedure extracted from
4723 Process_Bounds, to perform analysis with expansion of a range or an
4724 expression that is the iteration scheme for a loop.
4725 (Analyze_Iterator_Specification): If domain of iteration is given by a
4726 function call with a controlled result, as is the case if call returns
4727 a predefined container, ensure that finalization actions are properly
4729 * par-ch3.adb: accept Ada2012 iterator form in P_Discrete_Range.
4731 2011-08-02 Javier Miranda <miranda@adacore.com>
4733 * sem_ch5.adb (Analyze_Iteration_Scheme): Fix typo.
4734 * gcc-interface/Make-lang.in: Update dependencies.
4736 2011-08-02 Javier Miranda <miranda@adacore.com>
4738 * sem_util.ads, sem_util.adb (Is_Variable): Add a new formal to
4739 determine if the analysis is performed using N or Original_Node (N).
4740 * exp_util.adb (Side_Effect_Free): Code cleanup since the new
4741 functionality of routine Is_Variable avoids code duplication.
4742 * checks.adb (Determine_Range): Handle temporaries generated by
4743 Remove_Side_Effects.
4745 2011-08-02 Javier Miranda <miranda@adacore.com>
4747 * exp_ch4.adb (Expand_N_Quantified_Expression): Force reanalysis and
4748 expansion of the condition. Required since the previous analysis was
4749 done with expansion disabled (see Resolve_Quantified_Expression) and
4750 hence checks were not inserted and record comparisons have not been
4753 2011-08-02 Ed Falis <falis@adacore.com>
4755 * s-taprop-vxworks.adb, s-intman-vxworks.adb, s-intman-vxworks.ads:
4758 2011-08-02 Bob Duff <duff@adacore.com>
4760 * opt.ads: Minor comment fix.
4762 2011-08-02 Bob Duff <duff@adacore.com>
4764 * sem_ch12.adb (Analyze_Package_Instantiation,
4765 Analyze_Subprogram_Instantiation): Turn off style checking while
4766 analyzing an instance. Whatever style checks that apply to the generic
4767 unit should apply, so it makes no sense to apply them in an instance.
4768 This was causing trouble when compiling an instance of a runtime
4769 unit that violates the -gnatyO switch.
4770 * stylesw.adb (Set_Style_Check_Options): "when 'O' =>" was missing from
4771 one of the two case statements, causing spurious errors.
4773 2011-08-02 Robert Dewar <dewar@adacore.com>
4775 * uname.adb: Minor reformatting.
4776 * gnatcmd.adb: Minor reformatting.
4777 * exp_attr.adb: Minor reformatting.
4779 2011-08-02 Ed Schonberg <schonberg@adacore.com>
4781 * exp_ch5.adb (Expand_N_Assignment_Statement): under restriction
4782 No_Dispatching_Calls, do not look for the Assign primitive, because
4783 predefined primitives are not created in this case.
4785 2011-08-02 Bob Duff <duff@adacore.com>
4787 * stylesw.ads: Minor comment fixes.
4789 2011-08-02 Robert Dewar <dewar@adacore.com>
4791 * freeze.adb (Add_To_Result): New procedure.
4793 2011-08-02 Jose Ruiz <ruiz@adacore.com>
4795 * exp_attr.adb (Find_Stream_Subprogram): When using a configurable run
4796 time, if the specific run-time routines for handling streams of strings
4797 are not available, use the default mechanism.
4799 2011-08-02 Arnaud Charlet <charlet@adacore.com>
4801 * s-regpat.ads: Fix typo.
4803 2011-08-02 Vincent Celier <celier@adacore.com>
4805 * prj-conf.adb (Get_Or_Create_Configuration_File): If On_Load_Config is
4806 not null, call it to create the in memory config project file without
4807 parsing an existing default config project file.
4809 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
4811 * atree.adb (Allocate_Initialize_Node): Remove useless temporaries.
4813 2011-08-02 Ed Schonberg <schonberg@adacore.com>
4815 * sem_elim.adb: an abstract subprogram does not need an eliminate
4816 pragma for its descendant to be eliminable.
4818 2011-08-02 Ed Falis <falis@adacore.com>
4820 * init.c: revert to handling before previous checkin for VxWorks
4821 * s-intman-vxworks.adb: delete unnecessary declarations related to
4822 using Ada interrupt facilities for handling signals.
4823 Delete Initialize_Interrupts. Use __gnat_install_handler instead.
4824 * s-intman-vxworks.ads: Import __gnat_install_handler as
4825 Initialize_Interrupts.
4826 * s-taprop-vxworks.adb: Delete Signal_Mask.
4827 (Abort_Handler): change construction of mask to unblock exception
4830 2011-08-02 Jerome Guitton <guitton@adacore.com>
4832 * a-except-2005.adb (Raise_From_Signal_Handler): Call
4833 Debug_Raise_Exception before propagation starts.
4835 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
4837 * exp_ch6.adb (Expand_Call): Guard restriction checks with a call
4838 to Restriction_Check_Required.
4839 * sem_ch3.adb (Analyze_Object_Declaration): Likewise.
4840 * sem_res.adb (Resolve_Call): Likewise.
4841 * sem_attr.adb (Check_Stream_Attribute): Likewise.
4843 2011-08-02 Bob Duff <duff@adacore.com>
4845 * stylesw.ads: Update comment.
4846 * style.adb: Minor: Use Error_Msg_NE instead of Error_Msg_N.
4847 * errout.ads: Remove obsolete comment.
4849 2011-08-02 Javier Miranda <miranda@adacore.com>
4851 * einfo.ads, einfo.adb (Is_Safe_To_Reevaluate): new function.
4852 (Set_Is_Safe_To_Reevaluate): new procedure.
4853 * sem_ch5.adb (Analyze_Assignment): Add one assertion to ensure that no
4854 assignment is allowed on safe-to-reevaluate variables.
4855 (Analyze_Iteration_Schine.Process_Bounds.One_Bound): Decorate the
4856 temporary created to remove side effects in expressions that use
4857 the secondary stack as safe-to-reevaluate.
4858 * exp_util.adb (Side_Effect_Free): Add missing code to handle well
4859 variables that are not true constants.
4861 2011-08-02 Robert Dewar <dewar@adacore.com>
4863 * sem_ch5.adb, sem_ch7.adb, einfo.ads, sem_util.adb, sem_util.ads,
4864 sem_res.adb, sem_ch6.adb: Minor reformatting.
4866 2011-08-02 Jerome Guitton <guitton@adacore.com>
4868 * a-except-2005.adb (Raise_Current_Excep): Remove obsolete dead code.
4870 2011-08-02 Ed Schonberg <schonberg@adacore.com>
4872 * sem_ch6.adb (New_Overloaded_Entity, Check_Overriding_Indicator): Do
4873 not set Overridden_Operation if subprogram is an initialization
4876 2011-08-02 Yannick Moy <moy@adacore.com>
4878 * par-ch6.adb: Correct obsolete name in comments
4879 * restrict.adb, restrict.ads (Check_Formal_Restriction): new function
4880 which takes two message arguments (existing function takes one), with
4881 second message used for continuation.
4882 * sem_ch5.adb (Analyze_Block_Statement): in formal mode, only reject
4883 block statements that originate from a source block statement, not
4884 generated block statements
4885 * sem_ch6.adb (Analyze_Function_Call): rename L into Actuals, for
4886 symmetry with procedure case
4887 * sem_ch7.adb (Check_One_Tagged_Type_Or_Extension_At_Most): new
4888 function to issue an error in formal mode if a package specification
4889 contains more than one tagged type or type extension.
4890 * sem_res.adb (Resolve_Actuals): in formal mode, check that actual
4891 parameters matching formals of tagged types are objects (or ancestor
4892 type conversions of objects), not general expressions. Issue an error
4893 on view conversions that are not involving ancestor conversion of an
4895 (Resolve_Type_Conversion): in formal mode, issue an error on the
4896 operand of an ancestor type conversion which is not an object
4897 * sem_util.adb, sem_util.ads (Find_Actual): extend the behavior of the
4898 procedure so that it works also for actuals of function calls
4899 (Is_Actual_Tagged_Parameter): new function which determines if its
4900 argument is an actual parameter of a formal of tagged type in a
4902 (Is_SPARK_Object_Reference): new function which determines if the tree
4903 referenced by its argument represents an object in SPARK
4905 2011-08-02 Robert Dewar <dewar@adacore.com>
4907 * sem_ch3.adb: Minor reformatting
4908 Minor comment addition
4909 Minor error msg text change
4911 2011-08-02 Javier Miranda <miranda@adacore.com>
4913 * sem_ch5.adb (Analyze_Iteration_Scheme.Uses_Secondary_Stack): New
4914 function. Used to be more precise when we generate a variable plus one
4915 assignment to remove side effects in the evaluation of the Bound
4917 (Analyze_Iteration_Scheme): Clean attribute analyzed in all the nodes
4918 of the bound expression to force its re-analysis and thus expand the
4919 associated transient scope (if required). Code cleanup replacing the
4920 previous code that declared the constant entity by an invocation to
4921 routine Force_Evaluation which centralizes this work in the frontend.
4923 2011-08-02 Robert Dewar <dewar@adacore.com>
4925 * einfo.adb (Is_Base_Type): Improve efficiency by using a flag table
4926 (Base_Type): Now uses improved Is_Base_Type function
4927 * einfo.ads (Base_Type): Inline this function
4929 2011-08-02 Robert Dewar <dewar@adacore.com>
4931 * sem_prag.adb (Analyze_Pragma): Defend against infinite recursion
4932 (Analyze_Aspect_Specifications): Fix Sloc values for constructed pragmas
4934 2011-08-02 Arnaud Charlet <charlet@adacore.com>
4936 * gcc-interface/Make-lang.in: Update dependencies.
4937 * gcc-interface/Makefile.in: Use s-inmapop-vxworks.adb for all VxWorks
4940 2011-08-02 Yannick Moy <moy@adacore.com>
4942 * par-ch3.adb (P_Delta_Constraint): issue an error in formal mode on
4943 non-simple expression used in delta constraint
4944 (P_Index_Or_Discriminant_Constraint): issue an error in formal mode on
4945 index constraint which is not a subtype mark
4946 * par.adb: With and use Restrict
4947 * sem_ch3.adb (Analyze_Component_Declaration): issue an error in formal
4948 mode on component type which is not a subtype mark and default
4949 expression on component
4950 (Analyze_Subtype_Declaration): issue an error in formal mode on subtype
4951 of string which does not have a lower index bound equal to 1
4952 (Array_Type_Declaration): issue an error in formal mode on index or
4953 component type which is not a subtype mark, and on aliased keyword on
4955 (Derived_Type_Declaration): issue an error in formal mode on interface,
4956 limited or abstract type
4957 (Record_Type_Declaration): issue an error in formal mode on interface
4958 (Record_Type_Definition): issue an error in formal mode on tagged types
4959 and type extensions not declared in the specification of a library unit
4960 package; on null non-tagged record; on variant part
4962 2011-08-02 Vincent Celier <celier@adacore.com>
4964 * prj-nmsc.adb (Check_Library_Attributes): Do not report Library_Dir
4965 not declared for qualified library project when Library_Name is not
4966 declared, but Library_Dir is.
4968 2011-08-02 Robert Dewar <dewar@adacore.com>
4970 * sem_ch13.adb (Analyze_Aspect_Specification): Fix slocs on generated
4971 pragmas (affects aspects [Component_]Default_Value
4972 (Check_Aspect_At_Freeze_Point): For Component_Default_Value, use
4973 component type for the resolution
4975 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
4977 * einfo.adb (Base_Type): Tune implementation for speed.
4979 2011-08-02 Robert Dewar <dewar@adacore.com>
4981 * freeze.adb: Minor reformatting.
4983 2011-08-02 Thomas Quinot <quinot@adacore.com>
4985 * scos.ads: Update comments.
4987 2011-08-02 Ed Schonberg <schonberg@adacore.com>
4989 * sem_ch3.adb (Build_Derived_Type): Inherit the convention from the
4990 base type, because the parent may be a subtype of a private type whose
4991 convention is established in a private part.
4993 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
4995 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Wrap the return
4996 statement in a block when the expansion of the return expression has
4997 created a finalization chain.
4998 * freeze.adb (Freeze_Expression): Alphabetize all choices associated
4999 with the parent node.
5000 Add N_Extended_Return_Statement to handle the case where a transient
5001 object declaration appears in the Return_Object_Declarations list of
5002 an extended return statement.
5004 2011-08-02 Matthew Gingell <gingell@adacore.com>
5006 * adaint.c (__gnat_is_symbolic_link_attr): Supress warning on possibly
5007 unused parameter 'name'.
5009 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5011 * sem_elim.adb (Set_Eliminated): If the overridden operation is an
5012 inherited operation, check whether its alias, which is the source
5013 operastion that it renames, has been marked eliminated.
5015 2011-08-02 Javier Miranda <miranda@adacore.com>
5017 * exp_util.adb (Safe_Prefixed_Reference): Do not consider safe an
5018 in-mode parameter whose type is an access type since it can be used to
5019 modify its designated object. Enforce code that handles as safe an
5020 access type that is not access-to-constant but it is the result of a
5021 previous removal of side-effects.
5022 (Remove_Side_Effects): Minor code reorganization of cases which require
5023 no action. Done to incorporate documentation on new cases uncovered
5024 working in this ticket: no action needed if this routine was invoked
5025 too early and the nodes are not yet decorated.
5026 * sem_res.adb (Resolve_Slice): Minor code cleanup replacling two calls
5027 to routine Remove_Side_Effects by calls to Force_Evaluation since they
5028 were issued with actuals that are implicitly provided by
5031 2011-08-02 Robert Dewar <dewar@adacore.com>
5033 * sem_ch3.adb, sem_res.adb: Minor reformatting.
5035 2011-08-02 Yannick Moy <moy@adacore.com>
5037 * sem_attr.adb (Check_Formal_Restriction_On_Attribute): new procedure
5038 to issue an error in formal mode on attribute not supported in this mode
5039 (Analyze_Attribute): issue errors on standard attributes not supported
5041 * sem_ch3.adb (Modular_Type_Declaration): remove obsolete part of
5042 comment, and issue error in formal mode on modulus which is not a power
5044 (Process_Range_Expr_In_Decl): issue error in formal mode on non-static
5046 * sem_ch8.adb (Find_Type): issue error in formal mode on 'Base in
5048 * sem_res.adb (Resolve_Unary_Op): issue error in formal mode on unary
5049 operator on modular type (except 'not').
5051 2011-08-02 Robert Dewar <dewar@adacore.com>
5053 * gnat_rm.texi: Minor reformatting.
5055 2011-08-02 Arnaud Charlet <charlet@adacore.com>
5057 * s-osinte-linux.ads: Minor comment update and reformatting.
5058 * i-cexten.ads: Make this unit pure, as for its parent.
5059 Will allow its usage in more contexts if needed.
5061 2011-08-02 Robert Dewar <dewar@adacore.com>
5063 * s-utf_32.ads: Minor comment fix.
5065 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5067 * sem_res.adb (Resolve_Actuals): if the subprogram is a primitive
5068 operation of a tagged synchronized type, handle the case where the
5069 controlling argument is overloaded.
5071 2011-08-02 Yannick Moy <moy@adacore.com>
5073 * gnat_rm.texi, opt.ads, sem_prag.adb, snames.ads-tmpl:
5074 Replace pragma SPARK_95 with pragma Restrictions (SPARK)
5075 * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): set
5076 SPARK mode and formal verification mode on processing SPARK restriction
5077 * s-rident.ads (Restriction_Id): add SPARK restriction in those not
5078 requiring consistency checking.
5080 2011-08-02 Robert Dewar <dewar@adacore.com>
5082 * sem_res.adb: Minor reformatting.
5084 2011-08-02 Robert Dewar <dewar@adacore.com>
5086 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
5087 a-cforse.ads: Remove unneeded with of Ada.Containers
5088 Remove commented out pragma Inline's
5089 Move specifications of new subprograms to the actual specs
5091 2011-08-02 Yannick Moy <moy@adacore.com>
5093 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
5094 a-cforse.ads: Update comments.
5096 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5098 * sem_attr.adb: add attribute name when 'Result has the wrong prefix.
5100 2011-08-02 Robert Dewar <dewar@adacore.com>
5102 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
5103 a-cforse.ads, a-cofove.ads: Minor reformatting.
5105 2011-08-02 Claire Dross <dross@adacore.com>
5107 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads, a-cforse.ads,
5108 a-cofove.ads: Add comments.
5110 2011-08-02 Yannick Moy <moy@adacore.com>
5112 * gnat_rm.texi: Document formal containers.
5114 2011-08-02 Emmanuel Briot <briot@adacore.com>
5116 * g-comlin.adb (Goto_Section, Getopt): fix handling of "*" when there
5119 2011-08-02 Robert Dewar <dewar@adacore.com>
5121 * mlib-prj.adb, restrict.ads, sem_aggr.adb, sem_ch12.adb: Minor
5124 2011-08-02 Robert Dewar <dewar@adacore.com>
5126 * aspects.adb: New aspects Default_Value and Default_Component_Value
5127 New format of Aspect_Names table checks for omitted entries
5128 * aspects.ads: Remove mention of Aspect_Cancel and add documentation on
5129 handling of boolean aspects for derived types.
5130 New aspects Default_Value and Default_Component_Value
5131 New format of Aspect_Names table checks for omitted entries
5132 * einfo.ads, einfo.adb (Has_Default_Component_Value): New flag
5133 (Has_Default_Value): New flag
5134 (Has_Default_Component_Value): New flag
5135 (Has_Default_Value): New flag
5136 * par-ch13.adb (P_Aspect_Specifications): New format of Aspect_Names
5138 * par-prag.adb: New pragmas Default_Value and Default_Component_Value
5139 * sem_ch13.adb (Analyze_Aspect_Specifications): New aspects
5140 Default_Value and Default_Component_Value
5141 * sem_prag.adb: New pragmas Default_Value and Default_Component_Value
5142 New aspects Default_Value and Default_Component_Value
5143 * snames.ads-tmpl: New pragmas Default_Value and Default_Component_Value
5144 * sprint.adb: Print N_Aspect_Specification node when called from gdb
5146 2011-08-02 Vincent Celier <celier@adacore.com>
5148 * prj-nmsc.adb (Check_Library_Attributes): For virtual library project,
5149 inherit library kind.
5151 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5153 * sem_res.adb: Add guards in calls to Matching_Static_Array_Bounds.
5156 2011-08-02 Robert Dewar <dewar@adacore.com>
5158 * i-cstrin.ads: Updates to make Interfaces.C.Strings match RM
5160 2011-08-02 Yannick Moy <moy@adacore.com>
5162 * sem_aggr.adb (Resolve_Aggregate): Fix thinko.
5164 2011-08-02 Robert Dewar <dewar@adacore.com>
5166 * impunit.adb: Add comment.
5168 2011-08-02 Yannick Moy <moy@adacore.com>
5170 * sem_aggr.adb (Check_Qualified_Aggregate): new procedure which checks
5171 qualification of aggregates in formal mode
5172 (Is_Top_Level_Aggregate): returns True for an aggregate not contained in
5174 (Resolve_Aggregate): complete the test that an aggregate is adequately
5175 qualified in formal mode
5177 2011-08-02 Pascal Obry <obry@adacore.com>
5179 * make.adb, bindgen.adb, gnatbind.adb: Minor reformatting.
5180 * mlib-prj.adb: Supress warning when compiling binder generated file.
5181 (Build_Library): Supress all warnings when compiling the binder
5184 2011-08-02 Yannick Moy <moy@adacore.com>
5186 * errout.adb, errout.ads (Check_Formal_Restriction): move procedure
5188 * restrict.adb, restrict.ads (Check_Formal_Restriction): ...to here
5189 * sem_aggr.adb, sem_ch5.adb, sem_util.adb:
5190 Add with/use clauses to make Check_Formal_Restriction visible
5192 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5194 * sem_ch12.adb (Check_Generic_Actuals): handle properly actual
5195 in-parameters when type of the generic formal is private in the generic
5196 spec and non-private in the body.
5198 2011-08-02 Claire Dross <dross@adacore.com>
5200 * a-cfdlli.adb, a-cfdlli.ads, a-cfhase.adb, a-cfhase.ads, a-cfhama.adb,
5201 a-cfhama.ads, a-cforse.adb, a-cforse.ads, a-cforma.adb, a-cforma.ads,
5202 a-cofove.adb, a-cofove.ads: New files implementing formal containers.
5203 * impunit.adb, Makefile.rtl: Take new files into account.
5205 2011-08-02 Robert Dewar <dewar@adacore.com>
5207 * sem_aggr.adb, sem_ch3.adb, sem_ch5.adb, make.adb, sem_res.adb,
5208 sem_attr.adb, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
5210 2011-08-02 Yannick Moy <moy@adacore.com>
5212 * sem_aggr.adb (Resolve_Aggregate): disable incorrectly placed check in
5214 * sem_util.adb (Matching_Static_Array_Bounds): proper detection of
5215 matching static array bounds, taking into account the special case of
5217 * sem_ch3.adb: Typo in comment.
5219 2011-08-02 Yannick Moy <moy@adacore.com>
5221 * errout.adb, errout.ads (Check_Formal_Restriction): new procedure
5222 which issues an error in formal mode if its argument node is originally
5224 * sem_ch3.adb (Analyze_Full_Type_Declaration): move test that a type
5225 has a discriminant specification so that it does not include the case
5227 (Derived_Type_Declaration): move here the test that a derived type has a
5228 discriminant specification
5229 * sem_aggr.adb (Resolve_Record_Aggregate): test the presence of the
5230 first element of a component association before accessing its choices
5231 (presence of component association is not enough)
5232 * exp_ch6.adb (Expand_N_Subprogram_Declaration): test if a subprogram
5233 declaration is a library item before accessing the next element in a
5234 list, as library items are not member of lists
5235 * sem_attr.adb, sem_ch11.adb, sem_ch4.adb, sem_ch5.adb, sem_ch6.adb,
5236 sem_ch8.adb, sem_ch9.adb, sem_res.adb, sem_util.adb: use
5237 Check_Formal_Restriction whenever possible.
5239 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5241 * sem_ch3.adb (Find_Type_Of_Object): In ASIS mode, create an itype
5242 reference when needed.
5244 2011-08-02 Bob Duff <duff@adacore.com>
5246 * gnat_ugn.texi: Fix typo.
5248 2011-08-02 Vincent Celier <celier@adacore.com>
5250 * make.adb (Gnatmake): Use MLib.Tgt.Archive_Ext as the extension of
5251 archive file name. Do not use the full path name of archives for Open
5254 2011-08-02 Robert Dewar <dewar@adacore.com>
5256 * sem_ch12.adb, sem_ch11.adb: New calling sequence for
5257 Analyze_Aspect_Specifications
5259 (Analyze_Aspect_Specifications): New handling for boolean aspects
5260 * sem_ch13.ads (Analyze_Aspect_Specifications): New calling sequence
5261 * sem_ch3.adb, sem_ch6.adb, sem_ch7.adb, sem_ch9.adb: New calling
5262 sequence for Analyze_Aspect_Specifications
5263 * sem_prag.adb (Analyze_Pragma): Remove use of Aspect_Cancel entirely
5264 * sinfo.ads, sinfo.adb (Aspect_Cancel): Remove, no longer used
5266 2011-08-02 Robert Dewar <dewar@adacore.com>
5268 * freeze.adb (Freeze_Entity): Remove handling of delayed boolean
5269 aspects, since these no longer exist.
5271 2011-08-02 Robert Dewar <dewar@adacore.com>
5273 * par-ch13.adb (Aspect_Specifications_Present): Always return false on
5274 semicolon, do not try to see if there are aspects following it.
5275 * par-ch3.adb (P_Declarative_Items): Better message for unexpected
5278 2011-08-02 Robert Dewar <dewar@adacore.com>
5280 * sem_ch8.adb, aspects.ads: Minor reformatting.
5282 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
5284 * sem_ch13.ads (Analyze_Aspect_Specification): Add pragma Inline.
5285 * sem_ch13.adb (Analyze_Non_Null_Aspect_Specifications): New procedure
5287 (Analyze_Aspect_Specifications): ...here. Call above procedure.
5289 2011-08-02 Yannick Moy <moy@adacore.com>
5291 * exp_ch6.adb (Expand_N_Subprogram_Declaration): issue error in formal
5292 mode on subprogram declaration outside of package specification, unless
5293 it is followed by a pragma Import
5294 * sem_ch3.adb (Access_Definition, Access_Subprogram_Declaration,
5295 Access_Type_Declaration): issue error in formal mode on access type
5296 (Analyze_Incomplete_Type_Decl): issue error in formal mode on
5298 (Analyze_Object_Declaration): issue error in formal mode on object
5299 declaration which does not respect SPARK restrictions
5300 (Analyze_Subtype_Declaration): issue error in formal mode on subtype
5301 declaration which does not respect SPARK restrictions
5302 (Constrain_Decimal, Constrain_Float, Constrain_Ordinary_Fixed): issue
5303 error in formal mode on digits or delta constraint
5304 (Decimal_Fixed_Point_Type_Declaration): issue error in formal mode on
5305 decimal fixed point type
5306 (Derived_Type_Declaration): issue error in formal mode on derived type
5307 other than type extensions of tagged record types
5308 * sem_ch6.adb (Process_Formals): remove check in formal mode, redundant
5309 with check on access definition
5310 * sem_ch9.adb (Analyze_Protected_Definition): issue error in formal
5311 mode on protected definition.
5312 (Analyze_Task_Definition): issue error in formal mode on task definition
5314 2011-08-02 Robert Dewar <dewar@adacore.com>
5316 * make.adb, sem_ch8.adb, s-inmaop-vxworks.adb: Minor reformatting.
5318 2011-08-02 Javier Miranda <miranda@adacore.com>
5320 * sem_ch6.adb (Can_Override_Operator): New function.
5321 (Verify_Overriding_Indicator): Add missing code to check overriding
5322 indicator in operators. Fixes regression.
5323 (Check_Overriding_Indicator): Minor reformating after replacing the
5324 code that evaluates if the subprogram can override an operator by
5325 invocations to the above new function.
5327 (Write_Field26_Name): Add missing code to ensure that, following
5328 the documentation in einfo.ads, this field is not shown as attribute
5329 "Static_Initialization" on non-dispatching functions.
5331 2011-08-02 Jose Ruiz <ruiz@adacore.com>
5333 * sem_res.adb (Resolve_Call): A call to
5334 Ada.Real_Time.Timing_Events.Set_Handler violates restriction
5335 No_Relative_Delay (AI-0211) only when it sets a relative timing event,
5336 i.e., when the second parameter is of type Time_Span.
5338 2011-08-02 Vincent Celier <celier@adacore.com>
5340 * make.adb (Gnatmake): use <library dir>/lib<library name>.a to link
5341 with an archive instead of -L<library dir> -l<library name>.
5343 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5345 * sem_ch8.adb (Analyze_Use_Type): If the clause is being re-analyzed,
5346 mark the base types In_Use in addition to making the operations
5349 2011-08-02 Ed Falis <falis@adacore.com>
5351 * init.c: add and setup __gnat_signal_mask for the exception signals
5352 * s-inmaop-vxworks.adb: new file.
5353 * s-intman-vxworks.adb: remove unnecessary initializations and
5355 * s-intman-vxworks.ads: remove unnecessary variable
5356 * s-taprop-vxworks.adb: simplify signal initialization
5358 2011-08-02 Robert Dewar <dewar@adacore.com>
5360 * sem_ch8.adb: Minor code reorganization, comment updates.
5362 2011-08-02 Robert Dewar <dewar@adacore.com>
5364 * sem_res.adb (Matching_Static_Array_Bounds): Moved to Sem_Util
5365 * sem_util.ads, sem_util.adb (Matching_Static_Array_Bounds): Moved
5367 (Matching_Static_Array_Bounds): Use Is_Ok_Static_Expression
5368 (Matching_Static_Array_Bounds): Moved here from Sem_Res
5370 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5372 * atree.h, atree.ads, atree.adb: New subprograms to manipulate Elist5.
5373 * par_ch8.adb (P_Use_Type): initialize Used_Operations for node.
5374 * sinfo.ads, sinfo.adb (Used_Operations): new attribute of
5375 use_type_clauses, to handle more efficiently use_type and use_all_type
5377 * sem_ch8.adb: Rewrite Use_One_Type and End_Use_Type to handle the
5378 Ada2012 Use_All_Type clause.
5379 (Use_Class_Wide_Operations): new procedure.
5381 2011-08-02 Robert Dewar <dewar@adacore.com>
5383 * exp_util.adb, par-ch10.adb, par-ch6.adb, sem.adb, sem_ch6.adb,
5384 sem_ch6.ads, sinfo.adb, sinfo.ads, sprint.adb: Change parameterized
5385 expression to expression function.
5387 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5389 * sem_ch4.adb: transform simple Ada2012 membership into equality only
5390 if types are compatible.
5392 2011-08-02 Yannick Moy <moy@adacore.com>
5394 * sem_res.adb (Matching_Static_Array_Bounds): new function which
5395 returns True if its argument array types have same dimension and same
5396 static bounds at each index.
5397 (Resolve_Actuals): issue an error in formal mode on actuals passed as
5398 OUT or IN OUT paramaters which are not view conversions in SPARK.
5399 (Resolve_Arithmetic_Op): issue an error in formal mode on
5400 multiplication or division with operands of fixed point types which are
5401 not qualified or explicitly converted.
5402 (Resolve_Comparison_Op): issue an error in formal mode on comparisons of
5403 Boolean or array type (except String) operands.
5404 (Resolve_Equality_Op): issue an error in formal mode on equality
5405 operators for array types other than String with non-matching static
5407 (Resolve_Logical_Op): issue an error in formal mode on logical operators
5408 for array types with non-matching static bounds. Factorize the code in
5409 Matching_Static_Array_Bounds.
5410 (Resolve_Qualified_Expression): issue an error in formal mode on
5411 qualified expressions for array types with non-matching static bounds.
5412 (Resolve_Type_Conversion): issue an error in formal mode on type
5413 conversion for array types with non-matching static bounds
5415 2011-08-02 Robert Dewar <dewar@adacore.com>
5417 * par-ch10.adb: Minor code reorganization (use Nkind_In).
5419 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5421 * par-ch9.adb: save location of entry for proper error message.
5423 2011-08-02 Javier Miranda <miranda@adacore.com>
5425 * sem_type.ads, sem_type.adb (Is_Ancestor): Addition of a new formal
5426 (Use_Full_View) which permits this routine to climb through the
5427 ancestors using the full-view of private parents.
5428 * sem_util.adb (Collect_Interfaces_Info, Implements_Interface): Set
5429 Use_Full_View to true in calls to Is_Ancestor.
5430 * sem_disp.adb (Override_Dispatching_Operation): Set Use_Full_View to
5431 true in call to Is_Ancestor.
5432 * exp_ch3.adb (Build_Offset_To_Top_Functions, Initialize_Tag): Set
5433 Use_Full_View to true in call to Is_Ancestor.
5434 * exp_ch7.adb (Controller_Component): Set Use_Full_View to true in
5435 call to Is_Ancestor.
5436 * exp_ch4.adb (Expand_N_Type_Conversion, Tagged_Membership): Set
5437 Use_Full_View to true in calls to Is_Ancestor.
5438 * exp_disp.adb (Expand_Interface_Actuals, Make_Secondary_DT, Make_DT,
5439 Make_Select_Specific_Data_Table, Register_Primitive,
5440 Set_All_DT_Position): Set Use_Full_View to true in calls to Is_Ancestor.
5441 * exp_intr.adb (Expand_Dispatching_Constructor_Call): Set Use_Full_View
5442 to true in call to Is_Ancestor.
5443 * exp_util.adb (Find_Interface_ADT, Find_Interface_Tag): Set
5444 Use_Full_View to true in calls to Is_Ancestor.
5446 (Write_Call_Info): Set Use_Full_View to true in call to Is_Ancestor.
5447 (Write_Type_Info): Set Use_Full_View to true in call to Is_Ancestor.
5449 2011-08-02 Robert Dewar <dewar@adacore.com>
5451 * gnat_rm.texi: Minor reformatting.
5452 * sem_prag.adb: Minor reformatting.
5454 2011-08-02 Tristan Gingold <gingold@adacore.com>
5456 * vms_data.ads: Add VMS qualifier for -gnateP.
5458 2011-08-02 Robert Dewar <dewar@adacore.com>
5460 * par-ch13.adb (P_Aspect_Specification): New meaning of Decl = Empty
5461 * par-ch7.adb (P_Package): Proper placement of aspects for package
5463 * par-endh.adb (Check_End): Ad Is_Sloc parameter
5464 (End_Statements): Add Is_Sloc parameterr
5465 * par.adb (P_Aspect_Specification): New meaning of Decl = Empty
5466 (Check_End): Ad Is_Sloc parameter
5467 (End_Statements): Add Is_Sloc parameterr
5469 2011-08-02 Vincent Celier <celier@adacore.com>
5471 * ug_words: Add VMS qualifier equivalent to -gnateP:
5472 /SYMBOL_PREPROCESSING.
5474 2011-08-02 Jose Ruiz <ruiz@adacore.com>
5476 * gnat-style.texi: For hexadecimal numeric literals the typical
5477 grouping of digits is 4 to represent 2 bytes.
5478 A procedure spec which is split into several lines is indented two
5481 2011-08-02 Yannick Moy <moy@adacore.com>
5483 * exp_aggr.adb (Is_Others_Aggregate): move function to other unit.
5484 * sem_aggr.adb, sem_aggr.ads (Is_Others_Aggregate): move function here
5485 (Resolve_Aggregate): issue errors in formal modes when aggregate is not
5487 (Resolve_Array_Aggregate): issue errors in formal modes on non-static
5488 choice in array aggregate
5489 (Resolve_Extension_Aggregate): issue errors in formal modes on subtype
5491 (Resolve_Record_Aggregate): issue errors in formal modes on mixed
5492 positional and named aggregate for record, or others in record
5493 aggregate, or multiple choice in record aggregate
5494 * sem_res.adb (Resolve_Logical_Op): issue errors in formal mode when
5495 array operands to logical operations AND, OR and XOR do not have the
5496 same static lower and higher bounds
5497 * sem_ch5.adb, sinfo.ads: Correct typos in comments
5499 2011-08-01 Robert Dewar <dewar@adacore.com>
5501 * sem_util.ads, sem_util.adb, sem_ch6.adb (Last_Source_Statement):
5502 Replaces Last_Source_Node_In_Sequence.
5503 * err_vars.ads (Error_Msg_Lang): 16 is OK, don't need 4K
5504 * errout.adb (Set_Error_Msg_Lang): Takes arg with no parens, but stores
5505 parens and blank in string (this was inconsistently implemented).
5507 (Set_Error_Msg_Lang): Takes arg with no parens, but stores parens and
5508 blank in string (this was inconsistently implemented).
5510 (Set_Global_Switches): Set formal mode switches appropriately
5511 * opt.ads, opt.adb: Formal mode is now global switches, more consistent
5513 (Analyze_Pragma, case SPARK_95): Set opt switches appropriately and
5514 call Set_Error_Msg_Lang to set "spark" as language name.
5515 * par.adb: Remove unnecessary call to set formal language for errout
5516 * sem_prag.adb (P_Pragma, case SPARK_95): Set opt switches
5517 appropriately and call Set_Error_Msg_Lang to set "spark" as language
5519 * sem_ch4.adb (Analyze_Concatenation_Operand): remove procedure and
5520 calls to it, moved after resolution so that types are known
5521 * sem_res.adb (Resolve_Op_Concat): issue an error in formal mode if
5522 result of concatenation is not of type String
5523 (Resolve_Op_Concat_Arg): issue an error in formal mode if an operand of
5524 concatenation is not properly restricted
5525 * gnat_rm.texi: Add doc on pragma Spark_95.
5526 * gcc-interface/Makefile.in: Remove obsolete target pairs for
5527 Interfaces.C.* on VMS. Remove s-parame-vms-restrict.ads.
5528 * gcc-interface/Make-lang.in: Update dependencies.
5530 2011-08-01 Javier Miranda <miranda@adacore.com>
5532 * sem_disp.adb (Override_Dispatching_Operation): Enforce strictness of
5533 condition that detects if the overridden operation must replace an
5536 2011-08-01 Javier Miranda <miranda@adacore.com>
5538 * exp_ch4.adb (Expand_N_Case_Expression): Propagate to the expanded
5539 code declarations inserted by Insert_Actions in each alternative of the
5540 N_Case_Expression node.
5542 2011-08-01 Robert Dewar <dewar@adacore.com>
5544 * sem_ch6.adb: Minor code reorganization.
5545 * sem_util.adb: Minor reformatting.
5547 2011-08-01 Pascal Obry <obry@adacore.com>
5549 * prj-env.adb: Remove <prefix>/lib/gpr/<target> project search path.
5550 * gnat_ugn.texi: Add documentation for VERSIONINFO Windows resource.
5552 2011-08-01 Yannick Moy <moy@adacore.com>
5554 * par-ch4.adb (P_Name): issue a syntax error in SPARK mode on character
5555 literal or operator symbol which is prefixed
5556 * sem_attr.adb (Analyze_Access_Attribute): issue an error in formal
5557 mode on access attributes.
5558 * sem_ch4.adb (Analyze_Concatenation_Operand): new procedure to check
5559 that concatenation operands are properly restricted in formal mode
5560 (Analyze_Concatenation, Analyze_Concatenation_Rest): call new procedure
5561 Analyze_Concatenation_Operand. Issue an error in formal mode if the
5562 result of the concatenation has a type different from String.
5563 (Analyze_Conditional_Expression, Analyze_Explicit_Dereference,
5564 Analyze_Quantified_Expression, Analyze_Slice,
5565 Analyze_Null): issue an error in formal mode on unsupported constructs
5567 (Analyze_Block_Statement): only issue error on source block statement
5568 * sem_util.ads, sem_util.adb (Last_Source_Node_In_Sequence): new
5569 function which returns the last node in a list of nodes for which
5570 Comes_From_Source returns True, if any
5571 * sem_ch6.adb (Check_Missing_Return): minor refactoring to use
5572 Last_Source_Node_In_Sequence
5573 * sem_ch8.adb (Analyze_Exception_Renaming, Analyze_Generic_Renaming,
5574 Analyze_Object_Renaming, Analyze_Use_Package): issue an error in formal
5575 mode on unsupported constructs
5576 * sem_ch9.adb Do not return after issuing error in formal mode, as the
5577 rest of the actions may be needed later on since the error is marked as
5579 * sinfo.ads: Typos in comments.
5581 2011-08-01 Pascal Obry <obry@adacore.com>
5583 * projects.texi: Minor editing.
5585 2011-08-01 Yannick Moy <moy@adacore.com>
5587 * err_vars.ads (Error_Msg_Lang, Error_Msg_Langlen): new variables for
5588 insertion character ~~
5589 * errout.ads, errout.adb (Formal_Error_Msg_...): remove procedures
5590 (Set_Error_Msg_Lang): new procedure which fixes the language for use
5591 with insertion character ~~
5592 (Set_Msg_Text): treat insertion character ~~
5593 * par-ch4.adb, par-ch5.adb, par-endh.adb, sem_attr.adb, sem_ch11.adb,
5594 sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_util.adb: Replace calls to
5595 Formal_Error_Msg_... procedures by equivalent Error_Msg_...
5596 procedures. Favor calls to Error_Msg_F(E) over Error_Msg_N(E). Make
5597 errors related to the formal language restriction not serious
5598 (insertion character |).
5599 * par.adb (Par): set formal language for error messages if needed
5600 * sem_ch6.adb (Check_Missing_Return): take into account possible
5601 generated statements at the end of the function
5602 * snames.ads-tmpl (Name_SPARK_95, Pragma_SPARK_95): new variable and
5603 enumeration value to define a new pragma SPARK_95
5604 * opt.ads, opt.adb (SPARK_Version_Type, SPARK_Version_Default,
5605 SPARK_Version): new type and variables to store the SPARK version
5607 (SPARK_Mode): return True when SPARK_Version is set
5608 * par-prag.adb: Correct indentation
5609 (Prag): take Pragma_SPARK_95 into account
5610 * sem_prag.adb (Set_Mechanism_Value, Sig_Flags): take Pragma_SPARK_95
5613 2011-08-01 Robert Dewar <dewar@adacore.com>
5615 * sem_ch3.adb, sem_ch3.ads, sem_ch5.adb, prj-part.adb, par-ch4.adb,
5616 sem_util.adb, sem_ch4.adb, sem_ch6.adb, sem_ch6.ads, sem_ch8.adb,
5617 sem_ch8.ads, sem_ch13.ads, par-ch5.adb, prj-env.ads: Minor reformatting
5619 2011-08-01 Pascal Obry <obry@adacore.com>
5621 * prj-part.ads, prj-part.adb (Parse): Add Target_Name parameter. Pass
5622 Target_Name to Get_Path call.
5623 (Parse_Single_Project): Likewise.
5624 (Post_Parse_Context_Clause): Likewise.
5625 * prj-env.ads, prj-env.adb (Find_Project): Add Target_Name parameter.
5626 Call Initialise_Project_Path with the proper Target_Name.
5627 (Initialize_Project_Path): Add <gnat_root>/<target_name>/lib/gnat
5629 (Get_Path): Add Target_Name parameter. Call Initialise_Project_Path
5630 with the proper Target_Name.
5631 * prj-conf.adb (Get_Or_Create_Configuration_File): Pass Target_Name to
5633 (Parse_Project_And_Apply_Config): Likewise.
5634 * prj-makr.adb (Initialize): Pass empty Target_Name to Parse routine.
5635 This is fine as this part of the code is supporting only native
5637 * prj-pars.adb (Parse): Pass empty Target_Name to Parse routine. This
5638 is fine as this part of the code is supporting only native compilation.
5640 2011-08-01 Yannick Moy <moy@adacore.com>
5642 * sem_util.adb (Enter_Name): issue error in formal mode on declaration
5643 of homonym, unless the homonym is one of the cases allowed in SPARK
5644 * par-ch5.adb (Parse_Decls_Begin_End): issue error in SPARK mode for
5645 package declaration occurring after a body.
5647 2011-08-01 Robert Dewar <dewar@adacore.com>
5649 * checks.adb, exp_ch4.adb: Minor reformatting.
5651 2011-08-01 Javier Miranda <miranda@adacore.com>
5653 * einfo.ads (Access_Disp_Table): Fix documentation.
5654 (Dispatch_Table_Wrappers): Fix documentation.
5656 2011-08-01 Pascal Obry <obry@adacore.com>
5658 * prj-env.adb, prj-env.ads: Minor reformatting.
5660 2011-08-01 Yannick Moy <moy@adacore.com>
5662 * sem_util.ads, sem_util.adb, par.adb, par_util.adb
5663 (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
5664 procedures out of these packages.
5665 * errout.ads, errout.adb
5666 (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
5667 procedures in of this package
5668 (Formal_Error_Msg_NE): new procedure for wrapper on Error_Msg_NE
5669 * par-ch5.adb (Parse_Decls_Begin_End): issue syntax error in SPARK mode
5670 on misplaced later vs initial declarations, like in Ada 83
5671 * sem_attr.adb (Processing for Analyze_Attribute): issue error in
5672 formal mode on attribute of private type whose full type declaration
5674 * sem_ch3.adb (Analyze_Declarations): issue error in formal mode on a
5675 package declaration inside a package specification
5676 (Analyze_Full_Type_Declaration): issue error in formal mode on
5677 controlled type or discriminant type
5678 * sem_ch6.adb (Analyze_Subprogram_Specification): only issue error on
5679 user-defined operator means that it should come from the source
5680 (New_Overloaded_Entity): issue error in formal mode on overloaded
5682 * sem_ch6.ads, sem_ch13.ads: typos in comments.
5684 2011-08-01 Thomas Quinot <quinot@adacore.com>
5686 * atree.adb: Minor reformatting.
5687 * checks.adb: Minor reformatting.
5689 2011-08-01 Vincent Celier <celier@adacore.com>
5691 * s-parame-vms-ia64.ads: Fix typo in comment
5693 * s-parame-vms-restrict.ads: Removed, unused.
5695 2011-08-01 Javier Miranda <miranda@adacore.com>
5698 (Is_Variable_Size_Array): Remove local subprogram Is_Constant_Bound.
5700 (Constrain_Index): Remove side effects in the evaluation of the bounds.
5701 * sem_ch3.ads, sem_ch3.adb
5702 (Is_Constant_Bound): New extended version of the subprogram that was
5703 previously located inside function Exp_Ch3.Is_Variable_Size_Array.
5704 Moved here since it is shared by routines of sem_ch3 and exp_ch3.
5705 * sem_aux.ads (Constant_Value): Fix typo in comment.
5706 * checks.adb (Generate_Index_Checks): New implementation which, for
5707 array objects with constant bounds, generates the runtime check
5708 referencing the bounds of the array type. For other cases this routine
5709 provides its previous behavior obtaining such values from the array
5711 * sem_res.adb (Set_Slice_Subtype): Link a copied range subtree with its
5713 * atree.adb (New_Copy): Reset flag Is_Overloaded in the new copy since
5714 we cannot have semantic interpretations of the new node.
5716 2011-08-01 Ed Schonberg <schonberg@adacore.com>
5718 * sem_ch6.adb (Fully_Conformant_Expressions): handle quantified
5721 2011-08-01 Arnaud Charlet <charlet@adacore.com>
5723 * sem_ch8.adb: Minor code editing.
5724 * s-vxwext.adb: Remove trailing space.
5725 * freeze.adb, freeze.ads, errout.ads, erroutc.adb: Fix GPLv3 header for
5726 consistency with other files.
5728 2011-08-01 Thomas Quinot <quinot@adacore.com>
5730 * s-auxdec.ads, s-auxdec-vms_64.ads: Minor reformatting.
5732 2011-08-01 Ed Schonberg <schonberg@adacore.com>
5734 * par-ch10.adb: reject parameterized expressions as compilation unit.
5735 * sem_ch4.adb: handle properly conditional expression with overloaded
5736 then_clause and no else_clause.
5738 2011-08-01 Tristan Gingold <gingold@adacore.com>
5740 * s-parame-vms-alpha.ads, s-parame-vms-ia64.ads: Redeclare C_Address
5741 like done by System.Aux_DEC.
5742 * env.c (__gnat_setenv) [VMS]: Put logicals into LNM$PROCESS table.
5744 2011-08-01 Yannick Moy <moy@adacore.com>
5746 * par-endh.adb (Check_End): issue a syntax error in SPARK mode for
5747 missing label at end of declaration (subprogram or package)
5748 * par-ch4.adb (P_Name): issue a syntax error in SPARK mode for mixing
5749 of positional and named parameter association
5750 * par.adb, par-util.adb (Formal_Error_Msg_SP): new wrapper on
5751 Error_Msg_SP which adds a prefix to the error message giving the name
5752 of the formal language analyzed
5753 * sem_ch6.adb (Analyze_Return_Type): issue an error in formal mode for
5754 access result type in subprogram, unconstrained array as result type,.
5755 (Analyze_Subprogram_Declaration): issue an error in formal mode for null
5757 * sem_ch8.adb: Code clean up.
5759 2011-08-01 Javier Miranda <miranda@adacore.com>
5761 * sem_ch7.adb (Uninstall_Declarations): Remove useless code.
5762 * einfo.ads (Access_Disp_Table): Fix documentation.
5763 (Dispatch_Table_Wrappers): Fix documentation.
5764 * einfo.adb (Access_Disp_Table, Dispatch_Table_Wrappers,
5765 Set_Access_Disp_Table, Set_Dispatch_Table_Wrappers): Fix the assertions
5766 to enforce the documentation of this attribute.
5767 (Set_Is_Interface): Cleanup the assertion.
5768 * exp_ch4.adb (Expand_Allocator_Expression, Tagged_Membership): Locate
5769 the Underlying_Type entity before reading attribute Access_Disp_Table.
5770 * exp_disp.adb (Expand_Dispatching_Call, Expand_Interface_Conversion):
5771 Locate the Underlying_Type before reading attribute Access_Disp_Table.
5772 * exp_aggr.adb (Build_Array_Aggr_Code, Build_Record_Aggr_Code): Locate
5773 the Underlying_Type entity before reading attribute Access_Disp_Table.
5774 * exp_ch3.adb (Build_Record_Init_Proc, Expand_N_Object_Declaration):
5775 Locate the Underlying_Type entity before reading attribute
5778 2011-08-01 Ed Schonberg <schonberg@adacore.com>
5780 * s-poosiz.ads: Additional overriding indicators.
5782 2011-08-01 Yannick Moy <moy@adacore.com>
5784 * sem_ch5.adb (Analyze_Exit_Statement): add return after error in
5786 (Analyze_Iteration_Scheme): issue error in formal mode when loop
5787 parameter specification does not include a subtype mark.
5788 * sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration): issue error in
5789 formal mode on abstract subprogram.
5790 (Analyze_Subprogram_Specification): issue error in formal mode on
5791 user-defined operator.
5792 (Process_Formals): issue error in formal mode on access parameter and
5794 * sem_ch9.adb (Analyze_Abort_Statement,
5795 Analyze_Accept_Statement, Analyze_Asynchronous_Select,
5796 Analyze_Conditional_Entry_Call, Analyze_Delay_Relative,
5797 Analyze_Delay_Until, Analyze_Entry_Call_Alternative,
5798 Analyze_Requeue, Analyze_Selective_Accept,
5799 Analyze_Timed_Entry_Call): issue error in formal mode on such constructs
5800 * sem_ch11.adb (Analyze_Raise_Statement, Analyze_Raise_xxx_Error):
5801 issue error in formal mode on user-defined raise statement.
5803 2011-08-01 Thomas Quinot <quinot@adacore.com>
5805 * sem_ch6.adb (Enter_Overloaded_Entity): Do not warn about a
5806 declaration being hidden when overriding an implicit inherited
5808 * par-ch10.adb (P_Compilation_Unit): In syntax check only mode
5809 (-gnats), do not complain about a source file that contains only a
5812 2011-08-01 Ed Schonberg <schonberg@adacore.com>
5814 * sem_ch5.adb (Analyze_Iterator_Scheme): Do not overwrite type of loop
5815 variable if already set.
5817 2011-08-01 Arnaud Charlet <charlet@adacore.com>
5819 * g-socket-dummy.adb, s-osinte-linux.ads, g-socket-dummy.ads,
5820 g-debuti.adb, g-tasloc.adb, g-debuti.ads, g-tasloc.ads,
5821 s-osinte-hpux.ads, g-sercom.adb, g-soliop-solaris.ads, g-sercom.ads,
5822 g-sptain.ads, g-curexc.ads, s-tasloc.adb, s-tasloc.ads, s-tataat.adb,
5823 g-ctrl_c.adb, a-reatim.adb, s-tataat.ads, g-dirope.adb, g-ctrl_c.ads,
5824 g-dirope.ads, g-boubuf.adb, g-calend.adb, g-boubuf.ads, g-souinf.ads,
5825 g-table.adb, g-bytswa-x86.adb, g-wispch.adb, g-io.adb, g-table.ads,
5826 g-wispch.ads, g-io.ads, g-memdum.adb, g-memdum.ads, g-busorg.adb,
5827 g-busorg.ads, g-regpat.adb, g-sothco-dummy.adb, g-encstr.adb,
5828 g-regpat.ads, g-sothco-dummy.ads, s-osinte-aix.ads, g-encstr.ads,
5829 g-sercom-mingw.adb, s-mastop-vms.adb, g-diopit.adb, g-diopit.ads,
5830 s-vxwext.adb, g-dyntab.adb, g-dyntab.ads, g-crc32.adb,
5831 g-sercom-linux.adb, g-crc32.ads, s-regpat.adb, g-flocon.ads,
5832 s-regpat.ads, g-stheme.adb, g-sestin.ads, s-taspri-posix-noaltstack.ads,
5833 g-soliop.ads, s-inmaop-posix.adb, g-locfil.ads, g-enblsp-vms-alpha.adb,
5834 g-socthi-dummy.adb, g-socthi-dummy.ads, gnat.ads, g-moreex.adb,
5835 g-moreex.ads, g-dynhta.adb, g-dynhta.ads, g-deutst.ads, g-htable.adb,
5836 g-cgicoo.adb, g-htable.ads, g-cgicoo.ads, a-interr.adb,
5837 g-socthi-vms.adb, g-socthi-vms.ads, g-hesora.adb, g-bubsor.adb,
5838 g-hesora.ads, g-bubsor.ads, g-md5.adb, g-md5.ads, s-intman-irix.adb,
5839 s-htable.adb, s-osinte-vms.adb, s-htable.ads, s-osinte-vms.ads,
5840 s-taprob.adb, g-bytswa.adb, g-bytswa.ads, s-osinte-solaris-posix.ads,
5841 a-suenco.adb, g-comver.adb, g-comver.ads, g-exctra.adb,
5842 s-osinte-solaris.adb, g-exctra.ads, s-osinte-irix.ads,
5843 s-osinte-solaris.ads, a-caldel-vms.adb, g-socthi-vxworks.adb,
5844 g-expect.adb, g-socthi-vxworks.ads, g-expect.ads, g-comlin.ads,
5845 g-heasor.adb, g-heasor.ads, g-traceb.adb, g-traceb.ads, g-decstr.adb,
5846 g-spipat.adb, g-decstr.ads, g-spipat.ads, s-mastop-tru64.adb,
5847 g-except.ads, g-thread.adb, g-hesorg.adb, g-thread.ads, g-hesorg.ads,
5848 g-expect-vms.adb, a-stuten.ads, g-spchge.adb, g-spchge.ads,
5849 g-u3spch.adb, g-u3spch.ads, g-spitbo.adb, g-spitbo.ads,
5850 s-osinte-dummy.ads, s-osinte-posix.adb, g-pehage.adb, g-pehage.ads,
5851 s-gloloc-mingw.adb, g-sha1.ads, s-traceb-hpux.adb,
5852 g-trasym-unimplemented.adb, g-trasym-unimplemented.ads, g-io_aux.adb,
5853 g-regexp.adb, g-io_aux.ads, g-socthi-mingw.adb, g-regexp.ads,
5854 s-osinte-hpux-dce.adb, g-socthi-mingw.ads, g-cgi.adb,
5855 s-osinte-hpux-dce.ads, g-cgi.ads, g-byorma.adb, g-boumai.ads,
5856 g-byorma.ads, a-caldel.adb, s-regexp.adb, s-regexp.ads,
5857 g-soliop-mingw.ads, g-sptavs.ads, s-osinte-tru64.ads, g-speche.adb,
5858 g-speche.ads, g-socthi.adb, g-stsifd-sockets.adb, g-socthi.ads,
5859 s-osinte-darwin.ads, i-vxwork-x86.ads, g-awk.adb, i-vxwork.ads,
5860 g-awk.ads, g-zspche.adb, g-zspche.ads, g-socket.adb, g-sptabo.ads,
5861 g-socket.ads, g-semaph.adb, g-semaph.ads, s-taspri-posix.ads,
5862 g-enblsp-vms-ia64.adb, g-cgideb.adb, g-cgideb.ads, g-sothco.adb,
5863 s-osinte-freebsd.ads, g-sothco.ads, g-catiio.adb, g-casuti.adb,
5864 g-catiio.ads, g-casuti.ads, g-trasym.adb, g-trasym.ads, s-casuti.adb,
5865 g-os_lib.adb, s-traceb-mastop.adb, g-busora.adb, s-interr-dummy.adb,
5866 g-busora.ads, g-enutst.ads, s-os_lib.adb, a-tasatt.adb,
5867 s-osinte-mingw.ads: Update to GPLv3 run-time license.
5868 Use GNAT instead of GNARL.
5870 2011-08-01 Bob Duff <duff@adacore.com>
5872 * a-cdlili.ads, a-cihama.ads, a-coinve.ads, a-ciorse.ads, a-coorma.ads,
5873 a-cidlli.ads, a-ciormu.ads, a-cihase.ads, a-cohama.ads, a-coorse.ads,
5874 a-ciorma.ads, a-coormu.ads, a-convec.ads, a-cohase.ads: Minor
5877 2011-08-01 Yannick Moy <moy@adacore.com>
5879 * debug.adb (d.D) reverve flag for the SPARK mode
5880 (d.E) reverve flag for SPARK generation mode
5881 (d.F) reverve flag for Why generation mode
5882 * opt.ads, opt.adb (ALFA_Mode, ALFA_Through_SPARK_Mode,
5883 ALFA_Through_Why_Mode, Formal_Verification_Mode, SPARK_Mode): New
5884 functions which return True when the corresponding modes are set
5885 (Formal_Language): return "spark" or "alfa" when in formal verification
5887 * sem_util.ads, sem_util.adb (Formal_Error_Msg): new wrapper on
5888 Error_Msg to prefix the error message with a tag giving the formal
5890 (Formal_Error_Msg_N): new wrapper on Error_Msg_N to prefix the error
5891 message with a tag giving the formal language
5892 * sem_ch5.adb (Analyze_Block_Statement): issue error in formal mode on
5894 (Analyze_Case_Statement): issue error in formal mode on case statement
5895 with a single "others" case alternative
5896 (Analyze_Exit_Statement): issue errors in formal mode on exit
5897 statements which do not respect SPARK restrictions
5898 (Analyze_Goto_Statement): issue error in formal mode on goto statement
5899 (Check_Unreachable_Code): always issue an error (not a warning) in
5900 formal mode on unreachable code (concerns both code after an infinite
5901 loop and after an unconditional jump, both not allowed in SPARK)
5902 * sem_ch6.adb (Analyze_Return_Statement): add call to
5903 Set_Return_Present for a procedure containing a return statement
5904 (already done for functions in Analyze_Function_Return)
5905 (Analyze_Function_Return): issue error in formal mode on extended
5906 return or if return is not last statement in function
5907 (Check_Missing_Return): issue error in formal mode if function does
5908 not end with return or if procedure contains a return
5909 * sem_ch8.ads, sem_ch8.adb (Has_Loop_In_Inner_Open_Scopes): new
5910 function to detect if there is an inner scope of its parameter S which
5913 2011-08-01 Thomas Quinot <quinot@adacore.com>
5915 * sem_ch6.ads: Minor reformatting.
5917 2011-08-01 Javier Miranda <miranda@adacore.com>
5919 * sem_util.adb (Abstract_Interface_List): Complete condition when
5920 processing private type declarations to avoid reading unavailable
5922 (Is_Synchronized_Tagged_Type): Complete condition when processing
5923 private extension declaration nodes to avoid reading unavailable
5926 2011-08-01 Thomas Quinot <quinot@adacore.com>
5928 * sem_ch3.adb: Minor reformatting.
5930 2011-08-01 Thomas Quinot <quinot@adacore.com>
5932 * s-parame-ae653.ads, s-parame-vms-alpha.ads, s-parame-hpux.ads,
5933 i-cpoint.adb, i-cstrin.adb, i-cpoint.ads, i-cstrin.ads,
5934 s-parame-vms-ia64.ads, s-parame.ads, i-c.ads, s-parame-vxworks.ads,
5935 s-parame-vms-restrict.ads: Remove duplicated Interfaces.C.* packages
5936 for VMS, instead parametrize the common implementation with
5937 System.Parameters declarations.
5939 2011-08-01 Eric Botcazou <ebotcazou@adacore.com>
5941 * gnat_rm.texi: Document limitation of Pragma No_Strict_Aliasing.
5943 2011-08-01 Tristan Gingold <gingold@adacore.com>
5945 * seh_init.c: Fix SEH handler installation on win64.
5947 2011-08-01 Ed Schonberg <schonberg@adacore.com>
5949 * sem_ch3.adb (Access_Subprogram_Declaration): in Asis mode, prevent
5950 double analysis of an anonymous access to subprogram, because it can
5951 lead to improper sharing of profiles and a back-end crash.
5953 2011-08-01 Robert Dewar <dewar@adacore.com>
5955 * make.adb, sem_ch4.adb: Minor reformatting.
5956 * gcc-interface/Make-lang.in: Update dependencies.
5957 * sem_util.adb, exp_ch5.adb: Minor reformatting.
5959 2011-08-01 Arnaud Charlet <charlet@adacore.com>
5961 * gnat_rm.texi: Fix definition of Long_Integer.
5963 2011-08-01 Ed Schonberg <schonberg@adacore.com>
5965 * exp_aggr.adb: check limit size of static aggregate unconditionally,
5966 to prevent storage exhaustion.
5967 * exp_ch7.adb (Clean_Simple_Protected_Objects): if the scope being
5968 finalized is a function body, insert the cleanup code before the final
5969 return statement, to prevent spurious warnings.
5970 * s-pooglo.ads: add overriding indicator.
5972 2011-08-01 Ed Schonberg <schonberg@adacore.com>
5974 * sem_ch4.adb (Operator_Check): improve error message when both a
5975 with_clause and a use_clause are needed to make operator usage legal.
5976 * sem_util.ads, sem_util.adb (Unit_Is_Visible): new predicate to
5977 determine whether a compilation unit is visible within an other,
5978 either through a with_clause in the current unit, or a with_clause in
5979 its library unit or one one of its parents.
5981 2011-08-01 Ed Schonberg <schonberg@adacore.com>
5983 * exp_ch5.adb (Expand_N_Iterator_Loop): handle properly an iterator
5984 over an arbitrary expression of an array or container type.
5985 * lib-xref.adb: clarify comment.
5987 2011-08-01 Bob Duff <duff@adacore.com>
5989 * einfo.ads: Minor reformatting.
5990 * debug.adb: Minor comment improvement.
5992 2011-08-01 Javier Miranda <miranda@adacore.com>
5994 * sem_ch4.adb (Try_Object_Operation): For class-wide subprograms do not
5995 consider hidden subprograms as valid candidates.
5997 2011-08-01 Arnaud Charlet <charlet@adacore.com>
5999 * make.adb (Compile): Strip -mxxx switches in CodePeer mode.
6001 2011-08-01 Vasiliy Fofanov <fofanov@adacore.com>
6003 * gnat_ugn.texi: Fix typo.
6005 2011-08-01 Robert Dewar <dewar@adacore.com>
6007 * i-cstrin.adb, sem_util.adb, exp_ch11.adb, sem_ch8.adb,
6008 lib-xref.adb: Minor reformatting
6010 2011-08-01 Gary Dismukes <dismukes@adacore.com>
6012 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Replace test of
6013 when to generate a call to Move_Final_List.
6014 (Has_Controlled_Parts): Remove this function.
6016 2011-08-01 Geert Bosch <bosch@adacore.com>
6018 * par-ch3.adb (P_Discrete_Choice_List): Improve error message for extra
6021 2011-08-01 Thomas Quinot <quinot@adacore.com>
6023 * exp_ch11.adb (Expand_N_Raise_Statement): Mark N_Raise_xxx_Error for
6024 explicit raise of a predefined exception as Comes_From_Source if the
6025 original N_Raise_Statement comes from source.
6027 2011-08-01 Robert Dewar <dewar@adacore.com>
6029 * sinfo.ads: Add comment.
6030 * sem_ch6.adb: Minor reformatting.
6032 2011-08-01 Robert Dewar <dewar@adacore.com>
6034 * freeze.adb (Freeze_Entity): Refine check for bad component size
6035 clause to avoid rejecting confirming clause when atomic/aliased present.
6037 2011-08-01 Ed Schonberg <schonberg@adacore.com>
6039 * sem_ch8.adb (Find_Direct_Name, Analyze_Expanded_Name): use Is_LHS to
6040 better determine whether an entity reference is a write.
6041 * sem_util.adb (Is_LHS): refine predicate to handle assignment to a
6043 * lib-xref.adb (Output_References): Do no suppress a read reference at
6044 the same location as an immediately preceeding modify-reference, to
6045 handle properly in-out actuals.
6047 2011-08-01 Tristan Gingold <gingold@adacore.com>
6049 * env.c (__gnat_setenv) [VMS]: Refine previous change.
6051 2011-08-01 Quentin Ochem <ochem@adacore.com>
6053 * i-cstrin.adb (New_String): Changed implementation, now uses only the
6054 heap to compute the result.
6056 2011-08-01 Robert Dewar <dewar@adacore.com>
6058 * atree.ads: Minor reformatting.
6060 2011-08-01 Emmanuel Briot <briot@adacore.com>
6062 * g-expect.adb (Get_Command_Output): Fix memory leak.
6064 2011-08-01 Geert Bosch <bosch@adacore.com>
6066 * cstand.adb (P_Float_Type): New procedure to print the definition of
6067 predefined fpt types.
6068 (P_Mixed_Name): New procedure to print a name using mixed case
6069 (Print_Standard): Use P_Float_Type for printing floating point types
6070 * einfo.adb (Machine_Emax_Value): Add preliminary support for quad
6071 precision IEEE float.
6073 2011-08-01 Thomas Quinot <quinot@adacore.com>
6075 * sem_ch3.adb: Minor reformatting.
6077 2011-08-01 Ed Schonberg <schonberg@adacore.com>
6079 * sem_ch6.adb (Analyze_Parameterized_Expression): If the expression is
6080 the completion of a generic function, insert the new body rather than
6081 rewriting the original.
6083 2011-08-01 Yannick Moy <moy@adacore.com>
6085 * sinfo.ads, errout.ads: Typos in comments.
6087 2011-08-01 Robert Dewar <dewar@adacore.com>
6089 * par-endh.adb: Minor reformatting.
6091 2011-08-01 Robert Dewar <dewar@adacore.com>
6093 * aspects.ads, aspects.adb: Add aspects for library unit pragmas
6094 (Pre_Post_Aspects): New subtype.
6095 * par-ch12.adb (P_Generic): New syntax for aspects in packages
6096 * par-ch13.adb (P_Aspect_Specifications): Add Semicolon parameter
6097 * par-ch7.adb (P_Package): Remove Decl parameter
6098 (P_Package): Handle new syntax for aspects (before IS)
6099 * par-ch9.adb (P_Protected_Definition): Remove Decl parameter, handle
6101 (P_Task_Definition): Remove Decl parameter, handle new aspect syntax
6102 * par.adb (P_Aspect_Specifications): Add Semicolon parameter
6103 (P_Package): Remove Decl parameter
6104 * sem_ch13.adb (Analyze_Aspect_Specifications): Handle library unit
6106 * sem_ch7.adb (Analyze_Package_Declaration): Analyze new format aspect
6108 * sem_util.ads, sem_util.adb (Static_Boolean): New function
6109 * sinfo.ads: Document new syntax for aspects in packages etc.
6110 * sprint.adb: Handle new syntax of aspects before IS in package
6112 2011-08-01 Thomas Quinot <quinot@adacore.com>
6114 * atree.ads: Minor reformatting.
6115 * sem_prag.adb: Minor reformatting.
6117 2011-08-01 Robert Dewar <dewar@adacore.com>
6119 * exp_util.adb (Insert_Actions): Fix error in handling Actions for
6120 case expr alternative.
6122 2011-08-01 Ed Schonberg <schonberg@adacore.com>
6124 * sem_ch12.adb: Fix typo.
6126 2011-08-01 Geert Bosch <bosch@adacore.com>
6128 * sem_prag.adb (Check_No_Link_Name): New procedure.
6129 (Process_Import_Or_Interface): Use Check_No_Link_Name.
6130 * cstand.adb (Create_Standard): Use Esize (Standard_Long_Long_Float)
6131 instead of Standard_Long_Long_Float_Size global. Preparation for
6132 eventual removal of per type constants.
6133 * exp_util.ads (Get_Stream_Size): New function returning the stream
6134 size value of subtype E.
6135 * exp_util.adb (Get_Stream_Size): Implement new function.
6136 * exp_strm.adb (Build_Elementary_Input_Call): Use Get_Stream_Size
6138 * exp_attr.adb (Attribute_Stream_Size): Use Get_Stream_Size
6140 (Machine_Mantissa_Value): Handle 128-bit quad precision IEEE floats
6142 2011-08-01 Geert Bosch <bosch@adacore.com>
6144 * cstand.adb: Fix comments.
6145 * sem_prag.adb (Analyze_Pragma): Use List_Length instead of explicit
6148 2011-08-01 Robert Dewar <dewar@adacore.com>
6150 * exp_ch4.adb, sem_cat.adb: Minor reformatting.
6152 2011-08-01 Geert Bosch <bosch@adacore.com>
6154 * atree.ads: Fix comment.
6156 2011-08-01 Robert Dewar <dewar@adacore.com>
6158 * aspects.ads, aspects.adb (Aspect_Names): Moved from body to spec.
6159 * par-ch13.adb (P_Aspect_Specifications): Check misspelled aspect name.
6160 * par.adb: Add with for Namet.Sp.
6161 * par-tchk.adb: Minor reformatting.
6163 2011-08-01 Vincent Celier <celier@adacore.com>
6165 * mlib-tgt-specific-vms-alpha.adb, mlib-tgt-specific-vms-ia64.adb
6166 (Build_Dynamic_Library): Use new function Init_Proc_Name to get the name
6167 of the init procedure of a SAL.
6168 * mlib-tgt-vms_common.ads, mlib-tgt-vms_common.adb (Init_Proc_Name):
6171 2011-08-01 Thomas Quinot <quinot@adacore.com>
6173 * exp_ch4.adb, s-tasini.ads, sem_attr.adb, s-soflin.ads: Minor
6176 2011-08-01 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
6178 * adaint.c (__gnat_file_time_name_attr): Get rid of warning.
6180 2011-08-01 Thomas Quinot <quinot@adacore.com>
6182 * sem_util.adb, sem_util.ads (Has_Overriding_Initialize): Make function
6183 conformant with its spec (return True only for types that have
6184 an overriding Initialize primitive operation that prevents them from
6185 having preelaborable initialization).
6186 * sem_cat.adb (Validate_Object_Declaration): Fix test for preelaborable
6187 initialization for controlled types in Ada 2005 or later mode.
6189 2011-08-01 Robert Dewar <dewar@adacore.com>
6191 * aspects.ads, aspects.adb: Add aspect Type_Invariant, Precondition,
6193 (Same_Aspect): New function.
6194 * sem_ch13.adb (Analyze_Aspect_Specifications): Add aspect
6195 Type_Invariant, Precondition, Postcondition.
6196 * snames.ads-tmpl: Add Name_Type_Invariant.
6198 2011-08-01 Robert Dewar <dewar@adacore.com>
6200 * freeze.adb (Freeze_Entity): Don't call Check_Aspect_At_Freeze_Point
6202 (Freeze_All_Ent): Fix error in handling inherited aspects.
6203 * sem_ch13.adb (Analyze_Aspect_Specifications): Skip aspect that is
6204 already analyzed, but don't skip entire processing of a declaration,
6205 that's wrong in some cases of declarations being rewritten.
6206 (Analyze_Aspect_Specification): Set Is_Delayed_Aspect in aspects.
6207 Don't delay for integer, string literals
6208 Treat predicates in usual manner for delay, remove special case code,
6210 (Analyze_Freeze_Entity): Make call to Check_Aspect_At_Freeze_Point
6211 (Build_Predicate_Function): Update saved expression in aspect
6212 (Build_Invariant_Procedure): Update saved expression in aspect
6213 * exp_ch4.adb (Expand_N_Selected_Component): Only do the optimization
6214 of replacement of discriminant references if the reference is simple.
6216 2011-08-01 Robert Dewar <dewar@adacore.com>
6218 * aspects.ads, aspects.adb: Add Static_Predicate and Dynamic_Predicate.
6219 * sem_ch13.adb (Analyze_Aspect_Specification): Add processing for
6220 Static_Predicate and Dynamic_Predicate.
6221 (Build_Predicate_Function): Add processing for Static_Predicate
6222 and Dynamic_Predicate.
6223 * sinfo.ads, sinfo.adb (From_Dynamic_Predicate): New flag
6224 (From_Static_Predicate): New flag
6225 * snames.ads-tmpl: Add Name_Static_Predicate and Name_Dynamic_Predicate
6227 2011-08-01 Robert Dewar <dewar@adacore.com>
6229 * usage.adb: Documentation cleanup for Ada version modes in usage.
6230 * expander.adb: Minor reformatting.
6232 2011-08-01 Robert Dewar <dewar@adacore.com>
6234 * atree.ads: Minor comment fix.
6235 * a-stwifi.adb, a-stzfix.adb, a-strfix.adb, a-ztexio.ads, a-textio.ads,
6236 a-witeio.ads, sem_prag.adb: Minor reformatting.
6238 2011-08-01 Doug Rupp <rupp@adacore.com>
6240 * env.c (__gnat_setenv) [VMS]: Force 32bit on item list structure
6241 pointers. Use descrip.h header file for convenience. Add some
6244 2011-08-01 Robert Dewar <dewar@adacore.com>
6246 * freeze.adb (Freeze_Entity): Call Check_Aspect_At_Freeze_Point
6247 (Freeze_All): Call Check_Aspect_At_End_Of_Declarations
6248 * sem_ch13.ads, sem_ch13.adb (Check_Aspect_At_Freeze_Point):
6250 (Check_Aspect_At_End_Of_Declarations): New procedure
6251 (Analye_Aspect_Specification): Minor changes for above procedures
6252 * sinfo.ads, sinfo.adb (Is_Delayed_Aspect): Now set in aspect
6253 specification node as well.
6255 2011-08-01 Pascal Obry <obry@adacore.com>
6257 * adaint.c (_gnat_stat): GetFilesAttributesEx() would fail on special
6258 Windows files. Use GetFilesAttributes() in this case to check for file
6259 existence instead of returning with an error code.
6261 2011-08-01 Vincent Celier <celier@adacore.com>
6263 * a-stzfix.adb, a-stwifi.adb (Replace_Slice): Fixed computation when
6264 High is above Source length.
6266 2011-08-01 Robert Dewar <dewar@adacore.com>
6268 * a-ztexio.ads, a-textio.ads, a-witeio.ads: Fix comment.
6270 2011-08-01 Robert Dewar <dewar@adacore.com>
6272 * aspects.ads (Boolean_Aspects): New subtype.
6273 * exp_ch13.adb (Expand_Freeze_Entity): Fix errors in handling aspects
6274 for derived types in cases where the parent type and derived type have
6276 * freeze.adb (Freeze_Entity): Fix problems in handling derived type
6277 with aspects when parent type also has aspects.
6278 (Freeze_Entity): Deal with delay of boolean aspects (must evaluate
6279 boolean expression at this point).
6280 * sem_ch13.adb (Analyze_Aspect_Specifications): Delay all aspects in
6281 accordance with final decision on the Ada 2012 feature.
6282 * sinfo.ads, sinfo.adb (Is_Boolean_Aspect): New flag.
6284 2011-08-01 Matthew Heaney <heaney@adacore.com>
6286 * a-chtgbo.adb (Delete_Node_Sans_Free): Replace iterator with selector.
6288 2011-08-01 Pascal Obry <obry@adacore.com>
6290 * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb:
6291 Fix Replace_Slice when High is above current string size.
6292 (Replace_Slice): Fix DL computation when High is above current
6295 2011-08-01 Gary Dismukes <dismukes@adacore.com>
6297 * gnat_rm.texi: Add documentation for pragma Static_Elaboration_Desired.
6299 2011-08-01 Matthew Heaney <heaney@adacore.com>
6301 * a-rbtgbo.adb (Delete_Node_Sans_Free): Fixed assignment to left child
6304 2011-08-01 Pascal Obry <obry@adacore.com>
6306 * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb: Minor
6309 2011-08-01 Ed Schonberg <schonberg@adacore.com>
6311 * sem_attr.adb (Analyze_Attribute, case 'Access): Handle properly named
6312 access to protected subprograms in generic bodies.
6313 * sem_ch6.adb (Analyze_Subprogram_Declaration): If the context is a
6314 protected type, indicate that the convention of the subprogram is
6315 Convention_Protected, because it may be used in subsequent declarations
6316 within the protected declaration.
6318 2011-08-01 Vincent Celier <celier@adacore.com>
6320 * mlib-prj.adb (Build_Library): Use "ada_" as the prefix for the "init"
6321 and "final" procedures when the name of the library is "ada", to avoid
6322 duplicate symbols "adainit" and "adafinal" in executables.
6324 2011-08-01 Ed Schonberg <schonberg@adacore.com>
6326 * sem_attr.adb (Analyze_Attribute, case 'Result): Handle properly a
6327 quantified expression that appears within a postcondition and uses the
6328 Ada2012 'Result attribute.
6330 2011-07-28 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
6332 * init.c (__gnat_error_handler): Cast reason to int.
6333 (__gnat_install_handler): Explain sa_sigaction use.
6335 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
6337 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: If the
6338 subprogram has copy-in copy-out parameters, try to promote the mode of
6339 the return type if it is passed in registers.
6341 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
6343 * gcc-interface/utils2.c (build_binary_op) <ARRAY_REF>: Do not mark the
6344 left operand as addressable.
6346 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
6348 * gcc-interface/gigi.h (build_function_stub): Remove.
6349 (build_return_expr): Likewise.
6350 (convert_vms_descriptor): Declare.
6351 * gcc-interface/utils.c (convert_vms_descriptor): Make global.
6352 (build_function_stub): Move to...
6353 * gcc-interface/utils2.c (build_return_expr): Move to...
6354 * gcc-interface/trans.c (build_function_stub): ...here.
6355 (build_return_expr): ...here.
6356 (Subprogram_Body_to_gnu): Add local variable for language_function.
6357 Disconnect the parameter attributes cache, if any, once done with it.
6358 Call end_subprog_body only after setting the end_locus.
6359 Build the stub associated with the function, if any, at the very end.
6360 (gnat_to_gnu) <N_Return_Statement>: Remove couple of useless local
6361 variables and streamline control flow.
6363 2011-07-23 Arnaud Charlet <charlet@adacore.com>
6366 * gcc-interface/Makefile.in (powerpc-linux): Remove reference to
6369 2011-07-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
6372 * init.c [sun && __SVR4 && !__vxworks] (__gnat_install_handler):
6373 Assign to act.sa_sigaction.
6374 * tracebak.c [USE_GENERIC_UNWINDER] (__gnat_backtrace): Cast
6375 current->return_address to char * before arithmetic.
6377 2011-07-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
6379 * init.c [sgi] (__gnat_error_handler): Update sigaction(2) citation.
6380 Correct argument types.
6381 Extract code from reason.
6382 (__gnat_install_handler): Assign to act.sa_sigaction.
6384 2011-07-21 Eric Botcazou <ebotcazou@adacore.com>
6386 * gcc-interface/Make-lang.in (GNAT1_ADA_OBJS): Move ada/b_gnat1.o to...
6387 (GNAT1_OBJS): ...here.
6389 2011-07-15 Eric Botcazou <ebotcazou@adacore.com>
6392 * g-socthi-mingw.adb (Fill): Fix formatting.
6394 * gcc-interface/gigi.h: Move around comment.
6396 2011-07-14 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
6399 * s-taprop-hpux-dce.adb (Abort_Task): Remove unnecessary cast.
6401 2011-07-14 Florian Weimer <fw@deneb.enyo.de>
6404 * g-socthi-mingw.adb (Fill): Guard against invalid MSG_WAITALL.
6406 2011-07-13 Eric Botcazou <ebotcazou@adacore.com>
6408 * gcc-interface/utils.c (build_vms_descriptor32): Skip the 32-bit
6409 range comparison if Pmode is SImode.
6411 2011-07-12 Laurent GUERBY <laurent@guerby.net>
6412 Eric Botcazou <ebotcazou@adacore.com>
6414 * adadecode.c: Wrap up in extern "C" block.
6415 * adadecode.h: Likewise.
6416 * adaint.c: Likewise. Remove 'const' keyword.
6417 * adaint.h: Likewise.
6419 * atree.h: Likewise.
6421 * cstreams.c: Likewise.
6425 * final.c: Likewise.
6427 * initialize.c: Likewise.
6429 * namet.h: Likewise.
6430 * nlists.h: Likewise.
6431 * raise.c: Likewise.
6432 * raise.h: Likewise.
6433 * repinfo.h: Likewise.
6434 * seh_init.c: Likewise.
6435 * targext.c: Likewise.
6436 * tracebak.c: Likewise.
6437 * uintp.h: Likewise.
6438 * urealp.h: Likewise.
6439 * xeinfo.adb: Wrap up generated C code in extern "C" block.
6440 * xsinfo.adb: Likewise.
6441 * xsnamest.adb: Likewise.
6442 * gcc-interface/gadaint.h: Wrap up in extern "C" block.
6443 * gcc-interface/gigi.h: Wrap up some prototypes in extern "C" block.
6444 * gcc-interface/misc.c: Likewise.
6445 * gcc-interface/Make-lang.in (GCC_LINK): Use LINKER.
6446 (GNAT1_C_OBJS): Remove ada/b_gnat1.o. List ada/seh_init.o and
6447 ada/targext.o here...
6448 (GNAT_ADA_OBJS): ...and not here.
6449 (GNAT1_ADA_OBJS): Add ada/b_gnat1.o.
6450 (GNATBIND_OBJS): Reorder.
6452 2011-07-07 Richard Henderson <rth@redhat.com>
6454 * gcc-interface/misc.c (gnat_init_gcc_eh): Don't call
6455 dwarf2out_frame_init.
6457 2011-07-07 Eric Botcazou <ebotcazou@adacore.com>
6459 * gcc-interface/misc.c (gnat_init): Tweak previous change.
6461 2011-07-07 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
6464 * gcc-interface/Makefile.in: Handle x86_64-solaris2.
6466 2011-07-06 Richard Guenther <rguenther@suse.de>
6468 * gcc-interface/misc.c (gnat_init): Merge calls to
6469 build_common_tree_nodes and build_common_tree_nodes_2.
6470 Re-initialize boolean_false_node.
6472 2011-07-02 Eric Botcazou <ebotcazou@adacore.com>
6473 Olivier Hainque <hainque@adacore.com>
6474 Nicolas Setton <setton@adacore.com>
6476 * gcc-interface/utils.c (record_builtin_type): Set TYPE_ARTIFICIAL on
6477 the type according to the ARTIFICIAL_P parameter.
6478 (create_type_decl): Likewise.
6479 (create_type_stub_decl): Set TYPE_ARTIFICIAL on the type to 1.
6481 2011-07-01 Eric Botcazou <ebotcazou@adacore.com>
6483 * gcc-interface/Make-lang.in (gnat1): Prepend '+' to the command.
6484 (gnatbind): Likewise.
6486 2011-06-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
6488 * gcc-interface/Makefile.in (TOOLS_LIBS): Add $(LIBINTL).
6490 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
6492 * gcc-interface/decl.c (gnat_to_gnu_component_type): Use GNAT_TYPE
6493 local variable throughout. Remove useless call to Base_Type.
6494 (gnat_to_gnu_field): Use GNAT_FIELD_TYPE local variable throughout.
6495 Take it also into account for the volatileness of the field. Set the
6496 TREE_SIDE_EFFECTS flag as well in this case. Reorder some warnings.
6498 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
6500 * gcc-interface/trans.c (Identifier_to_gnu): Don't set TREE_THIS_NOTRAP
6501 on a dereference built for a by-ref object if it has an address clause.
6503 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
6505 * einfo.ads (Address_Taken): Document use for the second argument of
6506 Asm_Input and Asm_Output attributes.
6507 * sem_attr.adb (Analyze_Attribute) <Attribute_Asm_Input>: If the second
6508 argument is an entity name, then set Address_Taken on it.
6509 <Attribute_Asm_Output>: Likewise.
6510 * gcc-interface/trans.c (lvalue_required_for_attribute_p): Handle the
6511 Attr_Asm_Input and Attr_Asm_Output attributes explicitly.
6512 (gnat_to_gnu) <N_Code_Statement>: If an operand is going to end up in
6513 memory and is a CONST_DECL, retrieve its corresponding VAR_DECL.
6515 2011-06-16 Joern Rennecke <joern.rennecke@embecosm.com>
6518 * gcc-interface/decl.c (gnat_to_gnu_param): Use pack_cumulative_args.
6520 2011-06-14 Joseph Myers <joseph@codesourcery.com>
6522 * gcc-interface/Make-lang.in (gnatbind$(exeext)): Use ggc-none.o.
6523 (ada/utils.o): Update dependencies.
6524 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Add
6525 ../../../libcpp/libcpp.a.
6526 * gcc-interface/utils.c: Include common/common-target.h.
6527 (process_attributes): Use targetm_common.have_named_sections.
6529 2011-06-07 Richard Guenther <rguenther@suse.de>
6531 * gcc-interface/misc.c (gnat_init): Do not set size_type_node or call
6534 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
6536 * gcc-interface/utils2.c (gnat_stabilize_reference): Propagate the
6537 TREE_THIS_NOTRAP flag.
6539 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
6541 * gcc-interface/utils2.c (gnat_stabilize_reference) <COMPOUND_EXPR>:
6544 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
6546 * gcc-interface/trans.c (Identifier_to_gnu): Also handle deferred
6547 constants whose full view has discriminants specially.
6549 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
6551 * gcc-interface/utils.c: Include diagnostic.h.
6552 (gnat_write_global_declarations): Output debug information for all
6553 global type declarations before finalizing the compilation unit.
6554 * gcc-interface/Make-lang.in (ada/utils.o): Add dependency.
6556 2011-05-25 Jakub Jelinek <jakub@redhat.com>
6558 * gcc-interface/utils.c (def_fn_type): Remove extra va_end.
6560 2011-05-25 Kai Tietz <ktietz@redhat.com>
6562 * adaint.c (__gnat_to_canonical_file_list_next): Use array
6563 initialization instead of const/none-const pointer assignment.
6565 2011-05-24 Joseph Myers <joseph@codesourcery.com>
6567 * gcc-interface/Make-lang.in (GNAT1_OBJS): Don't include
6568 $(EXTRA_GNAT1_OBJS).
6569 (GNATBIND_OBJS): Don't include $(EXTRA_GNATBIND_OBJS).
6570 (EXTRA_GNAT1_OBJS, EXTRA_GNATBIND_OBJS): Remove.
6571 (gnat1$(exeext), gnatbind$(exeext)): Use libcommon-target.a.
6572 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use
6573 libcommon-target.a instead of prefix.o.
6575 2011-05-21 Joseph Myers <joseph@codesourcery.com>
6578 * gcc-interface/Make-lang.in (gnatbind$(exeext)): Depend on $(LIBDEPS).
6580 2011-05-20 Joseph Myers <joseph@codesourcery.com>
6582 * gcc-interface/Make-lang.in (EXTRA_GNATBIND_OBJS): Remove version.o.
6583 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use libcommon.a
6584 instead of version.o.
6586 2011-05-18 Kai Tietz <ktietz@redhat.com>
6588 * gcc-interface/trans.c (Exception_Handler_to_gnu_sjlj): Use
6589 boolean_false_node instead of integer_zero_node.
6590 (convert_with_check): Likewise.
6591 * gcc-interface/decl.c (choices_to_gnu): Likewise.
6593 2011-05-12 Eric Botcazou <ebotcazou@adacore.com>
6595 * gcc-interface/trans.c (call_to_gnu): In the by-reference case, if the
6596 type of the parameter is an unconstrained array, convert the actual to
6597 the type of the formal in the In Out and Out cases as well.
6599 2011-05-11 Nathan Froyd <froydnj@codesourcery.com>
6601 * gcc-interface/utils.c (def_fn_type): Don't call build_function_type;
6602 call build_function_type_array or build_varargs_function_type_array
6604 (create_subprog_type): Don't call build_function_type; call
6605 build_function_type_vec instead.
6607 2011-05-11 Nathan Froyd <froydnj@codesourcery.com>
6609 * gcc-interface/ada-tree.h (TYPE_OBJECT_RECORD_TYPE): Use TYPE_MINVAL.
6610 (TYPE_GCC_MIN_VALUE): Use TYPE_MINVAL.
6611 (TYPE_GCC_MAX_VALUE): Use TYPE_MAXVAL.
6613 2011-05-07 Eric Botcazou <ebotcazou@adacore.com>
6615 * gcc-interface/decl.c (intrin_arglists_compatible_p): Remove spaces.
6617 * gcc-interface/gigi.h (global_bindings_p): Adjust prototype.
6618 * gcc-interface/utils.c (global_bindings_p): Return bool and simplify.
6620 2011-05-05 Nathan Froyd <froydnj@codesourcery.com>
6622 * gcc-interface/trans.c (Case_Statement_to_gnu): Call build_case_label.
6624 2011-05-05 Nathan Froyd <froydnj@codesourcery.com>
6626 * gcc-interface/decl.c (intrin_arglists_compatible_p): Use iterators
6627 instead of accessing TYPE_ARG_TYPES directly.
6628 * gcc-interface/utils.c (handle_nonnull_attribute): Likewise.
6630 2011-05-05 Eric Botcazou <ebotcazou@adacore.com>
6633 * gcc-interface/gigi.h (get_variant_part): Declare.
6634 * gcc-interface/decl.c (get_variant_part): Make global.
6635 * gcc-interface/utils2.c (find_common_type): Do not return T1 if the
6636 types have the same constant size, are record types and T1 has a
6637 variant part while T2 doesn't.
6639 2011-05-05 Eric Botcazou <ebotcazou@adacore.com>
6641 * gcc-interface/utils.c (begin_subprog_body): Do not call
6643 (end_subprog_body): Likewise.
6645 2011-05-04 Richard Guenther <rguenther@suse.de>
6647 * gcc-interface/trans.c (gnat_to_gnu): Remove zero notrunc argument to
6649 (pos_to_constructor): Likewise.
6651 2011-05-03 Nathan Froyd <froydnj@codesourcery.com>
6652 Eric Botcazou <ebotcazou@adacore.com>
6654 * gcc-interface/trans.c (gigi): Call build_function_type_list instead
6655 of build_function_type. Adjust calls to...
6656 (build_raise_check): ...this. Do not take a void_tree parameter.
6657 Call build_function_type_list instead of build_function_type.
6658 Fix head comment and swap couple of conditional blocks.
6660 2011-04-30 Eric Botcazou <ebotcazou@adacore.com>
6662 * gnatvsn.ads (Library_Version): Bump to 4.7.
6663 (Current_Year): Bump to 2011.
6665 2011-04-29 Michael Matz <matz@suse.de>
6667 * gcc-interface/misc.c (gnat_handle_option): Set
6668 warn_maybe_uninitialized.
6670 2011-04-23 Gerald Pfeifer <gerald@pfeifer.com>
6672 * gnat_ugn.texi (Complexity Metrics Control): Update link to
6673 the Watson/McCabe paper.
6675 2011-04-23 Jim Meyering <meyering@redhat.com>
6677 * gnat_ugn.texi (Examples of gnatxref Usage): Fix typo: s/it it/it is/
6679 2011-04-22 Eric Botcazou <ebotcazou@adacore.com>
6681 * gcc-interface/decl.c (make_packable_type): Copy DECL_PARALLEL_TYPE
6684 2011-04-22 Eric Botcazou <ebotcazou@adacore.com>
6686 * gcc-interface/gigi.h (create_subprog_decl): Add ARTIFICIAL_FLAG
6688 * gcc-interface/utils.c (create_subprog_decl): Likewise. Set
6689 DECL_ARTIFICIAL and DECL_NO_INLINE_WARNING_P on the DECL accordingly.
6690 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: Add
6691 ARTIFICIAL_FLAG local variable and pass it to create_subprog_decl.
6692 <all>: Do not set flags on the reused DECL node coming from an alias.
6693 Set DECL_IGNORED_P on the DECL node built for subprograms if they
6694 don't need debug info here...
6695 * gcc-interface/trans.c (Subprogram_Body_to_gnu): ...and not here.
6696 (gigi): Adjust calls to create_subprog_decl.
6697 (build_raise_check): Likewise.
6698 (establish_gnat_vms_condition_handler): Likewise.
6699 (Compilation_Unit_to_gnu): Likewise.
6700 (gnat_to_gnu): Likewise.
6702 2011-04-21 Eric Botcazou <ebotcazou@adacore.com>
6704 * gcc-interface/Makefile.in (NO_SIBLING_ADAFLAGS): Always define.
6705 (NO_REORDER_ADAFLAGS): New variable.
6706 (EXTRA_GNATTOOLS): Always define.
6707 (../stamp-gnatlib1-$(RTSDIR): Copy tsystem.h.
6708 Clean up and adjust list of files compiled with special options.
6709 * gcc-interface/Make-lang.in: Likewise.
6710 (ada/decl.o): Cosmetical change.
6711 (ada/misc.o): Remove dependency on $(PLUGIN_H).
6713 2011-04-20 Jim Meyering <meyering@redhat.com>
6715 * initialize.c (__gnat_initialize): Remove useless if-before-free.
6717 2011-04-17 Eric Botcazou <ebotcazou@adacore.com>
6719 * gcc-interface/Make-lang.in (gnatbind): Replace $(ALL_CFLAGS) with
6720 $(CFLAGS) on the link line.
6722 2011-04-17 Eric Botcazou <ebotcazou@adacore.com>
6724 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Function>: Declare the
6725 padded type built for the return type if it is unconstrained.
6727 2011-04-14 Nathan Froyd <froydnj@codesourcery.com>
6729 * gcc-interface/utils.c (gnat_poplevel): Use block_chainon.
6731 2011-04-12 Nathan Froyd <froydnj@codesourcery.com>
6733 * gcc-interface/ada-tree.h (union lang_tree_node): Check for TS_COMMON
6734 before calling TREE_CHAIN.
6735 * gcc-interface/misc.c (gnat_init_ts): New function.
6736 (LANG_HOOKS_INIT_TS): Define.
6738 2011-04-12 Martin Jambor <mjambor@suse.cz>
6740 * gcc-interface/utils.c (end_subprog_body): Call cgraph_get_create_node
6741 instead of cgraph_node.
6743 2011-04-08 Eric Botcazou <ebotcazou@adacore.com>
6745 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Procedure>: Set minimum
6746 alignment on fields of the RETURN type built for the Copy-In Copy-Out
6749 2011-04-08 Eric Botcazou <ebotcazou@adacore.com>
6751 * gcc-interface/trans.c (Identifier_to_gnu): Do not return initializers
6752 of aggregate types that contain a placeholder.
6754 2011-04-08 Nathan Froyd <froydnj@codesourcery.com>
6756 * gcc-interface/utils.c (handle_sentinel_attribute): Don't use
6758 (handle_type_generic_attribute): Likewise.
6760 2011-04-04 Eric Botcazou <ebotcazou@adacore.com>
6763 * s-oscons-tmplt.c (MSG_WAITALL): Fix thinko in previous change.
6765 2011-04-04 Kai Tietz <ktietz@redhat.com>
6768 * s-oscons-tmplt.c (MSG_WAITALL): Define it for native windows targets
6771 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
6773 * gcc-interface/utils2.c (build_allocator): In the unconstrained array
6774 type case, do not strip a padding type around the array type.
6776 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
6778 * gcc-interface/utils.c (update_pointer_to): Finalize named pointer
6781 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
6783 * gcc-interface/lang.opt (feliminate-unused-debug-types): Delete.
6784 * gcc-interface/misc.c (gnat_handle_option): Remove special handling
6785 code for -feliminate-unused-debug-types.
6786 (gnat_post_options): Likewise.
6788 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
6790 * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
6791 declaration of a pointer type, then set DECL_ORIGINAL_TYPE to a
6794 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
6796 * gcc-interface/decl.c (gnat_to_gnu_entity): Do not force the
6797 DECL_ARTIFICIAL flag on enumeration types.
6799 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
6801 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: Do not make
6802 fat pointer types artificial unconditionally.
6803 <E_Array_Subtype>: Attach the base array type as a parallel type if it
6806 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
6808 * gcc-interface/gigi.h (get_dummy_type): Declare.
6809 (build_dummy_unc_pointer_types): Likewise.
6810 (finish_fat_pointer_type): Likewise.
6811 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: If a dummy
6812 fat pointer type has been built, complete it in place.
6813 <E_Access_Type>: Call build_dummy_unc_pointer_types to build dummy fat
6814 and thin pointers. Remove useless variable.
6815 (finish_fat_pointer_type): Make global and move to...
6816 * gcc-interface/utils.c (finish_fat_pointer_type): ...here.
6817 (get_dummy_type): New function.
6818 (build_dummy_unc_pointer_types): Likewise.
6819 (gnat_pushdecl): Propage the name to the anonymous variants only.
6820 (update_pointer_to): Only adjust the pointer types in the unconstrained
6823 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
6825 * gcc-interface/ada-tree.h (DECL_TAFT_TYPE_P): New flag.
6826 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Incomplete_Type>: Set it
6827 if this is a Taft amendment type and the full declaration is available.
6828 * gcc-interface/trans.c (process_type): Likewise.
6829 If there is an old type, mark the new one as used if DECL_TAFT_TYPE_P.
6830 (process_freeze_entity): Likewise.
6831 * gcc-interface/utils.c (dummy_global): New static variable.
6832 (gnat_write_global_declarations): If there are types declared as used
6833 at the global level, insert them in the global hash table.
6835 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
6837 * gcc-interface/gigi.h (record_builtin_type): Add ARTIFICIAL_P param.
6838 * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
6839 declaration of an array type, then set DECL_ORIGINAL_TYPE to a distinct
6841 (record_builtin_type): Add ARTIFICIAL_P parameter. Set DECL_ARTIFICIAL
6842 flag of the type accordingly.
6843 * gcc-interface/trans.c (gigi): Adjust calls to record_builtin_type.
6845 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
6847 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
6848 finalizing types when updating the pointers to the designated type.
6849 <all>: Finalize the deferred types even if we didn't defer processing
6850 of incomplete types in this invocation.
6852 2011-04-01 Olivier Hainque <hainque@adacore.com>
6853 Nicolas Setton <setton@adacore.com>
6854 Eric Botcazou <ebotcazou@adacore.com>
6856 * gcc-interface/misc.c (gnat_descriptive_type): New function.
6857 (LANG_HOOKS_DESCRIPTIVE_TYPE): Redefine to gnat_descriptive_type.
6859 2011-03-28 Kai Tietz <ktietz@redhat.com>
6861 * gcc-interface/Makefile.in (SO_LIB): Handle multilib build for native
6863 (EH_MECHANISM): Use GCC exception mechanism for native Windows targets.
6864 * system-mingw.ads (System): Change ZCX_By_Default default to True.
6866 * raise-gcc.c (PERSONALITY_FUNCTION): Add prototype.
6868 2011-03-28 Tristan Gingold <gingold@adacore.com>
6871 * gcc-interface/Make-lang.in (ada/b_gnat1.adb): Replace ada/b_gnat1.c.
6872 Use ada output of gnatbind.
6873 (ada/b_gnatb.adb): Ditto.
6874 (ada/b_gnat1.o, ada/b_gnatb.o): New rules.
6875 (ada.mostlyclean, ada.stage1)
6876 (ada.stage2, ada.stage3, ada.stage4, ada.stageprofile)
6877 (ada.stagefeedback): Adjust.
6878 * gcc-interface/Makefile.in (b_gnatl.adb): Replace b_gnatl.c.
6879 Use ada output of gnatbind.
6880 (b_gnatm.adb): Ditto.
6881 (b_gnatl.o, b_gnatm.o): New rules.
6883 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
6885 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
6886 for the padded type built to support a specified size or alignment.
6888 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
6890 * gcc-interface/gigi.h (finalize_from_with_types): Adjust comment.
6891 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
6892 unconditionally to the end of the unit when the designated type is
6894 <all>: Rename local variable. Attempt to un-defer types only and do it
6895 for limited_with'ed types as well.
6896 (finalize_from_with_types): Adjust comment. Rename variable and tidy.
6897 * gcc-interface/trans.c (Compilation_Unit_to_gnu): Use GNAT_UNIT
6898 consistently and remove redundant call to finalize_from_with_types.
6900 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
6902 * inline.adb (Back_End_Cannot_Inline): Lift restriction on calls to
6903 subprograms without a previous spec declared in the same unit.
6904 * gcc-interface/trans.c (Compilation_Unit_to_gnu): Process inlined
6905 subprograms at the end of the unit instead of at the beginning.
6906 * gcc-interface/utils.c (create_subprog_decl): Check that the entity
6907 isn't public for the special handling of non-inline functions nested
6908 inside inline external functions.
6910 2011-03-25 Jeff Law <law@redhat.com>
6912 * gcc-interface/utils.c (def_fn_type): Add missing va_end.
6914 2011-03-24 Eric Botcazou <ebotcazou@adacore.com>
6916 * einfo.ads (Size_Depends_On_Discriminant): Adjust description.
6917 * layout.adb (Compute_Size_Depends_On_Discriminant): New procedure
6918 to compute Set_Size_Depends_On_Discriminant.
6919 (Layout_Type): Call it on array types in back-end layout mode.
6920 * sem_util.adb (Requires_Transient_Scope): Return true for array
6921 types only if the size depends on the value of discriminants.
6922 * gcc-interface/utils2.c (build_binary_op) <MODIFY_EXPR>: Use the RHS
6923 type if the RHS is a call to a function that returns an unconstrained
6924 type with default discriminant.
6926 2011-03-24 Eric Botcazou <ebotcazou@adacore.com>
6928 * gcc-interface/trans.c (gnat_to_gnu): Remove obsolete case of
6929 non-conversion to the nominal result type at the end.
6931 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
6933 * gcc-interface/trans.c (create_temporary): New function taken from...
6934 (create_init_temporary): ...here. Call it.
6935 (call_to_gnu): Create the temporary for the return value early, if any.
6936 Create it for a function with copy-in/copy-out parameters if there is
6937 no target; in other cases of copy-in/copy-out, use another temporary.
6938 Push the new binding level lazily. Add and rename local variables.
6940 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
6942 * gcc-interface/decl.c (validate_size): Improve comments and tweak
6944 (set_rm_size): Likewise.
6946 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
6948 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
6949 for the padded type built in order to support a specified alignment.
6950 Fix incorrect formatting.
6952 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
6955 * gcc-interface/decl.c (elaborate_expression_1): Localize GNU_DECL.
6957 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
6959 * gcc-interface/decl.c (components_to_record): Add REORDER parameter,
6960 rename DEBUG_INFO_P into DEBUG_INFO and move P_GNU_REP_LIST parameter
6961 to the end of the list. Adjust recursive call. Rename local variable.
6962 If REORDER is true, reorder components of the record type.
6963 (gnat_to_gnu_entity): Pass OK_To_Reorder_Components flag as argument to
6964 components_to_record and adjust the parameter list.
6966 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
6968 * gcc-interface/decl.c (elaborate_expression_1): When optimization is
6969 disabled, use the variable for bounds of loop iteration scheme.
6971 2011-03-21 Kai Tietz <ktietz@redhat.com>
6974 * gcc-interface/utils.c (gnat_internal_attribute_table): Add column.
6976 2011-03-17 Eric Botcazou <ebotcazou@adacore.com>
6978 * gcc-interface/decl.c (elaborate_expression_1): Try harder to find
6979 out whether the expression is read-only. Short-circuit placeholder
6980 case and rename a couple of local variables.
6982 2011-03-17 Eric Botcazou <ebotcazou@adacore.com>
6984 * gcc-interface/gigi.h (smaller_form_type_p): Declare.
6985 * gcc-interface/trans.c (smaller_form_type_p): Make global and move...
6986 * gcc-interface/utils.c (smaller_form_type_p): ...to here.
6987 (convert): Deal with conversions from a smaller form type specially.
6989 2011-02-14 Eric Botcazou <ebotcazou@adacore.com>
6991 * gcc-interface/misc.c (gnat_init_options): Do not concatenate -I and
6992 its argument, except for the special -I- switch.
6994 2011-02-12 Gerald Pfeifer <gerald@pfeifer.com>
6996 * gnat_ugn.texi (Compiling Different Versions of Ada): Update link to
6999 2011-02-08 Eric Botcazou <ebotcazou@adacore.com>
7001 * gcc-interface/Makefile.in (x86-64 darwin): Handle multilibs.
7003 2011-02-03 Eric Botcazou <ebotcazou@adacore.com>
7005 * gcc-interface/gigi.h (fill_vms_descriptor): Take GNU_TYPE instead of
7007 * gcc-interface/utils2.c (fill_vms_descriptor): Move from here to...
7008 * gcc-interface/utils.c (fill_vms_descriptor): ...here. Take GNU_TYPE
7009 instead of GNAT_FORMAL. Protect the expression against multiple uses.
7010 Do not generate the check directly, instead instantiate the template
7011 check present in the descriptor.
7012 (make_descriptor_field): Move around.
7013 (build_vms_descriptor32): Build a template check in the POINTER field.
7014 (build_vms_descriptor): Remove useless suffixes.
7015 * gcc-interface/trans.c (call_to_gnu): Adjust fill_vms_descriptor call.
7017 2011-01-26 Eric Botcazou <ebotcazou@adacore.com>
7020 * targext.c: Include target files if IN_RTS is defined.
7022 2011-01-26 Richard Guenther <rguenther@suse.de>
7025 * targext.c: Include config.h.
7026 * gcc-interface/Make-lang.in (ada/targext.o): Add $(CONFIG_H)
7029 2011-01-04 Pascal Obry <obry@adacore.com>
7030 Eric Botcazou <ebotcazou@adacore.com>
7032 * gcc-interface/decl.c: Disable Stdcall convention handling for 64-bit.
7034 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
7036 * gcc-interface/trans.c (Case_Statement_to_gnu): Put the SLOC of the
7037 end-of-case on the end label and its associated gotos, if any.
7039 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
7041 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Evaluate the
7042 expressions of the parameter cache within the statement group of
7045 2011-01-04 Olivier Hainque <hainque@adacore.com>
7046 Eric Botcazou <ebotcazou@adacore.com>
7048 * gcc-interface/trans.c (BLOCK_SOURCE_END_LOCATION): Provide default.
7049 (set_end_locus_from_node): New function.
7050 (Subprogram_Body_to_gnu): Use it to mark both the inner BIND_EXPR we
7051 make and the function end_locus.
7052 (Compilation_Unit_to_gnu): Call it instead of a straight Sloc_to_locus
7053 for the elaboration subprogram.
7054 (set_gnu_expr_location_from_node) <default case>: Use it to attempt to
7055 set the end_locus of the expression as well.
7057 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
7060 * gcc-interface/trans.c (Identifier_to_gnu): In SJLJ mode, do not make
7061 variables that are referenced in exception handlers volatile.
7065 Copyright (C) 2011 Free Software Foundation, Inc.
7067 Copying and distribution of this file, with or without modification,
7068 are permitted in any medium without royalty provided the copyright
7069 notice and this notice are preserved.