1 2011-08-03 Emmanuel Briot <briot@adacore.com>
3 * prj-tree.ads: Remove unused variable.
5 2011-08-03 Yannick Moy <moy@adacore.com>
7 * restrict.adb (Restriction_Msg): set "SPARK" all in upper case for
8 issuing messages related to SPARK restriction violation.
10 2011-08-03 Ed Schonberg <schonberg@adacore.com>
12 * sem_ch6.adb: guard against error nodes in return statements.
14 2011-08-03 Arnaud Charlet <charlet@adacore.com>
16 * errout.adb (Error_Msg_Internal): the main unit has not been read yet,
17 a warning can only appear on a configuration file, so emit warning
18 without further checks.
20 2011-08-03 Arnaud Charlet <charlet@adacore.com>
22 * s-interr.ads: add overriding keyword.
24 2011-08-03 Geert Bosch <bosch@adacore.com>
26 * exp_attr.adb: Fix minor typo.
28 2011-08-03 Ed Schonberg <schonberg@adacore.com>
30 * par-ch4.adb: improve error recovery.
32 2011-08-03 Emmanuel Briot <briot@adacore.com>
34 * prj-part.adb, prj-part.ads, prj-makr.adb, prj-pars.adb, prj-conf.adb,
35 prj-env.adb (Prj.Part.Parse): change parameter Always_Errout_Finalize
38 2011-08-03 Emmanuel Briot <briot@adacore.com>
40 * prj-dect.adb (Parse_Attribute_Declaration): make sure we can use
41 "external" as an attribute name in aggregate projects.
43 2011-08-03 Jose Ruiz <ruiz@adacore.com>
45 * s-taprop-vxworks.adb: (Create_Task, Initialize): Ada 2012 pragma CPU
46 uses CPU numbers starting 1, while VxWorks uses CPU numbers starting
47 from 0, so we need to adjust.
49 2011-08-03 Emmanuel Briot <briot@adacore.com>
51 * prj-proc.adb, prj-ext.adb, prj-ext.ads, makeutl.adb, prj-tree.adb,
52 prj-tree.ads, gnatcmd.adb, clean.adb (External_References): new type.
54 2011-08-03 Yannick Moy <moy@adacore.com>
56 * sem_ch6.adb (New_Overloaded_Entity): only issue error for SPARK
57 restriction on overloaded entity if the entity is not an operator.
59 2011-08-03 Yannick Moy <moy@adacore.com>
61 * sem_ch7.adb, sem_res.adb, sem_attr.adb, restrict.adb,
62 restrict.ads: Rename remaining Check_Formal_Restriction* into
63 Check_SPARK_Restriction*.
65 2011-08-03 Emmanuel Briot <briot@adacore.com>
67 * prj-proc.adb, prj-part.adb, prj.adb, prj.ads, prj-nmsc.adb,
68 prj-nmsc.ads, prj-err.adb (Project_Data): now discriminated on its
70 (Project_Empty): removed
71 (Empty_Project): new parameter Qualifier
72 This is used to have fields specific to aggregate projects, cleaner
73 New field to store the list of aggregated projects.
74 (Check_Aggregate_Project): removed
75 (Process_Aggregated_Projects, Free): new subprograms.
77 2011-08-03 Olivier Hainque <hainque@adacore.com>
79 * tracebak.c (STOP_FRAME ppc AIX): Stop at null return address as well.
81 2011-08-03 Ed Schonberg <schonberg@adacore.com>
83 * sem_ch8.adb (Analyze_Object_Renaming): if the renamed object is an
84 explicit dereference of an unconstrained type, create a constrained
85 subtype for it, as is done for function calls that return an
88 2011-08-03 Thomas Quinot <quinot@adacore.com>
90 * g-pehage.adb (Finalize): Avoid possible double-free.
92 2011-08-03 Steve Baird <baird@adacore.com>
94 * exp_attr.adb (Expand_N_Attribute_Reference): Don't expand
95 Elab_Spec/Body attrs in CodePeer_Mode.
97 2011-08-03 Javier Miranda <miranda@adacore.com>
99 * exp_aggr.adb (Flatten): Convert to positional form aggregates whose
100 low bound is not known at compile time but they have no others choice.
101 Done because in this case the bounds can be obtained directly from the
104 2011-08-03 Ed Falis <falis@adacore.com>
106 * s-tasinf-vxworks.ads: Update comment to reflect 0 indexing of CPUs
107 on VxWorks SMP. Remove unusable constant ANY_CPU.
109 2011-08-03 Emmanuel Briot <briot@adacore.com>
111 * gnatcmd.adb, make.adb, prj-part.adb, prj-part.ads, prj-makr.adb,
112 clean.adb, prj-nmsc.adb, prj-pars.adb, prj-conf.adb, prj-env.adb,
113 prj-env.ads (Prj.Env.Initialize_Default_Project_Path,
114 Prj.Env.Initialize_Empty): new subprograms
115 (Get_Env, Find_Project): remove parameter Target_Name.
117 2011-08-03 Gary Dismukes <dismukes@adacore.com>
119 * sem_ch3.adb (Build_Derived_Record_Type): Test the Derive_Subps formal
120 as a condition for the delayed call to Derived_Subprograms done for the
121 case of the rewriting of a derived type that constrains the
122 discriminants of its parent type.
123 Avoids redundant subprogram derivations for private subtype derivations.
125 2011-08-03 Javier Miranda <miranda@adacore.com>
127 * exp_aggr.adb (Init_Hidden_Discriminants): New subprogram of
128 Build_Record_Aggr_Code.
129 (Build_Record_Aggr_Code): Add missing support to initialize hidden
130 discriminants in extension aggregates.
132 2011-08-03 Emmanuel Briot <briot@adacore.com>
134 * prj-pp.adb (Print): also output project qualifiers, since in
135 particular "aggregate" is mandatory in an aggregate project.
137 2011-08-03 Emmanuel Briot <briot@adacore.com>
139 * prj-part.adb, prj.adb, prj.ads, prj-nmsc.adb, prj-env.adb:
140 (Debug_Output): new function.
142 2011-08-03 Eric Botcazou <ebotcazou@adacore.com>
144 * gnat_ugn.texi: Document -Wstack-usage.
145 * gcc-interface/misc.c (enumerate_modes): Add guard for ghost FP modes.
147 2011-08-03 Thomas Quinot <quinot@adacore.com>
149 * sem_prag.adb Issue an error (not a warning) when a C++ type does not
150 have keyword LIMITED.
152 2011-08-03 Yannick Moy <moy@adacore.com>
154 * alfa.adb, alfa.ads, alfa_test.adb: New files.
155 * ali.adb (Known_ALI_Lines): add 'C' lines (SCO) and 'F' lines (ALFA)
156 (Scan_ALI): do not issue a fatal error if parsing known lines after Xref
157 section (does not happen in compiler, only if code directly calls
159 * get_alfa.adb, get_alfa.ads: New files.
160 * lib-writ.adb, lib-writ.ads (Write_ALI): output ALFA information if
162 * lib-xref-alfa.adb: New file.
163 * lib-xref.adb, lib-xref.ads
164 (Xref_Entry): redefine information needed in cross-references for ALFA.
165 Push ALFA treatments in separated local package.
166 (Enclosing_Subpragram_Or_Package): treat specially subprogram
167 identifiers. Return entity of package body instead of spec. Return
168 Empty for a scope with no location.
169 (Generate_Reference): adapt to new components for ALFA information.
170 Remove the need for D references on definitions.
171 (Is_Local_Reference): moved to ALFA local package
172 (Output_References): extract subfunction as Extract_Source_Name
173 (Output_Local_References): remove procedure, replaced by filtering of
174 cross-references in package ALFA and printing in Put_ALFA.
175 (Write_Entity_Name): remove procedure
176 * lib.adb, lib.ads (Extract_Source_Name): extract here function to
177 print exact name of entity as it appears in source file
178 (Unit_Ref_Table): make type public for use in Lib.Xref.ALFA
179 * put_alfa.adb, put_alfa.ads: New files.
180 * xref_lib.adb (Search_Xref): protect read of cross-references against
181 reading other sections of the ALI file, in gnatxref
182 (Search): protect read of cross-references against reading other
183 sections of the ALI file, in gnatfind.
184 * gcc-interface/Make-lang.in: Update dependencies.
186 2011-08-03 Thomas Quinot <quinot@adacore.com>
188 * sem_ch3.adb: Minor reformatting.
190 2011-08-03 Jose Ruiz <ruiz@adacore.com>
192 * s-inmaop-vxworks.adb (Setup_Interrupt_Mask): Do nothing instead of
193 raising an exception.
195 2011-08-03 Ed Schonberg <schonberg@adacore.com>
197 * sem_res.adb (Set_String_Literal_Subtype): if index type is an integer
198 type, always use 1 as the lower bound or string, even if lower bound of
199 context is not static, to handle properly null strings in a non-static
202 2011-08-03 Bob Duff <duff@adacore.com>
204 * sem_prag.adb (Resolve_Aggregate): An array aggregate with 'others' is
205 always legal on the right-hand side of an assignment statement; there
206 is always an applicable index constraint in this case. Therefore, the
207 check for Pkind = N_Assignment_Statement is now unconditional -- it
208 doesn't depend on whether Is_Constrained (Typ).
210 2011-08-03 Robert Dewar <dewar@adacore.com>
212 * exp_ch5.adb, sem_prag.adb, exp_ch4.adb: Minor reformatting.
214 2011-08-03 Ed Schonberg <schonberg@adacore.com>
216 * sem_ch3.adb (Build_Itype_Reference): do not create an itype reference
217 for an itype created within a generic unit.
219 2011-08-03 Eric Botcazou <ebotcazou@adacore.com>
221 * gnat_ugn.texi (Switches for gcc): Make it clearer that -fno-inline
222 suppresses all inlining.
224 2011-08-03 Robert Dewar <dewar@adacore.com>
226 * sem_ch3.adb, sem_res.adb, exp_ch13.adb, exp_disp.adb,
227 exp_aggr.adb: Minor reformatting.
229 2011-08-03 Thomas Quinot <quinot@adacore.com>
231 * exp_ch5.adb (Expand_N_Assignment_Statement): Do not force inlining of
232 tagged assignment when discriminant checks are suppressed. This is
233 useless and extremely costly in terms of static stack usage.
235 2011-08-03 Bob Duff <duff@adacore.com>
237 * sem_prag.adb (Get_Base_Subprogram): Do not follow Alias for instances
238 of generics, because this leads to the wrong entity in the wrong scope,
239 causing (e.g.) pragma Export_Procedure to get an error if the entity is
241 (Process_Interface_Name): Follow Alias for instances of generics, to
242 correct for the above change.
244 2011-08-03 Ed Schonberg <schonberg@adacore.com>
246 * exp_ch4.adb (Expand_N_Selected_Component): If the discriminant value
247 is an integer literal it is always safe to replace the reference. In
248 addition, if the reference appears in the generated code for an object
249 declaration it is necessary to copy because otherwise the reference
250 might be to the uninitilized value of the discriminant of the object
253 2011-08-03 Pascal Obry <obry@adacore.com>
255 * adaint.c (__gnat_is_executable_file_attr): Fix Win32 circuitry when no
256 ACL used, in this case we want to check for ending .exe, not .exe
257 anywhere in the path.
259 2011-08-03 Sergey Rybin <rybin@adacore.com>
261 * tree_io.ads (ASIS_Version_Number): Update because of the changes in
262 the tree structure (semantic decoration of references to record
265 2011-08-03 Gary Dismukes <dismukes@adacore.com>
267 * sem_aggr.adb (Analyze_Array_Aggregate): When checking the discrete
268 choices of a named array aggregate, bail out when any choices are
269 marked as Errors_Posted.
271 2011-08-03 Ed Schonberg <schonberg@adacore.com>
273 * exp_ch13.adb (Expand_N_Freeze_Entity): cleanup determination of scope
274 in which entity is frozen, to handle properly loop variables in
277 2011-08-03 Ed Schonberg <schonberg@adacore.com>
279 * sem_res.adb (Set_String_Literal_Subtype): if the lower bound of the
280 subtype is not static, compute the upper bound using attributes, to
281 handle properly index types that are not integer types.
283 2011-08-03 Bob Duff <duff@adacore.com>
285 * gnat_rm.texi, gnat_ugn.texi: Fix some dangling URLs.
286 Update copyright notice.
288 2011-08-03 Ed Schonberg <schonberg@adacore.com>
290 * sem_ch3.adb (Build_Discriminant_Constraints): Only use
291 Original_Discriminant if within an instance.
292 * sem_ch4.adb (Analyze_Selected_Component): Ditto.
294 2011-08-03 Thomas Quinot <quinot@adacore.com>
296 * einfo.ads: Minor reformatting.
298 2011-08-03 Ed Schonberg <schonberg@adacore.com>
300 * exp_disp.adb (Check_Premature_Freezing): diagnose the presence of a
301 composite type with an unfrozen subcomponent, in the profile of a
304 2011-08-03 Robert Dewar <dewar@adacore.com>
306 * sem_util.ads, exp_aggr.adb, exp_ch3.adb: Minor reformatting.
308 2011-08-03 Ed Schonberg <schonberg@adacore.com>
310 * sem_ch3.adb (Analyze_Object_Declaration): if a constant object of an
311 unconstrained type with discriminants is initialized with an aggregate,
312 use the constrained subtype of the aggregate as the type of the object,
313 because it is immutable, and this allows the back-end to generate no
314 code for the object declaration.
316 2011-08-03 Robert Dewar <dewar@adacore.com>
318 * exp_ch4.adb (Optimize_Length_Check): Fix bad handling of case where
319 comparison operand is variable, and turns out to be zero or negative.
321 2011-08-03 Javier Miranda <miranda@adacore.com>
324 (Expand_Dispatching_Constructor_Call): Disable expansion of
325 code required for native targets. Done to avoid generating
326 references to unavailable runtime entities in VM targets.
328 (Expand_N_Object_Declaration): Add missing support to handle
329 the explicit initialization of class-wide interface objects.
332 2011-08-03 Matthew Heaney <heaney@adacore.com>
334 * a-cobove.adb (Merge): Move source onto target, instead of using Assign
336 2011-08-03 Matthew Heaney <heaney@adacore.com>
338 * a-cbdlli.adb (Splice): move source items from first to last
340 2011-08-03 Yannick Moy <moy@adacore.com>
342 * sem_util.ads: comment added.
344 2011-08-03 Javier Miranda <miranda@adacore.com>
347 (Expand_Record_Aggregate): In VM targets disable the expansion into
348 assignments of aggregates whose type is not known at compile time.
350 2011-08-03 Ed Schonberg <schonberg@adacore.com>
352 * exp_ch9.adb (Build_Renamed_Formal_Declaration): common procedure for
353 protected entries and task entries, to build the proper renaming
354 declaration for entry formals, used in debugging.
355 * exp_ch2.adb (Expand_Entry_Parameter): handle task and entry
356 parameters in the same way.
358 2011-08-02 Robert Dewar <dewar@adacore.com>
360 * a-direct.adb, sinfo.ads, exp_ch9.adb, scng.adb, sem_util.adb,
361 sem_util.ads, restrict.ads, par-prag.adb: Minor reformatting and/or
364 2011-08-02 Robert Dewar <dewar@adacore.com>
366 * debug.adb: Debug flag d.P to suppress length comparison optimization
367 * exp_ch4.adb (Optimize_Length_Comparison): New routine to optimize
368 comparison of Length by comparing First/Last instead.
370 2011-08-02 Matthew Heaney <heaney@adacore.com>
372 * a-cobove.ads: Code clean up.
374 2011-08-02 Vincent Celier <celier@adacore.com>
376 * adaint.c (file_names_case_sensitive_cache): New static int.
377 (__gnat_get_file_names_case_sensitive): Cache the return value in
378 file_names_case_sensitive_cache at the first invocation, to avoid
379 multiple calls to getenv.
381 2011-08-02 Bob Duff <duff@adacore.com>
383 * sem_ch12.adb (Validate_Derived_Type_Instance): Implement AI05-0218-1.
385 2011-08-02 Yannick Moy <moy@adacore.com>
387 * sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_prag.adb, sem.ads,
388 sem_util.adb, sem_util.ads, sem_res.adb, sem_ch2.adb, sem_ch4.adb,
389 sem_ch6.adb, sem_ch11.adb: Add semantic flag In_Pre_Post_Expression to
390 indicate that we are in a precondition or postcondition. This is used in
391 Mark_Non_ALFA_Subprogram (renaming of Mark_Non_ALFA_Subprogram_Body) to
392 decide whether to flag the spec or body of the current subprogram as
395 2011-08-02 Fabien Chouteau <chouteau@adacore.com>
397 * impunit.adb: Add Ada.Execution_Time.Interrupts in the Ada2012 package
399 * a-extiin.ads: New file.
401 2011-08-02 Bob Duff <duff@adacore.com>
403 * a-direct.adb (Rename): Implement AI05-0231-1. In particular, Rename
404 now raises Name_Error instead of Use_Error in certain cases. The other
405 parts of this AI were already implemented properly.
407 2011-08-02 Vincent Celier <celier@adacore.com>
409 * link.c: Only import "auto-host.h" when building the gnattools.
411 2011-08-02 Yannick Moy <moy@adacore.com>
413 * sem_util.adb: Inter-unit inlining does not work for a subprogram
414 which calls a local subprogram, so extract subprogram
415 from Mark_Non_ALFA_Subprogram_Body.
417 2011-08-02 Javier Miranda <miranda@adacore.com>
420 (Extract_Dispatching_Call): If the type of the dispatching object is an
421 access type then return an explicit dereference in the Object out-mode
424 2011-08-02 Gary Dismukes <dismukes@adacore.com>
426 * sem_ch3.adb (Analyze_Subtype_Declaration): Generate range
427 compatibility checks for all indexes of an array subtype, not just the
428 first. Reset Has_Dynamic_Range_Check on the subtype before each
429 potential check to ensure that Insert_Range_Checks will not elide any
430 of the dynamic checks.
432 2011-08-02 Yannick Moy <moy@adacore.com>
434 * par-prag.ad (Process_Restrictions_Or_Restriction_Warnings): recognize
435 SPARK restriction at parsing time.
436 * scng.adb (Scan): Generate a token Tok_SPARK_Hide for a SPARK HIDE
437 directive only if the SPARK restriction is set for this unit.
439 2011-08-02 Yannick Moy <moy@adacore.com>
441 * sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_util.adb, sem_util.ads,
442 sem_res.adb, sem_ch2.adb, sem_ch4.adb, sem_ch6.adb,
443 sem_ch11.adb: Protect call to Current_Subprogram which might be costly
444 when repeated. Rename Current_Subprogram_Is_Not_In_ALFA into
445 Mark_Non_ALFA_Subprogram_Body.
446 Split body of Mark_Non_ALFA_Subprogram_Body to get body small and
449 2011-08-02 Yannick Moy <moy@adacore.com>
451 * sem_res.adb: Protect calls to Matching_Static_Array_Bounds which
454 2011-08-02 Robert Dewar <dewar@adacore.com>
456 * exp_ch9.adb, exp_sel.adb, restrict.ads, exp_disp.adb, erroutc.ads,
457 exp_ch3.adb: Minor reformatting.
459 2011-08-02 Emmanuel Briot <briot@adacore.com>
461 * adaint.c (__gnat_locate_exec_on_path): only returns executable
462 files, not any regular file.
463 (__gnat_locate_file_with_predicate): new subprogram.
465 2011-08-02 Yannick Moy <moy@adacore.com>
467 * sinfo.adb, sinfo.ads: Restrict the use of flags
468 Has_Dynamic_Length_Check and Has_Dynamic_Range_Check to expression
469 nodes, plus N_Subtype_Declaration for the 2nd one.
471 2011-08-02 Sergey Rybin <rybin@adacore.com>
473 * gnat_rm.texi: Ramification of pragma Eliminate documentation
474 - fix bugs in the description of Source_Trace;
475 - get rid of UNIT_NAME;
477 2011-08-02 Javier Miranda <miranda@adacore.com>
480 (Build_Dispatching_Requeue): Adding support for VM targets
481 since we cannot directly reference the Tag entity.
482 * exp_sel.adb (Build_K): Adding support for VM targets.
483 (Build_S_Assignment): Adding support for VM targets.
485 (Default_Prim_Op_Position): In VM targets do not restrict availability
486 of predefined interface primitives to compiling in Ada 2005 mode.
487 (Is_Predefined_Interface_Primitive): In VM targets this service is not
488 restricted to compiling in Ada 2005 mode.
489 (Make_VM_TSD): Generate code that declares and initializes the OSD
490 record. Needed to support dispatching calls through synchronized
493 (Make_Predefined_Primitive_Specs): Enable generation of predefined
494 primitives associated with synchronized interfaces.
495 (Make_Predefined_Primitive_Bodies): Enable generation of predefined
496 primitives associated with synchronized interfaces.
498 2011-08-02 Yannick Moy <moy@adacore.com>
500 * par-ch11.adb (P_Handled_Sequence_Of_Statements): mark a sequence of
501 statements hidden in SPARK if preceded by the HIDE directive
502 (Parse_Exception_Handlers): mark each exception handler in a sequence of
503 exception handlers as hidden in SPARK if preceded by the HIDE directive
504 * par-ch6.adb (P_Subprogram): mark a subprogram body hidden in SPARK
505 if starting with the HIDE directive
506 * par-ch7.adb (P_Package): mark a package body hidden in SPARK if
507 starting with the HIDE directive; mark the declarations in a private
508 part as hidden in SPARK if the private part starts with the HIDE
510 * restrict.adb, restrict.ads
511 (Set_Hidden_Part_In_SPARK): record a range of slocs as hidden in SPARK
512 (Is_In_Hidden_Part_In_SPARK): new function which returns whether its
513 argument node belongs to a part which is hidden in SPARK
514 (Check_SPARK_Restriction): do not issue violations on nodes in hidden
515 parts in SPARK; protect the possibly costly call to
516 Is_In_Hidden_Part_In_SPARK by a check that the SPARK restriction is on
517 * scans.ads (Token_Type): new value Tok_SPARK_Hide in enumeration
518 * scng.adb (Accumulate_Token_Checksum_GNAT_6_3,
519 Accumulate_Token_Checksum_GNAT_5_03): add case for new token
521 (Scan): recognize special comment starting with '#' and followed by
522 SPARK keyword "hide" as a HIDE directive.
524 2011-08-02 Yannick Moy <moy@adacore.com>
526 * types.ads, erroutc.ads: Minor reformatting.
528 2011-08-02 Vincent Celier <celier@adacore.com>
530 * link.c: Add response file support for cross platforms.
532 2011-08-02 Ed Schonberg <schonberg@adacore.com>
534 * sem_aggr.adb (Resolve_Array_Aggregate): when copying the expression
535 in an association, set parent field of copy before partial analysis.
536 * sem_res.adb (Resolve_Slice): create reference to itype only when
537 expansion is enabled.
539 2011-08-02 Yannick Moy <moy@adacore.com>
541 * einfo.adb, einfo.ads (Body_Is_In_ALFA, Set_Body_Is_In_ALFA): get/set
542 for new flag denoting which subprogram bodies are in ALFA
543 * restrict.adb, sem_ch7.adb: Update comment
544 * sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
545 sem_ch9.adb, sem_res.adb: Add calls to
546 Current_Subprogram_Body_Is_Not_In_ALFA on unsupported constructs.
547 * sem_ch6.adb (Analyze_Function_Return): add calls to
548 Current_Subprogram_Body_Is_Not_In_ALFA on return statement in the
549 middle of the body, and extended return.
550 (Check_Missing_Return): add calls to Set_Body_Is_In_ALFA with argument
551 False when missing return.
552 (Analyze_Subprogram_Body_Helper): initialize the flag Body_Is_In_ALFA
553 to True for subprograms whose spec is in ALFA. Remove later on the flag
554 on the entity used for a subprogram body when there exists a separate
556 * sem_util.adb, sem_util.ads (Current_Subprogram_Body_Is_Not_In_ALFA):
557 if Current_Subprogram is not Empty, set its flag Body_Is_In_ALFA to
558 False, otherwise do nothing.
560 2011-08-02 Robert Dewar <dewar@adacore.com>
562 * inline.adb, stand.ads, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
564 2011-08-02 Yannick Moy <moy@adacore.com>
566 * sem_ch4.ads: minor formatting.
568 2011-08-02 Yannick Moy <moy@adacore.com>
570 * sem_aggr.adb, err_vars.ads, sem_ch3.adb, sem_ch5.adb, sem_ch9.adb,
571 debug.adb, sem_util.adb, sem_res.adb, sem_attr.adb, gnat1drv.adb,
572 errout.adb, errout.ads, exp_ch6.adb, sem_ch4.adb, restrict.adb,
573 restrict.ads, sem_ch6.adb, sem_ch8.adb, sem_ch11.adb,
574 opt.ads: cleanup of SPARK mode
576 2011-08-02 Yannick Moy <moy@adacore.com>
578 * cstand.adb (Create_Standard): sets Is_In_ALFA component of standard
580 * einfo.adb, einfo.ads (Is_In_ALFA): add flag for all entities
581 (Is_In_ALFA, Set_Is_In_ALFA): new subprograms to access flag Is_In_ALFA
583 (Analyze_Object_Declaration): set Is_In_ALFA flag for objects
584 (Constrain_Enumeration): set Is_In_ALFA flag for enumeration subtypes
585 (Constrain_Integer): set Is_In_ALFA flag for integer subtypes
586 (Enumeration_Type_Declaration): set Is_In_ALFA flag for enumeration
588 (Set_Scalar_Range_For_Subtype): unset Is_In_ALFA flag for subtypes with
590 * sem_ch6.adb (Analyze_Return_Type): unset Is_In_ALFA flag for
591 functions whose return type is not in ALFA.
592 (Analyze_Subprogram_Specification): set Is_In_ALFA flag for subprogram
594 (Process_Formals): unset Is_In_ALFA flag for subprograms if a
595 parameter's type is not in ALFA.
596 * stand.ads (Standard_Type_Is_In_ALFA): array defines which standard
599 2011-08-02 Ed Schonberg <schonberg@adacore.com>
601 * sem_ch6 (Analyze_Expression_Function): treat the function as
602 Inline_Always, and introduce a subprogram declaration for it when it is
604 * inline.adb (Add_Inlined_Body): recognize bodies that come from
605 expression functions, so that the back-end can determine whether they
606 can in fact be inlined.
607 * sem_util.adb (Is_Expression_Function): predicate to determine whether
608 a function body comes from an expression function.
610 2011-08-02 Gary Dismukes <dismukes@adacore.com>
612 * sem_ch6.adb (Check_Conformance): Revise the check for nonconforming
613 null exclusions to test Can_Never_Be_Null on the anonymous access types
614 of the formals rather than testing the formals themselves. Exclude this
615 check in cases where the Old_Formal is marked as a controlling formal,
616 to avoid issuing spurious errors for bodies completing dispatching
617 operations (due to the flag not getting set on controlling access
618 formals in body specs).
619 (Find_Corresponding_Spec): When checking full and subtype conformance of
620 subprogram bodies in instances, pass Designated and E in that order, for
621 consistency with the expected order of the formals (New_Id followed by
624 2011-08-02 Robert Dewar <dewar@adacore.com>
626 * sem_ch8.adb: Minor reformatting.
628 2011-08-02 Ed Schonberg <schonberg@adacore.com>
630 * sem_ch8.adb (Analyze_Subprogram_Renaming): new procedure
631 Check_Class_Wide_Actual, to implement AI05-0071, on defaulted
632 primitive operations of class-wide actuals.
634 2011-08-02 Javier Miranda <miranda@adacore.com>
636 * exp_atag.ads, exp_atag.adb
637 (Build_Common_Dispatching_Select_Statements): Remove argument Loc
638 since its value is implicitly passed in argument Typ.
639 * exp_disp.adb (Make_Disp_Conditional_Select_Body,
640 Make_Disp_Timed_Select_Body): Remove Loc in calls to routine
641 Build_Common_Dispatching_Select_Statements.
643 2011-08-02 Robert Dewar <dewar@adacore.com>
645 * sem_ch3.adb, exp_atag.ads, get_scos.adb, get_scos.ads,
646 exp_disp.adb, lib-xref.adb, lib-xref.ads: Update comments.
649 2011-08-02 Robert Dewar <dewar@adacore.com>
651 * sem_res.adb: Minor reformatting.
652 * sem_prag.adb: Minor reformatting.
654 2011-08-02 Javier Miranda <miranda@adacore.com>
656 * exp_atag.adb, exp_atags.ads
657 (Build_Common_Dispatching_Select_Statement): Replace argument DT_Ptr
658 by the tagged type Entity. Required to use this routine in the VM
659 targets since we do not have available the Tag entity in the VM
662 (Expand_N_Subprogram_Body): Do not invoke Build_VM_TSDs if package
663 Ada.Tags has not been previously loaded.
665 (Expand_N_Package_Declaration, Expand_N_Package_Body): Do not invoke
666 Build_VM_TSDs if package Ada.Tags has not been previously loaded.
668 (Enclosing_Dynamic_Scope): Add missing support to handle the full
669 view of enclosing scopes. Required to handle enclosing scopes that
670 are synchronized types whose full view is a task type.
672 (Build_VM_TSDs): Minor code improvement to avoid generating and
673 analyzing lists with empty nodes.
674 (Make_Disp_Asynchronous_Select_Body): Add support for VM targets.
675 (Make_Disp_Conditional_Select_Body): Add support for VM targets.
676 (Make_Disp_Get_Prim_Op_Kind): Add support for VM targets.
677 (Make_Disp_Timed_Select_Body): Add support for VM targets.
678 (Make_Select_Specific_Data_Table): Add support for VM targets.
679 (Make_VM_TSD): Generate code to initialize the SSD structure of
682 2011-08-02 Yannick Moy <moy@adacore.com>
684 * lib-writ.adb (Write_ALI): when ALFA mode is set, write local
685 cross-references section in ALI.
686 * lib-xref.adb, lib-xref.ads (Xref_Entry): add components Sub
687 (enclosing subprogram), Slc (location of Sub) and Sun (unit number of
689 (Enclosing_Subprogram_Or_Package): new function to return the enclosing
690 subprogram or package entity of a node
691 (Is_Local_Reference_Type): new function returns True for references
692 selected in local cross-references.
693 (Lt): function extracted from Lt in Output_References
694 (Write_Entity_Name): function extracted from Output_References
695 (Generate_Definition): generate reference with type 'D' for definition
696 of objects (object declaration and parameter specification), with
697 appropriate locations and units, for use in local cross-references.
698 (Generate_Reference): update fields Sub, Slc and Sun. Keep newly created
699 references of type 'I' for initialization in object definition.
700 (Output_References): move part of function Lt and procedure
701 Write_Entity_Name outside of the body. Ignore references of types 'D'
702 and 'I' introduced for local cross-references.
703 (Output_Local_References): new procedure to output the local
704 cross-references sections.
705 (Lref_Entity_Status): new array defining whether an entity is a local
706 * sem_ch3.adb (Analyze_Object_Declaration): call Generate_Reference
707 with 'I' type when initialization expression is present.
708 * get_scos.adb, get_scos.ads: Correct comments and typos
710 2011-08-02 Javier Miranda <miranda@adacore.com>
712 * exp_ch6.adb (Expand_N_Subprogram_Body): Enable generation of TSDs in
714 * exp_ch7.adb (Expand_N_Package_Body): Enable generation of TSDs in
716 * exp_disp.adb (Build_VM_TSDs): No action needed if the runtime has no
719 2011-08-02 Vincent Celier <celier@adacore.com>
721 * prj-nmsc.adb (File_Found): New components Excl_File and Excl_Line
722 (No_Space_Img): New function
723 (Find_Excluded_Sources): When reading from a file, record the file name
724 and the line number for each excluded source.
725 (Mark_Excluded_Sources): When reporting an error, if the excluded
726 sources were read from a file, include file name and line number in
729 2011-08-02 Ed Schonberg <schonberg@adacore.com>
731 * sem_res.adb (Resolve_Call): implement rule in RM 12.5.1 (23.3/2).
733 2011-08-02 Robert Dewar <dewar@adacore.com>
735 * exp_ch7.adb exp_ch6.adb, exp_disp.adb: Minor reformatting
737 2011-08-02 Javier Miranda <miranda@adacore.com>
739 * exp_ch6.adb (Expand_N_Subprogram_Body): Temporarily restrict the
740 generation of TSDs to the DOTNET compiler.
741 * exp_ch7.adb (Expand_N_Package_Body): Temporarily restrict the
742 generation of TSDs to the DOTNET compiler.
744 2011-08-02 Javier Miranda <miranda@adacore.com>
746 * exp_disp.ads (Build_VM_TSDs): Build the runtime Type Specific Data
747 record of all the tagged types declared inside library level package
748 declarations, library level package bodies or library level subprograms.
749 * exp_disp.adb (Make_VM_TSD): New subprogram that builds the TSD
750 associated with a given tagged type.
751 (Build_VM_TSDs): New subprogram.
752 * exp_ch6.adb (Expand_N_Subprogram_Body): Generate TSDs records of main
753 compilation units that are subprograms.
754 * exp_ch7.adb (Expand_N_Package_Body): Generate TSDs of main
755 compilation units that are package bodies.
756 (Expand_N_Package_Declaration): Generate TSDs of the main compilation
757 units that are a package declaration or a package instantiation.
758 * exp_intr.adb (Expand_Dispatching_Constructor_Call): Minor code
759 reorganization to improve the error generated by the frontend when the
760 function Ada.Tags.Secondary_Tag is not available.
761 * rtsfind.ads (RE_Register_TSD): New runtime entity.
762 * exp_ch4.adb (Expand_N_Type_Conversion): Minor code cleanup.
764 2011-08-02 Javier Miranda <miranda@adacore.com>
766 * exp_disp.adb (Make_DT): Generate call to Check_TSD in Ada 2005 mode.
768 2011-08-02 Robert Dewar <dewar@adacore.com>
770 * s-imenne.ads: Minor reformatting.
772 2011-08-02 Robert Dewar <dewar@adacore.com>
774 * a-stunau.ads: Add pragma Suppress_Initialization for Big_String
775 * freeze.adb (Warn_Overlay): Don't warn if initialization suppressed
776 * s-stalib.ads: Add pragma Suppress_Initialization for Big_String
778 2011-08-02 Robert Dewar <dewar@adacore.com>
780 * einfo.ads (Materialize_Entity): Document this is only for renamings
781 * exp_ch3.adb (Expand_N_Object_Declaration): Make sure we generate
782 required debug information in the case where we transform the object
783 declaration into a renaming declaration.
784 * exp_ch4.adb (Expand_Concatenate): Generate debug info for result
786 * exp_dbug.ads (Debug_Renaming_Declaration): Document setting of
789 2011-08-02 Robert Dewar <dewar@adacore.com>
791 * einfo.ads, einfo.adb (Suppress_Initialization): Replaces
793 * exp_ch3.adb, exp_disp.adb, freeze.adb: Use
794 Suppress_Initialization/Initialization_Suppressed.
795 * gnat_rm.texi: New documentation for pragma Suppress_Initialization
796 * sem_aux.ads, sem_aux.adb (Initialization_Suppressed): New function
797 * sem_dist.adb: Use Suppress_Initialization/Initialization_Suppressed
798 * sem_prag.adb: New processing for pragma Suppress_Initialization.
800 2011-08-02 Robert Dewar <dewar@adacore.com>
802 * gnat_rm.texi, a-tags.ads, sem_prag.adb, sem_ch12.adb, exp_disp.adb:
805 2011-08-02 Ed Schonberg <schonberg@adacore.com>
807 * sem_prag.adb (Chain_PPC): Implement AI04-0230: null procedures can
808 only have inheritable classwide pre/postconditions.
810 2011-08-02 Javier Miranda <miranda@adacore.com>
812 * a-tags.ads, a-tags.adb (Check_TSD): New subprogram.
813 * rtsfind.ads (RE_Check_TSD): New runtime entity.
814 * exp_disp.adb (Make_DT): Generate call to the new runtime routine that
815 checks if the external tag of a type is the same as the external tag
816 of some other declaration.
818 2011-08-02 Thomas Quinot <quinot@adacore.com>
820 * s-taskin.ads: Minor reformatting.
822 2011-08-02 Emmanuel Briot <briot@adacore.com>
824 * g-comlin.adb (Display_Help): swap the order in which it prints the
825 short help and the general usage.
827 2011-08-02 Ed Schonberg <schonberg@adacore.com>
829 * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration): copy properly
830 the aspect declarations and attach them to the generic copy for
832 (Analyze_Subprogram_Instantiation): copy explicitly the aspect
833 declarations of the generic tree to the new subprogram declarations.
834 * sem_attr.adb (Check_Precondition_Postcondition): recognize
835 conditions that apply to a subprogram instance.
837 2011-08-02 Robert Dewar <dewar@adacore.com>
839 * gnat_rm.texi: Clarify doc on pragma Source_File_Name[_Project].
841 2011-08-02 Ed Schonberg <schonberg@adacore.com>
843 * sem_ch3.adb (Derived_Type_Declaration): When checking that a untagged
844 private type with a tagged full view is not derived in the immediate
845 scope of the partial view, (RM 7.3 (7)) use the scope of the base type.
847 2011-08-02 Robert Dewar <dewar@adacore.com>
849 * exp_ch4.adb: Minor reformatting.
851 2011-08-02 Ed Schonberg <schonberg@adacore.com>
853 * sem_ch5.adb (Analyze_Loop_Statement): If the iteration scheme is an
854 Ada2012 iterator, the loop will be rewritten during expansion into a
855 while loop with a cursor and an element declaration. Do not analyze the
856 body in this case, because if the container is for indefinite types the
857 actual subtype of the elements will only be determined when the cursor
858 declaration is analyzed.
860 2011-08-02 Arnaud Charlet <charlet@adacore.com>
862 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Ignore
863 size/alignment related attributes in CodePeer_Mode.
865 2011-08-02 Gary Dismukes <dismukes@adacore.com>
867 * sem_ch3.adb (Check_Ops_From_Incomplete_Type): Remove call to
868 Prepend_Element, since this can result in the operation getting the
869 wrong slot in the full type's dispatch table if the full type has
870 inherited operations. The incomplete type's operation will get added
871 to the proper position in the full type's primitives
872 list later in Sem_Disp.Check_Operation_From_Incomplete_Type.
873 (Process_Incomplete_Dependents): Add Is_Primitive test when checking for
874 dispatching operations, since there are cases where nonprimitive
875 subprograms can get added to the list of incomplete dependents (such
876 as subprograms in nested packages).
877 * sem_ch6.adb (Process_Formals): First, remove test for being in a
878 private part when determining whether to add a primitive with a
879 parameter of a tagged incomplete type to the Private_Dependents list.
880 Such primitives can also occur in the visible part, and should not have
881 been excluded from being private dependents.
882 * sem_ch7.adb (Uninstall_Declarations): When checking the rule of
883 RM05-3.10.1(9.3/2), test that a subprogram in the Private_Dependents
884 list of a Taft-amendment incomplete type is a primitive before issuing
885 an error that the full type must appear in the same unit. There are
886 cases where nonprimitives can be in the list (such as subprograms in
888 * sem_disp.adb (Derives_From): Use correct condition for checking that
889 a formal's type is derived from the type of the corresponding formal in
890 the parent subprogram (the condition was completely wrong). Add
891 checking that was missing for controlling result types being derived
892 from the result type of the parent operation.
894 2011-08-02 Yannick Moy <moy@adacore.com>
896 * errout.adb (First_Node): minor renaming
897 * restrict.adb (Check_Formal_Restriction): put restriction warning on
900 2011-08-02 Yannick Moy <moy@adacore.com>
902 * sem_res.adb (Resolve_Logical_Op): ensure N is a binary operator
903 before accessing operands.
904 * sem_util.adb (Is_SPARK_Initialization_Expr): follow original nodes to
905 decide whether an initialization expression respects SPARK rules, as
906 the plain node is the expanded one. This allows for more valid warnings
908 * gnat_rm.texi: Minor update.
910 2011-08-02 Arnaud Charlet <charlet@adacore.com>
912 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Revert
915 2011-08-02 Robert Dewar <dewar@adacore.com>
917 * sem_ch3.adb, sem_ch4.adb: Minor reformatting.
919 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
921 * exp_ch5.adb (Expand_Iterator_Loop): Reformatting. Wrap the original
922 loop statements and the element renaming declaration with a block when
923 the element type is controlled.
925 2011-08-02 Yannick Moy <moy@adacore.com>
927 * sinfo.ads: Minor formatting.
929 2011-08-02 Ed Schonberg <schonberg@adacore.com>
931 * sem_aggr.adb (Add_Association): if the association has a box and no
932 expression, use the Sloc of the aggregate itself for the new
934 * errout.adb (First_Node): Exclude nodes with no Sloc, and always use
937 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
939 * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and refactoring.
940 When a container is provided via a function call, generate a renaming
941 of the function result. This avoids the creation of a transient scope
942 and the premature finalization of the container.
943 * exp_ch7.adb (Is_Container_Cursor): Removed.
944 (Wrap_Transient_Declaration): Remove the supression of the finalization
945 of the list controller when the declaration denotes a container cursor,
948 2011-08-02 Yannick Moy <moy@adacore.com>
950 * restrict.adb (Check_Formal_Restriction): only issue a warning if the
951 node is from source, instead of the original node being from source.
953 (Resolve_Array_Aggregate): refine the check for a static expression, to
954 recognize also static ranges
955 * sem_ch3.adb, sem_ch3.ads (Analyze_Component_Declaration,
956 Array_Type_Declaration): postpone the test for the type being a subtype
957 mark after the type has been resolved, so that component-selection and
958 expanded-name are discriminated.
959 (Make_Index, Process_Range_Expr_In_Decl): add a parameter In_Iter_Schm
960 to distinguish the case of an iteration scheme, so that an error is
961 issed on a non-static range in SPARK except in an iteration scheme.
962 * sem_ch5.adb (Analyze_Iteration_Scheme): call Make_Index with
964 * sem_ch6.adb (Analyze_Subprogram_Specification): refine the check for
965 user-defined operators so that they are allowed in renaming
967 (Find_Selected_Component): refine the check for prefixing of operators
968 so that they are allowed in renaming. Move the checks for restrictions
969 on selector name after analysis discriminated between
970 component-selection and expanded-name.
971 * sem_res.adb (Resolve_Op_Concat_Arg): do not issue a warning on
972 concatenation argument of string type if it is static.
973 * sem_util.adb, sem_util.ads
974 (Check_Later_Vs_Basic_Declarations): add a new function
975 Is_Later_Declarative_Item to decice which declarations are allowed as
976 later items, in the two different modes Ada 83 and SPARK. In the SPARK
977 mode, add that renamings are considered as later items.
978 (Enclosing_Package): new function to return the enclosing package
979 (Enter_Name): correct the rule for homonyms in SPARK
980 (Is_SPARK_Initialization_Expr): default to returning True on nodes not
981 from source (result of expansion) to avoid issuing wrong warnings.
983 2011-08-02 Ed Schonberg <schonberg@adacore.com>
985 * errout.adb: On anything but an expression First_Node returns its
988 2011-08-02 Pascal Obry <obry@adacore.com>
990 * prj-proc.adb, make.adb, makeutl.adb: Minor reformatting.
992 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
994 * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and reorganization.
995 Set the associated loop as the related expression of internally
997 * exp_ch7.adb (Is_Container_Cursor): New routine.
998 (Wrap_Transient_Declaration): Supress the finalization of the list
999 controller when the declaration denotes a container cursor.
1001 2011-08-02 Yannick Moy <moy@adacore.com>
1003 * opt.ads (SPARK_Mode): update comment, SPARK_Mode only set through
1005 * par-ch3.adb (P_Delta_Constraint): remove check in SPARK mode that the
1006 expression is a simple expression. This check cannot be performed in
1007 the semantics, so just drop it.
1008 (P_Index_Or_Discriminant_Constraint): move check that the index or
1009 discriminant is a subtype mark to Analyze_Subtype_Declaration in the
1010 semantics. Other cases were previously checked in the semantics.
1011 * par-ch4.adb (P_Name): move checks that a selector name is not
1012 character literal or an operator symbol to Find_Selected_Component in
1014 * par-ch5.adb (Parse_Decls_Begin_End): move check that basic
1015 declarations are not placed after later declarations in a separate
1016 procedure in Sem_Util (possibly not the best choice?), to be used both
1017 during parsing, for Ada 83 mode, and during semantic analysis, for
1019 * par-endh.adb (Check_End): move check that end label is not missing
1020 to Process_End_Label in the semantics
1021 * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): remove
1022 the special case for SPARK restriction
1023 * par.adb: use and with Sem_Util, for use in Parse_Decls_Begin_End
1024 * restrict.adb, restrict.ads (Check_Formal_Restriction): add a
1025 parameter Force to issue the error message even on internal node (used
1026 for generated end label). Call Check_Restriction to check when an error
1027 must be issued. In SPARK mode, issue an error message even if the
1028 restriction is not set.
1029 (Check_Restriction): new procedure with an additional out parameter to
1030 inform the caller that a message has been issued
1031 * sem_aggr.adb: Minor modification of message
1032 * sem_attr.adb (Analyze_Attribute): call Check_Formal_Restriction
1033 instead of issuing an error message directly
1034 * sem_ch3.adb (Analyze_Declarations): move here the check that basic
1035 declarations are not placed after later declarations, by calling
1036 Check_Later_Vs_Basic_Declarations
1037 (Analyze_Subtype_Declaration): move here the check that an index or
1038 discriminant constraint must be a subtype mark. Change the check that
1039 a subtype of String must start at one so that it works on subtype marks.
1040 * sem_ch4.adb (Analyze_Call): move here the check that a named
1041 association cannot follow a positional one in a call
1042 * sem_ch5.adb (Check_Unreachable_Code): call Check_Formal_Restriction
1043 instead of issuing an error message directly
1044 * sem_ch8.adb (Find_Selected_Component): move here the check that a
1045 selector name is not a character literal or an operator symbol. Move
1046 here the check that the prefix of an expanded name cannot be a
1047 subprogram or a loop statement.
1048 * sem_util.adb, sem_util.ads (Check_Later_Vs_Basic_Declarations): new
1049 procedure called from parsing and semantics to check that basic
1050 declarations are not placed after later declarations
1051 (Process_End_Label): move here the check that end label is not missing
1053 2011-08-02 Arnaud Charlet <charlet@adacore.com>
1055 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Ignore enum
1056 representation clause in codepeer mode, since it confuses CodePeer and
1057 does not bring useful info.
1059 2011-08-02 Ed Falis <falis@adacore.com>
1061 * init.c: initialize fp hw on MILS.
1063 2011-08-02 Ed Schonberg <schonberg@adacore.com>
1065 * errout.adb (First_Node): for bodies, return the node itself (small
1066 optimization). For other nodes, do not check source_unit if the node
1067 comes from Standard.
1069 2011-08-02 Robert Dewar <dewar@adacore.com>
1071 * exp_ch3.adb: Minor comment additions.
1072 * sem_ch13.adb: Minor reformatting.
1074 2011-08-02 Pascal Obry <obry@adacore.com>
1076 * make.adb, makeutl.adb: Removes some superfluous directory separator.
1078 2011-08-02 Robert Dewar <dewar@adacore.com>
1080 * sem_attr.adb: Minor reformatting.
1082 2011-08-02 Robert Dewar <dewar@adacore.com>
1084 * einfo.adb (Has_Default_Aspect): Replaces Has_Default_Value
1085 (Has_Default_Component_Value): Removed
1086 * einfo.ads Comment updates
1087 (Has_Default_Aspect): Replaces Has_Default_Value
1088 (Has_Default_Component_Value): Removed
1090 (Expand_N_Freeze_Entity): Handle Default[_Component]_Value aspects
1092 (Build_Array_Init_Proc): Handle Default_[Component_]Value aspects
1093 (Get_Simple_Init_Val): Handle Default_Value aspect
1094 (Needs_Simple_Initialization): Handle Default_Value aspect
1095 * exp_ch3.ads: Needs_Simple_Initialization
1096 * freeze.adb (Freeze_Entity): Handle Default_[Component_]Value aspect
1097 * par-prag.adb (Pragma_Default[_Component]Value) Removed
1099 (Analyze_Aspect_Specifications): Fix Default[_Component]_Value aspects
1100 * sem_prag.adb (Pragma_Default[_Component]Value) Removed
1101 * snames.ads-tmpl (Pragma_Default[_Component]Value) Removed
1103 2011-08-02 Ed Schonberg <schonberg@adacore.com>
1105 * sem_ch5.adb (Analyze_Iterator_Specification): use base type to locate
1106 package containing iteration primitives.
1107 exp_ch5.adb (Expand_Iterator_Loop): ditto.
1109 2011-08-02 Ed Schonberg <schonberg@adacore.com>
1111 * sem_ch5.adb (Analyze_Iteration_Scheme): For an Ada2012 iterator with
1112 "of", pre-analyze expression in case it is a function call with
1113 finalization actions that must be placed ahead of the loop.
1114 * exp_ch5.adb (Expand_Iterator_Loop): If condition_actions are present
1115 on an Ada2012 iterator, insert them ahead of the rewritten loop.
1117 2011-08-02 Geert Bosch <bosch@adacore.com>
1119 * cstand.adb (Create_Float_Types): Only consider C's long double for
1120 Long_Long_Float, in addition to double.
1122 2011-08-02 Robert Dewar <dewar@adacore.com>
1124 * sem_ch3.adb, sem_ch5.adb, sem_type.adb, switch-c.adb, switch-c.ads,
1125 sem_prag.adb, sem_util.adb, sem_util.ads, sem_res.adb, warnsw.ads,
1126 prepcomp.ads, cstand.adb, stand.ads, a-calfor.adb, s-stusta.adb:
1129 2011-08-02 Ed Schonberg <schonberg@adacore.com>
1131 * sem_attr.adb: handle properly 'Result when it is a prefix of an
1134 2011-08-02 Javier Miranda <miranda@adacore.com>
1136 * einfo.ads, einfo.adb
1137 (Original_Access_Type): Move this attribute to Node26 since there was
1138 an undocumented use of Node21 in E_Access_Subprogram_Type entities
1139 which causes conflicts and breaks the generation of the .NET compiler.
1140 (Interface_Name): Add missing documentation on JGNAT only uses of
1143 2011-08-02 Geert Bosch <bosch@adacore.com>
1145 * cstand.adb (Back_End_Float_Types): Use Elist instead of Nlist
1146 (Find_Back_End_Float_Type): Likewise
1147 (Create_Back_End_Float_Types): Likewise
1148 (Create_Float_Types): Likewise
1149 (Register_Float_Type): Likewise
1150 * sem_ch3.adb (Floating_Point_Type_Declaration): Use Elist instead of
1151 Nlist and split out type selection in new local Find_Base_Type function.
1152 * sem_prag.adb (Process_Import_Predefined_Type): Use Elist instead of
1154 * stand.ads (Predefined_Float_Types): Use Elist instead of Nlist
1156 2011-08-02 Robert Dewar <dewar@adacore.com>
1158 * inline.adb: Minor code reorganization (put Get_Code_Unit_Entity in
1160 * opt.ads: Minor comment change.
1161 * sem_ch12.adb: Minor code reorganization.
1163 2011-08-02 Gary Dismukes <dismukes@adacore.com>
1165 * sem_ch3.adb (Complete_Private_Subtype): Don't append the private
1166 subtype's list of rep items to the list on the full subtype in the case
1167 where the lists are the same.
1169 2011-08-02 Geert Bosch <bosch@adacore.com>
1171 * switch-c.adb (Free): New deallocation procedure to avoid implicitly
1172 using the one from System.Strings, which also deallocates all strings.
1174 2011-08-02 Geert Bosch <bosch@adacore.com>
1176 * gcc-interface/gigi.h, gcc-interface/misc.c (enumerate_modes): New
1178 * gcc-interface/Make-lang.in: Update dependencies.
1180 2011-08-02 Olivier Hainque <hainque@adacore.com>
1182 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Set the function
1185 2011-08-02 Javier Miranda <miranda@adacore.com>
1187 * sem_ch3.adb (Check_Anonymous_Access_Components): Create extra formals
1188 associated with anonymous access to subprograms.
1190 2011-08-02 Geert Bosch <bosch@adacore.com>
1193 (Preprocessing_Symbol_Defs): Move from Prepcomp.Symbol_Definitions.
1194 (Preprocessing_Symbol_Last): Move from Prepcomp.Last_Definition.
1195 * prepcomp.adb (Symbol_Definitions, Last_Definition): Move to opt.ads
1196 (Add_Symbol_Definition): Move to switch-c.adb
1197 (Process_Command_Line_Symbol_Definitions): Adjust references to above.
1198 * prepcomp.ads: Remove dependency on Ada.Unchecked_Deallocation.
1199 (Add_Symbol_Definition): Move to switch-c.adb.
1200 * sem_ch13.adb, sem_prag.adb: Add dependency on Warnsw.
1202 (Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
1204 * sem_warn.ads (Warn_On_Record_Holes, Warn_On_Overridden_Size,
1205 Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
1207 * switch-c.adb: Replace dependency on Prepcomp and Sem_Warn by Warnsw.
1208 (Add_Symbol_Definition): Moved from Prepcomp.
1209 * switch-c.ads: Update copyright notice. Use String_List instead of
1210 Argument_List, removing dependency on System.OS_Lib.
1212 2011-08-02 Yannick Moy <moy@adacore.com>
1214 * sem_ch3.adb (Analyze_Object_Declaration): issue an error in formal
1215 mode on initialization expression which does not respect SPARK
1217 * sem_util.adb, sem_util.ads (Is_SPARK_Initialization_Expr): determines
1218 if the tree referenced by its argument represents an initialization
1219 expression in SPARK, suitable for initializing an object in an object
1222 2011-08-02 Javier Miranda <miranda@adacore.com>
1224 * exp_ch9.adb (Expand_Access_Protected_Subprogram_Type): Link the
1225 internally generated access to subprogram with its associated protected
1227 * einfo.ads, einfo.adb (Original_Access_Type): New attribute.
1229 2011-08-02 Geert Bosch <bosch@adacore.com>
1231 * cstand.adb (Register_Float_Type): Print information about type to
1232 register, if the Debug_Flag_Dot_B is set.
1233 * debug.adb (Debug_Flag_Dot_B): Document d.b debug option.
1234 * rtsfind.ads (RE_Max_Base_Digits): New run time entity.
1235 * sem_ch3.adb (Floating_Point_Type_Declaration): Allow declarations
1236 with a requested precision of more than Max_Digits digits and no more
1237 than Max_Base_Digits digits, if a range specification is present and the
1238 Predefined_Float_Types list has a suitable type to derive from.
1239 * sem_ch3.adb (Rep_Item_Too_Early): Avoid generating error in the
1240 case of type completion with pragma Import
1242 (Process_Import_Predefined_Type): Processing to complete a type
1243 with pragma Import. Currently supports floating point types only.
1244 (Set_Convention_From_Pragma): Do nothing without underlying type.
1245 (Process_Convention): Guard against absence of underlying type,
1246 which may happen when importing incomplete types.
1247 (Process_Import_Or_Interface): Handle case of importing predefined
1248 types. Tweak error message.
1250 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
1252 * inline.adb (Add_Inlined_Body): Adjust check for library-level inlined
1253 functions to previous change. Reorganize code slightly.
1255 2011-08-02 Geert Bosch <bosch@adacore.com>
1257 * back_end.ads (Register_Type_Proc): New call back procedure type for
1258 allowing the back end to provide information about available types.
1259 (Register_Back_End_Types): New procedure to register back end types.
1260 * back_end.adb (Register_Back_End_Types): Call the back end to enumerate
1262 * cstand.adb (Back_End_Float_Types): New list for floating point types
1263 supported by the back end.
1264 (Build_Float_Type): Add extra parameter for Float_Rep_Kind.
1265 (Copy_Float_Type): New procedure to make new copies of predefined types.
1266 (Register_Float_Type): New call back procedure to populate the BEFT list
1267 (Find_Back_End_Float_Type): New procedure to find a BEFT by name
1268 (Create_Back_End_Float_Types): New procedure to populate the BEFT list.
1269 (Create_Float_Types): New procedure to create entities for floating
1270 point types predefined in Standard, and put these and any remaining
1271 BEFTs on the Predefined_Float_Types list.
1272 * stand.ads (Predefined_Float_Types): New list for predefined floating
1273 point types that do not have declarations in package Standard.
1275 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
1277 * inline.adb (Get_Code_Unit_Entity): New local function. Returns the
1278 entity node for the unit containing the parameter.
1279 (Add_Inlined_Body): Use it to find the unit containing the subprogram.
1280 (Add_Inlined_Subprogram): Likewise.
1281 * gcc-interface/Make-lang.in: Update dependencies.
1283 2011-08-02 Thomas Quinot <quinot@adacore.com>
1285 * s-stusta.adb (Print): Make sure Pos is always initialized to a
1288 2011-08-02 Geert Bosch <bosch@adacore.com>
1290 * a-calfor.adb (Image): Simplify, removing unnecessary uses of 'Image.
1292 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
1294 * sem_type.adb (Covers): Move trivial case to the top and reuse the
1295 computed value of Base_Type.
1297 2011-08-02 Yannick Moy <moy@adacore.com>
1299 * restrict.adb (Check_Restriction): issue an error for any use of
1300 class-wide, even if the No_Dispatch restriction is not set.
1301 * sem_aggr.adb: Correct typos in comments and messages in formal mode
1302 * sem_ch3.adb (Process_Full_View): issue an error in formal mode is,
1303 when completing a private extension, the type named in the private part
1304 is not the same as that named in the visible part.
1305 * sem_res.adb (Resolve_Call): issue an error in formal mode on the use
1306 of an inherited primitive operations of a tagged type or type extension
1307 that returns the tagged type.
1308 * sem_util.adb, sem_util.ads (Is_Inherited_Operation_For_Type): new
1309 function which returns True for an implicit operation inherited by the
1310 derived type declaration for the argument type.
1311 (Is_SPARK_Object_Reference): move to appropriate place in alphabetic
1314 2011-08-02 Ed Schonberg <schonberg@adacore.com>
1316 * sem_ch5.adb (Pre_Analyze_Range): new procedure extracted from
1317 Process_Bounds, to perform analysis with expansion of a range or an
1318 expression that is the iteration scheme for a loop.
1319 (Analyze_Iterator_Specification): If domain of iteration is given by a
1320 function call with a controlled result, as is the case if call returns
1321 a predefined container, ensure that finalization actions are properly
1323 * par-ch3.adb: accept Ada2012 iterator form in P_Discrete_Range.
1325 2011-08-02 Javier Miranda <miranda@adacore.com>
1327 * sem_ch5.adb (Analyze_Iteration_Scheme): Fix typo.
1328 * gcc-interface/Make-lang.in: Update dependencies.
1330 2011-08-02 Javier Miranda <miranda@adacore.com>
1332 * sem_util.ads, sem_util.adb (Is_Variable): Add a new formal to
1333 determine if the analysis is performed using N or Original_Node (N).
1334 * exp_util.adb (Side_Effect_Free): Code cleanup since the new
1335 functionality of routine Is_Variable avoids code duplication.
1336 * checks.adb (Determine_Range): Handle temporaries generated by
1337 Remove_Side_Effects.
1339 2011-08-02 Javier Miranda <miranda@adacore.com>
1341 * exp_ch4.adb (Expand_N_Quantified_Expression): Force reanalysis and
1342 expansion of the condition. Required since the previous analysis was
1343 done with expansion disabled (see Resolve_Quantified_Expression) and
1344 hence checks were not inserted and record comparisons have not been
1347 2011-08-02 Ed Falis <falis@adacore.com>
1349 * s-taprop-vxworks.adb, s-intman-vxworks.adb, s-intman-vxworks.ads:
1352 2011-08-02 Bob Duff <duff@adacore.com>
1354 * opt.ads: Minor comment fix.
1356 2011-08-02 Bob Duff <duff@adacore.com>
1358 * sem_ch12.adb (Analyze_Package_Instantiation,
1359 Analyze_Subprogram_Instantiation): Turn off style checking while
1360 analyzing an instance. Whatever style checks that apply to the generic
1361 unit should apply, so it makes no sense to apply them in an instance.
1362 This was causing trouble when compiling an instance of a runtime
1363 unit that violates the -gnatyO switch.
1364 * stylesw.adb (Set_Style_Check_Options): "when 'O' =>" was missing from
1365 one of the two case statements, causing spurious errors.
1367 2011-08-02 Robert Dewar <dewar@adacore.com>
1369 * uname.adb: Minor reformatting.
1370 * gnatcmd.adb: Minor reformatting.
1371 * exp_attr.adb: Minor reformatting.
1373 2011-08-02 Ed Schonberg <schonberg@adacore.com>
1375 * exp_ch5.adb (Expand_N_Assignment_Statement): under restriction
1376 No_Dispatching_Calls, do not look for the Assign primitive, because
1377 predefined primitives are not created in this case.
1379 2011-08-02 Bob Duff <duff@adacore.com>
1381 * stylesw.ads: Minor comment fixes.
1383 2011-08-02 Robert Dewar <dewar@adacore.com>
1385 * freeze.adb (Add_To_Result): New procedure.
1387 2011-08-02 Jose Ruiz <ruiz@adacore.com>
1389 * exp_attr.adb (Find_Stream_Subprogram): When using a configurable run
1390 time, if the specific run-time routines for handling streams of strings
1391 are not available, use the default mechanism.
1393 2011-08-02 Arnaud Charlet <charlet@adacore.com>
1395 * s-regpat.ads: Fix typo.
1397 2011-08-02 Vincent Celier <celier@adacore.com>
1399 * prj-conf.adb (Get_Or_Create_Configuration_File): If On_Load_Config is
1400 not null, call it to create the in memory config project file without
1401 parsing an existing default config project file.
1403 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
1405 * atree.adb (Allocate_Initialize_Node): Remove useless temporaries.
1407 2011-08-02 Ed Schonberg <schonberg@adacore.com>
1409 * sem_elim.adb: an abstract subprogram does not need an eliminate
1410 pragma for its descendant to be eliminable.
1412 2011-08-02 Ed Falis <falis@adacore.com>
1414 * init.c: revert to handling before previous checkin for VxWorks
1415 * s-intman-vxworks.adb: delete unnecessary declarations related to
1416 using Ada interrupt facilities for handling signals.
1417 Delete Initialize_Interrupts. Use __gnat_install_handler instead.
1418 * s-intman-vxworks.ads: Import __gnat_install_handler as
1419 Initialize_Interrupts.
1420 * s-taprop-vxworks.adb: Delete Signal_Mask.
1421 (Abort_Handler): change construction of mask to unblock exception
1424 2011-08-02 Jerome Guitton <guitton@adacore.com>
1426 * a-except-2005.adb (Raise_From_Signal_Handler): Call
1427 Debug_Raise_Exception before propagation starts.
1429 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
1431 * exp_ch6.adb (Expand_Call): Guard restriction checks with a call
1432 to Restriction_Check_Required.
1433 * sem_ch3.adb (Analyze_Object_Declaration): Likewise.
1434 * sem_res.adb (Resolve_Call): Likewise.
1435 * sem_attr.adb (Check_Stream_Attribute): Likewise.
1437 2011-08-02 Bob Duff <duff@adacore.com>
1439 * stylesw.ads: Update comment.
1440 * style.adb: Minor: Use Error_Msg_NE instead of Error_Msg_N.
1441 * errout.ads: Remove obsolete comment.
1443 2011-08-02 Javier Miranda <miranda@adacore.com>
1445 * einfo.ads, einfo.adb (Is_Safe_To_Reevaluate): new function.
1446 (Set_Is_Safe_To_Reevaluate): new procedure.
1447 * sem_ch5.adb (Analyze_Assignment): Add one assertion to ensure that no
1448 assignment is allowed on safe-to-reevaluate variables.
1449 (Analyze_Iteration_Schine.Process_Bounds.One_Bound): Decorate the
1450 temporary created to remove side effects in expressions that use
1451 the secondary stack as safe-to-reevaluate.
1452 * exp_util.adb (Side_Effect_Free): Add missing code to handle well
1453 variables that are not true constants.
1455 2011-08-02 Robert Dewar <dewar@adacore.com>
1457 * sem_ch5.adb, sem_ch7.adb, einfo.ads, sem_util.adb, sem_util.ads,
1458 sem_res.adb, sem_ch6.adb: Minor reformatting.
1460 2011-08-02 Jerome Guitton <guitton@adacore.com>
1462 * a-except-2005.adb (Raise_Current_Excep): Remove obsolete dead code.
1464 2011-08-02 Ed Schonberg <schonberg@adacore.com>
1466 * sem_ch6.adb (New_Overloaded_Entity, Check_Overriding_Indicator): Do
1467 not set Overridden_Operation if subprogram is an initialization
1470 2011-08-02 Yannick Moy <moy@adacore.com>
1472 * par-ch6.adb: Correct obsolete name in comments
1473 * restrict.adb, restrict.ads (Check_Formal_Restriction): new function
1474 which takes two message arguments (existing function takes one), with
1475 second message used for continuation.
1476 * sem_ch5.adb (Analyze_Block_Statement): in formal mode, only reject
1477 block statements that originate from a source block statement, not
1478 generated block statements
1479 * sem_ch6.adb (Analyze_Function_Call): rename L into Actuals, for
1480 symmetry with procedure case
1481 * sem_ch7.adb (Check_One_Tagged_Type_Or_Extension_At_Most): new
1482 function to issue an error in formal mode if a package specification
1483 contains more than one tagged type or type extension.
1484 * sem_res.adb (Resolve_Actuals): in formal mode, check that actual
1485 parameters matching formals of tagged types are objects (or ancestor
1486 type conversions of objects), not general expressions. Issue an error
1487 on view conversions that are not involving ancestor conversion of an
1489 (Resolve_Type_Conversion): in formal mode, issue an error on the
1490 operand of an ancestor type conversion which is not an object
1491 * sem_util.adb, sem_util.ads (Find_Actual): extend the behavior of the
1492 procedure so that it works also for actuals of function calls
1493 (Is_Actual_Tagged_Parameter): new function which determines if its
1494 argument is an actual parameter of a formal of tagged type in a
1496 (Is_SPARK_Object_Reference): new function which determines if the tree
1497 referenced by its argument represents an object in SPARK
1499 2011-08-02 Robert Dewar <dewar@adacore.com>
1501 * sem_ch3.adb: Minor reformatting
1502 Minor comment addition
1503 Minor error msg text change
1505 2011-08-02 Javier Miranda <miranda@adacore.com>
1507 * sem_ch5.adb (Analyze_Iteration_Scheme.Uses_Secondary_Stack): New
1508 function. Used to be more precise when we generate a variable plus one
1509 assignment to remove side effects in the evaluation of the Bound
1511 (Analyze_Iteration_Scheme): Clean attribute analyzed in all the nodes
1512 of the bound expression to force its re-analysis and thus expand the
1513 associated transient scope (if required). Code cleanup replacing the
1514 previous code that declared the constant entity by an invocation to
1515 routine Force_Evaluation which centralizes this work in the frontend.
1517 2011-08-02 Robert Dewar <dewar@adacore.com>
1519 * einfo.adb (Is_Base_Type): Improve efficiency by using a flag table
1520 (Base_Type): Now uses improved Is_Base_Type function
1521 * einfo.ads (Base_Type): Inline this function
1523 2011-08-02 Robert Dewar <dewar@adacore.com>
1525 * sem_prag.adb (Analyze_Pragma): Defend against infinite recursion
1526 (Analyze_Aspect_Specifications): Fix Sloc values for constructed pragmas
1528 2011-08-02 Arnaud Charlet <charlet@adacore.com>
1530 * gcc-interface/Make-lang.in: Update dependencies.
1531 * gcc-interface/Makefile.in: Use s-inmapop-vxworks.adb for all VxWorks
1534 2011-08-02 Yannick Moy <moy@adacore.com>
1536 * par-ch3.adb (P_Delta_Constraint): issue an error in formal mode on
1537 non-simple expression used in delta constraint
1538 (P_Index_Or_Discriminant_Constraint): issue an error in formal mode on
1539 index constraint which is not a subtype mark
1540 * par.adb: With and use Restrict
1541 * sem_ch3.adb (Analyze_Component_Declaration): issue an error in formal
1542 mode on component type which is not a subtype mark and default
1543 expression on component
1544 (Analyze_Subtype_Declaration): issue an error in formal mode on subtype
1545 of string which does not have a lower index bound equal to 1
1546 (Array_Type_Declaration): issue an error in formal mode on index or
1547 component type which is not a subtype mark, and on aliased keyword on
1549 (Derived_Type_Declaration): issue an error in formal mode on interface,
1550 limited or abstract type
1551 (Record_Type_Declaration): issue an error in formal mode on interface
1552 (Record_Type_Definition): issue an error in formal mode on tagged types
1553 and type extensions not declared in the specification of a library unit
1554 package; on null non-tagged record; on variant part
1556 2011-08-02 Vincent Celier <celier@adacore.com>
1558 * prj-nmsc.adb (Check_Library_Attributes): Do not report Library_Dir
1559 not declared for qualified library project when Library_Name is not
1560 declared, but Library_Dir is.
1562 2011-08-02 Robert Dewar <dewar@adacore.com>
1564 * sem_ch13.adb (Analyze_Aspect_Specification): Fix slocs on generated
1565 pragmas (affects aspects [Component_]Default_Value
1566 (Check_Aspect_At_Freeze_Point): For Component_Default_Value, use
1567 component type for the resolution
1569 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
1571 * einfo.adb (Base_Type): Tune implementation for speed.
1573 2011-08-02 Robert Dewar <dewar@adacore.com>
1575 * freeze.adb: Minor reformatting.
1577 2011-08-02 Thomas Quinot <quinot@adacore.com>
1579 * scos.ads: Update comments.
1581 2011-08-02 Ed Schonberg <schonberg@adacore.com>
1583 * sem_ch3.adb (Build_Derived_Type): Inherit the convention from the
1584 base type, because the parent may be a subtype of a private type whose
1585 convention is established in a private part.
1587 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
1589 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Wrap the return
1590 statement in a block when the expansion of the return expression has
1591 created a finalization chain.
1592 * freeze.adb (Freeze_Expression): Alphabetize all choices associated
1593 with the parent node.
1594 Add N_Extended_Return_Statement to handle the case where a transient
1595 object declaration appears in the Return_Object_Declarations list of
1596 an extended return statement.
1598 2011-08-02 Matthew Gingell <gingell@adacore.com>
1600 * adaint.c (__gnat_is_symbolic_link_attr): Supress warning on possibly
1601 unused parameter 'name'.
1603 2011-08-02 Ed Schonberg <schonberg@adacore.com>
1605 * sem_elim.adb (Set_Eliminated): If the overridden operation is an
1606 inherited operation, check whether its alias, which is the source
1607 operastion that it renames, has been marked eliminated.
1609 2011-08-02 Javier Miranda <miranda@adacore.com>
1611 * exp_util.adb (Safe_Prefixed_Reference): Do not consider safe an
1612 in-mode parameter whose type is an access type since it can be used to
1613 modify its designated object. Enforce code that handles as safe an
1614 access type that is not access-to-constant but it is the result of a
1615 previous removal of side-effects.
1616 (Remove_Side_Effects): Minor code reorganization of cases which require
1617 no action. Done to incorporate documentation on new cases uncovered
1618 working in this ticket: no action needed if this routine was invoked
1619 too early and the nodes are not yet decorated.
1620 * sem_res.adb (Resolve_Slice): Minor code cleanup replacling two calls
1621 to routine Remove_Side_Effects by calls to Force_Evaluation since they
1622 were issued with actuals that are implicitly provided by
1625 2011-08-02 Robert Dewar <dewar@adacore.com>
1627 * sem_ch3.adb, sem_res.adb: Minor reformatting.
1629 2011-08-02 Yannick Moy <moy@adacore.com>
1631 * sem_attr.adb (Check_Formal_Restriction_On_Attribute): new procedure
1632 to issue an error in formal mode on attribute not supported in this mode
1633 (Analyze_Attribute): issue errors on standard attributes not supported
1635 * sem_ch3.adb (Modular_Type_Declaration): remove obsolete part of
1636 comment, and issue error in formal mode on modulus which is not a power
1638 (Process_Range_Expr_In_Decl): issue error in formal mode on non-static
1640 * sem_ch8.adb (Find_Type): issue error in formal mode on 'Base in
1642 * sem_res.adb (Resolve_Unary_Op): issue error in formal mode on unary
1643 operator on modular type (except 'not').
1645 2011-08-02 Robert Dewar <dewar@adacore.com>
1647 * gnat_rm.texi: Minor reformatting.
1649 2011-08-02 Arnaud Charlet <charlet@adacore.com>
1651 * s-osinte-linux.ads: Minor comment update and reformatting.
1652 * i-cexten.ads: Make this unit pure, as for its parent.
1653 Will allow its usage in more contexts if needed.
1655 2011-08-02 Robert Dewar <dewar@adacore.com>
1657 * s-utf_32.ads: Minor comment fix.
1659 2011-08-02 Ed Schonberg <schonberg@adacore.com>
1661 * sem_res.adb (Resolve_Actuals): if the subprogram is a primitive
1662 operation of a tagged synchronized type, handle the case where the
1663 controlling argument is overloaded.
1665 2011-08-02 Yannick Moy <moy@adacore.com>
1667 * gnat_rm.texi, opt.ads, sem_prag.adb, snames.ads-tmpl:
1668 Replace pragma SPARK_95 with pragma Restrictions (SPARK)
1669 * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): set
1670 SPARK mode and formal verification mode on processing SPARK restriction
1671 * s-rident.ads (Restriction_Id): add SPARK restriction in those not
1672 requiring consistency checking.
1674 2011-08-02 Robert Dewar <dewar@adacore.com>
1676 * sem_res.adb: Minor reformatting.
1678 2011-08-02 Robert Dewar <dewar@adacore.com>
1680 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
1681 a-cforse.ads: Remove unneeded with of Ada.Containers
1682 Remove commented out pragma Inline's
1683 Move specifications of new subprograms to the actual specs
1685 2011-08-02 Yannick Moy <moy@adacore.com>
1687 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
1688 a-cforse.ads: Update comments.
1690 2011-08-02 Ed Schonberg <schonberg@adacore.com>
1692 * sem_attr.adb: add attribute name when 'Result has the wrong prefix.
1694 2011-08-02 Robert Dewar <dewar@adacore.com>
1696 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
1697 a-cforse.ads, a-cofove.ads: Minor reformatting.
1699 2011-08-02 Claire Dross <dross@adacore.com>
1701 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads, a-cforse.ads,
1702 a-cofove.ads: Add comments.
1704 2011-08-02 Yannick Moy <moy@adacore.com>
1706 * gnat_rm.texi: Document formal containers.
1708 2011-08-02 Emmanuel Briot <briot@adacore.com>
1710 * g-comlin.adb (Goto_Section, Getopt): fix handling of "*" when there
1713 2011-08-02 Robert Dewar <dewar@adacore.com>
1715 * mlib-prj.adb, restrict.ads, sem_aggr.adb, sem_ch12.adb: Minor
1718 2011-08-02 Robert Dewar <dewar@adacore.com>
1720 * aspects.adb: New aspects Default_Value and Default_Component_Value
1721 New format of Aspect_Names table checks for omitted entries
1722 * aspects.ads: Remove mention of Aspect_Cancel and add documentation on
1723 handling of boolean aspects for derived types.
1724 New aspects Default_Value and Default_Component_Value
1725 New format of Aspect_Names table checks for omitted entries
1726 * einfo.ads, einfo.adb (Has_Default_Component_Value): New flag
1727 (Has_Default_Value): New flag
1728 (Has_Default_Component_Value): New flag
1729 (Has_Default_Value): New flag
1730 * par-ch13.adb (P_Aspect_Specifications): New format of Aspect_Names
1732 * par-prag.adb: New pragmas Default_Value and Default_Component_Value
1733 * sem_ch13.adb (Analyze_Aspect_Specifications): New aspects
1734 Default_Value and Default_Component_Value
1735 * sem_prag.adb: New pragmas Default_Value and Default_Component_Value
1736 New aspects Default_Value and Default_Component_Value
1737 * snames.ads-tmpl: New pragmas Default_Value and Default_Component_Value
1738 * sprint.adb: Print N_Aspect_Specification node when called from gdb
1740 2011-08-02 Vincent Celier <celier@adacore.com>
1742 * prj-nmsc.adb (Check_Library_Attributes): For virtual library project,
1743 inherit library kind.
1745 2011-08-02 Ed Schonberg <schonberg@adacore.com>
1747 * sem_res.adb: Add guards in calls to Matching_Static_Array_Bounds.
1750 2011-08-02 Robert Dewar <dewar@adacore.com>
1752 * i-cstrin.ads: Updates to make Interfaces.C.Strings match RM
1754 2011-08-02 Yannick Moy <moy@adacore.com>
1756 * sem_aggr.adb (Resolve_Aggregate): Fix thinko.
1758 2011-08-02 Robert Dewar <dewar@adacore.com>
1760 * impunit.adb: Add comment.
1762 2011-08-02 Yannick Moy <moy@adacore.com>
1764 * sem_aggr.adb (Check_Qualified_Aggregate): new procedure which checks
1765 qualification of aggregates in formal mode
1766 (Is_Top_Level_Aggregate): returns True for an aggregate not contained in
1768 (Resolve_Aggregate): complete the test that an aggregate is adequately
1769 qualified in formal mode
1771 2011-08-02 Pascal Obry <obry@adacore.com>
1773 * make.adb, bindgen.adb, gnatbind.adb: Minor reformatting.
1774 * mlib-prj.adb: Supress warning when compiling binder generated file.
1775 (Build_Library): Supress all warnings when compiling the binder
1778 2011-08-02 Yannick Moy <moy@adacore.com>
1780 * errout.adb, errout.ads (Check_Formal_Restriction): move procedure
1782 * restrict.adb, restrict.ads (Check_Formal_Restriction): ...to here
1783 * sem_aggr.adb, sem_ch5.adb, sem_util.adb:
1784 Add with/use clauses to make Check_Formal_Restriction visible
1786 2011-08-02 Ed Schonberg <schonberg@adacore.com>
1788 * sem_ch12.adb (Check_Generic_Actuals): handle properly actual
1789 in-parameters when type of the generic formal is private in the generic
1790 spec and non-private in the body.
1792 2011-08-02 Claire Dross <dross@adacore.com>
1794 * a-cfdlli.adb, a-cfdlli.ads, a-cfhase.adb, a-cfhase.ads, a-cfhama.adb,
1795 a-cfhama.ads, a-cforse.adb, a-cforse.ads, a-cforma.adb, a-cforma.ads,
1796 a-cofove.adb, a-cofove.ads: New files implementing formal containers.
1797 * impunit.adb, Makefile.rtl: Take new files into account.
1799 2011-08-02 Robert Dewar <dewar@adacore.com>
1801 * sem_aggr.adb, sem_ch3.adb, sem_ch5.adb, make.adb, sem_res.adb,
1802 sem_attr.adb, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
1804 2011-08-02 Yannick Moy <moy@adacore.com>
1806 * sem_aggr.adb (Resolve_Aggregate): disable incorrectly placed check in
1808 * sem_util.adb (Matching_Static_Array_Bounds): proper detection of
1809 matching static array bounds, taking into account the special case of
1811 * sem_ch3.adb: Typo in comment.
1813 2011-08-02 Yannick Moy <moy@adacore.com>
1815 * errout.adb, errout.ads (Check_Formal_Restriction): new procedure
1816 which issues an error in formal mode if its argument node is originally
1818 * sem_ch3.adb (Analyze_Full_Type_Declaration): move test that a type
1819 has a discriminant specification so that it does not include the case
1821 (Derived_Type_Declaration): move here the test that a derived type has a
1822 discriminant specification
1823 * sem_aggr.adb (Resolve_Record_Aggregate): test the presence of the
1824 first element of a component association before accessing its choices
1825 (presence of component association is not enough)
1826 * exp_ch6.adb (Expand_N_Subprogram_Declaration): test if a subprogram
1827 declaration is a library item before accessing the next element in a
1828 list, as library items are not member of lists
1829 * sem_attr.adb, sem_ch11.adb, sem_ch4.adb, sem_ch5.adb, sem_ch6.adb,
1830 sem_ch8.adb, sem_ch9.adb, sem_res.adb, sem_util.adb: use
1831 Check_Formal_Restriction whenever possible.
1833 2011-08-02 Ed Schonberg <schonberg@adacore.com>
1835 * sem_ch3.adb (Find_Type_Of_Object): In ASIS mode, create an itype
1836 reference when needed.
1838 2011-08-02 Bob Duff <duff@adacore.com>
1840 * gnat_ugn.texi: Fix typo.
1842 2011-08-02 Vincent Celier <celier@adacore.com>
1844 * make.adb (Gnatmake): Use MLib.Tgt.Archive_Ext as the extension of
1845 archive file name. Do not use the full path name of archives for Open
1848 2011-08-02 Robert Dewar <dewar@adacore.com>
1850 * sem_ch12.adb, sem_ch11.adb: New calling sequence for
1851 Analyze_Aspect_Specifications
1853 (Analyze_Aspect_Specifications): New handling for boolean aspects
1854 * sem_ch13.ads (Analyze_Aspect_Specifications): New calling sequence
1855 * sem_ch3.adb, sem_ch6.adb, sem_ch7.adb, sem_ch9.adb: New calling
1856 sequence for Analyze_Aspect_Specifications
1857 * sem_prag.adb (Analyze_Pragma): Remove use of Aspect_Cancel entirely
1858 * sinfo.ads, sinfo.adb (Aspect_Cancel): Remove, no longer used
1860 2011-08-02 Robert Dewar <dewar@adacore.com>
1862 * freeze.adb (Freeze_Entity): Remove handling of delayed boolean
1863 aspects, since these no longer exist.
1865 2011-08-02 Robert Dewar <dewar@adacore.com>
1867 * par-ch13.adb (Aspect_Specifications_Present): Always return false on
1868 semicolon, do not try to see if there are aspects following it.
1869 * par-ch3.adb (P_Declarative_Items): Better message for unexpected
1872 2011-08-02 Robert Dewar <dewar@adacore.com>
1874 * sem_ch8.adb, aspects.ads: Minor reformatting.
1876 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
1878 * sem_ch13.ads (Analyze_Aspect_Specification): Add pragma Inline.
1879 * sem_ch13.adb (Analyze_Non_Null_Aspect_Specifications): New procedure
1881 (Analyze_Aspect_Specifications): ...here. Call above procedure.
1883 2011-08-02 Yannick Moy <moy@adacore.com>
1885 * exp_ch6.adb (Expand_N_Subprogram_Declaration): issue error in formal
1886 mode on subprogram declaration outside of package specification, unless
1887 it is followed by a pragma Import
1888 * sem_ch3.adb (Access_Definition, Access_Subprogram_Declaration,
1889 Access_Type_Declaration): issue error in formal mode on access type
1890 (Analyze_Incomplete_Type_Decl): issue error in formal mode on
1892 (Analyze_Object_Declaration): issue error in formal mode on object
1893 declaration which does not respect SPARK restrictions
1894 (Analyze_Subtype_Declaration): issue error in formal mode on subtype
1895 declaration which does not respect SPARK restrictions
1896 (Constrain_Decimal, Constrain_Float, Constrain_Ordinary_Fixed): issue
1897 error in formal mode on digits or delta constraint
1898 (Decimal_Fixed_Point_Type_Declaration): issue error in formal mode on
1899 decimal fixed point type
1900 (Derived_Type_Declaration): issue error in formal mode on derived type
1901 other than type extensions of tagged record types
1902 * sem_ch6.adb (Process_Formals): remove check in formal mode, redundant
1903 with check on access definition
1904 * sem_ch9.adb (Analyze_Protected_Definition): issue error in formal
1905 mode on protected definition.
1906 (Analyze_Task_Definition): issue error in formal mode on task definition
1908 2011-08-02 Robert Dewar <dewar@adacore.com>
1910 * make.adb, sem_ch8.adb, s-inmaop-vxworks.adb: Minor reformatting.
1912 2011-08-02 Javier Miranda <miranda@adacore.com>
1914 * sem_ch6.adb (Can_Override_Operator): New function.
1915 (Verify_Overriding_Indicator): Add missing code to check overriding
1916 indicator in operators. Fixes regression.
1917 (Check_Overriding_Indicator): Minor reformating after replacing the
1918 code that evaluates if the subprogram can override an operator by
1919 invocations to the above new function.
1921 (Write_Field26_Name): Add missing code to ensure that, following
1922 the documentation in einfo.ads, this field is not shown as attribute
1923 "Static_Initialization" on non-dispatching functions.
1925 2011-08-02 Jose Ruiz <ruiz@adacore.com>
1927 * sem_res.adb (Resolve_Call): A call to
1928 Ada.Real_Time.Timing_Events.Set_Handler violates restriction
1929 No_Relative_Delay (AI-0211) only when it sets a relative timing event,
1930 i.e., when the second parameter is of type Time_Span.
1932 2011-08-02 Vincent Celier <celier@adacore.com>
1934 * make.adb (Gnatmake): use <library dir>/lib<library name>.a to link
1935 with an archive instead of -L<library dir> -l<library name>.
1937 2011-08-02 Ed Schonberg <schonberg@adacore.com>
1939 * sem_ch8.adb (Analyze_Use_Type): If the clause is being re-analyzed,
1940 mark the base types In_Use in addition to making the operations
1943 2011-08-02 Ed Falis <falis@adacore.com>
1945 * init.c: add and setup __gnat_signal_mask for the exception signals
1946 * s-inmaop-vxworks.adb: new file.
1947 * s-intman-vxworks.adb: remove unnecessary initializations and
1949 * s-intman-vxworks.ads: remove unnecessary variable
1950 * s-taprop-vxworks.adb: simplify signal initialization
1952 2011-08-02 Robert Dewar <dewar@adacore.com>
1954 * sem_ch8.adb: Minor code reorganization, comment updates.
1956 2011-08-02 Robert Dewar <dewar@adacore.com>
1958 * sem_res.adb (Matching_Static_Array_Bounds): Moved to Sem_Util
1959 * sem_util.ads, sem_util.adb (Matching_Static_Array_Bounds): Moved
1961 (Matching_Static_Array_Bounds): Use Is_Ok_Static_Expression
1962 (Matching_Static_Array_Bounds): Moved here from Sem_Res
1964 2011-08-02 Ed Schonberg <schonberg@adacore.com>
1966 * atree.h, atree.ads, atree.adb: New subprograms to manipulate Elist5.
1967 * par_ch8.adb (P_Use_Type): initialize Used_Operations for node.
1968 * sinfo.ads, sinfo.adb (Used_Operations): new attribute of
1969 use_type_clauses, to handle more efficiently use_type and use_all_type
1971 * sem_ch8.adb: Rewrite Use_One_Type and End_Use_Type to handle the
1972 Ada2012 Use_All_Type clause.
1973 (Use_Class_Wide_Operations): new procedure.
1975 2011-08-02 Robert Dewar <dewar@adacore.com>
1977 * exp_util.adb, par-ch10.adb, par-ch6.adb, sem.adb, sem_ch6.adb,
1978 sem_ch6.ads, sinfo.adb, sinfo.ads, sprint.adb: Change parameterized
1979 expression to expression function.
1981 2011-08-02 Ed Schonberg <schonberg@adacore.com>
1983 * sem_ch4.adb: transform simple Ada2012 membership into equality only
1984 if types are compatible.
1986 2011-08-02 Yannick Moy <moy@adacore.com>
1988 * sem_res.adb (Matching_Static_Array_Bounds): new function which
1989 returns True if its argument array types have same dimension and same
1990 static bounds at each index.
1991 (Resolve_Actuals): issue an error in formal mode on actuals passed as
1992 OUT or IN OUT paramaters which are not view conversions in SPARK.
1993 (Resolve_Arithmetic_Op): issue an error in formal mode on
1994 multiplication or division with operands of fixed point types which are
1995 not qualified or explicitly converted.
1996 (Resolve_Comparison_Op): issue an error in formal mode on comparisons of
1997 Boolean or array type (except String) operands.
1998 (Resolve_Equality_Op): issue an error in formal mode on equality
1999 operators for array types other than String with non-matching static
2001 (Resolve_Logical_Op): issue an error in formal mode on logical operators
2002 for array types with non-matching static bounds. Factorize the code in
2003 Matching_Static_Array_Bounds.
2004 (Resolve_Qualified_Expression): issue an error in formal mode on
2005 qualified expressions for array types with non-matching static bounds.
2006 (Resolve_Type_Conversion): issue an error in formal mode on type
2007 conversion for array types with non-matching static bounds
2009 2011-08-02 Robert Dewar <dewar@adacore.com>
2011 * par-ch10.adb: Minor code reorganization (use Nkind_In).
2013 2011-08-02 Ed Schonberg <schonberg@adacore.com>
2015 * par-ch9.adb: save location of entry for proper error message.
2017 2011-08-02 Javier Miranda <miranda@adacore.com>
2019 * sem_type.ads, sem_type.adb (Is_Ancestor): Addition of a new formal
2020 (Use_Full_View) which permits this routine to climb through the
2021 ancestors using the full-view of private parents.
2022 * sem_util.adb (Collect_Interfaces_Info, Implements_Interface): Set
2023 Use_Full_View to true in calls to Is_Ancestor.
2024 * sem_disp.adb (Override_Dispatching_Operation): Set Use_Full_View to
2025 true in call to Is_Ancestor.
2026 * exp_ch3.adb (Build_Offset_To_Top_Functions, Initialize_Tag): Set
2027 Use_Full_View to true in call to Is_Ancestor.
2028 * exp_ch7.adb (Controller_Component): Set Use_Full_View to true in
2029 call to Is_Ancestor.
2030 * exp_ch4.adb (Expand_N_Type_Conversion, Tagged_Membership): Set
2031 Use_Full_View to true in calls to Is_Ancestor.
2032 * exp_disp.adb (Expand_Interface_Actuals, Make_Secondary_DT, Make_DT,
2033 Make_Select_Specific_Data_Table, Register_Primitive,
2034 Set_All_DT_Position): Set Use_Full_View to true in calls to Is_Ancestor.
2035 * exp_intr.adb (Expand_Dispatching_Constructor_Call): Set Use_Full_View
2036 to true in call to Is_Ancestor.
2037 * exp_util.adb (Find_Interface_ADT, Find_Interface_Tag): Set
2038 Use_Full_View to true in calls to Is_Ancestor.
2040 (Write_Call_Info): Set Use_Full_View to true in call to Is_Ancestor.
2041 (Write_Type_Info): Set Use_Full_View to true in call to Is_Ancestor.
2043 2011-08-02 Robert Dewar <dewar@adacore.com>
2045 * gnat_rm.texi: Minor reformatting.
2046 * sem_prag.adb: Minor reformatting.
2048 2011-08-02 Tristan Gingold <gingold@adacore.com>
2050 * vms_data.ads: Add VMS qualifier for -gnateP.
2052 2011-08-02 Robert Dewar <dewar@adacore.com>
2054 * par-ch13.adb (P_Aspect_Specification): New meaning of Decl = Empty
2055 * par-ch7.adb (P_Package): Proper placement of aspects for package
2057 * par-endh.adb (Check_End): Ad Is_Sloc parameter
2058 (End_Statements): Add Is_Sloc parameterr
2059 * par.adb (P_Aspect_Specification): New meaning of Decl = Empty
2060 (Check_End): Ad Is_Sloc parameter
2061 (End_Statements): Add Is_Sloc parameterr
2063 2011-08-02 Vincent Celier <celier@adacore.com>
2065 * ug_words: Add VMS qualifier equivalent to -gnateP:
2066 /SYMBOL_PREPROCESSING.
2068 2011-08-02 Jose Ruiz <ruiz@adacore.com>
2070 * gnat-style.texi: For hexadecimal numeric literals the typical
2071 grouping of digits is 4 to represent 2 bytes.
2072 A procedure spec which is split into several lines is indented two
2075 2011-08-02 Yannick Moy <moy@adacore.com>
2077 * exp_aggr.adb (Is_Others_Aggregate): move function to other unit.
2078 * sem_aggr.adb, sem_aggr.ads (Is_Others_Aggregate): move function here
2079 (Resolve_Aggregate): issue errors in formal modes when aggregate is not
2081 (Resolve_Array_Aggregate): issue errors in formal modes on non-static
2082 choice in array aggregate
2083 (Resolve_Extension_Aggregate): issue errors in formal modes on subtype
2085 (Resolve_Record_Aggregate): issue errors in formal modes on mixed
2086 positional and named aggregate for record, or others in record
2087 aggregate, or multiple choice in record aggregate
2088 * sem_res.adb (Resolve_Logical_Op): issue errors in formal mode when
2089 array operands to logical operations AND, OR and XOR do not have the
2090 same static lower and higher bounds
2091 * sem_ch5.adb, sinfo.ads: Correct typos in comments
2093 2011-08-01 Robert Dewar <dewar@adacore.com>
2095 * sem_util.ads, sem_util.adb, sem_ch6.adb (Last_Source_Statement):
2096 Replaces Last_Source_Node_In_Sequence.
2097 * err_vars.ads (Error_Msg_Lang): 16 is OK, don't need 4K
2098 * errout.adb (Set_Error_Msg_Lang): Takes arg with no parens, but stores
2099 parens and blank in string (this was inconsistently implemented).
2101 (Set_Error_Msg_Lang): Takes arg with no parens, but stores parens and
2102 blank in string (this was inconsistently implemented).
2104 (Set_Global_Switches): Set formal mode switches appropriately
2105 * opt.ads, opt.adb: Formal mode is now global switches, more consistent
2107 (Analyze_Pragma, case SPARK_95): Set opt switches appropriately and
2108 call Set_Error_Msg_Lang to set "spark" as language name.
2109 * par.adb: Remove unnecessary call to set formal language for errout
2110 * sem_prag.adb (P_Pragma, case SPARK_95): Set opt switches
2111 appropriately and call Set_Error_Msg_Lang to set "spark" as language
2113 * sem_ch4.adb (Analyze_Concatenation_Operand): remove procedure and
2114 calls to it, moved after resolution so that types are known
2115 * sem_res.adb (Resolve_Op_Concat): issue an error in formal mode if
2116 result of concatenation is not of type String
2117 (Resolve_Op_Concat_Arg): issue an error in formal mode if an operand of
2118 concatenation is not properly restricted
2119 * gnat_rm.texi: Add doc on pragma Spark_95.
2120 * gcc-interface/Makefile.in: Remove obsolete target pairs for
2121 Interfaces.C.* on VMS. Remove s-parame-vms-restrict.ads.
2122 * gcc-interface/Make-lang.in: Update dependencies.
2124 2011-08-01 Javier Miranda <miranda@adacore.com>
2126 * sem_disp.adb (Override_Dispatching_Operation): Enforce strictness of
2127 condition that detects if the overridden operation must replace an
2130 2011-08-01 Javier Miranda <miranda@adacore.com>
2132 * exp_ch4.adb (Expand_N_Case_Expression): Propagate to the expanded
2133 code declarations inserted by Insert_Actions in each alternative of the
2134 N_Case_Expression node.
2136 2011-08-01 Robert Dewar <dewar@adacore.com>
2138 * sem_ch6.adb: Minor code reorganization.
2139 * sem_util.adb: Minor reformatting.
2141 2011-08-01 Pascal Obry <obry@adacore.com>
2143 * prj-env.adb: Remove <prefix>/lib/gpr/<target> project search path.
2144 * gnat_ugn.texi: Add documentation for VERSIONINFO Windows resource.
2146 2011-08-01 Yannick Moy <moy@adacore.com>
2148 * par-ch4.adb (P_Name): issue a syntax error in SPARK mode on character
2149 literal or operator symbol which is prefixed
2150 * sem_attr.adb (Analyze_Access_Attribute): issue an error in formal
2151 mode on access attributes.
2152 * sem_ch4.adb (Analyze_Concatenation_Operand): new procedure to check
2153 that concatenation operands are properly restricted in formal mode
2154 (Analyze_Concatenation, Analyze_Concatenation_Rest): call new procedure
2155 Analyze_Concatenation_Operand. Issue an error in formal mode if the
2156 result of the concatenation has a type different from String.
2157 (Analyze_Conditional_Expression, Analyze_Explicit_Dereference,
2158 Analyze_Quantified_Expression, Analyze_Slice,
2159 Analyze_Null): issue an error in formal mode on unsupported constructs
2161 (Analyze_Block_Statement): only issue error on source block statement
2162 * sem_util.ads, sem_util.adb (Last_Source_Node_In_Sequence): new
2163 function which returns the last node in a list of nodes for which
2164 Comes_From_Source returns True, if any
2165 * sem_ch6.adb (Check_Missing_Return): minor refactoring to use
2166 Last_Source_Node_In_Sequence
2167 * sem_ch8.adb (Analyze_Exception_Renaming, Analyze_Generic_Renaming,
2168 Analyze_Object_Renaming, Analyze_Use_Package): issue an error in formal
2169 mode on unsupported constructs
2170 * sem_ch9.adb Do not return after issuing error in formal mode, as the
2171 rest of the actions may be needed later on since the error is marked as
2173 * sinfo.ads: Typos in comments.
2175 2011-08-01 Pascal Obry <obry@adacore.com>
2177 * projects.texi: Minor editing.
2179 2011-08-01 Yannick Moy <moy@adacore.com>
2181 * err_vars.ads (Error_Msg_Lang, Error_Msg_Langlen): new variables for
2182 insertion character ~~
2183 * errout.ads, errout.adb (Formal_Error_Msg_...): remove procedures
2184 (Set_Error_Msg_Lang): new procedure which fixes the language for use
2185 with insertion character ~~
2186 (Set_Msg_Text): treat insertion character ~~
2187 * par-ch4.adb, par-ch5.adb, par-endh.adb, sem_attr.adb, sem_ch11.adb,
2188 sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_util.adb: Replace calls to
2189 Formal_Error_Msg_... procedures by equivalent Error_Msg_...
2190 procedures. Favor calls to Error_Msg_F(E) over Error_Msg_N(E). Make
2191 errors related to the formal language restriction not serious
2192 (insertion character |).
2193 * par.adb (Par): set formal language for error messages if needed
2194 * sem_ch6.adb (Check_Missing_Return): take into account possible
2195 generated statements at the end of the function
2196 * snames.ads-tmpl (Name_SPARK_95, Pragma_SPARK_95): new variable and
2197 enumeration value to define a new pragma SPARK_95
2198 * opt.ads, opt.adb (SPARK_Version_Type, SPARK_Version_Default,
2199 SPARK_Version): new type and variables to store the SPARK version
2201 (SPARK_Mode): return True when SPARK_Version is set
2202 * par-prag.adb: Correct indentation
2203 (Prag): take Pragma_SPARK_95 into account
2204 * sem_prag.adb (Set_Mechanism_Value, Sig_Flags): take Pragma_SPARK_95
2207 2011-08-01 Robert Dewar <dewar@adacore.com>
2209 * sem_ch3.adb, sem_ch3.ads, sem_ch5.adb, prj-part.adb, par-ch4.adb,
2210 sem_util.adb, sem_ch4.adb, sem_ch6.adb, sem_ch6.ads, sem_ch8.adb,
2211 sem_ch8.ads, sem_ch13.ads, par-ch5.adb, prj-env.ads: Minor reformatting
2213 2011-08-01 Pascal Obry <obry@adacore.com>
2215 * prj-part.ads, prj-part.adb (Parse): Add Target_Name parameter. Pass
2216 Target_Name to Get_Path call.
2217 (Parse_Single_Project): Likewise.
2218 (Post_Parse_Context_Clause): Likewise.
2219 * prj-env.ads, prj-env.adb (Find_Project): Add Target_Name parameter.
2220 Call Initialise_Project_Path with the proper Target_Name.
2221 (Initialize_Project_Path): Add <gnat_root>/<target_name>/lib/gnat
2223 (Get_Path): Add Target_Name parameter. Call Initialise_Project_Path
2224 with the proper Target_Name.
2225 * prj-conf.adb (Get_Or_Create_Configuration_File): Pass Target_Name to
2227 (Parse_Project_And_Apply_Config): Likewise.
2228 * prj-makr.adb (Initialize): Pass empty Target_Name to Parse routine.
2229 This is fine as this part of the code is supporting only native
2231 * prj-pars.adb (Parse): Pass empty Target_Name to Parse routine. This
2232 is fine as this part of the code is supporting only native compilation.
2234 2011-08-01 Yannick Moy <moy@adacore.com>
2236 * sem_util.adb (Enter_Name): issue error in formal mode on declaration
2237 of homonym, unless the homonym is one of the cases allowed in SPARK
2238 * par-ch5.adb (Parse_Decls_Begin_End): issue error in SPARK mode for
2239 package declaration occurring after a body.
2241 2011-08-01 Robert Dewar <dewar@adacore.com>
2243 * checks.adb, exp_ch4.adb: Minor reformatting.
2245 2011-08-01 Javier Miranda <miranda@adacore.com>
2247 * einfo.ads (Access_Disp_Table): Fix documentation.
2248 (Dispatch_Table_Wrappers): Fix documentation.
2250 2011-08-01 Pascal Obry <obry@adacore.com>
2252 * prj-env.adb, prj-env.ads: Minor reformatting.
2254 2011-08-01 Yannick Moy <moy@adacore.com>
2256 * sem_util.ads, sem_util.adb, par.adb, par_util.adb
2257 (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
2258 procedures out of these packages.
2259 * errout.ads, errout.adb
2260 (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
2261 procedures in of this package
2262 (Formal_Error_Msg_NE): new procedure for wrapper on Error_Msg_NE
2263 * par-ch5.adb (Parse_Decls_Begin_End): issue syntax error in SPARK mode
2264 on misplaced later vs initial declarations, like in Ada 83
2265 * sem_attr.adb (Processing for Analyze_Attribute): issue error in
2266 formal mode on attribute of private type whose full type declaration
2268 * sem_ch3.adb (Analyze_Declarations): issue error in formal mode on a
2269 package declaration inside a package specification
2270 (Analyze_Full_Type_Declaration): issue error in formal mode on
2271 controlled type or discriminant type
2272 * sem_ch6.adb (Analyze_Subprogram_Specification): only issue error on
2273 user-defined operator means that it should come from the source
2274 (New_Overloaded_Entity): issue error in formal mode on overloaded
2276 * sem_ch6.ads, sem_ch13.ads: typos in comments.
2278 2011-08-01 Thomas Quinot <quinot@adacore.com>
2280 * atree.adb: Minor reformatting.
2281 * checks.adb: Minor reformatting.
2283 2011-08-01 Vincent Celier <celier@adacore.com>
2285 * s-parame-vms-ia64.ads: Fix typo in comment
2287 * s-parame-vms-restrict.ads: Removed, unused.
2289 2011-08-01 Javier Miranda <miranda@adacore.com>
2292 (Is_Variable_Size_Array): Remove local subprogram Is_Constant_Bound.
2294 (Constrain_Index): Remove side effects in the evaluation of the bounds.
2295 * sem_ch3.ads, sem_ch3.adb
2296 (Is_Constant_Bound): New extended version of the subprogram that was
2297 previously located inside function Exp_Ch3.Is_Variable_Size_Array.
2298 Moved here since it is shared by routines of sem_ch3 and exp_ch3.
2299 * sem_aux.ads (Constant_Value): Fix typo in comment.
2300 * checks.adb (Generate_Index_Checks): New implementation which, for
2301 array objects with constant bounds, generates the runtime check
2302 referencing the bounds of the array type. For other cases this routine
2303 provides its previous behavior obtaining such values from the array
2305 * sem_res.adb (Set_Slice_Subtype): Link a copied range subtree with its
2307 * atree.adb (New_Copy): Reset flag Is_Overloaded in the new copy since
2308 we cannot have semantic interpretations of the new node.
2310 2011-08-01 Ed Schonberg <schonberg@adacore.com>
2312 * sem_ch6.adb (Fully_Conformant_Expressions): handle quantified
2315 2011-08-01 Arnaud Charlet <charlet@adacore.com>
2317 * sem_ch8.adb: Minor code editing.
2318 * s-vxwext.adb: Remove trailing space.
2319 * freeze.adb, freeze.ads, errout.ads, erroutc.adb: Fix GPLv3 header for
2320 consistency with other files.
2322 2011-08-01 Thomas Quinot <quinot@adacore.com>
2324 * s-auxdec.ads, s-auxdec-vms_64.ads: Minor reformatting.
2326 2011-08-01 Ed Schonberg <schonberg@adacore.com>
2328 * par-ch10.adb: reject parameterized expressions as compilation unit.
2329 * sem_ch4.adb: handle properly conditional expression with overloaded
2330 then_clause and no else_clause.
2332 2011-08-01 Tristan Gingold <gingold@adacore.com>
2334 * s-parame-vms-alpha.ads, s-parame-vms-ia64.ads: Redeclare C_Address
2335 like done by System.Aux_DEC.
2336 * env.c (__gnat_setenv) [VMS]: Put logicals into LNM$PROCESS table.
2338 2011-08-01 Yannick Moy <moy@adacore.com>
2340 * par-endh.adb (Check_End): issue a syntax error in SPARK mode for
2341 missing label at end of declaration (subprogram or package)
2342 * par-ch4.adb (P_Name): issue a syntax error in SPARK mode for mixing
2343 of positional and named parameter association
2344 * par.adb, par-util.adb (Formal_Error_Msg_SP): new wrapper on
2345 Error_Msg_SP which adds a prefix to the error message giving the name
2346 of the formal language analyzed
2347 * sem_ch6.adb (Analyze_Return_Type): issue an error in formal mode for
2348 access result type in subprogram, unconstrained array as result type,.
2349 (Analyze_Subprogram_Declaration): issue an error in formal mode for null
2351 * sem_ch8.adb: Code clean up.
2353 2011-08-01 Javier Miranda <miranda@adacore.com>
2355 * sem_ch7.adb (Uninstall_Declarations): Remove useless code.
2356 * einfo.ads (Access_Disp_Table): Fix documentation.
2357 (Dispatch_Table_Wrappers): Fix documentation.
2358 * einfo.adb (Access_Disp_Table, Dispatch_Table_Wrappers,
2359 Set_Access_Disp_Table, Set_Dispatch_Table_Wrappers): Fix the assertions
2360 to enforce the documentation of this attribute.
2361 (Set_Is_Interface): Cleanup the assertion.
2362 * exp_ch4.adb (Expand_Allocator_Expression, Tagged_Membership): Locate
2363 the Underlying_Type entity before reading attribute Access_Disp_Table.
2364 * exp_disp.adb (Expand_Dispatching_Call, Expand_Interface_Conversion):
2365 Locate the Underlying_Type before reading attribute Access_Disp_Table.
2366 * exp_aggr.adb (Build_Array_Aggr_Code, Build_Record_Aggr_Code): Locate
2367 the Underlying_Type entity before reading attribute Access_Disp_Table.
2368 * exp_ch3.adb (Build_Record_Init_Proc, Expand_N_Object_Declaration):
2369 Locate the Underlying_Type entity before reading attribute
2372 2011-08-01 Ed Schonberg <schonberg@adacore.com>
2374 * s-poosiz.ads: Additional overriding indicators.
2376 2011-08-01 Yannick Moy <moy@adacore.com>
2378 * sem_ch5.adb (Analyze_Exit_Statement): add return after error in
2380 (Analyze_Iteration_Scheme): issue error in formal mode when loop
2381 parameter specification does not include a subtype mark.
2382 * sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration): issue error in
2383 formal mode on abstract subprogram.
2384 (Analyze_Subprogram_Specification): issue error in formal mode on
2385 user-defined operator.
2386 (Process_Formals): issue error in formal mode on access parameter and
2388 * sem_ch9.adb (Analyze_Abort_Statement,
2389 Analyze_Accept_Statement, Analyze_Asynchronous_Select,
2390 Analyze_Conditional_Entry_Call, Analyze_Delay_Relative,
2391 Analyze_Delay_Until, Analyze_Entry_Call_Alternative,
2392 Analyze_Requeue, Analyze_Selective_Accept,
2393 Analyze_Timed_Entry_Call): issue error in formal mode on such constructs
2394 * sem_ch11.adb (Analyze_Raise_Statement, Analyze_Raise_xxx_Error):
2395 issue error in formal mode on user-defined raise statement.
2397 2011-08-01 Thomas Quinot <quinot@adacore.com>
2399 * sem_ch6.adb (Enter_Overloaded_Entity): Do not warn about a
2400 declaration being hidden when overriding an implicit inherited
2402 * par-ch10.adb (P_Compilation_Unit): In syntax check only mode
2403 (-gnats), do not complain about a source file that contains only a
2406 2011-08-01 Ed Schonberg <schonberg@adacore.com>
2408 * sem_ch5.adb (Analyze_Iterator_Scheme): Do not overwrite type of loop
2409 variable if already set.
2411 2011-08-01 Arnaud Charlet <charlet@adacore.com>
2413 * g-socket-dummy.adb, s-osinte-linux.ads, g-socket-dummy.ads,
2414 g-debuti.adb, g-tasloc.adb, g-debuti.ads, g-tasloc.ads,
2415 s-osinte-hpux.ads, g-sercom.adb, g-soliop-solaris.ads, g-sercom.ads,
2416 g-sptain.ads, g-curexc.ads, s-tasloc.adb, s-tasloc.ads, s-tataat.adb,
2417 g-ctrl_c.adb, a-reatim.adb, s-tataat.ads, g-dirope.adb, g-ctrl_c.ads,
2418 g-dirope.ads, g-boubuf.adb, g-calend.adb, g-boubuf.ads, g-souinf.ads,
2419 g-table.adb, g-bytswa-x86.adb, g-wispch.adb, g-io.adb, g-table.ads,
2420 g-wispch.ads, g-io.ads, g-memdum.adb, g-memdum.ads, g-busorg.adb,
2421 g-busorg.ads, g-regpat.adb, g-sothco-dummy.adb, g-encstr.adb,
2422 g-regpat.ads, g-sothco-dummy.ads, s-osinte-aix.ads, g-encstr.ads,
2423 g-sercom-mingw.adb, s-mastop-vms.adb, g-diopit.adb, g-diopit.ads,
2424 s-vxwext.adb, g-dyntab.adb, g-dyntab.ads, g-crc32.adb,
2425 g-sercom-linux.adb, g-crc32.ads, s-regpat.adb, g-flocon.ads,
2426 s-regpat.ads, g-stheme.adb, g-sestin.ads, s-taspri-posix-noaltstack.ads,
2427 g-soliop.ads, s-inmaop-posix.adb, g-locfil.ads, g-enblsp-vms-alpha.adb,
2428 g-socthi-dummy.adb, g-socthi-dummy.ads, gnat.ads, g-moreex.adb,
2429 g-moreex.ads, g-dynhta.adb, g-dynhta.ads, g-deutst.ads, g-htable.adb,
2430 g-cgicoo.adb, g-htable.ads, g-cgicoo.ads, a-interr.adb,
2431 g-socthi-vms.adb, g-socthi-vms.ads, g-hesora.adb, g-bubsor.adb,
2432 g-hesora.ads, g-bubsor.ads, g-md5.adb, g-md5.ads, s-intman-irix.adb,
2433 s-htable.adb, s-osinte-vms.adb, s-htable.ads, s-osinte-vms.ads,
2434 s-taprob.adb, g-bytswa.adb, g-bytswa.ads, s-osinte-solaris-posix.ads,
2435 a-suenco.adb, g-comver.adb, g-comver.ads, g-exctra.adb,
2436 s-osinte-solaris.adb, g-exctra.ads, s-osinte-irix.ads,
2437 s-osinte-solaris.ads, a-caldel-vms.adb, g-socthi-vxworks.adb,
2438 g-expect.adb, g-socthi-vxworks.ads, g-expect.ads, g-comlin.ads,
2439 g-heasor.adb, g-heasor.ads, g-traceb.adb, g-traceb.ads, g-decstr.adb,
2440 g-spipat.adb, g-decstr.ads, g-spipat.ads, s-mastop-tru64.adb,
2441 g-except.ads, g-thread.adb, g-hesorg.adb, g-thread.ads, g-hesorg.ads,
2442 g-expect-vms.adb, a-stuten.ads, g-spchge.adb, g-spchge.ads,
2443 g-u3spch.adb, g-u3spch.ads, g-spitbo.adb, g-spitbo.ads,
2444 s-osinte-dummy.ads, s-osinte-posix.adb, g-pehage.adb, g-pehage.ads,
2445 s-gloloc-mingw.adb, g-sha1.ads, s-traceb-hpux.adb,
2446 g-trasym-unimplemented.adb, g-trasym-unimplemented.ads, g-io_aux.adb,
2447 g-regexp.adb, g-io_aux.ads, g-socthi-mingw.adb, g-regexp.ads,
2448 s-osinte-hpux-dce.adb, g-socthi-mingw.ads, g-cgi.adb,
2449 s-osinte-hpux-dce.ads, g-cgi.ads, g-byorma.adb, g-boumai.ads,
2450 g-byorma.ads, a-caldel.adb, s-regexp.adb, s-regexp.ads,
2451 g-soliop-mingw.ads, g-sptavs.ads, s-osinte-tru64.ads, g-speche.adb,
2452 g-speche.ads, g-socthi.adb, g-stsifd-sockets.adb, g-socthi.ads,
2453 s-osinte-darwin.ads, i-vxwork-x86.ads, g-awk.adb, i-vxwork.ads,
2454 g-awk.ads, g-zspche.adb, g-zspche.ads, g-socket.adb, g-sptabo.ads,
2455 g-socket.ads, g-semaph.adb, g-semaph.ads, s-taspri-posix.ads,
2456 g-enblsp-vms-ia64.adb, g-cgideb.adb, g-cgideb.ads, g-sothco.adb,
2457 s-osinte-freebsd.ads, g-sothco.ads, g-catiio.adb, g-casuti.adb,
2458 g-catiio.ads, g-casuti.ads, g-trasym.adb, g-trasym.ads, s-casuti.adb,
2459 g-os_lib.adb, s-traceb-mastop.adb, g-busora.adb, s-interr-dummy.adb,
2460 g-busora.ads, g-enutst.ads, s-os_lib.adb, a-tasatt.adb,
2461 s-osinte-mingw.ads: Update to GPLv3 run-time license.
2462 Use GNAT instead of GNARL.
2464 2011-08-01 Bob Duff <duff@adacore.com>
2466 * a-cdlili.ads, a-cihama.ads, a-coinve.ads, a-ciorse.ads, a-coorma.ads,
2467 a-cidlli.ads, a-ciormu.ads, a-cihase.ads, a-cohama.ads, a-coorse.ads,
2468 a-ciorma.ads, a-coormu.ads, a-convec.ads, a-cohase.ads: Minor
2471 2011-08-01 Yannick Moy <moy@adacore.com>
2473 * debug.adb (d.D) reverve flag for the SPARK mode
2474 (d.E) reverve flag for SPARK generation mode
2475 (d.F) reverve flag for Why generation mode
2476 * opt.ads, opt.adb (ALFA_Mode, ALFA_Through_SPARK_Mode,
2477 ALFA_Through_Why_Mode, Formal_Verification_Mode, SPARK_Mode): New
2478 functions which return True when the corresponding modes are set
2479 (Formal_Language): return "spark" or "alfa" when in formal verification
2481 * sem_util.ads, sem_util.adb (Formal_Error_Msg): new wrapper on
2482 Error_Msg to prefix the error message with a tag giving the formal
2484 (Formal_Error_Msg_N): new wrapper on Error_Msg_N to prefix the error
2485 message with a tag giving the formal language
2486 * sem_ch5.adb (Analyze_Block_Statement): issue error in formal mode on
2488 (Analyze_Case_Statement): issue error in formal mode on case statement
2489 with a single "others" case alternative
2490 (Analyze_Exit_Statement): issue errors in formal mode on exit
2491 statements which do not respect SPARK restrictions
2492 (Analyze_Goto_Statement): issue error in formal mode on goto statement
2493 (Check_Unreachable_Code): always issue an error (not a warning) in
2494 formal mode on unreachable code (concerns both code after an infinite
2495 loop and after an unconditional jump, both not allowed in SPARK)
2496 * sem_ch6.adb (Analyze_Return_Statement): add call to
2497 Set_Return_Present for a procedure containing a return statement
2498 (already done for functions in Analyze_Function_Return)
2499 (Analyze_Function_Return): issue error in formal mode on extended
2500 return or if return is not last statement in function
2501 (Check_Missing_Return): issue error in formal mode if function does
2502 not end with return or if procedure contains a return
2503 * sem_ch8.ads, sem_ch8.adb (Has_Loop_In_Inner_Open_Scopes): new
2504 function to detect if there is an inner scope of its parameter S which
2507 2011-08-01 Thomas Quinot <quinot@adacore.com>
2509 * sem_ch6.ads: Minor reformatting.
2511 2011-08-01 Javier Miranda <miranda@adacore.com>
2513 * sem_util.adb (Abstract_Interface_List): Complete condition when
2514 processing private type declarations to avoid reading unavailable
2516 (Is_Synchronized_Tagged_Type): Complete condition when processing
2517 private extension declaration nodes to avoid reading unavailable
2520 2011-08-01 Thomas Quinot <quinot@adacore.com>
2522 * sem_ch3.adb: Minor reformatting.
2524 2011-08-01 Thomas Quinot <quinot@adacore.com>
2526 * s-parame-ae653.ads, s-parame-vms-alpha.ads, s-parame-hpux.ads,
2527 i-cpoint.adb, i-cstrin.adb, i-cpoint.ads, i-cstrin.ads,
2528 s-parame-vms-ia64.ads, s-parame.ads, i-c.ads, s-parame-vxworks.ads,
2529 s-parame-vms-restrict.ads: Remove duplicated Interfaces.C.* packages
2530 for VMS, instead parametrize the common implementation with
2531 System.Parameters declarations.
2533 2011-08-01 Eric Botcazou <ebotcazou@adacore.com>
2535 * gnat_rm.texi: Document limitation of Pragma No_Strict_Aliasing.
2537 2011-08-01 Tristan Gingold <gingold@adacore.com>
2539 * seh_init.c: Fix SEH handler installation on win64.
2541 2011-08-01 Ed Schonberg <schonberg@adacore.com>
2543 * sem_ch3.adb (Access_Subprogram_Declaration): in Asis mode, prevent
2544 double analysis of an anonymous access to subprogram, because it can
2545 lead to improper sharing of profiles and a back-end crash.
2547 2011-08-01 Robert Dewar <dewar@adacore.com>
2549 * make.adb, sem_ch4.adb: Minor reformatting.
2550 * gcc-interface/Make-lang.in: Update dependencies.
2551 * sem_util.adb, exp_ch5.adb: Minor reformatting.
2553 2011-08-01 Arnaud Charlet <charlet@adacore.com>
2555 * gnat_rm.texi: Fix definition of Long_Integer.
2557 2011-08-01 Ed Schonberg <schonberg@adacore.com>
2559 * exp_aggr.adb: check limit size of static aggregate unconditionally,
2560 to prevent storage exhaustion.
2561 * exp_ch7.adb (Clean_Simple_Protected_Objects): if the scope being
2562 finalized is a function body, insert the cleanup code before the final
2563 return statement, to prevent spurious warnings.
2564 * s-pooglo.ads: add overriding indicator.
2566 2011-08-01 Ed Schonberg <schonberg@adacore.com>
2568 * sem_ch4.adb (Operator_Check): improve error message when both a
2569 with_clause and a use_clause are needed to make operator usage legal.
2570 * sem_util.ads, sem_util.adb (Unit_Is_Visible): new predicate to
2571 determine whether a compilation unit is visible within an other,
2572 either through a with_clause in the current unit, or a with_clause in
2573 its library unit or one one of its parents.
2575 2011-08-01 Ed Schonberg <schonberg@adacore.com>
2577 * exp_ch5.adb (Expand_N_Iterator_Loop): handle properly an iterator
2578 over an arbitrary expression of an array or container type.
2579 * lib-xref.adb: clarify comment.
2581 2011-08-01 Bob Duff <duff@adacore.com>
2583 * einfo.ads: Minor reformatting.
2584 * debug.adb: Minor comment improvement.
2586 2011-08-01 Javier Miranda <miranda@adacore.com>
2588 * sem_ch4.adb (Try_Object_Operation): For class-wide subprograms do not
2589 consider hidden subprograms as valid candidates.
2591 2011-08-01 Arnaud Charlet <charlet@adacore.com>
2593 * make.adb (Compile): Strip -mxxx switches in CodePeer mode.
2595 2011-08-01 Vasiliy Fofanov <fofanov@adacore.com>
2597 * gnat_ugn.texi: Fix typo.
2599 2011-08-01 Robert Dewar <dewar@adacore.com>
2601 * i-cstrin.adb, sem_util.adb, exp_ch11.adb, sem_ch8.adb,
2602 lib-xref.adb: Minor reformatting
2604 2011-08-01 Gary Dismukes <dismukes@adacore.com>
2606 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Replace test of
2607 when to generate a call to Move_Final_List.
2608 (Has_Controlled_Parts): Remove this function.
2610 2011-08-01 Geert Bosch <bosch@adacore.com>
2612 * par-ch3.adb (P_Discrete_Choice_List): Improve error message for extra
2615 2011-08-01 Thomas Quinot <quinot@adacore.com>
2617 * exp_ch11.adb (Expand_N_Raise_Statement): Mark N_Raise_xxx_Error for
2618 explicit raise of a predefined exception as Comes_From_Source if the
2619 original N_Raise_Statement comes from source.
2621 2011-08-01 Robert Dewar <dewar@adacore.com>
2623 * sinfo.ads: Add comment.
2624 * sem_ch6.adb: Minor reformatting.
2626 2011-08-01 Robert Dewar <dewar@adacore.com>
2628 * freeze.adb (Freeze_Entity): Refine check for bad component size
2629 clause to avoid rejecting confirming clause when atomic/aliased present.
2631 2011-08-01 Ed Schonberg <schonberg@adacore.com>
2633 * sem_ch8.adb (Find_Direct_Name, Analyze_Expanded_Name): use Is_LHS to
2634 better determine whether an entity reference is a write.
2635 * sem_util.adb (Is_LHS): refine predicate to handle assignment to a
2637 * lib-xref.adb (Output_References): Do no suppress a read reference at
2638 the same location as an immediately preceeding modify-reference, to
2639 handle properly in-out actuals.
2641 2011-08-01 Tristan Gingold <gingold@adacore.com>
2643 * env.c (__gnat_setenv) [VMS]: Refine previous change.
2645 2011-08-01 Quentin Ochem <ochem@adacore.com>
2647 * i-cstrin.adb (New_String): Changed implementation, now uses only the
2648 heap to compute the result.
2650 2011-08-01 Robert Dewar <dewar@adacore.com>
2652 * atree.ads: Minor reformatting.
2654 2011-08-01 Emmanuel Briot <briot@adacore.com>
2656 * g-expect.adb (Get_Command_Output): Fix memory leak.
2658 2011-08-01 Geert Bosch <bosch@adacore.com>
2660 * cstand.adb (P_Float_Type): New procedure to print the definition of
2661 predefined fpt types.
2662 (P_Mixed_Name): New procedure to print a name using mixed case
2663 (Print_Standard): Use P_Float_Type for printing floating point types
2664 * einfo.adb (Machine_Emax_Value): Add preliminary support for quad
2665 precision IEEE float.
2667 2011-08-01 Thomas Quinot <quinot@adacore.com>
2669 * sem_ch3.adb: Minor reformatting.
2671 2011-08-01 Ed Schonberg <schonberg@adacore.com>
2673 * sem_ch6.adb (Analyze_Parameterized_Expression): If the expression is
2674 the completion of a generic function, insert the new body rather than
2675 rewriting the original.
2677 2011-08-01 Yannick Moy <moy@adacore.com>
2679 * sinfo.ads, errout.ads: Typos in comments.
2681 2011-08-01 Robert Dewar <dewar@adacore.com>
2683 * par-endh.adb: Minor reformatting.
2685 2011-08-01 Robert Dewar <dewar@adacore.com>
2687 * aspects.ads, aspects.adb: Add aspects for library unit pragmas
2688 (Pre_Post_Aspects): New subtype.
2689 * par-ch12.adb (P_Generic): New syntax for aspects in packages
2690 * par-ch13.adb (P_Aspect_Specifications): Add Semicolon parameter
2691 * par-ch7.adb (P_Package): Remove Decl parameter
2692 (P_Package): Handle new syntax for aspects (before IS)
2693 * par-ch9.adb (P_Protected_Definition): Remove Decl parameter, handle
2695 (P_Task_Definition): Remove Decl parameter, handle new aspect syntax
2696 * par.adb (P_Aspect_Specifications): Add Semicolon parameter
2697 (P_Package): Remove Decl parameter
2698 * sem_ch13.adb (Analyze_Aspect_Specifications): Handle library unit
2700 * sem_ch7.adb (Analyze_Package_Declaration): Analyze new format aspect
2702 * sem_util.ads, sem_util.adb (Static_Boolean): New function
2703 * sinfo.ads: Document new syntax for aspects in packages etc.
2704 * sprint.adb: Handle new syntax of aspects before IS in package
2706 2011-08-01 Thomas Quinot <quinot@adacore.com>
2708 * atree.ads: Minor reformatting.
2709 * sem_prag.adb: Minor reformatting.
2711 2011-08-01 Robert Dewar <dewar@adacore.com>
2713 * exp_util.adb (Insert_Actions): Fix error in handling Actions for
2714 case expr alternative.
2716 2011-08-01 Ed Schonberg <schonberg@adacore.com>
2718 * sem_ch12.adb: Fix typo.
2720 2011-08-01 Geert Bosch <bosch@adacore.com>
2722 * sem_prag.adb (Check_No_Link_Name): New procedure.
2723 (Process_Import_Or_Interface): Use Check_No_Link_Name.
2724 * cstand.adb (Create_Standard): Use Esize (Standard_Long_Long_Float)
2725 instead of Standard_Long_Long_Float_Size global. Preparation for
2726 eventual removal of per type constants.
2727 * exp_util.ads (Get_Stream_Size): New function returning the stream
2728 size value of subtype E.
2729 * exp_util.adb (Get_Stream_Size): Implement new function.
2730 * exp_strm.adb (Build_Elementary_Input_Call): Use Get_Stream_Size
2732 * exp_attr.adb (Attribute_Stream_Size): Use Get_Stream_Size
2734 (Machine_Mantissa_Value): Handle 128-bit quad precision IEEE floats
2736 2011-08-01 Geert Bosch <bosch@adacore.com>
2738 * cstand.adb: Fix comments.
2739 * sem_prag.adb (Analyze_Pragma): Use List_Length instead of explicit
2742 2011-08-01 Robert Dewar <dewar@adacore.com>
2744 * exp_ch4.adb, sem_cat.adb: Minor reformatting.
2746 2011-08-01 Geert Bosch <bosch@adacore.com>
2748 * atree.ads: Fix comment.
2750 2011-08-01 Robert Dewar <dewar@adacore.com>
2752 * aspects.ads, aspects.adb (Aspect_Names): Moved from body to spec.
2753 * par-ch13.adb (P_Aspect_Specifications): Check misspelled aspect name.
2754 * par.adb: Add with for Namet.Sp.
2755 * par-tchk.adb: Minor reformatting.
2757 2011-08-01 Vincent Celier <celier@adacore.com>
2759 * mlib-tgt-specific-vms-alpha.adb, mlib-tgt-specific-vms-ia64.adb
2760 (Build_Dynamic_Library): Use new function Init_Proc_Name to get the name
2761 of the init procedure of a SAL.
2762 * mlib-tgt-vms_common.ads, mlib-tgt-vms_common.adb (Init_Proc_Name):
2765 2011-08-01 Thomas Quinot <quinot@adacore.com>
2767 * exp_ch4.adb, s-tasini.ads, sem_attr.adb, s-soflin.ads: Minor
2770 2011-08-01 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
2772 * adaint.c (__gnat_file_time_name_attr): Get rid of warning.
2774 2011-08-01 Thomas Quinot <quinot@adacore.com>
2776 * sem_util.adb, sem_util.ads (Has_Overriding_Initialize): Make function
2777 conformant with its spec (return True only for types that have
2778 an overriding Initialize primitive operation that prevents them from
2779 having preelaborable initialization).
2780 * sem_cat.adb (Validate_Object_Declaration): Fix test for preelaborable
2781 initialization for controlled types in Ada 2005 or later mode.
2783 2011-08-01 Robert Dewar <dewar@adacore.com>
2785 * aspects.ads, aspects.adb: Add aspect Type_Invariant, Precondition,
2787 (Same_Aspect): New function.
2788 * sem_ch13.adb (Analyze_Aspect_Specifications): Add aspect
2789 Type_Invariant, Precondition, Postcondition.
2790 * snames.ads-tmpl: Add Name_Type_Invariant.
2792 2011-08-01 Robert Dewar <dewar@adacore.com>
2794 * freeze.adb (Freeze_Entity): Don't call Check_Aspect_At_Freeze_Point
2796 (Freeze_All_Ent): Fix error in handling inherited aspects.
2797 * sem_ch13.adb (Analyze_Aspect_Specifications): Skip aspect that is
2798 already analyzed, but don't skip entire processing of a declaration,
2799 that's wrong in some cases of declarations being rewritten.
2800 (Analyze_Aspect_Specification): Set Is_Delayed_Aspect in aspects.
2801 Don't delay for integer, string literals
2802 Treat predicates in usual manner for delay, remove special case code,
2804 (Analyze_Freeze_Entity): Make call to Check_Aspect_At_Freeze_Point
2805 (Build_Predicate_Function): Update saved expression in aspect
2806 (Build_Invariant_Procedure): Update saved expression in aspect
2807 * exp_ch4.adb (Expand_N_Selected_Component): Only do the optimization
2808 of replacement of discriminant references if the reference is simple.
2810 2011-08-01 Robert Dewar <dewar@adacore.com>
2812 * aspects.ads, aspects.adb: Add Static_Predicate and Dynamic_Predicate.
2813 * sem_ch13.adb (Analyze_Aspect_Specification): Add processing for
2814 Static_Predicate and Dynamic_Predicate.
2815 (Build_Predicate_Function): Add processing for Static_Predicate
2816 and Dynamic_Predicate.
2817 * sinfo.ads, sinfo.adb (From_Dynamic_Predicate): New flag
2818 (From_Static_Predicate): New flag
2819 * snames.ads-tmpl: Add Name_Static_Predicate and Name_Dynamic_Predicate
2821 2011-08-01 Robert Dewar <dewar@adacore.com>
2823 * usage.adb: Documentation cleanup for Ada version modes in usage.
2824 * expander.adb: Minor reformatting.
2826 2011-08-01 Robert Dewar <dewar@adacore.com>
2828 * atree.ads: Minor comment fix.
2829 * a-stwifi.adb, a-stzfix.adb, a-strfix.adb, a-ztexio.ads, a-textio.ads,
2830 a-witeio.ads, sem_prag.adb: Minor reformatting.
2832 2011-08-01 Doug Rupp <rupp@adacore.com>
2834 * env.c (__gnat_setenv) [VMS]: Force 32bit on item list structure
2835 pointers. Use descrip.h header file for convenience. Add some
2838 2011-08-01 Robert Dewar <dewar@adacore.com>
2840 * freeze.adb (Freeze_Entity): Call Check_Aspect_At_Freeze_Point
2841 (Freeze_All): Call Check_Aspect_At_End_Of_Declarations
2842 * sem_ch13.ads, sem_ch13.adb (Check_Aspect_At_Freeze_Point):
2844 (Check_Aspect_At_End_Of_Declarations): New procedure
2845 (Analye_Aspect_Specification): Minor changes for above procedures
2846 * sinfo.ads, sinfo.adb (Is_Delayed_Aspect): Now set in aspect
2847 specification node as well.
2849 2011-08-01 Pascal Obry <obry@adacore.com>
2851 * adaint.c (_gnat_stat): GetFilesAttributesEx() would fail on special
2852 Windows files. Use GetFilesAttributes() in this case to check for file
2853 existence instead of returning with an error code.
2855 2011-08-01 Vincent Celier <celier@adacore.com>
2857 * a-stzfix.adb, a-stwifi.adb (Replace_Slice): Fixed computation when
2858 High is above Source length.
2860 2011-08-01 Robert Dewar <dewar@adacore.com>
2862 * a-ztexio.ads, a-textio.ads, a-witeio.ads: Fix comment.
2864 2011-08-01 Robert Dewar <dewar@adacore.com>
2866 * aspects.ads (Boolean_Aspects): New subtype.
2867 * exp_ch13.adb (Expand_Freeze_Entity): Fix errors in handling aspects
2868 for derived types in cases where the parent type and derived type have
2870 * freeze.adb (Freeze_Entity): Fix problems in handling derived type
2871 with aspects when parent type also has aspects.
2872 (Freeze_Entity): Deal with delay of boolean aspects (must evaluate
2873 boolean expression at this point).
2874 * sem_ch13.adb (Analyze_Aspect_Specifications): Delay all aspects in
2875 accordance with final decision on the Ada 2012 feature.
2876 * sinfo.ads, sinfo.adb (Is_Boolean_Aspect): New flag.
2878 2011-08-01 Matthew Heaney <heaney@adacore.com>
2880 * a-chtgbo.adb (Delete_Node_Sans_Free): Replace iterator with selector.
2882 2011-08-01 Pascal Obry <obry@adacore.com>
2884 * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb:
2885 Fix Replace_Slice when High is above current string size.
2886 (Replace_Slice): Fix DL computation when High is above current
2889 2011-08-01 Gary Dismukes <dismukes@adacore.com>
2891 * gnat_rm.texi: Add documentation for pragma Static_Elaboration_Desired.
2893 2011-08-01 Matthew Heaney <heaney@adacore.com>
2895 * a-rbtgbo.adb (Delete_Node_Sans_Free): Fixed assignment to left child
2898 2011-08-01 Pascal Obry <obry@adacore.com>
2900 * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb: Minor
2903 2011-08-01 Ed Schonberg <schonberg@adacore.com>
2905 * sem_attr.adb (Analyze_Attribute, case 'Access): Handle properly named
2906 access to protected subprograms in generic bodies.
2907 * sem_ch6.adb (Analyze_Subprogram_Declaration): If the context is a
2908 protected type, indicate that the convention of the subprogram is
2909 Convention_Protected, because it may be used in subsequent declarations
2910 within the protected declaration.
2912 2011-08-01 Vincent Celier <celier@adacore.com>
2914 * mlib-prj.adb (Build_Library): Use "ada_" as the prefix for the "init"
2915 and "final" procedures when the name of the library is "ada", to avoid
2916 duplicate symbols "adainit" and "adafinal" in executables.
2918 2011-08-01 Ed Schonberg <schonberg@adacore.com>
2920 * sem_attr.adb (Analyze_Attribute, case 'Result): Handle properly a
2921 quantified expression that appears within a postcondition and uses the
2922 Ada2012 'Result attribute.
2924 2011-07-28 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
2926 * init.c (__gnat_error_handler): Cast reason to int.
2927 (__gnat_install_handler): Explain sa_sigaction use.
2929 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
2931 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: If the
2932 subprogram has copy-in copy-out parameters, try to promote the mode of
2933 the return type if it is passed in registers.
2935 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
2937 * gcc-interface/utils2.c (build_binary_op) <ARRAY_REF>: Do not mark the
2938 left operand as addressable.
2940 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
2942 * gcc-interface/gigi.h (build_function_stub): Remove.
2943 (build_return_expr): Likewise.
2944 (convert_vms_descriptor): Declare.
2945 * gcc-interface/utils.c (convert_vms_descriptor): Make global.
2946 (build_function_stub): Move to...
2947 * gcc-interface/utils2.c (build_return_expr): Move to...
2948 * gcc-interface/trans.c (build_function_stub): ...here.
2949 (build_return_expr): ...here.
2950 (Subprogram_Body_to_gnu): Add local variable for language_function.
2951 Disconnect the parameter attributes cache, if any, once done with it.
2952 Call end_subprog_body only after setting the end_locus.
2953 Build the stub associated with the function, if any, at the very end.
2954 (gnat_to_gnu) <N_Return_Statement>: Remove couple of useless local
2955 variables and streamline control flow.
2957 2011-07-23 Arnaud Charlet <charlet@adacore.com>
2960 * gcc-interface/Makefile.in (powerpc-linux): Remove reference to
2963 2011-07-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
2966 * init.c [sun && __SVR4 && !__vxworks] (__gnat_install_handler):
2967 Assign to act.sa_sigaction.
2968 * tracebak.c [USE_GENERIC_UNWINDER] (__gnat_backtrace): Cast
2969 current->return_address to char * before arithmetic.
2971 2011-07-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
2973 * init.c [sgi] (__gnat_error_handler): Update sigaction(2) citation.
2974 Correct argument types.
2975 Extract code from reason.
2976 (__gnat_install_handler): Assign to act.sa_sigaction.
2978 2011-07-21 Eric Botcazou <ebotcazou@adacore.com>
2980 * gcc-interface/Make-lang.in (GNAT1_ADA_OBJS): Move ada/b_gnat1.o to...
2981 (GNAT1_OBJS): ...here.
2983 2011-07-15 Eric Botcazou <ebotcazou@adacore.com>
2986 * g-socthi-mingw.adb (Fill): Fix formatting.
2988 * gcc-interface/gigi.h: Move around comment.
2990 2011-07-14 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
2993 * s-taprop-hpux-dce.adb (Abort_Task): Remove unnecessary cast.
2995 2011-07-14 Florian Weimer <fw@deneb.enyo.de>
2998 * g-socthi-mingw.adb (Fill): Guard against invalid MSG_WAITALL.
3000 2011-07-13 Eric Botcazou <ebotcazou@adacore.com>
3002 * gcc-interface/utils.c (build_vms_descriptor32): Skip the 32-bit
3003 range comparison if Pmode is SImode.
3005 2011-07-12 Laurent GUERBY <laurent@guerby.net>
3006 Eric Botcazou <ebotcazou@adacore.com>
3008 * adadecode.c: Wrap up in extern "C" block.
3009 * adadecode.h: Likewise.
3010 * adaint.c: Likewise. Remove 'const' keyword.
3011 * adaint.h: Likewise.
3013 * atree.h: Likewise.
3015 * cstreams.c: Likewise.
3019 * final.c: Likewise.
3021 * initialize.c: Likewise.
3023 * namet.h: Likewise.
3024 * nlists.h: Likewise.
3025 * raise.c: Likewise.
3026 * raise.h: Likewise.
3027 * repinfo.h: Likewise.
3028 * seh_init.c: Likewise.
3029 * targext.c: Likewise.
3030 * tracebak.c: Likewise.
3031 * uintp.h: Likewise.
3032 * urealp.h: Likewise.
3033 * xeinfo.adb: Wrap up generated C code in extern "C" block.
3034 * xsinfo.adb: Likewise.
3035 * xsnamest.adb: Likewise.
3036 * gcc-interface/gadaint.h: Wrap up in extern "C" block.
3037 * gcc-interface/gigi.h: Wrap up some prototypes in extern "C" block.
3038 * gcc-interface/misc.c: Likewise.
3039 * gcc-interface/Make-lang.in (GCC_LINK): Use LINKER.
3040 (GNAT1_C_OBJS): Remove ada/b_gnat1.o. List ada/seh_init.o and
3041 ada/targext.o here...
3042 (GNAT_ADA_OBJS): ...and not here.
3043 (GNAT1_ADA_OBJS): Add ada/b_gnat1.o.
3044 (GNATBIND_OBJS): Reorder.
3046 2011-07-07 Richard Henderson <rth@redhat.com>
3048 * gcc-interface/misc.c (gnat_init_gcc_eh): Don't call
3049 dwarf2out_frame_init.
3051 2011-07-07 Eric Botcazou <ebotcazou@adacore.com>
3053 * gcc-interface/misc.c (gnat_init): Tweak previous change.
3055 2011-07-07 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
3058 * gcc-interface/Makefile.in: Handle x86_64-solaris2.
3060 2011-07-06 Richard Guenther <rguenther@suse.de>
3062 * gcc-interface/misc.c (gnat_init): Merge calls to
3063 build_common_tree_nodes and build_common_tree_nodes_2.
3064 Re-initialize boolean_false_node.
3066 2011-07-02 Eric Botcazou <ebotcazou@adacore.com>
3067 Olivier Hainque <hainque@adacore.com>
3068 Nicolas Setton <setton@adacore.com>
3070 * gcc-interface/utils.c (record_builtin_type): Set TYPE_ARTIFICIAL on
3071 the type according to the ARTIFICIAL_P parameter.
3072 (create_type_decl): Likewise.
3073 (create_type_stub_decl): Set TYPE_ARTIFICIAL on the type to 1.
3075 2011-07-01 Eric Botcazou <ebotcazou@adacore.com>
3077 * gcc-interface/Make-lang.in (gnat1): Prepend '+' to the command.
3078 (gnatbind): Likewise.
3080 2011-06-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
3082 * gcc-interface/Makefile.in (TOOLS_LIBS): Add $(LIBINTL).
3084 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
3086 * gcc-interface/decl.c (gnat_to_gnu_component_type): Use GNAT_TYPE
3087 local variable throughout. Remove useless call to Base_Type.
3088 (gnat_to_gnu_field): Use GNAT_FIELD_TYPE local variable throughout.
3089 Take it also into account for the volatileness of the field. Set the
3090 TREE_SIDE_EFFECTS flag as well in this case. Reorder some warnings.
3092 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
3094 * gcc-interface/trans.c (Identifier_to_gnu): Don't set TREE_THIS_NOTRAP
3095 on a dereference built for a by-ref object if it has an address clause.
3097 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
3099 * einfo.ads (Address_Taken): Document use for the second argument of
3100 Asm_Input and Asm_Output attributes.
3101 * sem_attr.adb (Analyze_Attribute) <Attribute_Asm_Input>: If the second
3102 argument is an entity name, then set Address_Taken on it.
3103 <Attribute_Asm_Output>: Likewise.
3104 * gcc-interface/trans.c (lvalue_required_for_attribute_p): Handle the
3105 Attr_Asm_Input and Attr_Asm_Output attributes explicitly.
3106 (gnat_to_gnu) <N_Code_Statement>: If an operand is going to end up in
3107 memory and is a CONST_DECL, retrieve its corresponding VAR_DECL.
3109 2011-06-16 Joern Rennecke <joern.rennecke@embecosm.com>
3112 * gcc-interface/decl.c (gnat_to_gnu_param): Use pack_cumulative_args.
3114 2011-06-14 Joseph Myers <joseph@codesourcery.com>
3116 * gcc-interface/Make-lang.in (gnatbind$(exeext)): Use ggc-none.o.
3117 (ada/utils.o): Update dependencies.
3118 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Add
3119 ../../../libcpp/libcpp.a.
3120 * gcc-interface/utils.c: Include common/common-target.h.
3121 (process_attributes): Use targetm_common.have_named_sections.
3123 2011-06-07 Richard Guenther <rguenther@suse.de>
3125 * gcc-interface/misc.c (gnat_init): Do not set size_type_node or call
3128 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
3130 * gcc-interface/utils2.c (gnat_stabilize_reference): Propagate the
3131 TREE_THIS_NOTRAP flag.
3133 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
3135 * gcc-interface/utils2.c (gnat_stabilize_reference) <COMPOUND_EXPR>:
3138 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
3140 * gcc-interface/trans.c (Identifier_to_gnu): Also handle deferred
3141 constants whose full view has discriminants specially.
3143 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
3145 * gcc-interface/utils.c: Include diagnostic.h.
3146 (gnat_write_global_declarations): Output debug information for all
3147 global type declarations before finalizing the compilation unit.
3148 * gcc-interface/Make-lang.in (ada/utils.o): Add dependency.
3150 2011-05-25 Jakub Jelinek <jakub@redhat.com>
3152 * gcc-interface/utils.c (def_fn_type): Remove extra va_end.
3154 2011-05-25 Kai Tietz <ktietz@redhat.com>
3156 * adaint.c (__gnat_to_canonical_file_list_next): Use array
3157 initialization instead of const/none-const pointer assignment.
3159 2011-05-24 Joseph Myers <joseph@codesourcery.com>
3161 * gcc-interface/Make-lang.in (GNAT1_OBJS): Don't include
3162 $(EXTRA_GNAT1_OBJS).
3163 (GNATBIND_OBJS): Don't include $(EXTRA_GNATBIND_OBJS).
3164 (EXTRA_GNAT1_OBJS, EXTRA_GNATBIND_OBJS): Remove.
3165 (gnat1$(exeext), gnatbind$(exeext)): Use libcommon-target.a.
3166 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use
3167 libcommon-target.a instead of prefix.o.
3169 2011-05-21 Joseph Myers <joseph@codesourcery.com>
3172 * gcc-interface/Make-lang.in (gnatbind$(exeext)): Depend on $(LIBDEPS).
3174 2011-05-20 Joseph Myers <joseph@codesourcery.com>
3176 * gcc-interface/Make-lang.in (EXTRA_GNATBIND_OBJS): Remove version.o.
3177 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use libcommon.a
3178 instead of version.o.
3180 2011-05-18 Kai Tietz <ktietz@redhat.com>
3182 * gcc-interface/trans.c (Exception_Handler_to_gnu_sjlj): Use
3183 boolean_false_node instead of integer_zero_node.
3184 (convert_with_check): Likewise.
3185 * gcc-interface/decl.c (choices_to_gnu): Likewise.
3187 2011-05-12 Eric Botcazou <ebotcazou@adacore.com>
3189 * gcc-interface/trans.c (call_to_gnu): In the by-reference case, if the
3190 type of the parameter is an unconstrained array, convert the actual to
3191 the type of the formal in the In Out and Out cases as well.
3193 2011-05-11 Nathan Froyd <froydnj@codesourcery.com>
3195 * gcc-interface/utils.c (def_fn_type): Don't call build_function_type;
3196 call build_function_type_array or build_varargs_function_type_array
3198 (create_subprog_type): Don't call build_function_type; call
3199 build_function_type_vec instead.
3201 2011-05-11 Nathan Froyd <froydnj@codesourcery.com>
3203 * gcc-interface/ada-tree.h (TYPE_OBJECT_RECORD_TYPE): Use TYPE_MINVAL.
3204 (TYPE_GCC_MIN_VALUE): Use TYPE_MINVAL.
3205 (TYPE_GCC_MAX_VALUE): Use TYPE_MAXVAL.
3207 2011-05-07 Eric Botcazou <ebotcazou@adacore.com>
3209 * gcc-interface/decl.c (intrin_arglists_compatible_p): Remove spaces.
3211 * gcc-interface/gigi.h (global_bindings_p): Adjust prototype.
3212 * gcc-interface/utils.c (global_bindings_p): Return bool and simplify.
3214 2011-05-05 Nathan Froyd <froydnj@codesourcery.com>
3216 * gcc-interface/trans.c (Case_Statement_to_gnu): Call build_case_label.
3218 2011-05-05 Nathan Froyd <froydnj@codesourcery.com>
3220 * gcc-interface/decl.c (intrin_arglists_compatible_p): Use iterators
3221 instead of accessing TYPE_ARG_TYPES directly.
3222 * gcc-interface/utils.c (handle_nonnull_attribute): Likewise.
3224 2011-05-05 Eric Botcazou <ebotcazou@adacore.com>
3227 * gcc-interface/gigi.h (get_variant_part): Declare.
3228 * gcc-interface/decl.c (get_variant_part): Make global.
3229 * gcc-interface/utils2.c (find_common_type): Do not return T1 if the
3230 types have the same constant size, are record types and T1 has a
3231 variant part while T2 doesn't.
3233 2011-05-05 Eric Botcazou <ebotcazou@adacore.com>
3235 * gcc-interface/utils.c (begin_subprog_body): Do not call
3237 (end_subprog_body): Likewise.
3239 2011-05-04 Richard Guenther <rguenther@suse.de>
3241 * gcc-interface/trans.c (gnat_to_gnu): Remove zero notrunc argument to
3243 (pos_to_constructor): Likewise.
3245 2011-05-03 Nathan Froyd <froydnj@codesourcery.com>
3246 Eric Botcazou <ebotcazou@adacore.com>
3248 * gcc-interface/trans.c (gigi): Call build_function_type_list instead
3249 of build_function_type. Adjust calls to...
3250 (build_raise_check): ...this. Do not take a void_tree parameter.
3251 Call build_function_type_list instead of build_function_type.
3252 Fix head comment and swap couple of conditional blocks.
3254 2011-04-30 Eric Botcazou <ebotcazou@adacore.com>
3256 * gnatvsn.ads (Library_Version): Bump to 4.7.
3257 (Current_Year): Bump to 2011.
3259 2011-04-29 Michael Matz <matz@suse.de>
3261 * gcc-interface/misc.c (gnat_handle_option): Set
3262 warn_maybe_uninitialized.
3264 2011-04-23 Gerald Pfeifer <gerald@pfeifer.com>
3266 * gnat_ugn.texi (Complexity Metrics Control): Update link to
3267 the Watson/McCabe paper.
3269 2011-04-23 Jim Meyering <meyering@redhat.com>
3271 * gnat_ugn.texi (Examples of gnatxref Usage): Fix typo: s/it it/it is/
3273 2011-04-22 Eric Botcazou <ebotcazou@adacore.com>
3275 * gcc-interface/decl.c (make_packable_type): Copy DECL_PARALLEL_TYPE
3278 2011-04-22 Eric Botcazou <ebotcazou@adacore.com>
3280 * gcc-interface/gigi.h (create_subprog_decl): Add ARTIFICIAL_FLAG
3282 * gcc-interface/utils.c (create_subprog_decl): Likewise. Set
3283 DECL_ARTIFICIAL and DECL_NO_INLINE_WARNING_P on the DECL accordingly.
3284 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: Add
3285 ARTIFICIAL_FLAG local variable and pass it to create_subprog_decl.
3286 <all>: Do not set flags on the reused DECL node coming from an alias.
3287 Set DECL_IGNORED_P on the DECL node built for subprograms if they
3288 don't need debug info here...
3289 * gcc-interface/trans.c (Subprogram_Body_to_gnu): ...and not here.
3290 (gigi): Adjust calls to create_subprog_decl.
3291 (build_raise_check): Likewise.
3292 (establish_gnat_vms_condition_handler): Likewise.
3293 (Compilation_Unit_to_gnu): Likewise.
3294 (gnat_to_gnu): Likewise.
3296 2011-04-21 Eric Botcazou <ebotcazou@adacore.com>
3298 * gcc-interface/Makefile.in (NO_SIBLING_ADAFLAGS): Always define.
3299 (NO_REORDER_ADAFLAGS): New variable.
3300 (EXTRA_GNATTOOLS): Always define.
3301 (../stamp-gnatlib1-$(RTSDIR): Copy tsystem.h.
3302 Clean up and adjust list of files compiled with special options.
3303 * gcc-interface/Make-lang.in: Likewise.
3304 (ada/decl.o): Cosmetical change.
3305 (ada/misc.o): Remove dependency on $(PLUGIN_H).
3307 2011-04-20 Jim Meyering <meyering@redhat.com>
3309 * initialize.c (__gnat_initialize): Remove useless if-before-free.
3311 2011-04-17 Eric Botcazou <ebotcazou@adacore.com>
3313 * gcc-interface/Make-lang.in (gnatbind): Replace $(ALL_CFLAGS) with
3314 $(CFLAGS) on the link line.
3316 2011-04-17 Eric Botcazou <ebotcazou@adacore.com>
3318 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Function>: Declare the
3319 padded type built for the return type if it is unconstrained.
3321 2011-04-14 Nathan Froyd <froydnj@codesourcery.com>
3323 * gcc-interface/utils.c (gnat_poplevel): Use block_chainon.
3325 2011-04-12 Nathan Froyd <froydnj@codesourcery.com>
3327 * gcc-interface/ada-tree.h (union lang_tree_node): Check for TS_COMMON
3328 before calling TREE_CHAIN.
3329 * gcc-interface/misc.c (gnat_init_ts): New function.
3330 (LANG_HOOKS_INIT_TS): Define.
3332 2011-04-12 Martin Jambor <mjambor@suse.cz>
3334 * gcc-interface/utils.c (end_subprog_body): Call cgraph_get_create_node
3335 instead of cgraph_node.
3337 2011-04-08 Eric Botcazou <ebotcazou@adacore.com>
3339 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Procedure>: Set minimum
3340 alignment on fields of the RETURN type built for the Copy-In Copy-Out
3343 2011-04-08 Eric Botcazou <ebotcazou@adacore.com>
3345 * gcc-interface/trans.c (Identifier_to_gnu): Do not return initializers
3346 of aggregate types that contain a placeholder.
3348 2011-04-08 Nathan Froyd <froydnj@codesourcery.com>
3350 * gcc-interface/utils.c (handle_sentinel_attribute): Don't use
3352 (handle_type_generic_attribute): Likewise.
3354 2011-04-04 Eric Botcazou <ebotcazou@adacore.com>
3357 * s-oscons-tmplt.c (MSG_WAITALL): Fix thinko in previous change.
3359 2011-04-04 Kai Tietz <ktietz@redhat.com>
3362 * s-oscons-tmplt.c (MSG_WAITALL): Define it for native windows targets
3365 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
3367 * gcc-interface/utils2.c (build_allocator): In the unconstrained array
3368 type case, do not strip a padding type around the array type.
3370 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
3372 * gcc-interface/utils.c (update_pointer_to): Finalize named pointer
3375 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
3377 * gcc-interface/lang.opt (feliminate-unused-debug-types): Delete.
3378 * gcc-interface/misc.c (gnat_handle_option): Remove special handling
3379 code for -feliminate-unused-debug-types.
3380 (gnat_post_options): Likewise.
3382 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
3384 * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
3385 declaration of a pointer type, then set DECL_ORIGINAL_TYPE to a
3388 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
3390 * gcc-interface/decl.c (gnat_to_gnu_entity): Do not force the
3391 DECL_ARTIFICIAL flag on enumeration types.
3393 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
3395 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: Do not make
3396 fat pointer types artificial unconditionally.
3397 <E_Array_Subtype>: Attach the base array type as a parallel type if it
3400 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
3402 * gcc-interface/gigi.h (get_dummy_type): Declare.
3403 (build_dummy_unc_pointer_types): Likewise.
3404 (finish_fat_pointer_type): Likewise.
3405 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: If a dummy
3406 fat pointer type has been built, complete it in place.
3407 <E_Access_Type>: Call build_dummy_unc_pointer_types to build dummy fat
3408 and thin pointers. Remove useless variable.
3409 (finish_fat_pointer_type): Make global and move to...
3410 * gcc-interface/utils.c (finish_fat_pointer_type): ...here.
3411 (get_dummy_type): New function.
3412 (build_dummy_unc_pointer_types): Likewise.
3413 (gnat_pushdecl): Propage the name to the anonymous variants only.
3414 (update_pointer_to): Only adjust the pointer types in the unconstrained
3417 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
3419 * gcc-interface/ada-tree.h (DECL_TAFT_TYPE_P): New flag.
3420 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Incomplete_Type>: Set it
3421 if this is a Taft amendment type and the full declaration is available.
3422 * gcc-interface/trans.c (process_type): Likewise.
3423 If there is an old type, mark the new one as used if DECL_TAFT_TYPE_P.
3424 (process_freeze_entity): Likewise.
3425 * gcc-interface/utils.c (dummy_global): New static variable.
3426 (gnat_write_global_declarations): If there are types declared as used
3427 at the global level, insert them in the global hash table.
3429 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
3431 * gcc-interface/gigi.h (record_builtin_type): Add ARTIFICIAL_P param.
3432 * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
3433 declaration of an array type, then set DECL_ORIGINAL_TYPE to a distinct
3435 (record_builtin_type): Add ARTIFICIAL_P parameter. Set DECL_ARTIFICIAL
3436 flag of the type accordingly.
3437 * gcc-interface/trans.c (gigi): Adjust calls to record_builtin_type.
3439 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
3441 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
3442 finalizing types when updating the pointers to the designated type.
3443 <all>: Finalize the deferred types even if we didn't defer processing
3444 of incomplete types in this invocation.
3446 2011-04-01 Olivier Hainque <hainque@adacore.com>
3447 Nicolas Setton <setton@adacore.com>
3448 Eric Botcazou <ebotcazou@adacore.com>
3450 * gcc-interface/misc.c (gnat_descriptive_type): New function.
3451 (LANG_HOOKS_DESCRIPTIVE_TYPE): Redefine to gnat_descriptive_type.
3453 2011-03-28 Kai Tietz <ktietz@redhat.com>
3455 * gcc-interface/Makefile.in (SO_LIB): Handle multilib build for native
3457 (EH_MECHANISM): Use GCC exception mechanism for native Windows targets.
3458 * system-mingw.ads (System): Change ZCX_By_Default default to True.
3460 * raise-gcc.c (PERSONALITY_FUNCTION): Add prototype.
3462 2011-03-28 Tristan Gingold <gingold@adacore.com>
3465 * gcc-interface/Make-lang.in (ada/b_gnat1.adb): Replace ada/b_gnat1.c.
3466 Use ada output of gnatbind.
3467 (ada/b_gnatb.adb): Ditto.
3468 (ada/b_gnat1.o, ada/b_gnatb.o): New rules.
3469 (ada.mostlyclean, ada.stage1)
3470 (ada.stage2, ada.stage3, ada.stage4, ada.stageprofile)
3471 (ada.stagefeedback): Adjust.
3472 * gcc-interface/Makefile.in (b_gnatl.adb): Replace b_gnatl.c.
3473 Use ada output of gnatbind.
3474 (b_gnatm.adb): Ditto.
3475 (b_gnatl.o, b_gnatm.o): New rules.
3477 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
3479 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
3480 for the padded type built to support a specified size or alignment.
3482 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
3484 * gcc-interface/gigi.h (finalize_from_with_types): Adjust comment.
3485 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
3486 unconditionally to the end of the unit when the designated type is
3488 <all>: Rename local variable. Attempt to un-defer types only and do it
3489 for limited_with'ed types as well.
3490 (finalize_from_with_types): Adjust comment. Rename variable and tidy.
3491 * gcc-interface/trans.c (Compilation_Unit_to_gnu): Use GNAT_UNIT
3492 consistently and remove redundant call to finalize_from_with_types.
3494 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
3496 * inline.adb (Back_End_Cannot_Inline): Lift restriction on calls to
3497 subprograms without a previous spec declared in the same unit.
3498 * gcc-interface/trans.c (Compilation_Unit_to_gnu): Process inlined
3499 subprograms at the end of the unit instead of at the beginning.
3500 * gcc-interface/utils.c (create_subprog_decl): Check that the entity
3501 isn't public for the special handling of non-inline functions nested
3502 inside inline external functions.
3504 2011-03-25 Jeff Law <law@redhat.com>
3506 * gcc-interface/utils.c (def_fn_type): Add missing va_end.
3508 2011-03-24 Eric Botcazou <ebotcazou@adacore.com>
3510 * einfo.ads (Size_Depends_On_Discriminant): Adjust description.
3511 * layout.adb (Compute_Size_Depends_On_Discriminant): New procedure
3512 to compute Set_Size_Depends_On_Discriminant.
3513 (Layout_Type): Call it on array types in back-end layout mode.
3514 * sem_util.adb (Requires_Transient_Scope): Return true for array
3515 types only if the size depends on the value of discriminants.
3516 * gcc-interface/utils2.c (build_binary_op) <MODIFY_EXPR>: Use the RHS
3517 type if the RHS is a call to a function that returns an unconstrained
3518 type with default discriminant.
3520 2011-03-24 Eric Botcazou <ebotcazou@adacore.com>
3522 * gcc-interface/trans.c (gnat_to_gnu): Remove obsolete case of
3523 non-conversion to the nominal result type at the end.
3525 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
3527 * gcc-interface/trans.c (create_temporary): New function taken from...
3528 (create_init_temporary): ...here. Call it.
3529 (call_to_gnu): Create the temporary for the return value early, if any.
3530 Create it for a function with copy-in/copy-out parameters if there is
3531 no target; in other cases of copy-in/copy-out, use another temporary.
3532 Push the new binding level lazily. Add and rename local variables.
3534 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
3536 * gcc-interface/decl.c (validate_size): Improve comments and tweak
3538 (set_rm_size): Likewise.
3540 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
3542 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
3543 for the padded type built in order to support a specified alignment.
3544 Fix incorrect formatting.
3546 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
3549 * gcc-interface/decl.c (elaborate_expression_1): Localize GNU_DECL.
3551 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
3553 * gcc-interface/decl.c (components_to_record): Add REORDER parameter,
3554 rename DEBUG_INFO_P into DEBUG_INFO and move P_GNU_REP_LIST parameter
3555 to the end of the list. Adjust recursive call. Rename local variable.
3556 If REORDER is true, reorder components of the record type.
3557 (gnat_to_gnu_entity): Pass OK_To_Reorder_Components flag as argument to
3558 components_to_record and adjust the parameter list.
3560 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
3562 * gcc-interface/decl.c (elaborate_expression_1): When optimization is
3563 disabled, use the variable for bounds of loop iteration scheme.
3565 2011-03-21 Kai Tietz <ktietz@redhat.com>
3568 * gcc-interface/utils.c (gnat_internal_attribute_table): Add column.
3570 2011-03-17 Eric Botcazou <ebotcazou@adacore.com>
3572 * gcc-interface/decl.c (elaborate_expression_1): Try harder to find
3573 out whether the expression is read-only. Short-circuit placeholder
3574 case and rename a couple of local variables.
3576 2011-03-17 Eric Botcazou <ebotcazou@adacore.com>
3578 * gcc-interface/gigi.h (smaller_form_type_p): Declare.
3579 * gcc-interface/trans.c (smaller_form_type_p): Make global and move...
3580 * gcc-interface/utils.c (smaller_form_type_p): ...to here.
3581 (convert): Deal with conversions from a smaller form type specially.
3583 2011-02-14 Eric Botcazou <ebotcazou@adacore.com>
3585 * gcc-interface/misc.c (gnat_init_options): Do not concatenate -I and
3586 its argument, except for the special -I- switch.
3588 2011-02-12 Gerald Pfeifer <gerald@pfeifer.com>
3590 * gnat_ugn.texi (Compiling Different Versions of Ada): Update link to
3593 2011-02-08 Eric Botcazou <ebotcazou@adacore.com>
3595 * gcc-interface/Makefile.in (x86-64 darwin): Handle multilibs.
3597 2011-02-03 Eric Botcazou <ebotcazou@adacore.com>
3599 * gcc-interface/gigi.h (fill_vms_descriptor): Take GNU_TYPE instead of
3601 * gcc-interface/utils2.c (fill_vms_descriptor): Move from here to...
3602 * gcc-interface/utils.c (fill_vms_descriptor): ...here. Take GNU_TYPE
3603 instead of GNAT_FORMAL. Protect the expression against multiple uses.
3604 Do not generate the check directly, instead instantiate the template
3605 check present in the descriptor.
3606 (make_descriptor_field): Move around.
3607 (build_vms_descriptor32): Build a template check in the POINTER field.
3608 (build_vms_descriptor): Remove useless suffixes.
3609 * gcc-interface/trans.c (call_to_gnu): Adjust fill_vms_descriptor call.
3611 2011-01-26 Eric Botcazou <ebotcazou@adacore.com>
3614 * targext.c: Include target files if IN_RTS is defined.
3616 2011-01-26 Richard Guenther <rguenther@suse.de>
3619 * targext.c: Include config.h.
3620 * gcc-interface/Make-lang.in (ada/targext.o): Add $(CONFIG_H)
3623 2011-01-04 Pascal Obry <obry@adacore.com>
3624 Eric Botcazou <ebotcazou@adacore.com>
3626 * gcc-interface/decl.c: Disable Stdcall convention handling for 64-bit.
3628 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
3630 * gcc-interface/trans.c (Case_Statement_to_gnu): Put the SLOC of the
3631 end-of-case on the end label and its associated gotos, if any.
3633 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
3635 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Evaluate the
3636 expressions of the parameter cache within the statement group of
3639 2011-01-04 Olivier Hainque <hainque@adacore.com>
3640 Eric Botcazou <ebotcazou@adacore.com>
3642 * gcc-interface/trans.c (BLOCK_SOURCE_END_LOCATION): Provide default.
3643 (set_end_locus_from_node): New function.
3644 (Subprogram_Body_to_gnu): Use it to mark both the inner BIND_EXPR we
3645 make and the function end_locus.
3646 (Compilation_Unit_to_gnu): Call it instead of a straight Sloc_to_locus
3647 for the elaboration subprogram.
3648 (set_gnu_expr_location_from_node) <default case>: Use it to attempt to
3649 set the end_locus of the expression as well.
3651 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
3654 * gcc-interface/trans.c (Identifier_to_gnu): In SJLJ mode, do not make
3655 variables that are referenced in exception handlers volatile.
3659 Copyright (C) 2011 Free Software Foundation, Inc.
3661 Copying and distribution of this file, with or without modification,
3662 are permitted in any medium without royalty provided the copyright
3663 notice and this notice are preserved.
3665 * gnat_rm.texi: Ramification of pragma Eliminate documentation
3666 - fix bugs in the description of Source_Trace;
3667 - get rid of UNIT_NAME;
3669 2011-08-02 Javier Miranda <miranda@adacore.com>
3672 (Build_Dispatching_Requeue): Adding support for VM targets
3673 since we cannot directly reference the Tag entity.
3674 * exp_sel.adb (Build_K): Adding support for VM targets.
3675 (Build_S_Assignment): Adding support for VM targets.
3677 (Default_Prim_Op_Position): In VM targets do not restrict availability
3678 of predefined interface primitives to compiling in Ada 2005 mode.
3679 (Is_Predefined_Interface_Primitive): In VM targets this service is not
3680 restricted to compiling in Ada 2005 mode.
3681 (Make_VM_TSD): Generate code that declares and initializes the OSD
3682 record. Needed to support dispatching calls through synchronized
3685 (Make_Predefined_Primitive_Specs): Enable generation of predefined
3686 primitives associated with synchronized interfaces.
3687 (Make_Predefined_Primitive_Bodies): Enable generation of predefined
3688 primitives associated with synchronized interfaces.
3690 2011-08-02 Yannick Moy <moy@adacore.com>
3692 * par-ch11.adb (P_Handled_Sequence_Of_Statements): mark a sequence of
3693 statements hidden in SPARK if preceded by the HIDE directive
3694 (Parse_Exception_Handlers): mark each exception handler in a sequence of
3695 exception handlers as hidden in SPARK if preceded by the HIDE directive
3696 * par-ch6.adb (P_Subprogram): mark a subprogram body hidden in SPARK
3697 if starting with the HIDE directive
3698 * par-ch7.adb (P_Package): mark a package body hidden in SPARK if
3699 starting with the HIDE directive; mark the declarations in a private
3700 part as hidden in SPARK if the private part starts with the HIDE
3702 * restrict.adb, restrict.ads
3703 (Set_Hidden_Part_In_SPARK): record a range of slocs as hidden in SPARK
3704 (Is_In_Hidden_Part_In_SPARK): new function which returns whether its
3705 argument node belongs to a part which is hidden in SPARK
3706 (Check_SPARK_Restriction): do not issue violations on nodes in hidden
3707 parts in SPARK; protect the possibly costly call to
3708 Is_In_Hidden_Part_In_SPARK by a check that the SPARK restriction is on
3709 * scans.ads (Token_Type): new value Tok_SPARK_Hide in enumeration
3710 * scng.adb (Accumulate_Token_Checksum_GNAT_6_3,
3711 Accumulate_Token_Checksum_GNAT_5_03): add case for new token
3713 (Scan): recognize special comment starting with '#' and followed by
3714 SPARK keyword "hide" as a HIDE directive.
3716 2011-08-02 Yannick Moy <moy@adacore.com>
3718 * types.ads, erroutc.ads: Minor reformatting.
3720 2011-08-02 Vincent Celier <celier@adacore.com>
3722 * link.c: Add response file support for cross platforms.
3724 2011-08-02 Ed Schonberg <schonberg@adacore.com>
3726 * sem_aggr.adb (Resolve_Array_Aggregate): when copying the expression
3727 in an association, set parent field of copy before partial analysis.
3728 * sem_res.adb (Resolve_Slice): create reference to itype only when
3729 expansion is enabled.
3731 2011-08-02 Yannick Moy <moy@adacore.com>
3733 * einfo.adb, einfo.ads (Body_Is_In_ALFA, Set_Body_Is_In_ALFA): get/set
3734 for new flag denoting which subprogram bodies are in ALFA
3735 * restrict.adb, sem_ch7.adb: Update comment
3736 * sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
3737 sem_ch9.adb, sem_res.adb: Add calls to
3738 Current_Subprogram_Body_Is_Not_In_ALFA on unsupported constructs.
3739 * sem_ch6.adb (Analyze_Function_Return): add calls to
3740 Current_Subprogram_Body_Is_Not_In_ALFA on return statement in the
3741 middle of the body, and extended return.
3742 (Check_Missing_Return): add calls to Set_Body_Is_In_ALFA with argument
3743 False when missing return.
3744 (Analyze_Subprogram_Body_Helper): initialize the flag Body_Is_In_ALFA
3745 to True for subprograms whose spec is in ALFA. Remove later on the flag
3746 on the entity used for a subprogram body when there exists a separate
3748 * sem_util.adb, sem_util.ads (Current_Subprogram_Body_Is_Not_In_ALFA):
3749 if Current_Subprogram is not Empty, set its flag Body_Is_In_ALFA to
3750 False, otherwise do nothing.
3752 2011-08-02 Robert Dewar <dewar@adacore.com>
3754 * inline.adb, stand.ads, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
3756 2011-08-02 Yannick Moy <moy@adacore.com>
3758 * sem_ch4.ads: minor formatting.
3760 2011-08-02 Yannick Moy <moy@adacore.com>
3762 * sem_aggr.adb, err_vars.ads, sem_ch3.adb, sem_ch5.adb, sem_ch9.adb,
3763 debug.adb, sem_util.adb, sem_res.adb, sem_attr.adb, gnat1drv.adb,
3764 errout.adb, errout.ads, exp_ch6.adb, sem_ch4.adb, restrict.adb,
3765 restrict.ads, sem_ch6.adb, sem_ch8.adb, sem_ch11.adb,
3766 opt.ads: cleanup of SPARK mode
3768 2011-08-02 Yannick Moy <moy@adacore.com>
3770 * cstand.adb (Create_Standard): sets Is_In_ALFA component of standard
3772 * einfo.adb, einfo.ads (Is_In_ALFA): add flag for all entities
3773 (Is_In_ALFA, Set_Is_In_ALFA): new subprograms to access flag Is_In_ALFA
3775 (Analyze_Object_Declaration): set Is_In_ALFA flag for objects
3776 (Constrain_Enumeration): set Is_In_ALFA flag for enumeration subtypes
3777 (Constrain_Integer): set Is_In_ALFA flag for integer subtypes
3778 (Enumeration_Type_Declaration): set Is_In_ALFA flag for enumeration
3780 (Set_Scalar_Range_For_Subtype): unset Is_In_ALFA flag for subtypes with
3782 * sem_ch6.adb (Analyze_Return_Type): unset Is_In_ALFA flag for
3783 functions whose return type is not in ALFA.
3784 (Analyze_Subprogram_Specification): set Is_In_ALFA flag for subprogram
3786 (Process_Formals): unset Is_In_ALFA flag for subprograms if a
3787 parameter's type is not in ALFA.
3788 * stand.ads (Standard_Type_Is_In_ALFA): array defines which standard
3791 2011-08-02 Ed Schonberg <schonberg@adacore.com>
3793 * sem_ch6 (Analyze_Expression_Function): treat the function as
3794 Inline_Always, and introduce a subprogram declaration for it when it is
3796 * inline.adb (Add_Inlined_Body): recognize bodies that come from
3797 expression functions, so that the back-end can determine whether they
3798 can in fact be inlined.
3799 * sem_util.adb (Is_Expression_Function): predicate to determine whether
3800 a function body comes from an expression function.
3802 2011-08-02 Gary Dismukes <dismukes@adacore.com>
3804 * sem_ch6.adb (Check_Conformance): Revise the check for nonconforming
3805 null exclusions to test Can_Never_Be_Null on the anonymous access types
3806 of the formals rather than testing the formals themselves. Exclude this
3807 check in cases where the Old_Formal is marked as a controlling formal,
3808 to avoid issuing spurious errors for bodies completing dispatching
3809 operations (due to the flag not getting set on controlling access
3810 formals in body specs).
3811 (Find_Corresponding_Spec): When checking full and subtype conformance of
3812 subprogram bodies in instances, pass Designated and E in that order, for
3813 consistency with the expected order of the formals (New_Id followed by
3816 2011-08-02 Robert Dewar <dewar@adacore.com>
3818 * sem_ch8.adb: Minor reformatting.
3820 2011-08-02 Ed Schonberg <schonberg@adacore.com>
3822 * sem_ch8.adb (Analyze_Subprogram_Renaming): new procedure
3823 Check_Class_Wide_Actual, to implement AI05-0071, on defaulted
3824 primitive operations of class-wide actuals.
3826 2011-08-02 Javier Miranda <miranda@adacore.com>
3828 * exp_atag.ads, exp_atag.adb
3829 (Build_Common_Dispatching_Select_Statements): Remove argument Loc
3830 since its value is implicitly passed in argument Typ.
3831 * exp_disp.adb (Make_Disp_Conditional_Select_Body,
3832 Make_Disp_Timed_Select_Body): Remove Loc in calls to routine
3833 Build_Common_Dispatching_Select_Statements.
3835 2011-08-02 Robert Dewar <dewar@adacore.com>
3837 * sem_ch3.adb, exp_atag.ads, get_scos.adb, get_scos.ads,
3838 exp_disp.adb, lib-xref.adb, lib-xref.ads: Update comments.
3841 2011-08-02 Robert Dewar <dewar@adacore.com>
3843 * sem_res.adb: Minor reformatting.
3844 * sem_prag.adb: Minor reformatting.
3846 2011-08-02 Javier Miranda <miranda@adacore.com>
3848 * exp_atag.adb, exp_atags.ads
3849 (Build_Common_Dispatching_Select_Statement): Replace argument DT_Ptr
3850 by the tagged type Entity. Required to use this routine in the VM
3851 targets since we do not have available the Tag entity in the VM
3854 (Expand_N_Subprogram_Body): Do not invoke Build_VM_TSDs if package
3855 Ada.Tags has not been previously loaded.
3857 (Expand_N_Package_Declaration, Expand_N_Package_Body): Do not invoke
3858 Build_VM_TSDs if package Ada.Tags has not been previously loaded.
3860 (Enclosing_Dynamic_Scope): Add missing support to handle the full
3861 view of enclosing scopes. Required to handle enclosing scopes that
3862 are synchronized types whose full view is a task type.
3864 (Build_VM_TSDs): Minor code improvement to avoid generating and
3865 analyzing lists with empty nodes.
3866 (Make_Disp_Asynchronous_Select_Body): Add support for VM targets.
3867 (Make_Disp_Conditional_Select_Body): Add support for VM targets.
3868 (Make_Disp_Get_Prim_Op_Kind): Add support for VM targets.
3869 (Make_Disp_Timed_Select_Body): Add support for VM targets.
3870 (Make_Select_Specific_Data_Table): Add support for VM targets.
3871 (Make_VM_TSD): Generate code to initialize the SSD structure of
3874 2011-08-02 Yannick Moy <moy@adacore.com>
3876 * lib-writ.adb (Write_ALI): when ALFA mode is set, write local
3877 cross-references section in ALI.
3878 * lib-xref.adb, lib-xref.ads (Xref_Entry): add components Sub
3879 (enclosing subprogram), Slc (location of Sub) and Sun (unit number of
3881 (Enclosing_Subprogram_Or_Package): new function to return the enclosing
3882 subprogram or package entity of a node
3883 (Is_Local_Reference_Type): new function returns True for references
3884 selected in local cross-references.
3885 (Lt): function extracted from Lt in Output_References
3886 (Write_Entity_Name): function extracted from Output_References
3887 (Generate_Definition): generate reference with type 'D' for definition
3888 of objects (object declaration and parameter specification), with
3889 appropriate locations and units, for use in local cross-references.
3890 (Generate_Reference): update fields Sub, Slc and Sun. Keep newly created
3891 references of type 'I' for initialization in object definition.
3892 (Output_References): move part of function Lt and procedure
3893 Write_Entity_Name outside of the body. Ignore references of types 'D'
3894 and 'I' introduced for local cross-references.
3895 (Output_Local_References): new procedure to output the local
3896 cross-references sections.
3897 (Lref_Entity_Status): new array defining whether an entity is a local
3898 * sem_ch3.adb (Analyze_Object_Declaration): call Generate_Reference
3899 with 'I' type when initialization expression is present.
3900 * get_scos.adb, get_scos.ads: Correct comments and typos
3902 2011-08-02 Javier Miranda <miranda@adacore.com>
3904 * exp_ch6.adb (Expand_N_Subprogram_Body): Enable generation of TSDs in
3906 * exp_ch7.adb (Expand_N_Package_Body): Enable generation of TSDs in
3908 * exp_disp.adb (Build_VM_TSDs): No action needed if the runtime has no
3911 2011-08-02 Vincent Celier <celier@adacore.com>
3913 * prj-nmsc.adb (File_Found): New components Excl_File and Excl_Line
3914 (No_Space_Img): New function
3915 (Find_Excluded_Sources): When reading from a file, record the file name
3916 and the line number for each excluded source.
3917 (Mark_Excluded_Sources): When reporting an error, if the excluded
3918 sources were read from a file, include file name and line number in
3921 2011-08-02 Ed Schonberg <schonberg@adacore.com>
3923 * sem_res.adb (Resolve_Call): implement rule in RM 12.5.1 (23.3/2).
3925 2011-08-02 Robert Dewar <dewar@adacore.com>
3927 * exp_ch7.adb exp_ch6.adb, exp_disp.adb: Minor reformatting
3929 2011-08-02 Javier Miranda <miranda@adacore.com>
3931 * exp_ch6.adb (Expand_N_Subprogram_Body): Temporarily restrict the
3932 generation of TSDs to the DOTNET compiler.
3933 * exp_ch7.adb (Expand_N_Package_Body): Temporarily restrict the
3934 generation of TSDs to the DOTNET compiler.
3936 2011-08-02 Javier Miranda <miranda@adacore.com>
3938 * exp_disp.ads (Build_VM_TSDs): Build the runtime Type Specific Data
3939 record of all the tagged types declared inside library level package
3940 declarations, library level package bodies or library level subprograms.
3941 * exp_disp.adb (Make_VM_TSD): New subprogram that builds the TSD
3942 associated with a given tagged type.
3943 (Build_VM_TSDs): New subprogram.
3944 * exp_ch6.adb (Expand_N_Subprogram_Body): Generate TSDs records of main
3945 compilation units that are subprograms.
3946 * exp_ch7.adb (Expand_N_Package_Body): Generate TSDs of main
3947 compilation units that are package bodies.
3948 (Expand_N_Package_Declaration): Generate TSDs of the main compilation
3949 units that are a package declaration or a package instantiation.
3950 * exp_intr.adb (Expand_Dispatching_Constructor_Call): Minor code
3951 reorganization to improve the error generated by the frontend when the
3952 function Ada.Tags.Secondary_Tag is not available.
3953 * rtsfind.ads (RE_Register_TSD): New runtime entity.
3954 * exp_ch4.adb (Expand_N_Type_Conversion): Minor code cleanup.
3956 2011-08-02 Javier Miranda <miranda@adacore.com>
3958 * exp_disp.adb (Make_DT): Generate call to Check_TSD in Ada 2005 mode.
3960 2011-08-02 Robert Dewar <dewar@adacore.com>
3962 * s-imenne.ads: Minor reformatting.
3964 2011-08-02 Robert Dewar <dewar@adacore.com>
3966 * a-stunau.ads: Add pragma Suppress_Initialization for Big_String
3967 * freeze.adb (Warn_Overlay): Don't warn if initialization suppressed
3968 * s-stalib.ads: Add pragma Suppress_Initialization for Big_String
3970 2011-08-02 Robert Dewar <dewar@adacore.com>
3972 * einfo.ads (Materialize_Entity): Document this is only for renamings
3973 * exp_ch3.adb (Expand_N_Object_Declaration): Make sure we generate
3974 required debug information in the case where we transform the object
3975 declaration into a renaming declaration.
3976 * exp_ch4.adb (Expand_Concatenate): Generate debug info for result
3978 * exp_dbug.ads (Debug_Renaming_Declaration): Document setting of
3981 2011-08-02 Robert Dewar <dewar@adacore.com>
3983 * einfo.ads, einfo.adb (Suppress_Initialization): Replaces
3984 Suppress_Init_Procs.
3985 * exp_ch3.adb, exp_disp.adb, freeze.adb: Use
3986 Suppress_Initialization/Initialization_Suppressed.
3987 * gnat_rm.texi: New documentation for pragma Suppress_Initialization
3988 * sem_aux.ads, sem_aux.adb (Initialization_Suppressed): New function
3989 * sem_dist.adb: Use Suppress_Initialization/Initialization_Suppressed
3990 * sem_prag.adb: New processing for pragma Suppress_Initialization.
3992 2011-08-02 Robert Dewar <dewar@adacore.com>
3994 * gnat_rm.texi, a-tags.ads, sem_prag.adb, sem_ch12.adb, exp_disp.adb:
3997 2011-08-02 Ed Schonberg <schonberg@adacore.com>
3999 * sem_prag.adb (Chain_PPC): Implement AI04-0230: null procedures can
4000 only have inheritable classwide pre/postconditions.
4002 2011-08-02 Javier Miranda <miranda@adacore.com>
4004 * a-tags.ads, a-tags.adb (Check_TSD): New subprogram.
4005 * rtsfind.ads (RE_Check_TSD): New runtime entity.
4006 * exp_disp.adb (Make_DT): Generate call to the new runtime routine that
4007 checks if the external tag of a type is the same as the external tag
4008 of some other declaration.
4010 2011-08-02 Thomas Quinot <quinot@adacore.com>
4012 * s-taskin.ads: Minor reformatting.
4014 2011-08-02 Emmanuel Briot <briot@adacore.com>
4016 * g-comlin.adb (Display_Help): swap the order in which it prints the
4017 short help and the general usage.
4019 2011-08-02 Ed Schonberg <schonberg@adacore.com>
4021 * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration): copy properly
4022 the aspect declarations and attach them to the generic copy for
4023 subsequent analysis.
4024 (Analyze_Subprogram_Instantiation): copy explicitly the aspect
4025 declarations of the generic tree to the new subprogram declarations.
4026 * sem_attr.adb (Check_Precondition_Postcondition): recognize
4027 conditions that apply to a subprogram instance.
4029 2011-08-02 Robert Dewar <dewar@adacore.com>
4031 * gnat_rm.texi: Clarify doc on pragma Source_File_Name[_Project].
4033 2011-08-02 Ed Schonberg <schonberg@adacore.com>
4035 * sem_ch3.adb (Derived_Type_Declaration): When checking that a untagged
4036 private type with a tagged full view is not derived in the immediate
4037 scope of the partial view, (RM 7.3 (7)) use the scope of the base type.
4039 2011-08-02 Robert Dewar <dewar@adacore.com>
4041 * exp_ch4.adb: Minor reformatting.
4043 2011-08-02 Ed Schonberg <schonberg@adacore.com>
4045 * sem_ch5.adb (Analyze_Loop_Statement): If the iteration scheme is an
4046 Ada2012 iterator, the loop will be rewritten during expansion into a
4047 while loop with a cursor and an element declaration. Do not analyze the
4048 body in this case, because if the container is for indefinite types the
4049 actual subtype of the elements will only be determined when the cursor
4050 declaration is analyzed.
4052 2011-08-02 Arnaud Charlet <charlet@adacore.com>
4054 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Ignore
4055 size/alignment related attributes in CodePeer_Mode.
4057 2011-08-02 Gary Dismukes <dismukes@adacore.com>
4059 * sem_ch3.adb (Check_Ops_From_Incomplete_Type): Remove call to
4060 Prepend_Element, since this can result in the operation getting the
4061 wrong slot in the full type's dispatch table if the full type has
4062 inherited operations. The incomplete type's operation will get added
4063 to the proper position in the full type's primitives
4064 list later in Sem_Disp.Check_Operation_From_Incomplete_Type.
4065 (Process_Incomplete_Dependents): Add Is_Primitive test when checking for
4066 dispatching operations, since there are cases where nonprimitive
4067 subprograms can get added to the list of incomplete dependents (such
4068 as subprograms in nested packages).
4069 * sem_ch6.adb (Process_Formals): First, remove test for being in a
4070 private part when determining whether to add a primitive with a
4071 parameter of a tagged incomplete type to the Private_Dependents list.
4072 Such primitives can also occur in the visible part, and should not have
4073 been excluded from being private dependents.
4074 * sem_ch7.adb (Uninstall_Declarations): When checking the rule of
4075 RM05-3.10.1(9.3/2), test that a subprogram in the Private_Dependents
4076 list of a Taft-amendment incomplete type is a primitive before issuing
4077 an error that the full type must appear in the same unit. There are
4078 cases where nonprimitives can be in the list (such as subprograms in
4080 * sem_disp.adb (Derives_From): Use correct condition for checking that
4081 a formal's type is derived from the type of the corresponding formal in
4082 the parent subprogram (the condition was completely wrong). Add
4083 checking that was missing for controlling result types being derived
4084 from the result type of the parent operation.
4086 2011-08-02 Yannick Moy <moy@adacore.com>
4088 * errout.adb (First_Node): minor renaming
4089 * restrict.adb (Check_Formal_Restriction): put restriction warning on
4092 2011-08-02 Yannick Moy <moy@adacore.com>
4094 * sem_res.adb (Resolve_Logical_Op): ensure N is a binary operator
4095 before accessing operands.
4096 * sem_util.adb (Is_SPARK_Initialization_Expr): follow original nodes to
4097 decide whether an initialization expression respects SPARK rules, as
4098 the plain node is the expanded one. This allows for more valid warnings
4100 * gnat_rm.texi: Minor update.
4102 2011-08-02 Arnaud Charlet <charlet@adacore.com>
4104 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Revert
4107 2011-08-02 Robert Dewar <dewar@adacore.com>
4109 * sem_ch3.adb, sem_ch4.adb: Minor reformatting.
4111 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
4113 * exp_ch5.adb (Expand_Iterator_Loop): Reformatting. Wrap the original
4114 loop statements and the element renaming declaration with a block when
4115 the element type is controlled.
4117 2011-08-02 Yannick Moy <moy@adacore.com>
4119 * sinfo.ads: Minor formatting.
4121 2011-08-02 Ed Schonberg <schonberg@adacore.com>
4123 * sem_aggr.adb (Add_Association): if the association has a box and no
4124 expression, use the Sloc of the aggregate itself for the new
4126 * errout.adb (First_Node): Exclude nodes with no Sloc, and always use
4129 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
4131 * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and refactoring.
4132 When a container is provided via a function call, generate a renaming
4133 of the function result. This avoids the creation of a transient scope
4134 and the premature finalization of the container.
4135 * exp_ch7.adb (Is_Container_Cursor): Removed.
4136 (Wrap_Transient_Declaration): Remove the supression of the finalization
4137 of the list controller when the declaration denotes a container cursor,
4140 2011-08-02 Yannick Moy <moy@adacore.com>
4142 * restrict.adb (Check_Formal_Restriction): only issue a warning if the
4143 node is from source, instead of the original node being from source.
4145 (Resolve_Array_Aggregate): refine the check for a static expression, to
4146 recognize also static ranges
4147 * sem_ch3.adb, sem_ch3.ads (Analyze_Component_Declaration,
4148 Array_Type_Declaration): postpone the test for the type being a subtype
4149 mark after the type has been resolved, so that component-selection and
4150 expanded-name are discriminated.
4151 (Make_Index, Process_Range_Expr_In_Decl): add a parameter In_Iter_Schm
4152 to distinguish the case of an iteration scheme, so that an error is
4153 issed on a non-static range in SPARK except in an iteration scheme.
4154 * sem_ch5.adb (Analyze_Iteration_Scheme): call Make_Index with
4155 In_Iter_Schm = True.
4156 * sem_ch6.adb (Analyze_Subprogram_Specification): refine the check for
4157 user-defined operators so that they are allowed in renaming
4159 (Find_Selected_Component): refine the check for prefixing of operators
4160 so that they are allowed in renaming. Move the checks for restrictions
4161 on selector name after analysis discriminated between
4162 component-selection and expanded-name.
4163 * sem_res.adb (Resolve_Op_Concat_Arg): do not issue a warning on
4164 concatenation argument of string type if it is static.
4165 * sem_util.adb, sem_util.ads
4166 (Check_Later_Vs_Basic_Declarations): add a new function
4167 Is_Later_Declarative_Item to decice which declarations are allowed as
4168 later items, in the two different modes Ada 83 and SPARK. In the SPARK
4169 mode, add that renamings are considered as later items.
4170 (Enclosing_Package): new function to return the enclosing package
4171 (Enter_Name): correct the rule for homonyms in SPARK
4172 (Is_SPARK_Initialization_Expr): default to returning True on nodes not
4173 from source (result of expansion) to avoid issuing wrong warnings.
4175 2011-08-02 Ed Schonberg <schonberg@adacore.com>
4177 * errout.adb: On anything but an expression First_Node returns its
4180 2011-08-02 Pascal Obry <obry@adacore.com>
4182 * prj-proc.adb, make.adb, makeutl.adb: Minor reformatting.
4184 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
4186 * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and reorganization.
4187 Set the associated loop as the related expression of internally
4189 * exp_ch7.adb (Is_Container_Cursor): New routine.
4190 (Wrap_Transient_Declaration): Supress the finalization of the list
4191 controller when the declaration denotes a container cursor.
4193 2011-08-02 Yannick Moy <moy@adacore.com>
4195 * opt.ads (SPARK_Mode): update comment, SPARK_Mode only set through
4197 * par-ch3.adb (P_Delta_Constraint): remove check in SPARK mode that the
4198 expression is a simple expression. This check cannot be performed in
4199 the semantics, so just drop it.
4200 (P_Index_Or_Discriminant_Constraint): move check that the index or
4201 discriminant is a subtype mark to Analyze_Subtype_Declaration in the
4202 semantics. Other cases were previously checked in the semantics.
4203 * par-ch4.adb (P_Name): move checks that a selector name is not
4204 character literal or an operator symbol to Find_Selected_Component in
4206 * par-ch5.adb (Parse_Decls_Begin_End): move check that basic
4207 declarations are not placed after later declarations in a separate
4208 procedure in Sem_Util (possibly not the best choice?), to be used both
4209 during parsing, for Ada 83 mode, and during semantic analysis, for
4211 * par-endh.adb (Check_End): move check that end label is not missing
4212 to Process_End_Label in the semantics
4213 * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): remove
4214 the special case for SPARK restriction
4215 * par.adb: use and with Sem_Util, for use in Parse_Decls_Begin_End
4216 * restrict.adb, restrict.ads (Check_Formal_Restriction): add a
4217 parameter Force to issue the error message even on internal node (used
4218 for generated end label). Call Check_Restriction to check when an error
4219 must be issued. In SPARK mode, issue an error message even if the
4220 restriction is not set.
4221 (Check_Restriction): new procedure with an additional out parameter to
4222 inform the caller that a message has been issued
4223 * sem_aggr.adb: Minor modification of message
4224 * sem_attr.adb (Analyze_Attribute): call Check_Formal_Restriction
4225 instead of issuing an error message directly
4226 * sem_ch3.adb (Analyze_Declarations): move here the check that basic
4227 declarations are not placed after later declarations, by calling
4228 Check_Later_Vs_Basic_Declarations
4229 (Analyze_Subtype_Declaration): move here the check that an index or
4230 discriminant constraint must be a subtype mark. Change the check that
4231 a subtype of String must start at one so that it works on subtype marks.
4232 * sem_ch4.adb (Analyze_Call): move here the check that a named
4233 association cannot follow a positional one in a call
4234 * sem_ch5.adb (Check_Unreachable_Code): call Check_Formal_Restriction
4235 instead of issuing an error message directly
4236 * sem_ch8.adb (Find_Selected_Component): move here the check that a
4237 selector name is not a character literal or an operator symbol. Move
4238 here the check that the prefix of an expanded name cannot be a
4239 subprogram or a loop statement.
4240 * sem_util.adb, sem_util.ads (Check_Later_Vs_Basic_Declarations): new
4241 procedure called from parsing and semantics to check that basic
4242 declarations are not placed after later declarations
4243 (Process_End_Label): move here the check that end label is not missing
4245 2011-08-02 Arnaud Charlet <charlet@adacore.com>
4247 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Ignore enum
4248 representation clause in codepeer mode, since it confuses CodePeer and
4249 does not bring useful info.
4251 2011-08-02 Ed Falis <falis@adacore.com>
4253 * init.c: initialize fp hw on MILS.
4255 2011-08-02 Ed Schonberg <schonberg@adacore.com>
4257 * errout.adb (First_Node): for bodies, return the node itself (small
4258 optimization). For other nodes, do not check source_unit if the node
4259 comes from Standard.
4261 2011-08-02 Robert Dewar <dewar@adacore.com>
4263 * exp_ch3.adb: Minor comment additions.
4264 * sem_ch13.adb: Minor reformatting.
4266 2011-08-02 Pascal Obry <obry@adacore.com>
4268 * make.adb, makeutl.adb: Removes some superfluous directory separator.
4270 2011-08-02 Robert Dewar <dewar@adacore.com>
4272 * sem_attr.adb: Minor reformatting.
4274 2011-08-02 Robert Dewar <dewar@adacore.com>
4276 * einfo.adb (Has_Default_Aspect): Replaces Has_Default_Value
4277 (Has_Default_Component_Value): Removed
4278 * einfo.ads Comment updates
4279 (Has_Default_Aspect): Replaces Has_Default_Value
4280 (Has_Default_Component_Value): Removed
4282 (Expand_N_Freeze_Entity): Handle Default[_Component]_Value aspects
4284 (Build_Array_Init_Proc): Handle Default_[Component_]Value aspects
4285 (Get_Simple_Init_Val): Handle Default_Value aspect
4286 (Needs_Simple_Initialization): Handle Default_Value aspect
4287 * exp_ch3.ads: Needs_Simple_Initialization
4288 * freeze.adb (Freeze_Entity): Handle Default_[Component_]Value aspect
4289 * par-prag.adb (Pragma_Default[_Component]Value) Removed
4291 (Analyze_Aspect_Specifications): Fix Default[_Component]_Value aspects
4292 * sem_prag.adb (Pragma_Default[_Component]Value) Removed
4293 * snames.ads-tmpl (Pragma_Default[_Component]Value) Removed
4295 2011-08-02 Ed Schonberg <schonberg@adacore.com>
4297 * sem_ch5.adb (Analyze_Iterator_Specification): use base type to locate
4298 package containing iteration primitives.
4299 exp_ch5.adb (Expand_Iterator_Loop): ditto.
4301 2011-08-02 Ed Schonberg <schonberg@adacore.com>
4303 * sem_ch5.adb (Analyze_Iteration_Scheme): For an Ada2012 iterator with
4304 "of", pre-analyze expression in case it is a function call with
4305 finalization actions that must be placed ahead of the loop.
4306 * exp_ch5.adb (Expand_Iterator_Loop): If condition_actions are present
4307 on an Ada2012 iterator, insert them ahead of the rewritten loop.
4309 2011-08-02 Geert Bosch <bosch@adacore.com>
4311 * cstand.adb (Create_Float_Types): Only consider C's long double for
4312 Long_Long_Float, in addition to double.
4314 2011-08-02 Robert Dewar <dewar@adacore.com>
4316 * sem_ch3.adb, sem_ch5.adb, sem_type.adb, switch-c.adb, switch-c.ads,
4317 sem_prag.adb, sem_util.adb, sem_util.ads, sem_res.adb, warnsw.ads,
4318 prepcomp.ads, cstand.adb, stand.ads, a-calfor.adb, s-stusta.adb:
4321 2011-08-02 Ed Schonberg <schonberg@adacore.com>
4323 * sem_attr.adb: handle properly 'Result when it is a prefix of an
4326 2011-08-02 Javier Miranda <miranda@adacore.com>
4328 * einfo.ads, einfo.adb
4329 (Original_Access_Type): Move this attribute to Node26 since there was
4330 an undocumented use of Node21 in E_Access_Subprogram_Type entities
4331 which causes conflicts and breaks the generation of the .NET compiler.
4332 (Interface_Name): Add missing documentation on JGNAT only uses of
4335 2011-08-02 Geert Bosch <bosch@adacore.com>
4337 * cstand.adb (Back_End_Float_Types): Use Elist instead of Nlist
4338 (Find_Back_End_Float_Type): Likewise
4339 (Create_Back_End_Float_Types): Likewise
4340 (Create_Float_Types): Likewise
4341 (Register_Float_Type): Likewise
4342 * sem_ch3.adb (Floating_Point_Type_Declaration): Use Elist instead of
4343 Nlist and split out type selection in new local Find_Base_Type function.
4344 * sem_prag.adb (Process_Import_Predefined_Type): Use Elist instead of
4346 * stand.ads (Predefined_Float_Types): Use Elist instead of Nlist
4348 2011-08-02 Robert Dewar <dewar@adacore.com>
4350 * inline.adb: Minor code reorganization (put Get_Code_Unit_Entity in
4352 * opt.ads: Minor comment change.
4353 * sem_ch12.adb: Minor code reorganization.
4355 2011-08-02 Gary Dismukes <dismukes@adacore.com>
4357 * sem_ch3.adb (Complete_Private_Subtype): Don't append the private
4358 subtype's list of rep items to the list on the full subtype in the case
4359 where the lists are the same.
4361 2011-08-02 Geert Bosch <bosch@adacore.com>
4363 * switch-c.adb (Free): New deallocation procedure to avoid implicitly
4364 using the one from System.Strings, which also deallocates all strings.
4366 2011-08-02 Geert Bosch <bosch@adacore.com>
4368 * gcc-interface/gigi.h, gcc-interface/misc.c (enumerate_modes): New
4370 * gcc-interface/Make-lang.in: Update dependencies.
4372 2011-08-02 Olivier Hainque <hainque@adacore.com>
4374 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Set the function
4377 2011-08-02 Javier Miranda <miranda@adacore.com>
4379 * sem_ch3.adb (Check_Anonymous_Access_Components): Create extra formals
4380 associated with anonymous access to subprograms.
4382 2011-08-02 Geert Bosch <bosch@adacore.com>
4385 (Preprocessing_Symbol_Defs): Move from Prepcomp.Symbol_Definitions.
4386 (Preprocessing_Symbol_Last): Move from Prepcomp.Last_Definition.
4387 * prepcomp.adb (Symbol_Definitions, Last_Definition): Move to opt.ads
4388 (Add_Symbol_Definition): Move to switch-c.adb
4389 (Process_Command_Line_Symbol_Definitions): Adjust references to above.
4390 * prepcomp.ads: Remove dependency on Ada.Unchecked_Deallocation.
4391 (Add_Symbol_Definition): Move to switch-c.adb.
4392 * sem_ch13.adb, sem_prag.adb: Add dependency on Warnsw.
4394 (Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
4396 * sem_warn.ads (Warn_On_Record_Holes, Warn_On_Overridden_Size,
4397 Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
4399 * switch-c.adb: Replace dependency on Prepcomp and Sem_Warn by Warnsw.
4400 (Add_Symbol_Definition): Moved from Prepcomp.
4401 * switch-c.ads: Update copyright notice. Use String_List instead of
4402 Argument_List, removing dependency on System.OS_Lib.
4404 2011-08-02 Yannick Moy <moy@adacore.com>
4406 * sem_ch3.adb (Analyze_Object_Declaration): issue an error in formal
4407 mode on initialization expression which does not respect SPARK
4409 * sem_util.adb, sem_util.ads (Is_SPARK_Initialization_Expr): determines
4410 if the tree referenced by its argument represents an initialization
4411 expression in SPARK, suitable for initializing an object in an object
4414 2011-08-02 Javier Miranda <miranda@adacore.com>
4416 * exp_ch9.adb (Expand_Access_Protected_Subprogram_Type): Link the
4417 internally generated access to subprogram with its associated protected
4419 * einfo.ads, einfo.adb (Original_Access_Type): New attribute.
4421 2011-08-02 Geert Bosch <bosch@adacore.com>
4423 * cstand.adb (Register_Float_Type): Print information about type to
4424 register, if the Debug_Flag_Dot_B is set.
4425 * debug.adb (Debug_Flag_Dot_B): Document d.b debug option.
4426 * rtsfind.ads (RE_Max_Base_Digits): New run time entity.
4427 * sem_ch3.adb (Floating_Point_Type_Declaration): Allow declarations
4428 with a requested precision of more than Max_Digits digits and no more
4429 than Max_Base_Digits digits, if a range specification is present and the
4430 Predefined_Float_Types list has a suitable type to derive from.
4431 * sem_ch3.adb (Rep_Item_Too_Early): Avoid generating error in the
4432 case of type completion with pragma Import
4434 (Process_Import_Predefined_Type): Processing to complete a type
4435 with pragma Import. Currently supports floating point types only.
4436 (Set_Convention_From_Pragma): Do nothing without underlying type.
4437 (Process_Convention): Guard against absence of underlying type,
4438 which may happen when importing incomplete types.
4439 (Process_Import_Or_Interface): Handle case of importing predefined
4440 types. Tweak error message.
4442 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
4444 * inline.adb (Add_Inlined_Body): Adjust check for library-level inlined
4445 functions to previous change. Reorganize code slightly.
4447 2011-08-02 Geert Bosch <bosch@adacore.com>
4449 * back_end.ads (Register_Type_Proc): New call back procedure type for
4450 allowing the back end to provide information about available types.
4451 (Register_Back_End_Types): New procedure to register back end types.
4452 * back_end.adb (Register_Back_End_Types): Call the back end to enumerate
4454 * cstand.adb (Back_End_Float_Types): New list for floating point types
4455 supported by the back end.
4456 (Build_Float_Type): Add extra parameter for Float_Rep_Kind.
4457 (Copy_Float_Type): New procedure to make new copies of predefined types.
4458 (Register_Float_Type): New call back procedure to populate the BEFT list
4459 (Find_Back_End_Float_Type): New procedure to find a BEFT by name
4460 (Create_Back_End_Float_Types): New procedure to populate the BEFT list.
4461 (Create_Float_Types): New procedure to create entities for floating
4462 point types predefined in Standard, and put these and any remaining
4463 BEFTs on the Predefined_Float_Types list.
4464 * stand.ads (Predefined_Float_Types): New list for predefined floating
4465 point types that do not have declarations in package Standard.
4467 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
4469 * inline.adb (Get_Code_Unit_Entity): New local function. Returns the
4470 entity node for the unit containing the parameter.
4471 (Add_Inlined_Body): Use it to find the unit containing the subprogram.
4472 (Add_Inlined_Subprogram): Likewise.
4473 * gcc-interface/Make-lang.in: Update dependencies.
4475 2011-08-02 Thomas Quinot <quinot@adacore.com>
4477 * s-stusta.adb (Print): Make sure Pos is always initialized to a
4480 2011-08-02 Geert Bosch <bosch@adacore.com>
4482 * a-calfor.adb (Image): Simplify, removing unnecessary uses of 'Image.
4484 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
4486 * sem_type.adb (Covers): Move trivial case to the top and reuse the
4487 computed value of Base_Type.
4489 2011-08-02 Yannick Moy <moy@adacore.com>
4491 * restrict.adb (Check_Restriction): issue an error for any use of
4492 class-wide, even if the No_Dispatch restriction is not set.
4493 * sem_aggr.adb: Correct typos in comments and messages in formal mode
4494 * sem_ch3.adb (Process_Full_View): issue an error in formal mode is,
4495 when completing a private extension, the type named in the private part
4496 is not the same as that named in the visible part.
4497 * sem_res.adb (Resolve_Call): issue an error in formal mode on the use
4498 of an inherited primitive operations of a tagged type or type extension
4499 that returns the tagged type.
4500 * sem_util.adb, sem_util.ads (Is_Inherited_Operation_For_Type): new
4501 function which returns True for an implicit operation inherited by the
4502 derived type declaration for the argument type.
4503 (Is_SPARK_Object_Reference): move to appropriate place in alphabetic
4506 2011-08-02 Ed Schonberg <schonberg@adacore.com>
4508 * sem_ch5.adb (Pre_Analyze_Range): new procedure extracted from
4509 Process_Bounds, to perform analysis with expansion of a range or an
4510 expression that is the iteration scheme for a loop.
4511 (Analyze_Iterator_Specification): If domain of iteration is given by a
4512 function call with a controlled result, as is the case if call returns
4513 a predefined container, ensure that finalization actions are properly
4515 * par-ch3.adb: accept Ada2012 iterator form in P_Discrete_Range.
4517 2011-08-02 Javier Miranda <miranda@adacore.com>
4519 * sem_ch5.adb (Analyze_Iteration_Scheme): Fix typo.
4520 * gcc-interface/Make-lang.in: Update dependencies.
4522 2011-08-02 Javier Miranda <miranda@adacore.com>
4524 * sem_util.ads, sem_util.adb (Is_Variable): Add a new formal to
4525 determine if the analysis is performed using N or Original_Node (N).
4526 * exp_util.adb (Side_Effect_Free): Code cleanup since the new
4527 functionality of routine Is_Variable avoids code duplication.
4528 * checks.adb (Determine_Range): Handle temporaries generated by
4529 Remove_Side_Effects.
4531 2011-08-02 Javier Miranda <miranda@adacore.com>
4533 * exp_ch4.adb (Expand_N_Quantified_Expression): Force reanalysis and
4534 expansion of the condition. Required since the previous analysis was
4535 done with expansion disabled (see Resolve_Quantified_Expression) and
4536 hence checks were not inserted and record comparisons have not been
4539 2011-08-02 Ed Falis <falis@adacore.com>
4541 * s-taprop-vxworks.adb, s-intman-vxworks.adb, s-intman-vxworks.ads:
4544 2011-08-02 Bob Duff <duff@adacore.com>
4546 * opt.ads: Minor comment fix.
4548 2011-08-02 Bob Duff <duff@adacore.com>
4550 * sem_ch12.adb (Analyze_Package_Instantiation,
4551 Analyze_Subprogram_Instantiation): Turn off style checking while
4552 analyzing an instance. Whatever style checks that apply to the generic
4553 unit should apply, so it makes no sense to apply them in an instance.
4554 This was causing trouble when compiling an instance of a runtime
4555 unit that violates the -gnatyO switch.
4556 * stylesw.adb (Set_Style_Check_Options): "when 'O' =>" was missing from
4557 one of the two case statements, causing spurious errors.
4559 2011-08-02 Robert Dewar <dewar@adacore.com>
4561 * uname.adb: Minor reformatting.
4562 * gnatcmd.adb: Minor reformatting.
4563 * exp_attr.adb: Minor reformatting.
4565 2011-08-02 Ed Schonberg <schonberg@adacore.com>
4567 * exp_ch5.adb (Expand_N_Assignment_Statement): under restriction
4568 No_Dispatching_Calls, do not look for the Assign primitive, because
4569 predefined primitives are not created in this case.
4571 2011-08-02 Bob Duff <duff@adacore.com>
4573 * stylesw.ads: Minor comment fixes.
4575 2011-08-02 Robert Dewar <dewar@adacore.com>
4577 * freeze.adb (Add_To_Result): New procedure.
4579 2011-08-02 Jose Ruiz <ruiz@adacore.com>
4581 * exp_attr.adb (Find_Stream_Subprogram): When using a configurable run
4582 time, if the specific run-time routines for handling streams of strings
4583 are not available, use the default mechanism.
4585 2011-08-02 Arnaud Charlet <charlet@adacore.com>
4587 * s-regpat.ads: Fix typo.
4589 2011-08-02 Vincent Celier <celier@adacore.com>
4591 * prj-conf.adb (Get_Or_Create_Configuration_File): If On_Load_Config is
4592 not null, call it to create the in memory config project file without
4593 parsing an existing default config project file.
4595 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
4597 * atree.adb (Allocate_Initialize_Node): Remove useless temporaries.
4599 2011-08-02 Ed Schonberg <schonberg@adacore.com>
4601 * sem_elim.adb: an abstract subprogram does not need an eliminate
4602 pragma for its descendant to be eliminable.
4604 2011-08-02 Ed Falis <falis@adacore.com>
4606 * init.c: revert to handling before previous checkin for VxWorks
4607 * s-intman-vxworks.adb: delete unnecessary declarations related to
4608 using Ada interrupt facilities for handling signals.
4609 Delete Initialize_Interrupts. Use __gnat_install_handler instead.
4610 * s-intman-vxworks.ads: Import __gnat_install_handler as
4611 Initialize_Interrupts.
4612 * s-taprop-vxworks.adb: Delete Signal_Mask.
4613 (Abort_Handler): change construction of mask to unblock exception
4616 2011-08-02 Jerome Guitton <guitton@adacore.com>
4618 * a-except-2005.adb (Raise_From_Signal_Handler): Call
4619 Debug_Raise_Exception before propagation starts.
4621 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
4623 * exp_ch6.adb (Expand_Call): Guard restriction checks with a call
4624 to Restriction_Check_Required.
4625 * sem_ch3.adb (Analyze_Object_Declaration): Likewise.
4626 * sem_res.adb (Resolve_Call): Likewise.
4627 * sem_attr.adb (Check_Stream_Attribute): Likewise.
4629 2011-08-02 Bob Duff <duff@adacore.com>
4631 * stylesw.ads: Update comment.
4632 * style.adb: Minor: Use Error_Msg_NE instead of Error_Msg_N.
4633 * errout.ads: Remove obsolete comment.
4635 2011-08-02 Javier Miranda <miranda@adacore.com>
4637 * einfo.ads, einfo.adb (Is_Safe_To_Reevaluate): new function.
4638 (Set_Is_Safe_To_Reevaluate): new procedure.
4639 * sem_ch5.adb (Analyze_Assignment): Add one assertion to ensure that no
4640 assignment is allowed on safe-to-reevaluate variables.
4641 (Analyze_Iteration_Schine.Process_Bounds.One_Bound): Decorate the
4642 temporary created to remove side effects in expressions that use
4643 the secondary stack as safe-to-reevaluate.
4644 * exp_util.adb (Side_Effect_Free): Add missing code to handle well
4645 variables that are not true constants.
4647 2011-08-02 Robert Dewar <dewar@adacore.com>
4649 * sem_ch5.adb, sem_ch7.adb, einfo.ads, sem_util.adb, sem_util.ads,
4650 sem_res.adb, sem_ch6.adb: Minor reformatting.
4652 2011-08-02 Jerome Guitton <guitton@adacore.com>
4654 * a-except-2005.adb (Raise_Current_Excep): Remove obsolete dead code.
4656 2011-08-02 Ed Schonberg <schonberg@adacore.com>
4658 * sem_ch6.adb (New_Overloaded_Entity, Check_Overriding_Indicator): Do
4659 not set Overridden_Operation if subprogram is an initialization
4662 2011-08-02 Yannick Moy <moy@adacore.com>
4664 * par-ch6.adb: Correct obsolete name in comments
4665 * restrict.adb, restrict.ads (Check_Formal_Restriction): new function
4666 which takes two message arguments (existing function takes one), with
4667 second message used for continuation.
4668 * sem_ch5.adb (Analyze_Block_Statement): in formal mode, only reject
4669 block statements that originate from a source block statement, not
4670 generated block statements
4671 * sem_ch6.adb (Analyze_Function_Call): rename L into Actuals, for
4672 symmetry with procedure case
4673 * sem_ch7.adb (Check_One_Tagged_Type_Or_Extension_At_Most): new
4674 function to issue an error in formal mode if a package specification
4675 contains more than one tagged type or type extension.
4676 * sem_res.adb (Resolve_Actuals): in formal mode, check that actual
4677 parameters matching formals of tagged types are objects (or ancestor
4678 type conversions of objects), not general expressions. Issue an error
4679 on view conversions that are not involving ancestor conversion of an
4681 (Resolve_Type_Conversion): in formal mode, issue an error on the
4682 operand of an ancestor type conversion which is not an object
4683 * sem_util.adb, sem_util.ads (Find_Actual): extend the behavior of the
4684 procedure so that it works also for actuals of function calls
4685 (Is_Actual_Tagged_Parameter): new function which determines if its
4686 argument is an actual parameter of a formal of tagged type in a
4688 (Is_SPARK_Object_Reference): new function which determines if the tree
4689 referenced by its argument represents an object in SPARK
4691 2011-08-02 Robert Dewar <dewar@adacore.com>
4693 * sem_ch3.adb: Minor reformatting
4694 Minor comment addition
4695 Minor error msg text change
4697 2011-08-02 Javier Miranda <miranda@adacore.com>
4699 * sem_ch5.adb (Analyze_Iteration_Scheme.Uses_Secondary_Stack): New
4700 function. Used to be more precise when we generate a variable plus one
4701 assignment to remove side effects in the evaluation of the Bound
4703 (Analyze_Iteration_Scheme): Clean attribute analyzed in all the nodes
4704 of the bound expression to force its re-analysis and thus expand the
4705 associated transient scope (if required). Code cleanup replacing the
4706 previous code that declared the constant entity by an invocation to
4707 routine Force_Evaluation which centralizes this work in the frontend.
4709 2011-08-02 Robert Dewar <dewar@adacore.com>
4711 * einfo.adb (Is_Base_Type): Improve efficiency by using a flag table
4712 (Base_Type): Now uses improved Is_Base_Type function
4713 * einfo.ads (Base_Type): Inline this function
4715 2011-08-02 Robert Dewar <dewar@adacore.com>
4717 * sem_prag.adb (Analyze_Pragma): Defend against infinite recursion
4718 (Analyze_Aspect_Specifications): Fix Sloc values for constructed pragmas
4720 2011-08-02 Arnaud Charlet <charlet@adacore.com>
4722 * gcc-interface/Make-lang.in: Update dependencies.
4723 * gcc-interface/Makefile.in: Use s-inmapop-vxworks.adb for all VxWorks
4726 2011-08-02 Yannick Moy <moy@adacore.com>
4728 * par-ch3.adb (P_Delta_Constraint): issue an error in formal mode on
4729 non-simple expression used in delta constraint
4730 (P_Index_Or_Discriminant_Constraint): issue an error in formal mode on
4731 index constraint which is not a subtype mark
4732 * par.adb: With and use Restrict
4733 * sem_ch3.adb (Analyze_Component_Declaration): issue an error in formal
4734 mode on component type which is not a subtype mark and default
4735 expression on component
4736 (Analyze_Subtype_Declaration): issue an error in formal mode on subtype
4737 of string which does not have a lower index bound equal to 1
4738 (Array_Type_Declaration): issue an error in formal mode on index or
4739 component type which is not a subtype mark, and on aliased keyword on
4741 (Derived_Type_Declaration): issue an error in formal mode on interface,
4742 limited or abstract type
4743 (Record_Type_Declaration): issue an error in formal mode on interface
4744 (Record_Type_Definition): issue an error in formal mode on tagged types
4745 and type extensions not declared in the specification of a library unit
4746 package; on null non-tagged record; on variant part
4748 2011-08-02 Vincent Celier <celier@adacore.com>
4750 * prj-nmsc.adb (Check_Library_Attributes): Do not report Library_Dir
4751 not declared for qualified library project when Library_Name is not
4752 declared, but Library_Dir is.
4754 2011-08-02 Robert Dewar <dewar@adacore.com>
4756 * sem_ch13.adb (Analyze_Aspect_Specification): Fix slocs on generated
4757 pragmas (affects aspects [Component_]Default_Value
4758 (Check_Aspect_At_Freeze_Point): For Component_Default_Value, use
4759 component type for the resolution
4761 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
4763 * einfo.adb (Base_Type): Tune implementation for speed.
4765 2011-08-02 Robert Dewar <dewar@adacore.com>
4767 * freeze.adb: Minor reformatting.
4769 2011-08-02 Thomas Quinot <quinot@adacore.com>
4771 * scos.ads: Update comments.
4773 2011-08-02 Ed Schonberg <schonberg@adacore.com>
4775 * sem_ch3.adb (Build_Derived_Type): Inherit the convention from the
4776 base type, because the parent may be a subtype of a private type whose
4777 convention is established in a private part.
4779 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
4781 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Wrap the return
4782 statement in a block when the expansion of the return expression has
4783 created a finalization chain.
4784 * freeze.adb (Freeze_Expression): Alphabetize all choices associated
4785 with the parent node.
4786 Add N_Extended_Return_Statement to handle the case where a transient
4787 object declaration appears in the Return_Object_Declarations list of
4788 an extended return statement.
4790 2011-08-02 Matthew Gingell <gingell@adacore.com>
4792 * adaint.c (__gnat_is_symbolic_link_attr): Supress warning on possibly
4793 unused parameter 'name'.
4795 2011-08-02 Ed Schonberg <schonberg@adacore.com>
4797 * sem_elim.adb (Set_Eliminated): If the overridden operation is an
4798 inherited operation, check whether its alias, which is the source
4799 operastion that it renames, has been marked eliminated.
4801 2011-08-02 Javier Miranda <miranda@adacore.com>
4803 * exp_util.adb (Safe_Prefixed_Reference): Do not consider safe an
4804 in-mode parameter whose type is an access type since it can be used to
4805 modify its designated object. Enforce code that handles as safe an
4806 access type that is not access-to-constant but it is the result of a
4807 previous removal of side-effects.
4808 (Remove_Side_Effects): Minor code reorganization of cases which require
4809 no action. Done to incorporate documentation on new cases uncovered
4810 working in this ticket: no action needed if this routine was invoked
4811 too early and the nodes are not yet decorated.
4812 * sem_res.adb (Resolve_Slice): Minor code cleanup replacling two calls
4813 to routine Remove_Side_Effects by calls to Force_Evaluation since they
4814 were issued with actuals that are implicitly provided by
4817 2011-08-02 Robert Dewar <dewar@adacore.com>
4819 * sem_ch3.adb, sem_res.adb: Minor reformatting.
4821 2011-08-02 Yannick Moy <moy@adacore.com>
4823 * sem_attr.adb (Check_Formal_Restriction_On_Attribute): new procedure
4824 to issue an error in formal mode on attribute not supported in this mode
4825 (Analyze_Attribute): issue errors on standard attributes not supported
4827 * sem_ch3.adb (Modular_Type_Declaration): remove obsolete part of
4828 comment, and issue error in formal mode on modulus which is not a power
4830 (Process_Range_Expr_In_Decl): issue error in formal mode on non-static
4832 * sem_ch8.adb (Find_Type): issue error in formal mode on 'Base in
4834 * sem_res.adb (Resolve_Unary_Op): issue error in formal mode on unary
4835 operator on modular type (except 'not').
4837 2011-08-02 Robert Dewar <dewar@adacore.com>
4839 * gnat_rm.texi: Minor reformatting.
4841 2011-08-02 Arnaud Charlet <charlet@adacore.com>
4843 * s-osinte-linux.ads: Minor comment update and reformatting.
4844 * i-cexten.ads: Make this unit pure, as for its parent.
4845 Will allow its usage in more contexts if needed.
4847 2011-08-02 Robert Dewar <dewar@adacore.com>
4849 * s-utf_32.ads: Minor comment fix.
4851 2011-08-02 Ed Schonberg <schonberg@adacore.com>
4853 * sem_res.adb (Resolve_Actuals): if the subprogram is a primitive
4854 operation of a tagged synchronized type, handle the case where the
4855 controlling argument is overloaded.
4857 2011-08-02 Yannick Moy <moy@adacore.com>
4859 * gnat_rm.texi, opt.ads, sem_prag.adb, snames.ads-tmpl:
4860 Replace pragma SPARK_95 with pragma Restrictions (SPARK)
4861 * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): set
4862 SPARK mode and formal verification mode on processing SPARK restriction
4863 * s-rident.ads (Restriction_Id): add SPARK restriction in those not
4864 requiring consistency checking.
4866 2011-08-02 Robert Dewar <dewar@adacore.com>
4868 * sem_res.adb: Minor reformatting.
4870 2011-08-02 Robert Dewar <dewar@adacore.com>
4872 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
4873 a-cforse.ads: Remove unneeded with of Ada.Containers
4874 Remove commented out pragma Inline's
4875 Move specifications of new subprograms to the actual specs
4877 2011-08-02 Yannick Moy <moy@adacore.com>
4879 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
4880 a-cforse.ads: Update comments.
4882 2011-08-02 Ed Schonberg <schonberg@adacore.com>
4884 * sem_attr.adb: add attribute name when 'Result has the wrong prefix.
4886 2011-08-02 Robert Dewar <dewar@adacore.com>
4888 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
4889 a-cforse.ads, a-cofove.ads: Minor reformatting.
4891 2011-08-02 Claire Dross <dross@adacore.com>
4893 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads, a-cforse.ads,
4894 a-cofove.ads: Add comments.
4896 2011-08-02 Yannick Moy <moy@adacore.com>
4898 * gnat_rm.texi: Document formal containers.
4900 2011-08-02 Emmanuel Briot <briot@adacore.com>
4902 * g-comlin.adb (Goto_Section, Getopt): fix handling of "*" when there
4905 2011-08-02 Robert Dewar <dewar@adacore.com>
4907 * mlib-prj.adb, restrict.ads, sem_aggr.adb, sem_ch12.adb: Minor
4910 2011-08-02 Robert Dewar <dewar@adacore.com>
4912 * aspects.adb: New aspects Default_Value and Default_Component_Value
4913 New format of Aspect_Names table checks for omitted entries
4914 * aspects.ads: Remove mention of Aspect_Cancel and add documentation on
4915 handling of boolean aspects for derived types.
4916 New aspects Default_Value and Default_Component_Value
4917 New format of Aspect_Names table checks for omitted entries
4918 * einfo.ads, einfo.adb (Has_Default_Component_Value): New flag
4919 (Has_Default_Value): New flag
4920 (Has_Default_Component_Value): New flag
4921 (Has_Default_Value): New flag
4922 * par-ch13.adb (P_Aspect_Specifications): New format of Aspect_Names
4924 * par-prag.adb: New pragmas Default_Value and Default_Component_Value
4925 * sem_ch13.adb (Analyze_Aspect_Specifications): New aspects
4926 Default_Value and Default_Component_Value
4927 * sem_prag.adb: New pragmas Default_Value and Default_Component_Value
4928 New aspects Default_Value and Default_Component_Value
4929 * snames.ads-tmpl: New pragmas Default_Value and Default_Component_Value
4930 * sprint.adb: Print N_Aspect_Specification node when called from gdb
4932 2011-08-02 Vincent Celier <celier@adacore.com>
4934 * prj-nmsc.adb (Check_Library_Attributes): For virtual library project,
4935 inherit library kind.
4937 2011-08-02 Ed Schonberg <schonberg@adacore.com>
4939 * sem_res.adb: Add guards in calls to Matching_Static_Array_Bounds.
4942 2011-08-02 Robert Dewar <dewar@adacore.com>
4944 * i-cstrin.ads: Updates to make Interfaces.C.Strings match RM
4946 2011-08-02 Yannick Moy <moy@adacore.com>
4948 * sem_aggr.adb (Resolve_Aggregate): Fix thinko.
4950 2011-08-02 Robert Dewar <dewar@adacore.com>
4952 * impunit.adb: Add comment.
4954 2011-08-02 Yannick Moy <moy@adacore.com>
4956 * sem_aggr.adb (Check_Qualified_Aggregate): new procedure which checks
4957 qualification of aggregates in formal mode
4958 (Is_Top_Level_Aggregate): returns True for an aggregate not contained in
4960 (Resolve_Aggregate): complete the test that an aggregate is adequately
4961 qualified in formal mode
4963 2011-08-02 Pascal Obry <obry@adacore.com>
4965 * make.adb, bindgen.adb, gnatbind.adb: Minor reformatting.
4966 * mlib-prj.adb: Supress warning when compiling binder generated file.
4967 (Build_Library): Supress all warnings when compiling the binder
4970 2011-08-02 Yannick Moy <moy@adacore.com>
4972 * errout.adb, errout.ads (Check_Formal_Restriction): move procedure
4974 * restrict.adb, restrict.ads (Check_Formal_Restriction): ...to here
4975 * sem_aggr.adb, sem_ch5.adb, sem_util.adb:
4976 Add with/use clauses to make Check_Formal_Restriction visible
4978 2011-08-02 Ed Schonberg <schonberg@adacore.com>
4980 * sem_ch12.adb (Check_Generic_Actuals): handle properly actual
4981 in-parameters when type of the generic formal is private in the generic
4982 spec and non-private in the body.
4984 2011-08-02 Claire Dross <dross@adacore.com>
4986 * a-cfdlli.adb, a-cfdlli.ads, a-cfhase.adb, a-cfhase.ads, a-cfhama.adb,
4987 a-cfhama.ads, a-cforse.adb, a-cforse.ads, a-cforma.adb, a-cforma.ads,
4988 a-cofove.adb, a-cofove.ads: New files implementing formal containers.
4989 * impunit.adb, Makefile.rtl: Take new files into account.
4991 2011-08-02 Robert Dewar <dewar@adacore.com>
4993 * sem_aggr.adb, sem_ch3.adb, sem_ch5.adb, make.adb, sem_res.adb,
4994 sem_attr.adb, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
4996 2011-08-02 Yannick Moy <moy@adacore.com>
4998 * sem_aggr.adb (Resolve_Aggregate): disable incorrectly placed check in
5000 * sem_util.adb (Matching_Static_Array_Bounds): proper detection of
5001 matching static array bounds, taking into account the special case of
5003 * sem_ch3.adb: Typo in comment.
5005 2011-08-02 Yannick Moy <moy@adacore.com>
5007 * errout.adb, errout.ads (Check_Formal_Restriction): new procedure
5008 which issues an error in formal mode if its argument node is originally
5010 * sem_ch3.adb (Analyze_Full_Type_Declaration): move test that a type
5011 has a discriminant specification so that it does not include the case
5013 (Derived_Type_Declaration): move here the test that a derived type has a
5014 discriminant specification
5015 * sem_aggr.adb (Resolve_Record_Aggregate): test the presence of the
5016 first element of a component association before accessing its choices
5017 (presence of component association is not enough)
5018 * exp_ch6.adb (Expand_N_Subprogram_Declaration): test if a subprogram
5019 declaration is a library item before accessing the next element in a
5020 list, as library items are not member of lists
5021 * sem_attr.adb, sem_ch11.adb, sem_ch4.adb, sem_ch5.adb, sem_ch6.adb,
5022 sem_ch8.adb, sem_ch9.adb, sem_res.adb, sem_util.adb: use
5023 Check_Formal_Restriction whenever possible.
5025 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5027 * sem_ch3.adb (Find_Type_Of_Object): In ASIS mode, create an itype
5028 reference when needed.
5030 2011-08-02 Bob Duff <duff@adacore.com>
5032 * gnat_ugn.texi: Fix typo.
5034 2011-08-02 Vincent Celier <celier@adacore.com>
5036 * make.adb (Gnatmake): Use MLib.Tgt.Archive_Ext as the extension of
5037 archive file name. Do not use the full path name of archives for Open
5040 2011-08-02 Robert Dewar <dewar@adacore.com>
5042 * sem_ch12.adb, sem_ch11.adb: New calling sequence for
5043 Analyze_Aspect_Specifications
5045 (Analyze_Aspect_Specifications): New handling for boolean aspects
5046 * sem_ch13.ads (Analyze_Aspect_Specifications): New calling sequence
5047 * sem_ch3.adb, sem_ch6.adb, sem_ch7.adb, sem_ch9.adb: New calling
5048 sequence for Analyze_Aspect_Specifications
5049 * sem_prag.adb (Analyze_Pragma): Remove use of Aspect_Cancel entirely
5050 * sinfo.ads, sinfo.adb (Aspect_Cancel): Remove, no longer used
5052 2011-08-02 Robert Dewar <dewar@adacore.com>
5054 * freeze.adb (Freeze_Entity): Remove handling of delayed boolean
5055 aspects, since these no longer exist.
5057 2011-08-02 Robert Dewar <dewar@adacore.com>
5059 * par-ch13.adb (Aspect_Specifications_Present): Always return false on
5060 semicolon, do not try to see if there are aspects following it.
5061 * par-ch3.adb (P_Declarative_Items): Better message for unexpected
5064 2011-08-02 Robert Dewar <dewar@adacore.com>
5066 * sem_ch8.adb, aspects.ads: Minor reformatting.
5068 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
5070 * sem_ch13.ads (Analyze_Aspect_Specification): Add pragma Inline.
5071 * sem_ch13.adb (Analyze_Non_Null_Aspect_Specifications): New procedure
5073 (Analyze_Aspect_Specifications): ...here. Call above procedure.
5075 2011-08-02 Yannick Moy <moy@adacore.com>
5077 * exp_ch6.adb (Expand_N_Subprogram_Declaration): issue error in formal
5078 mode on subprogram declaration outside of package specification, unless
5079 it is followed by a pragma Import
5080 * sem_ch3.adb (Access_Definition, Access_Subprogram_Declaration,
5081 Access_Type_Declaration): issue error in formal mode on access type
5082 (Analyze_Incomplete_Type_Decl): issue error in formal mode on
5084 (Analyze_Object_Declaration): issue error in formal mode on object
5085 declaration which does not respect SPARK restrictions
5086 (Analyze_Subtype_Declaration): issue error in formal mode on subtype
5087 declaration which does not respect SPARK restrictions
5088 (Constrain_Decimal, Constrain_Float, Constrain_Ordinary_Fixed): issue
5089 error in formal mode on digits or delta constraint
5090 (Decimal_Fixed_Point_Type_Declaration): issue error in formal mode on
5091 decimal fixed point type
5092 (Derived_Type_Declaration): issue error in formal mode on derived type
5093 other than type extensions of tagged record types
5094 * sem_ch6.adb (Process_Formals): remove check in formal mode, redundant
5095 with check on access definition
5096 * sem_ch9.adb (Analyze_Protected_Definition): issue error in formal
5097 mode on protected definition.
5098 (Analyze_Task_Definition): issue error in formal mode on task definition
5100 2011-08-02 Robert Dewar <dewar@adacore.com>
5102 * make.adb, sem_ch8.adb, s-inmaop-vxworks.adb: Minor reformatting.
5104 2011-08-02 Javier Miranda <miranda@adacore.com>
5106 * sem_ch6.adb (Can_Override_Operator): New function.
5107 (Verify_Overriding_Indicator): Add missing code to check overriding
5108 indicator in operators. Fixes regression.
5109 (Check_Overriding_Indicator): Minor reformating after replacing the
5110 code that evaluates if the subprogram can override an operator by
5111 invocations to the above new function.
5113 (Write_Field26_Name): Add missing code to ensure that, following
5114 the documentation in einfo.ads, this field is not shown as attribute
5115 "Static_Initialization" on non-dispatching functions.
5117 2011-08-02 Jose Ruiz <ruiz@adacore.com>
5119 * sem_res.adb (Resolve_Call): A call to
5120 Ada.Real_Time.Timing_Events.Set_Handler violates restriction
5121 No_Relative_Delay (AI-0211) only when it sets a relative timing event,
5122 i.e., when the second parameter is of type Time_Span.
5124 2011-08-02 Vincent Celier <celier@adacore.com>
5126 * make.adb (Gnatmake): use <library dir>/lib<library name>.a to link
5127 with an archive instead of -L<library dir> -l<library name>.
5129 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5131 * sem_ch8.adb (Analyze_Use_Type): If the clause is being re-analyzed,
5132 mark the base types In_Use in addition to making the operations
5135 2011-08-02 Ed Falis <falis@adacore.com>
5137 * init.c: add and setup __gnat_signal_mask for the exception signals
5138 * s-inmaop-vxworks.adb: new file.
5139 * s-intman-vxworks.adb: remove unnecessary initializations and
5141 * s-intman-vxworks.ads: remove unnecessary variable
5142 * s-taprop-vxworks.adb: simplify signal initialization
5144 2011-08-02 Robert Dewar <dewar@adacore.com>
5146 * sem_ch8.adb: Minor code reorganization, comment updates.
5148 2011-08-02 Robert Dewar <dewar@adacore.com>
5150 * sem_res.adb (Matching_Static_Array_Bounds): Moved to Sem_Util
5151 * sem_util.ads, sem_util.adb (Matching_Static_Array_Bounds): Moved
5153 (Matching_Static_Array_Bounds): Use Is_Ok_Static_Expression
5154 (Matching_Static_Array_Bounds): Moved here from Sem_Res
5156 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5158 * atree.h, atree.ads, atree.adb: New subprograms to manipulate Elist5.
5159 * par_ch8.adb (P_Use_Type): initialize Used_Operations for node.
5160 * sinfo.ads, sinfo.adb (Used_Operations): new attribute of
5161 use_type_clauses, to handle more efficiently use_type and use_all_type
5163 * sem_ch8.adb: Rewrite Use_One_Type and End_Use_Type to handle the
5164 Ada2012 Use_All_Type clause.
5165 (Use_Class_Wide_Operations): new procedure.
5167 2011-08-02 Robert Dewar <dewar@adacore.com>
5169 * exp_util.adb, par-ch10.adb, par-ch6.adb, sem.adb, sem_ch6.adb,
5170 sem_ch6.ads, sinfo.adb, sinfo.ads, sprint.adb: Change parameterized
5171 expression to expression function.
5173 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5175 * sem_ch4.adb: transform simple Ada2012 membership into equality only
5176 if types are compatible.
5178 2011-08-02 Yannick Moy <moy@adacore.com>
5180 * sem_res.adb (Matching_Static_Array_Bounds): new function which
5181 returns True if its argument array types have same dimension and same
5182 static bounds at each index.
5183 (Resolve_Actuals): issue an error in formal mode on actuals passed as
5184 OUT or IN OUT paramaters which are not view conversions in SPARK.
5185 (Resolve_Arithmetic_Op): issue an error in formal mode on
5186 multiplication or division with operands of fixed point types which are
5187 not qualified or explicitly converted.
5188 (Resolve_Comparison_Op): issue an error in formal mode on comparisons of
5189 Boolean or array type (except String) operands.
5190 (Resolve_Equality_Op): issue an error in formal mode on equality
5191 operators for array types other than String with non-matching static
5193 (Resolve_Logical_Op): issue an error in formal mode on logical operators
5194 for array types with non-matching static bounds. Factorize the code in
5195 Matching_Static_Array_Bounds.
5196 (Resolve_Qualified_Expression): issue an error in formal mode on
5197 qualified expressions for array types with non-matching static bounds.
5198 (Resolve_Type_Conversion): issue an error in formal mode on type
5199 conversion for array types with non-matching static bounds
5201 2011-08-02 Robert Dewar <dewar@adacore.com>
5203 * par-ch10.adb: Minor code reorganization (use Nkind_In).
5205 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5207 * par-ch9.adb: save location of entry for proper error message.
5209 2011-08-02 Javier Miranda <miranda@adacore.com>
5211 * sem_type.ads, sem_type.adb (Is_Ancestor): Addition of a new formal
5212 (Use_Full_View) which permits this routine to climb through the
5213 ancestors using the full-view of private parents.
5214 * sem_util.adb (Collect_Interfaces_Info, Implements_Interface): Set
5215 Use_Full_View to true in calls to Is_Ancestor.
5216 * sem_disp.adb (Override_Dispatching_Operation): Set Use_Full_View to
5217 true in call to Is_Ancestor.
5218 * exp_ch3.adb (Build_Offset_To_Top_Functions, Initialize_Tag): Set
5219 Use_Full_View to true in call to Is_Ancestor.
5220 * exp_ch7.adb (Controller_Component): Set Use_Full_View to true in
5221 call to Is_Ancestor.
5222 * exp_ch4.adb (Expand_N_Type_Conversion, Tagged_Membership): Set
5223 Use_Full_View to true in calls to Is_Ancestor.
5224 * exp_disp.adb (Expand_Interface_Actuals, Make_Secondary_DT, Make_DT,
5225 Make_Select_Specific_Data_Table, Register_Primitive,
5226 Set_All_DT_Position): Set Use_Full_View to true in calls to Is_Ancestor.
5227 * exp_intr.adb (Expand_Dispatching_Constructor_Call): Set Use_Full_View
5228 to true in call to Is_Ancestor.
5229 * exp_util.adb (Find_Interface_ADT, Find_Interface_Tag): Set
5230 Use_Full_View to true in calls to Is_Ancestor.
5232 (Write_Call_Info): Set Use_Full_View to true in call to Is_Ancestor.
5233 (Write_Type_Info): Set Use_Full_View to true in call to Is_Ancestor.
5235 2011-08-02 Robert Dewar <dewar@adacore.com>
5237 * gnat_rm.texi: Minor reformatting.
5238 * sem_prag.adb: Minor reformatting.
5240 2011-08-02 Tristan Gingold <gingold@adacore.com>
5242 * vms_data.ads: Add VMS qualifier for -gnateP.
5244 2011-08-02 Robert Dewar <dewar@adacore.com>
5246 * par-ch13.adb (P_Aspect_Specification): New meaning of Decl = Empty
5247 * par-ch7.adb (P_Package): Proper placement of aspects for package
5249 * par-endh.adb (Check_End): Ad Is_Sloc parameter
5250 (End_Statements): Add Is_Sloc parameterr
5251 * par.adb (P_Aspect_Specification): New meaning of Decl = Empty
5252 (Check_End): Ad Is_Sloc parameter
5253 (End_Statements): Add Is_Sloc parameterr
5255 2011-08-02 Vincent Celier <celier@adacore.com>
5257 * ug_words: Add VMS qualifier equivalent to -gnateP:
5258 /SYMBOL_PREPROCESSING.
5260 2011-08-02 Jose Ruiz <ruiz@adacore.com>
5262 * gnat-style.texi: For hexadecimal numeric literals the typical
5263 grouping of digits is 4 to represent 2 bytes.
5264 A procedure spec which is split into several lines is indented two
5267 2011-08-02 Yannick Moy <moy@adacore.com>
5269 * exp_aggr.adb (Is_Others_Aggregate): move function to other unit.
5270 * sem_aggr.adb, sem_aggr.ads (Is_Others_Aggregate): move function here
5271 (Resolve_Aggregate): issue errors in formal modes when aggregate is not
5273 (Resolve_Array_Aggregate): issue errors in formal modes on non-static
5274 choice in array aggregate
5275 (Resolve_Extension_Aggregate): issue errors in formal modes on subtype
5277 (Resolve_Record_Aggregate): issue errors in formal modes on mixed
5278 positional and named aggregate for record, or others in record
5279 aggregate, or multiple choice in record aggregate
5280 * sem_res.adb (Resolve_Logical_Op): issue errors in formal mode when
5281 array operands to logical operations AND, OR and XOR do not have the
5282 same static lower and higher bounds
5283 * sem_ch5.adb, sinfo.ads: Correct typos in comments
5285 2011-08-01 Robert Dewar <dewar@adacore.com>
5287 * sem_util.ads, sem_util.adb, sem_ch6.adb (Last_Source_Statement):
5288 Replaces Last_Source_Node_In_Sequence.
5289 * err_vars.ads (Error_Msg_Lang): 16 is OK, don't need 4K
5290 * errout.adb (Set_Error_Msg_Lang): Takes arg with no parens, but stores
5291 parens and blank in string (this was inconsistently implemented).
5293 (Set_Error_Msg_Lang): Takes arg with no parens, but stores parens and
5294 blank in string (this was inconsistently implemented).
5296 (Set_Global_Switches): Set formal mode switches appropriately
5297 * opt.ads, opt.adb: Formal mode is now global switches, more consistent
5299 (Analyze_Pragma, case SPARK_95): Set opt switches appropriately and
5300 call Set_Error_Msg_Lang to set "spark" as language name.
5301 * par.adb: Remove unnecessary call to set formal language for errout
5302 * sem_prag.adb (P_Pragma, case SPARK_95): Set opt switches
5303 appropriately and call Set_Error_Msg_Lang to set "spark" as language
5305 * sem_ch4.adb (Analyze_Concatenation_Operand): remove procedure and
5306 calls to it, moved after resolution so that types are known
5307 * sem_res.adb (Resolve_Op_Concat): issue an error in formal mode if
5308 result of concatenation is not of type String
5309 (Resolve_Op_Concat_Arg): issue an error in formal mode if an operand of
5310 concatenation is not properly restricted
5311 * gnat_rm.texi: Add doc on pragma Spark_95.
5312 * gcc-interface/Makefile.in: Remove obsolete target pairs for
5313 Interfaces.C.* on VMS. Remove s-parame-vms-restrict.ads.
5314 * gcc-interface/Make-lang.in: Update dependencies.
5316 2011-08-01 Javier Miranda <miranda@adacore.com>
5318 * sem_disp.adb (Override_Dispatching_Operation): Enforce strictness of
5319 condition that detects if the overridden operation must replace an
5322 2011-08-01 Javier Miranda <miranda@adacore.com>
5324 * exp_ch4.adb (Expand_N_Case_Expression): Propagate to the expanded
5325 code declarations inserted by Insert_Actions in each alternative of the
5326 N_Case_Expression node.
5328 2011-08-01 Robert Dewar <dewar@adacore.com>
5330 * sem_ch6.adb: Minor code reorganization.
5331 * sem_util.adb: Minor reformatting.
5333 2011-08-01 Pascal Obry <obry@adacore.com>
5335 * prj-env.adb: Remove <prefix>/lib/gpr/<target> project search path.
5336 * gnat_ugn.texi: Add documentation for VERSIONINFO Windows resource.
5338 2011-08-01 Yannick Moy <moy@adacore.com>
5340 * par-ch4.adb (P_Name): issue a syntax error in SPARK mode on character
5341 literal or operator symbol which is prefixed
5342 * sem_attr.adb (Analyze_Access_Attribute): issue an error in formal
5343 mode on access attributes.
5344 * sem_ch4.adb (Analyze_Concatenation_Operand): new procedure to check
5345 that concatenation operands are properly restricted in formal mode
5346 (Analyze_Concatenation, Analyze_Concatenation_Rest): call new procedure
5347 Analyze_Concatenation_Operand. Issue an error in formal mode if the
5348 result of the concatenation has a type different from String.
5349 (Analyze_Conditional_Expression, Analyze_Explicit_Dereference,
5350 Analyze_Quantified_Expression, Analyze_Slice,
5351 Analyze_Null): issue an error in formal mode on unsupported constructs
5353 (Analyze_Block_Statement): only issue error on source block statement
5354 * sem_util.ads, sem_util.adb (Last_Source_Node_In_Sequence): new
5355 function which returns the last node in a list of nodes for which
5356 Comes_From_Source returns True, if any
5357 * sem_ch6.adb (Check_Missing_Return): minor refactoring to use
5358 Last_Source_Node_In_Sequence
5359 * sem_ch8.adb (Analyze_Exception_Renaming, Analyze_Generic_Renaming,
5360 Analyze_Object_Renaming, Analyze_Use_Package): issue an error in formal
5361 mode on unsupported constructs
5362 * sem_ch9.adb Do not return after issuing error in formal mode, as the
5363 rest of the actions may be needed later on since the error is marked as
5365 * sinfo.ads: Typos in comments.
5367 2011-08-01 Pascal Obry <obry@adacore.com>
5369 * projects.texi: Minor editing.
5371 2011-08-01 Yannick Moy <moy@adacore.com>
5373 * err_vars.ads (Error_Msg_Lang, Error_Msg_Langlen): new variables for
5374 insertion character ~~
5375 * errout.ads, errout.adb (Formal_Error_Msg_...): remove procedures
5376 (Set_Error_Msg_Lang): new procedure which fixes the language for use
5377 with insertion character ~~
5378 (Set_Msg_Text): treat insertion character ~~
5379 * par-ch4.adb, par-ch5.adb, par-endh.adb, sem_attr.adb, sem_ch11.adb,
5380 sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_util.adb: Replace calls to
5381 Formal_Error_Msg_... procedures by equivalent Error_Msg_...
5382 procedures. Favor calls to Error_Msg_F(E) over Error_Msg_N(E). Make
5383 errors related to the formal language restriction not serious
5384 (insertion character |).
5385 * par.adb (Par): set formal language for error messages if needed
5386 * sem_ch6.adb (Check_Missing_Return): take into account possible
5387 generated statements at the end of the function
5388 * snames.ads-tmpl (Name_SPARK_95, Pragma_SPARK_95): new variable and
5389 enumeration value to define a new pragma SPARK_95
5390 * opt.ads, opt.adb (SPARK_Version_Type, SPARK_Version_Default,
5391 SPARK_Version): new type and variables to store the SPARK version
5393 (SPARK_Mode): return True when SPARK_Version is set
5394 * par-prag.adb: Correct indentation
5395 (Prag): take Pragma_SPARK_95 into account
5396 * sem_prag.adb (Set_Mechanism_Value, Sig_Flags): take Pragma_SPARK_95
5399 2011-08-01 Robert Dewar <dewar@adacore.com>
5401 * sem_ch3.adb, sem_ch3.ads, sem_ch5.adb, prj-part.adb, par-ch4.adb,
5402 sem_util.adb, sem_ch4.adb, sem_ch6.adb, sem_ch6.ads, sem_ch8.adb,
5403 sem_ch8.ads, sem_ch13.ads, par-ch5.adb, prj-env.ads: Minor reformatting
5405 2011-08-01 Pascal Obry <obry@adacore.com>
5407 * prj-part.ads, prj-part.adb (Parse): Add Target_Name parameter. Pass
5408 Target_Name to Get_Path call.
5409 (Parse_Single_Project): Likewise.
5410 (Post_Parse_Context_Clause): Likewise.
5411 * prj-env.ads, prj-env.adb (Find_Project): Add Target_Name parameter.
5412 Call Initialise_Project_Path with the proper Target_Name.
5413 (Initialize_Project_Path): Add <gnat_root>/<target_name>/lib/gnat
5415 (Get_Path): Add Target_Name parameter. Call Initialise_Project_Path
5416 with the proper Target_Name.
5417 * prj-conf.adb (Get_Or_Create_Configuration_File): Pass Target_Name to
5419 (Parse_Project_And_Apply_Config): Likewise.
5420 * prj-makr.adb (Initialize): Pass empty Target_Name to Parse routine.
5421 This is fine as this part of the code is supporting only native
5423 * prj-pars.adb (Parse): Pass empty Target_Name to Parse routine. This
5424 is fine as this part of the code is supporting only native compilation.
5426 2011-08-01 Yannick Moy <moy@adacore.com>
5428 * sem_util.adb (Enter_Name): issue error in formal mode on declaration
5429 of homonym, unless the homonym is one of the cases allowed in SPARK
5430 * par-ch5.adb (Parse_Decls_Begin_End): issue error in SPARK mode for
5431 package declaration occurring after a body.
5433 2011-08-01 Robert Dewar <dewar@adacore.com>
5435 * checks.adb, exp_ch4.adb: Minor reformatting.
5437 2011-08-01 Javier Miranda <miranda@adacore.com>
5439 * einfo.ads (Access_Disp_Table): Fix documentation.
5440 (Dispatch_Table_Wrappers): Fix documentation.
5442 2011-08-01 Pascal Obry <obry@adacore.com>
5444 * prj-env.adb, prj-env.ads: Minor reformatting.
5446 2011-08-01 Yannick Moy <moy@adacore.com>
5448 * sem_util.ads, sem_util.adb, par.adb, par_util.adb
5449 (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
5450 procedures out of these packages.
5451 * errout.ads, errout.adb
5452 (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
5453 procedures in of this package
5454 (Formal_Error_Msg_NE): new procedure for wrapper on Error_Msg_NE
5455 * par-ch5.adb (Parse_Decls_Begin_End): issue syntax error in SPARK mode
5456 on misplaced later vs initial declarations, like in Ada 83
5457 * sem_attr.adb (Processing for Analyze_Attribute): issue error in
5458 formal mode on attribute of private type whose full type declaration
5460 * sem_ch3.adb (Analyze_Declarations): issue error in formal mode on a
5461 package declaration inside a package specification
5462 (Analyze_Full_Type_Declaration): issue error in formal mode on
5463 controlled type or discriminant type
5464 * sem_ch6.adb (Analyze_Subprogram_Specification): only issue error on
5465 user-defined operator means that it should come from the source
5466 (New_Overloaded_Entity): issue error in formal mode on overloaded
5468 * sem_ch6.ads, sem_ch13.ads: typos in comments.
5470 2011-08-01 Thomas Quinot <quinot@adacore.com>
5472 * atree.adb: Minor reformatting.
5473 * checks.adb: Minor reformatting.
5475 2011-08-01 Vincent Celier <celier@adacore.com>
5477 * s-parame-vms-ia64.ads: Fix typo in comment
5479 * s-parame-vms-restrict.ads: Removed, unused.
5481 2011-08-01 Javier Miranda <miranda@adacore.com>
5484 (Is_Variable_Size_Array): Remove local subprogram Is_Constant_Bound.
5486 (Constrain_Index): Remove side effects in the evaluation of the bounds.
5487 * sem_ch3.ads, sem_ch3.adb
5488 (Is_Constant_Bound): New extended version of the subprogram that was
5489 previously located inside function Exp_Ch3.Is_Variable_Size_Array.
5490 Moved here since it is shared by routines of sem_ch3 and exp_ch3.
5491 * sem_aux.ads (Constant_Value): Fix typo in comment.
5492 * checks.adb (Generate_Index_Checks): New implementation which, for
5493 array objects with constant bounds, generates the runtime check
5494 referencing the bounds of the array type. For other cases this routine
5495 provides its previous behavior obtaining such values from the array
5497 * sem_res.adb (Set_Slice_Subtype): Link a copied range subtree with its
5499 * atree.adb (New_Copy): Reset flag Is_Overloaded in the new copy since
5500 we cannot have semantic interpretations of the new node.
5502 2011-08-01 Ed Schonberg <schonberg@adacore.com>
5504 * sem_ch6.adb (Fully_Conformant_Expressions): handle quantified
5507 2011-08-01 Arnaud Charlet <charlet@adacore.com>
5509 * sem_ch8.adb: Minor code editing.
5510 * s-vxwext.adb: Remove trailing space.
5511 * freeze.adb, freeze.ads, errout.ads, erroutc.adb: Fix GPLv3 header for
5512 consistency with other files.
5514 2011-08-01 Thomas Quinot <quinot@adacore.com>
5516 * s-auxdec.ads, s-auxdec-vms_64.ads: Minor reformatting.
5518 2011-08-01 Ed Schonberg <schonberg@adacore.com>
5520 * par-ch10.adb: reject parameterized expressions as compilation unit.
5521 * sem_ch4.adb: handle properly conditional expression with overloaded
5522 then_clause and no else_clause.
5524 2011-08-01 Tristan Gingold <gingold@adacore.com>
5526 * s-parame-vms-alpha.ads, s-parame-vms-ia64.ads: Redeclare C_Address
5527 like done by System.Aux_DEC.
5528 * env.c (__gnat_setenv) [VMS]: Put logicals into LNM$PROCESS table.
5530 2011-08-01 Yannick Moy <moy@adacore.com>
5532 * par-endh.adb (Check_End): issue a syntax error in SPARK mode for
5533 missing label at end of declaration (subprogram or package)
5534 * par-ch4.adb (P_Name): issue a syntax error in SPARK mode for mixing
5535 of positional and named parameter association
5536 * par.adb, par-util.adb (Formal_Error_Msg_SP): new wrapper on
5537 Error_Msg_SP which adds a prefix to the error message giving the name
5538 of the formal language analyzed
5539 * sem_ch6.adb (Analyze_Return_Type): issue an error in formal mode for
5540 access result type in subprogram, unconstrained array as result type,.
5541 (Analyze_Subprogram_Declaration): issue an error in formal mode for null
5543 * sem_ch8.adb: Code clean up.
5545 2011-08-01 Javier Miranda <miranda@adacore.com>
5547 * sem_ch7.adb (Uninstall_Declarations): Remove useless code.
5548 * einfo.ads (Access_Disp_Table): Fix documentation.
5549 (Dispatch_Table_Wrappers): Fix documentation.
5550 * einfo.adb (Access_Disp_Table, Dispatch_Table_Wrappers,
5551 Set_Access_Disp_Table, Set_Dispatch_Table_Wrappers): Fix the assertions
5552 to enforce the documentation of this attribute.
5553 (Set_Is_Interface): Cleanup the assertion.
5554 * exp_ch4.adb (Expand_Allocator_Expression, Tagged_Membership): Locate
5555 the Underlying_Type entity before reading attribute Access_Disp_Table.
5556 * exp_disp.adb (Expand_Dispatching_Call, Expand_Interface_Conversion):
5557 Locate the Underlying_Type before reading attribute Access_Disp_Table.
5558 * exp_aggr.adb (Build_Array_Aggr_Code, Build_Record_Aggr_Code): Locate
5559 the Underlying_Type entity before reading attribute Access_Disp_Table.
5560 * exp_ch3.adb (Build_Record_Init_Proc, Expand_N_Object_Declaration):
5561 Locate the Underlying_Type entity before reading attribute
5564 2011-08-01 Ed Schonberg <schonberg@adacore.com>
5566 * s-poosiz.ads: Additional overriding indicators.
5568 2011-08-01 Yannick Moy <moy@adacore.com>
5570 * sem_ch5.adb (Analyze_Exit_Statement): add return after error in
5572 (Analyze_Iteration_Scheme): issue error in formal mode when loop
5573 parameter specification does not include a subtype mark.
5574 * sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration): issue error in
5575 formal mode on abstract subprogram.
5576 (Analyze_Subprogram_Specification): issue error in formal mode on
5577 user-defined operator.
5578 (Process_Formals): issue error in formal mode on access parameter and
5580 * sem_ch9.adb (Analyze_Abort_Statement,
5581 Analyze_Accept_Statement, Analyze_Asynchronous_Select,
5582 Analyze_Conditional_Entry_Call, Analyze_Delay_Relative,
5583 Analyze_Delay_Until, Analyze_Entry_Call_Alternative,
5584 Analyze_Requeue, Analyze_Selective_Accept,
5585 Analyze_Timed_Entry_Call): issue error in formal mode on such constructs
5586 * sem_ch11.adb (Analyze_Raise_Statement, Analyze_Raise_xxx_Error):
5587 issue error in formal mode on user-defined raise statement.
5589 2011-08-01 Thomas Quinot <quinot@adacore.com>
5591 * sem_ch6.adb (Enter_Overloaded_Entity): Do not warn about a
5592 declaration being hidden when overriding an implicit inherited
5594 * par-ch10.adb (P_Compilation_Unit): In syntax check only mode
5595 (-gnats), do not complain about a source file that contains only a
5598 2011-08-01 Ed Schonberg <schonberg@adacore.com>
5600 * sem_ch5.adb (Analyze_Iterator_Scheme): Do not overwrite type of loop
5601 variable if already set.
5603 2011-08-01 Arnaud Charlet <charlet@adacore.com>
5605 * g-socket-dummy.adb, s-osinte-linux.ads, g-socket-dummy.ads,
5606 g-debuti.adb, g-tasloc.adb, g-debuti.ads, g-tasloc.ads,
5607 s-osinte-hpux.ads, g-sercom.adb, g-soliop-solaris.ads, g-sercom.ads,
5608 g-sptain.ads, g-curexc.ads, s-tasloc.adb, s-tasloc.ads, s-tataat.adb,
5609 g-ctrl_c.adb, a-reatim.adb, s-tataat.ads, g-dirope.adb, g-ctrl_c.ads,
5610 g-dirope.ads, g-boubuf.adb, g-calend.adb, g-boubuf.ads, g-souinf.ads,
5611 g-table.adb, g-bytswa-x86.adb, g-wispch.adb, g-io.adb, g-table.ads,
5612 g-wispch.ads, g-io.ads, g-memdum.adb, g-memdum.ads, g-busorg.adb,
5613 g-busorg.ads, g-regpat.adb, g-sothco-dummy.adb, g-encstr.adb,
5614 g-regpat.ads, g-sothco-dummy.ads, s-osinte-aix.ads, g-encstr.ads,
5615 g-sercom-mingw.adb, s-mastop-vms.adb, g-diopit.adb, g-diopit.ads,
5616 s-vxwext.adb, g-dyntab.adb, g-dyntab.ads, g-crc32.adb,
5617 g-sercom-linux.adb, g-crc32.ads, s-regpat.adb, g-flocon.ads,
5618 s-regpat.ads, g-stheme.adb, g-sestin.ads, s-taspri-posix-noaltstack.ads,
5619 g-soliop.ads, s-inmaop-posix.adb, g-locfil.ads, g-enblsp-vms-alpha.adb,
5620 g-socthi-dummy.adb, g-socthi-dummy.ads, gnat.ads, g-moreex.adb,
5621 g-moreex.ads, g-dynhta.adb, g-dynhta.ads, g-deutst.ads, g-htable.adb,
5622 g-cgicoo.adb, g-htable.ads, g-cgicoo.ads, a-interr.adb,
5623 g-socthi-vms.adb, g-socthi-vms.ads, g-hesora.adb, g-bubsor.adb,
5624 g-hesora.ads, g-bubsor.ads, g-md5.adb, g-md5.ads, s-intman-irix.adb,
5625 s-htable.adb, s-osinte-vms.adb, s-htable.ads, s-osinte-vms.ads,
5626 s-taprob.adb, g-bytswa.adb, g-bytswa.ads, s-osinte-solaris-posix.ads,
5627 a-suenco.adb, g-comver.adb, g-comver.ads, g-exctra.adb,
5628 s-osinte-solaris.adb, g-exctra.ads, s-osinte-irix.ads,
5629 s-osinte-solaris.ads, a-caldel-vms.adb, g-socthi-vxworks.adb,
5630 g-expect.adb, g-socthi-vxworks.ads, g-expect.ads, g-comlin.ads,
5631 g-heasor.adb, g-heasor.ads, g-traceb.adb, g-traceb.ads, g-decstr.adb,
5632 g-spipat.adb, g-decstr.ads, g-spipat.ads, s-mastop-tru64.adb,
5633 g-except.ads, g-thread.adb, g-hesorg.adb, g-thread.ads, g-hesorg.ads,
5634 g-expect-vms.adb, a-stuten.ads, g-spchge.adb, g-spchge.ads,
5635 g-u3spch.adb, g-u3spch.ads, g-spitbo.adb, g-spitbo.ads,
5636 s-osinte-dummy.ads, s-osinte-posix.adb, g-pehage.adb, g-pehage.ads,
5637 s-gloloc-mingw.adb, g-sha1.ads, s-traceb-hpux.adb,
5638 g-trasym-unimplemented.adb, g-trasym-unimplemented.ads, g-io_aux.adb,
5639 g-regexp.adb, g-io_aux.ads, g-socthi-mingw.adb, g-regexp.ads,
5640 s-osinte-hpux-dce.adb, g-socthi-mingw.ads, g-cgi.adb,
5641 s-osinte-hpux-dce.ads, g-cgi.ads, g-byorma.adb, g-boumai.ads,
5642 g-byorma.ads, a-caldel.adb, s-regexp.adb, s-regexp.ads,
5643 g-soliop-mingw.ads, g-sptavs.ads, s-osinte-tru64.ads, g-speche.adb,
5644 g-speche.ads, g-socthi.adb, g-stsifd-sockets.adb, g-socthi.ads,
5645 s-osinte-darwin.ads, i-vxwork-x86.ads, g-awk.adb, i-vxwork.ads,
5646 g-awk.ads, g-zspche.adb, g-zspche.ads, g-socket.adb, g-sptabo.ads,
5647 g-socket.ads, g-semaph.adb, g-semaph.ads, s-taspri-posix.ads,
5648 g-enblsp-vms-ia64.adb, g-cgideb.adb, g-cgideb.ads, g-sothco.adb,
5649 s-osinte-freebsd.ads, g-sothco.ads, g-catiio.adb, g-casuti.adb,
5650 g-catiio.ads, g-casuti.ads, g-trasym.adb, g-trasym.ads, s-casuti.adb,
5651 g-os_lib.adb, s-traceb-mastop.adb, g-busora.adb, s-interr-dummy.adb,
5652 g-busora.ads, g-enutst.ads, s-os_lib.adb, a-tasatt.adb,
5653 s-osinte-mingw.ads: Update to GPLv3 run-time license.
5654 Use GNAT instead of GNARL.
5656 2011-08-01 Bob Duff <duff@adacore.com>
5658 * a-cdlili.ads, a-cihama.ads, a-coinve.ads, a-ciorse.ads, a-coorma.ads,
5659 a-cidlli.ads, a-ciormu.ads, a-cihase.ads, a-cohama.ads, a-coorse.ads,
5660 a-ciorma.ads, a-coormu.ads, a-convec.ads, a-cohase.ads: Minor
5663 2011-08-01 Yannick Moy <moy@adacore.com>
5665 * debug.adb (d.D) reverve flag for the SPARK mode
5666 (d.E) reverve flag for SPARK generation mode
5667 (d.F) reverve flag for Why generation mode
5668 * opt.ads, opt.adb (ALFA_Mode, ALFA_Through_SPARK_Mode,
5669 ALFA_Through_Why_Mode, Formal_Verification_Mode, SPARK_Mode): New
5670 functions which return True when the corresponding modes are set
5671 (Formal_Language): return "spark" or "alfa" when in formal verification
5673 * sem_util.ads, sem_util.adb (Formal_Error_Msg): new wrapper on
5674 Error_Msg to prefix the error message with a tag giving the formal
5676 (Formal_Error_Msg_N): new wrapper on Error_Msg_N to prefix the error
5677 message with a tag giving the formal language
5678 * sem_ch5.adb (Analyze_Block_Statement): issue error in formal mode on
5680 (Analyze_Case_Statement): issue error in formal mode on case statement
5681 with a single "others" case alternative
5682 (Analyze_Exit_Statement): issue errors in formal mode on exit
5683 statements which do not respect SPARK restrictions
5684 (Analyze_Goto_Statement): issue error in formal mode on goto statement
5685 (Check_Unreachable_Code): always issue an error (not a warning) in
5686 formal mode on unreachable code (concerns both code after an infinite
5687 loop and after an unconditional jump, both not allowed in SPARK)
5688 * sem_ch6.adb (Analyze_Return_Statement): add call to
5689 Set_Return_Present for a procedure containing a return statement
5690 (already done for functions in Analyze_Function_Return)
5691 (Analyze_Function_Return): issue error in formal mode on extended
5692 return or if return is not last statement in function
5693 (Check_Missing_Return): issue error in formal mode if function does
5694 not end with return or if procedure contains a return
5695 * sem_ch8.ads, sem_ch8.adb (Has_Loop_In_Inner_Open_Scopes): new
5696 function to detect if there is an inner scope of its parameter S which
5699 2011-08-01 Thomas Quinot <quinot@adacore.com>
5701 * sem_ch6.ads: Minor reformatting.
5703 2011-08-01 Javier Miranda <miranda@adacore.com>
5705 * sem_util.adb (Abstract_Interface_List): Complete condition when
5706 processing private type declarations to avoid reading unavailable
5708 (Is_Synchronized_Tagged_Type): Complete condition when processing
5709 private extension declaration nodes to avoid reading unavailable
5712 2011-08-01 Thomas Quinot <quinot@adacore.com>
5714 * sem_ch3.adb: Minor reformatting.
5716 2011-08-01 Thomas Quinot <quinot@adacore.com>
5718 * s-parame-ae653.ads, s-parame-vms-alpha.ads, s-parame-hpux.ads,
5719 i-cpoint.adb, i-cstrin.adb, i-cpoint.ads, i-cstrin.ads,
5720 s-parame-vms-ia64.ads, s-parame.ads, i-c.ads, s-parame-vxworks.ads,
5721 s-parame-vms-restrict.ads: Remove duplicated Interfaces.C.* packages
5722 for VMS, instead parametrize the common implementation with
5723 System.Parameters declarations.
5725 2011-08-01 Eric Botcazou <ebotcazou@adacore.com>
5727 * gnat_rm.texi: Document limitation of Pragma No_Strict_Aliasing.
5729 2011-08-01 Tristan Gingold <gingold@adacore.com>
5731 * seh_init.c: Fix SEH handler installation on win64.
5733 2011-08-01 Ed Schonberg <schonberg@adacore.com>
5735 * sem_ch3.adb (Access_Subprogram_Declaration): in Asis mode, prevent
5736 double analysis of an anonymous access to subprogram, because it can
5737 lead to improper sharing of profiles and a back-end crash.
5739 2011-08-01 Robert Dewar <dewar@adacore.com>
5741 * make.adb, sem_ch4.adb: Minor reformatting.
5742 * gcc-interface/Make-lang.in: Update dependencies.
5743 * sem_util.adb, exp_ch5.adb: Minor reformatting.
5745 2011-08-01 Arnaud Charlet <charlet@adacore.com>
5747 * gnat_rm.texi: Fix definition of Long_Integer.
5749 2011-08-01 Ed Schonberg <schonberg@adacore.com>
5751 * exp_aggr.adb: check limit size of static aggregate unconditionally,
5752 to prevent storage exhaustion.
5753 * exp_ch7.adb (Clean_Simple_Protected_Objects): if the scope being
5754 finalized is a function body, insert the cleanup code before the final
5755 return statement, to prevent spurious warnings.
5756 * s-pooglo.ads: add overriding indicator.
5758 2011-08-01 Ed Schonberg <schonberg@adacore.com>
5760 * sem_ch4.adb (Operator_Check): improve error message when both a
5761 with_clause and a use_clause are needed to make operator usage legal.
5762 * sem_util.ads, sem_util.adb (Unit_Is_Visible): new predicate to
5763 determine whether a compilation unit is visible within an other,
5764 either through a with_clause in the current unit, or a with_clause in
5765 its library unit or one one of its parents.
5767 2011-08-01 Ed Schonberg <schonberg@adacore.com>
5769 * exp_ch5.adb (Expand_N_Iterator_Loop): handle properly an iterator
5770 over an arbitrary expression of an array or container type.
5771 * lib-xref.adb: clarify comment.
5773 2011-08-01 Bob Duff <duff@adacore.com>
5775 * einfo.ads: Minor reformatting.
5776 * debug.adb: Minor comment improvement.
5778 2011-08-01 Javier Miranda <miranda@adacore.com>
5780 * sem_ch4.adb (Try_Object_Operation): For class-wide subprograms do not
5781 consider hidden subprograms as valid candidates.
5783 2011-08-01 Arnaud Charlet <charlet@adacore.com>
5785 * make.adb (Compile): Strip -mxxx switches in CodePeer mode.
5787 2011-08-01 Vasiliy Fofanov <fofanov@adacore.com>
5789 * gnat_ugn.texi: Fix typo.
5791 2011-08-01 Robert Dewar <dewar@adacore.com>
5793 * i-cstrin.adb, sem_util.adb, exp_ch11.adb, sem_ch8.adb,
5794 lib-xref.adb: Minor reformatting
5796 2011-08-01 Gary Dismukes <dismukes@adacore.com>
5798 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Replace test of
5799 when to generate a call to Move_Final_List.
5800 (Has_Controlled_Parts): Remove this function.
5802 2011-08-01 Geert Bosch <bosch@adacore.com>
5804 * par-ch3.adb (P_Discrete_Choice_List): Improve error message for extra
5807 2011-08-01 Thomas Quinot <quinot@adacore.com>
5809 * exp_ch11.adb (Expand_N_Raise_Statement): Mark N_Raise_xxx_Error for
5810 explicit raise of a predefined exception as Comes_From_Source if the
5811 original N_Raise_Statement comes from source.
5813 2011-08-01 Robert Dewar <dewar@adacore.com>
5815 * sinfo.ads: Add comment.
5816 * sem_ch6.adb: Minor reformatting.
5818 2011-08-01 Robert Dewar <dewar@adacore.com>
5820 * freeze.adb (Freeze_Entity): Refine check for bad component size
5821 clause to avoid rejecting confirming clause when atomic/aliased present.
5823 2011-08-01 Ed Schonberg <schonberg@adacore.com>
5825 * sem_ch8.adb (Find_Direct_Name, Analyze_Expanded_Name): use Is_LHS to
5826 better determine whether an entity reference is a write.
5827 * sem_util.adb (Is_LHS): refine predicate to handle assignment to a
5829 * lib-xref.adb (Output_References): Do no suppress a read reference at
5830 the same location as an immediately preceeding modify-reference, to
5831 handle properly in-out actuals.
5833 2011-08-01 Tristan Gingold <gingold@adacore.com>
5835 * env.c (__gnat_setenv) [VMS]: Refine previous change.
5837 2011-08-01 Quentin Ochem <ochem@adacore.com>
5839 * i-cstrin.adb (New_String): Changed implementation, now uses only the
5840 heap to compute the result.
5842 2011-08-01 Robert Dewar <dewar@adacore.com>
5844 * atree.ads: Minor reformatting.
5846 2011-08-01 Emmanuel Briot <briot@adacore.com>
5848 * g-expect.adb (Get_Command_Output): Fix memory leak.
5850 2011-08-01 Geert Bosch <bosch@adacore.com>
5852 * cstand.adb (P_Float_Type): New procedure to print the definition of
5853 predefined fpt types.
5854 (P_Mixed_Name): New procedure to print a name using mixed case
5855 (Print_Standard): Use P_Float_Type for printing floating point types
5856 * einfo.adb (Machine_Emax_Value): Add preliminary support for quad
5857 precision IEEE float.
5859 2011-08-01 Thomas Quinot <quinot@adacore.com>
5861 * sem_ch3.adb: Minor reformatting.
5863 2011-08-01 Ed Schonberg <schonberg@adacore.com>
5865 * sem_ch6.adb (Analyze_Parameterized_Expression): If the expression is
5866 the completion of a generic function, insert the new body rather than
5867 rewriting the original.
5869 2011-08-01 Yannick Moy <moy@adacore.com>
5871 * sinfo.ads, errout.ads: Typos in comments.
5873 2011-08-01 Robert Dewar <dewar@adacore.com>
5875 * par-endh.adb: Minor reformatting.
5877 2011-08-01 Robert Dewar <dewar@adacore.com>
5879 * aspects.ads, aspects.adb: Add aspects for library unit pragmas
5880 (Pre_Post_Aspects): New subtype.
5881 * par-ch12.adb (P_Generic): New syntax for aspects in packages
5882 * par-ch13.adb (P_Aspect_Specifications): Add Semicolon parameter
5883 * par-ch7.adb (P_Package): Remove Decl parameter
5884 (P_Package): Handle new syntax for aspects (before IS)
5885 * par-ch9.adb (P_Protected_Definition): Remove Decl parameter, handle
5887 (P_Task_Definition): Remove Decl parameter, handle new aspect syntax
5888 * par.adb (P_Aspect_Specifications): Add Semicolon parameter
5889 (P_Package): Remove Decl parameter
5890 * sem_ch13.adb (Analyze_Aspect_Specifications): Handle library unit
5892 * sem_ch7.adb (Analyze_Package_Declaration): Analyze new format aspect
5894 * sem_util.ads, sem_util.adb (Static_Boolean): New function
5895 * sinfo.ads: Document new syntax for aspects in packages etc.
5896 * sprint.adb: Handle new syntax of aspects before IS in package
5898 2011-08-01 Thomas Quinot <quinot@adacore.com>
5900 * atree.ads: Minor reformatting.
5901 * sem_prag.adb: Minor reformatting.
5903 2011-08-01 Robert Dewar <dewar@adacore.com>
5905 * exp_util.adb (Insert_Actions): Fix error in handling Actions for
5906 case expr alternative.
5908 2011-08-01 Ed Schonberg <schonberg@adacore.com>
5910 * sem_ch12.adb: Fix typo.
5912 2011-08-01 Geert Bosch <bosch@adacore.com>
5914 * sem_prag.adb (Check_No_Link_Name): New procedure.
5915 (Process_Import_Or_Interface): Use Check_No_Link_Name.
5916 * cstand.adb (Create_Standard): Use Esize (Standard_Long_Long_Float)
5917 instead of Standard_Long_Long_Float_Size global. Preparation for
5918 eventual removal of per type constants.
5919 * exp_util.ads (Get_Stream_Size): New function returning the stream
5920 size value of subtype E.
5921 * exp_util.adb (Get_Stream_Size): Implement new function.
5922 * exp_strm.adb (Build_Elementary_Input_Call): Use Get_Stream_Size
5924 * exp_attr.adb (Attribute_Stream_Size): Use Get_Stream_Size
5926 (Machine_Mantissa_Value): Handle 128-bit quad precision IEEE floats
5928 2011-08-01 Geert Bosch <bosch@adacore.com>
5930 * cstand.adb: Fix comments.
5931 * sem_prag.adb (Analyze_Pragma): Use List_Length instead of explicit
5934 2011-08-01 Robert Dewar <dewar@adacore.com>
5936 * exp_ch4.adb, sem_cat.adb: Minor reformatting.
5938 2011-08-01 Geert Bosch <bosch@adacore.com>
5940 * atree.ads: Fix comment.
5942 2011-08-01 Robert Dewar <dewar@adacore.com>
5944 * aspects.ads, aspects.adb (Aspect_Names): Moved from body to spec.
5945 * par-ch13.adb (P_Aspect_Specifications): Check misspelled aspect name.
5946 * par.adb: Add with for Namet.Sp.
5947 * par-tchk.adb: Minor reformatting.
5949 2011-08-01 Vincent Celier <celier@adacore.com>
5951 * mlib-tgt-specific-vms-alpha.adb, mlib-tgt-specific-vms-ia64.adb
5952 (Build_Dynamic_Library): Use new function Init_Proc_Name to get the name
5953 of the init procedure of a SAL.
5954 * mlib-tgt-vms_common.ads, mlib-tgt-vms_common.adb (Init_Proc_Name):
5957 2011-08-01 Thomas Quinot <quinot@adacore.com>
5959 * exp_ch4.adb, s-tasini.ads, sem_attr.adb, s-soflin.ads: Minor
5962 2011-08-01 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
5964 * adaint.c (__gnat_file_time_name_attr): Get rid of warning.
5966 2011-08-01 Thomas Quinot <quinot@adacore.com>
5968 * sem_util.adb, sem_util.ads (Has_Overriding_Initialize): Make function
5969 conformant with its spec (return True only for types that have
5970 an overriding Initialize primitive operation that prevents them from
5971 having preelaborable initialization).
5972 * sem_cat.adb (Validate_Object_Declaration): Fix test for preelaborable
5973 initialization for controlled types in Ada 2005 or later mode.
5975 2011-08-01 Robert Dewar <dewar@adacore.com>
5977 * aspects.ads, aspects.adb: Add aspect Type_Invariant, Precondition,
5979 (Same_Aspect): New function.
5980 * sem_ch13.adb (Analyze_Aspect_Specifications): Add aspect
5981 Type_Invariant, Precondition, Postcondition.
5982 * snames.ads-tmpl: Add Name_Type_Invariant.
5984 2011-08-01 Robert Dewar <dewar@adacore.com>
5986 * freeze.adb (Freeze_Entity): Don't call Check_Aspect_At_Freeze_Point
5988 (Freeze_All_Ent): Fix error in handling inherited aspects.
5989 * sem_ch13.adb (Analyze_Aspect_Specifications): Skip aspect that is
5990 already analyzed, but don't skip entire processing of a declaration,
5991 that's wrong in some cases of declarations being rewritten.
5992 (Analyze_Aspect_Specification): Set Is_Delayed_Aspect in aspects.
5993 Don't delay for integer, string literals
5994 Treat predicates in usual manner for delay, remove special case code,
5996 (Analyze_Freeze_Entity): Make call to Check_Aspect_At_Freeze_Point
5997 (Build_Predicate_Function): Update saved expression in aspect
5998 (Build_Invariant_Procedure): Update saved expression in aspect
5999 * exp_ch4.adb (Expand_N_Selected_Component): Only do the optimization
6000 of replacement of discriminant references if the reference is simple.
6002 2011-08-01 Robert Dewar <dewar@adacore.com>
6004 * aspects.ads, aspects.adb: Add Static_Predicate and Dynamic_Predicate.
6005 * sem_ch13.adb (Analyze_Aspect_Specification): Add processing for
6006 Static_Predicate and Dynamic_Predicate.
6007 (Build_Predicate_Function): Add processing for Static_Predicate
6008 and Dynamic_Predicate.
6009 * sinfo.ads, sinfo.adb (From_Dynamic_Predicate): New flag
6010 (From_Static_Predicate): New flag
6011 * snames.ads-tmpl: Add Name_Static_Predicate and Name_Dynamic_Predicate
6013 2011-08-01 Robert Dewar <dewar@adacore.com>
6015 * usage.adb: Documentation cleanup for Ada version modes in usage.
6016 * expander.adb: Minor reformatting.
6018 2011-08-01 Robert Dewar <dewar@adacore.com>
6020 * atree.ads: Minor comment fix.
6021 * a-stwifi.adb, a-stzfix.adb, a-strfix.adb, a-ztexio.ads, a-textio.ads,
6022 a-witeio.ads, sem_prag.adb: Minor reformatting.
6024 2011-08-01 Doug Rupp <rupp@adacore.com>
6026 * env.c (__gnat_setenv) [VMS]: Force 32bit on item list structure
6027 pointers. Use descrip.h header file for convenience. Add some
6030 2011-08-01 Robert Dewar <dewar@adacore.com>
6032 * freeze.adb (Freeze_Entity): Call Check_Aspect_At_Freeze_Point
6033 (Freeze_All): Call Check_Aspect_At_End_Of_Declarations
6034 * sem_ch13.ads, sem_ch13.adb (Check_Aspect_At_Freeze_Point):
6036 (Check_Aspect_At_End_Of_Declarations): New procedure
6037 (Analye_Aspect_Specification): Minor changes for above procedures
6038 * sinfo.ads, sinfo.adb (Is_Delayed_Aspect): Now set in aspect
6039 specification node as well.
6041 2011-08-01 Pascal Obry <obry@adacore.com>
6043 * adaint.c (_gnat_stat): GetFilesAttributesEx() would fail on special
6044 Windows files. Use GetFilesAttributes() in this case to check for file
6045 existence instead of returning with an error code.
6047 2011-08-01 Vincent Celier <celier@adacore.com>
6049 * a-stzfix.adb, a-stwifi.adb (Replace_Slice): Fixed computation when
6050 High is above Source length.
6052 2011-08-01 Robert Dewar <dewar@adacore.com>
6054 * a-ztexio.ads, a-textio.ads, a-witeio.ads: Fix comment.
6056 2011-08-01 Robert Dewar <dewar@adacore.com>
6058 * aspects.ads (Boolean_Aspects): New subtype.
6059 * exp_ch13.adb (Expand_Freeze_Entity): Fix errors in handling aspects
6060 for derived types in cases where the parent type and derived type have
6062 * freeze.adb (Freeze_Entity): Fix problems in handling derived type
6063 with aspects when parent type also has aspects.
6064 (Freeze_Entity): Deal with delay of boolean aspects (must evaluate
6065 boolean expression at this point).
6066 * sem_ch13.adb (Analyze_Aspect_Specifications): Delay all aspects in
6067 accordance with final decision on the Ada 2012 feature.
6068 * sinfo.ads, sinfo.adb (Is_Boolean_Aspect): New flag.
6070 2011-08-01 Matthew Heaney <heaney@adacore.com>
6072 * a-chtgbo.adb (Delete_Node_Sans_Free): Replace iterator with selector.
6074 2011-08-01 Pascal Obry <obry@adacore.com>
6076 * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb:
6077 Fix Replace_Slice when High is above current string size.
6078 (Replace_Slice): Fix DL computation when High is above current
6081 2011-08-01 Gary Dismukes <dismukes@adacore.com>
6083 * gnat_rm.texi: Add documentation for pragma Static_Elaboration_Desired.
6085 2011-08-01 Matthew Heaney <heaney@adacore.com>
6087 * a-rbtgbo.adb (Delete_Node_Sans_Free): Fixed assignment to left child
6090 2011-08-01 Pascal Obry <obry@adacore.com>
6092 * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb: Minor
6095 2011-08-01 Ed Schonberg <schonberg@adacore.com>
6097 * sem_attr.adb (Analyze_Attribute, case 'Access): Handle properly named
6098 access to protected subprograms in generic bodies.
6099 * sem_ch6.adb (Analyze_Subprogram_Declaration): If the context is a
6100 protected type, indicate that the convention of the subprogram is
6101 Convention_Protected, because it may be used in subsequent declarations
6102 within the protected declaration.
6104 2011-08-01 Vincent Celier <celier@adacore.com>
6106 * mlib-prj.adb (Build_Library): Use "ada_" as the prefix for the "init"
6107 and "final" procedures when the name of the library is "ada", to avoid
6108 duplicate symbols "adainit" and "adafinal" in executables.
6110 2011-08-01 Ed Schonberg <schonberg@adacore.com>
6112 * sem_attr.adb (Analyze_Attribute, case 'Result): Handle properly a
6113 quantified expression that appears within a postcondition and uses the
6114 Ada2012 'Result attribute.
6116 2011-07-28 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
6118 * init.c (__gnat_error_handler): Cast reason to int.
6119 (__gnat_install_handler): Explain sa_sigaction use.
6121 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
6123 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: If the
6124 subprogram has copy-in copy-out parameters, try to promote the mode of
6125 the return type if it is passed in registers.
6127 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
6129 * gcc-interface/utils2.c (build_binary_op) <ARRAY_REF>: Do not mark the
6130 left operand as addressable.
6132 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
6134 * gcc-interface/gigi.h (build_function_stub): Remove.
6135 (build_return_expr): Likewise.
6136 (convert_vms_descriptor): Declare.
6137 * gcc-interface/utils.c (convert_vms_descriptor): Make global.
6138 (build_function_stub): Move to...
6139 * gcc-interface/utils2.c (build_return_expr): Move to...
6140 * gcc-interface/trans.c (build_function_stub): ...here.
6141 (build_return_expr): ...here.
6142 (Subprogram_Body_to_gnu): Add local variable for language_function.
6143 Disconnect the parameter attributes cache, if any, once done with it.
6144 Call end_subprog_body only after setting the end_locus.
6145 Build the stub associated with the function, if any, at the very end.
6146 (gnat_to_gnu) <N_Return_Statement>: Remove couple of useless local
6147 variables and streamline control flow.
6149 2011-07-23 Arnaud Charlet <charlet@adacore.com>
6152 * gcc-interface/Makefile.in (powerpc-linux): Remove reference to
6155 2011-07-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
6158 * init.c [sun && __SVR4 && !__vxworks] (__gnat_install_handler):
6159 Assign to act.sa_sigaction.
6160 * tracebak.c [USE_GENERIC_UNWINDER] (__gnat_backtrace): Cast
6161 current->return_address to char * before arithmetic.
6163 2011-07-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
6165 * init.c [sgi] (__gnat_error_handler): Update sigaction(2) citation.
6166 Correct argument types.
6167 Extract code from reason.
6168 (__gnat_install_handler): Assign to act.sa_sigaction.
6170 2011-07-21 Eric Botcazou <ebotcazou@adacore.com>
6172 * gcc-interface/Make-lang.in (GNAT1_ADA_OBJS): Move ada/b_gnat1.o to...
6173 (GNAT1_OBJS): ...here.
6175 2011-07-15 Eric Botcazou <ebotcazou@adacore.com>
6178 * g-socthi-mingw.adb (Fill): Fix formatting.
6180 * gcc-interface/gigi.h: Move around comment.
6182 2011-07-14 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
6185 * s-taprop-hpux-dce.adb (Abort_Task): Remove unnecessary cast.
6187 2011-07-14 Florian Weimer <fw@deneb.enyo.de>
6190 * g-socthi-mingw.adb (Fill): Guard against invalid MSG_WAITALL.
6192 2011-07-13 Eric Botcazou <ebotcazou@adacore.com>
6194 * gcc-interface/utils.c (build_vms_descriptor32): Skip the 32-bit
6195 range comparison if Pmode is SImode.
6197 2011-07-12 Laurent GUERBY <laurent@guerby.net>
6198 Eric Botcazou <ebotcazou@adacore.com>
6200 * adadecode.c: Wrap up in extern "C" block.
6201 * adadecode.h: Likewise.
6202 * adaint.c: Likewise. Remove 'const' keyword.
6203 * adaint.h: Likewise.
6205 * atree.h: Likewise.
6207 * cstreams.c: Likewise.
6211 * final.c: Likewise.
6213 * initialize.c: Likewise.
6215 * namet.h: Likewise.
6216 * nlists.h: Likewise.
6217 * raise.c: Likewise.
6218 * raise.h: Likewise.
6219 * repinfo.h: Likewise.
6220 * seh_init.c: Likewise.
6221 * targext.c: Likewise.
6222 * tracebak.c: Likewise.
6223 * uintp.h: Likewise.
6224 * urealp.h: Likewise.
6225 * xeinfo.adb: Wrap up generated C code in extern "C" block.
6226 * xsinfo.adb: Likewise.
6227 * xsnamest.adb: Likewise.
6228 * gcc-interface/gadaint.h: Wrap up in extern "C" block.
6229 * gcc-interface/gigi.h: Wrap up some prototypes in extern "C" block.
6230 * gcc-interface/misc.c: Likewise.
6231 * gcc-interface/Make-lang.in (GCC_LINK): Use LINKER.
6232 (GNAT1_C_OBJS): Remove ada/b_gnat1.o. List ada/seh_init.o and
6233 ada/targext.o here...
6234 (GNAT_ADA_OBJS): ...and not here.
6235 (GNAT1_ADA_OBJS): Add ada/b_gnat1.o.
6236 (GNATBIND_OBJS): Reorder.
6238 2011-07-07 Richard Henderson <rth@redhat.com>
6240 * gcc-interface/misc.c (gnat_init_gcc_eh): Don't call
6241 dwarf2out_frame_init.
6243 2011-07-07 Eric Botcazou <ebotcazou@adacore.com>
6245 * gcc-interface/misc.c (gnat_init): Tweak previous change.
6247 2011-07-07 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
6250 * gcc-interface/Makefile.in: Handle x86_64-solaris2.
6252 2011-07-06 Richard Guenther <rguenther@suse.de>
6254 * gcc-interface/misc.c (gnat_init): Merge calls to
6255 build_common_tree_nodes and build_common_tree_nodes_2.
6256 Re-initialize boolean_false_node.
6258 2011-07-02 Eric Botcazou <ebotcazou@adacore.com>
6259 Olivier Hainque <hainque@adacore.com>
6260 Nicolas Setton <setton@adacore.com>
6262 * gcc-interface/utils.c (record_builtin_type): Set TYPE_ARTIFICIAL on
6263 the type according to the ARTIFICIAL_P parameter.
6264 (create_type_decl): Likewise.
6265 (create_type_stub_decl): Set TYPE_ARTIFICIAL on the type to 1.
6267 2011-07-01 Eric Botcazou <ebotcazou@adacore.com>
6269 * gcc-interface/Make-lang.in (gnat1): Prepend '+' to the command.
6270 (gnatbind): Likewise.
6272 2011-06-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
6274 * gcc-interface/Makefile.in (TOOLS_LIBS): Add $(LIBINTL).
6276 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
6278 * gcc-interface/decl.c (gnat_to_gnu_component_type): Use GNAT_TYPE
6279 local variable throughout. Remove useless call to Base_Type.
6280 (gnat_to_gnu_field): Use GNAT_FIELD_TYPE local variable throughout.
6281 Take it also into account for the volatileness of the field. Set the
6282 TREE_SIDE_EFFECTS flag as well in this case. Reorder some warnings.
6284 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
6286 * gcc-interface/trans.c (Identifier_to_gnu): Don't set TREE_THIS_NOTRAP
6287 on a dereference built for a by-ref object if it has an address clause.
6289 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
6291 * einfo.ads (Address_Taken): Document use for the second argument of
6292 Asm_Input and Asm_Output attributes.
6293 * sem_attr.adb (Analyze_Attribute) <Attribute_Asm_Input>: If the second
6294 argument is an entity name, then set Address_Taken on it.
6295 <Attribute_Asm_Output>: Likewise.
6296 * gcc-interface/trans.c (lvalue_required_for_attribute_p): Handle the
6297 Attr_Asm_Input and Attr_Asm_Output attributes explicitly.
6298 (gnat_to_gnu) <N_Code_Statement>: If an operand is going to end up in
6299 memory and is a CONST_DECL, retrieve its corresponding VAR_DECL.
6301 2011-06-16 Joern Rennecke <joern.rennecke@embecosm.com>
6304 * gcc-interface/decl.c (gnat_to_gnu_param): Use pack_cumulative_args.
6306 2011-06-14 Joseph Myers <joseph@codesourcery.com>
6308 * gcc-interface/Make-lang.in (gnatbind$(exeext)): Use ggc-none.o.
6309 (ada/utils.o): Update dependencies.
6310 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Add
6311 ../../../libcpp/libcpp.a.
6312 * gcc-interface/utils.c: Include common/common-target.h.
6313 (process_attributes): Use targetm_common.have_named_sections.
6315 2011-06-07 Richard Guenther <rguenther@suse.de>
6317 * gcc-interface/misc.c (gnat_init): Do not set size_type_node or call
6320 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
6322 * gcc-interface/utils2.c (gnat_stabilize_reference): Propagate the
6323 TREE_THIS_NOTRAP flag.
6325 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
6327 * gcc-interface/utils2.c (gnat_stabilize_reference) <COMPOUND_EXPR>:
6330 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
6332 * gcc-interface/trans.c (Identifier_to_gnu): Also handle deferred
6333 constants whose full view has discriminants specially.
6335 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
6337 * gcc-interface/utils.c: Include diagnostic.h.
6338 (gnat_write_global_declarations): Output debug information for all
6339 global type declarations before finalizing the compilation unit.
6340 * gcc-interface/Make-lang.in (ada/utils.o): Add dependency.
6342 2011-05-25 Jakub Jelinek <jakub@redhat.com>
6344 * gcc-interface/utils.c (def_fn_type): Remove extra va_end.
6346 2011-05-25 Kai Tietz <ktietz@redhat.com>
6348 * adaint.c (__gnat_to_canonical_file_list_next): Use array
6349 initialization instead of const/none-const pointer assignment.
6351 2011-05-24 Joseph Myers <joseph@codesourcery.com>
6353 * gcc-interface/Make-lang.in (GNAT1_OBJS): Don't include
6354 $(EXTRA_GNAT1_OBJS).
6355 (GNATBIND_OBJS): Don't include $(EXTRA_GNATBIND_OBJS).
6356 (EXTRA_GNAT1_OBJS, EXTRA_GNATBIND_OBJS): Remove.
6357 (gnat1$(exeext), gnatbind$(exeext)): Use libcommon-target.a.
6358 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use
6359 libcommon-target.a instead of prefix.o.
6361 2011-05-21 Joseph Myers <joseph@codesourcery.com>
6364 * gcc-interface/Make-lang.in (gnatbind$(exeext)): Depend on $(LIBDEPS).
6366 2011-05-20 Joseph Myers <joseph@codesourcery.com>
6368 * gcc-interface/Make-lang.in (EXTRA_GNATBIND_OBJS): Remove version.o.
6369 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use libcommon.a
6370 instead of version.o.
6372 2011-05-18 Kai Tietz <ktietz@redhat.com>
6374 * gcc-interface/trans.c (Exception_Handler_to_gnu_sjlj): Use
6375 boolean_false_node instead of integer_zero_node.
6376 (convert_with_check): Likewise.
6377 * gcc-interface/decl.c (choices_to_gnu): Likewise.
6379 2011-05-12 Eric Botcazou <ebotcazou@adacore.com>
6381 * gcc-interface/trans.c (call_to_gnu): In the by-reference case, if the
6382 type of the parameter is an unconstrained array, convert the actual to
6383 the type of the formal in the In Out and Out cases as well.
6385 2011-05-11 Nathan Froyd <froydnj@codesourcery.com>
6387 * gcc-interface/utils.c (def_fn_type): Don't call build_function_type;
6388 call build_function_type_array or build_varargs_function_type_array
6390 (create_subprog_type): Don't call build_function_type; call
6391 build_function_type_vec instead.
6393 2011-05-11 Nathan Froyd <froydnj@codesourcery.com>
6395 * gcc-interface/ada-tree.h (TYPE_OBJECT_RECORD_TYPE): Use TYPE_MINVAL.
6396 (TYPE_GCC_MIN_VALUE): Use TYPE_MINVAL.
6397 (TYPE_GCC_MAX_VALUE): Use TYPE_MAXVAL.
6399 2011-05-07 Eric Botcazou <ebotcazou@adacore.com>
6401 * gcc-interface/decl.c (intrin_arglists_compatible_p): Remove spaces.
6403 * gcc-interface/gigi.h (global_bindings_p): Adjust prototype.
6404 * gcc-interface/utils.c (global_bindings_p): Return bool and simplify.
6406 2011-05-05 Nathan Froyd <froydnj@codesourcery.com>
6408 * gcc-interface/trans.c (Case_Statement_to_gnu): Call build_case_label.
6410 2011-05-05 Nathan Froyd <froydnj@codesourcery.com>
6412 * gcc-interface/decl.c (intrin_arglists_compatible_p): Use iterators
6413 instead of accessing TYPE_ARG_TYPES directly.
6414 * gcc-interface/utils.c (handle_nonnull_attribute): Likewise.
6416 2011-05-05 Eric Botcazou <ebotcazou@adacore.com>
6419 * gcc-interface/gigi.h (get_variant_part): Declare.
6420 * gcc-interface/decl.c (get_variant_part): Make global.
6421 * gcc-interface/utils2.c (find_common_type): Do not return T1 if the
6422 types have the same constant size, are record types and T1 has a
6423 variant part while T2 doesn't.
6425 2011-05-05 Eric Botcazou <ebotcazou@adacore.com>
6427 * gcc-interface/utils.c (begin_subprog_body): Do not call
6429 (end_subprog_body): Likewise.
6431 2011-05-04 Richard Guenther <rguenther@suse.de>
6433 * gcc-interface/trans.c (gnat_to_gnu): Remove zero notrunc argument to
6435 (pos_to_constructor): Likewise.
6437 2011-05-03 Nathan Froyd <froydnj@codesourcery.com>
6438 Eric Botcazou <ebotcazou@adacore.com>
6440 * gcc-interface/trans.c (gigi): Call build_function_type_list instead
6441 of build_function_type. Adjust calls to...
6442 (build_raise_check): ...this. Do not take a void_tree parameter.
6443 Call build_function_type_list instead of build_function_type.
6444 Fix head comment and swap couple of conditional blocks.
6446 2011-04-30 Eric Botcazou <ebotcazou@adacore.com>
6448 * gnatvsn.ads (Library_Version): Bump to 4.7.
6449 (Current_Year): Bump to 2011.
6451 2011-04-29 Michael Matz <matz@suse.de>
6453 * gcc-interface/misc.c (gnat_handle_option): Set
6454 warn_maybe_uninitialized.
6456 2011-04-23 Gerald Pfeifer <gerald@pfeifer.com>
6458 * gnat_ugn.texi (Complexity Metrics Control): Update link to
6459 the Watson/McCabe paper.
6461 2011-04-23 Jim Meyering <meyering@redhat.com>
6463 * gnat_ugn.texi (Examples of gnatxref Usage): Fix typo: s/it it/it is/
6465 2011-04-22 Eric Botcazou <ebotcazou@adacore.com>
6467 * gcc-interface/decl.c (make_packable_type): Copy DECL_PARALLEL_TYPE
6470 2011-04-22 Eric Botcazou <ebotcazou@adacore.com>
6472 * gcc-interface/gigi.h (create_subprog_decl): Add ARTIFICIAL_FLAG
6474 * gcc-interface/utils.c (create_subprog_decl): Likewise. Set
6475 DECL_ARTIFICIAL and DECL_NO_INLINE_WARNING_P on the DECL accordingly.
6476 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: Add
6477 ARTIFICIAL_FLAG local variable and pass it to create_subprog_decl.
6478 <all>: Do not set flags on the reused DECL node coming from an alias.
6479 Set DECL_IGNORED_P on the DECL node built for subprograms if they
6480 don't need debug info here...
6481 * gcc-interface/trans.c (Subprogram_Body_to_gnu): ...and not here.
6482 (gigi): Adjust calls to create_subprog_decl.
6483 (build_raise_check): Likewise.
6484 (establish_gnat_vms_condition_handler): Likewise.
6485 (Compilation_Unit_to_gnu): Likewise.
6486 (gnat_to_gnu): Likewise.
6488 2011-04-21 Eric Botcazou <ebotcazou@adacore.com>
6490 * gcc-interface/Makefile.in (NO_SIBLING_ADAFLAGS): Always define.
6491 (NO_REORDER_ADAFLAGS): New variable.
6492 (EXTRA_GNATTOOLS): Always define.
6493 (../stamp-gnatlib1-$(RTSDIR): Copy tsystem.h.
6494 Clean up and adjust list of files compiled with special options.
6495 * gcc-interface/Make-lang.in: Likewise.
6496 (ada/decl.o): Cosmetical change.
6497 (ada/misc.o): Remove dependency on $(PLUGIN_H).
6499 2011-04-20 Jim Meyering <meyering@redhat.com>
6501 * initialize.c (__gnat_initialize): Remove useless if-before-free.
6503 2011-04-17 Eric Botcazou <ebotcazou@adacore.com>
6505 * gcc-interface/Make-lang.in (gnatbind): Replace $(ALL_CFLAGS) with
6506 $(CFLAGS) on the link line.
6508 2011-04-17 Eric Botcazou <ebotcazou@adacore.com>
6510 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Function>: Declare the
6511 padded type built for the return type if it is unconstrained.
6513 2011-04-14 Nathan Froyd <froydnj@codesourcery.com>
6515 * gcc-interface/utils.c (gnat_poplevel): Use block_chainon.
6517 2011-04-12 Nathan Froyd <froydnj@codesourcery.com>
6519 * gcc-interface/ada-tree.h (union lang_tree_node): Check for TS_COMMON
6520 before calling TREE_CHAIN.
6521 * gcc-interface/misc.c (gnat_init_ts): New function.
6522 (LANG_HOOKS_INIT_TS): Define.
6524 2011-04-12 Martin Jambor <mjambor@suse.cz>
6526 * gcc-interface/utils.c (end_subprog_body): Call cgraph_get_create_node
6527 instead of cgraph_node.
6529 2011-04-08 Eric Botcazou <ebotcazou@adacore.com>
6531 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Procedure>: Set minimum
6532 alignment on fields of the RETURN type built for the Copy-In Copy-Out
6535 2011-04-08 Eric Botcazou <ebotcazou@adacore.com>
6537 * gcc-interface/trans.c (Identifier_to_gnu): Do not return initializers
6538 of aggregate types that contain a placeholder.
6540 2011-04-08 Nathan Froyd <froydnj@codesourcery.com>
6542 * gcc-interface/utils.c (handle_sentinel_attribute): Don't use
6544 (handle_type_generic_attribute): Likewise.
6546 2011-04-04 Eric Botcazou <ebotcazou@adacore.com>
6549 * s-oscons-tmplt.c (MSG_WAITALL): Fix thinko in previous change.
6551 2011-04-04 Kai Tietz <ktietz@redhat.com>
6554 * s-oscons-tmplt.c (MSG_WAITALL): Define it for native windows targets
6557 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
6559 * gcc-interface/utils2.c (build_allocator): In the unconstrained array
6560 type case, do not strip a padding type around the array type.
6562 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
6564 * gcc-interface/utils.c (update_pointer_to): Finalize named pointer
6567 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
6569 * gcc-interface/lang.opt (feliminate-unused-debug-types): Delete.
6570 * gcc-interface/misc.c (gnat_handle_option): Remove special handling
6571 code for -feliminate-unused-debug-types.
6572 (gnat_post_options): Likewise.
6574 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
6576 * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
6577 declaration of a pointer type, then set DECL_ORIGINAL_TYPE to a
6580 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
6582 * gcc-interface/decl.c (gnat_to_gnu_entity): Do not force the
6583 DECL_ARTIFICIAL flag on enumeration types.
6585 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
6587 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: Do not make
6588 fat pointer types artificial unconditionally.
6589 <E_Array_Subtype>: Attach the base array type as a parallel type if it
6592 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
6594 * gcc-interface/gigi.h (get_dummy_type): Declare.
6595 (build_dummy_unc_pointer_types): Likewise.
6596 (finish_fat_pointer_type): Likewise.
6597 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: If a dummy
6598 fat pointer type has been built, complete it in place.
6599 <E_Access_Type>: Call build_dummy_unc_pointer_types to build dummy fat
6600 and thin pointers. Remove useless variable.
6601 (finish_fat_pointer_type): Make global and move to...
6602 * gcc-interface/utils.c (finish_fat_pointer_type): ...here.
6603 (get_dummy_type): New function.
6604 (build_dummy_unc_pointer_types): Likewise.
6605 (gnat_pushdecl): Propage the name to the anonymous variants only.
6606 (update_pointer_to): Only adjust the pointer types in the unconstrained
6609 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
6611 * gcc-interface/ada-tree.h (DECL_TAFT_TYPE_P): New flag.
6612 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Incomplete_Type>: Set it
6613 if this is a Taft amendment type and the full declaration is available.
6614 * gcc-interface/trans.c (process_type): Likewise.
6615 If there is an old type, mark the new one as used if DECL_TAFT_TYPE_P.
6616 (process_freeze_entity): Likewise.
6617 * gcc-interface/utils.c (dummy_global): New static variable.
6618 (gnat_write_global_declarations): If there are types declared as used
6619 at the global level, insert them in the global hash table.
6621 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
6623 * gcc-interface/gigi.h (record_builtin_type): Add ARTIFICIAL_P param.
6624 * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
6625 declaration of an array type, then set DECL_ORIGINAL_TYPE to a distinct
6627 (record_builtin_type): Add ARTIFICIAL_P parameter. Set DECL_ARTIFICIAL
6628 flag of the type accordingly.
6629 * gcc-interface/trans.c (gigi): Adjust calls to record_builtin_type.
6631 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
6633 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
6634 finalizing types when updating the pointers to the designated type.
6635 <all>: Finalize the deferred types even if we didn't defer processing
6636 of incomplete types in this invocation.
6638 2011-04-01 Olivier Hainque <hainque@adacore.com>
6639 Nicolas Setton <setton@adacore.com>
6640 Eric Botcazou <ebotcazou@adacore.com>
6642 * gcc-interface/misc.c (gnat_descriptive_type): New function.
6643 (LANG_HOOKS_DESCRIPTIVE_TYPE): Redefine to gnat_descriptive_type.
6645 2011-03-28 Kai Tietz <ktietz@redhat.com>
6647 * gcc-interface/Makefile.in (SO_LIB): Handle multilib build for native
6649 (EH_MECHANISM): Use GCC exception mechanism for native Windows targets.
6650 * system-mingw.ads (System): Change ZCX_By_Default default to True.
6652 * raise-gcc.c (PERSONALITY_FUNCTION): Add prototype.
6654 2011-03-28 Tristan Gingold <gingold@adacore.com>
6657 * gcc-interface/Make-lang.in (ada/b_gnat1.adb): Replace ada/b_gnat1.c.
6658 Use ada output of gnatbind.
6659 (ada/b_gnatb.adb): Ditto.
6660 (ada/b_gnat1.o, ada/b_gnatb.o): New rules.
6661 (ada.mostlyclean, ada.stage1)
6662 (ada.stage2, ada.stage3, ada.stage4, ada.stageprofile)
6663 (ada.stagefeedback): Adjust.
6664 * gcc-interface/Makefile.in (b_gnatl.adb): Replace b_gnatl.c.
6665 Use ada output of gnatbind.
6666 (b_gnatm.adb): Ditto.
6667 (b_gnatl.o, b_gnatm.o): New rules.
6669 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
6671 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
6672 for the padded type built to support a specified size or alignment.
6674 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
6676 * gcc-interface/gigi.h (finalize_from_with_types): Adjust comment.
6677 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
6678 unconditionally to the end of the unit when the designated type is
6680 <all>: Rename local variable. Attempt to un-defer types only and do it
6681 for limited_with'ed types as well.
6682 (finalize_from_with_types): Adjust comment. Rename variable and tidy.
6683 * gcc-interface/trans.c (Compilation_Unit_to_gnu): Use GNAT_UNIT
6684 consistently and remove redundant call to finalize_from_with_types.
6686 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
6688 * inline.adb (Back_End_Cannot_Inline): Lift restriction on calls to
6689 subprograms without a previous spec declared in the same unit.
6690 * gcc-interface/trans.c (Compilation_Unit_to_gnu): Process inlined
6691 subprograms at the end of the unit instead of at the beginning.
6692 * gcc-interface/utils.c (create_subprog_decl): Check that the entity
6693 isn't public for the special handling of non-inline functions nested
6694 inside inline external functions.
6696 2011-03-25 Jeff Law <law@redhat.com>
6698 * gcc-interface/utils.c (def_fn_type): Add missing va_end.
6700 2011-03-24 Eric Botcazou <ebotcazou@adacore.com>
6702 * einfo.ads (Size_Depends_On_Discriminant): Adjust description.
6703 * layout.adb (Compute_Size_Depends_On_Discriminant): New procedure
6704 to compute Set_Size_Depends_On_Discriminant.
6705 (Layout_Type): Call it on array types in back-end layout mode.
6706 * sem_util.adb (Requires_Transient_Scope): Return true for array
6707 types only if the size depends on the value of discriminants.
6708 * gcc-interface/utils2.c (build_binary_op) <MODIFY_EXPR>: Use the RHS
6709 type if the RHS is a call to a function that returns an unconstrained
6710 type with default discriminant.
6712 2011-03-24 Eric Botcazou <ebotcazou@adacore.com>
6714 * gcc-interface/trans.c (gnat_to_gnu): Remove obsolete case of
6715 non-conversion to the nominal result type at the end.
6717 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
6719 * gcc-interface/trans.c (create_temporary): New function taken from...
6720 (create_init_temporary): ...here. Call it.
6721 (call_to_gnu): Create the temporary for the return value early, if any.
6722 Create it for a function with copy-in/copy-out parameters if there is
6723 no target; in other cases of copy-in/copy-out, use another temporary.
6724 Push the new binding level lazily. Add and rename local variables.
6726 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
6728 * gcc-interface/decl.c (validate_size): Improve comments and tweak
6730 (set_rm_size): Likewise.
6732 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
6734 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
6735 for the padded type built in order to support a specified alignment.
6736 Fix incorrect formatting.
6738 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
6741 * gcc-interface/decl.c (elaborate_expression_1): Localize GNU_DECL.
6743 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
6745 * gcc-interface/decl.c (components_to_record): Add REORDER parameter,
6746 rename DEBUG_INFO_P into DEBUG_INFO and move P_GNU_REP_LIST parameter
6747 to the end of the list. Adjust recursive call. Rename local variable.
6748 If REORDER is true, reorder components of the record type.
6749 (gnat_to_gnu_entity): Pass OK_To_Reorder_Components flag as argument to
6750 components_to_record and adjust the parameter list.
6752 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
6754 * gcc-interface/decl.c (elaborate_expression_1): When optimization is
6755 disabled, use the variable for bounds of loop iteration scheme.
6757 2011-03-21 Kai Tietz <ktietz@redhat.com>
6760 * gcc-interface/utils.c (gnat_internal_attribute_table): Add column.
6762 2011-03-17 Eric Botcazou <ebotcazou@adacore.com>
6764 * gcc-interface/decl.c (elaborate_expression_1): Try harder to find
6765 out whether the expression is read-only. Short-circuit placeholder
6766 case and rename a couple of local variables.
6768 2011-03-17 Eric Botcazou <ebotcazou@adacore.com>
6770 * gcc-interface/gigi.h (smaller_form_type_p): Declare.
6771 * gcc-interface/trans.c (smaller_form_type_p): Make global and move...
6772 * gcc-interface/utils.c (smaller_form_type_p): ...to here.
6773 (convert): Deal with conversions from a smaller form type specially.
6775 2011-02-14 Eric Botcazou <ebotcazou@adacore.com>
6777 * gcc-interface/misc.c (gnat_init_options): Do not concatenate -I and
6778 its argument, except for the special -I- switch.
6780 2011-02-12 Gerald Pfeifer <gerald@pfeifer.com>
6782 * gnat_ugn.texi (Compiling Different Versions of Ada): Update link to
6785 2011-02-08 Eric Botcazou <ebotcazou@adacore.com>
6787 * gcc-interface/Makefile.in (x86-64 darwin): Handle multilibs.
6789 2011-02-03 Eric Botcazou <ebotcazou@adacore.com>
6791 * gcc-interface/gigi.h (fill_vms_descriptor): Take GNU_TYPE instead of
6793 * gcc-interface/utils2.c (fill_vms_descriptor): Move from here to...
6794 * gcc-interface/utils.c (fill_vms_descriptor): ...here. Take GNU_TYPE
6795 instead of GNAT_FORMAL. Protect the expression against multiple uses.
6796 Do not generate the check directly, instead instantiate the template
6797 check present in the descriptor.
6798 (make_descriptor_field): Move around.
6799 (build_vms_descriptor32): Build a template check in the POINTER field.
6800 (build_vms_descriptor): Remove useless suffixes.
6801 * gcc-interface/trans.c (call_to_gnu): Adjust fill_vms_descriptor call.
6803 2011-01-26 Eric Botcazou <ebotcazou@adacore.com>
6806 * targext.c: Include target files if IN_RTS is defined.
6808 2011-01-26 Richard Guenther <rguenther@suse.de>
6811 * targext.c: Include config.h.
6812 * gcc-interface/Make-lang.in (ada/targext.o): Add $(CONFIG_H)
6815 2011-01-04 Pascal Obry <obry@adacore.com>
6816 Eric Botcazou <ebotcazou@adacore.com>
6818 * gcc-interface/decl.c: Disable Stdcall convention handling for 64-bit.
6820 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
6822 * gcc-interface/trans.c (Case_Statement_to_gnu): Put the SLOC of the
6823 end-of-case on the end label and its associated gotos, if any.
6825 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
6827 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Evaluate the
6828 expressions of the parameter cache within the statement group of
6831 2011-01-04 Olivier Hainque <hainque@adacore.com>
6832 Eric Botcazou <ebotcazou@adacore.com>
6834 * gcc-interface/trans.c (BLOCK_SOURCE_END_LOCATION): Provide default.
6835 (set_end_locus_from_node): New function.
6836 (Subprogram_Body_to_gnu): Use it to mark both the inner BIND_EXPR we
6837 make and the function end_locus.
6838 (Compilation_Unit_to_gnu): Call it instead of a straight Sloc_to_locus
6839 for the elaboration subprogram.
6840 (set_gnu_expr_location_from_node) <default case>: Use it to attempt to
6841 set the end_locus of the expression as well.
6843 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
6846 * gcc-interface/trans.c (Identifier_to_gnu): In SJLJ mode, do not make
6847 variables that are referenced in exception handlers volatile.
6851 Copyright (C) 2011 Free Software Foundation, Inc.
6853 Copying and distribution of this file, with or without modification,
6854 are permitted in any medium without royalty provided the copyright
6855 notice and this notice are preserved.