1 2011-08-02 Vincent Celier <celier@adacore.com>
3 * link.c: Only import "auto-host.h" when building the gnattools.
5 2011-08-02 Yannick Moy <moy@adacore.com>
7 * sem_util.adb: Inter-unit inlining does not work for a subprogram
8 which calls a local subprogram, so extract subprogram
9 from Mark_Non_ALFA_Subprogram_Body.
11 2011-08-02 Javier Miranda <miranda@adacore.com>
14 (Extract_Dispatching_Call): If the type of the dispatching object is an
15 access type then return an explicit dereference in the Object out-mode
18 2011-08-02 Gary Dismukes <dismukes@adacore.com>
20 * sem_ch3.adb (Analyze_Subtype_Declaration): Generate range
21 compatibility checks for all indexes of an array subtype, not just the
22 first. Reset Has_Dynamic_Range_Check on the subtype before each
23 potential check to ensure that Insert_Range_Checks will not elide any
24 of the dynamic checks.
26 2011-08-02 Yannick Moy <moy@adacore.com>
28 * par-prag.ad (Process_Restrictions_Or_Restriction_Warnings): recognize
29 SPARK restriction at parsing time.
30 * scng.adb (Scan): Generate a token Tok_SPARK_Hide for a SPARK HIDE
31 directive only if the SPARK restriction is set for this unit.
33 2011-08-02 Yannick Moy <moy@adacore.com>
35 * sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_util.adb, sem_util.ads,
36 sem_res.adb, sem_ch2.adb, sem_ch4.adb, sem_ch6.adb,
37 sem_ch11.adb: Protect call to Current_Subprogram which might be costly
38 when repeated. Rename Current_Subprogram_Is_Not_In_ALFA into
39 Mark_Non_ALFA_Subprogram_Body.
40 Split body of Mark_Non_ALFA_Subprogram_Body to get body small and
43 2011-08-02 Yannick Moy <moy@adacore.com>
45 * sem_res.adb: Protect calls to Matching_Static_Array_Bounds which
48 2011-08-02 Robert Dewar <dewar@adacore.com>
50 * exp_ch9.adb, exp_sel.adb, restrict.ads, exp_disp.adb, erroutc.ads,
51 exp_ch3.adb: Minor reformatting.
53 2011-08-02 Emmanuel Briot <briot@adacore.com>
55 * adaint.c (__gnat_locate_exec_on_path): only returns executable
56 files, not any regular file.
57 (__gnat_locate_file_with_predicate): new subprogram.
59 2011-08-02 Yannick Moy <moy@adacore.com>
61 * sinfo.adb, sinfo.ads: Restrict the use of flags
62 Has_Dynamic_Length_Check and Has_Dynamic_Range_Check to expression
63 nodes, plus N_Subtype_Declaration for the 2nd one.
65 2011-08-02 Sergey Rybin <rybin@adacore.com>
67 * gnat_rm.texi: Ramification of pragma Eliminate documentation
68 - fix bugs in the description of Source_Trace;
69 - get rid of UNIT_NAME;
71 2011-08-02 Javier Miranda <miranda@adacore.com>
74 (Build_Dispatching_Requeue): Adding support for VM targets
75 since we cannot directly reference the Tag entity.
76 * exp_sel.adb (Build_K): Adding support for VM targets.
77 (Build_S_Assignment): Adding support for VM targets.
79 (Default_Prim_Op_Position): In VM targets do not restrict availability
80 of predefined interface primitives to compiling in Ada 2005 mode.
81 (Is_Predefined_Interface_Primitive): In VM targets this service is not
82 restricted to compiling in Ada 2005 mode.
83 (Make_VM_TSD): Generate code that declares and initializes the OSD
84 record. Needed to support dispatching calls through synchronized
87 (Make_Predefined_Primitive_Specs): Enable generation of predefined
88 primitives associated with synchronized interfaces.
89 (Make_Predefined_Primitive_Bodies): Enable generation of predefined
90 primitives associated with synchronized interfaces.
92 2011-08-02 Yannick Moy <moy@adacore.com>
94 * par-ch11.adb (P_Handled_Sequence_Of_Statements): mark a sequence of
95 statements hidden in SPARK if preceded by the HIDE directive
96 (Parse_Exception_Handlers): mark each exception handler in a sequence of
97 exception handlers as hidden in SPARK if preceded by the HIDE directive
98 * par-ch6.adb (P_Subprogram): mark a subprogram body hidden in SPARK
99 if starting with the HIDE directive
100 * par-ch7.adb (P_Package): mark a package body hidden in SPARK if
101 starting with the HIDE directive; mark the declarations in a private
102 part as hidden in SPARK if the private part starts with the HIDE
104 * restrict.adb, restrict.ads
105 (Set_Hidden_Part_In_SPARK): record a range of slocs as hidden in SPARK
106 (Is_In_Hidden_Part_In_SPARK): new function which returns whether its
107 argument node belongs to a part which is hidden in SPARK
108 (Check_SPARK_Restriction): do not issue violations on nodes in hidden
109 parts in SPARK; protect the possibly costly call to
110 Is_In_Hidden_Part_In_SPARK by a check that the SPARK restriction is on
111 * scans.ads (Token_Type): new value Tok_SPARK_Hide in enumeration
112 * scng.adb (Accumulate_Token_Checksum_GNAT_6_3,
113 Accumulate_Token_Checksum_GNAT_5_03): add case for new token
115 (Scan): recognize special comment starting with '#' and followed by
116 SPARK keyword "hide" as a HIDE directive.
118 2011-08-02 Yannick Moy <moy@adacore.com>
120 * types.ads, erroutc.ads: Minor reformatting.
122 2011-08-02 Vincent Celier <celier@adacore.com>
124 * link.c: Add response file support for cross platforms.
126 2011-08-02 Ed Schonberg <schonberg@adacore.com>
128 * sem_aggr.adb (Resolve_Array_Aggregate): when copying the expression
129 in an association, set parent field of copy before partial analysis.
130 * sem_res.adb (Resolve_Slice): create reference to itype only when
131 expansion is enabled.
133 2011-08-02 Yannick Moy <moy@adacore.com>
135 * einfo.adb, einfo.ads (Body_Is_In_ALFA, Set_Body_Is_In_ALFA): get/set
136 for new flag denoting which subprogram bodies are in ALFA
137 * restrict.adb, sem_ch7.adb: Update comment
138 * sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
139 sem_ch9.adb, sem_res.adb: Add calls to
140 Current_Subprogram_Body_Is_Not_In_ALFA on unsupported constructs.
141 * sem_ch6.adb (Analyze_Function_Return): add calls to
142 Current_Subprogram_Body_Is_Not_In_ALFA on return statement in the
143 middle of the body, and extended return.
144 (Check_Missing_Return): add calls to Set_Body_Is_In_ALFA with argument
145 False when missing return.
146 (Analyze_Subprogram_Body_Helper): initialize the flag Body_Is_In_ALFA
147 to True for subprograms whose spec is in ALFA. Remove later on the flag
148 on the entity used for a subprogram body when there exists a separate
150 * sem_util.adb, sem_util.ads (Current_Subprogram_Body_Is_Not_In_ALFA):
151 if Current_Subprogram is not Empty, set its flag Body_Is_In_ALFA to
152 False, otherwise do nothing.
154 2011-08-02 Robert Dewar <dewar@adacore.com>
156 * inline.adb, stand.ads, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
158 2011-08-02 Yannick Moy <moy@adacore.com>
160 * sem_ch4.ads: minor formatting.
162 2011-08-02 Yannick Moy <moy@adacore.com>
164 * sem_aggr.adb, err_vars.ads, sem_ch3.adb, sem_ch5.adb, sem_ch9.adb,
165 debug.adb, sem_util.adb, sem_res.adb, sem_attr.adb, gnat1drv.adb,
166 errout.adb, errout.ads, exp_ch6.adb, sem_ch4.adb, restrict.adb,
167 restrict.ads, sem_ch6.adb, sem_ch8.adb, sem_ch11.adb,
168 opt.ads: cleanup of SPARK mode
170 2011-08-02 Yannick Moy <moy@adacore.com>
172 * cstand.adb (Create_Standard): sets Is_In_ALFA component of standard
174 * einfo.adb, einfo.ads (Is_In_ALFA): add flag for all entities
175 (Is_In_ALFA, Set_Is_In_ALFA): new subprograms to access flag Is_In_ALFA
177 (Analyze_Object_Declaration): set Is_In_ALFA flag for objects
178 (Constrain_Enumeration): set Is_In_ALFA flag for enumeration subtypes
179 (Constrain_Integer): set Is_In_ALFA flag for integer subtypes
180 (Enumeration_Type_Declaration): set Is_In_ALFA flag for enumeration
182 (Set_Scalar_Range_For_Subtype): unset Is_In_ALFA flag for subtypes with
184 * sem_ch6.adb (Analyze_Return_Type): unset Is_In_ALFA flag for
185 functions whose return type is not in ALFA.
186 (Analyze_Subprogram_Specification): set Is_In_ALFA flag for subprogram
188 (Process_Formals): unset Is_In_ALFA flag for subprograms if a
189 parameter's type is not in ALFA.
190 * stand.ads (Standard_Type_Is_In_ALFA): array defines which standard
193 2011-08-02 Ed Schonberg <schonberg@adacore.com>
195 * sem_ch6 (Analyze_Expression_Function): treat the function as
196 Inline_Always, and introduce a subprogram declaration for it when it is
198 * inline.adb (Add_Inlined_Body): recognize bodies that come from
199 expression functions, so that the back-end can determine whether they
200 can in fact be inlined.
201 * sem_util.adb (Is_Expression_Function): predicate to determine whether
202 a function body comes from an expression function.
204 2011-08-02 Gary Dismukes <dismukes@adacore.com>
206 * sem_ch6.adb (Check_Conformance): Revise the check for nonconforming
207 null exclusions to test Can_Never_Be_Null on the anonymous access types
208 of the formals rather than testing the formals themselves. Exclude this
209 check in cases where the Old_Formal is marked as a controlling formal,
210 to avoid issuing spurious errors for bodies completing dispatching
211 operations (due to the flag not getting set on controlling access
212 formals in body specs).
213 (Find_Corresponding_Spec): When checking full and subtype conformance of
214 subprogram bodies in instances, pass Designated and E in that order, for
215 consistency with the expected order of the formals (New_Id followed by
218 2011-08-02 Robert Dewar <dewar@adacore.com>
220 * sem_ch8.adb: Minor reformatting.
222 2011-08-02 Ed Schonberg <schonberg@adacore.com>
224 * sem_ch8.adb (Analyze_Subprogram_Renaming): new procedure
225 Check_Class_Wide_Actual, to implement AI05-0071, on defaulted
226 primitive operations of class-wide actuals.
228 2011-08-02 Javier Miranda <miranda@adacore.com>
230 * exp_atag.ads, exp_atag.adb
231 (Build_Common_Dispatching_Select_Statements): Remove argument Loc
232 since its value is implicitly passed in argument Typ.
233 * exp_disp.adb (Make_Disp_Conditional_Select_Body,
234 Make_Disp_Timed_Select_Body): Remove Loc in calls to routine
235 Build_Common_Dispatching_Select_Statements.
237 2011-08-02 Robert Dewar <dewar@adacore.com>
239 * sem_ch3.adb, exp_atag.ads, get_scos.adb, get_scos.ads,
240 exp_disp.adb, lib-xref.adb, lib-xref.ads: Update comments.
243 2011-08-02 Robert Dewar <dewar@adacore.com>
245 * sem_res.adb: Minor reformatting.
246 * sem_prag.adb: Minor reformatting.
248 2011-08-02 Javier Miranda <miranda@adacore.com>
250 * exp_atag.adb, exp_atags.ads
251 (Build_Common_Dispatching_Select_Statement): Replace argument DT_Ptr
252 by the tagged type Entity. Required to use this routine in the VM
253 targets since we do not have available the Tag entity in the VM
256 (Expand_N_Subprogram_Body): Do not invoke Build_VM_TSDs if package
257 Ada.Tags has not been previously loaded.
259 (Expand_N_Package_Declaration, Expand_N_Package_Body): Do not invoke
260 Build_VM_TSDs if package Ada.Tags has not been previously loaded.
262 (Enclosing_Dynamic_Scope): Add missing support to handle the full
263 view of enclosing scopes. Required to handle enclosing scopes that
264 are synchronized types whose full view is a task type.
266 (Build_VM_TSDs): Minor code improvement to avoid generating and
267 analyzing lists with empty nodes.
268 (Make_Disp_Asynchronous_Select_Body): Add support for VM targets.
269 (Make_Disp_Conditional_Select_Body): Add support for VM targets.
270 (Make_Disp_Get_Prim_Op_Kind): Add support for VM targets.
271 (Make_Disp_Timed_Select_Body): Add support for VM targets.
272 (Make_Select_Specific_Data_Table): Add support for VM targets.
273 (Make_VM_TSD): Generate code to initialize the SSD structure of
276 2011-08-02 Yannick Moy <moy@adacore.com>
278 * lib-writ.adb (Write_ALI): when ALFA mode is set, write local
279 cross-references section in ALI.
280 * lib-xref.adb, lib-xref.ads (Xref_Entry): add components Sub
281 (enclosing subprogram), Slc (location of Sub) and Sun (unit number of
283 (Enclosing_Subprogram_Or_Package): new function to return the enclosing
284 subprogram or package entity of a node
285 (Is_Local_Reference_Type): new function returns True for references
286 selected in local cross-references.
287 (Lt): function extracted from Lt in Output_References
288 (Write_Entity_Name): function extracted from Output_References
289 (Generate_Definition): generate reference with type 'D' for definition
290 of objects (object declaration and parameter specification), with
291 appropriate locations and units, for use in local cross-references.
292 (Generate_Reference): update fields Sub, Slc and Sun. Keep newly created
293 references of type 'I' for initialization in object definition.
294 (Output_References): move part of function Lt and procedure
295 Write_Entity_Name outside of the body. Ignore references of types 'D'
296 and 'I' introduced for local cross-references.
297 (Output_Local_References): new procedure to output the local
298 cross-references sections.
299 (Lref_Entity_Status): new array defining whether an entity is a local
300 * sem_ch3.adb (Analyze_Object_Declaration): call Generate_Reference
301 with 'I' type when initialization expression is present.
302 * get_scos.adb, get_scos.ads: Correct comments and typos
304 2011-08-02 Javier Miranda <miranda@adacore.com>
306 * exp_ch6.adb (Expand_N_Subprogram_Body): Enable generation of TSDs in
308 * exp_ch7.adb (Expand_N_Package_Body): Enable generation of TSDs in
310 * exp_disp.adb (Build_VM_TSDs): No action needed if the runtime has no
313 2011-08-02 Vincent Celier <celier@adacore.com>
315 * prj-nmsc.adb (File_Found): New components Excl_File and Excl_Line
316 (No_Space_Img): New function
317 (Find_Excluded_Sources): When reading from a file, record the file name
318 and the line number for each excluded source.
319 (Mark_Excluded_Sources): When reporting an error, if the excluded
320 sources were read from a file, include file name and line number in
323 2011-08-02 Ed Schonberg <schonberg@adacore.com>
325 * sem_res.adb (Resolve_Call): implement rule in RM 12.5.1 (23.3/2).
327 2011-08-02 Robert Dewar <dewar@adacore.com>
329 * exp_ch7.adb exp_ch6.adb, exp_disp.adb: Minor reformatting
331 2011-08-02 Javier Miranda <miranda@adacore.com>
333 * exp_ch6.adb (Expand_N_Subprogram_Body): Temporarily restrict the
334 generation of TSDs to the DOTNET compiler.
335 * exp_ch7.adb (Expand_N_Package_Body): Temporarily restrict the
336 generation of TSDs to the DOTNET compiler.
338 2011-08-02 Javier Miranda <miranda@adacore.com>
340 * exp_disp.ads (Build_VM_TSDs): Build the runtime Type Specific Data
341 record of all the tagged types declared inside library level package
342 declarations, library level package bodies or library level subprograms.
343 * exp_disp.adb (Make_VM_TSD): New subprogram that builds the TSD
344 associated with a given tagged type.
345 (Build_VM_TSDs): New subprogram.
346 * exp_ch6.adb (Expand_N_Subprogram_Body): Generate TSDs records of main
347 compilation units that are subprograms.
348 * exp_ch7.adb (Expand_N_Package_Body): Generate TSDs of main
349 compilation units that are package bodies.
350 (Expand_N_Package_Declaration): Generate TSDs of the main compilation
351 units that are a package declaration or a package instantiation.
352 * exp_intr.adb (Expand_Dispatching_Constructor_Call): Minor code
353 reorganization to improve the error generated by the frontend when the
354 function Ada.Tags.Secondary_Tag is not available.
355 * rtsfind.ads (RE_Register_TSD): New runtime entity.
356 * exp_ch4.adb (Expand_N_Type_Conversion): Minor code cleanup.
358 2011-08-02 Javier Miranda <miranda@adacore.com>
360 * exp_disp.adb (Make_DT): Generate call to Check_TSD in Ada 2005 mode.
362 2011-08-02 Robert Dewar <dewar@adacore.com>
364 * s-imenne.ads: Minor reformatting.
366 2011-08-02 Robert Dewar <dewar@adacore.com>
368 * a-stunau.ads: Add pragma Suppress_Initialization for Big_String
369 * freeze.adb (Warn_Overlay): Don't warn if initialization suppressed
370 * s-stalib.ads: Add pragma Suppress_Initialization for Big_String
372 2011-08-02 Robert Dewar <dewar@adacore.com>
374 * einfo.ads (Materialize_Entity): Document this is only for renamings
375 * exp_ch3.adb (Expand_N_Object_Declaration): Make sure we generate
376 required debug information in the case where we transform the object
377 declaration into a renaming declaration.
378 * exp_ch4.adb (Expand_Concatenate): Generate debug info for result
380 * exp_dbug.ads (Debug_Renaming_Declaration): Document setting of
383 2011-08-02 Robert Dewar <dewar@adacore.com>
385 * einfo.ads, einfo.adb (Suppress_Initialization): Replaces
387 * exp_ch3.adb, exp_disp.adb, freeze.adb: Use
388 Suppress_Initialization/Initialization_Suppressed.
389 * gnat_rm.texi: New documentation for pragma Suppress_Initialization
390 * sem_aux.ads, sem_aux.adb (Initialization_Suppressed): New function
391 * sem_dist.adb: Use Suppress_Initialization/Initialization_Suppressed
392 * sem_prag.adb: New processing for pragma Suppress_Initialization.
394 2011-08-02 Robert Dewar <dewar@adacore.com>
396 * gnat_rm.texi, a-tags.ads, sem_prag.adb, sem_ch12.adb, exp_disp.adb:
399 2011-08-02 Ed Schonberg <schonberg@adacore.com>
401 * sem_prag.adb (Chain_PPC): Implement AI04-0230: null procedures can
402 only have inheritable classwide pre/postconditions.
404 2011-08-02 Javier Miranda <miranda@adacore.com>
406 * a-tags.ads, a-tags.adb (Check_TSD): New subprogram.
407 * rtsfind.ads (RE_Check_TSD): New runtime entity.
408 * exp_disp.adb (Make_DT): Generate call to the new runtime routine that
409 checks if the external tag of a type is the same as the external tag
410 of some other declaration.
412 2011-08-02 Thomas Quinot <quinot@adacore.com>
414 * s-taskin.ads: Minor reformatting.
416 2011-08-02 Emmanuel Briot <briot@adacore.com>
418 * g-comlin.adb (Display_Help): swap the order in which it prints the
419 short help and the general usage.
421 2011-08-02 Ed Schonberg <schonberg@adacore.com>
423 * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration): copy properly
424 the aspect declarations and attach them to the generic copy for
426 (Analyze_Subprogram_Instantiation): copy explicitly the aspect
427 declarations of the generic tree to the new subprogram declarations.
428 * sem_attr.adb (Check_Precondition_Postcondition): recognize
429 conditions that apply to a subprogram instance.
431 2011-08-02 Robert Dewar <dewar@adacore.com>
433 * gnat_rm.texi: Clarify doc on pragma Source_File_Name[_Project].
435 2011-08-02 Ed Schonberg <schonberg@adacore.com>
437 * sem_ch3.adb (Derived_Type_Declaration): When checking that a untagged
438 private type with a tagged full view is not derived in the immediate
439 scope of the partial view, (RM 7.3 (7)) use the scope of the base type.
441 2011-08-02 Robert Dewar <dewar@adacore.com>
443 * exp_ch4.adb: Minor reformatting.
445 2011-08-02 Ed Schonberg <schonberg@adacore.com>
447 * sem_ch5.adb (Analyze_Loop_Statement): If the iteration scheme is an
448 Ada2012 iterator, the loop will be rewritten during expansion into a
449 while loop with a cursor and an element declaration. Do not analyze the
450 body in this case, because if the container is for indefinite types the
451 actual subtype of the elements will only be determined when the cursor
452 declaration is analyzed.
454 2011-08-02 Arnaud Charlet <charlet@adacore.com>
456 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Ignore
457 size/alignment related attributes in CodePeer_Mode.
459 2011-08-02 Gary Dismukes <dismukes@adacore.com>
461 * sem_ch3.adb (Check_Ops_From_Incomplete_Type): Remove call to
462 Prepend_Element, since this can result in the operation getting the
463 wrong slot in the full type's dispatch table if the full type has
464 inherited operations. The incomplete type's operation will get added
465 to the proper position in the full type's primitives
466 list later in Sem_Disp.Check_Operation_From_Incomplete_Type.
467 (Process_Incomplete_Dependents): Add Is_Primitive test when checking for
468 dispatching operations, since there are cases where nonprimitive
469 subprograms can get added to the list of incomplete dependents (such
470 as subprograms in nested packages).
471 * sem_ch6.adb (Process_Formals): First, remove test for being in a
472 private part when determining whether to add a primitive with a
473 parameter of a tagged incomplete type to the Private_Dependents list.
474 Such primitives can also occur in the visible part, and should not have
475 been excluded from being private dependents.
476 * sem_ch7.adb (Uninstall_Declarations): When checking the rule of
477 RM05-3.10.1(9.3/2), test that a subprogram in the Private_Dependents
478 list of a Taft-amendment incomplete type is a primitive before issuing
479 an error that the full type must appear in the same unit. There are
480 cases where nonprimitives can be in the list (such as subprograms in
482 * sem_disp.adb (Derives_From): Use correct condition for checking that
483 a formal's type is derived from the type of the corresponding formal in
484 the parent subprogram (the condition was completely wrong). Add
485 checking that was missing for controlling result types being derived
486 from the result type of the parent operation.
488 2011-08-02 Yannick Moy <moy@adacore.com>
490 * errout.adb (First_Node): minor renaming
491 * restrict.adb (Check_Formal_Restriction): put restriction warning on
494 2011-08-02 Yannick Moy <moy@adacore.com>
496 * sem_res.adb (Resolve_Logical_Op): ensure N is a binary operator
497 before accessing operands.
498 * sem_util.adb (Is_SPARK_Initialization_Expr): follow original nodes to
499 decide whether an initialization expression respects SPARK rules, as
500 the plain node is the expanded one. This allows for more valid warnings
502 * gnat_rm.texi: Minor update.
504 2011-08-02 Arnaud Charlet <charlet@adacore.com>
506 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Revert
509 2011-08-02 Robert Dewar <dewar@adacore.com>
511 * sem_ch3.adb, sem_ch4.adb: Minor reformatting.
513 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
515 * exp_ch5.adb (Expand_Iterator_Loop): Reformatting. Wrap the original
516 loop statements and the element renaming declaration with a block when
517 the element type is controlled.
519 2011-08-02 Yannick Moy <moy@adacore.com>
521 * sinfo.ads: Minor formatting.
523 2011-08-02 Ed Schonberg <schonberg@adacore.com>
525 * sem_aggr.adb (Add_Association): if the association has a box and no
526 expression, use the Sloc of the aggregate itself for the new
528 * errout.adb (First_Node): Exclude nodes with no Sloc, and always use
531 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
533 * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and refactoring.
534 When a container is provided via a function call, generate a renaming
535 of the function result. This avoids the creation of a transient scope
536 and the premature finalization of the container.
537 * exp_ch7.adb (Is_Container_Cursor): Removed.
538 (Wrap_Transient_Declaration): Remove the supression of the finalization
539 of the list controller when the declaration denotes a container cursor,
542 2011-08-02 Yannick Moy <moy@adacore.com>
544 * restrict.adb (Check_Formal_Restriction): only issue a warning if the
545 node is from source, instead of the original node being from source.
547 (Resolve_Array_Aggregate): refine the check for a static expression, to
548 recognize also static ranges
549 * sem_ch3.adb, sem_ch3.ads (Analyze_Component_Declaration,
550 Array_Type_Declaration): postpone the test for the type being a subtype
551 mark after the type has been resolved, so that component-selection and
552 expanded-name are discriminated.
553 (Make_Index, Process_Range_Expr_In_Decl): add a parameter In_Iter_Schm
554 to distinguish the case of an iteration scheme, so that an error is
555 issed on a non-static range in SPARK except in an iteration scheme.
556 * sem_ch5.adb (Analyze_Iteration_Scheme): call Make_Index with
558 * sem_ch6.adb (Analyze_Subprogram_Specification): refine the check for
559 user-defined operators so that they are allowed in renaming
561 (Find_Selected_Component): refine the check for prefixing of operators
562 so that they are allowed in renaming. Move the checks for restrictions
563 on selector name after analysis discriminated between
564 component-selection and expanded-name.
565 * sem_res.adb (Resolve_Op_Concat_Arg): do not issue a warning on
566 concatenation argument of string type if it is static.
567 * sem_util.adb, sem_util.ads
568 (Check_Later_Vs_Basic_Declarations): add a new function
569 Is_Later_Declarative_Item to decice which declarations are allowed as
570 later items, in the two different modes Ada 83 and SPARK. In the SPARK
571 mode, add that renamings are considered as later items.
572 (Enclosing_Package): new function to return the enclosing package
573 (Enter_Name): correct the rule for homonyms in SPARK
574 (Is_SPARK_Initialization_Expr): default to returning True on nodes not
575 from source (result of expansion) to avoid issuing wrong warnings.
577 2011-08-02 Ed Schonberg <schonberg@adacore.com>
579 * errout.adb: On anything but an expression First_Node returns its
582 2011-08-02 Pascal Obry <obry@adacore.com>
584 * prj-proc.adb, make.adb, makeutl.adb: Minor reformatting.
586 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
588 * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and reorganization.
589 Set the associated loop as the related expression of internally
591 * exp_ch7.adb (Is_Container_Cursor): New routine.
592 (Wrap_Transient_Declaration): Supress the finalization of the list
593 controller when the declaration denotes a container cursor.
595 2011-08-02 Yannick Moy <moy@adacore.com>
597 * opt.ads (SPARK_Mode): update comment, SPARK_Mode only set through
599 * par-ch3.adb (P_Delta_Constraint): remove check in SPARK mode that the
600 expression is a simple expression. This check cannot be performed in
601 the semantics, so just drop it.
602 (P_Index_Or_Discriminant_Constraint): move check that the index or
603 discriminant is a subtype mark to Analyze_Subtype_Declaration in the
604 semantics. Other cases were previously checked in the semantics.
605 * par-ch4.adb (P_Name): move checks that a selector name is not
606 character literal or an operator symbol to Find_Selected_Component in
608 * par-ch5.adb (Parse_Decls_Begin_End): move check that basic
609 declarations are not placed after later declarations in a separate
610 procedure in Sem_Util (possibly not the best choice?), to be used both
611 during parsing, for Ada 83 mode, and during semantic analysis, for
613 * par-endh.adb (Check_End): move check that end label is not missing
614 to Process_End_Label in the semantics
615 * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): remove
616 the special case for SPARK restriction
617 * par.adb: use and with Sem_Util, for use in Parse_Decls_Begin_End
618 * restrict.adb, restrict.ads (Check_Formal_Restriction): add a
619 parameter Force to issue the error message even on internal node (used
620 for generated end label). Call Check_Restriction to check when an error
621 must be issued. In SPARK mode, issue an error message even if the
622 restriction is not set.
623 (Check_Restriction): new procedure with an additional out parameter to
624 inform the caller that a message has been issued
625 * sem_aggr.adb: Minor modification of message
626 * sem_attr.adb (Analyze_Attribute): call Check_Formal_Restriction
627 instead of issuing an error message directly
628 * sem_ch3.adb (Analyze_Declarations): move here the check that basic
629 declarations are not placed after later declarations, by calling
630 Check_Later_Vs_Basic_Declarations
631 (Analyze_Subtype_Declaration): move here the check that an index or
632 discriminant constraint must be a subtype mark. Change the check that
633 a subtype of String must start at one so that it works on subtype marks.
634 * sem_ch4.adb (Analyze_Call): move here the check that a named
635 association cannot follow a positional one in a call
636 * sem_ch5.adb (Check_Unreachable_Code): call Check_Formal_Restriction
637 instead of issuing an error message directly
638 * sem_ch8.adb (Find_Selected_Component): move here the check that a
639 selector name is not a character literal or an operator symbol. Move
640 here the check that the prefix of an expanded name cannot be a
641 subprogram or a loop statement.
642 * sem_util.adb, sem_util.ads (Check_Later_Vs_Basic_Declarations): new
643 procedure called from parsing and semantics to check that basic
644 declarations are not placed after later declarations
645 (Process_End_Label): move here the check that end label is not missing
647 2011-08-02 Arnaud Charlet <charlet@adacore.com>
649 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Ignore enum
650 representation clause in codepeer mode, since it confuses CodePeer and
651 does not bring useful info.
653 2011-08-02 Ed Falis <falis@adacore.com>
655 * init.c: initialize fp hw on MILS.
657 2011-08-02 Ed Schonberg <schonberg@adacore.com>
659 * errout.adb (First_Node): for bodies, return the node itself (small
660 optimization). For other nodes, do not check source_unit if the node
663 2011-08-02 Robert Dewar <dewar@adacore.com>
665 * exp_ch3.adb: Minor comment additions.
666 * sem_ch13.adb: Minor reformatting.
668 2011-08-02 Pascal Obry <obry@adacore.com>
670 * make.adb, makeutl.adb: Removes some superfluous directory separator.
672 2011-08-02 Robert Dewar <dewar@adacore.com>
674 * sem_attr.adb: Minor reformatting.
676 2011-08-02 Robert Dewar <dewar@adacore.com>
678 * einfo.adb (Has_Default_Aspect): Replaces Has_Default_Value
679 (Has_Default_Component_Value): Removed
680 * einfo.ads Comment updates
681 (Has_Default_Aspect): Replaces Has_Default_Value
682 (Has_Default_Component_Value): Removed
684 (Expand_N_Freeze_Entity): Handle Default[_Component]_Value aspects
686 (Build_Array_Init_Proc): Handle Default_[Component_]Value aspects
687 (Get_Simple_Init_Val): Handle Default_Value aspect
688 (Needs_Simple_Initialization): Handle Default_Value aspect
689 * exp_ch3.ads: Needs_Simple_Initialization
690 * freeze.adb (Freeze_Entity): Handle Default_[Component_]Value aspect
691 * par-prag.adb (Pragma_Default[_Component]Value) Removed
693 (Analyze_Aspect_Specifications): Fix Default[_Component]_Value aspects
694 * sem_prag.adb (Pragma_Default[_Component]Value) Removed
695 * snames.ads-tmpl (Pragma_Default[_Component]Value) Removed
697 2011-08-02 Ed Schonberg <schonberg@adacore.com>
699 * sem_ch5.adb (Analyze_Iterator_Specification): use base type to locate
700 package containing iteration primitives.
701 exp_ch5.adb (Expand_Iterator_Loop): ditto.
703 2011-08-02 Ed Schonberg <schonberg@adacore.com>
705 * sem_ch5.adb (Analyze_Iteration_Scheme): For an Ada2012 iterator with
706 "of", pre-analyze expression in case it is a function call with
707 finalization actions that must be placed ahead of the loop.
708 * exp_ch5.adb (Expand_Iterator_Loop): If condition_actions are present
709 on an Ada2012 iterator, insert them ahead of the rewritten loop.
711 2011-08-02 Geert Bosch <bosch@adacore.com>
713 * cstand.adb (Create_Float_Types): Only consider C's long double for
714 Long_Long_Float, in addition to double.
716 2011-08-02 Robert Dewar <dewar@adacore.com>
718 * sem_ch3.adb, sem_ch5.adb, sem_type.adb, switch-c.adb, switch-c.ads,
719 sem_prag.adb, sem_util.adb, sem_util.ads, sem_res.adb, warnsw.ads,
720 prepcomp.ads, cstand.adb, stand.ads, a-calfor.adb, s-stusta.adb:
723 2011-08-02 Ed Schonberg <schonberg@adacore.com>
725 * sem_attr.adb: handle properly 'Result when it is a prefix of an
728 2011-08-02 Javier Miranda <miranda@adacore.com>
730 * einfo.ads, einfo.adb
731 (Original_Access_Type): Move this attribute to Node26 since there was
732 an undocumented use of Node21 in E_Access_Subprogram_Type entities
733 which causes conflicts and breaks the generation of the .NET compiler.
734 (Interface_Name): Add missing documentation on JGNAT only uses of
737 2011-08-02 Geert Bosch <bosch@adacore.com>
739 * cstand.adb (Back_End_Float_Types): Use Elist instead of Nlist
740 (Find_Back_End_Float_Type): Likewise
741 (Create_Back_End_Float_Types): Likewise
742 (Create_Float_Types): Likewise
743 (Register_Float_Type): Likewise
744 * sem_ch3.adb (Floating_Point_Type_Declaration): Use Elist instead of
745 Nlist and split out type selection in new local Find_Base_Type function.
746 * sem_prag.adb (Process_Import_Predefined_Type): Use Elist instead of
748 * stand.ads (Predefined_Float_Types): Use Elist instead of Nlist
750 2011-08-02 Robert Dewar <dewar@adacore.com>
752 * inline.adb: Minor code reorganization (put Get_Code_Unit_Entity in
754 * opt.ads: Minor comment change.
755 * sem_ch12.adb: Minor code reorganization.
757 2011-08-02 Gary Dismukes <dismukes@adacore.com>
759 * sem_ch3.adb (Complete_Private_Subtype): Don't append the private
760 subtype's list of rep items to the list on the full subtype in the case
761 where the lists are the same.
763 2011-08-02 Geert Bosch <bosch@adacore.com>
765 * switch-c.adb (Free): New deallocation procedure to avoid implicitly
766 using the one from System.Strings, which also deallocates all strings.
768 2011-08-02 Geert Bosch <bosch@adacore.com>
770 * gcc-interface/gigi.h, gcc-interface/misc.c (enumerate_modes): New
772 * gcc-interface/Make-lang.in: Update dependencies.
774 2011-08-02 Olivier Hainque <hainque@adacore.com>
776 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Set the function
779 2011-08-02 Javier Miranda <miranda@adacore.com>
781 * sem_ch3.adb (Check_Anonymous_Access_Components): Create extra formals
782 associated with anonymous access to subprograms.
784 2011-08-02 Geert Bosch <bosch@adacore.com>
787 (Preprocessing_Symbol_Defs): Move from Prepcomp.Symbol_Definitions.
788 (Preprocessing_Symbol_Last): Move from Prepcomp.Last_Definition.
789 * prepcomp.adb (Symbol_Definitions, Last_Definition): Move to opt.ads
790 (Add_Symbol_Definition): Move to switch-c.adb
791 (Process_Command_Line_Symbol_Definitions): Adjust references to above.
792 * prepcomp.ads: Remove dependency on Ada.Unchecked_Deallocation.
793 (Add_Symbol_Definition): Move to switch-c.adb.
794 * sem_ch13.adb, sem_prag.adb: Add dependency on Warnsw.
796 (Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
798 * sem_warn.ads (Warn_On_Record_Holes, Warn_On_Overridden_Size,
799 Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
801 * switch-c.adb: Replace dependency on Prepcomp and Sem_Warn by Warnsw.
802 (Add_Symbol_Definition): Moved from Prepcomp.
803 * switch-c.ads: Update copyright notice. Use String_List instead of
804 Argument_List, removing dependency on System.OS_Lib.
806 2011-08-02 Yannick Moy <moy@adacore.com>
808 * sem_ch3.adb (Analyze_Object_Declaration): issue an error in formal
809 mode on initialization expression which does not respect SPARK
811 * sem_util.adb, sem_util.ads (Is_SPARK_Initialization_Expr): determines
812 if the tree referenced by its argument represents an initialization
813 expression in SPARK, suitable for initializing an object in an object
816 2011-08-02 Javier Miranda <miranda@adacore.com>
818 * exp_ch9.adb (Expand_Access_Protected_Subprogram_Type): Link the
819 internally generated access to subprogram with its associated protected
821 * einfo.ads, einfo.adb (Original_Access_Type): New attribute.
823 2011-08-02 Geert Bosch <bosch@adacore.com>
825 * cstand.adb (Register_Float_Type): Print information about type to
826 register, if the Debug_Flag_Dot_B is set.
827 * debug.adb (Debug_Flag_Dot_B): Document d.b debug option.
828 * rtsfind.ads (RE_Max_Base_Digits): New run time entity.
829 * sem_ch3.adb (Floating_Point_Type_Declaration): Allow declarations
830 with a requested precision of more than Max_Digits digits and no more
831 than Max_Base_Digits digits, if a range specification is present and the
832 Predefined_Float_Types list has a suitable type to derive from.
833 * sem_ch3.adb (Rep_Item_Too_Early): Avoid generating error in the
834 case of type completion with pragma Import
836 (Process_Import_Predefined_Type): Processing to complete a type
837 with pragma Import. Currently supports floating point types only.
838 (Set_Convention_From_Pragma): Do nothing without underlying type.
839 (Process_Convention): Guard against absence of underlying type,
840 which may happen when importing incomplete types.
841 (Process_Import_Or_Interface): Handle case of importing predefined
842 types. Tweak error message.
844 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
846 * inline.adb (Add_Inlined_Body): Adjust check for library-level inlined
847 functions to previous change. Reorganize code slightly.
849 2011-08-02 Geert Bosch <bosch@adacore.com>
851 * back_end.ads (Register_Type_Proc): New call back procedure type for
852 allowing the back end to provide information about available types.
853 (Register_Back_End_Types): New procedure to register back end types.
854 * back_end.adb (Register_Back_End_Types): Call the back end to enumerate
856 * cstand.adb (Back_End_Float_Types): New list for floating point types
857 supported by the back end.
858 (Build_Float_Type): Add extra parameter for Float_Rep_Kind.
859 (Copy_Float_Type): New procedure to make new copies of predefined types.
860 (Register_Float_Type): New call back procedure to populate the BEFT list
861 (Find_Back_End_Float_Type): New procedure to find a BEFT by name
862 (Create_Back_End_Float_Types): New procedure to populate the BEFT list.
863 (Create_Float_Types): New procedure to create entities for floating
864 point types predefined in Standard, and put these and any remaining
865 BEFTs on the Predefined_Float_Types list.
866 * stand.ads (Predefined_Float_Types): New list for predefined floating
867 point types that do not have declarations in package Standard.
869 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
871 * inline.adb (Get_Code_Unit_Entity): New local function. Returns the
872 entity node for the unit containing the parameter.
873 (Add_Inlined_Body): Use it to find the unit containing the subprogram.
874 (Add_Inlined_Subprogram): Likewise.
875 * gcc-interface/Make-lang.in: Update dependencies.
877 2011-08-02 Thomas Quinot <quinot@adacore.com>
879 * s-stusta.adb (Print): Make sure Pos is always initialized to a
882 2011-08-02 Geert Bosch <bosch@adacore.com>
884 * a-calfor.adb (Image): Simplify, removing unnecessary uses of 'Image.
886 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
888 * sem_type.adb (Covers): Move trivial case to the top and reuse the
889 computed value of Base_Type.
891 2011-08-02 Yannick Moy <moy@adacore.com>
893 * restrict.adb (Check_Restriction): issue an error for any use of
894 class-wide, even if the No_Dispatch restriction is not set.
895 * sem_aggr.adb: Correct typos in comments and messages in formal mode
896 * sem_ch3.adb (Process_Full_View): issue an error in formal mode is,
897 when completing a private extension, the type named in the private part
898 is not the same as that named in the visible part.
899 * sem_res.adb (Resolve_Call): issue an error in formal mode on the use
900 of an inherited primitive operations of a tagged type or type extension
901 that returns the tagged type.
902 * sem_util.adb, sem_util.ads (Is_Inherited_Operation_For_Type): new
903 function which returns True for an implicit operation inherited by the
904 derived type declaration for the argument type.
905 (Is_SPARK_Object_Reference): move to appropriate place in alphabetic
908 2011-08-02 Ed Schonberg <schonberg@adacore.com>
910 * sem_ch5.adb (Pre_Analyze_Range): new procedure extracted from
911 Process_Bounds, to perform analysis with expansion of a range or an
912 expression that is the iteration scheme for a loop.
913 (Analyze_Iterator_Specification): If domain of iteration is given by a
914 function call with a controlled result, as is the case if call returns
915 a predefined container, ensure that finalization actions are properly
917 * par-ch3.adb: accept Ada2012 iterator form in P_Discrete_Range.
919 2011-08-02 Javier Miranda <miranda@adacore.com>
921 * sem_ch5.adb (Analyze_Iteration_Scheme): Fix typo.
922 * gcc-interface/Make-lang.in: Update dependencies.
924 2011-08-02 Javier Miranda <miranda@adacore.com>
926 * sem_util.ads, sem_util.adb (Is_Variable): Add a new formal to
927 determine if the analysis is performed using N or Original_Node (N).
928 * exp_util.adb (Side_Effect_Free): Code cleanup since the new
929 functionality of routine Is_Variable avoids code duplication.
930 * checks.adb (Determine_Range): Handle temporaries generated by
933 2011-08-02 Javier Miranda <miranda@adacore.com>
935 * exp_ch4.adb (Expand_N_Quantified_Expression): Force reanalysis and
936 expansion of the condition. Required since the previous analysis was
937 done with expansion disabled (see Resolve_Quantified_Expression) and
938 hence checks were not inserted and record comparisons have not been
941 2011-08-02 Ed Falis <falis@adacore.com>
943 * s-taprop-vxworks.adb, s-intman-vxworks.adb, s-intman-vxworks.ads:
946 2011-08-02 Bob Duff <duff@adacore.com>
948 * opt.ads: Minor comment fix.
950 2011-08-02 Bob Duff <duff@adacore.com>
952 * sem_ch12.adb (Analyze_Package_Instantiation,
953 Analyze_Subprogram_Instantiation): Turn off style checking while
954 analyzing an instance. Whatever style checks that apply to the generic
955 unit should apply, so it makes no sense to apply them in an instance.
956 This was causing trouble when compiling an instance of a runtime
957 unit that violates the -gnatyO switch.
958 * stylesw.adb (Set_Style_Check_Options): "when 'O' =>" was missing from
959 one of the two case statements, causing spurious errors.
961 2011-08-02 Robert Dewar <dewar@adacore.com>
963 * uname.adb: Minor reformatting.
964 * gnatcmd.adb: Minor reformatting.
965 * exp_attr.adb: Minor reformatting.
967 2011-08-02 Ed Schonberg <schonberg@adacore.com>
969 * exp_ch5.adb (Expand_N_Assignment_Statement): under restriction
970 No_Dispatching_Calls, do not look for the Assign primitive, because
971 predefined primitives are not created in this case.
973 2011-08-02 Bob Duff <duff@adacore.com>
975 * stylesw.ads: Minor comment fixes.
977 2011-08-02 Robert Dewar <dewar@adacore.com>
979 * freeze.adb (Add_To_Result): New procedure.
981 2011-08-02 Jose Ruiz <ruiz@adacore.com>
983 * exp_attr.adb (Find_Stream_Subprogram): When using a configurable run
984 time, if the specific run-time routines for handling streams of strings
985 are not available, use the default mechanism.
987 2011-08-02 Arnaud Charlet <charlet@adacore.com>
989 * s-regpat.ads: Fix typo.
991 2011-08-02 Vincent Celier <celier@adacore.com>
993 * prj-conf.adb (Get_Or_Create_Configuration_File): If On_Load_Config is
994 not null, call it to create the in memory config project file without
995 parsing an existing default config project file.
997 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
999 * atree.adb (Allocate_Initialize_Node): Remove useless temporaries.
1001 2011-08-02 Ed Schonberg <schonberg@adacore.com>
1003 * sem_elim.adb: an abstract subprogram does not need an eliminate
1004 pragma for its descendant to be eliminable.
1006 2011-08-02 Ed Falis <falis@adacore.com>
1008 * init.c: revert to handling before previous checkin for VxWorks
1009 * s-intman-vxworks.adb: delete unnecessary declarations related to
1010 using Ada interrupt facilities for handling signals.
1011 Delete Initialize_Interrupts. Use __gnat_install_handler instead.
1012 * s-intman-vxworks.ads: Import __gnat_install_handler as
1013 Initialize_Interrupts.
1014 * s-taprop-vxworks.adb: Delete Signal_Mask.
1015 (Abort_Handler): change construction of mask to unblock exception
1018 2011-08-02 Jerome Guitton <guitton@adacore.com>
1020 * a-except-2005.adb (Raise_From_Signal_Handler): Call
1021 Debug_Raise_Exception before propagation starts.
1023 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
1025 * exp_ch6.adb (Expand_Call): Guard restriction checks with a call
1026 to Restriction_Check_Required.
1027 * sem_ch3.adb (Analyze_Object_Declaration): Likewise.
1028 * sem_res.adb (Resolve_Call): Likewise.
1029 * sem_attr.adb (Check_Stream_Attribute): Likewise.
1031 2011-08-02 Bob Duff <duff@adacore.com>
1033 * stylesw.ads: Update comment.
1034 * style.adb: Minor: Use Error_Msg_NE instead of Error_Msg_N.
1035 * errout.ads: Remove obsolete comment.
1037 2011-08-02 Javier Miranda <miranda@adacore.com>
1039 * einfo.ads, einfo.adb (Is_Safe_To_Reevaluate): new function.
1040 (Set_Is_Safe_To_Reevaluate): new procedure.
1041 * sem_ch5.adb (Analyze_Assignment): Add one assertion to ensure that no
1042 assignment is allowed on safe-to-reevaluate variables.
1043 (Analyze_Iteration_Schine.Process_Bounds.One_Bound): Decorate the
1044 temporary created to remove side effects in expressions that use
1045 the secondary stack as safe-to-reevaluate.
1046 * exp_util.adb (Side_Effect_Free): Add missing code to handle well
1047 variables that are not true constants.
1049 2011-08-02 Robert Dewar <dewar@adacore.com>
1051 * sem_ch5.adb, sem_ch7.adb, einfo.ads, sem_util.adb, sem_util.ads,
1052 sem_res.adb, sem_ch6.adb: Minor reformatting.
1054 2011-08-02 Jerome Guitton <guitton@adacore.com>
1056 * a-except-2005.adb (Raise_Current_Excep): Remove obsolete dead code.
1058 2011-08-02 Ed Schonberg <schonberg@adacore.com>
1060 * sem_ch6.adb (New_Overloaded_Entity, Check_Overriding_Indicator): Do
1061 not set Overridden_Operation if subprogram is an initialization
1064 2011-08-02 Yannick Moy <moy@adacore.com>
1066 * par-ch6.adb: Correct obsolete name in comments
1067 * restrict.adb, restrict.ads (Check_Formal_Restriction): new function
1068 which takes two message arguments (existing function takes one), with
1069 second message used for continuation.
1070 * sem_ch5.adb (Analyze_Block_Statement): in formal mode, only reject
1071 block statements that originate from a source block statement, not
1072 generated block statements
1073 * sem_ch6.adb (Analyze_Function_Call): rename L into Actuals, for
1074 symmetry with procedure case
1075 * sem_ch7.adb (Check_One_Tagged_Type_Or_Extension_At_Most): new
1076 function to issue an error in formal mode if a package specification
1077 contains more than one tagged type or type extension.
1078 * sem_res.adb (Resolve_Actuals): in formal mode, check that actual
1079 parameters matching formals of tagged types are objects (or ancestor
1080 type conversions of objects), not general expressions. Issue an error
1081 on view conversions that are not involving ancestor conversion of an
1083 (Resolve_Type_Conversion): in formal mode, issue an error on the
1084 operand of an ancestor type conversion which is not an object
1085 * sem_util.adb, sem_util.ads (Find_Actual): extend the behavior of the
1086 procedure so that it works also for actuals of function calls
1087 (Is_Actual_Tagged_Parameter): new function which determines if its
1088 argument is an actual parameter of a formal of tagged type in a
1090 (Is_SPARK_Object_Reference): new function which determines if the tree
1091 referenced by its argument represents an object in SPARK
1093 2011-08-02 Robert Dewar <dewar@adacore.com>
1095 * sem_ch3.adb: Minor reformatting
1096 Minor comment addition
1097 Minor error msg text change
1099 2011-08-02 Javier Miranda <miranda@adacore.com>
1101 * sem_ch5.adb (Analyze_Iteration_Scheme.Uses_Secondary_Stack): New
1102 function. Used to be more precise when we generate a variable plus one
1103 assignment to remove side effects in the evaluation of the Bound
1105 (Analyze_Iteration_Scheme): Clean attribute analyzed in all the nodes
1106 of the bound expression to force its re-analysis and thus expand the
1107 associated transient scope (if required). Code cleanup replacing the
1108 previous code that declared the constant entity by an invocation to
1109 routine Force_Evaluation which centralizes this work in the frontend.
1111 2011-08-02 Robert Dewar <dewar@adacore.com>
1113 * einfo.adb (Is_Base_Type): Improve efficiency by using a flag table
1114 (Base_Type): Now uses improved Is_Base_Type function
1115 * einfo.ads (Base_Type): Inline this function
1117 2011-08-02 Robert Dewar <dewar@adacore.com>
1119 * sem_prag.adb (Analyze_Pragma): Defend against infinite recursion
1120 (Analyze_Aspect_Specifications): Fix Sloc values for constructed pragmas
1122 2011-08-02 Arnaud Charlet <charlet@adacore.com>
1124 * gcc-interface/Make-lang.in: Update dependencies.
1125 * gcc-interface/Makefile.in: Use s-inmapop-vxworks.adb for all VxWorks
1128 2011-08-02 Yannick Moy <moy@adacore.com>
1130 * par-ch3.adb (P_Delta_Constraint): issue an error in formal mode on
1131 non-simple expression used in delta constraint
1132 (P_Index_Or_Discriminant_Constraint): issue an error in formal mode on
1133 index constraint which is not a subtype mark
1134 * par.adb: With and use Restrict
1135 * sem_ch3.adb (Analyze_Component_Declaration): issue an error in formal
1136 mode on component type which is not a subtype mark and default
1137 expression on component
1138 (Analyze_Subtype_Declaration): issue an error in formal mode on subtype
1139 of string which does not have a lower index bound equal to 1
1140 (Array_Type_Declaration): issue an error in formal mode on index or
1141 component type which is not a subtype mark, and on aliased keyword on
1143 (Derived_Type_Declaration): issue an error in formal mode on interface,
1144 limited or abstract type
1145 (Record_Type_Declaration): issue an error in formal mode on interface
1146 (Record_Type_Definition): issue an error in formal mode on tagged types
1147 and type extensions not declared in the specification of a library unit
1148 package; on null non-tagged record; on variant part
1150 2011-08-02 Vincent Celier <celier@adacore.com>
1152 * prj-nmsc.adb (Check_Library_Attributes): Do not report Library_Dir
1153 not declared for qualified library project when Library_Name is not
1154 declared, but Library_Dir is.
1156 2011-08-02 Robert Dewar <dewar@adacore.com>
1158 * sem_ch13.adb (Analyze_Aspect_Specification): Fix slocs on generated
1159 pragmas (affects aspects [Component_]Default_Value
1160 (Check_Aspect_At_Freeze_Point): For Component_Default_Value, use
1161 component type for the resolution
1163 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
1165 * einfo.adb (Base_Type): Tune implementation for speed.
1167 2011-08-02 Robert Dewar <dewar@adacore.com>
1169 * freeze.adb: Minor reformatting.
1171 2011-08-02 Thomas Quinot <quinot@adacore.com>
1173 * scos.ads: Update comments.
1175 2011-08-02 Ed Schonberg <schonberg@adacore.com>
1177 * sem_ch3.adb (Build_Derived_Type): Inherit the convention from the
1178 base type, because the parent may be a subtype of a private type whose
1179 convention is established in a private part.
1181 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
1183 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Wrap the return
1184 statement in a block when the expansion of the return expression has
1185 created a finalization chain.
1186 * freeze.adb (Freeze_Expression): Alphabetize all choices associated
1187 with the parent node.
1188 Add N_Extended_Return_Statement to handle the case where a transient
1189 object declaration appears in the Return_Object_Declarations list of
1190 an extended return statement.
1192 2011-08-02 Matthew Gingell <gingell@adacore.com>
1194 * adaint.c (__gnat_is_symbolic_link_attr): Supress warning on possibly
1195 unused parameter 'name'.
1197 2011-08-02 Ed Schonberg <schonberg@adacore.com>
1199 * sem_elim.adb (Set_Eliminated): If the overridden operation is an
1200 inherited operation, check whether its alias, which is the source
1201 operastion that it renames, has been marked eliminated.
1203 2011-08-02 Javier Miranda <miranda@adacore.com>
1205 * exp_util.adb (Safe_Prefixed_Reference): Do not consider safe an
1206 in-mode parameter whose type is an access type since it can be used to
1207 modify its designated object. Enforce code that handles as safe an
1208 access type that is not access-to-constant but it is the result of a
1209 previous removal of side-effects.
1210 (Remove_Side_Effects): Minor code reorganization of cases which require
1211 no action. Done to incorporate documentation on new cases uncovered
1212 working in this ticket: no action needed if this routine was invoked
1213 too early and the nodes are not yet decorated.
1214 * sem_res.adb (Resolve_Slice): Minor code cleanup replacling two calls
1215 to routine Remove_Side_Effects by calls to Force_Evaluation since they
1216 were issued with actuals that are implicitly provided by
1219 2011-08-02 Robert Dewar <dewar@adacore.com>
1221 * sem_ch3.adb, sem_res.adb: Minor reformatting.
1223 2011-08-02 Yannick Moy <moy@adacore.com>
1225 * sem_attr.adb (Check_Formal_Restriction_On_Attribute): new procedure
1226 to issue an error in formal mode on attribute not supported in this mode
1227 (Analyze_Attribute): issue errors on standard attributes not supported
1229 * sem_ch3.adb (Modular_Type_Declaration): remove obsolete part of
1230 comment, and issue error in formal mode on modulus which is not a power
1232 (Process_Range_Expr_In_Decl): issue error in formal mode on non-static
1234 * sem_ch8.adb (Find_Type): issue error in formal mode on 'Base in
1236 * sem_res.adb (Resolve_Unary_Op): issue error in formal mode on unary
1237 operator on modular type (except 'not').
1239 2011-08-02 Robert Dewar <dewar@adacore.com>
1241 * gnat_rm.texi: Minor reformatting.
1243 2011-08-02 Arnaud Charlet <charlet@adacore.com>
1245 * s-osinte-linux.ads: Minor comment update and reformatting.
1246 * i-cexten.ads: Make this unit pure, as for its parent.
1247 Will allow its usage in more contexts if needed.
1249 2011-08-02 Robert Dewar <dewar@adacore.com>
1251 * s-utf_32.ads: Minor comment fix.
1253 2011-08-02 Ed Schonberg <schonberg@adacore.com>
1255 * sem_res.adb (Resolve_Actuals): if the subprogram is a primitive
1256 operation of a tagged synchronized type, handle the case where the
1257 controlling argument is overloaded.
1259 2011-08-02 Yannick Moy <moy@adacore.com>
1261 * gnat_rm.texi, opt.ads, sem_prag.adb, snames.ads-tmpl:
1262 Replace pragma SPARK_95 with pragma Restrictions (SPARK)
1263 * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): set
1264 SPARK mode and formal verification mode on processing SPARK restriction
1265 * s-rident.ads (Restriction_Id): add SPARK restriction in those not
1266 requiring consistency checking.
1268 2011-08-02 Robert Dewar <dewar@adacore.com>
1270 * sem_res.adb: Minor reformatting.
1272 2011-08-02 Robert Dewar <dewar@adacore.com>
1274 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
1275 a-cforse.ads: Remove unneeded with of Ada.Containers
1276 Remove commented out pragma Inline's
1277 Move specifications of new subprograms to the actual specs
1279 2011-08-02 Yannick Moy <moy@adacore.com>
1281 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
1282 a-cforse.ads: Update comments.
1284 2011-08-02 Ed Schonberg <schonberg@adacore.com>
1286 * sem_attr.adb: add attribute name when 'Result has the wrong prefix.
1288 2011-08-02 Robert Dewar <dewar@adacore.com>
1290 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
1291 a-cforse.ads, a-cofove.ads: Minor reformatting.
1293 2011-08-02 Claire Dross <dross@adacore.com>
1295 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads, a-cforse.ads,
1296 a-cofove.ads: Add comments.
1298 2011-08-02 Yannick Moy <moy@adacore.com>
1300 * gnat_rm.texi: Document formal containers.
1302 2011-08-02 Emmanuel Briot <briot@adacore.com>
1304 * g-comlin.adb (Goto_Section, Getopt): fix handling of "*" when there
1307 2011-08-02 Robert Dewar <dewar@adacore.com>
1309 * mlib-prj.adb, restrict.ads, sem_aggr.adb, sem_ch12.adb: Minor
1312 2011-08-02 Robert Dewar <dewar@adacore.com>
1314 * aspects.adb: New aspects Default_Value and Default_Component_Value
1315 New format of Aspect_Names table checks for omitted entries
1316 * aspects.ads: Remove mention of Aspect_Cancel and add documentation on
1317 handling of boolean aspects for derived types.
1318 New aspects Default_Value and Default_Component_Value
1319 New format of Aspect_Names table checks for omitted entries
1320 * einfo.ads, einfo.adb (Has_Default_Component_Value): New flag
1321 (Has_Default_Value): New flag
1322 (Has_Default_Component_Value): New flag
1323 (Has_Default_Value): New flag
1324 * par-ch13.adb (P_Aspect_Specifications): New format of Aspect_Names
1326 * par-prag.adb: New pragmas Default_Value and Default_Component_Value
1327 * sem_ch13.adb (Analyze_Aspect_Specifications): New aspects
1328 Default_Value and Default_Component_Value
1329 * sem_prag.adb: New pragmas Default_Value and Default_Component_Value
1330 New aspects Default_Value and Default_Component_Value
1331 * snames.ads-tmpl: New pragmas Default_Value and Default_Component_Value
1332 * sprint.adb: Print N_Aspect_Specification node when called from gdb
1334 2011-08-02 Vincent Celier <celier@adacore.com>
1336 * prj-nmsc.adb (Check_Library_Attributes): For virtual library project,
1337 inherit library kind.
1339 2011-08-02 Ed Schonberg <schonberg@adacore.com>
1341 * sem_res.adb: Add guards in calls to Matching_Static_Array_Bounds.
1344 2011-08-02 Robert Dewar <dewar@adacore.com>
1346 * i-cstrin.ads: Updates to make Interfaces.C.Strings match RM
1348 2011-08-02 Yannick Moy <moy@adacore.com>
1350 * sem_aggr.adb (Resolve_Aggregate): Fix thinko.
1352 2011-08-02 Robert Dewar <dewar@adacore.com>
1354 * impunit.adb: Add comment.
1356 2011-08-02 Yannick Moy <moy@adacore.com>
1358 * sem_aggr.adb (Check_Qualified_Aggregate): new procedure which checks
1359 qualification of aggregates in formal mode
1360 (Is_Top_Level_Aggregate): returns True for an aggregate not contained in
1362 (Resolve_Aggregate): complete the test that an aggregate is adequately
1363 qualified in formal mode
1365 2011-08-02 Pascal Obry <obry@adacore.com>
1367 * make.adb, bindgen.adb, gnatbind.adb: Minor reformatting.
1368 * mlib-prj.adb: Supress warning when compiling binder generated file.
1369 (Build_Library): Supress all warnings when compiling the binder
1372 2011-08-02 Yannick Moy <moy@adacore.com>
1374 * errout.adb, errout.ads (Check_Formal_Restriction): move procedure
1376 * restrict.adb, restrict.ads (Check_Formal_Restriction): ...to here
1377 * sem_aggr.adb, sem_ch5.adb, sem_util.adb:
1378 Add with/use clauses to make Check_Formal_Restriction visible
1380 2011-08-02 Ed Schonberg <schonberg@adacore.com>
1382 * sem_ch12.adb (Check_Generic_Actuals): handle properly actual
1383 in-parameters when type of the generic formal is private in the generic
1384 spec and non-private in the body.
1386 2011-08-02 Claire Dross <dross@adacore.com>
1388 * a-cfdlli.adb, a-cfdlli.ads, a-cfhase.adb, a-cfhase.ads, a-cfhama.adb,
1389 a-cfhama.ads, a-cforse.adb, a-cforse.ads, a-cforma.adb, a-cforma.ads,
1390 a-cofove.adb, a-cofove.ads: New files implementing formal containers.
1391 * impunit.adb, Makefile.rtl: Take new files into account.
1393 2011-08-02 Robert Dewar <dewar@adacore.com>
1395 * sem_aggr.adb, sem_ch3.adb, sem_ch5.adb, make.adb, sem_res.adb,
1396 sem_attr.adb, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
1398 2011-08-02 Yannick Moy <moy@adacore.com>
1400 * sem_aggr.adb (Resolve_Aggregate): disable incorrectly placed check in
1402 * sem_util.adb (Matching_Static_Array_Bounds): proper detection of
1403 matching static array bounds, taking into account the special case of
1405 * sem_ch3.adb: Typo in comment.
1407 2011-08-02 Yannick Moy <moy@adacore.com>
1409 * errout.adb, errout.ads (Check_Formal_Restriction): new procedure
1410 which issues an error in formal mode if its argument node is originally
1412 * sem_ch3.adb (Analyze_Full_Type_Declaration): move test that a type
1413 has a discriminant specification so that it does not include the case
1415 (Derived_Type_Declaration): move here the test that a derived type has a
1416 discriminant specification
1417 * sem_aggr.adb (Resolve_Record_Aggregate): test the presence of the
1418 first element of a component association before accessing its choices
1419 (presence of component association is not enough)
1420 * exp_ch6.adb (Expand_N_Subprogram_Declaration): test if a subprogram
1421 declaration is a library item before accessing the next element in a
1422 list, as library items are not member of lists
1423 * sem_attr.adb, sem_ch11.adb, sem_ch4.adb, sem_ch5.adb, sem_ch6.adb,
1424 sem_ch8.adb, sem_ch9.adb, sem_res.adb, sem_util.adb: use
1425 Check_Formal_Restriction whenever possible.
1427 2011-08-02 Ed Schonberg <schonberg@adacore.com>
1429 * sem_ch3.adb (Find_Type_Of_Object): In ASIS mode, create an itype
1430 reference when needed.
1432 2011-08-02 Bob Duff <duff@adacore.com>
1434 * gnat_ugn.texi: Fix typo.
1436 2011-08-02 Vincent Celier <celier@adacore.com>
1438 * make.adb (Gnatmake): Use MLib.Tgt.Archive_Ext as the extension of
1439 archive file name. Do not use the full path name of archives for Open
1442 2011-08-02 Robert Dewar <dewar@adacore.com>
1444 * sem_ch12.adb, sem_ch11.adb: New calling sequence for
1445 Analyze_Aspect_Specifications
1447 (Analyze_Aspect_Specifications): New handling for boolean aspects
1448 * sem_ch13.ads (Analyze_Aspect_Specifications): New calling sequence
1449 * sem_ch3.adb, sem_ch6.adb, sem_ch7.adb, sem_ch9.adb: New calling
1450 sequence for Analyze_Aspect_Specifications
1451 * sem_prag.adb (Analyze_Pragma): Remove use of Aspect_Cancel entirely
1452 * sinfo.ads, sinfo.adb (Aspect_Cancel): Remove, no longer used
1454 2011-08-02 Robert Dewar <dewar@adacore.com>
1456 * freeze.adb (Freeze_Entity): Remove handling of delayed boolean
1457 aspects, since these no longer exist.
1459 2011-08-02 Robert Dewar <dewar@adacore.com>
1461 * par-ch13.adb (Aspect_Specifications_Present): Always return false on
1462 semicolon, do not try to see if there are aspects following it.
1463 * par-ch3.adb (P_Declarative_Items): Better message for unexpected
1466 2011-08-02 Robert Dewar <dewar@adacore.com>
1468 * sem_ch8.adb, aspects.ads: Minor reformatting.
1470 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
1472 * sem_ch13.ads (Analyze_Aspect_Specification): Add pragma Inline.
1473 * sem_ch13.adb (Analyze_Non_Null_Aspect_Specifications): New procedure
1475 (Analyze_Aspect_Specifications): ...here. Call above procedure.
1477 2011-08-02 Yannick Moy <moy@adacore.com>
1479 * exp_ch6.adb (Expand_N_Subprogram_Declaration): issue error in formal
1480 mode on subprogram declaration outside of package specification, unless
1481 it is followed by a pragma Import
1482 * sem_ch3.adb (Access_Definition, Access_Subprogram_Declaration,
1483 Access_Type_Declaration): issue error in formal mode on access type
1484 (Analyze_Incomplete_Type_Decl): issue error in formal mode on
1486 (Analyze_Object_Declaration): issue error in formal mode on object
1487 declaration which does not respect SPARK restrictions
1488 (Analyze_Subtype_Declaration): issue error in formal mode on subtype
1489 declaration which does not respect SPARK restrictions
1490 (Constrain_Decimal, Constrain_Float, Constrain_Ordinary_Fixed): issue
1491 error in formal mode on digits or delta constraint
1492 (Decimal_Fixed_Point_Type_Declaration): issue error in formal mode on
1493 decimal fixed point type
1494 (Derived_Type_Declaration): issue error in formal mode on derived type
1495 other than type extensions of tagged record types
1496 * sem_ch6.adb (Process_Formals): remove check in formal mode, redundant
1497 with check on access definition
1498 * sem_ch9.adb (Analyze_Protected_Definition): issue error in formal
1499 mode on protected definition.
1500 (Analyze_Task_Definition): issue error in formal mode on task definition
1502 2011-08-02 Robert Dewar <dewar@adacore.com>
1504 * make.adb, sem_ch8.adb, s-inmaop-vxworks.adb: Minor reformatting.
1506 2011-08-02 Javier Miranda <miranda@adacore.com>
1508 * sem_ch6.adb (Can_Override_Operator): New function.
1509 (Verify_Overriding_Indicator): Add missing code to check overriding
1510 indicator in operators. Fixes regression.
1511 (Check_Overriding_Indicator): Minor reformating after replacing the
1512 code that evaluates if the subprogram can override an operator by
1513 invocations to the above new function.
1515 (Write_Field26_Name): Add missing code to ensure that, following
1516 the documentation in einfo.ads, this field is not shown as attribute
1517 "Static_Initialization" on non-dispatching functions.
1519 2011-08-02 Jose Ruiz <ruiz@adacore.com>
1521 * sem_res.adb (Resolve_Call): A call to
1522 Ada.Real_Time.Timing_Events.Set_Handler violates restriction
1523 No_Relative_Delay (AI-0211) only when it sets a relative timing event,
1524 i.e., when the second parameter is of type Time_Span.
1526 2011-08-02 Vincent Celier <celier@adacore.com>
1528 * make.adb (Gnatmake): use <library dir>/lib<library name>.a to link
1529 with an archive instead of -L<library dir> -l<library name>.
1531 2011-08-02 Ed Schonberg <schonberg@adacore.com>
1533 * sem_ch8.adb (Analyze_Use_Type): If the clause is being re-analyzed,
1534 mark the base types In_Use in addition to making the operations
1537 2011-08-02 Ed Falis <falis@adacore.com>
1539 * init.c: add and setup __gnat_signal_mask for the exception signals
1540 * s-inmaop-vxworks.adb: new file.
1541 * s-intman-vxworks.adb: remove unnecessary initializations and
1543 * s-intman-vxworks.ads: remove unnecessary variable
1544 * s-taprop-vxworks.adb: simplify signal initialization
1546 2011-08-02 Robert Dewar <dewar@adacore.com>
1548 * sem_ch8.adb: Minor code reorganization, comment updates.
1550 2011-08-02 Robert Dewar <dewar@adacore.com>
1552 * sem_res.adb (Matching_Static_Array_Bounds): Moved to Sem_Util
1553 * sem_util.ads, sem_util.adb (Matching_Static_Array_Bounds): Moved
1555 (Matching_Static_Array_Bounds): Use Is_Ok_Static_Expression
1556 (Matching_Static_Array_Bounds): Moved here from Sem_Res
1558 2011-08-02 Ed Schonberg <schonberg@adacore.com>
1560 * atree.h, atree.ads, atree.adb: New subprograms to manipulate Elist5.
1561 * par_ch8.adb (P_Use_Type): initialize Used_Operations for node.
1562 * sinfo.ads, sinfo.adb (Used_Operations): new attribute of
1563 use_type_clauses, to handle more efficiently use_type and use_all_type
1565 * sem_ch8.adb: Rewrite Use_One_Type and End_Use_Type to handle the
1566 Ada2012 Use_All_Type clause.
1567 (Use_Class_Wide_Operations): new procedure.
1569 2011-08-02 Robert Dewar <dewar@adacore.com>
1571 * exp_util.adb, par-ch10.adb, par-ch6.adb, sem.adb, sem_ch6.adb,
1572 sem_ch6.ads, sinfo.adb, sinfo.ads, sprint.adb: Change parameterized
1573 expression to expression function.
1575 2011-08-02 Ed Schonberg <schonberg@adacore.com>
1577 * sem_ch4.adb: transform simple Ada2012 membership into equality only
1578 if types are compatible.
1580 2011-08-02 Yannick Moy <moy@adacore.com>
1582 * sem_res.adb (Matching_Static_Array_Bounds): new function which
1583 returns True if its argument array types have same dimension and same
1584 static bounds at each index.
1585 (Resolve_Actuals): issue an error in formal mode on actuals passed as
1586 OUT or IN OUT paramaters which are not view conversions in SPARK.
1587 (Resolve_Arithmetic_Op): issue an error in formal mode on
1588 multiplication or division with operands of fixed point types which are
1589 not qualified or explicitly converted.
1590 (Resolve_Comparison_Op): issue an error in formal mode on comparisons of
1591 Boolean or array type (except String) operands.
1592 (Resolve_Equality_Op): issue an error in formal mode on equality
1593 operators for array types other than String with non-matching static
1595 (Resolve_Logical_Op): issue an error in formal mode on logical operators
1596 for array types with non-matching static bounds. Factorize the code in
1597 Matching_Static_Array_Bounds.
1598 (Resolve_Qualified_Expression): issue an error in formal mode on
1599 qualified expressions for array types with non-matching static bounds.
1600 (Resolve_Type_Conversion): issue an error in formal mode on type
1601 conversion for array types with non-matching static bounds
1603 2011-08-02 Robert Dewar <dewar@adacore.com>
1605 * par-ch10.adb: Minor code reorganization (use Nkind_In).
1607 2011-08-02 Ed Schonberg <schonberg@adacore.com>
1609 * par-ch9.adb: save location of entry for proper error message.
1611 2011-08-02 Javier Miranda <miranda@adacore.com>
1613 * sem_type.ads, sem_type.adb (Is_Ancestor): Addition of a new formal
1614 (Use_Full_View) which permits this routine to climb through the
1615 ancestors using the full-view of private parents.
1616 * sem_util.adb (Collect_Interfaces_Info, Implements_Interface): Set
1617 Use_Full_View to true in calls to Is_Ancestor.
1618 * sem_disp.adb (Override_Dispatching_Operation): Set Use_Full_View to
1619 true in call to Is_Ancestor.
1620 * exp_ch3.adb (Build_Offset_To_Top_Functions, Initialize_Tag): Set
1621 Use_Full_View to true in call to Is_Ancestor.
1622 * exp_ch7.adb (Controller_Component): Set Use_Full_View to true in
1623 call to Is_Ancestor.
1624 * exp_ch4.adb (Expand_N_Type_Conversion, Tagged_Membership): Set
1625 Use_Full_View to true in calls to Is_Ancestor.
1626 * exp_disp.adb (Expand_Interface_Actuals, Make_Secondary_DT, Make_DT,
1627 Make_Select_Specific_Data_Table, Register_Primitive,
1628 Set_All_DT_Position): Set Use_Full_View to true in calls to Is_Ancestor.
1629 * exp_intr.adb (Expand_Dispatching_Constructor_Call): Set Use_Full_View
1630 to true in call to Is_Ancestor.
1631 * exp_util.adb (Find_Interface_ADT, Find_Interface_Tag): Set
1632 Use_Full_View to true in calls to Is_Ancestor.
1634 (Write_Call_Info): Set Use_Full_View to true in call to Is_Ancestor.
1635 (Write_Type_Info): Set Use_Full_View to true in call to Is_Ancestor.
1637 2011-08-02 Robert Dewar <dewar@adacore.com>
1639 * gnat_rm.texi: Minor reformatting.
1640 * sem_prag.adb: Minor reformatting.
1642 2011-08-02 Tristan Gingold <gingold@adacore.com>
1644 * vms_data.ads: Add VMS qualifier for -gnateP.
1646 2011-08-02 Robert Dewar <dewar@adacore.com>
1648 * par-ch13.adb (P_Aspect_Specification): New meaning of Decl = Empty
1649 * par-ch7.adb (P_Package): Proper placement of aspects for package
1651 * par-endh.adb (Check_End): Ad Is_Sloc parameter
1652 (End_Statements): Add Is_Sloc parameterr
1653 * par.adb (P_Aspect_Specification): New meaning of Decl = Empty
1654 (Check_End): Ad Is_Sloc parameter
1655 (End_Statements): Add Is_Sloc parameterr
1657 2011-08-02 Vincent Celier <celier@adacore.com>
1659 * ug_words: Add VMS qualifier equivalent to -gnateP:
1660 /SYMBOL_PREPROCESSING.
1662 2011-08-02 Jose Ruiz <ruiz@adacore.com>
1664 * gnat-style.texi: For hexadecimal numeric literals the typical
1665 grouping of digits is 4 to represent 2 bytes.
1666 A procedure spec which is split into several lines is indented two
1669 2011-08-02 Yannick Moy <moy@adacore.com>
1671 * exp_aggr.adb (Is_Others_Aggregate): move function to other unit.
1672 * sem_aggr.adb, sem_aggr.ads (Is_Others_Aggregate): move function here
1673 (Resolve_Aggregate): issue errors in formal modes when aggregate is not
1675 (Resolve_Array_Aggregate): issue errors in formal modes on non-static
1676 choice in array aggregate
1677 (Resolve_Extension_Aggregate): issue errors in formal modes on subtype
1679 (Resolve_Record_Aggregate): issue errors in formal modes on mixed
1680 positional and named aggregate for record, or others in record
1681 aggregate, or multiple choice in record aggregate
1682 * sem_res.adb (Resolve_Logical_Op): issue errors in formal mode when
1683 array operands to logical operations AND, OR and XOR do not have the
1684 same static lower and higher bounds
1685 * sem_ch5.adb, sinfo.ads: Correct typos in comments
1687 2011-08-01 Robert Dewar <dewar@adacore.com>
1689 * sem_util.ads, sem_util.adb, sem_ch6.adb (Last_Source_Statement):
1690 Replaces Last_Source_Node_In_Sequence.
1691 * err_vars.ads (Error_Msg_Lang): 16 is OK, don't need 4K
1692 * errout.adb (Set_Error_Msg_Lang): Takes arg with no parens, but stores
1693 parens and blank in string (this was inconsistently implemented).
1695 (Set_Error_Msg_Lang): Takes arg with no parens, but stores parens and
1696 blank in string (this was inconsistently implemented).
1698 (Set_Global_Switches): Set formal mode switches appropriately
1699 * opt.ads, opt.adb: Formal mode is now global switches, more consistent
1701 (Analyze_Pragma, case SPARK_95): Set opt switches appropriately and
1702 call Set_Error_Msg_Lang to set "spark" as language name.
1703 * par.adb: Remove unnecessary call to set formal language for errout
1704 * sem_prag.adb (P_Pragma, case SPARK_95): Set opt switches
1705 appropriately and call Set_Error_Msg_Lang to set "spark" as language
1707 * sem_ch4.adb (Analyze_Concatenation_Operand): remove procedure and
1708 calls to it, moved after resolution so that types are known
1709 * sem_res.adb (Resolve_Op_Concat): issue an error in formal mode if
1710 result of concatenation is not of type String
1711 (Resolve_Op_Concat_Arg): issue an error in formal mode if an operand of
1712 concatenation is not properly restricted
1713 * gnat_rm.texi: Add doc on pragma Spark_95.
1714 * gcc-interface/Makefile.in: Remove obsolete target pairs for
1715 Interfaces.C.* on VMS. Remove s-parame-vms-restrict.ads.
1716 * gcc-interface/Make-lang.in: Update dependencies.
1718 2011-08-01 Javier Miranda <miranda@adacore.com>
1720 * sem_disp.adb (Override_Dispatching_Operation): Enforce strictness of
1721 condition that detects if the overridden operation must replace an
1724 2011-08-01 Javier Miranda <miranda@adacore.com>
1726 * exp_ch4.adb (Expand_N_Case_Expression): Propagate to the expanded
1727 code declarations inserted by Insert_Actions in each alternative of the
1728 N_Case_Expression node.
1730 2011-08-01 Robert Dewar <dewar@adacore.com>
1732 * sem_ch6.adb: Minor code reorganization.
1733 * sem_util.adb: Minor reformatting.
1735 2011-08-01 Pascal Obry <obry@adacore.com>
1737 * prj-env.adb: Remove <prefix>/lib/gpr/<target> project search path.
1738 * gnat_ugn.texi: Add documentation for VERSIONINFO Windows resource.
1740 2011-08-01 Yannick Moy <moy@adacore.com>
1742 * par-ch4.adb (P_Name): issue a syntax error in SPARK mode on character
1743 literal or operator symbol which is prefixed
1744 * sem_attr.adb (Analyze_Access_Attribute): issue an error in formal
1745 mode on access attributes.
1746 * sem_ch4.adb (Analyze_Concatenation_Operand): new procedure to check
1747 that concatenation operands are properly restricted in formal mode
1748 (Analyze_Concatenation, Analyze_Concatenation_Rest): call new procedure
1749 Analyze_Concatenation_Operand. Issue an error in formal mode if the
1750 result of the concatenation has a type different from String.
1751 (Analyze_Conditional_Expression, Analyze_Explicit_Dereference,
1752 Analyze_Quantified_Expression, Analyze_Slice,
1753 Analyze_Null): issue an error in formal mode on unsupported constructs
1755 (Analyze_Block_Statement): only issue error on source block statement
1756 * sem_util.ads, sem_util.adb (Last_Source_Node_In_Sequence): new
1757 function which returns the last node in a list of nodes for which
1758 Comes_From_Source returns True, if any
1759 * sem_ch6.adb (Check_Missing_Return): minor refactoring to use
1760 Last_Source_Node_In_Sequence
1761 * sem_ch8.adb (Analyze_Exception_Renaming, Analyze_Generic_Renaming,
1762 Analyze_Object_Renaming, Analyze_Use_Package): issue an error in formal
1763 mode on unsupported constructs
1764 * sem_ch9.adb Do not return after issuing error in formal mode, as the
1765 rest of the actions may be needed later on since the error is marked as
1767 * sinfo.ads: Typos in comments.
1769 2011-08-01 Pascal Obry <obry@adacore.com>
1771 * projects.texi: Minor editing.
1773 2011-08-01 Yannick Moy <moy@adacore.com>
1775 * err_vars.ads (Error_Msg_Lang, Error_Msg_Langlen): new variables for
1776 insertion character ~~
1777 * errout.ads, errout.adb (Formal_Error_Msg_...): remove procedures
1778 (Set_Error_Msg_Lang): new procedure which fixes the language for use
1779 with insertion character ~~
1780 (Set_Msg_Text): treat insertion character ~~
1781 * par-ch4.adb, par-ch5.adb, par-endh.adb, sem_attr.adb, sem_ch11.adb,
1782 sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_util.adb: Replace calls to
1783 Formal_Error_Msg_... procedures by equivalent Error_Msg_...
1784 procedures. Favor calls to Error_Msg_F(E) over Error_Msg_N(E). Make
1785 errors related to the formal language restriction not serious
1786 (insertion character |).
1787 * par.adb (Par): set formal language for error messages if needed
1788 * sem_ch6.adb (Check_Missing_Return): take into account possible
1789 generated statements at the end of the function
1790 * snames.ads-tmpl (Name_SPARK_95, Pragma_SPARK_95): new variable and
1791 enumeration value to define a new pragma SPARK_95
1792 * opt.ads, opt.adb (SPARK_Version_Type, SPARK_Version_Default,
1793 SPARK_Version): new type and variables to store the SPARK version
1795 (SPARK_Mode): return True when SPARK_Version is set
1796 * par-prag.adb: Correct indentation
1797 (Prag): take Pragma_SPARK_95 into account
1798 * sem_prag.adb (Set_Mechanism_Value, Sig_Flags): take Pragma_SPARK_95
1801 2011-08-01 Robert Dewar <dewar@adacore.com>
1803 * sem_ch3.adb, sem_ch3.ads, sem_ch5.adb, prj-part.adb, par-ch4.adb,
1804 sem_util.adb, sem_ch4.adb, sem_ch6.adb, sem_ch6.ads, sem_ch8.adb,
1805 sem_ch8.ads, sem_ch13.ads, par-ch5.adb, prj-env.ads: Minor reformatting
1807 2011-08-01 Pascal Obry <obry@adacore.com>
1809 * prj-part.ads, prj-part.adb (Parse): Add Target_Name parameter. Pass
1810 Target_Name to Get_Path call.
1811 (Parse_Single_Project): Likewise.
1812 (Post_Parse_Context_Clause): Likewise.
1813 * prj-env.ads, prj-env.adb (Find_Project): Add Target_Name parameter.
1814 Call Initialise_Project_Path with the proper Target_Name.
1815 (Initialize_Project_Path): Add <gnat_root>/<target_name>/lib/gnat
1817 (Get_Path): Add Target_Name parameter. Call Initialise_Project_Path
1818 with the proper Target_Name.
1819 * prj-conf.adb (Get_Or_Create_Configuration_File): Pass Target_Name to
1821 (Parse_Project_And_Apply_Config): Likewise.
1822 * prj-makr.adb (Initialize): Pass empty Target_Name to Parse routine.
1823 This is fine as this part of the code is supporting only native
1825 * prj-pars.adb (Parse): Pass empty Target_Name to Parse routine. This
1826 is fine as this part of the code is supporting only native compilation.
1828 2011-08-01 Yannick Moy <moy@adacore.com>
1830 * sem_util.adb (Enter_Name): issue error in formal mode on declaration
1831 of homonym, unless the homonym is one of the cases allowed in SPARK
1832 * par-ch5.adb (Parse_Decls_Begin_End): issue error in SPARK mode for
1833 package declaration occurring after a body.
1835 2011-08-01 Robert Dewar <dewar@adacore.com>
1837 * checks.adb, exp_ch4.adb: Minor reformatting.
1839 2011-08-01 Javier Miranda <miranda@adacore.com>
1841 * einfo.ads (Access_Disp_Table): Fix documentation.
1842 (Dispatch_Table_Wrappers): Fix documentation.
1844 2011-08-01 Pascal Obry <obry@adacore.com>
1846 * prj-env.adb, prj-env.ads: Minor reformatting.
1848 2011-08-01 Yannick Moy <moy@adacore.com>
1850 * sem_util.ads, sem_util.adb, par.adb, par_util.adb
1851 (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
1852 procedures out of these packages.
1853 * errout.ads, errout.adb
1854 (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
1855 procedures in of this package
1856 (Formal_Error_Msg_NE): new procedure for wrapper on Error_Msg_NE
1857 * par-ch5.adb (Parse_Decls_Begin_End): issue syntax error in SPARK mode
1858 on misplaced later vs initial declarations, like in Ada 83
1859 * sem_attr.adb (Processing for Analyze_Attribute): issue error in
1860 formal mode on attribute of private type whose full type declaration
1862 * sem_ch3.adb (Analyze_Declarations): issue error in formal mode on a
1863 package declaration inside a package specification
1864 (Analyze_Full_Type_Declaration): issue error in formal mode on
1865 controlled type or discriminant type
1866 * sem_ch6.adb (Analyze_Subprogram_Specification): only issue error on
1867 user-defined operator means that it should come from the source
1868 (New_Overloaded_Entity): issue error in formal mode on overloaded
1870 * sem_ch6.ads, sem_ch13.ads: typos in comments.
1872 2011-08-01 Thomas Quinot <quinot@adacore.com>
1874 * atree.adb: Minor reformatting.
1875 * checks.adb: Minor reformatting.
1877 2011-08-01 Vincent Celier <celier@adacore.com>
1879 * s-parame-vms-ia64.ads: Fix typo in comment
1881 * s-parame-vms-restrict.ads: Removed, unused.
1883 2011-08-01 Javier Miranda <miranda@adacore.com>
1886 (Is_Variable_Size_Array): Remove local subprogram Is_Constant_Bound.
1888 (Constrain_Index): Remove side effects in the evaluation of the bounds.
1889 * sem_ch3.ads, sem_ch3.adb
1890 (Is_Constant_Bound): New extended version of the subprogram that was
1891 previously located inside function Exp_Ch3.Is_Variable_Size_Array.
1892 Moved here since it is shared by routines of sem_ch3 and exp_ch3.
1893 * sem_aux.ads (Constant_Value): Fix typo in comment.
1894 * checks.adb (Generate_Index_Checks): New implementation which, for
1895 array objects with constant bounds, generates the runtime check
1896 referencing the bounds of the array type. For other cases this routine
1897 provides its previous behavior obtaining such values from the array
1899 * sem_res.adb (Set_Slice_Subtype): Link a copied range subtree with its
1901 * atree.adb (New_Copy): Reset flag Is_Overloaded in the new copy since
1902 we cannot have semantic interpretations of the new node.
1904 2011-08-01 Ed Schonberg <schonberg@adacore.com>
1906 * sem_ch6.adb (Fully_Conformant_Expressions): handle quantified
1909 2011-08-01 Arnaud Charlet <charlet@adacore.com>
1911 * sem_ch8.adb: Minor code editing.
1912 * s-vxwext.adb: Remove trailing space.
1913 * freeze.adb, freeze.ads, errout.ads, erroutc.adb: Fix GPLv3 header for
1914 consistency with other files.
1916 2011-08-01 Thomas Quinot <quinot@adacore.com>
1918 * s-auxdec.ads, s-auxdec-vms_64.ads: Minor reformatting.
1920 2011-08-01 Ed Schonberg <schonberg@adacore.com>
1922 * par-ch10.adb: reject parameterized expressions as compilation unit.
1923 * sem_ch4.adb: handle properly conditional expression with overloaded
1924 then_clause and no else_clause.
1926 2011-08-01 Tristan Gingold <gingold@adacore.com>
1928 * s-parame-vms-alpha.ads, s-parame-vms-ia64.ads: Redeclare C_Address
1929 like done by System.Aux_DEC.
1930 * env.c (__gnat_setenv) [VMS]: Put logicals into LNM$PROCESS table.
1932 2011-08-01 Yannick Moy <moy@adacore.com>
1934 * par-endh.adb (Check_End): issue a syntax error in SPARK mode for
1935 missing label at end of declaration (subprogram or package)
1936 * par-ch4.adb (P_Name): issue a syntax error in SPARK mode for mixing
1937 of positional and named parameter association
1938 * par.adb, par-util.adb (Formal_Error_Msg_SP): new wrapper on
1939 Error_Msg_SP which adds a prefix to the error message giving the name
1940 of the formal language analyzed
1941 * sem_ch6.adb (Analyze_Return_Type): issue an error in formal mode for
1942 access result type in subprogram, unconstrained array as result type,.
1943 (Analyze_Subprogram_Declaration): issue an error in formal mode for null
1945 * sem_ch8.adb: Code clean up.
1947 2011-08-01 Javier Miranda <miranda@adacore.com>
1949 * sem_ch7.adb (Uninstall_Declarations): Remove useless code.
1950 * einfo.ads (Access_Disp_Table): Fix documentation.
1951 (Dispatch_Table_Wrappers): Fix documentation.
1952 * einfo.adb (Access_Disp_Table, Dispatch_Table_Wrappers,
1953 Set_Access_Disp_Table, Set_Dispatch_Table_Wrappers): Fix the assertions
1954 to enforce the documentation of this attribute.
1955 (Set_Is_Interface): Cleanup the assertion.
1956 * exp_ch4.adb (Expand_Allocator_Expression, Tagged_Membership): Locate
1957 the Underlying_Type entity before reading attribute Access_Disp_Table.
1958 * exp_disp.adb (Expand_Dispatching_Call, Expand_Interface_Conversion):
1959 Locate the Underlying_Type before reading attribute Access_Disp_Table.
1960 * exp_aggr.adb (Build_Array_Aggr_Code, Build_Record_Aggr_Code): Locate
1961 the Underlying_Type entity before reading attribute Access_Disp_Table.
1962 * exp_ch3.adb (Build_Record_Init_Proc, Expand_N_Object_Declaration):
1963 Locate the Underlying_Type entity before reading attribute
1966 2011-08-01 Ed Schonberg <schonberg@adacore.com>
1968 * s-poosiz.ads: Additional overriding indicators.
1970 2011-08-01 Yannick Moy <moy@adacore.com>
1972 * sem_ch5.adb (Analyze_Exit_Statement): add return after error in
1974 (Analyze_Iteration_Scheme): issue error in formal mode when loop
1975 parameter specification does not include a subtype mark.
1976 * sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration): issue error in
1977 formal mode on abstract subprogram.
1978 (Analyze_Subprogram_Specification): issue error in formal mode on
1979 user-defined operator.
1980 (Process_Formals): issue error in formal mode on access parameter and
1982 * sem_ch9.adb (Analyze_Abort_Statement,
1983 Analyze_Accept_Statement, Analyze_Asynchronous_Select,
1984 Analyze_Conditional_Entry_Call, Analyze_Delay_Relative,
1985 Analyze_Delay_Until, Analyze_Entry_Call_Alternative,
1986 Analyze_Requeue, Analyze_Selective_Accept,
1987 Analyze_Timed_Entry_Call): issue error in formal mode on such constructs
1988 * sem_ch11.adb (Analyze_Raise_Statement, Analyze_Raise_xxx_Error):
1989 issue error in formal mode on user-defined raise statement.
1991 2011-08-01 Thomas Quinot <quinot@adacore.com>
1993 * sem_ch6.adb (Enter_Overloaded_Entity): Do not warn about a
1994 declaration being hidden when overriding an implicit inherited
1996 * par-ch10.adb (P_Compilation_Unit): In syntax check only mode
1997 (-gnats), do not complain about a source file that contains only a
2000 2011-08-01 Ed Schonberg <schonberg@adacore.com>
2002 * sem_ch5.adb (Analyze_Iterator_Scheme): Do not overwrite type of loop
2003 variable if already set.
2005 2011-08-01 Arnaud Charlet <charlet@adacore.com>
2007 * g-socket-dummy.adb, s-osinte-linux.ads, g-socket-dummy.ads,
2008 g-debuti.adb, g-tasloc.adb, g-debuti.ads, g-tasloc.ads,
2009 s-osinte-hpux.ads, g-sercom.adb, g-soliop-solaris.ads, g-sercom.ads,
2010 g-sptain.ads, g-curexc.ads, s-tasloc.adb, s-tasloc.ads, s-tataat.adb,
2011 g-ctrl_c.adb, a-reatim.adb, s-tataat.ads, g-dirope.adb, g-ctrl_c.ads,
2012 g-dirope.ads, g-boubuf.adb, g-calend.adb, g-boubuf.ads, g-souinf.ads,
2013 g-table.adb, g-bytswa-x86.adb, g-wispch.adb, g-io.adb, g-table.ads,
2014 g-wispch.ads, g-io.ads, g-memdum.adb, g-memdum.ads, g-busorg.adb,
2015 g-busorg.ads, g-regpat.adb, g-sothco-dummy.adb, g-encstr.adb,
2016 g-regpat.ads, g-sothco-dummy.ads, s-osinte-aix.ads, g-encstr.ads,
2017 g-sercom-mingw.adb, s-mastop-vms.adb, g-diopit.adb, g-diopit.ads,
2018 s-vxwext.adb, g-dyntab.adb, g-dyntab.ads, g-crc32.adb,
2019 g-sercom-linux.adb, g-crc32.ads, s-regpat.adb, g-flocon.ads,
2020 s-regpat.ads, g-stheme.adb, g-sestin.ads, s-taspri-posix-noaltstack.ads,
2021 g-soliop.ads, s-inmaop-posix.adb, g-locfil.ads, g-enblsp-vms-alpha.adb,
2022 g-socthi-dummy.adb, g-socthi-dummy.ads, gnat.ads, g-moreex.adb,
2023 g-moreex.ads, g-dynhta.adb, g-dynhta.ads, g-deutst.ads, g-htable.adb,
2024 g-cgicoo.adb, g-htable.ads, g-cgicoo.ads, a-interr.adb,
2025 g-socthi-vms.adb, g-socthi-vms.ads, g-hesora.adb, g-bubsor.adb,
2026 g-hesora.ads, g-bubsor.ads, g-md5.adb, g-md5.ads, s-intman-irix.adb,
2027 s-htable.adb, s-osinte-vms.adb, s-htable.ads, s-osinte-vms.ads,
2028 s-taprob.adb, g-bytswa.adb, g-bytswa.ads, s-osinte-solaris-posix.ads,
2029 a-suenco.adb, g-comver.adb, g-comver.ads, g-exctra.adb,
2030 s-osinte-solaris.adb, g-exctra.ads, s-osinte-irix.ads,
2031 s-osinte-solaris.ads, a-caldel-vms.adb, g-socthi-vxworks.adb,
2032 g-expect.adb, g-socthi-vxworks.ads, g-expect.ads, g-comlin.ads,
2033 g-heasor.adb, g-heasor.ads, g-traceb.adb, g-traceb.ads, g-decstr.adb,
2034 g-spipat.adb, g-decstr.ads, g-spipat.ads, s-mastop-tru64.adb,
2035 g-except.ads, g-thread.adb, g-hesorg.adb, g-thread.ads, g-hesorg.ads,
2036 g-expect-vms.adb, a-stuten.ads, g-spchge.adb, g-spchge.ads,
2037 g-u3spch.adb, g-u3spch.ads, g-spitbo.adb, g-spitbo.ads,
2038 s-osinte-dummy.ads, s-osinte-posix.adb, g-pehage.adb, g-pehage.ads,
2039 s-gloloc-mingw.adb, g-sha1.ads, s-traceb-hpux.adb,
2040 g-trasym-unimplemented.adb, g-trasym-unimplemented.ads, g-io_aux.adb,
2041 g-regexp.adb, g-io_aux.ads, g-socthi-mingw.adb, g-regexp.ads,
2042 s-osinte-hpux-dce.adb, g-socthi-mingw.ads, g-cgi.adb,
2043 s-osinte-hpux-dce.ads, g-cgi.ads, g-byorma.adb, g-boumai.ads,
2044 g-byorma.ads, a-caldel.adb, s-regexp.adb, s-regexp.ads,
2045 g-soliop-mingw.ads, g-sptavs.ads, s-osinte-tru64.ads, g-speche.adb,
2046 g-speche.ads, g-socthi.adb, g-stsifd-sockets.adb, g-socthi.ads,
2047 s-osinte-darwin.ads, i-vxwork-x86.ads, g-awk.adb, i-vxwork.ads,
2048 g-awk.ads, g-zspche.adb, g-zspche.ads, g-socket.adb, g-sptabo.ads,
2049 g-socket.ads, g-semaph.adb, g-semaph.ads, s-taspri-posix.ads,
2050 g-enblsp-vms-ia64.adb, g-cgideb.adb, g-cgideb.ads, g-sothco.adb,
2051 s-osinte-freebsd.ads, g-sothco.ads, g-catiio.adb, g-casuti.adb,
2052 g-catiio.ads, g-casuti.ads, g-trasym.adb, g-trasym.ads, s-casuti.adb,
2053 g-os_lib.adb, s-traceb-mastop.adb, g-busora.adb, s-interr-dummy.adb,
2054 g-busora.ads, g-enutst.ads, s-os_lib.adb, a-tasatt.adb,
2055 s-osinte-mingw.ads: Update to GPLv3 run-time license.
2056 Use GNAT instead of GNARL.
2058 2011-08-01 Bob Duff <duff@adacore.com>
2060 * a-cdlili.ads, a-cihama.ads, a-coinve.ads, a-ciorse.ads, a-coorma.ads,
2061 a-cidlli.ads, a-ciormu.ads, a-cihase.ads, a-cohama.ads, a-coorse.ads,
2062 a-ciorma.ads, a-coormu.ads, a-convec.ads, a-cohase.ads: Minor
2065 2011-08-01 Yannick Moy <moy@adacore.com>
2067 * debug.adb (d.D) reverve flag for the SPARK mode
2068 (d.E) reverve flag for SPARK generation mode
2069 (d.F) reverve flag for Why generation mode
2070 * opt.ads, opt.adb (ALFA_Mode, ALFA_Through_SPARK_Mode,
2071 ALFA_Through_Why_Mode, Formal_Verification_Mode, SPARK_Mode): New
2072 functions which return True when the corresponding modes are set
2073 (Formal_Language): return "spark" or "alfa" when in formal verification
2075 * sem_util.ads, sem_util.adb (Formal_Error_Msg): new wrapper on
2076 Error_Msg to prefix the error message with a tag giving the formal
2078 (Formal_Error_Msg_N): new wrapper on Error_Msg_N to prefix the error
2079 message with a tag giving the formal language
2080 * sem_ch5.adb (Analyze_Block_Statement): issue error in formal mode on
2082 (Analyze_Case_Statement): issue error in formal mode on case statement
2083 with a single "others" case alternative
2084 (Analyze_Exit_Statement): issue errors in formal mode on exit
2085 statements which do not respect SPARK restrictions
2086 (Analyze_Goto_Statement): issue error in formal mode on goto statement
2087 (Check_Unreachable_Code): always issue an error (not a warning) in
2088 formal mode on unreachable code (concerns both code after an infinite
2089 loop and after an unconditional jump, both not allowed in SPARK)
2090 * sem_ch6.adb (Analyze_Return_Statement): add call to
2091 Set_Return_Present for a procedure containing a return statement
2092 (already done for functions in Analyze_Function_Return)
2093 (Analyze_Function_Return): issue error in formal mode on extended
2094 return or if return is not last statement in function
2095 (Check_Missing_Return): issue error in formal mode if function does
2096 not end with return or if procedure contains a return
2097 * sem_ch8.ads, sem_ch8.adb (Has_Loop_In_Inner_Open_Scopes): new
2098 function to detect if there is an inner scope of its parameter S which
2101 2011-08-01 Thomas Quinot <quinot@adacore.com>
2103 * sem_ch6.ads: Minor reformatting.
2105 2011-08-01 Javier Miranda <miranda@adacore.com>
2107 * sem_util.adb (Abstract_Interface_List): Complete condition when
2108 processing private type declarations to avoid reading unavailable
2110 (Is_Synchronized_Tagged_Type): Complete condition when processing
2111 private extension declaration nodes to avoid reading unavailable
2114 2011-08-01 Thomas Quinot <quinot@adacore.com>
2116 * sem_ch3.adb: Minor reformatting.
2118 2011-08-01 Thomas Quinot <quinot@adacore.com>
2120 * s-parame-ae653.ads, s-parame-vms-alpha.ads, s-parame-hpux.ads,
2121 i-cpoint.adb, i-cstrin.adb, i-cpoint.ads, i-cstrin.ads,
2122 s-parame-vms-ia64.ads, s-parame.ads, i-c.ads, s-parame-vxworks.ads,
2123 s-parame-vms-restrict.ads: Remove duplicated Interfaces.C.* packages
2124 for VMS, instead parametrize the common implementation with
2125 System.Parameters declarations.
2127 2011-08-01 Eric Botcazou <ebotcazou@adacore.com>
2129 * gnat_rm.texi: Document limitation of Pragma No_Strict_Aliasing.
2131 2011-08-01 Tristan Gingold <gingold@adacore.com>
2133 * seh_init.c: Fix SEH handler installation on win64.
2135 2011-08-01 Ed Schonberg <schonberg@adacore.com>
2137 * sem_ch3.adb (Access_Subprogram_Declaration): in Asis mode, prevent
2138 double analysis of an anonymous access to subprogram, because it can
2139 lead to improper sharing of profiles and a back-end crash.
2141 2011-08-01 Robert Dewar <dewar@adacore.com>
2143 * make.adb, sem_ch4.adb: Minor reformatting.
2144 * gcc-interface/Make-lang.in: Update dependencies.
2145 * sem_util.adb, exp_ch5.adb: Minor reformatting.
2147 2011-08-01 Arnaud Charlet <charlet@adacore.com>
2149 * gnat_rm.texi: Fix definition of Long_Integer.
2151 2011-08-01 Ed Schonberg <schonberg@adacore.com>
2153 * exp_aggr.adb: check limit size of static aggregate unconditionally,
2154 to prevent storage exhaustion.
2155 * exp_ch7.adb (Clean_Simple_Protected_Objects): if the scope being
2156 finalized is a function body, insert the cleanup code before the final
2157 return statement, to prevent spurious warnings.
2158 * s-pooglo.ads: add overriding indicator.
2160 2011-08-01 Ed Schonberg <schonberg@adacore.com>
2162 * sem_ch4.adb (Operator_Check): improve error message when both a
2163 with_clause and a use_clause are needed to make operator usage legal.
2164 * sem_util.ads, sem_util.adb (Unit_Is_Visible): new predicate to
2165 determine whether a compilation unit is visible within an other,
2166 either through a with_clause in the current unit, or a with_clause in
2167 its library unit or one one of its parents.
2169 2011-08-01 Ed Schonberg <schonberg@adacore.com>
2171 * exp_ch5.adb (Expand_N_Iterator_Loop): handle properly an iterator
2172 over an arbitrary expression of an array or container type.
2173 * lib-xref.adb: clarify comment.
2175 2011-08-01 Bob Duff <duff@adacore.com>
2177 * einfo.ads: Minor reformatting.
2178 * debug.adb: Minor comment improvement.
2180 2011-08-01 Javier Miranda <miranda@adacore.com>
2182 * sem_ch4.adb (Try_Object_Operation): For class-wide subprograms do not
2183 consider hidden subprograms as valid candidates.
2185 2011-08-01 Arnaud Charlet <charlet@adacore.com>
2187 * make.adb (Compile): Strip -mxxx switches in CodePeer mode.
2189 2011-08-01 Vasiliy Fofanov <fofanov@adacore.com>
2191 * gnat_ugn.texi: Fix typo.
2193 2011-08-01 Robert Dewar <dewar@adacore.com>
2195 * i-cstrin.adb, sem_util.adb, exp_ch11.adb, sem_ch8.adb,
2196 lib-xref.adb: Minor reformatting
2198 2011-08-01 Gary Dismukes <dismukes@adacore.com>
2200 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Replace test of
2201 when to generate a call to Move_Final_List.
2202 (Has_Controlled_Parts): Remove this function.
2204 2011-08-01 Geert Bosch <bosch@adacore.com>
2206 * par-ch3.adb (P_Discrete_Choice_List): Improve error message for extra
2209 2011-08-01 Thomas Quinot <quinot@adacore.com>
2211 * exp_ch11.adb (Expand_N_Raise_Statement): Mark N_Raise_xxx_Error for
2212 explicit raise of a predefined exception as Comes_From_Source if the
2213 original N_Raise_Statement comes from source.
2215 2011-08-01 Robert Dewar <dewar@adacore.com>
2217 * sinfo.ads: Add comment.
2218 * sem_ch6.adb: Minor reformatting.
2220 2011-08-01 Robert Dewar <dewar@adacore.com>
2222 * freeze.adb (Freeze_Entity): Refine check for bad component size
2223 clause to avoid rejecting confirming clause when atomic/aliased present.
2225 2011-08-01 Ed Schonberg <schonberg@adacore.com>
2227 * sem_ch8.adb (Find_Direct_Name, Analyze_Expanded_Name): use Is_LHS to
2228 better determine whether an entity reference is a write.
2229 * sem_util.adb (Is_LHS): refine predicate to handle assignment to a
2231 * lib-xref.adb (Output_References): Do no suppress a read reference at
2232 the same location as an immediately preceeding modify-reference, to
2233 handle properly in-out actuals.
2235 2011-08-01 Tristan Gingold <gingold@adacore.com>
2237 * env.c (__gnat_setenv) [VMS]: Refine previous change.
2239 2011-08-01 Quentin Ochem <ochem@adacore.com>
2241 * i-cstrin.adb (New_String): Changed implementation, now uses only the
2242 heap to compute the result.
2244 2011-08-01 Robert Dewar <dewar@adacore.com>
2246 * atree.ads: Minor reformatting.
2248 2011-08-01 Emmanuel Briot <briot@adacore.com>
2250 * g-expect.adb (Get_Command_Output): Fix memory leak.
2252 2011-08-01 Geert Bosch <bosch@adacore.com>
2254 * cstand.adb (P_Float_Type): New procedure to print the definition of
2255 predefined fpt types.
2256 (P_Mixed_Name): New procedure to print a name using mixed case
2257 (Print_Standard): Use P_Float_Type for printing floating point types
2258 * einfo.adb (Machine_Emax_Value): Add preliminary support for quad
2259 precision IEEE float.
2261 2011-08-01 Thomas Quinot <quinot@adacore.com>
2263 * sem_ch3.adb: Minor reformatting.
2265 2011-08-01 Ed Schonberg <schonberg@adacore.com>
2267 * sem_ch6.adb (Analyze_Parameterized_Expression): If the expression is
2268 the completion of a generic function, insert the new body rather than
2269 rewriting the original.
2271 2011-08-01 Yannick Moy <moy@adacore.com>
2273 * sinfo.ads, errout.ads: Typos in comments.
2275 2011-08-01 Robert Dewar <dewar@adacore.com>
2277 * par-endh.adb: Minor reformatting.
2279 2011-08-01 Robert Dewar <dewar@adacore.com>
2281 * aspects.ads, aspects.adb: Add aspects for library unit pragmas
2282 (Pre_Post_Aspects): New subtype.
2283 * par-ch12.adb (P_Generic): New syntax for aspects in packages
2284 * par-ch13.adb (P_Aspect_Specifications): Add Semicolon parameter
2285 * par-ch7.adb (P_Package): Remove Decl parameter
2286 (P_Package): Handle new syntax for aspects (before IS)
2287 * par-ch9.adb (P_Protected_Definition): Remove Decl parameter, handle
2289 (P_Task_Definition): Remove Decl parameter, handle new aspect syntax
2290 * par.adb (P_Aspect_Specifications): Add Semicolon parameter
2291 (P_Package): Remove Decl parameter
2292 * sem_ch13.adb (Analyze_Aspect_Specifications): Handle library unit
2294 * sem_ch7.adb (Analyze_Package_Declaration): Analyze new format aspect
2296 * sem_util.ads, sem_util.adb (Static_Boolean): New function
2297 * sinfo.ads: Document new syntax for aspects in packages etc.
2298 * sprint.adb: Handle new syntax of aspects before IS in package
2300 2011-08-01 Thomas Quinot <quinot@adacore.com>
2302 * atree.ads: Minor reformatting.
2303 * sem_prag.adb: Minor reformatting.
2305 2011-08-01 Robert Dewar <dewar@adacore.com>
2307 * exp_util.adb (Insert_Actions): Fix error in handling Actions for
2308 case expr alternative.
2310 2011-08-01 Ed Schonberg <schonberg@adacore.com>
2312 * sem_ch12.adb: Fix typo.
2314 2011-08-01 Geert Bosch <bosch@adacore.com>
2316 * sem_prag.adb (Check_No_Link_Name): New procedure.
2317 (Process_Import_Or_Interface): Use Check_No_Link_Name.
2318 * cstand.adb (Create_Standard): Use Esize (Standard_Long_Long_Float)
2319 instead of Standard_Long_Long_Float_Size global. Preparation for
2320 eventual removal of per type constants.
2321 * exp_util.ads (Get_Stream_Size): New function returning the stream
2322 size value of subtype E.
2323 * exp_util.adb (Get_Stream_Size): Implement new function.
2324 * exp_strm.adb (Build_Elementary_Input_Call): Use Get_Stream_Size
2326 * exp_attr.adb (Attribute_Stream_Size): Use Get_Stream_Size
2328 (Machine_Mantissa_Value): Handle 128-bit quad precision IEEE floats
2330 2011-08-01 Geert Bosch <bosch@adacore.com>
2332 * cstand.adb: Fix comments.
2333 * sem_prag.adb (Analyze_Pragma): Use List_Length instead of explicit
2336 2011-08-01 Robert Dewar <dewar@adacore.com>
2338 * exp_ch4.adb, sem_cat.adb: Minor reformatting.
2340 2011-08-01 Geert Bosch <bosch@adacore.com>
2342 * atree.ads: Fix comment.
2344 2011-08-01 Robert Dewar <dewar@adacore.com>
2346 * aspects.ads, aspects.adb (Aspect_Names): Moved from body to spec.
2347 * par-ch13.adb (P_Aspect_Specifications): Check misspelled aspect name.
2348 * par.adb: Add with for Namet.Sp.
2349 * par-tchk.adb: Minor reformatting.
2351 2011-08-01 Vincent Celier <celier@adacore.com>
2353 * mlib-tgt-specific-vms-alpha.adb, mlib-tgt-specific-vms-ia64.adb
2354 (Build_Dynamic_Library): Use new function Init_Proc_Name to get the name
2355 of the init procedure of a SAL.
2356 * mlib-tgt-vms_common.ads, mlib-tgt-vms_common.adb (Init_Proc_Name):
2359 2011-08-01 Thomas Quinot <quinot@adacore.com>
2361 * exp_ch4.adb, s-tasini.ads, sem_attr.adb, s-soflin.ads: Minor
2364 2011-08-01 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
2366 * adaint.c (__gnat_file_time_name_attr): Get rid of warning.
2368 2011-08-01 Thomas Quinot <quinot@adacore.com>
2370 * sem_util.adb, sem_util.ads (Has_Overriding_Initialize): Make function
2371 conformant with its spec (return True only for types that have
2372 an overriding Initialize primitive operation that prevents them from
2373 having preelaborable initialization).
2374 * sem_cat.adb (Validate_Object_Declaration): Fix test for preelaborable
2375 initialization for controlled types in Ada 2005 or later mode.
2377 2011-08-01 Robert Dewar <dewar@adacore.com>
2379 * aspects.ads, aspects.adb: Add aspect Type_Invariant, Precondition,
2381 (Same_Aspect): New function.
2382 * sem_ch13.adb (Analyze_Aspect_Specifications): Add aspect
2383 Type_Invariant, Precondition, Postcondition.
2384 * snames.ads-tmpl: Add Name_Type_Invariant.
2386 2011-08-01 Robert Dewar <dewar@adacore.com>
2388 * freeze.adb (Freeze_Entity): Don't call Check_Aspect_At_Freeze_Point
2390 (Freeze_All_Ent): Fix error in handling inherited aspects.
2391 * sem_ch13.adb (Analyze_Aspect_Specifications): Skip aspect that is
2392 already analyzed, but don't skip entire processing of a declaration,
2393 that's wrong in some cases of declarations being rewritten.
2394 (Analyze_Aspect_Specification): Set Is_Delayed_Aspect in aspects.
2395 Don't delay for integer, string literals
2396 Treat predicates in usual manner for delay, remove special case code,
2398 (Analyze_Freeze_Entity): Make call to Check_Aspect_At_Freeze_Point
2399 (Build_Predicate_Function): Update saved expression in aspect
2400 (Build_Invariant_Procedure): Update saved expression in aspect
2401 * exp_ch4.adb (Expand_N_Selected_Component): Only do the optimization
2402 of replacement of discriminant references if the reference is simple.
2404 2011-08-01 Robert Dewar <dewar@adacore.com>
2406 * aspects.ads, aspects.adb: Add Static_Predicate and Dynamic_Predicate.
2407 * sem_ch13.adb (Analyze_Aspect_Specification): Add processing for
2408 Static_Predicate and Dynamic_Predicate.
2409 (Build_Predicate_Function): Add processing for Static_Predicate
2410 and Dynamic_Predicate.
2411 * sinfo.ads, sinfo.adb (From_Dynamic_Predicate): New flag
2412 (From_Static_Predicate): New flag
2413 * snames.ads-tmpl: Add Name_Static_Predicate and Name_Dynamic_Predicate
2415 2011-08-01 Robert Dewar <dewar@adacore.com>
2417 * usage.adb: Documentation cleanup for Ada version modes in usage.
2418 * expander.adb: Minor reformatting.
2420 2011-08-01 Robert Dewar <dewar@adacore.com>
2422 * atree.ads: Minor comment fix.
2423 * a-stwifi.adb, a-stzfix.adb, a-strfix.adb, a-ztexio.ads, a-textio.ads,
2424 a-witeio.ads, sem_prag.adb: Minor reformatting.
2426 2011-08-01 Doug Rupp <rupp@adacore.com>
2428 * env.c (__gnat_setenv) [VMS]: Force 32bit on item list structure
2429 pointers. Use descrip.h header file for convenience. Add some
2432 2011-08-01 Robert Dewar <dewar@adacore.com>
2434 * freeze.adb (Freeze_Entity): Call Check_Aspect_At_Freeze_Point
2435 (Freeze_All): Call Check_Aspect_At_End_Of_Declarations
2436 * sem_ch13.ads, sem_ch13.adb (Check_Aspect_At_Freeze_Point):
2438 (Check_Aspect_At_End_Of_Declarations): New procedure
2439 (Analye_Aspect_Specification): Minor changes for above procedures
2440 * sinfo.ads, sinfo.adb (Is_Delayed_Aspect): Now set in aspect
2441 specification node as well.
2443 2011-08-01 Pascal Obry <obry@adacore.com>
2445 * adaint.c (_gnat_stat): GetFilesAttributesEx() would fail on special
2446 Windows files. Use GetFilesAttributes() in this case to check for file
2447 existence instead of returning with an error code.
2449 2011-08-01 Vincent Celier <celier@adacore.com>
2451 * a-stzfix.adb, a-stwifi.adb (Replace_Slice): Fixed computation when
2452 High is above Source length.
2454 2011-08-01 Robert Dewar <dewar@adacore.com>
2456 * a-ztexio.ads, a-textio.ads, a-witeio.ads: Fix comment.
2458 2011-08-01 Robert Dewar <dewar@adacore.com>
2460 * aspects.ads (Boolean_Aspects): New subtype.
2461 * exp_ch13.adb (Expand_Freeze_Entity): Fix errors in handling aspects
2462 for derived types in cases where the parent type and derived type have
2464 * freeze.adb (Freeze_Entity): Fix problems in handling derived type
2465 with aspects when parent type also has aspects.
2466 (Freeze_Entity): Deal with delay of boolean aspects (must evaluate
2467 boolean expression at this point).
2468 * sem_ch13.adb (Analyze_Aspect_Specifications): Delay all aspects in
2469 accordance with final decision on the Ada 2012 feature.
2470 * sinfo.ads, sinfo.adb (Is_Boolean_Aspect): New flag.
2472 2011-08-01 Matthew Heaney <heaney@adacore.com>
2474 * a-chtgbo.adb (Delete_Node_Sans_Free): Replace iterator with selector.
2476 2011-08-01 Pascal Obry <obry@adacore.com>
2478 * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb:
2479 Fix Replace_Slice when High is above current string size.
2480 (Replace_Slice): Fix DL computation when High is above current
2483 2011-08-01 Gary Dismukes <dismukes@adacore.com>
2485 * gnat_rm.texi: Add documentation for pragma Static_Elaboration_Desired.
2487 2011-08-01 Matthew Heaney <heaney@adacore.com>
2489 * a-rbtgbo.adb (Delete_Node_Sans_Free): Fixed assignment to left child
2492 2011-08-01 Pascal Obry <obry@adacore.com>
2494 * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb: Minor
2497 2011-08-01 Ed Schonberg <schonberg@adacore.com>
2499 * sem_attr.adb (Analyze_Attribute, case 'Access): Handle properly named
2500 access to protected subprograms in generic bodies.
2501 * sem_ch6.adb (Analyze_Subprogram_Declaration): If the context is a
2502 protected type, indicate that the convention of the subprogram is
2503 Convention_Protected, because it may be used in subsequent declarations
2504 within the protected declaration.
2506 2011-08-01 Vincent Celier <celier@adacore.com>
2508 * mlib-prj.adb (Build_Library): Use "ada_" as the prefix for the "init"
2509 and "final" procedures when the name of the library is "ada", to avoid
2510 duplicate symbols "adainit" and "adafinal" in executables.
2512 2011-08-01 Ed Schonberg <schonberg@adacore.com>
2514 * sem_attr.adb (Analyze_Attribute, case 'Result): Handle properly a
2515 quantified expression that appears within a postcondition and uses the
2516 Ada2012 'Result attribute.
2518 2011-07-28 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
2520 * init.c (__gnat_error_handler): Cast reason to int.
2521 (__gnat_install_handler): Explain sa_sigaction use.
2523 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
2525 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: If the
2526 subprogram has copy-in copy-out parameters, try to promote the mode of
2527 the return type if it is passed in registers.
2529 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
2531 * gcc-interface/utils2.c (build_binary_op) <ARRAY_REF>: Do not mark the
2532 left operand as addressable.
2534 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
2536 * gcc-interface/gigi.h (build_function_stub): Remove.
2537 (build_return_expr): Likewise.
2538 (convert_vms_descriptor): Declare.
2539 * gcc-interface/utils.c (convert_vms_descriptor): Make global.
2540 (build_function_stub): Move to...
2541 * gcc-interface/utils2.c (build_return_expr): Move to...
2542 * gcc-interface/trans.c (build_function_stub): ...here.
2543 (build_return_expr): ...here.
2544 (Subprogram_Body_to_gnu): Add local variable for language_function.
2545 Disconnect the parameter attributes cache, if any, once done with it.
2546 Call end_subprog_body only after setting the end_locus.
2547 Build the stub associated with the function, if any, at the very end.
2548 (gnat_to_gnu) <N_Return_Statement>: Remove couple of useless local
2549 variables and streamline control flow.
2551 2011-07-23 Arnaud Charlet <charlet@adacore.com>
2554 * gcc-interface/Makefile.in (powerpc-linux): Remove reference to
2557 2011-07-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
2560 * init.c [sun && __SVR4 && !__vxworks] (__gnat_install_handler):
2561 Assign to act.sa_sigaction.
2562 * tracebak.c [USE_GENERIC_UNWINDER] (__gnat_backtrace): Cast
2563 current->return_address to char * before arithmetic.
2565 2011-07-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
2567 * init.c [sgi] (__gnat_error_handler): Update sigaction(2) citation.
2568 Correct argument types.
2569 Extract code from reason.
2570 (__gnat_install_handler): Assign to act.sa_sigaction.
2572 2011-07-21 Eric Botcazou <ebotcazou@adacore.com>
2574 * gcc-interface/Make-lang.in (GNAT1_ADA_OBJS): Move ada/b_gnat1.o to...
2575 (GNAT1_OBJS): ...here.
2577 2011-07-15 Eric Botcazou <ebotcazou@adacore.com>
2580 * g-socthi-mingw.adb (Fill): Fix formatting.
2582 * gcc-interface/gigi.h: Move around comment.
2584 2011-07-14 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
2587 * s-taprop-hpux-dce.adb (Abort_Task): Remove unnecessary cast.
2589 2011-07-14 Florian Weimer <fw@deneb.enyo.de>
2592 * g-socthi-mingw.adb (Fill): Guard against invalid MSG_WAITALL.
2594 2011-07-13 Eric Botcazou <ebotcazou@adacore.com>
2596 * gcc-interface/utils.c (build_vms_descriptor32): Skip the 32-bit
2597 range comparison if Pmode is SImode.
2599 2011-07-12 Laurent GUERBY <laurent@guerby.net>
2600 Eric Botcazou <ebotcazou@adacore.com>
2602 * adadecode.c: Wrap up in extern "C" block.
2603 * adadecode.h: Likewise.
2604 * adaint.c: Likewise. Remove 'const' keyword.
2605 * adaint.h: Likewise.
2607 * atree.h: Likewise.
2609 * cstreams.c: Likewise.
2613 * final.c: Likewise.
2615 * initialize.c: Likewise.
2617 * namet.h: Likewise.
2618 * nlists.h: Likewise.
2619 * raise.c: Likewise.
2620 * raise.h: Likewise.
2621 * repinfo.h: Likewise.
2622 * seh_init.c: Likewise.
2623 * targext.c: Likewise.
2624 * tracebak.c: Likewise.
2625 * uintp.h: Likewise.
2626 * urealp.h: Likewise.
2627 * xeinfo.adb: Wrap up generated C code in extern "C" block.
2628 * xsinfo.adb: Likewise.
2629 * xsnamest.adb: Likewise.
2630 * gcc-interface/gadaint.h: Wrap up in extern "C" block.
2631 * gcc-interface/gigi.h: Wrap up some prototypes in extern "C" block.
2632 * gcc-interface/misc.c: Likewise.
2633 * gcc-interface/Make-lang.in (GCC_LINK): Use LINKER.
2634 (GNAT1_C_OBJS): Remove ada/b_gnat1.o. List ada/seh_init.o and
2635 ada/targext.o here...
2636 (GNAT_ADA_OBJS): ...and not here.
2637 (GNAT1_ADA_OBJS): Add ada/b_gnat1.o.
2638 (GNATBIND_OBJS): Reorder.
2640 2011-07-07 Richard Henderson <rth@redhat.com>
2642 * gcc-interface/misc.c (gnat_init_gcc_eh): Don't call
2643 dwarf2out_frame_init.
2645 2011-07-07 Eric Botcazou <ebotcazou@adacore.com>
2647 * gcc-interface/misc.c (gnat_init): Tweak previous change.
2649 2011-07-07 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
2652 * gcc-interface/Makefile.in: Handle x86_64-solaris2.
2654 2011-07-06 Richard Guenther <rguenther@suse.de>
2656 * gcc-interface/misc.c (gnat_init): Merge calls to
2657 build_common_tree_nodes and build_common_tree_nodes_2.
2658 Re-initialize boolean_false_node.
2660 2011-07-02 Eric Botcazou <ebotcazou@adacore.com>
2661 Olivier Hainque <hainque@adacore.com>
2662 Nicolas Setton <setton@adacore.com>
2664 * gcc-interface/utils.c (record_builtin_type): Set TYPE_ARTIFICIAL on
2665 the type according to the ARTIFICIAL_P parameter.
2666 (create_type_decl): Likewise.
2667 (create_type_stub_decl): Set TYPE_ARTIFICIAL on the type to 1.
2669 2011-07-01 Eric Botcazou <ebotcazou@adacore.com>
2671 * gcc-interface/Make-lang.in (gnat1): Prepend '+' to the command.
2672 (gnatbind): Likewise.
2674 2011-06-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
2676 * gcc-interface/Makefile.in (TOOLS_LIBS): Add $(LIBINTL).
2678 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
2680 * gcc-interface/decl.c (gnat_to_gnu_component_type): Use GNAT_TYPE
2681 local variable throughout. Remove useless call to Base_Type.
2682 (gnat_to_gnu_field): Use GNAT_FIELD_TYPE local variable throughout.
2683 Take it also into account for the volatileness of the field. Set the
2684 TREE_SIDE_EFFECTS flag as well in this case. Reorder some warnings.
2686 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
2688 * gcc-interface/trans.c (Identifier_to_gnu): Don't set TREE_THIS_NOTRAP
2689 on a dereference built for a by-ref object if it has an address clause.
2691 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
2693 * einfo.ads (Address_Taken): Document use for the second argument of
2694 Asm_Input and Asm_Output attributes.
2695 * sem_attr.adb (Analyze_Attribute) <Attribute_Asm_Input>: If the second
2696 argument is an entity name, then set Address_Taken on it.
2697 <Attribute_Asm_Output>: Likewise.
2698 * gcc-interface/trans.c (lvalue_required_for_attribute_p): Handle the
2699 Attr_Asm_Input and Attr_Asm_Output attributes explicitly.
2700 (gnat_to_gnu) <N_Code_Statement>: If an operand is going to end up in
2701 memory and is a CONST_DECL, retrieve its corresponding VAR_DECL.
2703 2011-06-16 Joern Rennecke <joern.rennecke@embecosm.com>
2706 * gcc-interface/decl.c (gnat_to_gnu_param): Use pack_cumulative_args.
2708 2011-06-14 Joseph Myers <joseph@codesourcery.com>
2710 * gcc-interface/Make-lang.in (gnatbind$(exeext)): Use ggc-none.o.
2711 (ada/utils.o): Update dependencies.
2712 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Add
2713 ../../../libcpp/libcpp.a.
2714 * gcc-interface/utils.c: Include common/common-target.h.
2715 (process_attributes): Use targetm_common.have_named_sections.
2717 2011-06-07 Richard Guenther <rguenther@suse.de>
2719 * gcc-interface/misc.c (gnat_init): Do not set size_type_node or call
2722 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
2724 * gcc-interface/utils2.c (gnat_stabilize_reference): Propagate the
2725 TREE_THIS_NOTRAP flag.
2727 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
2729 * gcc-interface/utils2.c (gnat_stabilize_reference) <COMPOUND_EXPR>:
2732 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
2734 * gcc-interface/trans.c (Identifier_to_gnu): Also handle deferred
2735 constants whose full view has discriminants specially.
2737 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
2739 * gcc-interface/utils.c: Include diagnostic.h.
2740 (gnat_write_global_declarations): Output debug information for all
2741 global type declarations before finalizing the compilation unit.
2742 * gcc-interface/Make-lang.in (ada/utils.o): Add dependency.
2744 2011-05-25 Jakub Jelinek <jakub@redhat.com>
2746 * gcc-interface/utils.c (def_fn_type): Remove extra va_end.
2748 2011-05-25 Kai Tietz <ktietz@redhat.com>
2750 * adaint.c (__gnat_to_canonical_file_list_next): Use array
2751 initialization instead of const/none-const pointer assignment.
2753 2011-05-24 Joseph Myers <joseph@codesourcery.com>
2755 * gcc-interface/Make-lang.in (GNAT1_OBJS): Don't include
2756 $(EXTRA_GNAT1_OBJS).
2757 (GNATBIND_OBJS): Don't include $(EXTRA_GNATBIND_OBJS).
2758 (EXTRA_GNAT1_OBJS, EXTRA_GNATBIND_OBJS): Remove.
2759 (gnat1$(exeext), gnatbind$(exeext)): Use libcommon-target.a.
2760 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use
2761 libcommon-target.a instead of prefix.o.
2763 2011-05-21 Joseph Myers <joseph@codesourcery.com>
2766 * gcc-interface/Make-lang.in (gnatbind$(exeext)): Depend on $(LIBDEPS).
2768 2011-05-20 Joseph Myers <joseph@codesourcery.com>
2770 * gcc-interface/Make-lang.in (EXTRA_GNATBIND_OBJS): Remove version.o.
2771 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use libcommon.a
2772 instead of version.o.
2774 2011-05-18 Kai Tietz <ktietz@redhat.com>
2776 * gcc-interface/trans.c (Exception_Handler_to_gnu_sjlj): Use
2777 boolean_false_node instead of integer_zero_node.
2778 (convert_with_check): Likewise.
2779 * gcc-interface/decl.c (choices_to_gnu): Likewise.
2781 2011-05-12 Eric Botcazou <ebotcazou@adacore.com>
2783 * gcc-interface/trans.c (call_to_gnu): In the by-reference case, if the
2784 type of the parameter is an unconstrained array, convert the actual to
2785 the type of the formal in the In Out and Out cases as well.
2787 2011-05-11 Nathan Froyd <froydnj@codesourcery.com>
2789 * gcc-interface/utils.c (def_fn_type): Don't call build_function_type;
2790 call build_function_type_array or build_varargs_function_type_array
2792 (create_subprog_type): Don't call build_function_type; call
2793 build_function_type_vec instead.
2795 2011-05-11 Nathan Froyd <froydnj@codesourcery.com>
2797 * gcc-interface/ada-tree.h (TYPE_OBJECT_RECORD_TYPE): Use TYPE_MINVAL.
2798 (TYPE_GCC_MIN_VALUE): Use TYPE_MINVAL.
2799 (TYPE_GCC_MAX_VALUE): Use TYPE_MAXVAL.
2801 2011-05-07 Eric Botcazou <ebotcazou@adacore.com>
2803 * gcc-interface/decl.c (intrin_arglists_compatible_p): Remove spaces.
2805 * gcc-interface/gigi.h (global_bindings_p): Adjust prototype.
2806 * gcc-interface/utils.c (global_bindings_p): Return bool and simplify.
2808 2011-05-05 Nathan Froyd <froydnj@codesourcery.com>
2810 * gcc-interface/trans.c (Case_Statement_to_gnu): Call build_case_label.
2812 2011-05-05 Nathan Froyd <froydnj@codesourcery.com>
2814 * gcc-interface/decl.c (intrin_arglists_compatible_p): Use iterators
2815 instead of accessing TYPE_ARG_TYPES directly.
2816 * gcc-interface/utils.c (handle_nonnull_attribute): Likewise.
2818 2011-05-05 Eric Botcazou <ebotcazou@adacore.com>
2821 * gcc-interface/gigi.h (get_variant_part): Declare.
2822 * gcc-interface/decl.c (get_variant_part): Make global.
2823 * gcc-interface/utils2.c (find_common_type): Do not return T1 if the
2824 types have the same constant size, are record types and T1 has a
2825 variant part while T2 doesn't.
2827 2011-05-05 Eric Botcazou <ebotcazou@adacore.com>
2829 * gcc-interface/utils.c (begin_subprog_body): Do not call
2831 (end_subprog_body): Likewise.
2833 2011-05-04 Richard Guenther <rguenther@suse.de>
2835 * gcc-interface/trans.c (gnat_to_gnu): Remove zero notrunc argument to
2837 (pos_to_constructor): Likewise.
2839 2011-05-03 Nathan Froyd <froydnj@codesourcery.com>
2840 Eric Botcazou <ebotcazou@adacore.com>
2842 * gcc-interface/trans.c (gigi): Call build_function_type_list instead
2843 of build_function_type. Adjust calls to...
2844 (build_raise_check): ...this. Do not take a void_tree parameter.
2845 Call build_function_type_list instead of build_function_type.
2846 Fix head comment and swap couple of conditional blocks.
2848 2011-04-30 Eric Botcazou <ebotcazou@adacore.com>
2850 * gnatvsn.ads (Library_Version): Bump to 4.7.
2851 (Current_Year): Bump to 2011.
2853 2011-04-29 Michael Matz <matz@suse.de>
2855 * gcc-interface/misc.c (gnat_handle_option): Set
2856 warn_maybe_uninitialized.
2858 2011-04-23 Gerald Pfeifer <gerald@pfeifer.com>
2860 * gnat_ugn.texi (Complexity Metrics Control): Update link to
2861 the Watson/McCabe paper.
2863 2011-04-23 Jim Meyering <meyering@redhat.com>
2865 * gnat_ugn.texi (Examples of gnatxref Usage): Fix typo: s/it it/it is/
2867 2011-04-22 Eric Botcazou <ebotcazou@adacore.com>
2869 * gcc-interface/decl.c (make_packable_type): Copy DECL_PARALLEL_TYPE
2872 2011-04-22 Eric Botcazou <ebotcazou@adacore.com>
2874 * gcc-interface/gigi.h (create_subprog_decl): Add ARTIFICIAL_FLAG
2876 * gcc-interface/utils.c (create_subprog_decl): Likewise. Set
2877 DECL_ARTIFICIAL and DECL_NO_INLINE_WARNING_P on the DECL accordingly.
2878 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: Add
2879 ARTIFICIAL_FLAG local variable and pass it to create_subprog_decl.
2880 <all>: Do not set flags on the reused DECL node coming from an alias.
2881 Set DECL_IGNORED_P on the DECL node built for subprograms if they
2882 don't need debug info here...
2883 * gcc-interface/trans.c (Subprogram_Body_to_gnu): ...and not here.
2884 (gigi): Adjust calls to create_subprog_decl.
2885 (build_raise_check): Likewise.
2886 (establish_gnat_vms_condition_handler): Likewise.
2887 (Compilation_Unit_to_gnu): Likewise.
2888 (gnat_to_gnu): Likewise.
2890 2011-04-21 Eric Botcazou <ebotcazou@adacore.com>
2892 * gcc-interface/Makefile.in (NO_SIBLING_ADAFLAGS): Always define.
2893 (NO_REORDER_ADAFLAGS): New variable.
2894 (EXTRA_GNATTOOLS): Always define.
2895 (../stamp-gnatlib1-$(RTSDIR): Copy tsystem.h.
2896 Clean up and adjust list of files compiled with special options.
2897 * gcc-interface/Make-lang.in: Likewise.
2898 (ada/decl.o): Cosmetical change.
2899 (ada/misc.o): Remove dependency on $(PLUGIN_H).
2901 2011-04-20 Jim Meyering <meyering@redhat.com>
2903 * initialize.c (__gnat_initialize): Remove useless if-before-free.
2905 2011-04-17 Eric Botcazou <ebotcazou@adacore.com>
2907 * gcc-interface/Make-lang.in (gnatbind): Replace $(ALL_CFLAGS) with
2908 $(CFLAGS) on the link line.
2910 2011-04-17 Eric Botcazou <ebotcazou@adacore.com>
2912 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Function>: Declare the
2913 padded type built for the return type if it is unconstrained.
2915 2011-04-14 Nathan Froyd <froydnj@codesourcery.com>
2917 * gcc-interface/utils.c (gnat_poplevel): Use block_chainon.
2919 2011-04-12 Nathan Froyd <froydnj@codesourcery.com>
2921 * gcc-interface/ada-tree.h (union lang_tree_node): Check for TS_COMMON
2922 before calling TREE_CHAIN.
2923 * gcc-interface/misc.c (gnat_init_ts): New function.
2924 (LANG_HOOKS_INIT_TS): Define.
2926 2011-04-12 Martin Jambor <mjambor@suse.cz>
2928 * gcc-interface/utils.c (end_subprog_body): Call cgraph_get_create_node
2929 instead of cgraph_node.
2931 2011-04-08 Eric Botcazou <ebotcazou@adacore.com>
2933 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Procedure>: Set minimum
2934 alignment on fields of the RETURN type built for the Copy-In Copy-Out
2937 2011-04-08 Eric Botcazou <ebotcazou@adacore.com>
2939 * gcc-interface/trans.c (Identifier_to_gnu): Do not return initializers
2940 of aggregate types that contain a placeholder.
2942 2011-04-08 Nathan Froyd <froydnj@codesourcery.com>
2944 * gcc-interface/utils.c (handle_sentinel_attribute): Don't use
2946 (handle_type_generic_attribute): Likewise.
2948 2011-04-04 Eric Botcazou <ebotcazou@adacore.com>
2951 * s-oscons-tmplt.c (MSG_WAITALL): Fix thinko in previous change.
2953 2011-04-04 Kai Tietz <ktietz@redhat.com>
2956 * s-oscons-tmplt.c (MSG_WAITALL): Define it for native windows targets
2959 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
2961 * gcc-interface/utils2.c (build_allocator): In the unconstrained array
2962 type case, do not strip a padding type around the array type.
2964 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
2966 * gcc-interface/utils.c (update_pointer_to): Finalize named pointer
2969 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
2971 * gcc-interface/lang.opt (feliminate-unused-debug-types): Delete.
2972 * gcc-interface/misc.c (gnat_handle_option): Remove special handling
2973 code for -feliminate-unused-debug-types.
2974 (gnat_post_options): Likewise.
2976 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
2978 * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
2979 declaration of a pointer type, then set DECL_ORIGINAL_TYPE to a
2982 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
2984 * gcc-interface/decl.c (gnat_to_gnu_entity): Do not force the
2985 DECL_ARTIFICIAL flag on enumeration types.
2987 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
2989 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: Do not make
2990 fat pointer types artificial unconditionally.
2991 <E_Array_Subtype>: Attach the base array type as a parallel type if it
2994 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
2996 * gcc-interface/gigi.h (get_dummy_type): Declare.
2997 (build_dummy_unc_pointer_types): Likewise.
2998 (finish_fat_pointer_type): Likewise.
2999 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: If a dummy
3000 fat pointer type has been built, complete it in place.
3001 <E_Access_Type>: Call build_dummy_unc_pointer_types to build dummy fat
3002 and thin pointers. Remove useless variable.
3003 (finish_fat_pointer_type): Make global and move to...
3004 * gcc-interface/utils.c (finish_fat_pointer_type): ...here.
3005 (get_dummy_type): New function.
3006 (build_dummy_unc_pointer_types): Likewise.
3007 (gnat_pushdecl): Propage the name to the anonymous variants only.
3008 (update_pointer_to): Only adjust the pointer types in the unconstrained
3011 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
3013 * gcc-interface/ada-tree.h (DECL_TAFT_TYPE_P): New flag.
3014 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Incomplete_Type>: Set it
3015 if this is a Taft amendment type and the full declaration is available.
3016 * gcc-interface/trans.c (process_type): Likewise.
3017 If there is an old type, mark the new one as used if DECL_TAFT_TYPE_P.
3018 (process_freeze_entity): Likewise.
3019 * gcc-interface/utils.c (dummy_global): New static variable.
3020 (gnat_write_global_declarations): If there are types declared as used
3021 at the global level, insert them in the global hash table.
3023 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
3025 * gcc-interface/gigi.h (record_builtin_type): Add ARTIFICIAL_P param.
3026 * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
3027 declaration of an array type, then set DECL_ORIGINAL_TYPE to a distinct
3029 (record_builtin_type): Add ARTIFICIAL_P parameter. Set DECL_ARTIFICIAL
3030 flag of the type accordingly.
3031 * gcc-interface/trans.c (gigi): Adjust calls to record_builtin_type.
3033 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
3035 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
3036 finalizing types when updating the pointers to the designated type.
3037 <all>: Finalize the deferred types even if we didn't defer processing
3038 of incomplete types in this invocation.
3040 2011-04-01 Olivier Hainque <hainque@adacore.com>
3041 Nicolas Setton <setton@adacore.com>
3042 Eric Botcazou <ebotcazou@adacore.com>
3044 * gcc-interface/misc.c (gnat_descriptive_type): New function.
3045 (LANG_HOOKS_DESCRIPTIVE_TYPE): Redefine to gnat_descriptive_type.
3047 2011-03-28 Kai Tietz <ktietz@redhat.com>
3049 * gcc-interface/Makefile.in (SO_LIB): Handle multilib build for native
3051 (EH_MECHANISM): Use GCC exception mechanism for native Windows targets.
3052 * system-mingw.ads (System): Change ZCX_By_Default default to True.
3054 * raise-gcc.c (PERSONALITY_FUNCTION): Add prototype.
3056 2011-03-28 Tristan Gingold <gingold@adacore.com>
3059 * gcc-interface/Make-lang.in (ada/b_gnat1.adb): Replace ada/b_gnat1.c.
3060 Use ada output of gnatbind.
3061 (ada/b_gnatb.adb): Ditto.
3062 (ada/b_gnat1.o, ada/b_gnatb.o): New rules.
3063 (ada.mostlyclean, ada.stage1)
3064 (ada.stage2, ada.stage3, ada.stage4, ada.stageprofile)
3065 (ada.stagefeedback): Adjust.
3066 * gcc-interface/Makefile.in (b_gnatl.adb): Replace b_gnatl.c.
3067 Use ada output of gnatbind.
3068 (b_gnatm.adb): Ditto.
3069 (b_gnatl.o, b_gnatm.o): New rules.
3071 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
3073 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
3074 for the padded type built to support a specified size or alignment.
3076 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
3078 * gcc-interface/gigi.h (finalize_from_with_types): Adjust comment.
3079 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
3080 unconditionally to the end of the unit when the designated type is
3082 <all>: Rename local variable. Attempt to un-defer types only and do it
3083 for limited_with'ed types as well.
3084 (finalize_from_with_types): Adjust comment. Rename variable and tidy.
3085 * gcc-interface/trans.c (Compilation_Unit_to_gnu): Use GNAT_UNIT
3086 consistently and remove redundant call to finalize_from_with_types.
3088 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
3090 * inline.adb (Back_End_Cannot_Inline): Lift restriction on calls to
3091 subprograms without a previous spec declared in the same unit.
3092 * gcc-interface/trans.c (Compilation_Unit_to_gnu): Process inlined
3093 subprograms at the end of the unit instead of at the beginning.
3094 * gcc-interface/utils.c (create_subprog_decl): Check that the entity
3095 isn't public for the special handling of non-inline functions nested
3096 inside inline external functions.
3098 2011-03-25 Jeff Law <law@redhat.com>
3100 * gcc-interface/utils.c (def_fn_type): Add missing va_end.
3102 2011-03-24 Eric Botcazou <ebotcazou@adacore.com>
3104 * einfo.ads (Size_Depends_On_Discriminant): Adjust description.
3105 * layout.adb (Compute_Size_Depends_On_Discriminant): New procedure
3106 to compute Set_Size_Depends_On_Discriminant.
3107 (Layout_Type): Call it on array types in back-end layout mode.
3108 * sem_util.adb (Requires_Transient_Scope): Return true for array
3109 types only if the size depends on the value of discriminants.
3110 * gcc-interface/utils2.c (build_binary_op) <MODIFY_EXPR>: Use the RHS
3111 type if the RHS is a call to a function that returns an unconstrained
3112 type with default discriminant.
3114 2011-03-24 Eric Botcazou <ebotcazou@adacore.com>
3116 * gcc-interface/trans.c (gnat_to_gnu): Remove obsolete case of
3117 non-conversion to the nominal result type at the end.
3119 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
3121 * gcc-interface/trans.c (create_temporary): New function taken from...
3122 (create_init_temporary): ...here. Call it.
3123 (call_to_gnu): Create the temporary for the return value early, if any.
3124 Create it for a function with copy-in/copy-out parameters if there is
3125 no target; in other cases of copy-in/copy-out, use another temporary.
3126 Push the new binding level lazily. Add and rename local variables.
3128 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
3130 * gcc-interface/decl.c (validate_size): Improve comments and tweak
3132 (set_rm_size): Likewise.
3134 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
3136 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
3137 for the padded type built in order to support a specified alignment.
3138 Fix incorrect formatting.
3140 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
3143 * gcc-interface/decl.c (elaborate_expression_1): Localize GNU_DECL.
3145 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
3147 * gcc-interface/decl.c (components_to_record): Add REORDER parameter,
3148 rename DEBUG_INFO_P into DEBUG_INFO and move P_GNU_REP_LIST parameter
3149 to the end of the list. Adjust recursive call. Rename local variable.
3150 If REORDER is true, reorder components of the record type.
3151 (gnat_to_gnu_entity): Pass OK_To_Reorder_Components flag as argument to
3152 components_to_record and adjust the parameter list.
3154 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
3156 * gcc-interface/decl.c (elaborate_expression_1): When optimization is
3157 disabled, use the variable for bounds of loop iteration scheme.
3159 2011-03-21 Kai Tietz <ktietz@redhat.com>
3162 * gcc-interface/utils.c (gnat_internal_attribute_table): Add column.
3164 2011-03-17 Eric Botcazou <ebotcazou@adacore.com>
3166 * gcc-interface/decl.c (elaborate_expression_1): Try harder to find
3167 out whether the expression is read-only. Short-circuit placeholder
3168 case and rename a couple of local variables.
3170 2011-03-17 Eric Botcazou <ebotcazou@adacore.com>
3172 * gcc-interface/gigi.h (smaller_form_type_p): Declare.
3173 * gcc-interface/trans.c (smaller_form_type_p): Make global and move...
3174 * gcc-interface/utils.c (smaller_form_type_p): ...to here.
3175 (convert): Deal with conversions from a smaller form type specially.
3177 2011-02-14 Eric Botcazou <ebotcazou@adacore.com>
3179 * gcc-interface/misc.c (gnat_init_options): Do not concatenate -I and
3180 its argument, except for the special -I- switch.
3182 2011-02-12 Gerald Pfeifer <gerald@pfeifer.com>
3184 * gnat_ugn.texi (Compiling Different Versions of Ada): Update link to
3187 2011-02-08 Eric Botcazou <ebotcazou@adacore.com>
3189 * gcc-interface/Makefile.in (x86-64 darwin): Handle multilibs.
3191 2011-02-03 Eric Botcazou <ebotcazou@adacore.com>
3193 * gcc-interface/gigi.h (fill_vms_descriptor): Take GNU_TYPE instead of
3195 * gcc-interface/utils2.c (fill_vms_descriptor): Move from here to...
3196 * gcc-interface/utils.c (fill_vms_descriptor): ...here. Take GNU_TYPE
3197 instead of GNAT_FORMAL. Protect the expression against multiple uses.
3198 Do not generate the check directly, instead instantiate the template
3199 check present in the descriptor.
3200 (make_descriptor_field): Move around.
3201 (build_vms_descriptor32): Build a template check in the POINTER field.
3202 (build_vms_descriptor): Remove useless suffixes.
3203 * gcc-interface/trans.c (call_to_gnu): Adjust fill_vms_descriptor call.
3205 2011-01-26 Eric Botcazou <ebotcazou@adacore.com>
3208 * targext.c: Include target files if IN_RTS is defined.
3210 2011-01-26 Richard Guenther <rguenther@suse.de>
3213 * targext.c: Include config.h.
3214 * gcc-interface/Make-lang.in (ada/targext.o): Add $(CONFIG_H)
3217 2011-01-04 Pascal Obry <obry@adacore.com>
3218 Eric Botcazou <ebotcazou@adacore.com>
3220 * gcc-interface/decl.c: Disable Stdcall convention handling for 64-bit.
3222 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
3224 * gcc-interface/trans.c (Case_Statement_to_gnu): Put the SLOC of the
3225 end-of-case on the end label and its associated gotos, if any.
3227 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
3229 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Evaluate the
3230 expressions of the parameter cache within the statement group of
3233 2011-01-04 Olivier Hainque <hainque@adacore.com>
3234 Eric Botcazou <ebotcazou@adacore.com>
3236 * gcc-interface/trans.c (BLOCK_SOURCE_END_LOCATION): Provide default.
3237 (set_end_locus_from_node): New function.
3238 (Subprogram_Body_to_gnu): Use it to mark both the inner BIND_EXPR we
3239 make and the function end_locus.
3240 (Compilation_Unit_to_gnu): Call it instead of a straight Sloc_to_locus
3241 for the elaboration subprogram.
3242 (set_gnu_expr_location_from_node) <default case>: Use it to attempt to
3243 set the end_locus of the expression as well.
3245 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
3248 * gcc-interface/trans.c (Identifier_to_gnu): In SJLJ mode, do not make
3249 variables that are referenced in exception handlers volatile.
3253 Copyright (C) 2011 Free Software Foundation, Inc.
3255 Copying and distribution of this file, with or without modification,
3256 are permitted in any medium without royalty provided the copyright
3257 notice and this notice are preserved.
3259 * gnat_rm.texi: Ramification of pragma Eliminate documentation
3260 - fix bugs in the description of Source_Trace;
3261 - get rid of UNIT_NAME;
3263 2011-08-02 Javier Miranda <miranda@adacore.com>
3266 (Build_Dispatching_Requeue): Adding support for VM targets
3267 since we cannot directly reference the Tag entity.
3268 * exp_sel.adb (Build_K): Adding support for VM targets.
3269 (Build_S_Assignment): Adding support for VM targets.
3271 (Default_Prim_Op_Position): In VM targets do not restrict availability
3272 of predefined interface primitives to compiling in Ada 2005 mode.
3273 (Is_Predefined_Interface_Primitive): In VM targets this service is not
3274 restricted to compiling in Ada 2005 mode.
3275 (Make_VM_TSD): Generate code that declares and initializes the OSD
3276 record. Needed to support dispatching calls through synchronized
3279 (Make_Predefined_Primitive_Specs): Enable generation of predefined
3280 primitives associated with synchronized interfaces.
3281 (Make_Predefined_Primitive_Bodies): Enable generation of predefined
3282 primitives associated with synchronized interfaces.
3284 2011-08-02 Yannick Moy <moy@adacore.com>
3286 * par-ch11.adb (P_Handled_Sequence_Of_Statements): mark a sequence of
3287 statements hidden in SPARK if preceded by the HIDE directive
3288 (Parse_Exception_Handlers): mark each exception handler in a sequence of
3289 exception handlers as hidden in SPARK if preceded by the HIDE directive
3290 * par-ch6.adb (P_Subprogram): mark a subprogram body hidden in SPARK
3291 if starting with the HIDE directive
3292 * par-ch7.adb (P_Package): mark a package body hidden in SPARK if
3293 starting with the HIDE directive; mark the declarations in a private
3294 part as hidden in SPARK if the private part starts with the HIDE
3296 * restrict.adb, restrict.ads
3297 (Set_Hidden_Part_In_SPARK): record a range of slocs as hidden in SPARK
3298 (Is_In_Hidden_Part_In_SPARK): new function which returns whether its
3299 argument node belongs to a part which is hidden in SPARK
3300 (Check_SPARK_Restriction): do not issue violations on nodes in hidden
3301 parts in SPARK; protect the possibly costly call to
3302 Is_In_Hidden_Part_In_SPARK by a check that the SPARK restriction is on
3303 * scans.ads (Token_Type): new value Tok_SPARK_Hide in enumeration
3304 * scng.adb (Accumulate_Token_Checksum_GNAT_6_3,
3305 Accumulate_Token_Checksum_GNAT_5_03): add case for new token
3307 (Scan): recognize special comment starting with '#' and followed by
3308 SPARK keyword "hide" as a HIDE directive.
3310 2011-08-02 Yannick Moy <moy@adacore.com>
3312 * types.ads, erroutc.ads: Minor reformatting.
3314 2011-08-02 Vincent Celier <celier@adacore.com>
3316 * link.c: Add response file support for cross platforms.
3318 2011-08-02 Ed Schonberg <schonberg@adacore.com>
3320 * sem_aggr.adb (Resolve_Array_Aggregate): when copying the expression
3321 in an association, set parent field of copy before partial analysis.
3322 * sem_res.adb (Resolve_Slice): create reference to itype only when
3323 expansion is enabled.
3325 2011-08-02 Yannick Moy <moy@adacore.com>
3327 * einfo.adb, einfo.ads (Body_Is_In_ALFA, Set_Body_Is_In_ALFA): get/set
3328 for new flag denoting which subprogram bodies are in ALFA
3329 * restrict.adb, sem_ch7.adb: Update comment
3330 * sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
3331 sem_ch9.adb, sem_res.adb: Add calls to
3332 Current_Subprogram_Body_Is_Not_In_ALFA on unsupported constructs.
3333 * sem_ch6.adb (Analyze_Function_Return): add calls to
3334 Current_Subprogram_Body_Is_Not_In_ALFA on return statement in the
3335 middle of the body, and extended return.
3336 (Check_Missing_Return): add calls to Set_Body_Is_In_ALFA with argument
3337 False when missing return.
3338 (Analyze_Subprogram_Body_Helper): initialize the flag Body_Is_In_ALFA
3339 to True for subprograms whose spec is in ALFA. Remove later on the flag
3340 on the entity used for a subprogram body when there exists a separate
3342 * sem_util.adb, sem_util.ads (Current_Subprogram_Body_Is_Not_In_ALFA):
3343 if Current_Subprogram is not Empty, set its flag Body_Is_In_ALFA to
3344 False, otherwise do nothing.
3346 2011-08-02 Robert Dewar <dewar@adacore.com>
3348 * inline.adb, stand.ads, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
3350 2011-08-02 Yannick Moy <moy@adacore.com>
3352 * sem_ch4.ads: minor formatting.
3354 2011-08-02 Yannick Moy <moy@adacore.com>
3356 * sem_aggr.adb, err_vars.ads, sem_ch3.adb, sem_ch5.adb, sem_ch9.adb,
3357 debug.adb, sem_util.adb, sem_res.adb, sem_attr.adb, gnat1drv.adb,
3358 errout.adb, errout.ads, exp_ch6.adb, sem_ch4.adb, restrict.adb,
3359 restrict.ads, sem_ch6.adb, sem_ch8.adb, sem_ch11.adb,
3360 opt.ads: cleanup of SPARK mode
3362 2011-08-02 Yannick Moy <moy@adacore.com>
3364 * cstand.adb (Create_Standard): sets Is_In_ALFA component of standard
3366 * einfo.adb, einfo.ads (Is_In_ALFA): add flag for all entities
3367 (Is_In_ALFA, Set_Is_In_ALFA): new subprograms to access flag Is_In_ALFA
3369 (Analyze_Object_Declaration): set Is_In_ALFA flag for objects
3370 (Constrain_Enumeration): set Is_In_ALFA flag for enumeration subtypes
3371 (Constrain_Integer): set Is_In_ALFA flag for integer subtypes
3372 (Enumeration_Type_Declaration): set Is_In_ALFA flag for enumeration
3374 (Set_Scalar_Range_For_Subtype): unset Is_In_ALFA flag for subtypes with
3376 * sem_ch6.adb (Analyze_Return_Type): unset Is_In_ALFA flag for
3377 functions whose return type is not in ALFA.
3378 (Analyze_Subprogram_Specification): set Is_In_ALFA flag for subprogram
3380 (Process_Formals): unset Is_In_ALFA flag for subprograms if a
3381 parameter's type is not in ALFA.
3382 * stand.ads (Standard_Type_Is_In_ALFA): array defines which standard
3385 2011-08-02 Ed Schonberg <schonberg@adacore.com>
3387 * sem_ch6 (Analyze_Expression_Function): treat the function as
3388 Inline_Always, and introduce a subprogram declaration for it when it is
3390 * inline.adb (Add_Inlined_Body): recognize bodies that come from
3391 expression functions, so that the back-end can determine whether they
3392 can in fact be inlined.
3393 * sem_util.adb (Is_Expression_Function): predicate to determine whether
3394 a function body comes from an expression function.
3396 2011-08-02 Gary Dismukes <dismukes@adacore.com>
3398 * sem_ch6.adb (Check_Conformance): Revise the check for nonconforming
3399 null exclusions to test Can_Never_Be_Null on the anonymous access types
3400 of the formals rather than testing the formals themselves. Exclude this
3401 check in cases where the Old_Formal is marked as a controlling formal,
3402 to avoid issuing spurious errors for bodies completing dispatching
3403 operations (due to the flag not getting set on controlling access
3404 formals in body specs).
3405 (Find_Corresponding_Spec): When checking full and subtype conformance of
3406 subprogram bodies in instances, pass Designated and E in that order, for
3407 consistency with the expected order of the formals (New_Id followed by
3410 2011-08-02 Robert Dewar <dewar@adacore.com>
3412 * sem_ch8.adb: Minor reformatting.
3414 2011-08-02 Ed Schonberg <schonberg@adacore.com>
3416 * sem_ch8.adb (Analyze_Subprogram_Renaming): new procedure
3417 Check_Class_Wide_Actual, to implement AI05-0071, on defaulted
3418 primitive operations of class-wide actuals.
3420 2011-08-02 Javier Miranda <miranda@adacore.com>
3422 * exp_atag.ads, exp_atag.adb
3423 (Build_Common_Dispatching_Select_Statements): Remove argument Loc
3424 since its value is implicitly passed in argument Typ.
3425 * exp_disp.adb (Make_Disp_Conditional_Select_Body,
3426 Make_Disp_Timed_Select_Body): Remove Loc in calls to routine
3427 Build_Common_Dispatching_Select_Statements.
3429 2011-08-02 Robert Dewar <dewar@adacore.com>
3431 * sem_ch3.adb, exp_atag.ads, get_scos.adb, get_scos.ads,
3432 exp_disp.adb, lib-xref.adb, lib-xref.ads: Update comments.
3435 2011-08-02 Robert Dewar <dewar@adacore.com>
3437 * sem_res.adb: Minor reformatting.
3438 * sem_prag.adb: Minor reformatting.
3440 2011-08-02 Javier Miranda <miranda@adacore.com>
3442 * exp_atag.adb, exp_atags.ads
3443 (Build_Common_Dispatching_Select_Statement): Replace argument DT_Ptr
3444 by the tagged type Entity. Required to use this routine in the VM
3445 targets since we do not have available the Tag entity in the VM
3448 (Expand_N_Subprogram_Body): Do not invoke Build_VM_TSDs if package
3449 Ada.Tags has not been previously loaded.
3451 (Expand_N_Package_Declaration, Expand_N_Package_Body): Do not invoke
3452 Build_VM_TSDs if package Ada.Tags has not been previously loaded.
3454 (Enclosing_Dynamic_Scope): Add missing support to handle the full
3455 view of enclosing scopes. Required to handle enclosing scopes that
3456 are synchronized types whose full view is a task type.
3458 (Build_VM_TSDs): Minor code improvement to avoid generating and
3459 analyzing lists with empty nodes.
3460 (Make_Disp_Asynchronous_Select_Body): Add support for VM targets.
3461 (Make_Disp_Conditional_Select_Body): Add support for VM targets.
3462 (Make_Disp_Get_Prim_Op_Kind): Add support for VM targets.
3463 (Make_Disp_Timed_Select_Body): Add support for VM targets.
3464 (Make_Select_Specific_Data_Table): Add support for VM targets.
3465 (Make_VM_TSD): Generate code to initialize the SSD structure of
3468 2011-08-02 Yannick Moy <moy@adacore.com>
3470 * lib-writ.adb (Write_ALI): when ALFA mode is set, write local
3471 cross-references section in ALI.
3472 * lib-xref.adb, lib-xref.ads (Xref_Entry): add components Sub
3473 (enclosing subprogram), Slc (location of Sub) and Sun (unit number of
3475 (Enclosing_Subprogram_Or_Package): new function to return the enclosing
3476 subprogram or package entity of a node
3477 (Is_Local_Reference_Type): new function returns True for references
3478 selected in local cross-references.
3479 (Lt): function extracted from Lt in Output_References
3480 (Write_Entity_Name): function extracted from Output_References
3481 (Generate_Definition): generate reference with type 'D' for definition
3482 of objects (object declaration and parameter specification), with
3483 appropriate locations and units, for use in local cross-references.
3484 (Generate_Reference): update fields Sub, Slc and Sun. Keep newly created
3485 references of type 'I' for initialization in object definition.
3486 (Output_References): move part of function Lt and procedure
3487 Write_Entity_Name outside of the body. Ignore references of types 'D'
3488 and 'I' introduced for local cross-references.
3489 (Output_Local_References): new procedure to output the local
3490 cross-references sections.
3491 (Lref_Entity_Status): new array defining whether an entity is a local
3492 * sem_ch3.adb (Analyze_Object_Declaration): call Generate_Reference
3493 with 'I' type when initialization expression is present.
3494 * get_scos.adb, get_scos.ads: Correct comments and typos
3496 2011-08-02 Javier Miranda <miranda@adacore.com>
3498 * exp_ch6.adb (Expand_N_Subprogram_Body): Enable generation of TSDs in
3500 * exp_ch7.adb (Expand_N_Package_Body): Enable generation of TSDs in
3502 * exp_disp.adb (Build_VM_TSDs): No action needed if the runtime has no
3505 2011-08-02 Vincent Celier <celier@adacore.com>
3507 * prj-nmsc.adb (File_Found): New components Excl_File and Excl_Line
3508 (No_Space_Img): New function
3509 (Find_Excluded_Sources): When reading from a file, record the file name
3510 and the line number for each excluded source.
3511 (Mark_Excluded_Sources): When reporting an error, if the excluded
3512 sources were read from a file, include file name and line number in
3515 2011-08-02 Ed Schonberg <schonberg@adacore.com>
3517 * sem_res.adb (Resolve_Call): implement rule in RM 12.5.1 (23.3/2).
3519 2011-08-02 Robert Dewar <dewar@adacore.com>
3521 * exp_ch7.adb exp_ch6.adb, exp_disp.adb: Minor reformatting
3523 2011-08-02 Javier Miranda <miranda@adacore.com>
3525 * exp_ch6.adb (Expand_N_Subprogram_Body): Temporarily restrict the
3526 generation of TSDs to the DOTNET compiler.
3527 * exp_ch7.adb (Expand_N_Package_Body): Temporarily restrict the
3528 generation of TSDs to the DOTNET compiler.
3530 2011-08-02 Javier Miranda <miranda@adacore.com>
3532 * exp_disp.ads (Build_VM_TSDs): Build the runtime Type Specific Data
3533 record of all the tagged types declared inside library level package
3534 declarations, library level package bodies or library level subprograms.
3535 * exp_disp.adb (Make_VM_TSD): New subprogram that builds the TSD
3536 associated with a given tagged type.
3537 (Build_VM_TSDs): New subprogram.
3538 * exp_ch6.adb (Expand_N_Subprogram_Body): Generate TSDs records of main
3539 compilation units that are subprograms.
3540 * exp_ch7.adb (Expand_N_Package_Body): Generate TSDs of main
3541 compilation units that are package bodies.
3542 (Expand_N_Package_Declaration): Generate TSDs of the main compilation
3543 units that are a package declaration or a package instantiation.
3544 * exp_intr.adb (Expand_Dispatching_Constructor_Call): Minor code
3545 reorganization to improve the error generated by the frontend when the
3546 function Ada.Tags.Secondary_Tag is not available.
3547 * rtsfind.ads (RE_Register_TSD): New runtime entity.
3548 * exp_ch4.adb (Expand_N_Type_Conversion): Minor code cleanup.
3550 2011-08-02 Javier Miranda <miranda@adacore.com>
3552 * exp_disp.adb (Make_DT): Generate call to Check_TSD in Ada 2005 mode.
3554 2011-08-02 Robert Dewar <dewar@adacore.com>
3556 * s-imenne.ads: Minor reformatting.
3558 2011-08-02 Robert Dewar <dewar@adacore.com>
3560 * a-stunau.ads: Add pragma Suppress_Initialization for Big_String
3561 * freeze.adb (Warn_Overlay): Don't warn if initialization suppressed
3562 * s-stalib.ads: Add pragma Suppress_Initialization for Big_String
3564 2011-08-02 Robert Dewar <dewar@adacore.com>
3566 * einfo.ads (Materialize_Entity): Document this is only for renamings
3567 * exp_ch3.adb (Expand_N_Object_Declaration): Make sure we generate
3568 required debug information in the case where we transform the object
3569 declaration into a renaming declaration.
3570 * exp_ch4.adb (Expand_Concatenate): Generate debug info for result
3572 * exp_dbug.ads (Debug_Renaming_Declaration): Document setting of
3575 2011-08-02 Robert Dewar <dewar@adacore.com>
3577 * einfo.ads, einfo.adb (Suppress_Initialization): Replaces
3578 Suppress_Init_Procs.
3579 * exp_ch3.adb, exp_disp.adb, freeze.adb: Use
3580 Suppress_Initialization/Initialization_Suppressed.
3581 * gnat_rm.texi: New documentation for pragma Suppress_Initialization
3582 * sem_aux.ads, sem_aux.adb (Initialization_Suppressed): New function
3583 * sem_dist.adb: Use Suppress_Initialization/Initialization_Suppressed
3584 * sem_prag.adb: New processing for pragma Suppress_Initialization.
3586 2011-08-02 Robert Dewar <dewar@adacore.com>
3588 * gnat_rm.texi, a-tags.ads, sem_prag.adb, sem_ch12.adb, exp_disp.adb:
3591 2011-08-02 Ed Schonberg <schonberg@adacore.com>
3593 * sem_prag.adb (Chain_PPC): Implement AI04-0230: null procedures can
3594 only have inheritable classwide pre/postconditions.
3596 2011-08-02 Javier Miranda <miranda@adacore.com>
3598 * a-tags.ads, a-tags.adb (Check_TSD): New subprogram.
3599 * rtsfind.ads (RE_Check_TSD): New runtime entity.
3600 * exp_disp.adb (Make_DT): Generate call to the new runtime routine that
3601 checks if the external tag of a type is the same as the external tag
3602 of some other declaration.
3604 2011-08-02 Thomas Quinot <quinot@adacore.com>
3606 * s-taskin.ads: Minor reformatting.
3608 2011-08-02 Emmanuel Briot <briot@adacore.com>
3610 * g-comlin.adb (Display_Help): swap the order in which it prints the
3611 short help and the general usage.
3613 2011-08-02 Ed Schonberg <schonberg@adacore.com>
3615 * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration): copy properly
3616 the aspect declarations and attach them to the generic copy for
3617 subsequent analysis.
3618 (Analyze_Subprogram_Instantiation): copy explicitly the aspect
3619 declarations of the generic tree to the new subprogram declarations.
3620 * sem_attr.adb (Check_Precondition_Postcondition): recognize
3621 conditions that apply to a subprogram instance.
3623 2011-08-02 Robert Dewar <dewar@adacore.com>
3625 * gnat_rm.texi: Clarify doc on pragma Source_File_Name[_Project].
3627 2011-08-02 Ed Schonberg <schonberg@adacore.com>
3629 * sem_ch3.adb (Derived_Type_Declaration): When checking that a untagged
3630 private type with a tagged full view is not derived in the immediate
3631 scope of the partial view, (RM 7.3 (7)) use the scope of the base type.
3633 2011-08-02 Robert Dewar <dewar@adacore.com>
3635 * exp_ch4.adb: Minor reformatting.
3637 2011-08-02 Ed Schonberg <schonberg@adacore.com>
3639 * sem_ch5.adb (Analyze_Loop_Statement): If the iteration scheme is an
3640 Ada2012 iterator, the loop will be rewritten during expansion into a
3641 while loop with a cursor and an element declaration. Do not analyze the
3642 body in this case, because if the container is for indefinite types the
3643 actual subtype of the elements will only be determined when the cursor
3644 declaration is analyzed.
3646 2011-08-02 Arnaud Charlet <charlet@adacore.com>
3648 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Ignore
3649 size/alignment related attributes in CodePeer_Mode.
3651 2011-08-02 Gary Dismukes <dismukes@adacore.com>
3653 * sem_ch3.adb (Check_Ops_From_Incomplete_Type): Remove call to
3654 Prepend_Element, since this can result in the operation getting the
3655 wrong slot in the full type's dispatch table if the full type has
3656 inherited operations. The incomplete type's operation will get added
3657 to the proper position in the full type's primitives
3658 list later in Sem_Disp.Check_Operation_From_Incomplete_Type.
3659 (Process_Incomplete_Dependents): Add Is_Primitive test when checking for
3660 dispatching operations, since there are cases where nonprimitive
3661 subprograms can get added to the list of incomplete dependents (such
3662 as subprograms in nested packages).
3663 * sem_ch6.adb (Process_Formals): First, remove test for being in a
3664 private part when determining whether to add a primitive with a
3665 parameter of a tagged incomplete type to the Private_Dependents list.
3666 Such primitives can also occur in the visible part, and should not have
3667 been excluded from being private dependents.
3668 * sem_ch7.adb (Uninstall_Declarations): When checking the rule of
3669 RM05-3.10.1(9.3/2), test that a subprogram in the Private_Dependents
3670 list of a Taft-amendment incomplete type is a primitive before issuing
3671 an error that the full type must appear in the same unit. There are
3672 cases where nonprimitives can be in the list (such as subprograms in
3674 * sem_disp.adb (Derives_From): Use correct condition for checking that
3675 a formal's type is derived from the type of the corresponding formal in
3676 the parent subprogram (the condition was completely wrong). Add
3677 checking that was missing for controlling result types being derived
3678 from the result type of the parent operation.
3680 2011-08-02 Yannick Moy <moy@adacore.com>
3682 * errout.adb (First_Node): minor renaming
3683 * restrict.adb (Check_Formal_Restriction): put restriction warning on
3686 2011-08-02 Yannick Moy <moy@adacore.com>
3688 * sem_res.adb (Resolve_Logical_Op): ensure N is a binary operator
3689 before accessing operands.
3690 * sem_util.adb (Is_SPARK_Initialization_Expr): follow original nodes to
3691 decide whether an initialization expression respects SPARK rules, as
3692 the plain node is the expanded one. This allows for more valid warnings
3694 * gnat_rm.texi: Minor update.
3696 2011-08-02 Arnaud Charlet <charlet@adacore.com>
3698 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Revert
3701 2011-08-02 Robert Dewar <dewar@adacore.com>
3703 * sem_ch3.adb, sem_ch4.adb: Minor reformatting.
3705 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
3707 * exp_ch5.adb (Expand_Iterator_Loop): Reformatting. Wrap the original
3708 loop statements and the element renaming declaration with a block when
3709 the element type is controlled.
3711 2011-08-02 Yannick Moy <moy@adacore.com>
3713 * sinfo.ads: Minor formatting.
3715 2011-08-02 Ed Schonberg <schonberg@adacore.com>
3717 * sem_aggr.adb (Add_Association): if the association has a box and no
3718 expression, use the Sloc of the aggregate itself for the new
3720 * errout.adb (First_Node): Exclude nodes with no Sloc, and always use
3723 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
3725 * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and refactoring.
3726 When a container is provided via a function call, generate a renaming
3727 of the function result. This avoids the creation of a transient scope
3728 and the premature finalization of the container.
3729 * exp_ch7.adb (Is_Container_Cursor): Removed.
3730 (Wrap_Transient_Declaration): Remove the supression of the finalization
3731 of the list controller when the declaration denotes a container cursor,
3734 2011-08-02 Yannick Moy <moy@adacore.com>
3736 * restrict.adb (Check_Formal_Restriction): only issue a warning if the
3737 node is from source, instead of the original node being from source.
3739 (Resolve_Array_Aggregate): refine the check for a static expression, to
3740 recognize also static ranges
3741 * sem_ch3.adb, sem_ch3.ads (Analyze_Component_Declaration,
3742 Array_Type_Declaration): postpone the test for the type being a subtype
3743 mark after the type has been resolved, so that component-selection and
3744 expanded-name are discriminated.
3745 (Make_Index, Process_Range_Expr_In_Decl): add a parameter In_Iter_Schm
3746 to distinguish the case of an iteration scheme, so that an error is
3747 issed on a non-static range in SPARK except in an iteration scheme.
3748 * sem_ch5.adb (Analyze_Iteration_Scheme): call Make_Index with
3749 In_Iter_Schm = True.
3750 * sem_ch6.adb (Analyze_Subprogram_Specification): refine the check for
3751 user-defined operators so that they are allowed in renaming
3753 (Find_Selected_Component): refine the check for prefixing of operators
3754 so that they are allowed in renaming. Move the checks for restrictions
3755 on selector name after analysis discriminated between
3756 component-selection and expanded-name.
3757 * sem_res.adb (Resolve_Op_Concat_Arg): do not issue a warning on
3758 concatenation argument of string type if it is static.
3759 * sem_util.adb, sem_util.ads
3760 (Check_Later_Vs_Basic_Declarations): add a new function
3761 Is_Later_Declarative_Item to decice which declarations are allowed as
3762 later items, in the two different modes Ada 83 and SPARK. In the SPARK
3763 mode, add that renamings are considered as later items.
3764 (Enclosing_Package): new function to return the enclosing package
3765 (Enter_Name): correct the rule for homonyms in SPARK
3766 (Is_SPARK_Initialization_Expr): default to returning True on nodes not
3767 from source (result of expansion) to avoid issuing wrong warnings.
3769 2011-08-02 Ed Schonberg <schonberg@adacore.com>
3771 * errout.adb: On anything but an expression First_Node returns its
3774 2011-08-02 Pascal Obry <obry@adacore.com>
3776 * prj-proc.adb, make.adb, makeutl.adb: Minor reformatting.
3778 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
3780 * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and reorganization.
3781 Set the associated loop as the related expression of internally
3783 * exp_ch7.adb (Is_Container_Cursor): New routine.
3784 (Wrap_Transient_Declaration): Supress the finalization of the list
3785 controller when the declaration denotes a container cursor.
3787 2011-08-02 Yannick Moy <moy@adacore.com>
3789 * opt.ads (SPARK_Mode): update comment, SPARK_Mode only set through
3791 * par-ch3.adb (P_Delta_Constraint): remove check in SPARK mode that the
3792 expression is a simple expression. This check cannot be performed in
3793 the semantics, so just drop it.
3794 (P_Index_Or_Discriminant_Constraint): move check that the index or
3795 discriminant is a subtype mark to Analyze_Subtype_Declaration in the
3796 semantics. Other cases were previously checked in the semantics.
3797 * par-ch4.adb (P_Name): move checks that a selector name is not
3798 character literal or an operator symbol to Find_Selected_Component in
3800 * par-ch5.adb (Parse_Decls_Begin_End): move check that basic
3801 declarations are not placed after later declarations in a separate
3802 procedure in Sem_Util (possibly not the best choice?), to be used both
3803 during parsing, for Ada 83 mode, and during semantic analysis, for
3805 * par-endh.adb (Check_End): move check that end label is not missing
3806 to Process_End_Label in the semantics
3807 * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): remove
3808 the special case for SPARK restriction
3809 * par.adb: use and with Sem_Util, for use in Parse_Decls_Begin_End
3810 * restrict.adb, restrict.ads (Check_Formal_Restriction): add a
3811 parameter Force to issue the error message even on internal node (used
3812 for generated end label). Call Check_Restriction to check when an error
3813 must be issued. In SPARK mode, issue an error message even if the
3814 restriction is not set.
3815 (Check_Restriction): new procedure with an additional out parameter to
3816 inform the caller that a message has been issued
3817 * sem_aggr.adb: Minor modification of message
3818 * sem_attr.adb (Analyze_Attribute): call Check_Formal_Restriction
3819 instead of issuing an error message directly
3820 * sem_ch3.adb (Analyze_Declarations): move here the check that basic
3821 declarations are not placed after later declarations, by calling
3822 Check_Later_Vs_Basic_Declarations
3823 (Analyze_Subtype_Declaration): move here the check that an index or
3824 discriminant constraint must be a subtype mark. Change the check that
3825 a subtype of String must start at one so that it works on subtype marks.
3826 * sem_ch4.adb (Analyze_Call): move here the check that a named
3827 association cannot follow a positional one in a call
3828 * sem_ch5.adb (Check_Unreachable_Code): call Check_Formal_Restriction
3829 instead of issuing an error message directly
3830 * sem_ch8.adb (Find_Selected_Component): move here the check that a
3831 selector name is not a character literal or an operator symbol. Move
3832 here the check that the prefix of an expanded name cannot be a
3833 subprogram or a loop statement.
3834 * sem_util.adb, sem_util.ads (Check_Later_Vs_Basic_Declarations): new
3835 procedure called from parsing and semantics to check that basic
3836 declarations are not placed after later declarations
3837 (Process_End_Label): move here the check that end label is not missing
3839 2011-08-02 Arnaud Charlet <charlet@adacore.com>
3841 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Ignore enum
3842 representation clause in codepeer mode, since it confuses CodePeer and
3843 does not bring useful info.
3845 2011-08-02 Ed Falis <falis@adacore.com>
3847 * init.c: initialize fp hw on MILS.
3849 2011-08-02 Ed Schonberg <schonberg@adacore.com>
3851 * errout.adb (First_Node): for bodies, return the node itself (small
3852 optimization). For other nodes, do not check source_unit if the node
3853 comes from Standard.
3855 2011-08-02 Robert Dewar <dewar@adacore.com>
3857 * exp_ch3.adb: Minor comment additions.
3858 * sem_ch13.adb: Minor reformatting.
3860 2011-08-02 Pascal Obry <obry@adacore.com>
3862 * make.adb, makeutl.adb: Removes some superfluous directory separator.
3864 2011-08-02 Robert Dewar <dewar@adacore.com>
3866 * sem_attr.adb: Minor reformatting.
3868 2011-08-02 Robert Dewar <dewar@adacore.com>
3870 * einfo.adb (Has_Default_Aspect): Replaces Has_Default_Value
3871 (Has_Default_Component_Value): Removed
3872 * einfo.ads Comment updates
3873 (Has_Default_Aspect): Replaces Has_Default_Value
3874 (Has_Default_Component_Value): Removed
3876 (Expand_N_Freeze_Entity): Handle Default[_Component]_Value aspects
3878 (Build_Array_Init_Proc): Handle Default_[Component_]Value aspects
3879 (Get_Simple_Init_Val): Handle Default_Value aspect
3880 (Needs_Simple_Initialization): Handle Default_Value aspect
3881 * exp_ch3.ads: Needs_Simple_Initialization
3882 * freeze.adb (Freeze_Entity): Handle Default_[Component_]Value aspect
3883 * par-prag.adb (Pragma_Default[_Component]Value) Removed
3885 (Analyze_Aspect_Specifications): Fix Default[_Component]_Value aspects
3886 * sem_prag.adb (Pragma_Default[_Component]Value) Removed
3887 * snames.ads-tmpl (Pragma_Default[_Component]Value) Removed
3889 2011-08-02 Ed Schonberg <schonberg@adacore.com>
3891 * sem_ch5.adb (Analyze_Iterator_Specification): use base type to locate
3892 package containing iteration primitives.
3893 exp_ch5.adb (Expand_Iterator_Loop): ditto.
3895 2011-08-02 Ed Schonberg <schonberg@adacore.com>
3897 * sem_ch5.adb (Analyze_Iteration_Scheme): For an Ada2012 iterator with
3898 "of", pre-analyze expression in case it is a function call with
3899 finalization actions that must be placed ahead of the loop.
3900 * exp_ch5.adb (Expand_Iterator_Loop): If condition_actions are present
3901 on an Ada2012 iterator, insert them ahead of the rewritten loop.
3903 2011-08-02 Geert Bosch <bosch@adacore.com>
3905 * cstand.adb (Create_Float_Types): Only consider C's long double for
3906 Long_Long_Float, in addition to double.
3908 2011-08-02 Robert Dewar <dewar@adacore.com>
3910 * sem_ch3.adb, sem_ch5.adb, sem_type.adb, switch-c.adb, switch-c.ads,
3911 sem_prag.adb, sem_util.adb, sem_util.ads, sem_res.adb, warnsw.ads,
3912 prepcomp.ads, cstand.adb, stand.ads, a-calfor.adb, s-stusta.adb:
3915 2011-08-02 Ed Schonberg <schonberg@adacore.com>
3917 * sem_attr.adb: handle properly 'Result when it is a prefix of an
3920 2011-08-02 Javier Miranda <miranda@adacore.com>
3922 * einfo.ads, einfo.adb
3923 (Original_Access_Type): Move this attribute to Node26 since there was
3924 an undocumented use of Node21 in E_Access_Subprogram_Type entities
3925 which causes conflicts and breaks the generation of the .NET compiler.
3926 (Interface_Name): Add missing documentation on JGNAT only uses of
3929 2011-08-02 Geert Bosch <bosch@adacore.com>
3931 * cstand.adb (Back_End_Float_Types): Use Elist instead of Nlist
3932 (Find_Back_End_Float_Type): Likewise
3933 (Create_Back_End_Float_Types): Likewise
3934 (Create_Float_Types): Likewise
3935 (Register_Float_Type): Likewise
3936 * sem_ch3.adb (Floating_Point_Type_Declaration): Use Elist instead of
3937 Nlist and split out type selection in new local Find_Base_Type function.
3938 * sem_prag.adb (Process_Import_Predefined_Type): Use Elist instead of
3940 * stand.ads (Predefined_Float_Types): Use Elist instead of Nlist
3942 2011-08-02 Robert Dewar <dewar@adacore.com>
3944 * inline.adb: Minor code reorganization (put Get_Code_Unit_Entity in
3946 * opt.ads: Minor comment change.
3947 * sem_ch12.adb: Minor code reorganization.
3949 2011-08-02 Gary Dismukes <dismukes@adacore.com>
3951 * sem_ch3.adb (Complete_Private_Subtype): Don't append the private
3952 subtype's list of rep items to the list on the full subtype in the case
3953 where the lists are the same.
3955 2011-08-02 Geert Bosch <bosch@adacore.com>
3957 * switch-c.adb (Free): New deallocation procedure to avoid implicitly
3958 using the one from System.Strings, which also deallocates all strings.
3960 2011-08-02 Geert Bosch <bosch@adacore.com>
3962 * gcc-interface/gigi.h, gcc-interface/misc.c (enumerate_modes): New
3964 * gcc-interface/Make-lang.in: Update dependencies.
3966 2011-08-02 Olivier Hainque <hainque@adacore.com>
3968 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Set the function
3971 2011-08-02 Javier Miranda <miranda@adacore.com>
3973 * sem_ch3.adb (Check_Anonymous_Access_Components): Create extra formals
3974 associated with anonymous access to subprograms.
3976 2011-08-02 Geert Bosch <bosch@adacore.com>
3979 (Preprocessing_Symbol_Defs): Move from Prepcomp.Symbol_Definitions.
3980 (Preprocessing_Symbol_Last): Move from Prepcomp.Last_Definition.
3981 * prepcomp.adb (Symbol_Definitions, Last_Definition): Move to opt.ads
3982 (Add_Symbol_Definition): Move to switch-c.adb
3983 (Process_Command_Line_Symbol_Definitions): Adjust references to above.
3984 * prepcomp.ads: Remove dependency on Ada.Unchecked_Deallocation.
3985 (Add_Symbol_Definition): Move to switch-c.adb.
3986 * sem_ch13.adb, sem_prag.adb: Add dependency on Warnsw.
3988 (Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
3990 * sem_warn.ads (Warn_On_Record_Holes, Warn_On_Overridden_Size,
3991 Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
3993 * switch-c.adb: Replace dependency on Prepcomp and Sem_Warn by Warnsw.
3994 (Add_Symbol_Definition): Moved from Prepcomp.
3995 * switch-c.ads: Update copyright notice. Use String_List instead of
3996 Argument_List, removing dependency on System.OS_Lib.
3998 2011-08-02 Yannick Moy <moy@adacore.com>
4000 * sem_ch3.adb (Analyze_Object_Declaration): issue an error in formal
4001 mode on initialization expression which does not respect SPARK
4003 * sem_util.adb, sem_util.ads (Is_SPARK_Initialization_Expr): determines
4004 if the tree referenced by its argument represents an initialization
4005 expression in SPARK, suitable for initializing an object in an object
4008 2011-08-02 Javier Miranda <miranda@adacore.com>
4010 * exp_ch9.adb (Expand_Access_Protected_Subprogram_Type): Link the
4011 internally generated access to subprogram with its associated protected
4013 * einfo.ads, einfo.adb (Original_Access_Type): New attribute.
4015 2011-08-02 Geert Bosch <bosch@adacore.com>
4017 * cstand.adb (Register_Float_Type): Print information about type to
4018 register, if the Debug_Flag_Dot_B is set.
4019 * debug.adb (Debug_Flag_Dot_B): Document d.b debug option.
4020 * rtsfind.ads (RE_Max_Base_Digits): New run time entity.
4021 * sem_ch3.adb (Floating_Point_Type_Declaration): Allow declarations
4022 with a requested precision of more than Max_Digits digits and no more
4023 than Max_Base_Digits digits, if a range specification is present and the
4024 Predefined_Float_Types list has a suitable type to derive from.
4025 * sem_ch3.adb (Rep_Item_Too_Early): Avoid generating error in the
4026 case of type completion with pragma Import
4028 (Process_Import_Predefined_Type): Processing to complete a type
4029 with pragma Import. Currently supports floating point types only.
4030 (Set_Convention_From_Pragma): Do nothing without underlying type.
4031 (Process_Convention): Guard against absence of underlying type,
4032 which may happen when importing incomplete types.
4033 (Process_Import_Or_Interface): Handle case of importing predefined
4034 types. Tweak error message.
4036 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
4038 * inline.adb (Add_Inlined_Body): Adjust check for library-level inlined
4039 functions to previous change. Reorganize code slightly.
4041 2011-08-02 Geert Bosch <bosch@adacore.com>
4043 * back_end.ads (Register_Type_Proc): New call back procedure type for
4044 allowing the back end to provide information about available types.
4045 (Register_Back_End_Types): New procedure to register back end types.
4046 * back_end.adb (Register_Back_End_Types): Call the back end to enumerate
4048 * cstand.adb (Back_End_Float_Types): New list for floating point types
4049 supported by the back end.
4050 (Build_Float_Type): Add extra parameter for Float_Rep_Kind.
4051 (Copy_Float_Type): New procedure to make new copies of predefined types.
4052 (Register_Float_Type): New call back procedure to populate the BEFT list
4053 (Find_Back_End_Float_Type): New procedure to find a BEFT by name
4054 (Create_Back_End_Float_Types): New procedure to populate the BEFT list.
4055 (Create_Float_Types): New procedure to create entities for floating
4056 point types predefined in Standard, and put these and any remaining
4057 BEFTs on the Predefined_Float_Types list.
4058 * stand.ads (Predefined_Float_Types): New list for predefined floating
4059 point types that do not have declarations in package Standard.
4061 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
4063 * inline.adb (Get_Code_Unit_Entity): New local function. Returns the
4064 entity node for the unit containing the parameter.
4065 (Add_Inlined_Body): Use it to find the unit containing the subprogram.
4066 (Add_Inlined_Subprogram): Likewise.
4067 * gcc-interface/Make-lang.in: Update dependencies.
4069 2011-08-02 Thomas Quinot <quinot@adacore.com>
4071 * s-stusta.adb (Print): Make sure Pos is always initialized to a
4074 2011-08-02 Geert Bosch <bosch@adacore.com>
4076 * a-calfor.adb (Image): Simplify, removing unnecessary uses of 'Image.
4078 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
4080 * sem_type.adb (Covers): Move trivial case to the top and reuse the
4081 computed value of Base_Type.
4083 2011-08-02 Yannick Moy <moy@adacore.com>
4085 * restrict.adb (Check_Restriction): issue an error for any use of
4086 class-wide, even if the No_Dispatch restriction is not set.
4087 * sem_aggr.adb: Correct typos in comments and messages in formal mode
4088 * sem_ch3.adb (Process_Full_View): issue an error in formal mode is,
4089 when completing a private extension, the type named in the private part
4090 is not the same as that named in the visible part.
4091 * sem_res.adb (Resolve_Call): issue an error in formal mode on the use
4092 of an inherited primitive operations of a tagged type or type extension
4093 that returns the tagged type.
4094 * sem_util.adb, sem_util.ads (Is_Inherited_Operation_For_Type): new
4095 function which returns True for an implicit operation inherited by the
4096 derived type declaration for the argument type.
4097 (Is_SPARK_Object_Reference): move to appropriate place in alphabetic
4100 2011-08-02 Ed Schonberg <schonberg@adacore.com>
4102 * sem_ch5.adb (Pre_Analyze_Range): new procedure extracted from
4103 Process_Bounds, to perform analysis with expansion of a range or an
4104 expression that is the iteration scheme for a loop.
4105 (Analyze_Iterator_Specification): If domain of iteration is given by a
4106 function call with a controlled result, as is the case if call returns
4107 a predefined container, ensure that finalization actions are properly
4109 * par-ch3.adb: accept Ada2012 iterator form in P_Discrete_Range.
4111 2011-08-02 Javier Miranda <miranda@adacore.com>
4113 * sem_ch5.adb (Analyze_Iteration_Scheme): Fix typo.
4114 * gcc-interface/Make-lang.in: Update dependencies.
4116 2011-08-02 Javier Miranda <miranda@adacore.com>
4118 * sem_util.ads, sem_util.adb (Is_Variable): Add a new formal to
4119 determine if the analysis is performed using N or Original_Node (N).
4120 * exp_util.adb (Side_Effect_Free): Code cleanup since the new
4121 functionality of routine Is_Variable avoids code duplication.
4122 * checks.adb (Determine_Range): Handle temporaries generated by
4123 Remove_Side_Effects.
4125 2011-08-02 Javier Miranda <miranda@adacore.com>
4127 * exp_ch4.adb (Expand_N_Quantified_Expression): Force reanalysis and
4128 expansion of the condition. Required since the previous analysis was
4129 done with expansion disabled (see Resolve_Quantified_Expression) and
4130 hence checks were not inserted and record comparisons have not been
4133 2011-08-02 Ed Falis <falis@adacore.com>
4135 * s-taprop-vxworks.adb, s-intman-vxworks.adb, s-intman-vxworks.ads:
4138 2011-08-02 Bob Duff <duff@adacore.com>
4140 * opt.ads: Minor comment fix.
4142 2011-08-02 Bob Duff <duff@adacore.com>
4144 * sem_ch12.adb (Analyze_Package_Instantiation,
4145 Analyze_Subprogram_Instantiation): Turn off style checking while
4146 analyzing an instance. Whatever style checks that apply to the generic
4147 unit should apply, so it makes no sense to apply them in an instance.
4148 This was causing trouble when compiling an instance of a runtime
4149 unit that violates the -gnatyO switch.
4150 * stylesw.adb (Set_Style_Check_Options): "when 'O' =>" was missing from
4151 one of the two case statements, causing spurious errors.
4153 2011-08-02 Robert Dewar <dewar@adacore.com>
4155 * uname.adb: Minor reformatting.
4156 * gnatcmd.adb: Minor reformatting.
4157 * exp_attr.adb: Minor reformatting.
4159 2011-08-02 Ed Schonberg <schonberg@adacore.com>
4161 * exp_ch5.adb (Expand_N_Assignment_Statement): under restriction
4162 No_Dispatching_Calls, do not look for the Assign primitive, because
4163 predefined primitives are not created in this case.
4165 2011-08-02 Bob Duff <duff@adacore.com>
4167 * stylesw.ads: Minor comment fixes.
4169 2011-08-02 Robert Dewar <dewar@adacore.com>
4171 * freeze.adb (Add_To_Result): New procedure.
4173 2011-08-02 Jose Ruiz <ruiz@adacore.com>
4175 * exp_attr.adb (Find_Stream_Subprogram): When using a configurable run
4176 time, if the specific run-time routines for handling streams of strings
4177 are not available, use the default mechanism.
4179 2011-08-02 Arnaud Charlet <charlet@adacore.com>
4181 * s-regpat.ads: Fix typo.
4183 2011-08-02 Vincent Celier <celier@adacore.com>
4185 * prj-conf.adb (Get_Or_Create_Configuration_File): If On_Load_Config is
4186 not null, call it to create the in memory config project file without
4187 parsing an existing default config project file.
4189 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
4191 * atree.adb (Allocate_Initialize_Node): Remove useless temporaries.
4193 2011-08-02 Ed Schonberg <schonberg@adacore.com>
4195 * sem_elim.adb: an abstract subprogram does not need an eliminate
4196 pragma for its descendant to be eliminable.
4198 2011-08-02 Ed Falis <falis@adacore.com>
4200 * init.c: revert to handling before previous checkin for VxWorks
4201 * s-intman-vxworks.adb: delete unnecessary declarations related to
4202 using Ada interrupt facilities for handling signals.
4203 Delete Initialize_Interrupts. Use __gnat_install_handler instead.
4204 * s-intman-vxworks.ads: Import __gnat_install_handler as
4205 Initialize_Interrupts.
4206 * s-taprop-vxworks.adb: Delete Signal_Mask.
4207 (Abort_Handler): change construction of mask to unblock exception
4210 2011-08-02 Jerome Guitton <guitton@adacore.com>
4212 * a-except-2005.adb (Raise_From_Signal_Handler): Call
4213 Debug_Raise_Exception before propagation starts.
4215 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
4217 * exp_ch6.adb (Expand_Call): Guard restriction checks with a call
4218 to Restriction_Check_Required.
4219 * sem_ch3.adb (Analyze_Object_Declaration): Likewise.
4220 * sem_res.adb (Resolve_Call): Likewise.
4221 * sem_attr.adb (Check_Stream_Attribute): Likewise.
4223 2011-08-02 Bob Duff <duff@adacore.com>
4225 * stylesw.ads: Update comment.
4226 * style.adb: Minor: Use Error_Msg_NE instead of Error_Msg_N.
4227 * errout.ads: Remove obsolete comment.
4229 2011-08-02 Javier Miranda <miranda@adacore.com>
4231 * einfo.ads, einfo.adb (Is_Safe_To_Reevaluate): new function.
4232 (Set_Is_Safe_To_Reevaluate): new procedure.
4233 * sem_ch5.adb (Analyze_Assignment): Add one assertion to ensure that no
4234 assignment is allowed on safe-to-reevaluate variables.
4235 (Analyze_Iteration_Schine.Process_Bounds.One_Bound): Decorate the
4236 temporary created to remove side effects in expressions that use
4237 the secondary stack as safe-to-reevaluate.
4238 * exp_util.adb (Side_Effect_Free): Add missing code to handle well
4239 variables that are not true constants.
4241 2011-08-02 Robert Dewar <dewar@adacore.com>
4243 * sem_ch5.adb, sem_ch7.adb, einfo.ads, sem_util.adb, sem_util.ads,
4244 sem_res.adb, sem_ch6.adb: Minor reformatting.
4246 2011-08-02 Jerome Guitton <guitton@adacore.com>
4248 * a-except-2005.adb (Raise_Current_Excep): Remove obsolete dead code.
4250 2011-08-02 Ed Schonberg <schonberg@adacore.com>
4252 * sem_ch6.adb (New_Overloaded_Entity, Check_Overriding_Indicator): Do
4253 not set Overridden_Operation if subprogram is an initialization
4256 2011-08-02 Yannick Moy <moy@adacore.com>
4258 * par-ch6.adb: Correct obsolete name in comments
4259 * restrict.adb, restrict.ads (Check_Formal_Restriction): new function
4260 which takes two message arguments (existing function takes one), with
4261 second message used for continuation.
4262 * sem_ch5.adb (Analyze_Block_Statement): in formal mode, only reject
4263 block statements that originate from a source block statement, not
4264 generated block statements
4265 * sem_ch6.adb (Analyze_Function_Call): rename L into Actuals, for
4266 symmetry with procedure case
4267 * sem_ch7.adb (Check_One_Tagged_Type_Or_Extension_At_Most): new
4268 function to issue an error in formal mode if a package specification
4269 contains more than one tagged type or type extension.
4270 * sem_res.adb (Resolve_Actuals): in formal mode, check that actual
4271 parameters matching formals of tagged types are objects (or ancestor
4272 type conversions of objects), not general expressions. Issue an error
4273 on view conversions that are not involving ancestor conversion of an
4275 (Resolve_Type_Conversion): in formal mode, issue an error on the
4276 operand of an ancestor type conversion which is not an object
4277 * sem_util.adb, sem_util.ads (Find_Actual): extend the behavior of the
4278 procedure so that it works also for actuals of function calls
4279 (Is_Actual_Tagged_Parameter): new function which determines if its
4280 argument is an actual parameter of a formal of tagged type in a
4282 (Is_SPARK_Object_Reference): new function which determines if the tree
4283 referenced by its argument represents an object in SPARK
4285 2011-08-02 Robert Dewar <dewar@adacore.com>
4287 * sem_ch3.adb: Minor reformatting
4288 Minor comment addition
4289 Minor error msg text change
4291 2011-08-02 Javier Miranda <miranda@adacore.com>
4293 * sem_ch5.adb (Analyze_Iteration_Scheme.Uses_Secondary_Stack): New
4294 function. Used to be more precise when we generate a variable plus one
4295 assignment to remove side effects in the evaluation of the Bound
4297 (Analyze_Iteration_Scheme): Clean attribute analyzed in all the nodes
4298 of the bound expression to force its re-analysis and thus expand the
4299 associated transient scope (if required). Code cleanup replacing the
4300 previous code that declared the constant entity by an invocation to
4301 routine Force_Evaluation which centralizes this work in the frontend.
4303 2011-08-02 Robert Dewar <dewar@adacore.com>
4305 * einfo.adb (Is_Base_Type): Improve efficiency by using a flag table
4306 (Base_Type): Now uses improved Is_Base_Type function
4307 * einfo.ads (Base_Type): Inline this function
4309 2011-08-02 Robert Dewar <dewar@adacore.com>
4311 * sem_prag.adb (Analyze_Pragma): Defend against infinite recursion
4312 (Analyze_Aspect_Specifications): Fix Sloc values for constructed pragmas
4314 2011-08-02 Arnaud Charlet <charlet@adacore.com>
4316 * gcc-interface/Make-lang.in: Update dependencies.
4317 * gcc-interface/Makefile.in: Use s-inmapop-vxworks.adb for all VxWorks
4320 2011-08-02 Yannick Moy <moy@adacore.com>
4322 * par-ch3.adb (P_Delta_Constraint): issue an error in formal mode on
4323 non-simple expression used in delta constraint
4324 (P_Index_Or_Discriminant_Constraint): issue an error in formal mode on
4325 index constraint which is not a subtype mark
4326 * par.adb: With and use Restrict
4327 * sem_ch3.adb (Analyze_Component_Declaration): issue an error in formal
4328 mode on component type which is not a subtype mark and default
4329 expression on component
4330 (Analyze_Subtype_Declaration): issue an error in formal mode on subtype
4331 of string which does not have a lower index bound equal to 1
4332 (Array_Type_Declaration): issue an error in formal mode on index or
4333 component type which is not a subtype mark, and on aliased keyword on
4335 (Derived_Type_Declaration): issue an error in formal mode on interface,
4336 limited or abstract type
4337 (Record_Type_Declaration): issue an error in formal mode on interface
4338 (Record_Type_Definition): issue an error in formal mode on tagged types
4339 and type extensions not declared in the specification of a library unit
4340 package; on null non-tagged record; on variant part
4342 2011-08-02 Vincent Celier <celier@adacore.com>
4344 * prj-nmsc.adb (Check_Library_Attributes): Do not report Library_Dir
4345 not declared for qualified library project when Library_Name is not
4346 declared, but Library_Dir is.
4348 2011-08-02 Robert Dewar <dewar@adacore.com>
4350 * sem_ch13.adb (Analyze_Aspect_Specification): Fix slocs on generated
4351 pragmas (affects aspects [Component_]Default_Value
4352 (Check_Aspect_At_Freeze_Point): For Component_Default_Value, use
4353 component type for the resolution
4355 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
4357 * einfo.adb (Base_Type): Tune implementation for speed.
4359 2011-08-02 Robert Dewar <dewar@adacore.com>
4361 * freeze.adb: Minor reformatting.
4363 2011-08-02 Thomas Quinot <quinot@adacore.com>
4365 * scos.ads: Update comments.
4367 2011-08-02 Ed Schonberg <schonberg@adacore.com>
4369 * sem_ch3.adb (Build_Derived_Type): Inherit the convention from the
4370 base type, because the parent may be a subtype of a private type whose
4371 convention is established in a private part.
4373 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
4375 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Wrap the return
4376 statement in a block when the expansion of the return expression has
4377 created a finalization chain.
4378 * freeze.adb (Freeze_Expression): Alphabetize all choices associated
4379 with the parent node.
4380 Add N_Extended_Return_Statement to handle the case where a transient
4381 object declaration appears in the Return_Object_Declarations list of
4382 an extended return statement.
4384 2011-08-02 Matthew Gingell <gingell@adacore.com>
4386 * adaint.c (__gnat_is_symbolic_link_attr): Supress warning on possibly
4387 unused parameter 'name'.
4389 2011-08-02 Ed Schonberg <schonberg@adacore.com>
4391 * sem_elim.adb (Set_Eliminated): If the overridden operation is an
4392 inherited operation, check whether its alias, which is the source
4393 operastion that it renames, has been marked eliminated.
4395 2011-08-02 Javier Miranda <miranda@adacore.com>
4397 * exp_util.adb (Safe_Prefixed_Reference): Do not consider safe an
4398 in-mode parameter whose type is an access type since it can be used to
4399 modify its designated object. Enforce code that handles as safe an
4400 access type that is not access-to-constant but it is the result of a
4401 previous removal of side-effects.
4402 (Remove_Side_Effects): Minor code reorganization of cases which require
4403 no action. Done to incorporate documentation on new cases uncovered
4404 working in this ticket: no action needed if this routine was invoked
4405 too early and the nodes are not yet decorated.
4406 * sem_res.adb (Resolve_Slice): Minor code cleanup replacling two calls
4407 to routine Remove_Side_Effects by calls to Force_Evaluation since they
4408 were issued with actuals that are implicitly provided by
4411 2011-08-02 Robert Dewar <dewar@adacore.com>
4413 * sem_ch3.adb, sem_res.adb: Minor reformatting.
4415 2011-08-02 Yannick Moy <moy@adacore.com>
4417 * sem_attr.adb (Check_Formal_Restriction_On_Attribute): new procedure
4418 to issue an error in formal mode on attribute not supported in this mode
4419 (Analyze_Attribute): issue errors on standard attributes not supported
4421 * sem_ch3.adb (Modular_Type_Declaration): remove obsolete part of
4422 comment, and issue error in formal mode on modulus which is not a power
4424 (Process_Range_Expr_In_Decl): issue error in formal mode on non-static
4426 * sem_ch8.adb (Find_Type): issue error in formal mode on 'Base in
4428 * sem_res.adb (Resolve_Unary_Op): issue error in formal mode on unary
4429 operator on modular type (except 'not').
4431 2011-08-02 Robert Dewar <dewar@adacore.com>
4433 * gnat_rm.texi: Minor reformatting.
4435 2011-08-02 Arnaud Charlet <charlet@adacore.com>
4437 * s-osinte-linux.ads: Minor comment update and reformatting.
4438 * i-cexten.ads: Make this unit pure, as for its parent.
4439 Will allow its usage in more contexts if needed.
4441 2011-08-02 Robert Dewar <dewar@adacore.com>
4443 * s-utf_32.ads: Minor comment fix.
4445 2011-08-02 Ed Schonberg <schonberg@adacore.com>
4447 * sem_res.adb (Resolve_Actuals): if the subprogram is a primitive
4448 operation of a tagged synchronized type, handle the case where the
4449 controlling argument is overloaded.
4451 2011-08-02 Yannick Moy <moy@adacore.com>
4453 * gnat_rm.texi, opt.ads, sem_prag.adb, snames.ads-tmpl:
4454 Replace pragma SPARK_95 with pragma Restrictions (SPARK)
4455 * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): set
4456 SPARK mode and formal verification mode on processing SPARK restriction
4457 * s-rident.ads (Restriction_Id): add SPARK restriction in those not
4458 requiring consistency checking.
4460 2011-08-02 Robert Dewar <dewar@adacore.com>
4462 * sem_res.adb: Minor reformatting.
4464 2011-08-02 Robert Dewar <dewar@adacore.com>
4466 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
4467 a-cforse.ads: Remove unneeded with of Ada.Containers
4468 Remove commented out pragma Inline's
4469 Move specifications of new subprograms to the actual specs
4471 2011-08-02 Yannick Moy <moy@adacore.com>
4473 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
4474 a-cforse.ads: Update comments.
4476 2011-08-02 Ed Schonberg <schonberg@adacore.com>
4478 * sem_attr.adb: add attribute name when 'Result has the wrong prefix.
4480 2011-08-02 Robert Dewar <dewar@adacore.com>
4482 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
4483 a-cforse.ads, a-cofove.ads: Minor reformatting.
4485 2011-08-02 Claire Dross <dross@adacore.com>
4487 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads, a-cforse.ads,
4488 a-cofove.ads: Add comments.
4490 2011-08-02 Yannick Moy <moy@adacore.com>
4492 * gnat_rm.texi: Document formal containers.
4494 2011-08-02 Emmanuel Briot <briot@adacore.com>
4496 * g-comlin.adb (Goto_Section, Getopt): fix handling of "*" when there
4499 2011-08-02 Robert Dewar <dewar@adacore.com>
4501 * mlib-prj.adb, restrict.ads, sem_aggr.adb, sem_ch12.adb: Minor
4504 2011-08-02 Robert Dewar <dewar@adacore.com>
4506 * aspects.adb: New aspects Default_Value and Default_Component_Value
4507 New format of Aspect_Names table checks for omitted entries
4508 * aspects.ads: Remove mention of Aspect_Cancel and add documentation on
4509 handling of boolean aspects for derived types.
4510 New aspects Default_Value and Default_Component_Value
4511 New format of Aspect_Names table checks for omitted entries
4512 * einfo.ads, einfo.adb (Has_Default_Component_Value): New flag
4513 (Has_Default_Value): New flag
4514 (Has_Default_Component_Value): New flag
4515 (Has_Default_Value): New flag
4516 * par-ch13.adb (P_Aspect_Specifications): New format of Aspect_Names
4518 * par-prag.adb: New pragmas Default_Value and Default_Component_Value
4519 * sem_ch13.adb (Analyze_Aspect_Specifications): New aspects
4520 Default_Value and Default_Component_Value
4521 * sem_prag.adb: New pragmas Default_Value and Default_Component_Value
4522 New aspects Default_Value and Default_Component_Value
4523 * snames.ads-tmpl: New pragmas Default_Value and Default_Component_Value
4524 * sprint.adb: Print N_Aspect_Specification node when called from gdb
4526 2011-08-02 Vincent Celier <celier@adacore.com>
4528 * prj-nmsc.adb (Check_Library_Attributes): For virtual library project,
4529 inherit library kind.
4531 2011-08-02 Ed Schonberg <schonberg@adacore.com>
4533 * sem_res.adb: Add guards in calls to Matching_Static_Array_Bounds.
4536 2011-08-02 Robert Dewar <dewar@adacore.com>
4538 * i-cstrin.ads: Updates to make Interfaces.C.Strings match RM
4540 2011-08-02 Yannick Moy <moy@adacore.com>
4542 * sem_aggr.adb (Resolve_Aggregate): Fix thinko.
4544 2011-08-02 Robert Dewar <dewar@adacore.com>
4546 * impunit.adb: Add comment.
4548 2011-08-02 Yannick Moy <moy@adacore.com>
4550 * sem_aggr.adb (Check_Qualified_Aggregate): new procedure which checks
4551 qualification of aggregates in formal mode
4552 (Is_Top_Level_Aggregate): returns True for an aggregate not contained in
4554 (Resolve_Aggregate): complete the test that an aggregate is adequately
4555 qualified in formal mode
4557 2011-08-02 Pascal Obry <obry@adacore.com>
4559 * make.adb, bindgen.adb, gnatbind.adb: Minor reformatting.
4560 * mlib-prj.adb: Supress warning when compiling binder generated file.
4561 (Build_Library): Supress all warnings when compiling the binder
4564 2011-08-02 Yannick Moy <moy@adacore.com>
4566 * errout.adb, errout.ads (Check_Formal_Restriction): move procedure
4568 * restrict.adb, restrict.ads (Check_Formal_Restriction): ...to here
4569 * sem_aggr.adb, sem_ch5.adb, sem_util.adb:
4570 Add with/use clauses to make Check_Formal_Restriction visible
4572 2011-08-02 Ed Schonberg <schonberg@adacore.com>
4574 * sem_ch12.adb (Check_Generic_Actuals): handle properly actual
4575 in-parameters when type of the generic formal is private in the generic
4576 spec and non-private in the body.
4578 2011-08-02 Claire Dross <dross@adacore.com>
4580 * a-cfdlli.adb, a-cfdlli.ads, a-cfhase.adb, a-cfhase.ads, a-cfhama.adb,
4581 a-cfhama.ads, a-cforse.adb, a-cforse.ads, a-cforma.adb, a-cforma.ads,
4582 a-cofove.adb, a-cofove.ads: New files implementing formal containers.
4583 * impunit.adb, Makefile.rtl: Take new files into account.
4585 2011-08-02 Robert Dewar <dewar@adacore.com>
4587 * sem_aggr.adb, sem_ch3.adb, sem_ch5.adb, make.adb, sem_res.adb,
4588 sem_attr.adb, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
4590 2011-08-02 Yannick Moy <moy@adacore.com>
4592 * sem_aggr.adb (Resolve_Aggregate): disable incorrectly placed check in
4594 * sem_util.adb (Matching_Static_Array_Bounds): proper detection of
4595 matching static array bounds, taking into account the special case of
4597 * sem_ch3.adb: Typo in comment.
4599 2011-08-02 Yannick Moy <moy@adacore.com>
4601 * errout.adb, errout.ads (Check_Formal_Restriction): new procedure
4602 which issues an error in formal mode if its argument node is originally
4604 * sem_ch3.adb (Analyze_Full_Type_Declaration): move test that a type
4605 has a discriminant specification so that it does not include the case
4607 (Derived_Type_Declaration): move here the test that a derived type has a
4608 discriminant specification
4609 * sem_aggr.adb (Resolve_Record_Aggregate): test the presence of the
4610 first element of a component association before accessing its choices
4611 (presence of component association is not enough)
4612 * exp_ch6.adb (Expand_N_Subprogram_Declaration): test if a subprogram
4613 declaration is a library item before accessing the next element in a
4614 list, as library items are not member of lists
4615 * sem_attr.adb, sem_ch11.adb, sem_ch4.adb, sem_ch5.adb, sem_ch6.adb,
4616 sem_ch8.adb, sem_ch9.adb, sem_res.adb, sem_util.adb: use
4617 Check_Formal_Restriction whenever possible.
4619 2011-08-02 Ed Schonberg <schonberg@adacore.com>
4621 * sem_ch3.adb (Find_Type_Of_Object): In ASIS mode, create an itype
4622 reference when needed.
4624 2011-08-02 Bob Duff <duff@adacore.com>
4626 * gnat_ugn.texi: Fix typo.
4628 2011-08-02 Vincent Celier <celier@adacore.com>
4630 * make.adb (Gnatmake): Use MLib.Tgt.Archive_Ext as the extension of
4631 archive file name. Do not use the full path name of archives for Open
4634 2011-08-02 Robert Dewar <dewar@adacore.com>
4636 * sem_ch12.adb, sem_ch11.adb: New calling sequence for
4637 Analyze_Aspect_Specifications
4639 (Analyze_Aspect_Specifications): New handling for boolean aspects
4640 * sem_ch13.ads (Analyze_Aspect_Specifications): New calling sequence
4641 * sem_ch3.adb, sem_ch6.adb, sem_ch7.adb, sem_ch9.adb: New calling
4642 sequence for Analyze_Aspect_Specifications
4643 * sem_prag.adb (Analyze_Pragma): Remove use of Aspect_Cancel entirely
4644 * sinfo.ads, sinfo.adb (Aspect_Cancel): Remove, no longer used
4646 2011-08-02 Robert Dewar <dewar@adacore.com>
4648 * freeze.adb (Freeze_Entity): Remove handling of delayed boolean
4649 aspects, since these no longer exist.
4651 2011-08-02 Robert Dewar <dewar@adacore.com>
4653 * par-ch13.adb (Aspect_Specifications_Present): Always return false on
4654 semicolon, do not try to see if there are aspects following it.
4655 * par-ch3.adb (P_Declarative_Items): Better message for unexpected
4658 2011-08-02 Robert Dewar <dewar@adacore.com>
4660 * sem_ch8.adb, aspects.ads: Minor reformatting.
4662 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
4664 * sem_ch13.ads (Analyze_Aspect_Specification): Add pragma Inline.
4665 * sem_ch13.adb (Analyze_Non_Null_Aspect_Specifications): New procedure
4667 (Analyze_Aspect_Specifications): ...here. Call above procedure.
4669 2011-08-02 Yannick Moy <moy@adacore.com>
4671 * exp_ch6.adb (Expand_N_Subprogram_Declaration): issue error in formal
4672 mode on subprogram declaration outside of package specification, unless
4673 it is followed by a pragma Import
4674 * sem_ch3.adb (Access_Definition, Access_Subprogram_Declaration,
4675 Access_Type_Declaration): issue error in formal mode on access type
4676 (Analyze_Incomplete_Type_Decl): issue error in formal mode on
4678 (Analyze_Object_Declaration): issue error in formal mode on object
4679 declaration which does not respect SPARK restrictions
4680 (Analyze_Subtype_Declaration): issue error in formal mode on subtype
4681 declaration which does not respect SPARK restrictions
4682 (Constrain_Decimal, Constrain_Float, Constrain_Ordinary_Fixed): issue
4683 error in formal mode on digits or delta constraint
4684 (Decimal_Fixed_Point_Type_Declaration): issue error in formal mode on
4685 decimal fixed point type
4686 (Derived_Type_Declaration): issue error in formal mode on derived type
4687 other than type extensions of tagged record types
4688 * sem_ch6.adb (Process_Formals): remove check in formal mode, redundant
4689 with check on access definition
4690 * sem_ch9.adb (Analyze_Protected_Definition): issue error in formal
4691 mode on protected definition.
4692 (Analyze_Task_Definition): issue error in formal mode on task definition
4694 2011-08-02 Robert Dewar <dewar@adacore.com>
4696 * make.adb, sem_ch8.adb, s-inmaop-vxworks.adb: Minor reformatting.
4698 2011-08-02 Javier Miranda <miranda@adacore.com>
4700 * sem_ch6.adb (Can_Override_Operator): New function.
4701 (Verify_Overriding_Indicator): Add missing code to check overriding
4702 indicator in operators. Fixes regression.
4703 (Check_Overriding_Indicator): Minor reformating after replacing the
4704 code that evaluates if the subprogram can override an operator by
4705 invocations to the above new function.
4707 (Write_Field26_Name): Add missing code to ensure that, following
4708 the documentation in einfo.ads, this field is not shown as attribute
4709 "Static_Initialization" on non-dispatching functions.
4711 2011-08-02 Jose Ruiz <ruiz@adacore.com>
4713 * sem_res.adb (Resolve_Call): A call to
4714 Ada.Real_Time.Timing_Events.Set_Handler violates restriction
4715 No_Relative_Delay (AI-0211) only when it sets a relative timing event,
4716 i.e., when the second parameter is of type Time_Span.
4718 2011-08-02 Vincent Celier <celier@adacore.com>
4720 * make.adb (Gnatmake): use <library dir>/lib<library name>.a to link
4721 with an archive instead of -L<library dir> -l<library name>.
4723 2011-08-02 Ed Schonberg <schonberg@adacore.com>
4725 * sem_ch8.adb (Analyze_Use_Type): If the clause is being re-analyzed,
4726 mark the base types In_Use in addition to making the operations
4729 2011-08-02 Ed Falis <falis@adacore.com>
4731 * init.c: add and setup __gnat_signal_mask for the exception signals
4732 * s-inmaop-vxworks.adb: new file.
4733 * s-intman-vxworks.adb: remove unnecessary initializations and
4735 * s-intman-vxworks.ads: remove unnecessary variable
4736 * s-taprop-vxworks.adb: simplify signal initialization
4738 2011-08-02 Robert Dewar <dewar@adacore.com>
4740 * sem_ch8.adb: Minor code reorganization, comment updates.
4742 2011-08-02 Robert Dewar <dewar@adacore.com>
4744 * sem_res.adb (Matching_Static_Array_Bounds): Moved to Sem_Util
4745 * sem_util.ads, sem_util.adb (Matching_Static_Array_Bounds): Moved
4747 (Matching_Static_Array_Bounds): Use Is_Ok_Static_Expression
4748 (Matching_Static_Array_Bounds): Moved here from Sem_Res
4750 2011-08-02 Ed Schonberg <schonberg@adacore.com>
4752 * atree.h, atree.ads, atree.adb: New subprograms to manipulate Elist5.
4753 * par_ch8.adb (P_Use_Type): initialize Used_Operations for node.
4754 * sinfo.ads, sinfo.adb (Used_Operations): new attribute of
4755 use_type_clauses, to handle more efficiently use_type and use_all_type
4757 * sem_ch8.adb: Rewrite Use_One_Type and End_Use_Type to handle the
4758 Ada2012 Use_All_Type clause.
4759 (Use_Class_Wide_Operations): new procedure.
4761 2011-08-02 Robert Dewar <dewar@adacore.com>
4763 * exp_util.adb, par-ch10.adb, par-ch6.adb, sem.adb, sem_ch6.adb,
4764 sem_ch6.ads, sinfo.adb, sinfo.ads, sprint.adb: Change parameterized
4765 expression to expression function.
4767 2011-08-02 Ed Schonberg <schonberg@adacore.com>
4769 * sem_ch4.adb: transform simple Ada2012 membership into equality only
4770 if types are compatible.
4772 2011-08-02 Yannick Moy <moy@adacore.com>
4774 * sem_res.adb (Matching_Static_Array_Bounds): new function which
4775 returns True if its argument array types have same dimension and same
4776 static bounds at each index.
4777 (Resolve_Actuals): issue an error in formal mode on actuals passed as
4778 OUT or IN OUT paramaters which are not view conversions in SPARK.
4779 (Resolve_Arithmetic_Op): issue an error in formal mode on
4780 multiplication or division with operands of fixed point types which are
4781 not qualified or explicitly converted.
4782 (Resolve_Comparison_Op): issue an error in formal mode on comparisons of
4783 Boolean or array type (except String) operands.
4784 (Resolve_Equality_Op): issue an error in formal mode on equality
4785 operators for array types other than String with non-matching static
4787 (Resolve_Logical_Op): issue an error in formal mode on logical operators
4788 for array types with non-matching static bounds. Factorize the code in
4789 Matching_Static_Array_Bounds.
4790 (Resolve_Qualified_Expression): issue an error in formal mode on
4791 qualified expressions for array types with non-matching static bounds.
4792 (Resolve_Type_Conversion): issue an error in formal mode on type
4793 conversion for array types with non-matching static bounds
4795 2011-08-02 Robert Dewar <dewar@adacore.com>
4797 * par-ch10.adb: Minor code reorganization (use Nkind_In).
4799 2011-08-02 Ed Schonberg <schonberg@adacore.com>
4801 * par-ch9.adb: save location of entry for proper error message.
4803 2011-08-02 Javier Miranda <miranda@adacore.com>
4805 * sem_type.ads, sem_type.adb (Is_Ancestor): Addition of a new formal
4806 (Use_Full_View) which permits this routine to climb through the
4807 ancestors using the full-view of private parents.
4808 * sem_util.adb (Collect_Interfaces_Info, Implements_Interface): Set
4809 Use_Full_View to true in calls to Is_Ancestor.
4810 * sem_disp.adb (Override_Dispatching_Operation): Set Use_Full_View to
4811 true in call to Is_Ancestor.
4812 * exp_ch3.adb (Build_Offset_To_Top_Functions, Initialize_Tag): Set
4813 Use_Full_View to true in call to Is_Ancestor.
4814 * exp_ch7.adb (Controller_Component): Set Use_Full_View to true in
4815 call to Is_Ancestor.
4816 * exp_ch4.adb (Expand_N_Type_Conversion, Tagged_Membership): Set
4817 Use_Full_View to true in calls to Is_Ancestor.
4818 * exp_disp.adb (Expand_Interface_Actuals, Make_Secondary_DT, Make_DT,
4819 Make_Select_Specific_Data_Table, Register_Primitive,
4820 Set_All_DT_Position): Set Use_Full_View to true in calls to Is_Ancestor.
4821 * exp_intr.adb (Expand_Dispatching_Constructor_Call): Set Use_Full_View
4822 to true in call to Is_Ancestor.
4823 * exp_util.adb (Find_Interface_ADT, Find_Interface_Tag): Set
4824 Use_Full_View to true in calls to Is_Ancestor.
4826 (Write_Call_Info): Set Use_Full_View to true in call to Is_Ancestor.
4827 (Write_Type_Info): Set Use_Full_View to true in call to Is_Ancestor.
4829 2011-08-02 Robert Dewar <dewar@adacore.com>
4831 * gnat_rm.texi: Minor reformatting.
4832 * sem_prag.adb: Minor reformatting.
4834 2011-08-02 Tristan Gingold <gingold@adacore.com>
4836 * vms_data.ads: Add VMS qualifier for -gnateP.
4838 2011-08-02 Robert Dewar <dewar@adacore.com>
4840 * par-ch13.adb (P_Aspect_Specification): New meaning of Decl = Empty
4841 * par-ch7.adb (P_Package): Proper placement of aspects for package
4843 * par-endh.adb (Check_End): Ad Is_Sloc parameter
4844 (End_Statements): Add Is_Sloc parameterr
4845 * par.adb (P_Aspect_Specification): New meaning of Decl = Empty
4846 (Check_End): Ad Is_Sloc parameter
4847 (End_Statements): Add Is_Sloc parameterr
4849 2011-08-02 Vincent Celier <celier@adacore.com>
4851 * ug_words: Add VMS qualifier equivalent to -gnateP:
4852 /SYMBOL_PREPROCESSING.
4854 2011-08-02 Jose Ruiz <ruiz@adacore.com>
4856 * gnat-style.texi: For hexadecimal numeric literals the typical
4857 grouping of digits is 4 to represent 2 bytes.
4858 A procedure spec which is split into several lines is indented two
4861 2011-08-02 Yannick Moy <moy@adacore.com>
4863 * exp_aggr.adb (Is_Others_Aggregate): move function to other unit.
4864 * sem_aggr.adb, sem_aggr.ads (Is_Others_Aggregate): move function here
4865 (Resolve_Aggregate): issue errors in formal modes when aggregate is not
4867 (Resolve_Array_Aggregate): issue errors in formal modes on non-static
4868 choice in array aggregate
4869 (Resolve_Extension_Aggregate): issue errors in formal modes on subtype
4871 (Resolve_Record_Aggregate): issue errors in formal modes on mixed
4872 positional and named aggregate for record, or others in record
4873 aggregate, or multiple choice in record aggregate
4874 * sem_res.adb (Resolve_Logical_Op): issue errors in formal mode when
4875 array operands to logical operations AND, OR and XOR do not have the
4876 same static lower and higher bounds
4877 * sem_ch5.adb, sinfo.ads: Correct typos in comments
4879 2011-08-01 Robert Dewar <dewar@adacore.com>
4881 * sem_util.ads, sem_util.adb, sem_ch6.adb (Last_Source_Statement):
4882 Replaces Last_Source_Node_In_Sequence.
4883 * err_vars.ads (Error_Msg_Lang): 16 is OK, don't need 4K
4884 * errout.adb (Set_Error_Msg_Lang): Takes arg with no parens, but stores
4885 parens and blank in string (this was inconsistently implemented).
4887 (Set_Error_Msg_Lang): Takes arg with no parens, but stores parens and
4888 blank in string (this was inconsistently implemented).
4890 (Set_Global_Switches): Set formal mode switches appropriately
4891 * opt.ads, opt.adb: Formal mode is now global switches, more consistent
4893 (Analyze_Pragma, case SPARK_95): Set opt switches appropriately and
4894 call Set_Error_Msg_Lang to set "spark" as language name.
4895 * par.adb: Remove unnecessary call to set formal language for errout
4896 * sem_prag.adb (P_Pragma, case SPARK_95): Set opt switches
4897 appropriately and call Set_Error_Msg_Lang to set "spark" as language
4899 * sem_ch4.adb (Analyze_Concatenation_Operand): remove procedure and
4900 calls to it, moved after resolution so that types are known
4901 * sem_res.adb (Resolve_Op_Concat): issue an error in formal mode if
4902 result of concatenation is not of type String
4903 (Resolve_Op_Concat_Arg): issue an error in formal mode if an operand of
4904 concatenation is not properly restricted
4905 * gnat_rm.texi: Add doc on pragma Spark_95.
4906 * gcc-interface/Makefile.in: Remove obsolete target pairs for
4907 Interfaces.C.* on VMS. Remove s-parame-vms-restrict.ads.
4908 * gcc-interface/Make-lang.in: Update dependencies.
4910 2011-08-01 Javier Miranda <miranda@adacore.com>
4912 * sem_disp.adb (Override_Dispatching_Operation): Enforce strictness of
4913 condition that detects if the overridden operation must replace an
4916 2011-08-01 Javier Miranda <miranda@adacore.com>
4918 * exp_ch4.adb (Expand_N_Case_Expression): Propagate to the expanded
4919 code declarations inserted by Insert_Actions in each alternative of the
4920 N_Case_Expression node.
4922 2011-08-01 Robert Dewar <dewar@adacore.com>
4924 * sem_ch6.adb: Minor code reorganization.
4925 * sem_util.adb: Minor reformatting.
4927 2011-08-01 Pascal Obry <obry@adacore.com>
4929 * prj-env.adb: Remove <prefix>/lib/gpr/<target> project search path.
4930 * gnat_ugn.texi: Add documentation for VERSIONINFO Windows resource.
4932 2011-08-01 Yannick Moy <moy@adacore.com>
4934 * par-ch4.adb (P_Name): issue a syntax error in SPARK mode on character
4935 literal or operator symbol which is prefixed
4936 * sem_attr.adb (Analyze_Access_Attribute): issue an error in formal
4937 mode on access attributes.
4938 * sem_ch4.adb (Analyze_Concatenation_Operand): new procedure to check
4939 that concatenation operands are properly restricted in formal mode
4940 (Analyze_Concatenation, Analyze_Concatenation_Rest): call new procedure
4941 Analyze_Concatenation_Operand. Issue an error in formal mode if the
4942 result of the concatenation has a type different from String.
4943 (Analyze_Conditional_Expression, Analyze_Explicit_Dereference,
4944 Analyze_Quantified_Expression, Analyze_Slice,
4945 Analyze_Null): issue an error in formal mode on unsupported constructs
4947 (Analyze_Block_Statement): only issue error on source block statement
4948 * sem_util.ads, sem_util.adb (Last_Source_Node_In_Sequence): new
4949 function which returns the last node in a list of nodes for which
4950 Comes_From_Source returns True, if any
4951 * sem_ch6.adb (Check_Missing_Return): minor refactoring to use
4952 Last_Source_Node_In_Sequence
4953 * sem_ch8.adb (Analyze_Exception_Renaming, Analyze_Generic_Renaming,
4954 Analyze_Object_Renaming, Analyze_Use_Package): issue an error in formal
4955 mode on unsupported constructs
4956 * sem_ch9.adb Do not return after issuing error in formal mode, as the
4957 rest of the actions may be needed later on since the error is marked as
4959 * sinfo.ads: Typos in comments.
4961 2011-08-01 Pascal Obry <obry@adacore.com>
4963 * projects.texi: Minor editing.
4965 2011-08-01 Yannick Moy <moy@adacore.com>
4967 * err_vars.ads (Error_Msg_Lang, Error_Msg_Langlen): new variables for
4968 insertion character ~~
4969 * errout.ads, errout.adb (Formal_Error_Msg_...): remove procedures
4970 (Set_Error_Msg_Lang): new procedure which fixes the language for use
4971 with insertion character ~~
4972 (Set_Msg_Text): treat insertion character ~~
4973 * par-ch4.adb, par-ch5.adb, par-endh.adb, sem_attr.adb, sem_ch11.adb,
4974 sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_util.adb: Replace calls to
4975 Formal_Error_Msg_... procedures by equivalent Error_Msg_...
4976 procedures. Favor calls to Error_Msg_F(E) over Error_Msg_N(E). Make
4977 errors related to the formal language restriction not serious
4978 (insertion character |).
4979 * par.adb (Par): set formal language for error messages if needed
4980 * sem_ch6.adb (Check_Missing_Return): take into account possible
4981 generated statements at the end of the function
4982 * snames.ads-tmpl (Name_SPARK_95, Pragma_SPARK_95): new variable and
4983 enumeration value to define a new pragma SPARK_95
4984 * opt.ads, opt.adb (SPARK_Version_Type, SPARK_Version_Default,
4985 SPARK_Version): new type and variables to store the SPARK version
4987 (SPARK_Mode): return True when SPARK_Version is set
4988 * par-prag.adb: Correct indentation
4989 (Prag): take Pragma_SPARK_95 into account
4990 * sem_prag.adb (Set_Mechanism_Value, Sig_Flags): take Pragma_SPARK_95
4993 2011-08-01 Robert Dewar <dewar@adacore.com>
4995 * sem_ch3.adb, sem_ch3.ads, sem_ch5.adb, prj-part.adb, par-ch4.adb,
4996 sem_util.adb, sem_ch4.adb, sem_ch6.adb, sem_ch6.ads, sem_ch8.adb,
4997 sem_ch8.ads, sem_ch13.ads, par-ch5.adb, prj-env.ads: Minor reformatting
4999 2011-08-01 Pascal Obry <obry@adacore.com>
5001 * prj-part.ads, prj-part.adb (Parse): Add Target_Name parameter. Pass
5002 Target_Name to Get_Path call.
5003 (Parse_Single_Project): Likewise.
5004 (Post_Parse_Context_Clause): Likewise.
5005 * prj-env.ads, prj-env.adb (Find_Project): Add Target_Name parameter.
5006 Call Initialise_Project_Path with the proper Target_Name.
5007 (Initialize_Project_Path): Add <gnat_root>/<target_name>/lib/gnat
5009 (Get_Path): Add Target_Name parameter. Call Initialise_Project_Path
5010 with the proper Target_Name.
5011 * prj-conf.adb (Get_Or_Create_Configuration_File): Pass Target_Name to
5013 (Parse_Project_And_Apply_Config): Likewise.
5014 * prj-makr.adb (Initialize): Pass empty Target_Name to Parse routine.
5015 This is fine as this part of the code is supporting only native
5017 * prj-pars.adb (Parse): Pass empty Target_Name to Parse routine. This
5018 is fine as this part of the code is supporting only native compilation.
5020 2011-08-01 Yannick Moy <moy@adacore.com>
5022 * sem_util.adb (Enter_Name): issue error in formal mode on declaration
5023 of homonym, unless the homonym is one of the cases allowed in SPARK
5024 * par-ch5.adb (Parse_Decls_Begin_End): issue error in SPARK mode for
5025 package declaration occurring after a body.
5027 2011-08-01 Robert Dewar <dewar@adacore.com>
5029 * checks.adb, exp_ch4.adb: Minor reformatting.
5031 2011-08-01 Javier Miranda <miranda@adacore.com>
5033 * einfo.ads (Access_Disp_Table): Fix documentation.
5034 (Dispatch_Table_Wrappers): Fix documentation.
5036 2011-08-01 Pascal Obry <obry@adacore.com>
5038 * prj-env.adb, prj-env.ads: Minor reformatting.
5040 2011-08-01 Yannick Moy <moy@adacore.com>
5042 * sem_util.ads, sem_util.adb, par.adb, par_util.adb
5043 (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
5044 procedures out of these packages.
5045 * errout.ads, errout.adb
5046 (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
5047 procedures in of this package
5048 (Formal_Error_Msg_NE): new procedure for wrapper on Error_Msg_NE
5049 * par-ch5.adb (Parse_Decls_Begin_End): issue syntax error in SPARK mode
5050 on misplaced later vs initial declarations, like in Ada 83
5051 * sem_attr.adb (Processing for Analyze_Attribute): issue error in
5052 formal mode on attribute of private type whose full type declaration
5054 * sem_ch3.adb (Analyze_Declarations): issue error in formal mode on a
5055 package declaration inside a package specification
5056 (Analyze_Full_Type_Declaration): issue error in formal mode on
5057 controlled type or discriminant type
5058 * sem_ch6.adb (Analyze_Subprogram_Specification): only issue error on
5059 user-defined operator means that it should come from the source
5060 (New_Overloaded_Entity): issue error in formal mode on overloaded
5062 * sem_ch6.ads, sem_ch13.ads: typos in comments.
5064 2011-08-01 Thomas Quinot <quinot@adacore.com>
5066 * atree.adb: Minor reformatting.
5067 * checks.adb: Minor reformatting.
5069 2011-08-01 Vincent Celier <celier@adacore.com>
5071 * s-parame-vms-ia64.ads: Fix typo in comment
5073 * s-parame-vms-restrict.ads: Removed, unused.
5075 2011-08-01 Javier Miranda <miranda@adacore.com>
5078 (Is_Variable_Size_Array): Remove local subprogram Is_Constant_Bound.
5080 (Constrain_Index): Remove side effects in the evaluation of the bounds.
5081 * sem_ch3.ads, sem_ch3.adb
5082 (Is_Constant_Bound): New extended version of the subprogram that was
5083 previously located inside function Exp_Ch3.Is_Variable_Size_Array.
5084 Moved here since it is shared by routines of sem_ch3 and exp_ch3.
5085 * sem_aux.ads (Constant_Value): Fix typo in comment.
5086 * checks.adb (Generate_Index_Checks): New implementation which, for
5087 array objects with constant bounds, generates the runtime check
5088 referencing the bounds of the array type. For other cases this routine
5089 provides its previous behavior obtaining such values from the array
5091 * sem_res.adb (Set_Slice_Subtype): Link a copied range subtree with its
5093 * atree.adb (New_Copy): Reset flag Is_Overloaded in the new copy since
5094 we cannot have semantic interpretations of the new node.
5096 2011-08-01 Ed Schonberg <schonberg@adacore.com>
5098 * sem_ch6.adb (Fully_Conformant_Expressions): handle quantified
5101 2011-08-01 Arnaud Charlet <charlet@adacore.com>
5103 * sem_ch8.adb: Minor code editing.
5104 * s-vxwext.adb: Remove trailing space.
5105 * freeze.adb, freeze.ads, errout.ads, erroutc.adb: Fix GPLv3 header for
5106 consistency with other files.
5108 2011-08-01 Thomas Quinot <quinot@adacore.com>
5110 * s-auxdec.ads, s-auxdec-vms_64.ads: Minor reformatting.
5112 2011-08-01 Ed Schonberg <schonberg@adacore.com>
5114 * par-ch10.adb: reject parameterized expressions as compilation unit.
5115 * sem_ch4.adb: handle properly conditional expression with overloaded
5116 then_clause and no else_clause.
5118 2011-08-01 Tristan Gingold <gingold@adacore.com>
5120 * s-parame-vms-alpha.ads, s-parame-vms-ia64.ads: Redeclare C_Address
5121 like done by System.Aux_DEC.
5122 * env.c (__gnat_setenv) [VMS]: Put logicals into LNM$PROCESS table.
5124 2011-08-01 Yannick Moy <moy@adacore.com>
5126 * par-endh.adb (Check_End): issue a syntax error in SPARK mode for
5127 missing label at end of declaration (subprogram or package)
5128 * par-ch4.adb (P_Name): issue a syntax error in SPARK mode for mixing
5129 of positional and named parameter association
5130 * par.adb, par-util.adb (Formal_Error_Msg_SP): new wrapper on
5131 Error_Msg_SP which adds a prefix to the error message giving the name
5132 of the formal language analyzed
5133 * sem_ch6.adb (Analyze_Return_Type): issue an error in formal mode for
5134 access result type in subprogram, unconstrained array as result type,.
5135 (Analyze_Subprogram_Declaration): issue an error in formal mode for null
5137 * sem_ch8.adb: Code clean up.
5139 2011-08-01 Javier Miranda <miranda@adacore.com>
5141 * sem_ch7.adb (Uninstall_Declarations): Remove useless code.
5142 * einfo.ads (Access_Disp_Table): Fix documentation.
5143 (Dispatch_Table_Wrappers): Fix documentation.
5144 * einfo.adb (Access_Disp_Table, Dispatch_Table_Wrappers,
5145 Set_Access_Disp_Table, Set_Dispatch_Table_Wrappers): Fix the assertions
5146 to enforce the documentation of this attribute.
5147 (Set_Is_Interface): Cleanup the assertion.
5148 * exp_ch4.adb (Expand_Allocator_Expression, Tagged_Membership): Locate
5149 the Underlying_Type entity before reading attribute Access_Disp_Table.
5150 * exp_disp.adb (Expand_Dispatching_Call, Expand_Interface_Conversion):
5151 Locate the Underlying_Type before reading attribute Access_Disp_Table.
5152 * exp_aggr.adb (Build_Array_Aggr_Code, Build_Record_Aggr_Code): Locate
5153 the Underlying_Type entity before reading attribute Access_Disp_Table.
5154 * exp_ch3.adb (Build_Record_Init_Proc, Expand_N_Object_Declaration):
5155 Locate the Underlying_Type entity before reading attribute
5158 2011-08-01 Ed Schonberg <schonberg@adacore.com>
5160 * s-poosiz.ads: Additional overriding indicators.
5162 2011-08-01 Yannick Moy <moy@adacore.com>
5164 * sem_ch5.adb (Analyze_Exit_Statement): add return after error in
5166 (Analyze_Iteration_Scheme): issue error in formal mode when loop
5167 parameter specification does not include a subtype mark.
5168 * sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration): issue error in
5169 formal mode on abstract subprogram.
5170 (Analyze_Subprogram_Specification): issue error in formal mode on
5171 user-defined operator.
5172 (Process_Formals): issue error in formal mode on access parameter and
5174 * sem_ch9.adb (Analyze_Abort_Statement,
5175 Analyze_Accept_Statement, Analyze_Asynchronous_Select,
5176 Analyze_Conditional_Entry_Call, Analyze_Delay_Relative,
5177 Analyze_Delay_Until, Analyze_Entry_Call_Alternative,
5178 Analyze_Requeue, Analyze_Selective_Accept,
5179 Analyze_Timed_Entry_Call): issue error in formal mode on such constructs
5180 * sem_ch11.adb (Analyze_Raise_Statement, Analyze_Raise_xxx_Error):
5181 issue error in formal mode on user-defined raise statement.
5183 2011-08-01 Thomas Quinot <quinot@adacore.com>
5185 * sem_ch6.adb (Enter_Overloaded_Entity): Do not warn about a
5186 declaration being hidden when overriding an implicit inherited
5188 * par-ch10.adb (P_Compilation_Unit): In syntax check only mode
5189 (-gnats), do not complain about a source file that contains only a
5192 2011-08-01 Ed Schonberg <schonberg@adacore.com>
5194 * sem_ch5.adb (Analyze_Iterator_Scheme): Do not overwrite type of loop
5195 variable if already set.
5197 2011-08-01 Arnaud Charlet <charlet@adacore.com>
5199 * g-socket-dummy.adb, s-osinte-linux.ads, g-socket-dummy.ads,
5200 g-debuti.adb, g-tasloc.adb, g-debuti.ads, g-tasloc.ads,
5201 s-osinte-hpux.ads, g-sercom.adb, g-soliop-solaris.ads, g-sercom.ads,
5202 g-sptain.ads, g-curexc.ads, s-tasloc.adb, s-tasloc.ads, s-tataat.adb,
5203 g-ctrl_c.adb, a-reatim.adb, s-tataat.ads, g-dirope.adb, g-ctrl_c.ads,
5204 g-dirope.ads, g-boubuf.adb, g-calend.adb, g-boubuf.ads, g-souinf.ads,
5205 g-table.adb, g-bytswa-x86.adb, g-wispch.adb, g-io.adb, g-table.ads,
5206 g-wispch.ads, g-io.ads, g-memdum.adb, g-memdum.ads, g-busorg.adb,
5207 g-busorg.ads, g-regpat.adb, g-sothco-dummy.adb, g-encstr.adb,
5208 g-regpat.ads, g-sothco-dummy.ads, s-osinte-aix.ads, g-encstr.ads,
5209 g-sercom-mingw.adb, s-mastop-vms.adb, g-diopit.adb, g-diopit.ads,
5210 s-vxwext.adb, g-dyntab.adb, g-dyntab.ads, g-crc32.adb,
5211 g-sercom-linux.adb, g-crc32.ads, s-regpat.adb, g-flocon.ads,
5212 s-regpat.ads, g-stheme.adb, g-sestin.ads, s-taspri-posix-noaltstack.ads,
5213 g-soliop.ads, s-inmaop-posix.adb, g-locfil.ads, g-enblsp-vms-alpha.adb,
5214 g-socthi-dummy.adb, g-socthi-dummy.ads, gnat.ads, g-moreex.adb,
5215 g-moreex.ads, g-dynhta.adb, g-dynhta.ads, g-deutst.ads, g-htable.adb,
5216 g-cgicoo.adb, g-htable.ads, g-cgicoo.ads, a-interr.adb,
5217 g-socthi-vms.adb, g-socthi-vms.ads, g-hesora.adb, g-bubsor.adb,
5218 g-hesora.ads, g-bubsor.ads, g-md5.adb, g-md5.ads, s-intman-irix.adb,
5219 s-htable.adb, s-osinte-vms.adb, s-htable.ads, s-osinte-vms.ads,
5220 s-taprob.adb, g-bytswa.adb, g-bytswa.ads, s-osinte-solaris-posix.ads,
5221 a-suenco.adb, g-comver.adb, g-comver.ads, g-exctra.adb,
5222 s-osinte-solaris.adb, g-exctra.ads, s-osinte-irix.ads,
5223 s-osinte-solaris.ads, a-caldel-vms.adb, g-socthi-vxworks.adb,
5224 g-expect.adb, g-socthi-vxworks.ads, g-expect.ads, g-comlin.ads,
5225 g-heasor.adb, g-heasor.ads, g-traceb.adb, g-traceb.ads, g-decstr.adb,
5226 g-spipat.adb, g-decstr.ads, g-spipat.ads, s-mastop-tru64.adb,
5227 g-except.ads, g-thread.adb, g-hesorg.adb, g-thread.ads, g-hesorg.ads,
5228 g-expect-vms.adb, a-stuten.ads, g-spchge.adb, g-spchge.ads,
5229 g-u3spch.adb, g-u3spch.ads, g-spitbo.adb, g-spitbo.ads,
5230 s-osinte-dummy.ads, s-osinte-posix.adb, g-pehage.adb, g-pehage.ads,
5231 s-gloloc-mingw.adb, g-sha1.ads, s-traceb-hpux.adb,
5232 g-trasym-unimplemented.adb, g-trasym-unimplemented.ads, g-io_aux.adb,
5233 g-regexp.adb, g-io_aux.ads, g-socthi-mingw.adb, g-regexp.ads,
5234 s-osinte-hpux-dce.adb, g-socthi-mingw.ads, g-cgi.adb,
5235 s-osinte-hpux-dce.ads, g-cgi.ads, g-byorma.adb, g-boumai.ads,
5236 g-byorma.ads, a-caldel.adb, s-regexp.adb, s-regexp.ads,
5237 g-soliop-mingw.ads, g-sptavs.ads, s-osinte-tru64.ads, g-speche.adb,
5238 g-speche.ads, g-socthi.adb, g-stsifd-sockets.adb, g-socthi.ads,
5239 s-osinte-darwin.ads, i-vxwork-x86.ads, g-awk.adb, i-vxwork.ads,
5240 g-awk.ads, g-zspche.adb, g-zspche.ads, g-socket.adb, g-sptabo.ads,
5241 g-socket.ads, g-semaph.adb, g-semaph.ads, s-taspri-posix.ads,
5242 g-enblsp-vms-ia64.adb, g-cgideb.adb, g-cgideb.ads, g-sothco.adb,
5243 s-osinte-freebsd.ads, g-sothco.ads, g-catiio.adb, g-casuti.adb,
5244 g-catiio.ads, g-casuti.ads, g-trasym.adb, g-trasym.ads, s-casuti.adb,
5245 g-os_lib.adb, s-traceb-mastop.adb, g-busora.adb, s-interr-dummy.adb,
5246 g-busora.ads, g-enutst.ads, s-os_lib.adb, a-tasatt.adb,
5247 s-osinte-mingw.ads: Update to GPLv3 run-time license.
5248 Use GNAT instead of GNARL.
5250 2011-08-01 Bob Duff <duff@adacore.com>
5252 * a-cdlili.ads, a-cihama.ads, a-coinve.ads, a-ciorse.ads, a-coorma.ads,
5253 a-cidlli.ads, a-ciormu.ads, a-cihase.ads, a-cohama.ads, a-coorse.ads,
5254 a-ciorma.ads, a-coormu.ads, a-convec.ads, a-cohase.ads: Minor
5257 2011-08-01 Yannick Moy <moy@adacore.com>
5259 * debug.adb (d.D) reverve flag for the SPARK mode
5260 (d.E) reverve flag for SPARK generation mode
5261 (d.F) reverve flag for Why generation mode
5262 * opt.ads, opt.adb (ALFA_Mode, ALFA_Through_SPARK_Mode,
5263 ALFA_Through_Why_Mode, Formal_Verification_Mode, SPARK_Mode): New
5264 functions which return True when the corresponding modes are set
5265 (Formal_Language): return "spark" or "alfa" when in formal verification
5267 * sem_util.ads, sem_util.adb (Formal_Error_Msg): new wrapper on
5268 Error_Msg to prefix the error message with a tag giving the formal
5270 (Formal_Error_Msg_N): new wrapper on Error_Msg_N to prefix the error
5271 message with a tag giving the formal language
5272 * sem_ch5.adb (Analyze_Block_Statement): issue error in formal mode on
5274 (Analyze_Case_Statement): issue error in formal mode on case statement
5275 with a single "others" case alternative
5276 (Analyze_Exit_Statement): issue errors in formal mode on exit
5277 statements which do not respect SPARK restrictions
5278 (Analyze_Goto_Statement): issue error in formal mode on goto statement
5279 (Check_Unreachable_Code): always issue an error (not a warning) in
5280 formal mode on unreachable code (concerns both code after an infinite
5281 loop and after an unconditional jump, both not allowed in SPARK)
5282 * sem_ch6.adb (Analyze_Return_Statement): add call to
5283 Set_Return_Present for a procedure containing a return statement
5284 (already done for functions in Analyze_Function_Return)
5285 (Analyze_Function_Return): issue error in formal mode on extended
5286 return or if return is not last statement in function
5287 (Check_Missing_Return): issue error in formal mode if function does
5288 not end with return or if procedure contains a return
5289 * sem_ch8.ads, sem_ch8.adb (Has_Loop_In_Inner_Open_Scopes): new
5290 function to detect if there is an inner scope of its parameter S which
5293 2011-08-01 Thomas Quinot <quinot@adacore.com>
5295 * sem_ch6.ads: Minor reformatting.
5297 2011-08-01 Javier Miranda <miranda@adacore.com>
5299 * sem_util.adb (Abstract_Interface_List): Complete condition when
5300 processing private type declarations to avoid reading unavailable
5302 (Is_Synchronized_Tagged_Type): Complete condition when processing
5303 private extension declaration nodes to avoid reading unavailable
5306 2011-08-01 Thomas Quinot <quinot@adacore.com>
5308 * sem_ch3.adb: Minor reformatting.
5310 2011-08-01 Thomas Quinot <quinot@adacore.com>
5312 * s-parame-ae653.ads, s-parame-vms-alpha.ads, s-parame-hpux.ads,
5313 i-cpoint.adb, i-cstrin.adb, i-cpoint.ads, i-cstrin.ads,
5314 s-parame-vms-ia64.ads, s-parame.ads, i-c.ads, s-parame-vxworks.ads,
5315 s-parame-vms-restrict.ads: Remove duplicated Interfaces.C.* packages
5316 for VMS, instead parametrize the common implementation with
5317 System.Parameters declarations.
5319 2011-08-01 Eric Botcazou <ebotcazou@adacore.com>
5321 * gnat_rm.texi: Document limitation of Pragma No_Strict_Aliasing.
5323 2011-08-01 Tristan Gingold <gingold@adacore.com>
5325 * seh_init.c: Fix SEH handler installation on win64.
5327 2011-08-01 Ed Schonberg <schonberg@adacore.com>
5329 * sem_ch3.adb (Access_Subprogram_Declaration): in Asis mode, prevent
5330 double analysis of an anonymous access to subprogram, because it can
5331 lead to improper sharing of profiles and a back-end crash.
5333 2011-08-01 Robert Dewar <dewar@adacore.com>
5335 * make.adb, sem_ch4.adb: Minor reformatting.
5336 * gcc-interface/Make-lang.in: Update dependencies.
5337 * sem_util.adb, exp_ch5.adb: Minor reformatting.
5339 2011-08-01 Arnaud Charlet <charlet@adacore.com>
5341 * gnat_rm.texi: Fix definition of Long_Integer.
5343 2011-08-01 Ed Schonberg <schonberg@adacore.com>
5345 * exp_aggr.adb: check limit size of static aggregate unconditionally,
5346 to prevent storage exhaustion.
5347 * exp_ch7.adb (Clean_Simple_Protected_Objects): if the scope being
5348 finalized is a function body, insert the cleanup code before the final
5349 return statement, to prevent spurious warnings.
5350 * s-pooglo.ads: add overriding indicator.
5352 2011-08-01 Ed Schonberg <schonberg@adacore.com>
5354 * sem_ch4.adb (Operator_Check): improve error message when both a
5355 with_clause and a use_clause are needed to make operator usage legal.
5356 * sem_util.ads, sem_util.adb (Unit_Is_Visible): new predicate to
5357 determine whether a compilation unit is visible within an other,
5358 either through a with_clause in the current unit, or a with_clause in
5359 its library unit or one one of its parents.
5361 2011-08-01 Ed Schonberg <schonberg@adacore.com>
5363 * exp_ch5.adb (Expand_N_Iterator_Loop): handle properly an iterator
5364 over an arbitrary expression of an array or container type.
5365 * lib-xref.adb: clarify comment.
5367 2011-08-01 Bob Duff <duff@adacore.com>
5369 * einfo.ads: Minor reformatting.
5370 * debug.adb: Minor comment improvement.
5372 2011-08-01 Javier Miranda <miranda@adacore.com>
5374 * sem_ch4.adb (Try_Object_Operation): For class-wide subprograms do not
5375 consider hidden subprograms as valid candidates.
5377 2011-08-01 Arnaud Charlet <charlet@adacore.com>
5379 * make.adb (Compile): Strip -mxxx switches in CodePeer mode.
5381 2011-08-01 Vasiliy Fofanov <fofanov@adacore.com>
5383 * gnat_ugn.texi: Fix typo.
5385 2011-08-01 Robert Dewar <dewar@adacore.com>
5387 * i-cstrin.adb, sem_util.adb, exp_ch11.adb, sem_ch8.adb,
5388 lib-xref.adb: Minor reformatting
5390 2011-08-01 Gary Dismukes <dismukes@adacore.com>
5392 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Replace test of
5393 when to generate a call to Move_Final_List.
5394 (Has_Controlled_Parts): Remove this function.
5396 2011-08-01 Geert Bosch <bosch@adacore.com>
5398 * par-ch3.adb (P_Discrete_Choice_List): Improve error message for extra
5401 2011-08-01 Thomas Quinot <quinot@adacore.com>
5403 * exp_ch11.adb (Expand_N_Raise_Statement): Mark N_Raise_xxx_Error for
5404 explicit raise of a predefined exception as Comes_From_Source if the
5405 original N_Raise_Statement comes from source.
5407 2011-08-01 Robert Dewar <dewar@adacore.com>
5409 * sinfo.ads: Add comment.
5410 * sem_ch6.adb: Minor reformatting.
5412 2011-08-01 Robert Dewar <dewar@adacore.com>
5414 * freeze.adb (Freeze_Entity): Refine check for bad component size
5415 clause to avoid rejecting confirming clause when atomic/aliased present.
5417 2011-08-01 Ed Schonberg <schonberg@adacore.com>
5419 * sem_ch8.adb (Find_Direct_Name, Analyze_Expanded_Name): use Is_LHS to
5420 better determine whether an entity reference is a write.
5421 * sem_util.adb (Is_LHS): refine predicate to handle assignment to a
5423 * lib-xref.adb (Output_References): Do no suppress a read reference at
5424 the same location as an immediately preceeding modify-reference, to
5425 handle properly in-out actuals.
5427 2011-08-01 Tristan Gingold <gingold@adacore.com>
5429 * env.c (__gnat_setenv) [VMS]: Refine previous change.
5431 2011-08-01 Quentin Ochem <ochem@adacore.com>
5433 * i-cstrin.adb (New_String): Changed implementation, now uses only the
5434 heap to compute the result.
5436 2011-08-01 Robert Dewar <dewar@adacore.com>
5438 * atree.ads: Minor reformatting.
5440 2011-08-01 Emmanuel Briot <briot@adacore.com>
5442 * g-expect.adb (Get_Command_Output): Fix memory leak.
5444 2011-08-01 Geert Bosch <bosch@adacore.com>
5446 * cstand.adb (P_Float_Type): New procedure to print the definition of
5447 predefined fpt types.
5448 (P_Mixed_Name): New procedure to print a name using mixed case
5449 (Print_Standard): Use P_Float_Type for printing floating point types
5450 * einfo.adb (Machine_Emax_Value): Add preliminary support for quad
5451 precision IEEE float.
5453 2011-08-01 Thomas Quinot <quinot@adacore.com>
5455 * sem_ch3.adb: Minor reformatting.
5457 2011-08-01 Ed Schonberg <schonberg@adacore.com>
5459 * sem_ch6.adb (Analyze_Parameterized_Expression): If the expression is
5460 the completion of a generic function, insert the new body rather than
5461 rewriting the original.
5463 2011-08-01 Yannick Moy <moy@adacore.com>
5465 * sinfo.ads, errout.ads: Typos in comments.
5467 2011-08-01 Robert Dewar <dewar@adacore.com>
5469 * par-endh.adb: Minor reformatting.
5471 2011-08-01 Robert Dewar <dewar@adacore.com>
5473 * aspects.ads, aspects.adb: Add aspects for library unit pragmas
5474 (Pre_Post_Aspects): New subtype.
5475 * par-ch12.adb (P_Generic): New syntax for aspects in packages
5476 * par-ch13.adb (P_Aspect_Specifications): Add Semicolon parameter
5477 * par-ch7.adb (P_Package): Remove Decl parameter
5478 (P_Package): Handle new syntax for aspects (before IS)
5479 * par-ch9.adb (P_Protected_Definition): Remove Decl parameter, handle
5481 (P_Task_Definition): Remove Decl parameter, handle new aspect syntax
5482 * par.adb (P_Aspect_Specifications): Add Semicolon parameter
5483 (P_Package): Remove Decl parameter
5484 * sem_ch13.adb (Analyze_Aspect_Specifications): Handle library unit
5486 * sem_ch7.adb (Analyze_Package_Declaration): Analyze new format aspect
5488 * sem_util.ads, sem_util.adb (Static_Boolean): New function
5489 * sinfo.ads: Document new syntax for aspects in packages etc.
5490 * sprint.adb: Handle new syntax of aspects before IS in package
5492 2011-08-01 Thomas Quinot <quinot@adacore.com>
5494 * atree.ads: Minor reformatting.
5495 * sem_prag.adb: Minor reformatting.
5497 2011-08-01 Robert Dewar <dewar@adacore.com>
5499 * exp_util.adb (Insert_Actions): Fix error in handling Actions for
5500 case expr alternative.
5502 2011-08-01 Ed Schonberg <schonberg@adacore.com>
5504 * sem_ch12.adb: Fix typo.
5506 2011-08-01 Geert Bosch <bosch@adacore.com>
5508 * sem_prag.adb (Check_No_Link_Name): New procedure.
5509 (Process_Import_Or_Interface): Use Check_No_Link_Name.
5510 * cstand.adb (Create_Standard): Use Esize (Standard_Long_Long_Float)
5511 instead of Standard_Long_Long_Float_Size global. Preparation for
5512 eventual removal of per type constants.
5513 * exp_util.ads (Get_Stream_Size): New function returning the stream
5514 size value of subtype E.
5515 * exp_util.adb (Get_Stream_Size): Implement new function.
5516 * exp_strm.adb (Build_Elementary_Input_Call): Use Get_Stream_Size
5518 * exp_attr.adb (Attribute_Stream_Size): Use Get_Stream_Size
5520 (Machine_Mantissa_Value): Handle 128-bit quad precision IEEE floats
5522 2011-08-01 Geert Bosch <bosch@adacore.com>
5524 * cstand.adb: Fix comments.
5525 * sem_prag.adb (Analyze_Pragma): Use List_Length instead of explicit
5528 2011-08-01 Robert Dewar <dewar@adacore.com>
5530 * exp_ch4.adb, sem_cat.adb: Minor reformatting.
5532 2011-08-01 Geert Bosch <bosch@adacore.com>
5534 * atree.ads: Fix comment.
5536 2011-08-01 Robert Dewar <dewar@adacore.com>
5538 * aspects.ads, aspects.adb (Aspect_Names): Moved from body to spec.
5539 * par-ch13.adb (P_Aspect_Specifications): Check misspelled aspect name.
5540 * par.adb: Add with for Namet.Sp.
5541 * par-tchk.adb: Minor reformatting.
5543 2011-08-01 Vincent Celier <celier@adacore.com>
5545 * mlib-tgt-specific-vms-alpha.adb, mlib-tgt-specific-vms-ia64.adb
5546 (Build_Dynamic_Library): Use new function Init_Proc_Name to get the name
5547 of the init procedure of a SAL.
5548 * mlib-tgt-vms_common.ads, mlib-tgt-vms_common.adb (Init_Proc_Name):
5551 2011-08-01 Thomas Quinot <quinot@adacore.com>
5553 * exp_ch4.adb, s-tasini.ads, sem_attr.adb, s-soflin.ads: Minor
5556 2011-08-01 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
5558 * adaint.c (__gnat_file_time_name_attr): Get rid of warning.
5560 2011-08-01 Thomas Quinot <quinot@adacore.com>
5562 * sem_util.adb, sem_util.ads (Has_Overriding_Initialize): Make function
5563 conformant with its spec (return True only for types that have
5564 an overriding Initialize primitive operation that prevents them from
5565 having preelaborable initialization).
5566 * sem_cat.adb (Validate_Object_Declaration): Fix test for preelaborable
5567 initialization for controlled types in Ada 2005 or later mode.
5569 2011-08-01 Robert Dewar <dewar@adacore.com>
5571 * aspects.ads, aspects.adb: Add aspect Type_Invariant, Precondition,
5573 (Same_Aspect): New function.
5574 * sem_ch13.adb (Analyze_Aspect_Specifications): Add aspect
5575 Type_Invariant, Precondition, Postcondition.
5576 * snames.ads-tmpl: Add Name_Type_Invariant.
5578 2011-08-01 Robert Dewar <dewar@adacore.com>
5580 * freeze.adb (Freeze_Entity): Don't call Check_Aspect_At_Freeze_Point
5582 (Freeze_All_Ent): Fix error in handling inherited aspects.
5583 * sem_ch13.adb (Analyze_Aspect_Specifications): Skip aspect that is
5584 already analyzed, but don't skip entire processing of a declaration,
5585 that's wrong in some cases of declarations being rewritten.
5586 (Analyze_Aspect_Specification): Set Is_Delayed_Aspect in aspects.
5587 Don't delay for integer, string literals
5588 Treat predicates in usual manner for delay, remove special case code,
5590 (Analyze_Freeze_Entity): Make call to Check_Aspect_At_Freeze_Point
5591 (Build_Predicate_Function): Update saved expression in aspect
5592 (Build_Invariant_Procedure): Update saved expression in aspect
5593 * exp_ch4.adb (Expand_N_Selected_Component): Only do the optimization
5594 of replacement of discriminant references if the reference is simple.
5596 2011-08-01 Robert Dewar <dewar@adacore.com>
5598 * aspects.ads, aspects.adb: Add Static_Predicate and Dynamic_Predicate.
5599 * sem_ch13.adb (Analyze_Aspect_Specification): Add processing for
5600 Static_Predicate and Dynamic_Predicate.
5601 (Build_Predicate_Function): Add processing for Static_Predicate
5602 and Dynamic_Predicate.
5603 * sinfo.ads, sinfo.adb (From_Dynamic_Predicate): New flag
5604 (From_Static_Predicate): New flag
5605 * snames.ads-tmpl: Add Name_Static_Predicate and Name_Dynamic_Predicate
5607 2011-08-01 Robert Dewar <dewar@adacore.com>
5609 * usage.adb: Documentation cleanup for Ada version modes in usage.
5610 * expander.adb: Minor reformatting.
5612 2011-08-01 Robert Dewar <dewar@adacore.com>
5614 * atree.ads: Minor comment fix.
5615 * a-stwifi.adb, a-stzfix.adb, a-strfix.adb, a-ztexio.ads, a-textio.ads,
5616 a-witeio.ads, sem_prag.adb: Minor reformatting.
5618 2011-08-01 Doug Rupp <rupp@adacore.com>
5620 * env.c (__gnat_setenv) [VMS]: Force 32bit on item list structure
5621 pointers. Use descrip.h header file for convenience. Add some
5624 2011-08-01 Robert Dewar <dewar@adacore.com>
5626 * freeze.adb (Freeze_Entity): Call Check_Aspect_At_Freeze_Point
5627 (Freeze_All): Call Check_Aspect_At_End_Of_Declarations
5628 * sem_ch13.ads, sem_ch13.adb (Check_Aspect_At_Freeze_Point):
5630 (Check_Aspect_At_End_Of_Declarations): New procedure
5631 (Analye_Aspect_Specification): Minor changes for above procedures
5632 * sinfo.ads, sinfo.adb (Is_Delayed_Aspect): Now set in aspect
5633 specification node as well.
5635 2011-08-01 Pascal Obry <obry@adacore.com>
5637 * adaint.c (_gnat_stat): GetFilesAttributesEx() would fail on special
5638 Windows files. Use GetFilesAttributes() in this case to check for file
5639 existence instead of returning with an error code.
5641 2011-08-01 Vincent Celier <celier@adacore.com>
5643 * a-stzfix.adb, a-stwifi.adb (Replace_Slice): Fixed computation when
5644 High is above Source length.
5646 2011-08-01 Robert Dewar <dewar@adacore.com>
5648 * a-ztexio.ads, a-textio.ads, a-witeio.ads: Fix comment.
5650 2011-08-01 Robert Dewar <dewar@adacore.com>
5652 * aspects.ads (Boolean_Aspects): New subtype.
5653 * exp_ch13.adb (Expand_Freeze_Entity): Fix errors in handling aspects
5654 for derived types in cases where the parent type and derived type have
5656 * freeze.adb (Freeze_Entity): Fix problems in handling derived type
5657 with aspects when parent type also has aspects.
5658 (Freeze_Entity): Deal with delay of boolean aspects (must evaluate
5659 boolean expression at this point).
5660 * sem_ch13.adb (Analyze_Aspect_Specifications): Delay all aspects in
5661 accordance with final decision on the Ada 2012 feature.
5662 * sinfo.ads, sinfo.adb (Is_Boolean_Aspect): New flag.
5664 2011-08-01 Matthew Heaney <heaney@adacore.com>
5666 * a-chtgbo.adb (Delete_Node_Sans_Free): Replace iterator with selector.
5668 2011-08-01 Pascal Obry <obry@adacore.com>
5670 * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb:
5671 Fix Replace_Slice when High is above current string size.
5672 (Replace_Slice): Fix DL computation when High is above current
5675 2011-08-01 Gary Dismukes <dismukes@adacore.com>
5677 * gnat_rm.texi: Add documentation for pragma Static_Elaboration_Desired.
5679 2011-08-01 Matthew Heaney <heaney@adacore.com>
5681 * a-rbtgbo.adb (Delete_Node_Sans_Free): Fixed assignment to left child
5684 2011-08-01 Pascal Obry <obry@adacore.com>
5686 * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb: Minor
5689 2011-08-01 Ed Schonberg <schonberg@adacore.com>
5691 * sem_attr.adb (Analyze_Attribute, case 'Access): Handle properly named
5692 access to protected subprograms in generic bodies.
5693 * sem_ch6.adb (Analyze_Subprogram_Declaration): If the context is a
5694 protected type, indicate that the convention of the subprogram is
5695 Convention_Protected, because it may be used in subsequent declarations
5696 within the protected declaration.
5698 2011-08-01 Vincent Celier <celier@adacore.com>
5700 * mlib-prj.adb (Build_Library): Use "ada_" as the prefix for the "init"
5701 and "final" procedures when the name of the library is "ada", to avoid
5702 duplicate symbols "adainit" and "adafinal" in executables.
5704 2011-08-01 Ed Schonberg <schonberg@adacore.com>
5706 * sem_attr.adb (Analyze_Attribute, case 'Result): Handle properly a
5707 quantified expression that appears within a postcondition and uses the
5708 Ada2012 'Result attribute.
5710 2011-07-28 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
5712 * init.c (__gnat_error_handler): Cast reason to int.
5713 (__gnat_install_handler): Explain sa_sigaction use.
5715 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
5717 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: If the
5718 subprogram has copy-in copy-out parameters, try to promote the mode of
5719 the return type if it is passed in registers.
5721 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
5723 * gcc-interface/utils2.c (build_binary_op) <ARRAY_REF>: Do not mark the
5724 left operand as addressable.
5726 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
5728 * gcc-interface/gigi.h (build_function_stub): Remove.
5729 (build_return_expr): Likewise.
5730 (convert_vms_descriptor): Declare.
5731 * gcc-interface/utils.c (convert_vms_descriptor): Make global.
5732 (build_function_stub): Move to...
5733 * gcc-interface/utils2.c (build_return_expr): Move to...
5734 * gcc-interface/trans.c (build_function_stub): ...here.
5735 (build_return_expr): ...here.
5736 (Subprogram_Body_to_gnu): Add local variable for language_function.
5737 Disconnect the parameter attributes cache, if any, once done with it.
5738 Call end_subprog_body only after setting the end_locus.
5739 Build the stub associated with the function, if any, at the very end.
5740 (gnat_to_gnu) <N_Return_Statement>: Remove couple of useless local
5741 variables and streamline control flow.
5743 2011-07-23 Arnaud Charlet <charlet@adacore.com>
5746 * gcc-interface/Makefile.in (powerpc-linux): Remove reference to
5749 2011-07-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
5752 * init.c [sun && __SVR4 && !__vxworks] (__gnat_install_handler):
5753 Assign to act.sa_sigaction.
5754 * tracebak.c [USE_GENERIC_UNWINDER] (__gnat_backtrace): Cast
5755 current->return_address to char * before arithmetic.
5757 2011-07-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
5759 * init.c [sgi] (__gnat_error_handler): Update sigaction(2) citation.
5760 Correct argument types.
5761 Extract code from reason.
5762 (__gnat_install_handler): Assign to act.sa_sigaction.
5764 2011-07-21 Eric Botcazou <ebotcazou@adacore.com>
5766 * gcc-interface/Make-lang.in (GNAT1_ADA_OBJS): Move ada/b_gnat1.o to...
5767 (GNAT1_OBJS): ...here.
5769 2011-07-15 Eric Botcazou <ebotcazou@adacore.com>
5772 * g-socthi-mingw.adb (Fill): Fix formatting.
5774 * gcc-interface/gigi.h: Move around comment.
5776 2011-07-14 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
5779 * s-taprop-hpux-dce.adb (Abort_Task): Remove unnecessary cast.
5781 2011-07-14 Florian Weimer <fw@deneb.enyo.de>
5784 * g-socthi-mingw.adb (Fill): Guard against invalid MSG_WAITALL.
5786 2011-07-13 Eric Botcazou <ebotcazou@adacore.com>
5788 * gcc-interface/utils.c (build_vms_descriptor32): Skip the 32-bit
5789 range comparison if Pmode is SImode.
5791 2011-07-12 Laurent GUERBY <laurent@guerby.net>
5792 Eric Botcazou <ebotcazou@adacore.com>
5794 * adadecode.c: Wrap up in extern "C" block.
5795 * adadecode.h: Likewise.
5796 * adaint.c: Likewise. Remove 'const' keyword.
5797 * adaint.h: Likewise.
5799 * atree.h: Likewise.
5801 * cstreams.c: Likewise.
5805 * final.c: Likewise.
5807 * initialize.c: Likewise.
5809 * namet.h: Likewise.
5810 * nlists.h: Likewise.
5811 * raise.c: Likewise.
5812 * raise.h: Likewise.
5813 * repinfo.h: Likewise.
5814 * seh_init.c: Likewise.
5815 * targext.c: Likewise.
5816 * tracebak.c: Likewise.
5817 * uintp.h: Likewise.
5818 * urealp.h: Likewise.
5819 * xeinfo.adb: Wrap up generated C code in extern "C" block.
5820 * xsinfo.adb: Likewise.
5821 * xsnamest.adb: Likewise.
5822 * gcc-interface/gadaint.h: Wrap up in extern "C" block.
5823 * gcc-interface/gigi.h: Wrap up some prototypes in extern "C" block.
5824 * gcc-interface/misc.c: Likewise.
5825 * gcc-interface/Make-lang.in (GCC_LINK): Use LINKER.
5826 (GNAT1_C_OBJS): Remove ada/b_gnat1.o. List ada/seh_init.o and
5827 ada/targext.o here...
5828 (GNAT_ADA_OBJS): ...and not here.
5829 (GNAT1_ADA_OBJS): Add ada/b_gnat1.o.
5830 (GNATBIND_OBJS): Reorder.
5832 2011-07-07 Richard Henderson <rth@redhat.com>
5834 * gcc-interface/misc.c (gnat_init_gcc_eh): Don't call
5835 dwarf2out_frame_init.
5837 2011-07-07 Eric Botcazou <ebotcazou@adacore.com>
5839 * gcc-interface/misc.c (gnat_init): Tweak previous change.
5841 2011-07-07 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
5844 * gcc-interface/Makefile.in: Handle x86_64-solaris2.
5846 2011-07-06 Richard Guenther <rguenther@suse.de>
5848 * gcc-interface/misc.c (gnat_init): Merge calls to
5849 build_common_tree_nodes and build_common_tree_nodes_2.
5850 Re-initialize boolean_false_node.
5852 2011-07-02 Eric Botcazou <ebotcazou@adacore.com>
5853 Olivier Hainque <hainque@adacore.com>
5854 Nicolas Setton <setton@adacore.com>
5856 * gcc-interface/utils.c (record_builtin_type): Set TYPE_ARTIFICIAL on
5857 the type according to the ARTIFICIAL_P parameter.
5858 (create_type_decl): Likewise.
5859 (create_type_stub_decl): Set TYPE_ARTIFICIAL on the type to 1.
5861 2011-07-01 Eric Botcazou <ebotcazou@adacore.com>
5863 * gcc-interface/Make-lang.in (gnat1): Prepend '+' to the command.
5864 (gnatbind): Likewise.
5866 2011-06-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
5868 * gcc-interface/Makefile.in (TOOLS_LIBS): Add $(LIBINTL).
5870 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
5872 * gcc-interface/decl.c (gnat_to_gnu_component_type): Use GNAT_TYPE
5873 local variable throughout. Remove useless call to Base_Type.
5874 (gnat_to_gnu_field): Use GNAT_FIELD_TYPE local variable throughout.
5875 Take it also into account for the volatileness of the field. Set the
5876 TREE_SIDE_EFFECTS flag as well in this case. Reorder some warnings.
5878 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
5880 * gcc-interface/trans.c (Identifier_to_gnu): Don't set TREE_THIS_NOTRAP
5881 on a dereference built for a by-ref object if it has an address clause.
5883 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
5885 * einfo.ads (Address_Taken): Document use for the second argument of
5886 Asm_Input and Asm_Output attributes.
5887 * sem_attr.adb (Analyze_Attribute) <Attribute_Asm_Input>: If the second
5888 argument is an entity name, then set Address_Taken on it.
5889 <Attribute_Asm_Output>: Likewise.
5890 * gcc-interface/trans.c (lvalue_required_for_attribute_p): Handle the
5891 Attr_Asm_Input and Attr_Asm_Output attributes explicitly.
5892 (gnat_to_gnu) <N_Code_Statement>: If an operand is going to end up in
5893 memory and is a CONST_DECL, retrieve its corresponding VAR_DECL.
5895 2011-06-16 Joern Rennecke <joern.rennecke@embecosm.com>
5898 * gcc-interface/decl.c (gnat_to_gnu_param): Use pack_cumulative_args.
5900 2011-06-14 Joseph Myers <joseph@codesourcery.com>
5902 * gcc-interface/Make-lang.in (gnatbind$(exeext)): Use ggc-none.o.
5903 (ada/utils.o): Update dependencies.
5904 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Add
5905 ../../../libcpp/libcpp.a.
5906 * gcc-interface/utils.c: Include common/common-target.h.
5907 (process_attributes): Use targetm_common.have_named_sections.
5909 2011-06-07 Richard Guenther <rguenther@suse.de>
5911 * gcc-interface/misc.c (gnat_init): Do not set size_type_node or call
5914 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
5916 * gcc-interface/utils2.c (gnat_stabilize_reference): Propagate the
5917 TREE_THIS_NOTRAP flag.
5919 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
5921 * gcc-interface/utils2.c (gnat_stabilize_reference) <COMPOUND_EXPR>:
5924 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
5926 * gcc-interface/trans.c (Identifier_to_gnu): Also handle deferred
5927 constants whose full view has discriminants specially.
5929 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
5931 * gcc-interface/utils.c: Include diagnostic.h.
5932 (gnat_write_global_declarations): Output debug information for all
5933 global type declarations before finalizing the compilation unit.
5934 * gcc-interface/Make-lang.in (ada/utils.o): Add dependency.
5936 2011-05-25 Jakub Jelinek <jakub@redhat.com>
5938 * gcc-interface/utils.c (def_fn_type): Remove extra va_end.
5940 2011-05-25 Kai Tietz <ktietz@redhat.com>
5942 * adaint.c (__gnat_to_canonical_file_list_next): Use array
5943 initialization instead of const/none-const pointer assignment.
5945 2011-05-24 Joseph Myers <joseph@codesourcery.com>
5947 * gcc-interface/Make-lang.in (GNAT1_OBJS): Don't include
5948 $(EXTRA_GNAT1_OBJS).
5949 (GNATBIND_OBJS): Don't include $(EXTRA_GNATBIND_OBJS).
5950 (EXTRA_GNAT1_OBJS, EXTRA_GNATBIND_OBJS): Remove.
5951 (gnat1$(exeext), gnatbind$(exeext)): Use libcommon-target.a.
5952 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use
5953 libcommon-target.a instead of prefix.o.
5955 2011-05-21 Joseph Myers <joseph@codesourcery.com>
5958 * gcc-interface/Make-lang.in (gnatbind$(exeext)): Depend on $(LIBDEPS).
5960 2011-05-20 Joseph Myers <joseph@codesourcery.com>
5962 * gcc-interface/Make-lang.in (EXTRA_GNATBIND_OBJS): Remove version.o.
5963 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use libcommon.a
5964 instead of version.o.
5966 2011-05-18 Kai Tietz <ktietz@redhat.com>
5968 * gcc-interface/trans.c (Exception_Handler_to_gnu_sjlj): Use
5969 boolean_false_node instead of integer_zero_node.
5970 (convert_with_check): Likewise.
5971 * gcc-interface/decl.c (choices_to_gnu): Likewise.
5973 2011-05-12 Eric Botcazou <ebotcazou@adacore.com>
5975 * gcc-interface/trans.c (call_to_gnu): In the by-reference case, if the
5976 type of the parameter is an unconstrained array, convert the actual to
5977 the type of the formal in the In Out and Out cases as well.
5979 2011-05-11 Nathan Froyd <froydnj@codesourcery.com>
5981 * gcc-interface/utils.c (def_fn_type): Don't call build_function_type;
5982 call build_function_type_array or build_varargs_function_type_array
5984 (create_subprog_type): Don't call build_function_type; call
5985 build_function_type_vec instead.
5987 2011-05-11 Nathan Froyd <froydnj@codesourcery.com>
5989 * gcc-interface/ada-tree.h (TYPE_OBJECT_RECORD_TYPE): Use TYPE_MINVAL.
5990 (TYPE_GCC_MIN_VALUE): Use TYPE_MINVAL.
5991 (TYPE_GCC_MAX_VALUE): Use TYPE_MAXVAL.
5993 2011-05-07 Eric Botcazou <ebotcazou@adacore.com>
5995 * gcc-interface/decl.c (intrin_arglists_compatible_p): Remove spaces.
5997 * gcc-interface/gigi.h (global_bindings_p): Adjust prototype.
5998 * gcc-interface/utils.c (global_bindings_p): Return bool and simplify.
6000 2011-05-05 Nathan Froyd <froydnj@codesourcery.com>
6002 * gcc-interface/trans.c (Case_Statement_to_gnu): Call build_case_label.
6004 2011-05-05 Nathan Froyd <froydnj@codesourcery.com>
6006 * gcc-interface/decl.c (intrin_arglists_compatible_p): Use iterators
6007 instead of accessing TYPE_ARG_TYPES directly.
6008 * gcc-interface/utils.c (handle_nonnull_attribute): Likewise.
6010 2011-05-05 Eric Botcazou <ebotcazou@adacore.com>
6013 * gcc-interface/gigi.h (get_variant_part): Declare.
6014 * gcc-interface/decl.c (get_variant_part): Make global.
6015 * gcc-interface/utils2.c (find_common_type): Do not return T1 if the
6016 types have the same constant size, are record types and T1 has a
6017 variant part while T2 doesn't.
6019 2011-05-05 Eric Botcazou <ebotcazou@adacore.com>
6021 * gcc-interface/utils.c (begin_subprog_body): Do not call
6023 (end_subprog_body): Likewise.
6025 2011-05-04 Richard Guenther <rguenther@suse.de>
6027 * gcc-interface/trans.c (gnat_to_gnu): Remove zero notrunc argument to
6029 (pos_to_constructor): Likewise.
6031 2011-05-03 Nathan Froyd <froydnj@codesourcery.com>
6032 Eric Botcazou <ebotcazou@adacore.com>
6034 * gcc-interface/trans.c (gigi): Call build_function_type_list instead
6035 of build_function_type. Adjust calls to...
6036 (build_raise_check): ...this. Do not take a void_tree parameter.
6037 Call build_function_type_list instead of build_function_type.
6038 Fix head comment and swap couple of conditional blocks.
6040 2011-04-30 Eric Botcazou <ebotcazou@adacore.com>
6042 * gnatvsn.ads (Library_Version): Bump to 4.7.
6043 (Current_Year): Bump to 2011.
6045 2011-04-29 Michael Matz <matz@suse.de>
6047 * gcc-interface/misc.c (gnat_handle_option): Set
6048 warn_maybe_uninitialized.
6050 2011-04-23 Gerald Pfeifer <gerald@pfeifer.com>
6052 * gnat_ugn.texi (Complexity Metrics Control): Update link to
6053 the Watson/McCabe paper.
6055 2011-04-23 Jim Meyering <meyering@redhat.com>
6057 * gnat_ugn.texi (Examples of gnatxref Usage): Fix typo: s/it it/it is/
6059 2011-04-22 Eric Botcazou <ebotcazou@adacore.com>
6061 * gcc-interface/decl.c (make_packable_type): Copy DECL_PARALLEL_TYPE
6064 2011-04-22 Eric Botcazou <ebotcazou@adacore.com>
6066 * gcc-interface/gigi.h (create_subprog_decl): Add ARTIFICIAL_FLAG
6068 * gcc-interface/utils.c (create_subprog_decl): Likewise. Set
6069 DECL_ARTIFICIAL and DECL_NO_INLINE_WARNING_P on the DECL accordingly.
6070 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: Add
6071 ARTIFICIAL_FLAG local variable and pass it to create_subprog_decl.
6072 <all>: Do not set flags on the reused DECL node coming from an alias.
6073 Set DECL_IGNORED_P on the DECL node built for subprograms if they
6074 don't need debug info here...
6075 * gcc-interface/trans.c (Subprogram_Body_to_gnu): ...and not here.
6076 (gigi): Adjust calls to create_subprog_decl.
6077 (build_raise_check): Likewise.
6078 (establish_gnat_vms_condition_handler): Likewise.
6079 (Compilation_Unit_to_gnu): Likewise.
6080 (gnat_to_gnu): Likewise.
6082 2011-04-21 Eric Botcazou <ebotcazou@adacore.com>
6084 * gcc-interface/Makefile.in (NO_SIBLING_ADAFLAGS): Always define.
6085 (NO_REORDER_ADAFLAGS): New variable.
6086 (EXTRA_GNATTOOLS): Always define.
6087 (../stamp-gnatlib1-$(RTSDIR): Copy tsystem.h.
6088 Clean up and adjust list of files compiled with special options.
6089 * gcc-interface/Make-lang.in: Likewise.
6090 (ada/decl.o): Cosmetical change.
6091 (ada/misc.o): Remove dependency on $(PLUGIN_H).
6093 2011-04-20 Jim Meyering <meyering@redhat.com>
6095 * initialize.c (__gnat_initialize): Remove useless if-before-free.
6097 2011-04-17 Eric Botcazou <ebotcazou@adacore.com>
6099 * gcc-interface/Make-lang.in (gnatbind): Replace $(ALL_CFLAGS) with
6100 $(CFLAGS) on the link line.
6102 2011-04-17 Eric Botcazou <ebotcazou@adacore.com>
6104 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Function>: Declare the
6105 padded type built for the return type if it is unconstrained.
6107 2011-04-14 Nathan Froyd <froydnj@codesourcery.com>
6109 * gcc-interface/utils.c (gnat_poplevel): Use block_chainon.
6111 2011-04-12 Nathan Froyd <froydnj@codesourcery.com>
6113 * gcc-interface/ada-tree.h (union lang_tree_node): Check for TS_COMMON
6114 before calling TREE_CHAIN.
6115 * gcc-interface/misc.c (gnat_init_ts): New function.
6116 (LANG_HOOKS_INIT_TS): Define.
6118 2011-04-12 Martin Jambor <mjambor@suse.cz>
6120 * gcc-interface/utils.c (end_subprog_body): Call cgraph_get_create_node
6121 instead of cgraph_node.
6123 2011-04-08 Eric Botcazou <ebotcazou@adacore.com>
6125 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Procedure>: Set minimum
6126 alignment on fields of the RETURN type built for the Copy-In Copy-Out
6129 2011-04-08 Eric Botcazou <ebotcazou@adacore.com>
6131 * gcc-interface/trans.c (Identifier_to_gnu): Do not return initializers
6132 of aggregate types that contain a placeholder.
6134 2011-04-08 Nathan Froyd <froydnj@codesourcery.com>
6136 * gcc-interface/utils.c (handle_sentinel_attribute): Don't use
6138 (handle_type_generic_attribute): Likewise.
6140 2011-04-04 Eric Botcazou <ebotcazou@adacore.com>
6143 * s-oscons-tmplt.c (MSG_WAITALL): Fix thinko in previous change.
6145 2011-04-04 Kai Tietz <ktietz@redhat.com>
6148 * s-oscons-tmplt.c (MSG_WAITALL): Define it for native windows targets
6151 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
6153 * gcc-interface/utils2.c (build_allocator): In the unconstrained array
6154 type case, do not strip a padding type around the array type.
6156 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
6158 * gcc-interface/utils.c (update_pointer_to): Finalize named pointer
6161 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
6163 * gcc-interface/lang.opt (feliminate-unused-debug-types): Delete.
6164 * gcc-interface/misc.c (gnat_handle_option): Remove special handling
6165 code for -feliminate-unused-debug-types.
6166 (gnat_post_options): Likewise.
6168 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
6170 * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
6171 declaration of a pointer type, then set DECL_ORIGINAL_TYPE to a
6174 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
6176 * gcc-interface/decl.c (gnat_to_gnu_entity): Do not force the
6177 DECL_ARTIFICIAL flag on enumeration types.
6179 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
6181 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: Do not make
6182 fat pointer types artificial unconditionally.
6183 <E_Array_Subtype>: Attach the base array type as a parallel type if it
6186 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
6188 * gcc-interface/gigi.h (get_dummy_type): Declare.
6189 (build_dummy_unc_pointer_types): Likewise.
6190 (finish_fat_pointer_type): Likewise.
6191 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: If a dummy
6192 fat pointer type has been built, complete it in place.
6193 <E_Access_Type>: Call build_dummy_unc_pointer_types to build dummy fat
6194 and thin pointers. Remove useless variable.
6195 (finish_fat_pointer_type): Make global and move to...
6196 * gcc-interface/utils.c (finish_fat_pointer_type): ...here.
6197 (get_dummy_type): New function.
6198 (build_dummy_unc_pointer_types): Likewise.
6199 (gnat_pushdecl): Propage the name to the anonymous variants only.
6200 (update_pointer_to): Only adjust the pointer types in the unconstrained
6203 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
6205 * gcc-interface/ada-tree.h (DECL_TAFT_TYPE_P): New flag.
6206 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Incomplete_Type>: Set it
6207 if this is a Taft amendment type and the full declaration is available.
6208 * gcc-interface/trans.c (process_type): Likewise.
6209 If there is an old type, mark the new one as used if DECL_TAFT_TYPE_P.
6210 (process_freeze_entity): Likewise.
6211 * gcc-interface/utils.c (dummy_global): New static variable.
6212 (gnat_write_global_declarations): If there are types declared as used
6213 at the global level, insert them in the global hash table.
6215 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
6217 * gcc-interface/gigi.h (record_builtin_type): Add ARTIFICIAL_P param.
6218 * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
6219 declaration of an array type, then set DECL_ORIGINAL_TYPE to a distinct
6221 (record_builtin_type): Add ARTIFICIAL_P parameter. Set DECL_ARTIFICIAL
6222 flag of the type accordingly.
6223 * gcc-interface/trans.c (gigi): Adjust calls to record_builtin_type.
6225 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
6227 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
6228 finalizing types when updating the pointers to the designated type.
6229 <all>: Finalize the deferred types even if we didn't defer processing
6230 of incomplete types in this invocation.
6232 2011-04-01 Olivier Hainque <hainque@adacore.com>
6233 Nicolas Setton <setton@adacore.com>
6234 Eric Botcazou <ebotcazou@adacore.com>
6236 * gcc-interface/misc.c (gnat_descriptive_type): New function.
6237 (LANG_HOOKS_DESCRIPTIVE_TYPE): Redefine to gnat_descriptive_type.
6239 2011-03-28 Kai Tietz <ktietz@redhat.com>
6241 * gcc-interface/Makefile.in (SO_LIB): Handle multilib build for native
6243 (EH_MECHANISM): Use GCC exception mechanism for native Windows targets.
6244 * system-mingw.ads (System): Change ZCX_By_Default default to True.
6246 * raise-gcc.c (PERSONALITY_FUNCTION): Add prototype.
6248 2011-03-28 Tristan Gingold <gingold@adacore.com>
6251 * gcc-interface/Make-lang.in (ada/b_gnat1.adb): Replace ada/b_gnat1.c.
6252 Use ada output of gnatbind.
6253 (ada/b_gnatb.adb): Ditto.
6254 (ada/b_gnat1.o, ada/b_gnatb.o): New rules.
6255 (ada.mostlyclean, ada.stage1)
6256 (ada.stage2, ada.stage3, ada.stage4, ada.stageprofile)
6257 (ada.stagefeedback): Adjust.
6258 * gcc-interface/Makefile.in (b_gnatl.adb): Replace b_gnatl.c.
6259 Use ada output of gnatbind.
6260 (b_gnatm.adb): Ditto.
6261 (b_gnatl.o, b_gnatm.o): New rules.
6263 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
6265 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
6266 for the padded type built to support a specified size or alignment.
6268 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
6270 * gcc-interface/gigi.h (finalize_from_with_types): Adjust comment.
6271 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
6272 unconditionally to the end of the unit when the designated type is
6274 <all>: Rename local variable. Attempt to un-defer types only and do it
6275 for limited_with'ed types as well.
6276 (finalize_from_with_types): Adjust comment. Rename variable and tidy.
6277 * gcc-interface/trans.c (Compilation_Unit_to_gnu): Use GNAT_UNIT
6278 consistently and remove redundant call to finalize_from_with_types.
6280 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
6282 * inline.adb (Back_End_Cannot_Inline): Lift restriction on calls to
6283 subprograms without a previous spec declared in the same unit.
6284 * gcc-interface/trans.c (Compilation_Unit_to_gnu): Process inlined
6285 subprograms at the end of the unit instead of at the beginning.
6286 * gcc-interface/utils.c (create_subprog_decl): Check that the entity
6287 isn't public for the special handling of non-inline functions nested
6288 inside inline external functions.
6290 2011-03-25 Jeff Law <law@redhat.com>
6292 * gcc-interface/utils.c (def_fn_type): Add missing va_end.
6294 2011-03-24 Eric Botcazou <ebotcazou@adacore.com>
6296 * einfo.ads (Size_Depends_On_Discriminant): Adjust description.
6297 * layout.adb (Compute_Size_Depends_On_Discriminant): New procedure
6298 to compute Set_Size_Depends_On_Discriminant.
6299 (Layout_Type): Call it on array types in back-end layout mode.
6300 * sem_util.adb (Requires_Transient_Scope): Return true for array
6301 types only if the size depends on the value of discriminants.
6302 * gcc-interface/utils2.c (build_binary_op) <MODIFY_EXPR>: Use the RHS
6303 type if the RHS is a call to a function that returns an unconstrained
6304 type with default discriminant.
6306 2011-03-24 Eric Botcazou <ebotcazou@adacore.com>
6308 * gcc-interface/trans.c (gnat_to_gnu): Remove obsolete case of
6309 non-conversion to the nominal result type at the end.
6311 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
6313 * gcc-interface/trans.c (create_temporary): New function taken from...
6314 (create_init_temporary): ...here. Call it.
6315 (call_to_gnu): Create the temporary for the return value early, if any.
6316 Create it for a function with copy-in/copy-out parameters if there is
6317 no target; in other cases of copy-in/copy-out, use another temporary.
6318 Push the new binding level lazily. Add and rename local variables.
6320 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
6322 * gcc-interface/decl.c (validate_size): Improve comments and tweak
6324 (set_rm_size): Likewise.
6326 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
6328 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
6329 for the padded type built in order to support a specified alignment.
6330 Fix incorrect formatting.
6332 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
6335 * gcc-interface/decl.c (elaborate_expression_1): Localize GNU_DECL.
6337 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
6339 * gcc-interface/decl.c (components_to_record): Add REORDER parameter,
6340 rename DEBUG_INFO_P into DEBUG_INFO and move P_GNU_REP_LIST parameter
6341 to the end of the list. Adjust recursive call. Rename local variable.
6342 If REORDER is true, reorder components of the record type.
6343 (gnat_to_gnu_entity): Pass OK_To_Reorder_Components flag as argument to
6344 components_to_record and adjust the parameter list.
6346 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
6348 * gcc-interface/decl.c (elaborate_expression_1): When optimization is
6349 disabled, use the variable for bounds of loop iteration scheme.
6351 2011-03-21 Kai Tietz <ktietz@redhat.com>
6354 * gcc-interface/utils.c (gnat_internal_attribute_table): Add column.
6356 2011-03-17 Eric Botcazou <ebotcazou@adacore.com>
6358 * gcc-interface/decl.c (elaborate_expression_1): Try harder to find
6359 out whether the expression is read-only. Short-circuit placeholder
6360 case and rename a couple of local variables.
6362 2011-03-17 Eric Botcazou <ebotcazou@adacore.com>
6364 * gcc-interface/gigi.h (smaller_form_type_p): Declare.
6365 * gcc-interface/trans.c (smaller_form_type_p): Make global and move...
6366 * gcc-interface/utils.c (smaller_form_type_p): ...to here.
6367 (convert): Deal with conversions from a smaller form type specially.
6369 2011-02-14 Eric Botcazou <ebotcazou@adacore.com>
6371 * gcc-interface/misc.c (gnat_init_options): Do not concatenate -I and
6372 its argument, except for the special -I- switch.
6374 2011-02-12 Gerald Pfeifer <gerald@pfeifer.com>
6376 * gnat_ugn.texi (Compiling Different Versions of Ada): Update link to
6379 2011-02-08 Eric Botcazou <ebotcazou@adacore.com>
6381 * gcc-interface/Makefile.in (x86-64 darwin): Handle multilibs.
6383 2011-02-03 Eric Botcazou <ebotcazou@adacore.com>
6385 * gcc-interface/gigi.h (fill_vms_descriptor): Take GNU_TYPE instead of
6387 * gcc-interface/utils2.c (fill_vms_descriptor): Move from here to...
6388 * gcc-interface/utils.c (fill_vms_descriptor): ...here. Take GNU_TYPE
6389 instead of GNAT_FORMAL. Protect the expression against multiple uses.
6390 Do not generate the check directly, instead instantiate the template
6391 check present in the descriptor.
6392 (make_descriptor_field): Move around.
6393 (build_vms_descriptor32): Build a template check in the POINTER field.
6394 (build_vms_descriptor): Remove useless suffixes.
6395 * gcc-interface/trans.c (call_to_gnu): Adjust fill_vms_descriptor call.
6397 2011-01-26 Eric Botcazou <ebotcazou@adacore.com>
6400 * targext.c: Include target files if IN_RTS is defined.
6402 2011-01-26 Richard Guenther <rguenther@suse.de>
6405 * targext.c: Include config.h.
6406 * gcc-interface/Make-lang.in (ada/targext.o): Add $(CONFIG_H)
6409 2011-01-04 Pascal Obry <obry@adacore.com>
6410 Eric Botcazou <ebotcazou@adacore.com>
6412 * gcc-interface/decl.c: Disable Stdcall convention handling for 64-bit.
6414 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
6416 * gcc-interface/trans.c (Case_Statement_to_gnu): Put the SLOC of the
6417 end-of-case on the end label and its associated gotos, if any.
6419 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
6421 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Evaluate the
6422 expressions of the parameter cache within the statement group of
6425 2011-01-04 Olivier Hainque <hainque@adacore.com>
6426 Eric Botcazou <ebotcazou@adacore.com>
6428 * gcc-interface/trans.c (BLOCK_SOURCE_END_LOCATION): Provide default.
6429 (set_end_locus_from_node): New function.
6430 (Subprogram_Body_to_gnu): Use it to mark both the inner BIND_EXPR we
6431 make and the function end_locus.
6432 (Compilation_Unit_to_gnu): Call it instead of a straight Sloc_to_locus
6433 for the elaboration subprogram.
6434 (set_gnu_expr_location_from_node) <default case>: Use it to attempt to
6435 set the end_locus of the expression as well.
6437 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
6440 * gcc-interface/trans.c (Identifier_to_gnu): In SJLJ mode, do not make
6441 variables that are referenced in exception handlers volatile.
6445 Copyright (C) 2011 Free Software Foundation, Inc.
6447 Copying and distribution of this file, with or without modification,
6448 are permitted in any medium without royalty provided the copyright
6449 notice and this notice are preserved.