1 2007-09-06 Janis Johnson <janis187@us.ibm.com>
5 2007-09-06 Eric Botcazou <ebotcazou@adacore.com>
7 * trans.c (convert_with_check): Update call to real_2expN.
9 2007-09-06 Eric Botcazou <ebotcazou@adacore.com>
11 * trans.c (convert_with_check): Update call to real_2expN.
13 2007-09-05 Sandra Loosemore <sandra@codesourcery.com>
15 * trans.c (Compilation_unit_to_gnu): Use set_cfun.
16 * utils.c (end_subprog_body): Likewise.
18 2007-09-03 Nick Clifton <nickc@redhat.com>
20 * Make-lang.in: Change copyright header to refer to version 3 of
21 the GNU General Public License and to point readers at the
22 COPYING3 file and the FSF's license web page.
23 * ada-tree.def, nmake.adt, nlists.h, snames.h, utils.c,
24 Makefile.rtl, Makefile.in, config-lang.in, uintp.h, urealp.h,
25 namet.h, decl.c, utils2.c, lang.opt, elists.h, atree.h, types.h,
26 treeprs.adt, lang-specs.h, cuintp.c, stringt.h, gnatbl.c:
29 2007-08-31 Vincent Celier <celier@adacore.com>
33 * gnatchop.adb, gnatfind.adb, gnatlink.adb, gnatls.adb,
34 gnatname.adb, gnatxref.adb, gprep.adb, clean.adb gnatbind.adb
35 (Check_Version_And_Help): New procedure in package Switch to process
36 switches --version and --help.
37 Use Check_Version_And_Help in GNAT tools
40 (Compile_Sources): Make sure that sources that are "excluded" are not
42 (Gnatmake): Do not issue -aO. to gnatbind and only issue -I- if a
44 (Version_Switch): Remove, moved to Switch
45 (Help_Switch): Remove, moved to Switch
46 (Display_Version): Remove, moved to Switch
48 * switch.ads, switch.adb (Check_Version_And_Help): New procedure in
49 package Switch to process switches --version and --help.
50 (Display_Version): New procedure
52 * gnatvsn.ads, gnatvsn.adb (Copyright_Holder): New function.
54 2007-08-31 Javier Miranda <miranda@adacore.com>
56 * a-tags.adb (Internal_Tag): Protect the run-time against wrong
59 2007-08-31 Hristian Kirtchev <kirtchev@adacore.com>
61 * checks.adb (In_Declarative_Region_Of_Subprogram_Body): New routine.
62 (Mark_Non_Null): If the node for which we just generated an access check
63 is a reference to an *in* parameter and the reference appears in the
64 declarative part of a subprogram body, mark the node as known non null.
66 2007-08-31 Hristian Kirtchev <kirtchev@adacore.com>
68 * einfo.ads, einfo.adb: New flag Is_Raised (Flag224). Update the
69 structure of E_Exception to reflect the new flag.
70 (Is_Raised, Set_Is_Raised): New inlined routines.
71 Update the usage of available flag to reflect the addition of Is_Raised.
72 (Is_Raised, Set_Is_Raised): Bodies of new routines.
73 (Write_Entity_Flags): Write the status of flag Is_Raised.
74 (Is_Descendent_Of_Address): New entity flag, to simplify handling of
75 spurious ambiguities when integer literals appear in the context of an
76 address type that is a visible integer type.
78 * sem_ch11.adb (Analyze_Exception_Handler): Add code to warn on local
79 exceptions never being raised.
80 (Analyze_Raise_Statement): When analyzing an exception, mark it as being
83 2007-08-31 Javier Miranda <miranda@adacore.com>
85 * exp_ch11.adb (Expand_At_End_Handler): Avoid generation of raise
86 statement when compiling under restriction No_Exceptions_Proparation.
88 2007-08-31 Ed Schonberg <schonberg@adacore.com>
90 * exp_ch3.adb (Build_Record_Init_Proc): If there is a static
91 initialization aggregate for the type, generate itype references for
92 thetypes of its (sub)components, to prevent out-of-scope errors in gigi.
94 2007-08-31 Gary Dismukes <dismukes@adacore.com>
96 * exp_ch8.adb (Expand_N_Package_Renaming_Declaration): In the case of a
97 library-level package renaming, pass the declaration associated with
98 the renaming's special debug variable to Qualify_Entity_Names to ensure
99 that its encoded name is properly qualified.
101 * exp_dbug.adb (Qualify_All_Entity_Names): Check for a variable entity
102 occurring in the list of entities to qualify, and do not attempt to
103 traverse an entity list in that case. Variables associated with
104 ` library-level package renamings can now occur in the table.
106 * exp_dbug.ads: Revise documentation of the encoding for renaming
109 2007-08-31 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
111 * layout.adb (Layout_Type): Use Underlying_Type to determine whether an
112 access type points to an unconstrained array.
114 2007-08-31 Hristian Kirtchev <kirtchev@adacore.com>
116 * restrict.adb, namet.adb, par-util.adb: Remove redundant type
119 * sem_res.adb (Resolve_Qualified_Expression): Add machinery to detect
120 simple redundant qualifications. The check is performed whenever the
121 expression is a non-overloaded identifier.
122 (Resolve_Type_Conversion): Enchance the redundant type conversion check
123 to include loop parameters.
124 (Valid_Conversion): Avoid generation of spurious error message.
126 2007-08-31 Bob Duff <duff@adacore.com>
128 * par-ch4.adb (P_Simple_Expression): Fold long sequences of
129 concatenations of string literals into a single literal, in order to
130 avoid very deep recursion in the front end, which was causing stack
133 * sem_eval.adb (Eval_Concatenation): If the left operand is the empty
134 string, and the right operand is a string literal (the case of "" &
135 "..."), optimize by avoiding copying the right operand -- just use the
136 value of the right operand directly.
138 * stringt.adb (Store_String_Chars): Optimize by growing the
139 String_Chars table all at once, rather than appending characters one by
141 (Write_String_Table_Entry): If the string to be printed is very long,
142 just print the first few characters, followed by the length. Otherwise,
143 doing "pn(n)" in the debugger can take an extremely long time.
145 * sem_prag.adb (Process_Interface_Name): Replace loop doing
146 Store_String_Char with Store_String_Chars.
148 2007-08-31 Vincent Celier <celier@adacore.com>
150 * prj-attr.adb: Add new attribute Excluded_Source_Files
152 * prj-nmsc.adb: Use attribute Excluded_Source_Files before
153 Locally_Removed_Files.
155 * snames.ads, snames.adb: New standard name Excluded_Source_Files
157 2007-08-31 Ed Schonberg <schonberg@adacore.com>
159 * sem_ch10.adb (Analyze_Subunit_Context): When analyzing context
160 clauses of subunits, ignore limited_with_clauses that are illegal and
161 have not been fully analyzed.
163 2007-08-31 Ed Schonberg <schonberg@adacore.com>
165 * sem_ch3.adb: The predicate Is_Descendent_Of_Address is now an entity
166 flag, for effiency. It is called when analyzing arithmetic operators
167 and also for actuals in calls that are universal_integers. The flag is
168 set for the predefined type address, and for any type or subtype
171 * sem_ch4.adb (Analyze_One_Call): Reject an actual that is a
172 Universal_Integer, when the formal is a descendent of address and the
173 call appears in user code.
174 (Analyze_Selected_Component): if the prefix is a private extension, the
175 tag component is visible.
177 * sem_util.ads, sem_util.adb: Remove Is_Descendent_Of_Address, now an
180 2007-08-31 Robert Dewar <dewar@adacore.com>
182 * s-fileio.adb (Open): Normalize file name to lower case in non-case
183 sensitive file name systems to avoid unexpected mismatch in Vista.
185 2007-08-31 Vincent Celier <celier@adacore.com>
187 * tempdir.adb: On VMS, take into account GNUTMPDIR before TMPDIR
189 2007-08-31 Vincent Celier <celier@adacore.com>
191 * symbols-vms.adb (Initialize): Read symbol files with continuation
193 (Finalize): If symbol is long, split the line
195 2007-08-31 Vincent Celier <celier@adacore.com>
197 * fmap.ads: Minor comment updates
199 2007-08-31 GNAT Script <nobody@adacore.com>
201 * Make-lang.in: Makefile automatically updated
203 2007-08-31 Bob Duff <duff@adacore.com>
205 * sinfo.ads: Minor comment fix.
207 2007-08-31 Thomas Quinot <quinot@adacore.com>
209 * stand.ads: (Standard_Debug_Renaming_Type): Make comment consistent
211 Documentation cleanup only.
213 2007-08-31 Sergey Rybin <rybin@adacore.com>
215 * vms_data.ads: Add new qualifier /STMT_NAME_ON_NEW_LINE for the new
216 gnatpp '--separate-stmt-name' option.
217 Add new qualifier /USE_ON_NEW_LIN for the new gnatpp '--use-on-new-line'
220 * gnat_ugn.texi: Add description for the new gnatpp
221 '--separate-stmt-name' and '--use-on-new-line' options.
223 2007-08-31 Ben Elliston <bje@au.ibm.com>
225 * Makefile.in (LIBGNAT_TARGET_PAIRS): Use system-linux-ppc64.ads
226 when compiling for powerpc64-*-linux.
227 * system-linux-ppc64.ads: New file.
229 2007-08-22 Krister Walfridsson <cato@df.lth.se>
231 * env.c ( __gnat_clearenv): Use the __gnat_unsetenv mechanism for
234 2007-08-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
236 * misc.c (gnat_type_max_size): Constify.
238 2007-08-16 Gary Dismukes <dismukes@adacore.com>
240 * cstand.adb (Create_Standard): Create an entity for a zero-sized type
241 associated with Standard_Debug_Renaming_Type, to be used as the type of
242 the special variables whose names provide debugger encodings for
243 renaming declarations.
245 * einfo.ads, einfo.adb (Debug_Renaming_Link): Change to return Node25.
246 (Set_Debug_Renaming_Link): Change to set Node25.
247 (Write_Field13_Name): Remove case for E_Enumeration_Literal.
248 (Write_Field25_Name): Add case for E_Variable to output
249 "Debug_Renaming_Link".
250 (Write_Field23_Name): Correct the output string for "Limited_View".
252 * exp_dbug.adb: Add with and use of Tbuild.
253 (Debug_Renaming_Declaration): Replace creation of an enumeration type
254 and literal with creation of a variable of type
255 Standard_Debug_Renaming_Type whose name encodes both the renamed object
256 and the entity of the renaming declaration.
257 (Qualify_Entity_Name): Add the delayed qualification of the entity name
258 part of the name of a variable that has a Debug_Renaming_Link.
260 * stand.ads (Standard_Debug_Renaming_Type): New Entity_Id denoting a
261 special type to be associated with variables that provide debugger
262 encodings for renaming declarations.
264 2007-08-16 Gary Dismukes <dismukes@adacore.com>
265 Ed Schonberg <schonberg@adacore.com>
266 Javier Miranda <miranda@adacore.com>
268 * exp_aggr.adb (Build_Record_Aggr_Code): Extend the test for an
269 ancestor part given by an aggregate to test for an unchecked conversion,
270 since this can occur in some cases when the ancestor part is a function
271 call, and we don't want to fall into the recursive call to this
272 procedure in that case.
274 * exp_ch3.adb (Stream_Operation_OK): Revise tests for availability of
275 stream attributes on limited types to account for user-specified
276 attributes as well as whether Input (resp. Output) becomes available
277 due to Read (resp. Write) being available for the type. Change Boolean
278 variable to the more accurate name
279 Has_Predefined_Or_Specified_Stream_Attribute. Change convoluted
280 double-"not" predicate at beginning of return statement to more
283 * exp_ch5.adb (Expand_N_Extended_Return_Statement): If the extended
284 return has an associated N_Handled_Sequence_Of_Statements, then wrap it
285 in a block statement and use that as the first statement of the
286 expanded return rather than incorrectly using the handled sequence as
289 * exp_ch6.adb (Expand_N_Subprogram_Declaration): If this is a protected
290 operation, generate an explicit freeze node for it rather than
291 generating extra formals, to ensure that gigi has the proper order of
292 elaboration for anonymous subtypes in the signature of the subprograms.
293 (Build_In_Place_Formal): Move assertion to beginning of loop.
294 (Is_Build_In_Place_Function_Call): Allow for an unchecked conversion
295 applied to a function call (occurs for some cases of 'Input).
296 (Make_Build_In_Place_Call_In_*): Allow for an unchecked conversion
297 applied to a function call (occurs for some cases of 'Input).
299 * exp_strm.adb (Build_Record_Or_Elementary_Input_Function): For Ada
300 2005, generate an extended return statement enclosing the result object
303 * freeze.adb (Freeze_Record_Type): Extend the current management of
304 components that are access type with an allocator as default value: add
305 missing support to the use of qualified expressions of the
306 allocator (which also cause freezing of the designated type!)
307 (Freeze_Entity): Call Freeze_Subprogram in the case of a predefined
308 dispatching operation, since extra formals may be needed by calls to
309 build-in-place functions (such as stream 'Input).
311 * sem_ch6.adb (Create_Extra_Formals): Skip creation of the extra
312 formals for 'Constrained and accessibility level in the case of a
313 predefined dispatching operation.
315 * exp_util.adb (Insert_Actions): A protected body is a valid insertion
316 point, no need to find the parent node.
318 2007-08-16 Javier Miranda <miranda@adacore.com>
320 * exp_attr.adb (Attribute_Priority): Add missing support for entries
323 2007-08-16 Javier Miranda <miranda@adacore.com>
325 * exp_ch9.adb (Build_Protected_Entry): Undo previous change because it
326 is not really required and can introduce regression with the debugger.
327 The original problem is fixed with the patch written for checks.adb.
329 2007-08-16 Thomas Quinot <quinot@adacore.com>
331 * g-dyntab.adb, g-table.adb, table.adb: (Set_Item): Suppress
332 Range_Check on Allocated_Table.
334 2007-08-16 Vincent Celier <celier@adacore.com>
336 * make.adb (Collect_Arguments): Call Test_If_Relative_Path with
337 Including_Non_Switch set to False.
338 (Gnatmake): For the compiler, call Test_If_Relative_Path with
339 Including_Non_Switch set to False.
341 * makeutl.adb, makeutl.ads (Test_If_Relative_Path): New Boolean
342 parameter Including_Non_Switch, defaulted to True. When
343 Including_Non_Switch is False, options that are not switches and
344 appear as relative path are not converted to absolute paths.
346 2007-08-16 Nicolas Roche <roche@adacore.com>
348 * Makefile.in (gnatlib): Propagate FORCE_DEBUG_ADAFLAGS value to sub
351 * Make-lang.in: Update dependencies
353 2007-08-16 Hristian Kirtchev <kirtchev@adacore.com>
355 * sem_ch10.adb (Has_With_Clause): If the name of the with clause
356 currently inspected is a selected component, retrieve the entity of
358 (Install_Limited_Withed_Unit): Call Has_Limited_With_Clause starting
359 from the immediate ancestor of Main_Unit_Entity.
360 (Install_Limited_Withed_Unit): Do not install the limited view of
361 package P if P is reachable through an ancestor chain from package C
362 and C also has a with clause for P in its body.
363 (Has_Limited_With_Clause): New routine.
364 (Has_With_Clause): New routine.
366 2007-08-16 Ed Schonberg <schonberg@adacore.com>
368 * sem_ch12.adb (Copy_Generic_Node): A reference to a child unit of the
369 generic for an enclosing instance is a global reference, even though
370 its scope is the enclosing instance.
372 2007-08-16 Gary Dismukes <dismukes@adacore.com>
373 Javier Miranda <miranda@adacore.com>
375 * sem_ch3.adb (OK_For_Limited_Init_In_05): Allow calls to 'Input to
376 initialize a limited object.
377 (Build_Derived_Record_Type): Add missing check of rules ARM 3.9.4
379 Make sure Has_Complex_Representation is inherited by derived type.
381 2007-08-16 Robert Dewar <dewar@adacore.com>
383 * sem_ch5.adb (Analyze_Assignment): Make sure we still note update in
386 2007-08-16 Ed Schonberg <schonberg@adacore.com>
388 * sem_disp.adb (Check_Dispatching_Operation): If the operation
389 implements an operation inherited from a progenitor interface, verify
390 that they are subtype-conformant.
392 2007-08-16 Hristian Kirtchev <kirtchev@adacore.com>
393 Bob Duff <duff@adacore.com>
394 Nicolas Setton <setton@adacore.com>
396 * sem_res.adb (Comes_From_Predefined_Lib_Unit): New.
397 (Resolve): Alphabetize local variables. Add new variable From_Lib. When
398 the statement which is being resolved comes from a predefined library
399 unit, all non-predefined library interpretations are skipped.
400 (Resolve_Op_Concat): If string concatenation was folded in the parser,
401 but the "&" is user defined, give an error, because the folding would
404 * sinfo.ads, sinfo.adb (Is_Folded_In_Parser): New flag to indicate that
405 the parser has folded a long sequence of concatenations of string
408 * trans.c (Handled_Sequence_Of_Statements_to_gnu): Mark "JMPBUF_SAVE"
409 and "JMP_BUF" variables as artificial.
410 (N_String_Literal): Do not use alloca for very long string literals. Use
411 xmalloc/free instead. Otherwise the stack might overflow.
413 * utils.c (init_gigi_decls): Mark "JMPBUF_T" type as created by the
416 2007-08-16 Vincent Celier <celier@adacore.com>
418 * vms_conv.adb (Process_Argument): Ensure that project related options
419 are not put in the -cargs section when using GNAT COMPILE.
421 2007-08-16 Robert Dewar <dewar@adacore.com>
423 * gnat_ugn.texi: Add note on preprocessing (output file not written)
425 2007-08-16 Thomas Quinot <quinot@adacore.com>
427 * a-tags.adb: Minor reformatting.
429 2007-08-16 Bob Duff <duff@adacore.com>
431 * sem_type.ads, sem_ch4.adb: Minor reformatting.
433 2007-08-14 Thomas Quinot <quinot@adacore.com>
435 * g-soccon-interix.ads, a-excpol-interix.adb, a-intnam-interix.ads,
436 s-osinte-interix.ads, system-interix.ads: Removed.
438 2007-08-14 Hristian Kirtchev <kirtchev@adacore.com>
440 * a-calend-vms.adb, a-calend.adb ("+", "-", Add, Subtract): Remove
441 calls to Check_Within_Time_Bounds.
442 ("+", "-", Add, Subtract): Remove calls to Check_Within_Time_Bounds.
443 (Difference): Account for possible rounding of the resulting difference
445 2007-08-14 Robert Dewar <dewar@adacore.com>
447 * uintp.adb, a-ztedit.adb, s-wchcon.adb, xnmake.adb, s-wchcon.adb,
448 par-ch5.adb, par-ch10.adb, get_targ.adb, a-wtedit.adb, a-teioed.adb,
449 s-osinte-solaris.adb, s-osinte-solaris.ads,
450 s-osinte-freebsd.ads, s-osinte-freebsd.adb: Minor reformatting.
452 * styleg.adb, styleg.ads, stylesw.adb, stylesw.ads: implement style
453 switch -gnatyS. Enable -gnatyS in GNAT style check mode
455 2007-08-14 Robert Dewar <dewar@adacore.com>
456 Ed Schonberg <schonberg@adacore.com>
458 * inline.adb, types.ads, inline.ads, frontend.adb, alloc.ads:
459 Suppress unmodified in-out parameter warning in some cases
460 This patch is a also fairly significant change to the way suppressible
463 * checks.ads, checks.adb (Install_Null_Excluding_Check): No check
464 needed for access to concurrent record types generated by the expander.
465 (Generate_Range_Check): When generating a temporary to capture the
466 value of a conversion that requires a range check, set the type of the
467 temporary before rewriting the node, so that the type is always
468 properly placed for back-end use.
469 (Apply_Float_Conversion_Check): Handle case where the conversion is
471 (Get_Discriminal): Code reformatting. Climb the scope stack looking
472 for a protected type in order to examine its discriminants.
474 2007-08-14 Robert Dewar <dewar@adacore.com>
475 Gary Dismukes <dismukes@adacore.com>
476 Ed Schonberg <schonberg@adacore.com>
477 Thomas Quinot <quinot@adacore.com>
479 * a-stzsup.adb, nlists.adb, lib-util.adb, treepr.adb,
480 a-stwisu.adb, a-strsup.adb: Fix warnings for range
483 * exp_ch4.adb (Expand_N_In): Add warnings for range tests optimized out.
484 (Get_Allocator_Final_List): For the case of an anonymous access type
485 that has a specified Associated_Final_Chain, do not go up to the
487 (Expand_N_Type_Conversion): Test for the case of renamings of access
488 parameters when deciding whether to apply a run-time accessibility
490 (Convert_Aggr_In_Allocator): Use Insert_Actions to place expanded
491 aggregate code before allocator, and ahead of declaration for
492 temporary, to prevent access before elaboration when the allocator is
493 an actual for an access parameter.
494 (Expand_N_Type_Conversion): On an access type conversion involving an
495 access parameter, do not apply an accessibility check when the
496 operand's original node was an attribute other than 'Access. We now
497 create access conversions for the expansion of 'Unchecked_Access and
498 'Unrestricted_Access in certain cases and clearly accessibility should
499 not be checked for those.
501 * exp_ch6.ads, exp_ch6.adb (Add_Call_By_Copy_Code): For an actual that
502 includes a type conversion of a packed component that has been expanded,
503 recover the original expression for the object, and use this expression
504 in the post-call assignment statement, so that the assignment is made
505 to the object and not to a back-end temporary.
506 (Freeze_Subprogram): In case of primitives of tagged types not defined
507 at the library level force generation of code to register the primitive
508 in the dispatch table. In addition some code reorganization has been
509 done to leave the implementation clear.
510 (Expand_Call): When expanding an inherited implicit conversion,
511 preserve the type of the inherited function after the intrinsic
512 operation has been expanded.
514 * exp_ch2.ads, exp_ch2.adb
515 (Expand_Entry_Parameter.In_Assignment_Context): An implicit dereference
516 of an entry formal appearing in an assignment statement does not assign
518 (Expand_Current_Value): Instead of calling a routine to determine
519 whether the prefix of an attribute reference should be optimized or
520 not, prevent the optimization of such prefixes all together.
522 * lib-xref.adb (Generate_Reference.Is_On_LHS): An indexed or selected
523 component whose prefix is known to be of an access type is an implicit
524 dereference and does not assign to the prefix.
526 2007-08-14 Ed Schonberg <schonberg@adacore.com>
527 Robert Dewar <dewar@adacore.com>
529 * atree.ads, atree.adb (New_Copy_Tree): If hash table is being used and
530 itype is visited, make an entry into table to link associated node and
532 Add comments and correct harmless error in Build_NCT_Hash_Tables
533 (Array_Aggr_Subtype): Associate each itype created for an index type to
534 the corresponding range construct, and not to the aggregate itself. to
535 maintain a one-to-one correspondence between itype and its associated
536 node, to prevent errors when complex expression is copied.
537 Fix mishandling of multiple levels of parens
539 * sem_aggr.adb: Create a limited view of an incomplete type, to make
540 treatment of limited views uniform for all visible declarations in a
541 limited_withed package.
542 (New_Copy_Tree): If hash table is being used and itype is visited,
543 make an entry into table to link associated node and new itype.
544 (Resolve_Record_Aggregate): Do not add an others box association for a
545 discriminated record component that has only discriminants, when there
546 is a box association for the component itself.
548 * par-ch4.adb: Fix mishandling of multiple levels of parens
550 2007-08-14 Robert Dewar <dewar@adacore.com>
552 * comperr.adb: Fix problem with suppressing warning messages from gigi
554 * erroutc.ads, erroutc.adb, errout.ads,
555 errout.adb (Write_Eol): Remove trailing spaces before writing the line
556 (Write_Eol_Keep_Blanks): New procedure to write a line, including
557 possible trailing spaces.
558 (Output_Source_Line): Call Write_Eol_Keep_Blanks to output a source line
559 Fix problem with suppressing warning messages from back end
560 Improve handling of deleted warnings
563 Fix problem with suppressing warning messages from back end
564 Handle setting of Static_Dispatch_Tables flag.
567 Fix problem with suppressing warning messages from back end
569 * exp_intr.adb: Improve handling of deleted warnings
571 2007-08-14 Robert Dewar <dewar@adacore.com>
573 * debug.adb: Improve -gnatdI to cover all cases of serialization
574 Add documentation of dZ, d.t
576 * sprint.ads, sprint.adb: Improve -gnatdI to cover all cases of
578 (Sprint_Node_Actual): Generate new output associated with implicit
579 importation and implicit exportation of object declarations.
581 2007-08-14 Ed Schonberg <schonberg@adacore.com>
582 Robert Dewar <dewar@adacore.com>
583 Javier Miranda <miranda@adacore.com>
584 Gary Dismukes <dismukes@adacore.com>
586 * einfo.ads, einfo.adb: Create a limited view of an incomplete type,
587 to make treatment of limited views uniform for all visible declarations
588 in a limited_withed package.
589 Improve warnings for in out parameters
590 (Set_Related_Interaface/Related_Interface): Allow the use of this
591 attribute with constants.
592 (Write_Field26_Name): Handle attribute Related_Interface in constants.
593 Warn on duplicate pragma Preelaborable_Initialialization
595 * sem_ch6.ads, sem_ch6.adb (Analyze_Subprogram_Body): Force the
596 generation of a freezing node to ensure proper management of null
597 excluding access types in the backend.
598 (Create_Extra_Formals): Test base type of the formal when checking for
599 the need to add an extra accessibility-level formal. Pass the entity E
600 on all calls to Add_Extra_Formal (rather than Scope (Formal) as was
601 originally being done in a couple of cases), to ensure that the
602 Extra_Formals list gets set on the entity E when the first entity is
604 (Conforming_Types): Add missing calls to Base_Type to the code that
605 handles anonymous access types. This is required to handle the
606 general case because Process_Formals builds internal subtype entities
607 to handle null-excluding access types.
608 (Make_Controlling_Function_Wrappers): Create wrappers for constructor
609 functions that need it, even when not marked Requires_Overriding.
610 Improve warnings for in out parameters
611 (Analyze_Function_Return): Warn for disallowed null return
612 Warn on return from procedure with unset out parameter
613 Ensure consistent use of # in error messages
614 (Check_Overriding_Indicator): Add in parameter Is_Primitive.
615 (Analyze_Function_Return): Move call to Apply_Constraint_Check before
616 the implicit conversion of the expression done for anonymous access
617 types. This is required to generate the code of the null excluding
620 * sem_warn.ads, sem_warn.adb (Check_References.Publicly_Referenceable):
621 A formal parameter is never publicly referenceable outside of its body.
622 (Check_References): For an unreferenced formal parameter in an accept
623 statement, use the same warning circuitry as for subprogram formal
625 (Warn_On_Unreferenced_Entity): New subprogram, taken from
626 Output_Unreferenced_Messages, containing the part of that routine that
627 is now reused for entry formals as described above.
628 (Goto_Spec_Entity): New function
629 (Check_References): Do not give IN OUT warning for dispatching operation
630 Improve warnings for in out parameters
631 (Test_Ref): Check that the entity is not undefinite before calling
632 Scope_Within, in order to avoid infinite loops.
633 Warn on return from procedure with unset out parameter
634 Improved warnings for unused variables
636 2007-08-14 Robert Dewar <dewar@adacore.com>
637 Javier Miranda <miranda@adacore.com>
638 Gary Dismukes <dismukes@adacore.com>
640 * exp_attr.adb (Expand_N_Attribute_Reference): Handle case of child unit
641 (Expand_N_Attribute_Reference): Further unify the handling of the
642 three forms of access attributes, using common code now for all three
643 cases. Add a test for the case of applying an access attribute to
644 an explicit dereference when the context is an access-to-interface
645 type. In that case we need to apply the conversion to the prefix
646 of the explicit dereference rather than the prefix of the attribute.
647 (Attribute_Version, UET_Address): Set entity as internal to ensure
648 proper dg output of implicit importation.
649 (Expand_Access_To_Type): Removed.
650 (Expand_N_Attribute_Reference): Merge the code from the three cases
651 of access attributes, since the processing is largely identical for
652 these cases. The substantive fix here is to process the case of a
653 type name prefix (current instance case) before handling the case
654 of interface prefixes.
656 2007-08-14 Thomas Quinot <quinot@adacore.com>
657 Ed Schonberg <schonberg@adacore.com>
658 Javier Miranda <miranda@adacore.com>
659 Robert Dewar <dewar@adacore.com>
661 * exp_ch3.ads, exp_ch3.adb (Add_Final_Chain): New subprogram.
662 (Freeze_Array_Type, Freeze_Record_Type): For the case of a component
663 type that is an anonymous access to controlled object, establish
664 an associated finalization chain to avoid corrupting the global
665 finalization list when a dynamically allocated object designated
666 by such a component is deallocated.
667 (Make_Controlling_Function_Wrappers): Create wrappers for constructor
668 functions that need it, even when not marked Requires_Overriding.
669 (Initialize_Tag): Replace call to has_discriminants by call to
670 Is_Variable_Size_Record in the circuitry that handles the
671 initialization of secondary tags.
672 (Is_Variable_Size_Record): New implementation.
673 (Expand_N_Object_Declaration): Suppress call to init proc if there is a
674 Suppress_Initialization pragma for a derived type.
675 (Is_Variable_Size_Record): New subprogram.
676 (Build_Offset_To_Top_Functions): New implementation that simplifies the
677 initial version of this routine and also fixes problems causing
678 incomplete initialization of the table of interfaces.
679 (Build_Init_Procedure): Improve the generation of code to initialize the
680 the tag components of secondary dispatch tables.
681 (Init_Secondary_Tags): New implementation that simplifies the previous
682 version of this routine.
683 (Make_DT): Add parameter to indicate when type has been frozen by an
684 object declaration, for diagnostic purposes.
685 (Check_Premature_Freezing): New subsidiary procedure of Make_DT, to
686 diagnose attemps to freeze a subprogram when some untagged type of its
687 profile is a private type whose full view has not been analyzed yet.
688 (Freeze_Array_Type): Generate init proc for packed array if either
689 Initialize or Normalize_Scalars is set.
690 (Make_Controlling_Function_Wrappers, Make_Null_Procedure_Specs): when
691 constructing the new profile, copy the null_exclusion indicator for each
692 parameter, to ensure full conformance of the new body with the spec.
694 * sem_type.ads, sem_type.adb (Make_Controlling_Function_Wrappers):
695 Create wrappers for constructor functions that need it, even when not
696 marked Requires_Overriding.
697 (Covers): Handle properly designated types of anonymous access types,
698 whose non-limited views are themselves incomplete types.
699 (Add_Entry): Use an entity to store the abstract operation which hides
701 (Binary_Op_May_Be_Hidden): Rename to Binary_Op_Interp_Has_Abstract_Op.
702 (Collect_Interps): Use Empty as an actual for Abstract_Op in the
703 initialization aggregate.
704 (Function_Interp_May_Be_Hidden): Rename to
705 Function_Interp_Has_Abstract_Op.
706 (Has_Compatible_Type): Remove machinery that skips interpretations if
707 they are labeled as potentially hidden by an abstract operator.
708 (Has_Hidden_Interp): Rename to Has_Abstract_Op.
709 (Set_May_Be_Hidden): Rename to Set_Abstract_Op.
710 (Write_Overloads): Output the abstract operator if present.
711 (Add_Entry): Before inserting a new entry into the interpretation table
712 for a node, determine whether the entry will be disabled by an abstract
714 (Binary_Op_Interp_May_Be_Hidden): New routine.
715 (Collect_Interps): Add value for flag May_Be_Hidden in initialization
717 (Function_Interp_May_Be_Hidden): New routine.
718 (Has_Compatible_Type): Do not consider interpretations hidden by
719 abstract operators when trying to determine whether two types are
721 (Has_Hidden_Interp): New routine.
722 (Set_May_Be_Hidden_Interp): New routine.
723 (Write_Overloads): Write the status of flag May_Be_Hidden.
725 2007-08-14 Ed Schonberg <schonberg@adacore.com>
726 Javier Miranda <miranda@adacore.com>
728 * exp_disp.ads, exp_disp.adb (Build_Dispatch_Tables): Handle tagged
729 types declared in the declarative part of a nested package body or in
730 the proper body of a stub.
731 (Set_All_DT_Position): Add missing check to avoid wrong assignation
732 of the same dispatch table slot to renamed primitives.
733 (Make_Select_Specific_Data_Table): Handle private types.
734 (Tagged_Kind): Handle private types.
735 (Make_Tags, Make_DT): Set tag entity as internal to ensure proper dg
736 output of implicit importation and exportation.
737 (Expand_Interface_Thunk): Fix bug in the expansion assuming that the
738 first formal of the thunk is always associated with the controlling
739 type. In addition perform the following code cleanup: remove formal
740 Thunk_Alias which is no longer required, cleanup evaluation of the
741 the controlling type, and update the documentation.
742 Replace occurrence of Default_Prim_Op_Count by
743 Max_Predef_Prims. Addition of compile-time check to verify
744 that the value of Max_Predef_Prims is correct.
745 (Check_Premature_Freezing): Apply check in Ada95 mode as well.
746 (Make_DT): Add parameter to indicate when type has been frozen by an
747 object declaration, for diagnostic purposes.
748 (Build_Static_Dispatch_Tables): New subprogram that takes care of the
749 construction of statically allocated dispatch tables.
750 (Make_DT): In case of library-level tagged types export the declaration
751 of the primary tag. Remove generation of tags (now done by Make_Tags).
752 Additional modifications to handle non-static generation of dispatch
753 tables. Take care of building tables for asynchronous interface types
754 (Make_Tags): New subprogram that generates the entities associated with
755 the primary and secondary tags of Typ and fills the contents of Access_
756 Disp_Table. In case of library-level tagged types imports the forward
757 declaration of the primary tag that will be declared later by Make_DT.
758 (Expand_Interface_Conversion): In case of access types to interfaces
759 replace an itype declaration by an explicit type declaration to avoid
760 problems associated with the scope of such itype in transient blocks.
762 2007-08-14 Robert Dewar <dewar@adacore.com>
763 Ed Schonberg <schonberg@adacore.com>
764 Javier Miranda <miranda@adacore.com>
766 * exp_util.ads, exp_util.adb:
767 This patch replaces a number of occurrences of explicit tests for N_Null
768 with calls to Known_Null. This improves tracking of null values, since
769 Known_Null also catches null constants, and variables currently known to
770 be null, so we get better tracking.
771 (Ensure_Defined): create an itype reference only in the scope of the
773 (Side_Effect_Free): A selected component of an access type that
774 denotes a component with a rep clause must be treated as not
775 side-effect free, because if it is part of a linked structure its
776 value may be affected by a renaming.
777 (Expand_Subtype_From_Expr): For limited objects initialized with build
778 in place function calls, do nothing; otherwise we prematurely introduce
779 an N_Reference node in the expression initializing the object, which
780 breaks the circuitry that detects and adds the additional arguments to
781 the called function. Bug found working in the new patch for statically
782 allocated dispatch tables.
783 (Is_Library_Level_Tagged_Type): New subprogram.
784 (Remove_Side_Effects): If the expression of an elementary type is an
785 operator treat as a function call.
786 (Make_Literal_Range): If the index type of the array is not integer, use
787 attributes properly to compute the constraint on the resulting aggregate
790 * freeze.ads, freeze.adb (Freeze_Entity): If the entity is a
791 class-wide type whose base type is an incomplete private type, leave
792 class-wide type unfrozen so that freeze nodes can be generated
793 properly at a later point.
794 (Freeze_Entity, array case): Handle case of pragma Pack and component
795 size attributre clause for same array.
797 2007-08-14 Vincent Celier <celier@adacore.com>
799 * prj.ads, prj.adb: Update Project Manager to new attribute names for
801 Allow all valid declarations in configuration project files
802 (Reset): Initialize all tables and hash tables in the project tree data
803 Major update of the Project Manager and of the project aware tools,
804 including gprmake, so that the same sources in the GNAT repository
805 can be used by gprbuild.
806 (Slash_Id): Change type to be Path_Name_Type
807 (Slash): Return a Path_Name_Type instead of a File_Name_Type
809 * prj-attr.ads, prj-attr.adb: Remove attributes no longer used by
811 Update Project Manager to new attribute names for ghprbuild
812 Allow all valid declarations in configuration project files
813 Major update of the Project Manager and of the project aware tools,
814 including gprmake, so that the same sources in the GNAT repository
815 can be used by gprbuild.
818 Major update of the Project Manager and of the project aware tools,
819 including gprmake, so that the same sources in the GNAT repository
820 can be used by gprbuild.
822 * prj-dect.adb (Prj.Strt.Attribute_Reference): Set correctly the case
823 insensitive flag for attributes with optional index.
824 (Prj.Dect.Parse_Attribute_Declaration): For case insensitive associative
825 array attribute, put the index in lower case.
826 Update Project Manager to new attribute names for ghprbuild
827 Allow all valid declarations in configuration project files
828 Major update of the Project Manager and of the project aware tools,
829 including gprmake, so that the same sources in the GNAT repository
830 can be used by gprbuild.
832 * prj-env.ads, prj-env.adb:
833 Major update of the Project Manager and of the project aware tools,
834 including gprmake, so that the same sources in the GNAT repository
835 can be used by gprbuild.
836 (Get_Reference): Change type of parameter Path to Path_Name_Type
838 * prj-ext.ads, prj-ext.adb (Initialize_Project_Path): Make sure, after
839 removing '-' from the path to start with the first character of the
841 Major update of the Project Manager and of the project aware tools,
842 including gprmake, so that the same sources in the GNAT repository
843 can be used by gprbuild.
844 Major update of the Project Manager and of the project aware tools,
845 including gprmake, so that the same sources in the GNAT repository
846 can be used by gprbuild.
848 * prj-nmsc.ads, prj-nmsc.adb:
849 Update Project Manager to new attribute names for ghprbuild
850 Allow all valid declarations in configuration project files
851 (Search_Directories): Detect subunits that are specified with an
852 attribute Body in package Naming. Do not replace a source/unit in the
853 same project when the order of the source dirs are known. Detect
854 duplicate sources/units in the same project when the order of the
855 source dirs are not known.
856 (Check_Ada_Name): Allow all identifiers that are not reserved words
858 Major update of the Project Manager and of the project aware tools,
859 including gprmake, so that the same sources in the GNAT repository
860 can be used by gprbuild.
861 (Look_For_Sources): If the list of sources is empty, set the object
862 directory of non extending project to nil.
863 Change type of path name variables to be Path_Name_Type
864 (Locate_Directory): Make sure that on Windows '/' is converted to '\',
865 otherwise creating missing directories will fail.
867 * prj-attr-pm.adb, prj-tree.ads, prj-proc.ads, prj-proc.adb,
868 prj-part.ads, prj-part.adb:
869 Major update of the Project Manager and of the project aware tools,
870 including gprmake, so that the same sources in the GNAT repository
871 can be used by gprbuild.
873 * prj-strt.adb (Prj.Strt.Attribute_Reference): Set correctly the case
874 insensitive flag for attributes with optional index.
875 (Prj.Dect.Parse_Attribute_Declaration): For case insensitive associative
876 array attribute, put the index in lower case.
877 (Parse_Variable_Reference): Allow the current project name to be used in
878 the prefix of an attribute reference.
880 * prj-util.ads, prj-util.adb
881 (Value_Of (for arrays)): New Boolean parameter Force_Lower_Case_Index,
882 defaulted to False. When True, always check against indexes in lower
885 * snames.ads, snames.h, snames.adb:
886 Update Project Manager to new attribute names for gprbuild
887 Allow all valid declarations in configuration project files
889 2007-08-14 Robert Dewar <dewar@adacore.com>
890 Ed Schonberg <schonberg@adacore.com>
892 * opt.ads: Warning for non-local exception propagation now off by
894 New switch -gnatI to disable representation clauses
895 Implement new pragma Implicit_Packing
898 Warning for non-local exception propagation now off by default
899 Add warning for unchecked conversion of pointers wi different
901 New switch -gnatI to disable representation clauses
903 * usage.adb: new switch -gnatyS
905 * gnat_ugn.texi: For the gnatcheck Non_Qualified_Aggregates rule add a
906 note that aggregates of anonymous array types are not flagged.
907 -gnatwc now includes membership tests optimized away
908 -gnatw.x warnings are now off by default
909 Added conditional compilation Appendix
910 Add documentation of -gnatI
911 Add documentation for new -gnatyS style check
912 Update documentation about SAL and auto-init on Windows.
915 Add documentation for pragma Check_Name and 'Enabled attribute
916 Document that Eliminate on dispatching operation is ignored
917 Document IDE attributes VCS_Repository_Root and VCS_Patch_Root.
919 Document pragma Implicit_Packing
921 * sem_ch13.adb: Add warning for unchecked conversion of pointers wi
922 different conventions
923 New switch -gnatI to disable representation clauses
925 * switch-c.adb (Scan_Front_End_Switches): When a -gnat switch is not
926 recognized, report the invalid characters including "-gnat" instead of
927 just the first character in the switch.
928 New switch -gnatI to disable representation clauses
929 Set Warn_On_Object_Renames_Function true for -gnatg
931 * vms_data.ads: Add doc for /IGNORE_REP_CLAUSES
932 Add STATEMENTS_AFTER_THEN_ELSE as synonym for -gnatyS
933 Add qualifier /ADD_PROJECT_SEARCH_DIR= for different tools, equivalent
934 to switch -aP (add directory to project search dir).
936 * par-prag.adb: Implement new pragma Implicit_Packing
938 * sem_prag.adb (Analyze_Pragma, case Complex_Representation): Mark the
939 type as having a non-standard representation, to force expansion on
940 conversion to related types.
941 (Analyze_Pragma): Warn on misspelled pragma
942 (Analyze_Pragma, case Convention_Identifier): Fix checking of second arg
943 Ensure consistent use of # in error messages
944 Implement pragma Implicit_Packing
946 2007-08-14 Olivier Hainque <hainque@adacore.com>
947 Eric Botcazou <ebotcazou@adacore.com>
949 * targtyps.c (get_target_maximum_default_alignment): New function.
951 that the compiler might choose by default for a type or object.
952 (get_target_default_allocator_alignment): New function. Alignment known
953 to be honored by the target default allocator.
954 (get_target_maximum_allowed_alignment): New function. Maximum alignment
955 we might accept for any type or object on the target.
956 (get_target_maximum_alignment): Now synonym of maximum_default_alignment
958 * gigi.h (get_target_maximum_default_alignment): Declare new function.
959 (get_target_default_allocator_alignment): Likewise.
960 (get_target_maximum_allowed_alignment): Likewise.
963 * decl.c (gnat_to_gnu_entity) <object>: Except for the renaming of the
964 result of a function call, first try to use a stabilized reference for
965 a constant renaming too.
966 (validate_alignment): Use target_maximum_allowed_alignment instead of
967 MAX_OFILE_ALIGNMENT as the upper bound to what we accept.
968 (gnat_to_gnu_entity): Use common nodes directly.
969 (gnat_to_gnu_entity) <object>: Pick the values of the type to annotate
970 alignment and size for the object.
971 (lvalue_required_p): Handle N_Parameter_Association like N_Function_Call
972 and N_Procedure_Call_Statement.
973 (takes_address): Rename to lvalue_required_p, add third parameter
974 'aliased' and adjust recursive calls.
975 <N_Indexed_Component>: Update 'aliased' from the array type.
976 <N_Selected_Component>: New case.
977 <N_Object_Renaming_Declaration>: New Likewise.
978 (Identifier_to_gnu): Adjust for above changes.
979 (maybe_stabilize_reference) <CONST_DECL>: New case.
981 * utils2.c (build_binary_op) <ARRAY_RANGE_REF>: Look through conversion
982 between type variants.
983 (build_simple_component_ref): Likewise.
984 (build_call_alloc_dealloc): Use target_default_allocator_alignment
985 instead of BIGGEST_ALIGNMENT as the threshold to trigger the super
986 aligning type circuitry for allocations from the default storage pool.
987 (build_allocator): Likewise.
988 (build_simple_component_ref): Manually fold the reference for a
989 constructor if the record type contains a template.
991 * utils.c (value_zerop): Delete.
992 (gnat_init_decl_processing): Emit debug info for common types.
993 (rest_of_record_type_compilation): If a union contains a field
994 with a non-constant qualifier, treat it as variable-sized.
995 (finish_record_type): Give the stub TYPE_DECL a name.
996 (rest_of_record_type_compilation): Likewise.
997 (convert) <CONSTRUCTOR>: New case. Build a new constructor if
998 types are equivalent array types.
999 (create_field_decl): Claim fields of any ARRAY_TYPE are addressable,
1000 even if the type is not passed by reference.
1001 (static_ctors, static_dtors): Delete.
1002 (end_subprog_body): Do not record constructors and destructors.
1003 (build_global_cdtor): Delete.
1004 (gnat_write_global_declarations): Do not call build_global_cdtor.
1006 * lang-specs.h: If TARGET_VXWORKS_RTP is defined, append -mrtp when
1007 -fRTS=rtp is specified.
1008 If CONFIG_DUAL_EXCEPTIONS is 1, append -fsjlj when -fRTS=sjlj is
1011 * misc.c (gnat_init_gcc_eh): Use __gnat_eh_personality_sj for the name
1012 of the personality function with SJLJ exceptions.
1014 * raise-gcc.c (PERSONALITY_FUNCTION): Use __gnat_eh_personality_sj for
1015 the name of the personality function with SJLJ exceptions.
1017 2007-08-14 Robert Dewar <dewar@adacore.com>
1018 Ed Schonberg <schonberg@adacore.com>
1020 * par.ads, par.adb: Improve handling of extra right parens.
1021 (Par): Remove flag From_Limited_With_Clause.
1023 * par-util.adb, par-ch3.adb: Improve error recovery for bad constraint
1024 Improve handling of extra right parens.
1026 2007-08-14 Robert Dewar <dewar@adacore.com>
1028 * par-tchk.adb (TF_Semicolon): Improve error recovery
1030 2007-08-14 Robert Dewar <dewar@adacore.com>
1031 Ed Schonberg <schonberg@adacore.com>
1033 * sem_attr.ads, sem_attr.adb (Analyze_Attribute, case Value): For
1034 enumeration type, mark all literals as referenced.
1035 (Eval_Attribute, case 'Image): If the argument is an enumeration
1036 literal and names are available, constant-fold but mark nevertheless as
1038 Clean up function names.
1039 (Name_Modifies_Prefix): Rename to Name_Implies_Lvalue_Prefix. Clarify
1041 (Requires_Simple_Name_Prefix): Removed.
1043 2007-08-14 Robert Dewar <dewar@adacore.com>
1044 Ed Schonberg <schonberg@adacore.com>
1046 * sem_ch11.adb: Improved warnings for unused variables
1048 * sem_ch3.ads, sem_ch3.adb (Build_Derived_Record_Type): If the ancestor
1049 is a synchronized interface, the derived type is limited.
1050 (Analyze_Object_Declaration): Mark the potential coextensions in the
1051 definition and expression of an object declaration node.
1052 (Build_Derived_Type): For the completion of a private type declaration
1053 with a derived type declaration, chain the parent type's representation
1054 items to the last representation item of the derived type (not the
1055 first one) if they are not present already.
1056 (Analyze_Object_Declaration, Constant_Redeclaration): Allow incomplete
1057 object declaration of forward references to tags.
1058 (Access_Subprogram_Declaration): In Ada2005, anonymous access to
1059 subprogram types can appear as access discriminants of synchronized
1061 (OK_For_Limited_Init_In_05): The initialization is legal is it is a call
1062 given in prefixed form as a selected component.
1063 (Process_Discriminants): If not all discriminants have defaults, place
1064 error message on a default that is present.
1065 (Analyze_Private_Extension_Declaration): Diagnose properly an attempt to
1066 extend a synchronized tagged type.
1067 Improved warnings for unused variables
1068 (Is_Visible_Component): Fix a visibility hole on a component inherited
1069 by a private extension when parent is itself declared as a private
1070 extension, and the derivation is in a child unit.
1071 (Find_Hidden_Interface): Move spec from the package body.
1073 2007-08-14 Robert Dewar <dewar@adacore.com>
1074 Ed Schonberg <schonberg@adacore.com>
1076 * sem_ch5.adb: Improve warnings on redundant assignments
1078 * sem_util.ads, sem_util.adb: (Is_Variable): Add defense against junk
1080 (Is_Synchronized_Tagged_Type): New subprogram that returns true
1081 in case of synchronized tagged types (AARM 3.9.4 (6/2)).
1082 (Safe_To_Capture_Value): Can now return True for constants, even if Cond
1083 is set to False. Improves handling of Known_[Not_]Null.
1084 (Wrong_Type): Special case address arithmetic attempt
1085 (Collect_Abstract_Interfaces): Add new formal to allow collecting
1086 abstract interfaces just using the partial view of private types.
1087 (Has_Abstract_Interfaces): Add new formal to allow checking types
1088 covering interfaces using the partial view of private types.
1089 (Is_Fully_Initialized_Type): Special VM case for uTag component. This
1090 component still needs to be defined in this case, but is never
1091 initialized as VMs are using other dispatching mechanisms.
1092 (Abstract_Interface_List): For a protected type, use base type to get
1094 Improve warnings on redundant assignments
1095 (Is_Variable): Handle properly an implicit dereference of a prefixed
1097 (Build_Actual_Subtype): If this is an actual subtype for an
1098 unconstrained formal parameter, use the sloc of the body for the new
1099 declaration, to prevent anomalises in the debugger.
1101 2007-08-14 Robert Dewar <dewar@adacore.com>
1103 * sem_elim.adb (Set_Eliminated): Ignore pragma Eliminate for
1104 dispatching operation
1106 2007-08-14 Ed Schonberg <schonberg@adacore.com>
1107 Gary Dismukes <dismukes@adacore.com>
1110 exp_aggr.adb (Convert_Aggr_In_Allocator): Use Insert_Actions to place
1111 expanded aggregate code before allocator, and ahead of declaration for
1112 temporary, to prevent access before elaboration when the allocator is
1113 an actual for an access parameter.
1114 (Is_Static_Dispatch_Table_Aggregate): Handle aggregates initializing
1115 the TSD and the table of interfaces.
1116 (Convert_To_Assignments): Augment the test for delaying aggregate
1117 expansion for limited return statements to include the case of extended
1118 returns, to prevent creation of an unwanted transient scope.
1119 (Is_Static_Dispatch_Table_Aggregate): New subprogram.
1120 (Expand_Array_Aggregate): Handle aggregates associated with
1121 statically allocated dispatch tables.
1122 (Expand_Record_Aggregate): Handle aggregates associated with
1123 statically allocated dispatch tables.
1124 (Gen_Ctrl_Actions_For_Aggr): Generate a finalization list for allocators
1125 of anonymous access type.
1127 2007-08-14 Ed Schonberg <schonberg@adacore.com>
1129 * exp_ch5.adb (Expand_Assign_Array): If source or target of assignment
1130 is a variable that renames a slice, use the variable itself in the
1131 expannsion when the renamed expression itself may be modified between
1132 the declaration of the renaming and the array assignment.
1134 2007-08-14 Jerome Guitton <guitton@adacore.com>
1136 * s-taprop-lynxos.adb, s-taprop-tru64.adb, s-taprop-irix.adb,
1137 s-taprop-hpux-dce.adb, s-taprop-dummy.adb, s-taprop-solaris.adb,
1138 s-taprop-vms.adb, s-taprop-posix.adb (Continue_Task, Stop_All_Tasks):
1139 New functions; dummy implementations.
1141 * s-osinte-vxworks.ads (Task_Stop, Task_Cont, Int_Lock, Int_Unlock): New
1142 functions, used to implement the multi-tasks mode routines on VxWorks.
1144 * s-osinte-vxworks.adb, s-osinte-vxworks6.adb (Task_Cont, Task_Stop):
1146 binding to the VxWorks routines which have changed between VxWorks 5
1148 (Int_Lock, Int_Unlock): New function, thin binding to kernel routines
1149 which are not callable from a RTP.
1151 * s-taprop-vxworks.adb (Stop_All_Tasks, Continue_Task): New functions,
1152 implemented for the multi-tasks mode on VxWorks 5 and 6.
1154 * s-taprop.ads (Stop_All_Tasks, Continue_Task): New functions.
1156 * s-tasdeb.ads, s-tasdeb.adb (Continue_All_Tasks, Stop_All_Tasks): New
1159 2007-08-14 Vincent Celier <celier@adacore.com>
1161 * clean.adb, fmap.adb, sinput-p.adb, sinput-p.ads, gnatcmd.adb,
1162 gnatname.adb, makeutl.ads, makeutl.adb, makegpr.adb, mlib-tgt-vms.adb
1163 mlib-tgt-darwin.adb, mlib-tgt-lynxos.adb, mlib-prj.adb, mlib-tgt.adb,
1164 mlib-tgt.ads, mlib-tgt-irix.adb mlib-tgt-hpux.adb, mlib-tgt-linux.adb,
1165 mlib-tgt-solaris.adb, mlib-tgt-vms-alpha.adb, mlib-tgt-vms-ia64.adb,
1166 mlib-tgt-mingw.adb, mlib-tgt-vxworks.adb, mlib-tgt-aix.adb,
1167 mlib-tgt-tru64.adb, mlib.ads, mlib.adb (Create_Sym_Links): New
1169 (Major_Id_Name): New function.
1170 mlib-tgt.ads/mlib.tgt.adb:
1171 (Library_Major_Minor_Id_Supported): New function, default returns True
1172 Most mlib-tgt-*.adb that support shared libraries and symbolic links:
1173 (Build_Dynamic_Library): Add support for major/minor ids for shared libs
1174 Other mlib-tgt-*.adb (aix, mingw, vms, vxworks, xi):
1175 Implementation of Library_Major_Minor_Id_Supported returns False
1177 (Clean_Library_Directory): If major/minor ids are supported, clean all
1179 Major update of the Project Manager and of the project aware tools,
1180 including gprmake, so that the same sources in the GNAT repository
1181 can be used by gprbuild.
1183 2007-08-14 Olivier Hainque <hainque@adacore.com>
1185 * system-solaris-x86.ads (ZCX_By_Default): Switch to True.
1186 (GCC_ZCX_Support): Switch to True.
1188 * s-intman-solaris.adb (Notify_Exception): Call
1189 Adjust_Context_For_Raise before raising, as expected for signal
1190 handlers in general.
1192 * s-intman-posix.adb (Notify_Exception): Remove declaration of
1193 Adjust_Context_For_Raise, moved to the spec of this unit to be visible
1194 to other implementation bodies.
1196 * s-intman.ads (Adjust_Context_For_Raise): Declare and import here, to
1197 be visible by multiple implementation bodies.
1199 * init.c [VMS section] (__gnat_handle_vms_condition): Adjust context
1200 only for conditions coming from hardware.
1201 [alpha-tru64 section] (__gnat_adjust_context_for_raise): Implement,
1202 adjustments to signal context prior to exception raise from signal
1204 (__gnat_map_signal for VxWorks): Map SIGSEGV to Storage_Error in RTP
1206 Solaris section: (__gnat_adjust_context_for_raise): New function.
1207 Implementation of the machine context adjustments to perform prior to
1208 raise from a signal handler. Version for both sparc and x86.
1209 (HAVE_GNAT_ADJUST_CONTEXT_FOR_RAISE): Define.
1210 (__gnat_error_handler): Expect a third argument, ucontext_t *. Adjust it
1211 prior to raising as expected for any handler, before possible nested
1212 faults to make sure all the contexts in a chain have been adjusted by
1213 the time we propagate.
1215 2007-08-14 Pascal Obry <obry@adacore.com>
1217 * s-osinte-mingw.ads: Add support for Ada.Execution_Time on Windows.
1218 (SYSTEM_INFO): New record.
1219 (SetThreadIdealProcessor): New imported routine needed for supporting
1220 task_info pragma on Windows.
1222 * s-taprop-mingw.adb (Enter_Task): Check if CPU number given in task
1223 info can be applied to the current host.
1224 (Create_Task): Set the ideal processor if information is present.
1226 * s-tasinf-mingw.adb, s-tasinf-mingw.ads,
1227 a-exetim-mingw.adb, a-exetim-mingw.ads: New files.
1229 2007-08-14 Olivier Hainque <hainque@adacore.com>
1231 * s-taprop-linux.adb (Get_Stack_Attributes): New subprogram. Fetch the
1232 stack size and initial stack pointer value for a given task.
1233 (Enter_Task): Get the stack attributes of the task we are entering and
1234 let the stack checking engine know about them.
1236 * s-stchop.adb, s-stchop.ads (Notify_Stack_Attributes): New subprogram.
1237 Let the stack-checking engine know about the initial sp value and stack
1238 size associated with the current task.
1239 (Set_Stack_Info): If a stack base has been notified for the current
1240 task, honor it. Fallback to the previous less accurate method otherwise.
1242 * s-stchop-vxworks.adb (Notify_Stack_Attributes): Dummy body.
1244 2007-08-14 Ed Schonberg <schonberg@adacore.com>
1246 * sem_ch10.adb: Create a limited view of an incomplete type, to make
1247 treatment of limited views uniform for all visible declarations in a
1248 limited_withed package.
1249 Set flag indicating that a subprogram body for a child unit has a
1251 (Analyze_Compilation_Unit): If unit is a subprogram body that has no
1252 separate declaration, remove the unit name from visibility after
1253 compilation, so that environment is clean for subsequent compilations.
1254 (Install_Limited_Context_Clauses): Do not install a
1255 limited_private_with_clause unless the current unit is a body or a
1257 (Analyze_Subunit, Install_Parents): Treat generic and non-generic units
1258 in the same fashion.
1259 (Install_Limited_Withed_Unit): Do not install a limited with clause if
1260 it applies to the declaration of the current package body.
1261 (Remove_Private_With_Clauses): If there is a regular with_clause for
1262 the unit, delete Private_With_Clause from context, to prevent improper
1263 hiding when processing subsequent nested packages and instantiations.
1265 2007-08-14 Jose Ruiz <ruiz@adacore.com>
1267 * adaint.c (__gnat_is_absolute_path): For VxWorks systems we accept
1268 dir/file, device:/dir/file, and device:drive_letter:/dir/file as
1269 representing absolute path names.
1270 __gnat_set_file_time_name [VMS]: Fix some 64/32 bit issues.
1272 * cstreams.c (__gnat_full_name for VxWorks): Use
1273 __gnat_is_absolute_path to detect whether we need to add the current
1274 directory to normalize the path.
1276 2007-08-14 Javier Miranda <miranda@adacore.com>
1279 a-tags.adb (Displace): Associate a message with the raised CE
1281 (To_Addr_Ptr, To_Address, To_Dispatch_Table_Ptr,
1282 To_Object_Specific_Data_Ptr To_Predef_Prims_Ptr,
1283 To_Tag_Ptr, To_Type_Specific_Data_Ptr): Moved here from the package
1285 (Default_Prim_Op_Count): Removed.
1286 (IW_Membership, Get_Entry_Index, Get_Offset_Index, Get_Prim_Op_Kind,
1287 Register_Tag, Set_Entry_Index, Set_Offset_To_Top, Set_Prim_Op_Kind):
1288 Remove pragma Inline_Always.
1290 * rtsfind.ads (Default_Prim_Op_Count): Removed
1291 (Max_Predef_Prims): New entity
1292 (RE_Expanded_Name): Removed
1293 (RE_HT_Link): Removed
1294 (RE_Iface_Tag): Remmoved
1295 (RE_Ifaces_Table): Removed
1296 (RE_Interfaces_Array): Removed
1297 (RE_Interface_Data_Element): Removed
1298 (RE_Nb_Ifaces): Removed
1299 (RE_RC_Offset): Removed
1300 (RE_Static_Offset_To_Top): Removed
1302 * exp_atag.ads, exp_atag.adb (Build_Inherit_Prims): Addition of a new
1304 (Build_Inherit_Predefined_Prims): Replace occurrences of Default_
1305 Prim_Op_Count by Max_Predef_Prims.
1307 2007-08-14 Thomas Quinot <quinot@adacore.com>
1308 Vincent Celier <celier@adacore.com>
1310 * binde.adb (Elab_All_Links): Remove unnecessary call to
1311 Generic_Separately_Compiled (if a unit satisfies this predicate, there
1312 won't be an associated Afile).
1313 (Elab_All_Links): Fail if a referenced unit cannot be found
1316 Fix comments in bindgen regarding consistency checks done in Bcheck:
1317 the checks are made across units within a partition, not across several
1319 Fix generation of C binder file for VxWorks.
1321 * lib.ads, lib.adb (Generic_Separately_Compiled): Rename to
1322 Generic_May_Lack_ALI, more descriptive of the current use of the
1323 predicate, and update documentation.
1325 * lib-writ.ads, lib-writ.adb (Write_With_Lines): Minor code
1326 reorganization and documentation update for the case of predefined
1327 library generics (for which we do not reference an Afile).
1329 2007-08-14 Robert Dewar <dewar@adacore.com>
1331 * s-intman-irix.adb, s-osinte-irix.adb, s-osinte-irix.ads,
1332 s-proinf-irix-athread.ads, s-osinte-hpux-dce.adb, s-osinte-hpux-dce.ads,
1333 s-parame-hpux.ads, s-intman-dummy.adb, s-tasinf-solaris.adb,
1334 s-tasinf-solaris.ads, s-asthan-vms-alpha.adb, s-inmaop-vms.adb,
1335 s-intman-vms.adb, s-intman-vms.ads, s-osprim-mingw.adb,
1336 s-parame-vms-restrict.ads, s-parame-ae653.ads, s-intman-vxworks.ads,
1337 s-intman-vxworks.ads, s-intman-vxworks.adb, s-parame-vxworks.ads,
1338 s-tfsetr-vxworks.adb, s-interr.adb, s-interr.ads, a-tasatt.adb,
1339 exp_ch13.adb, s-htable.ads, s-imgboo.ads, s-imglli.ads, s-imgllu.ads,
1340 s-imguns.ads, g-eacodu.adb, par-ch12.adb, s-stache.ads, s-stausa.adb,
1341 s-poosiz.adb, s-parame.ads, s-mastop.ads, s-osinte-darwin.ads,
1342 a-chtgke.adb, s-asthan-vms-alpha.adb, s-parame-vms-alpha.ads,
1343 s-parame-vms-ia64.ads, s-parame-vxworks.adb, s-except.ads,
1344 g-altcon.adb: Minor reformatting
1346 ada-tree.h: Delete empty line.
1348 ali.ads: Minor reformatting
1349 Clarification of comments.
1350 Minor spelling correction
1352 * exp_dbug.adb: Add Warnings Off to suppress new warning
1354 * a-witeio.adb (Write): Add Warnings (Off) for unneeded IN OUT mode
1357 * a-strunb.adb (Set_Unbounded_String): Avoid memory leak by freeing old
1360 * a-textio.adb (Write): Remove an unnecessary IN OUT mode from
1362 * a-textio.ads: Reorder the standard input/output/error declarations
1365 * g-dirope.adb, g-dirope.ads: Change Dir to mode IN for Open call
1367 * par-ch2.adb: Recognize RM specially in errout
1368 Change 'R'M to RM in all error messages
1370 * scng.adb: Recognize RM specially in errout
1372 * sem.ads, sem.adb, exp_strm.adb, exp_ch5.ads, expander.adb: Rename
1373 N_Return node to be N_Simple_Return, to reflect Ada 2005 terminology.
1375 * s-direio.adb: Add missing routine header box.
1377 * sem_attr.ads: Add ??? comments
1379 * sem_eval.adb: Recognize RM specially in errout
1380 Change 'R'M to RM in all error messages
1382 * sem_maps.adb, sem_maps.ads: Remove some unnecessary IN OUT modes
1384 * s-tasinf.ads: Fix minor comment typo.
1386 * a-cihama.adb: Minor comment addition
1388 * a-ztexio.adb (Write): Add Warnings (Off) for unneeded IN OUT mode
1391 * s-tasinf-tru64.ads: Fix minor comment typo.
1393 * itypes.ads: Comment update.
1395 * ali-util.adb: Remove Generic_Separately_Compiled guard, not needed
1398 * argv.c: Added protection against null gnat_argv and gnat_envp.
1400 * bcheck.adb (Check_Consistency): Use correct markup character ({) in
1401 warning message when Tolerate_Consistency_Errors is True.
1403 * cstand.adb (Create_Standard): Do not call Init_Size_Alignment for
1404 Any_Id, as this subprogram is only applicable to *type* entities (it
1405 sets RM_Size). Instead initialize just Esize and Alignment.
1407 2007-08-14 Bob Duff <duff@adacore.com>
1409 * a-cihama.ads, a-cidlli.ads, a-chtgop.ads, a-chtgop.adb, a-cdlili.ads,
1410 a-cihase.adb, a-cihase.ads, a-cohase.adb, a-cohase.ads, a-ciorma.ads,
1411 a-coorma.ads, a-ciormu.ads, a-coormu.ads, a-ciorse.ads, a-cohama.ads,
1412 a-cohata.ads, a-convec.adb, a-coinve.ads, a-coinve.adb, a-convec.ads,
1413 a-coorse.ads (Next): Applied pragma Inline.
1414 Make all Containers packages Remote_Types (unless they are already
1416 (Previous): applied pragma Inline
1417 (Elements_Type): is now a record instead of an array
1419 2007-08-14 Thomas Quinot <quinot@adacore.com>
1421 * table.adb, g-table.adb, g-dyntab.adb (Append): Reimplement in terms
1423 (Set_Item): When the new item is an element of the currently allocated
1424 table passed by reference, save a copy on the stack if we're going
1425 to reallocate. Also, in Table.Set_Item, make sure we test the proper
1426 variable to determine whether to call Set_Last.
1428 * sinput-d.adb, sinput-l.adb, stringt.adb, switch-m.adb,
1429 symbols-vms.adb, symbols-processing-vms-alpha.adb,
1430 symbols-processing-vms-ia64.adb, sem_elab.adb, repinfo.adb: Replace
1431 some occurrences of the pattern
1433 T.Table (T.Last) := Value;
1434 with a cleaner call to
1437 2007-08-14 Ed Schonberg <schonberg@adacore.com>
1438 Gary Dismukes <dismukes@adacore.com>
1439 Thomas Quinot <quinot@adacore.com>
1441 * sem_ch12.ads, sem_ch12.adb (Instantiate_Type): If the formal is a
1442 derived type with interface progenitors use the analyzed formal as the
1443 parent of the actual, to create renamings for all the inherited
1444 operations in Derive_Subprograms.
1445 (Collect_Previous_Instances): new procedure within of
1446 Load_Parent_Of_Generic, to instantiate all bodies in the compilation
1447 unit being loaded, to ensure that the generation of global symbols is
1448 consistent in different compilation modes.
1449 (Is_Tagged_Ancestor): New function testing the ancestor relation that
1450 takes progenitor types into account.
1451 (Validate_Derived_Type_Instance): Enforce the rule of 3.9.3(9) by
1452 traversing over the primitives of the formal and actual types to locate
1453 any abstract subprograms of the actual type that correspond to a
1454 nonabstract subprogram of the formal type's ancestor type(s), and issue
1455 an error if such is found.
1456 (Analyze_Package_Instantiation, Analyze_Subprogram_Instantiation,
1457 Instantiate_Package_Body, Instantiate_Subprogram_Body):
1458 Remove bogus guard around calls to Inherit_Context.
1459 (Reset_Entity): If the entity is the selector of a selected component
1460 that denotes a named number, propagate constant-folding to the generic
1461 template only if the named number is global to the generic unit.
1462 (Set_Instance_Env): Only reset the compilation switches when compiling
1463 a predefined or internal unit.
1465 2007-08-14 Ed Schonberg <schonberg@adacore.com>
1467 * sem_ch4.adb (Try_Class_Wide_Operation): use base type of first
1468 parameter to determine whether operation applies to the prefix.
1469 (Complete_Object_Operation): If actual has an access type and
1470 controlling formal is not an in_parameter, reject the actual if it is
1471 an access_to_constant type.
1472 (Try_Primitive_Operation): If the type of the prefix is a formal tagged
1473 type, the candidate operations are found in the scope of declaration of
1474 the type, because the type has no primitive subprograms.
1475 (Analyze_Selected_Component): If prefix is class-wide, and root type is
1476 a private extension, only examine visible components before trying to
1477 analyze as a prefixed call.
1478 Change Entity_List to Type_To_Use, for better readability.
1479 (Has_Fixed_Op): Use base type when checking whether the type of an
1480 operator has a user-defined multiplication/division
1481 (Check_Arithmetic_Pair): Use Ada 2005 rules to remove ambiguities when
1482 user-defined operators are available for fixed-point types.
1484 2007-08-14 Thomas Quinot <quinot@adacore.com>
1485 Ed Schonberg <schonberg@adacore.com>
1487 * sem_cat.ads, sem_cat.adb (Has_Stream_Attribute_Definition): New
1488 formal At_Any_Place indicating, when True, that we want to test for
1489 availability of the stream attribute at any place (as opposed to the
1490 current visibility context only).
1491 (Missing_Read_Write_Attributes): A stream attribute is missing for the
1492 purpose of enforcing E.2.2(8) only if it is not available at any place.
1493 Take into account the Ada2005 pragma Has_Preelaborable_Initialization
1494 when checking the legality of an extension aggregate in a preelaborable
1495 package. Treat the literal null as a valid default expression in a
1496 component declaration for a type with preelaborable initialization.
1497 A limited interface is a legal progenitor for the designated type of a
1498 remote access to class-wide type.
1500 2007-08-14 Thomas Quinot <quinot@adacore.com>
1501 Ed Schonberg <schonberg@adacore.com>
1503 * sem_ch8.ads, sem_ch8.adb (Find_Type, case of a 'Base attribute
1504 reference): Use correct entity as denoted entity for the selector of
1506 (Find_Direct_Name): Add comment about Generate_Reference incorrectly
1507 setting the Referenced_As_LHS flag for entities that are implicitly
1509 (Find_Type): If the type is an internally generated incomplete type,
1510 mark the full view as referenced, to prevent spurious warnings.
1511 (Find_Selected_Component, Has_Components): Handle properly non-limited
1512 views that are themselves incomplete types.
1513 Handle interfaces visible through limited-with clauses.
1514 (Analyze_Subprogram_Renaming): Disambiguate and set the entity of a
1515 subprogram generic actual for which we have generated a renaming.
1516 Warn when the renaming introduces a homonym of
1517 the renamed entity, and the renamed entity is directly visible.
1519 2007-08-14 Ed Schonberg <schonberg@adacore.com>
1520 Hristian Kirtchev <kirtchev@adacore.com>
1522 * sem_res.adb (Resolve_Allocator): Propagate any coextensions that
1523 appear in the subtree to the current allocator if it is not a static
1525 (Resolve_Allocator): Perform cleanup if resolution has determined that
1526 the allocator is not a coextension.
1527 (Resolve): Skip an interpretation hidden by an abstract operator only
1528 when the type of the interpretation matches that of the context.
1529 (Resolve): When looping through all possible interpretations of a node,
1530 do not consider those that are hidden by abstract operators.
1531 (Resolve_Actuals): When verifying that an access to class-wide object
1532 is an actual for a controlling formal, ignore anonymous access to
1533 subprograms whose return type is an access to class_wide type.
1534 (Resolve_Slice): If the prefix of the slice is a selected component
1535 whose type depends on discriminants, build its actual subtype before
1536 applying range checks on the bounds of the slice.
1537 (Valid_Conversion): In an instance or inlined body, compare root types,
1538 to prevent anomalies between private and public views.
1539 (Resolve): Improve error message for ambiguous fixed multiplication
1540 expressions that involve universal_fixed multiplying operations.
1542 2007-08-14 Javier Miranda <miranda@adacore.com>
1543 Hristian Kirtchev <kirtchev@adacore.com>
1545 * exp_ch9.adb (Build_Protected_Entry): Propagate the original source
1546 location to allow the correct generation of errors in case of
1547 restrictions applied to the expanded code.
1548 (Expand_Entry_Barrier): Remove all generated renamings for a barrier
1549 function if the condition does not reference them.
1550 (Expand_Entry_Body_Declarations): Mark the index constant as having a
1553 2007-08-14 Thomas Quinot <quinot@adacore.com>
1555 * exp_dist.adb (PolyORB_Support.Build_TypeCode_Function): When creating
1556 typecode parameters for a union (in a variant record), remove
1557 extraneous layer of Any wrapping for member label.
1558 (Expand_Receiving_Stubs_Bodies): For an RCI package body that has
1559 elabration statements, register the package with the name server
1560 at the beginning, not at the end, of the elaboration statements so
1561 that they can create remote access to subprogram values that designate
1562 remote subprograms from the package.
1564 2007-08-14 Hristian Kirtchev <kirtchev@adacore.com>
1566 * g-catiio.adb (Image): For the case of %s, use Ada.Calendar.Time
1567 values to compute the number of seconds since the Unix Epoc in order to
1568 account for Daylight Savings Time. Perform special processing for dates
1569 that are earlier than the Unix Epoc to obtain a negative number.
1571 2007-08-14 Emmanuel Briot <briot@adacore.com>
1573 * g-comlin.adb (Getopt): Fix handling of "*" switch when not collapsing
1576 2007-08-14 Eric Botcazou <ebotcazou@adacore.com>
1578 * gnatlink.adb (Gnatlink): Pass switches to the linker even if the
1579 binder-generated file is not in Ada.
1580 Pass -mrtp to the linker if it is GCC and --RTS=rtp has been
1581 recorded in the ALI file.
1582 Pass -fsjlj to the linker if it is GCC and --RTS=sjlj has been recorded.
1584 2007-08-14 Vincent Celier <celier@adacore.com>
1586 * gnatls.adb: (Corresponding_Sdep_Entry): Always return a value
1587 (Output_Source): Do nothing if parameter is No_Sdep_Id
1589 * make.adb (Gnatmake): Do not rebuild an archive simply because a
1590 shared library it imports has a later time stamp.
1591 (Check): Resolve the symbolic links in the path name of the object
1593 Check that the ALI file is in the correct object directory
1594 Check if a file name does not correspond to the mapping of units
1596 (Display_Version): New procedure
1597 (Initialize): Process switches --version and --help
1598 Use type Path_Name_Type for path name
1600 2007-08-14 Paul Hilfinger <hilfinger@adacore.com>
1602 * impunit.adb: Re-organize System.Random_Numbers and
1603 GNAT.Random_Numbers and add to builds.
1605 * Makefile.rtl: Add s-rannum.ad* and g-rannum.ad*, a-assert*
1607 * s-rannum.ads, s-rannum.adb, g-rannum.ads, g-rannum.adb: New files.
1609 * a-assert.ads, a-assert.adb: New files.
1611 2007-08-14 Gary Dismukes <dismukes@adacore.com>
1613 * layout.adb (Layout_Type): In the case of access-to-subprogram types,
1614 if AAMP_On_Target is True, then the size of the type encompasses two
1615 addresses (a static link and a subprogram address), except in the case
1616 of library-level access types.
1618 2007-08-14 Vincent Celier <celier@adacore.com>
1620 * output.ads, output.adb (Write_Eol): Remove trailing spaces before
1622 (Write_Eol_Keep_Blanks): New procedure to write a line, including
1623 possible trailing spaces.
1624 (Output_Source_Line): Call Write_Eol_Keep_Blanks to output a source line
1626 2007-08-14 Javier Miranda <miranda@adacore.com>
1628 * par-ch6.adb (P_Formal_Part): Fix wrong error message associated with
1629 null-excluding access types.
1631 2007-08-14 Javier Miranda <miranda@adacore.com>
1633 * sem_ch9.adb (Check_Interfaces): New subprogram that factorizes code
1634 that is common to Analyze_Protected_Type and Analyze_Task_Type. In case
1635 of private types add missing check on matching interfaces in the
1636 partial and full declarations.
1637 (Analyze_Protected_Type): Code cleanup.
1638 (Analyze_Task_Type): Code cleanup.
1640 2007-08-14 Javier Miranda <miranda@adacore.com>
1642 * sem_disp.adb (Check_Dispatching_Operation): Do not emit warning on a
1643 generated interface thunk.
1645 2007-08-14 Ed Schonberg <schonberg@adacore.com>
1647 * s-ficobl.ads: Declare AFCB as a tagged incomplete type, to prevent
1648 obsolescent warning on application of 'Class to an incomplete type.
1650 * s-finroo.ads: Declare Root_Controlled as a tagged incomplete type, to
1651 prevent obsolescent warning on application of 'Class to an incomplete
1654 2007-08-14 Pascal Obry <obry@adacore.com>
1656 * s-fileio.adb (Is_Open): Add check for usability of the underlying
1659 2007-08-14 Cyrille Comar <comar@adacore.com>
1661 * s-finimp.adb (Detach_From_Final_List): make this procedure idempotent
1662 since it is potentially used in cases implying double finalization of
1665 2007-08-14 Jose Ruiz <ruiz@adacore.com>
1667 * s-tasini.adb (Get_Stack_Info): Move this function to
1668 System.Soft_Links.Tasking because it is common to the full and the
1669 restricted run times.
1670 (Init_RTS): Do not set the Get_Stack_Info soft link because it is done
1671 in SSL.Tasking.Init_Tasking_Soft_Links.
1673 * s-solita.adb (Get_Stack_Info): Function moved from
1674 System.Tasking.Initialization because it is common to the full and the
1675 restricted run times.
1676 (Init_Tasking_Soft_Links): Set the tasking soft link for Get_Stack_Info.
1678 2007-08-14 Arnaud Charlet <charlet@adacore.com>
1680 * s-tpobop.ads, s-tpobop.adb, s-tasren.ads, s-tasren.adb,
1681 s-taskin.ads (Requeue_With_Abort): Rename field With_Abort.
1682 (PO_Do_Or_Queue, Task_Do_Or_Queue, Requeue_Call): Remove With_Abort
1685 * s-tassta.adb (Task_Wrapper): Increased value of the small overflow
1688 2007-08-14 Gary Dismukes <dismukes@adacore.com>
1690 * s-veboop.adb (SU): New named number initialized to
1691 System.Storage_Unit.
1692 (True_Val): The initialization expression is revised to use SU (=
1693 Storage_Unit) rather than assuming 8 for the component size of an
1694 unpacked Boolean array.
1696 2007-08-14 Tristan Gingold <gingold@adacore.com>
1698 * tracebak.c: Use tb-ivms.c on OpenVMS Itanium.
1700 * tb-ivms.c: New file.
1702 * g-trasym-vms-ia64.adb: Fixed for OpenVMS version 8.2
1704 2007-08-14 Geert Bosch <bosch@adacore.com>
1706 * i-forbla.ads, i-forbla.adb, a-ngcoar.adb, a-ngcoar.ads, i-forlap.ads,
1707 s-gearop.adb, s-gecobl.adb, s-gecobl.ads, s-gerela.adb, s-gerela.ads:
1708 Add required linker pragmas for automatically linking with the gnalasup
1709 linear algebra support library, and the systems math library.
1710 Rename cdot to cdotu and zdot to zdotu.
1711 Update header comment to describe purpose of package.
1713 2007-08-14 Thomas Quinot <quinot@adacore.com>
1715 * exp_ch7.adb (Find_Final_List): For an anonymous access type that has
1716 an explicitly specified Associated_Final_Chain, use that list.
1717 (Expand_N_Package_Body): Build dispatch tables of library level tagged
1719 (Expand_N_Package_Declaration): Build dispatch tables of library level
1720 tagged types. Minor code cleanup.
1722 2007-08-14 Vincent Celier <celier@adacore.com>
1724 * gnatchop.adb (Terminate_Program): Remove exception and use
1725 Types.Terminate_Program instead.
1727 * osint.ads, osint.adb (Current_Exit_Status): New global variable
1728 (Find_Program_Name): Added protection against empty name.
1729 (OS_Exit_Through_Exception): New procedure
1731 * s-os_lib.ads, s-os_lib.adb (OS_Exit): New procedure body
1732 (OS_Exit_Default): New procedure that contains the previous
1733 implementation of procedure OS_Exit.
1734 (Final_Value): Remove obsolete Interix stuff.
1736 2007-08-14 Thomas Quinot <quinot@adacore.com>
1738 * g-socket.ads: Reorganize example code so that it also works on
1741 2007-08-14 Tristan Gingold <gingold@adacore.com>
1743 * g-trasym.ads: AIX now supports symbolic backtraces.
1745 2007-08-14 Ed Schonberg <schonberg@adacore.com>
1747 * lib-load.adb (From_Limited_With_Chain): Always scan the stack of
1748 units being loaded to detect circularities. A circularity may be
1749 present even if the current chain of pending units to load starts from
1750 a limited_with_clause.
1752 * lib-load.ads: Change profile of Load_Unit to use a with_clause
1753 rather than a boolean flag, in order to detect circularities in
1756 * par-load.adb: Use current with_clause in calls to Load_Unit, rather
1757 than propagating the From_Limited_With flag, in order to handle
1758 properly circularities involving with_clauses.
1760 2007-08-14 Nicolas Setton <setton@adacore.com>
1762 * link.c (FreeBSD): Add "const" keyword where needed, to eliminate
1765 2007-08-14 Arnaud Charlet <charlet@adacore.com>
1767 * Makefile.in: GNATRTL_LINEARALGEBRA_OBJS: New variable holding objects
1768 to build for libgnala.
1769 libgnat: Add rules to build libgnala.a
1770 (LIBGNAT_TARGET_PAIRS for VxWorks): Remove s-osinte-vxworks.adb from
1771 target pairs of the VxWorks 6 kernel runtime, use it only for VxWorks 5.
1772 Add s-osinte-vxworks-kernel.adb to the target pairs of the
1773 kernel run-time lib for VxWorks 6, which would provide a different
1774 implementation for Task_Cont and Task_Stop than the VxWorks 5 version.
1775 x86-solaris section (EH_MECHANISM): Set to -gcc, as this port is now
1776 running ZCX by default.
1777 Add g-sttsne-locking to LynxOS version.
1778 Remove g-sttsne-vxworks.ads; use g-sttsne-locking.ads instead.
1779 On x86/darwin, use a-numaux-x86.ad? and system-darwin-x86.ads.
1781 * system-darwin-x86.ads: New file.
1783 * Make-lang.in: Delete files before copying onto them, so if they are
1784 read-only, the copy won't fail.
1787 2007-08-14 Pascal Obry <obry@adacore.com>
1789 * mdll-fil.adb, * mdll.adb: Implement a more consistent libraries
1792 2007-08-14 Vincent Celier <celier@adacore.com>
1794 * mlib-utl.adb (Gcc_Name): Change from constant String to String_Access
1795 (Gcc): Initialize Gcc_Name at the first call
1797 2007-08-14 Ed Schonberg <schonberg@adacore.com>
1799 * sem_ch7.adb (Analyze_Package_Specification): Do not install private
1800 with_clauses of the enclosing unit when analyzing the package
1801 specification of a nested instance.
1803 2007-08-14 Hristian Kirtchev <kirtchev@adacore.com>
1805 * sinfo.ads, sinfo.adb (Is_Coextension, Set_Is_Coextension): Removed.
1806 (Is_Dynamic_Coextension, Set_Is_Dynamic_Coextension): New routines.
1807 Remove flag Is_Coextension. Add flag Is_Dynamic_Coextension. Update the
1808 layout of N_Allocator.
1810 2007-08-14 Thomas Quinot <quinot@adacore.com>
1812 * rtsfind.adb (Check_RPC): Add PCS version check.
1814 * gnatvsn.ads, gnatvsn.adb: Add PCS version.
1815 (Gnat_Free_Software): New function.
1817 * sem_dist.ads, sem_dist.adb (Get_PCS_Version): New subprogram. Returns
1818 the PCS_Version value from s-parint, used to check that it is consistent
1819 with what exp_dist expects.
1821 * s-parint.ads (PCS_Version): New entity for checking consistency
1822 between exp_dist and PCS.
1824 * gen-soccon.c: (SO_REUSEPORT): New constant.
1826 2007-08-14 Hristian Kirtchev <kirtchev@adacore.com>
1828 * a-calfor.adb (Image (Duration; Boolean)): Change type of local
1829 variable Sub_Second to Duration in order to accomodate a larger range
1830 of arithmetic operations.
1832 2007-08-14 Bob Duff <duff@adacore.com>
1834 * g-sttsne-locking.ads: Move comments from spec to body.
1835 * g-sttsne-locking.adb: Move comments from spec to body.
1836 * g-sttsne-vxworks.ads: Removed.
1837 * g-sttsne-vxworks.adb: Removed.
1839 2007-08-11 Ian Lance Taylor <iant@google.com>
1841 * misc.c (gnat_get_alias_set): Change return type to
1844 2007-08-11 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1846 * decl.c, utils2.c: Fix whitespace in last change.
1848 2007-08-11 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1850 * decl.c (compare_field_bitpos): Constify.
1851 * utils2.c (compare_elmt_bitpos): Likewise.
1853 2007-07-27 Aurelien Jarno <aurelien@aurel32.net>
1855 * s-osinte-kfreebsd-gnu.ads ((sigset_t_ptr): Removed, replaced by
1856 anonymous access type.
1857 (pthread_sigmask): Now take an access sigset_t.
1859 2007-07-05 Joel Sherrill <joel.sherrill@oarcorp.com>
1861 * s-osinte-rtems.ads: Correct prototype of pthread_sigmask.
1863 2007-06-21 Eric Botcazou <ebotcazou@adacore.com>
1865 PR tree-optimization/25737
1866 * misc.c (gnat_post_options): Do not force flag_tree_salias to 0.
1868 2007-06-15 Andrew Pinski <andrew_pinski@playstation.sony.com>
1870 * trans.c (Attribute_to_gnu): When subtracting an
1871 offset from a pointer, use POINTER_PLUS_EXPR with
1872 NEGATE_EXPR instead of MINUS_EXPR.
1873 (gnat_to_gnu): Likewise.
1874 * utils.c (convert): When converting between
1875 thin pointers, use POINTER_PLUS_EXPR and sizetype
1877 * utils2.c (known_alignment): POINTER_PLUS_EXPR
1878 have the same semantics as PLUS_EXPR for alignment.
1879 (build_binary_op): Add support for the semantics of
1880 POINTER_PLUS_EXPR's operands.
1881 When adding an offset to a pointer, use POINTER_PLUS_EXPR.
1883 2007-06-11 Rafael Avila de Espindola <espindola@google.com>
1885 * trans.c (Attribute_to_gnu): Use signed_or_unsigned_type_for instead
1886 of get_signed_or_unsigned_type.
1887 * misc.c (LANG_HOOKS_SIGNED_TYPE): Remove.
1889 2007-06-11 Bob Duff <duff@adacore.com>
1890 Thomas Quinot <quinot@adacore.com>
1892 * g-stsifd-sockets.adb (Create): Work around strange behavior of
1893 'bind' on windows that causes 'connect' to fail intermittently, by
1894 retrying the 'bind'.
1895 (GNAT.Sockets.Thin.Signalling_Fds): New procedure Close.
1897 2007-06-10 Duncan Sands <baldrick@free.fr>
1899 * decl.c (gnat_to_gnu_entity): Use pointers to dummy nodes, rather
1900 than to void, for the fields when making a new fat pointer type.
1901 (gnat_substitute_in_type): Now substitute_in_type.
1902 * gigi.h (gnat_substitute_in_type): Likewise. Adjust recursive calls.
1903 * trans.c (gnat_gimplify_expr): Remove COMPONENT_REF kludge.
1904 * utils.c (update_pointer_to): Update fat pointers by updating the
1905 dummy node pointers used for the fields.
1907 2007-06-06 Thomas Quinot <quinot@adacore.com>
1908 Bob Duff <duff@adacore.com>
1910 * g-soccon-freebsd.ads, g-soccon-vxworks.ads:,
1911 g-soccon-aix.ads, g-soccon-irix.ads, g-soccon-hpux.ads,
1912 g-soccon-solaris.ads, g-soccon-vms.ads, g-soccon-tru64.ads: Add new
1913 constant Thread_Blocking_IO, always True by default, set False
1914 on a per-runtime basis.
1915 (Need_Netdb_Buffer): New constant.
1917 * g-stheme.adb, g-sttsne.ads, g-sttsne-locking.ads,
1918 g-sttsne-locking.adb, g-sttsne-vxworks.ads, g-sttsne-vxworks.adb: New
1921 * g-socthi-vxworks.ads, g-socthi-vxworks.adb,
1922 g-socthi-vms.ads, g-socthi-vms.adb (Safe_Gethostbyname,
1923 Safe_Gethostbyaddr, Safe_Getservbyname, Safe_Getservbyport): Use new
1924 child package Task_Safe_NetDB
1925 (Host_Error_Messages): Add stub body.
1926 (GNAT.Sockets.Thin.Signalling_Fds): New procedure Close.
1928 * g-soccon-mingw.ads: Add Windows-specific constants.
1929 (Need_Netdb_Buffer): New constant.
1930 (GNAT.Sockets.Thin.C_Inet_Addr, Windows version): Remove useless Ada
1931 wrapper and import inet_addr(3) from the standard sockets library
1933 (In_Addr): Add alignment clause.
1934 (GNAT.Sockets.Thin.Signalling_Fds): New procedure Close.
1936 2007-06-06 Robert Dewar <dewar@adacore.com>
1938 * a-taster.adb, s-osinte-hpux.ads, s-osinte-solaris-posix.ads,
1939 s-osinte-irix.ads, s-interr-sigaction.adb, s-mastop-irix.adb,
1940 s-osinte-hpux-dce.ads, s-osinte-interix.ads, s-osinte-solaris.ads,
1941 s-taspri-solaris.ads, s-inmaop-vms.adb, s-interr-vms.adb,
1942 s-mastop-vms.adb, s-osinte-vms.ads, s-tpopde-vms.adb,
1943 s-osinte-mingw.ads, s-interr-vxworks.adb, i-cstrea-vms.adb,
1944 a-diocst.adb, a-direio.adb, a-interr.adb, a-sequio.adb, a-siocst.adb,
1945 a-ssicst.adb, a-storio.adb, a-ststio.adb, a-stwima.adb, a-tasatt.adb,
1946 a-taside.adb, a-tiocst.adb, a-witeio.adb, a-wtcstr.adb, g-crc32.adb,
1947 g-dirope.adb, g-dyntab.adb, g-memdum.adb, g-regexp.adb, g-spipat.adb,
1948 g-spitbo.adb, g-string.adb, g-string.ads, g-table.adb, g-thread.adb,
1949 i-cobol.adb, i-cpoint.adb, i-cstrea.adb, i-cstrin.adb, i-pacdec.adb,
1950 s-addima.adb, s-arit64.adb, s-auxdec.adb, s-auxdec.ads,
1951 s-auxdec-vms_64.ads, s-carsi8.adb, s-carun8.adb, s-casi16.adb,
1952 s-casi32.adb, s-casi64.adb, s-caun16.adb, s-caun32.adb, s-caun64.adb,
1953 s-direio.adb, s-fileio.adb, s-finimp.ads, s-geveop.adb, s-imgenu.adb,
1954 s-pack03.adb, s-pack05.adb, s-pack06.adb, s-pack07.adb, s-pack09.adb,
1955 s-pack10.adb, s-pack11.adb, s-pack12.adb, s-pack13.adb, s-pack14.adb,
1956 s-pack15.adb, s-pack17.adb, s-pack18.adb, s-pack19.adb, s-pack20.adb,
1957 s-pack21.adb, s-pack22.adb, s-pack23.adb, s-pack24.adb, s-pack25.adb,
1958 s-pack26.adb, s-pack27.adb, s-pack28.adb, s-pack29.adb, s-pack30.adb,
1959 s-pack31.adb, s-pack33.adb, s-pack34.adb, s-pack35.adb, s-pack36.adb,
1960 s-pack37.adb, s-pack38.adb, s-pack39.adb, s-pack40.adb, s-pack41.adb,
1961 s-pack42.adb, s-pack43.adb, s-pack44.adb, s-pack45.adb, s-pack46.adb,
1962 s-pack47.adb, s-pack48.adb, s-pack49.adb, s-pack50.adb, s-pack51.adb,
1963 s-pack52.adb, s-pack53.adb, s-pack54.adb, s-pack55.adb, s-pack56.adb,
1964 s-pack57.adb, s-pack58.adb, s-pack59.adb, s-pack60.adb, s-pack61.adb,
1965 s-pack62.adb, s-pack63.adb, s-pooloc.adb, s-poosiz.adb, s-scaval.adb,
1966 s-sequio.adb, s-shasto.adb, s-stalib.ads, s-stratt.adb, s-strcom.adb,
1967 s-taasde.adb, s-tasdeb.adb, s-tasuti.ads, s-tataat.ads, s-tpoben.ads,
1968 s-valenu.adb, s-widenu.adb, s-wwdenu.adb, s-addope.adb, a-stzmap.adb,
1969 a-ztcstr.adb, a-ztexio.adb, s-osinte-linux-hppa.ads: Replace
1970 Unchecked_* by Ada.Unchecked_*
1972 2007-06-06 Robert Dewar <dewar@adacore.com>
1974 * g-string.adb, s-proinf-irix-athread.adb, s-gloloc-mingw.adb,
1975 s-tfsetr-default.adb, gnatfind.adb, gnatxref.adb, gprep.adb,
1976 g-regexp.adb, g-regexp.ads, g-regpat.ads, g-tasloc.adb, g-tasloc.ads,
1977 output.adb, switch-m.ads, tree_in.ads, tree_io.ads, indepsw.ads,
1978 g-utf_32.adb, g-utf_32.ads, a-wichun.adb, a-wichun.ads, a-zchuni.adb,
1979 a-zchuni.ads: Replace GNAT.xxx by System.xxx when appropriate.
1981 * s-utf_32.adb, s-utf_32.ads, s-os_lib.adb, s-os_lib.ads, s-regexp.adb,
1982 s-regexp.ads, s-regpat.adb, s-regpat.ads, s-string.adb, s-string.ads,
1983 s-tasloc.adb, s-tasloc.ads: New files.
1985 2007-06-06 Bob Duff <duff@adacore.com>
1988 (Send_Signal, Close): Raise Invalid_Process if the process id is invalid.
1989 * g-expect.ads, g-expect.adb (Send): Avoid useless copy of the string.
1990 (Send_Signal, Close): Raise Invalid_Process if the process id is
1992 (Pattern_Matcher_Access): Is now a general access type to be able to
1995 2007-06-06 Thomas Quinot <quinot@adacore.com>
1996 Arnaud Charlet <charlet@adacore.com>
1998 * a-intnam-aix.ads: Adjust comment to account for SIGADAABORT change
1999 (SIGEMT is now used instead of SIGTERM on AIX).
2001 * s-osinte-aix.ads (Linker_Options): Use -pthread instead of -lpthreads.
2002 (Time_Slice_Supported): Set to True.
2003 Use SIGEMT instead of SIGTERM as SIGADAABORT.
2005 2007-06-06 Hristian Kirtchev <kirtchev@adacore.com>
2007 * a-calend.ads, a-calend.adb, a-calend-vms.ads, a-calend-vms.adb ("-"
2008 (Time, Time)): Use To_Relative_Time rather than manual calculation to
2009 express the bounds of Duration as Time. Raise Time_Error when the
2010 result is greater or equal to the higher bound of Duration (on the
2012 ("+" (Time, Duration)): Reorder code. Remove the declaration of constant
2014 ("-" (Time, Duration)): Reorder code. Remove the declaration of constant
2016 ("-" (Time, Time)): Reorder code.
2017 (All_Leap_Seconds): Removed.
2018 (Arithmetic_Operations.Add): Remove sign related kludge.
2019 (Arithmetic_Operations.Difference): Control the leaps seconds processing
2020 with flag Leap_Support.
2021 (Arithmetic_Operations.Subtract): Remove sign related kludge.
2022 (Check_Within_Time_Bounds): New procedure.
2023 (Clock): Control the leap seconds processing with flag Leap_Support.
2024 (Cumulative_Leap_Seconds): Assert that the target supports leap seconds.
2025 (Formatting_Operations.Split): Control the leap seconds processing with
2027 (Formatting_Operations.Time_Of): Control the leaps seconds processing
2028 with flag Leap_Support. Adjust the year, month and day (if applicable)
2029 when the value of day seconds designates a new day.
2030 (Split): Use parameter associations for better readability. Integrate
2032 (Time_Of): Use parameter associations for better readability. Integrate
2035 * a-calfor.adb (Split): Use parameter associations for better
2036 readability. Integrate flag Is_Ada_05.
2037 (Time_Of): Remove flag Leap_Checks. Use parameter associations for
2038 better readability. Integrate flag Is_Ada_05.
2040 2007-06-06 Arnaud Charlet <charlet@adacore.com>
2042 * s-taprop-vms.adb, s-taprop-hpux-dce.adb, s-taprop-vxworks.adb,
2043 s-osprim-posix.adb, s-taprop-posix.adb, s-osprim-vxworks.adb,
2044 s-taprop-solaris.adb, s-osprim-solaris.adb, s-taprop-dummy.adb,
2045 s-osprim-unix.adb, s-osinte-freebsd.adb, s-osinte-freebsd.ads,
2046 s-osinte-lynxos.adb, s-osinte-lynxos.ads, s-taprop-tru64.adb,
2047 s-taprop-lynxos.adb, s-taprop-irix.adb, s-osinte-tru64.adb,
2048 s-osinte-tru64.ads, s-taprop-linux.adb, s-parame.ads,
2049 s-parame-vms-alpha.ads, s-parame-vms-ia64.ads, s-parame-hpux.ads,
2050 s-parame-vms-restrict.ads, s-parame-ae653.ads, s-parame-vxworks.ads,
2051 s-taprop-mingw.adb, s-osinte-lynxos-3.ads, s-osinte-lynxos-3.adb,
2052 s-osprim-mingw.adb (Timed_Delay, Timed_Sleep): Register the base
2053 time when entering this routine to detect a backward clock setting
2054 (manual setting or DST adjustment), to avoid waiting for a longer delay
2056 (Time_Duration, To_Timeval, struct_timeval): Removed when not relevant.
2057 Remove handling of deferred priority change, and replace by setting the
2058 task priority directly, as required by AI-188.
2060 (Max_Task_Image_Length): New constant.
2061 Replace Warnings (Off) by Unreferenced pragma, cleaner.
2062 (Dynamic_Priority_Support): Removed, no longer needed.
2063 (Poll_Base_Priority_Change): Ditto.
2064 (Set_Ceiling): Add this procedure to change the ceiling priority
2065 associated to a lock. This is a dummy implementation because dynamic
2066 priority ceilings are not supported by the underlying system.
2068 * a-dynpri.adb (Set_Priority): Take into account case where Target is
2069 accepting a RV with its priority boosted.
2070 Remove handling of deferred priority change, and replace by setting the
2071 task priority directly, as required by AI-188.
2073 * s-taenca.adb (Try_To_Cancel_Entry_Call): Remove special case for
2075 Remove handling of deferred priority change, and replace by setting the
2076 task priority directly, as required by AI-188.
2077 (Wait_For_Completion, Wait_For_Call, Timed_Selective_Wait): Change state
2080 * s-tasini.ads, s-tasini.adb (Wakeup_Entry_Caller): Relax assertion.
2081 (Poll_Base_Priority_Change): Removed.
2082 Code clean up: use SSL.Current_Target_Exception.
2084 * s-tasren.adb (Task_Count): Call Yield to let a chance to other tasks
2085 to run as this is a potentially dispatching point.
2086 (Call_Synchronous): Use Local_Defer_Abort.
2087 (Callable): Relax assertion.
2088 (Selective_Wait): Relax assertion in case abort is not allowed.
2089 Remove handling of deferred priority change, and replace by setting the
2090 task priority directly, as required by AI-188.
2092 * s-tasuti.adb (Make_Passive): Adjust assertions.
2093 Remove handling of deferred priority change, and replace by setting the
2094 task priority directly, as required by AI-188.
2096 2007-06-06 Arnaud Charlet <charlet@adacore.com>
2098 * system-vxworks-sparcv9.ads, system-solaris-x86.ads,
2099 system-irix-o32.ads, system-freebsd-x86.ads, system-lynxos-ppc.ads,
2100 system-lynxos-x86.ads, system-vxworks-m68k.ads, system-linux-x86.ads,
2101 system-vxworks-mips.ads, system-vxworks-alpha.ads,
2102 system-vxworks-x86.ads, system-linux-ppc.ads, system-mingw.ads,
2103 system-vms-zcx.ads, system-darwin-ppc.ads, system-vxworks-ppc.ads,
2104 system-interix.ads, system-linux-hppa.ads, system-tru64.ads,
2105 system-hpux.ads, system-irix-n32.ads, system-solaris-sparc.ads,
2106 system-solaris-sparcv9.ads, system-vms.ads, system.ads,
2107 system-vms_64.ads, system-hpux-ia64.ads, system-linux-x86_64.ads,
2108 system-linux-ia64.ads: Document mapping between Ada and OS priorities.
2109 This patch changes the largest non-binary modulus from 2**31-1 to
2111 (Compiler_System_Version): Removed, no longer used.
2112 Clean up system files by removing flags only used on a single target.
2113 Also remove obsolete flags, only used during bootstrap from system.ads
2114 (Address): Add a pragma Preelaborable_Initialization.
2116 * system-aix.ads: Ditto.
2117 (GCC_ZCX_Support): Set to true.
2118 Update priority range on AIX and map Ada priorities to target
2119 priorities appropriately for different scheduling policies.
2121 * ttypes.ads: set largest non-binary modulus from 2**31-1 to 2**32-1
2123 2007-06-06 Vincent Celier <celier@adacore.com>
2125 * mlib-tgt-specific.adb, mlib-tgt-specific.ads,
2126 mlib-tgt-vms.adb, mlib-tgt-vms.ads: New files.
2128 * mlib-tgt.adb, mlib-tgt.ads, mlib-tgt-darwin.adb,
2129 mlib-tgt-vxworks.adb, mlib-tgt-mingw.adb, mlib-tgt-lynxos.adb,
2130 mlib-tgt-linux.adb, mlib-tgt-solaris.adb, mlib-tgt-vms-alpha.adb,
2131 mlib-tgt-vms-ia64.adb, mlib-tgt-aix.adb, mlib-tgt-irix.adb,
2132 mlib-tgt-hpux.adb, mlib-tgt-tru64.adb: Make a common body for package
2133 MLib.Tgt, containing the default versions of the exported subprograms.
2134 For each platform, create a specific version of the body of new child
2135 package MLib.Tgt.Specific that contains only the body of subprograms
2136 that are different from the default.
2137 (Archive_Builder_Append_Options): New function.
2139 2007-06-06 Matthew Gingell <gingell@adacore.com>
2141 * s-osinte-aix.adb: Map Ada priorities to target priorities
2142 appropriately for different scheduling policies.
2144 2007-06-06 Arnaud Charlet <charlet@adacore.com>
2146 * s-osinte-linux.ads (sigset_t): Bump alignment to match more closely
2148 Remove references to Unchecked_Conversion, and use Ada.xxx instead.
2149 Replace Unchecked_Conversion by Ada.Unchecked_Conversion.
2151 2007-06-06 Vasiliy Fofanov <fofanov@adacore.com>
2153 * s-osprim-vms.ads, s-osprim-vms.adb (Initialize): New procedure.
2154 Noop on VMS, added for interface commonality.
2156 2007-06-06 Eric Botcazou <ebotcazou@adacore.com>
2157 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
2158 Olivier Hainque <hainque@adacore.com>
2160 * decl.c (gnat_to_gnu_entity) <object>: Manually mark the top of the
2161 renamed expression of a full renaming at toplevel.
2162 (gnat_to_gnu_entity, case object): If not defining, do not look inside
2163 the values the constant is initialized to if it is an N_Allocator.
2164 (gnat_to_gnu_entity) <E_Array_Subtype>: Manually mark the top of the
2165 TYPE_SIZE_UNIT of inner types after the stride is elaborated.
2166 (make_aligning_type): Accept an extra ROOM argument for storage to be
2167 made available before the aligned field, and an extra BASE_ALIGN
2168 argument for callers to pass the alignment guaranteed to be honored for
2169 the whole aligning object. Avoid call to finish_record_type, which only
2170 interferes with the sizes we want to set.
2171 (gnat_to_gnu_entity) <E_Variable>: Pass the required extra arguments to
2172 make_aligning_type for super-aligned objects on stack.
2173 (components_to_record): Pass the adjusted size of the type when creating
2174 fields in the qualified union for the variant part.
2175 (gnat_substitute_in_type): Copy TYPE_USER_ALIGN.
2176 (gnat_to_gnu_entity, case E_Signed_Integer_Subtype): Likewise for
2178 (maybe_pad_type): Set TYPE_USER_ALIGN.
2179 (make_aligning_type): Likewise.
2180 ALIGN argument is unsigned int.
2181 (gnat_to_gnu_entity, case E_Function): Back annotate return mechanism.
2182 (gnat_to_gnu_param): Likewise, for parameters.
2183 (gnat_to_gnu_entity) <object>: Always instantiate the renaming object
2184 if it is constant and stems from a function call.
2185 (gnat_to_gnu_entity) <E_Record_Type>: Set packed to -2 if the alignment
2186 of the record is specified. Adjust accordingly.
2187 (adjust_packed): New static function.
2188 (gnat_to_gnu_field): Use it to adjust the packedness setting.
2189 (components_to_record): Likewise.
2190 (gnat_to_gnu_entity) <object>: Do not test the renamed expression for
2191 side-effects if the object is deemed constant.
2192 (gnat_to_gnu_entity) <E_Array_Type>: Create a name for the fat pointer
2193 type instead of merely finalizing it. Tidy.
2194 <E_Access_Subprogram_Type>: Retrieve the type from the TYPE_DECL.
2195 <E_Access_Type>: Likewise.
2196 (defer_debug_incomplete_list): Rename to defer_finalize_list.
2197 (defer_debug_level): Delete.
2198 (gnat_to_gnu_entity) <debug_deferred>: Likewise
2199 <E_Array_Type>: Call rest_of_record_type_compilation on the fat pointer
2201 <E_Record_Type>: Do not explicitly defer finalizing the type.
2202 Adjust for write_record_type_debug_info renaming.
2203 <E_Subprogram_Type>: Likewise.
2204 Finalize deferred types right after deferred incomplete types are
2206 (rest_of_type_decl_compilation): New global function.
2207 (components_to_record): Rename defer_debug parameter to do_not_finalize.
2208 (components_to_record): Propagate the packedness to the fields of the
2209 qualified union type if there is a variant part.
2210 (gnat_to_gnu_entity) <E_Array_Type>: Use new function
2211 instead of inline code to adjust the XUT field offsets.
2212 (gnat_to_gnu_entity): Adjust for new prototype of finish_record_type.
2213 <E_Record_Subtype>: Do not let finish_record_type compute the sizes
2214 and write the debug info if the type derives from a discriminated one.
2215 (gnat_to_gnu_entity) <E_Array_Type>: Adjust call to create_index_type.
2216 <E_Array_Subtype>: Likewise.
2217 <E_String_Literal_Subtype>: Likewise.
2218 (gnat_to_gnu_entity): Set TYPE_USER_ALIGN on types only if they have
2219 an alignment clause.
2220 (maybe_pad_type): Update ORIG_SIZE to the minimum required to meet ALIGN
2221 before giving warning.
2222 (prepend_one_attribute_to): New function, helper to prepend an attribute
2223 to an attribute list.
2224 (gnat_to_gnu_entity) <E_Procedure>: Use it.
2225 (prepend_attributes): Likewise.
2226 (gnat_to_gnu_entity) <E_Variable>: Use constants of the proper type.
2227 <E_Array_Type>: Declare the padding type for the element type, if any.
2228 <E_Array_Subtype>: Likewise.
2229 (defer_limited_with): New variable.
2230 (Gigi_Equivalent_Type): New function.
2231 (gnat_to_gnu_entity): Use it at start and use result throughout.
2232 (gnat_to_gnu_entity, case E_Access_Type): Rework to use
2233 Gigi_Equivalent_Type, support Limited_With, allow two levels of
2234 indirection, precompute if unconstrained array to simplify logic, and
2235 use defer_limited_with to defer elaboration of some types from limited
2237 (finalize_from_with_types): New function.
2239 2007-06-06 Gary Dismukes <dismukes@adacore.com>
2240 Eric Botcazou <ebotcazou@adacore.com>
2241 Tristan Gingold <gingold@adacore.com>
2242 Olivier Hainque <hainque@adacore.com>
2244 * trans.c (Identifier_to_gnu): Change test for deferred constant by
2245 adding guard that the entity is an E_Constant before testing presence
2246 of Full_view (and remove unnecessary test that entity is not a type).
2247 For a CONST_DECL used by reference, manually retrieve
2248 the DECL_INITIAL. Do not invoke fold in the other DECL_P cases either.
2249 (struct language_function): Move from utils.c to here.
2250 (struct parm_attr): New structure.
2251 (parm_attr, parm_attr vector, parm_attr GC vector): New types.
2252 (f_parm_attr_cache): New macro.
2253 (Attribute_to_gnu) <Attr_Length>: When not optimizing, cache the
2254 expressions for the 'First, 'Last and 'Length attributes of the
2255 unconstrained array IN parameters.
2256 (Subprogram_Body_to_gnu): Use gnu_subprog_decl throughout.
2257 Allocate the information structure for the function earlier, as well
2258 as the language-specific part.
2259 If the parameter attributes cache has been populated, evaluate the
2260 cached expressions on entry.
2261 (takes_address): Add OPERAND_TYPE parameter. Handle N_Function_Call,
2262 N_Procedure_Call_Statement and N_Indexed_Component.
2263 (Pragma_to_gnu): Translate inspection_point to an asm statement
2264 containaing a comment and a reference to the object (either its address
2265 for BLKmode or its value).
2266 (Identifier_to_gnu): Use TREE_CONSTANT instead of CONST_DECL to decide
2267 to go to DECL_INITIAL. Together with the size constraint relaxation
2268 in create_var_decl, enlarges the set of situations in which an
2269 identifier may be used as an initializer without implying elaboration
2271 (Subprogram_Body_to_gnu): Do not fiddle with the debug interface but set
2272 DECL_IGNORED_P on the function if Needs_Debug_Info is not set on the
2274 (maybe_stabilize_reference): Remove lvalues_only parameter.
2275 (gnat_stabilize_reference): Adjust for above change.
2276 (gnat_to_gnu): Do not set location information on the result
2277 if it is a reference.
2278 (add_cleanup): Add gnat_node parameter and set the location of the
2280 (Handled_Sequence_Of_Statements_to_gnu): Adjust calls to add_cleanup.
2281 (Exception_Handler_to_gnu_zcx): Likewise.
2282 (gigi): Remove the cgraph node if the elaboration procedure is empty.
2283 (Subprogram_Body_to_gnu): If a stub is attached to the subprogram, emit
2284 the former right after the latter.
2285 (start_stmt_group): Make global.
2286 (end_stmt_group): Likewise.
2287 (gnu_constraint_error_label_stack, gnu_storage_error_label_stack): New
2289 (gnu_program_error_label_stack): Likewise.
2290 (gigi): Initialize them.
2291 (call_to_gnu, gnat_to_gnu, emit_check): Add new arg to build_call_raise.
2292 (gnat_to_gnu, N_{Push,Pop}_{Constraint,Storage,Program}_Error_Label):
2294 (push_exception_label_stack): New function.
2295 (takes_address): New function.
2297 * utils.c (struct language_function): Move to trans.c from here.
2298 (unchecked_convert): Do not wrap up integer constants in
2300 (create_var_decl_1): Decouple TREE_CONSTANT from CONST_DECL. Prevent
2301 the latter for aggregate types, unexpected by later passes, and relax an
2302 arbitrary size constraint on the former.
2303 (create_field_decl): Use tree_int_cst_equal instead of operand_equal_p
2304 to compare the sizes.
2305 (convert_vms_descriptor): When converting to a fat pointer type, be
2306 prepared for a S descriptor at runtime in spite of a SB specification.
2307 (shift_unc_components_for_thin_pointers): New function.
2308 (write_record_type_debug_info): For variable-sized fields, cap the
2309 alignment of the pointer to the computed alignment.
2310 (finish_record_type): Change HAS_REP parameter into REP_LEVEL.
2311 If REP_LEVEL is 2, do not compute the sizes.
2312 (build_vms_descriptor): Adjust for new prototype of finish_record_type.
2313 (build_unc_object_type): Likewise.
2314 (declare_debug_type): New function.
2316 * ada-tree.def: USE_STMT: removed (not emitted anymore).
2318 * misc.c (gnat_expand_expr): Call to gnat_expand_stmt removed because
2319 no statement is expandable anymore.
2320 (gnat_init_gcc_eh): Do not initialize the DWARF-2 CFI machinery twice.
2321 (gnat_handle_option): Only allow flag_eliminate_debug_types to be set
2322 when the user requested it explicitely.
2323 (gnat_post_options): By default, set flag_eliminate_unused_debug_types
2325 (get_alias_set): Return alias set 0 for a type if
2326 TYPE_UNIVERSAL_ALIASING_P is set on its main variant.
2328 * ada-tree.h: (TYPE_UNIVERSAL_ALIASING_P): New macro.
2329 (DECL_FUNCTION_STUB): New accessor macro.
2330 (SET_DECL_FUNCTION_STUB): New setter macro.
2332 * lang.opt (feliminate-unused-debug-types): Intercept this flag for Ada.
2334 * fe.h (Get_Local_Raise_Call_Entity, Get_RT_Exception_Entity): New
2337 2007-06-06 Jose Ruiz <ruiz@adacore.com>
2339 * s-intman-vxworks.ads, s-intman-vxworks.adb (Abort_Task_Signal):
2340 Rename to Abort_Task_Interrupt to be able to keep the same interface
2341 as the rest of the targets.
2343 * s-osinte-vxworks.ads s-osinte-vxworks.adb
2344 (To_VxWorks_Priority): Remove explicit "in" mode indicator
2346 * s-osinte-vxworks6.ads, s-vxwork-arm.ads, system-vxworks-arm.ads:
2349 2007-06-06 Robert Dewar <dewar@adacore.com>
2351 * a-chahan.ads: Remove obsolescent pragmas
2353 * a-chlat1.ads: Minor reformatting
2355 2007-06-06 Robert Dewar <dewar@adacore.com>
2357 * comperr.adb (Compiler_Abort): New Finalize/Output_Messages interface
2360 * errout.adb: New Finalize/Compilation_Errors/Output_Messages
2363 * errout.ads (Finalize): Changed interface
2364 (Output_Messages): New procedure
2365 (Compilation_Errors): New Interface
2367 * prepcomp.ads, prepcomp.adb (Parse_Preprocessing_Data_File): New
2368 Finalize/Output_Messages interface for Errout
2369 (Prepare_To_Preprocess): New Finalize/Output_Messages interface for
2372 2007-06-06 Thomas Quinot <quinot@adacore.com>
2373 Olivier Hainque <hainque@adacore.com>
2374 Robert Dewar <dewar@adacore.com>
2376 * a-except.ads, a-except.adb: (Rmsg_28): Fix description for E.4(18)
2378 (Raise_Current_Excep): Call Debug_Raise_Exception just before
2379 propagation starts, to let debuggers know about the event in a reliable
2381 (Local_Raise): Moved to System.Exceptions
2382 More convenient to have this as a separate unit
2384 * s-except.adb, s-except.ads: New files.
2386 * a-exextr.adb (Unhandled_Exception): Delete - replaced by
2387 Debug_Unhandled_Exception in System.Exceptions where it belongs
2388 together with a couple of other debug helpers.
2389 (Notify_Unhandled_Exception): Use Debug_Unhandled_Exception instead of
2390 the former Unhandled_Exception.
2392 * exp_ch11.ads, exp_ch11.adb: (Possible_Local_Raise): New procedure
2393 (Warn_No_Exception_Propagation): New procedure
2394 (Warn_If_No_Propagation): Rewritten for new warning generation
2395 (Expand_Exception_Handlers): New warning generation
2396 (Expand_N_Raise_xxx_Error): Rewritten for new warnings
2397 (Add_Exception_Label): Use Special_Exception_Package_Used for test
2398 instead of Most_Recent_Exception_Used (accomodates Exception_Traces)
2399 (Expand_Local_Exception_Handlers): Unconditionally add extra block wrap
2400 even if restriction is set (makes life easier in Check_Returns)
2401 (Expand_Local_Exception_Handlers): Follow renamed entity chain when
2402 checking exception identities.
2403 (Expand_Local_Exception_Handlers): Do not optimize when all others case
2404 (Expand_Local_Exception_Handlers): Set Exception_Junk flag on generated
2405 block for handler (used by Check_Returns)
2406 (Expand_Local_Exception_Handlers): Local_Raise now takes an address
2407 (Expand_N_Handled_Sequence_Of_Statements): Properly handle -gnatd.x to
2408 remove all exception handlers when optimizing local raise statements.
2409 (Find_Local_Handler): Use Get_Renamed_Entity
2410 (Expand_N_Handled_Sequence_Of_Statements): If the handled sequence is
2411 marked analyzed after expanding exception handlers, do not generate
2412 redundant cleanup actions, because they have been constructed already.
2414 2007-06-06 Thomas Quinot <quinot@adacore.com>
2416 * a-finali.ads (Ada.Finalization): Add missing pragma Remote_Types. The
2417 presence of this categorization pragma is mandated by the language.
2418 (Limited_Controlled): Add missing pragma Preelaborable_Initialization
2421 2007-06-06 Vincent Celier <celier@adacore.com>
2422 Robert Dewar <dewar@adacore.com>
2424 * bcheck.adb, binde.adb, binderr.adb, binderr.ads, butil.adb,
2425 butil.ads, erroutc.adb, erroutc.ads, errutil.adb, errutil.ads,
2426 err_vars.ads, exp_tss.adb, exp_tss.ads, fmap.adb, fmap.ads,
2427 fname.adb, fname.ads, fname-sf.adb, fname-uf.adb, fname-uf.ads,
2428 lib-sort.adb, lib-util.adb, lib-util.ads, lib-xref.adb, makeutl.ads,
2429 makeutl.adb, nmake.adt, osint.adb, osint.ads, osint-b.adb,
2430 par-load.adb, prj-attr.adb, prj-dect.adb, prj-err.adb, prj-makr.adb,
2431 prj-part.adb, prj-pp.adb, prj-proc.adb, prj-tree.adb, prj-tree.ads,
2432 prj-util.adb, prj-util.ads, scans.adb, scans.ads, sem_ch2.adb,
2433 sinput-c.adb, styleg-c.adb, tempdir.adb, tempdir.ads, uname.adb,
2434 uname.ads, atree.h, atree.ads, atree.adb, ali-util.ads, ali-util.adb,
2436 Move Name_Id, File_Name_Type and Unit_Name_Type from package Types to
2437 package Namet. Make File_Name_Type and Unit_Name_Type types derived from
2438 Mame_Id. Add new type Path_Name_Type, also derived from Name_Id.
2439 Use variables of types File_Name_Type and Unit_Name_Type in error
2441 (Get_Name): Add parameter Ignore_Special, and set it reading file name
2442 (New_Copy): When debugging the compiler, call New_Node_Debugging_Output
2444 Define flags Flag217-Flag230 with associated subprograms
2445 (Flag_Word5): New record type.
2446 (Flag_Word5_Ptr): New access type.
2447 (To_Flag_Word5): New unchecked conversion.
2448 (To_Flag_Word5_Ptr): Likewise.
2449 (Flag216): New function.
2450 (Set_Flag216): New procedure.
2452 2007-06-06 Arnaud Charlet <charlet@adacore.com>
2454 * a-stzunb.adb, a-stwiun.adb, a-strunb.adb: (Insert): Use 'Length
2457 * a-stwifi.ads, a-stzfix.ads: Minor reformatting
2459 2007-06-06 Javier Miranda <miranda@adacore.com>
2461 * a-tags.ads, a-tags.adb (Tag_Size): This constant is now internal to
2463 (Object_Specific_Data_Array): This is now internal to the package.
2464 (Object_Specific_Data): This is now internal to the package.
2465 (Select_Specific_Data_Element): This is now internal to the package.
2466 (Select_Specific_Data_Array): This is now internal to the package.
2467 (Select_Specific_Data): This is now internal to the package.
2468 (Offset_To_Top_Function_Ptr): This is now public.
2469 (To_Offset_To_Top_Function_Ptr): Removed.
2470 (Storage_Offset_Ptr,To_Storage_Offset_Ptr): These declarations are now
2471 local to subprogram Offset_To_Top.
2472 (Predefined_DT): Removed.
2473 (Typeinfo_Ptr): Removed.
2474 (OSD): This function is now internal to this package.
2475 (SSD): This function is now internal to this package.
2476 (DT): New function that displaces the pointer to the table of primitives
2477 to get access to the enclosing wrapper record.
2478 (IW_Membership): Code cleanup.
2479 (Offset_To_Top): Code cleanup.
2480 (Predefined_DT): Removed.
2481 (Register_Interface_Tag): Removed.
2482 (Set_Interface_Table): Removed.
2483 (Set_Offset_Index): Removed.
2484 (Set_Offset_To_Top): Code cleanup.
2486 (Set_Signature): Removed.
2488 (Set_Tagged_Kind): Removed.
2489 (Typeinfo_Ptr): Removed.
2491 (Displace): Add missing check on null actual.
2493 * exp_disp.ads, exp_disp.adb
2494 (Select_Expansion_Utilities): Removed.
2495 (Build_Common_Dispatching_Select_Statements): Moved to exp_atags.
2496 (Expand_Dispatching_Call): Update calls to Get_Prim_Op_Address because
2497 the interface requires a new parameter.
2498 (Make_Disp_Asynchronous_Select_Spec, Make_Disp_Conditional_Select_Spec,
2499 Make_Disp_Get_Prim_Op_Kind_Spec, Make_Disp_Timed_Select_Spec): Replace
2500 calls to subprograms Build_T, Build_S, etc. by the corresponding code.
2501 Done to remove package Select_Expansion_Utilities.
2502 (Make_DT): New implementation for statically allocated dispatch tables.
2503 (Make_Secondary_DT): Moved to the scope of Make_DT.
2504 (Register_Primitive): Code cleanup plus incoporate the use of the new
2505 function DT_Address_Attribute.
2506 (Expand_Interface_Thunk): The profile of this subprogram has been
2507 changed to return the Thunk_Id and the corresponding code.
2508 (Fill_DT_Entry): Removed. Its functionality is now provided by
2509 subprogram Register_Primitive.
2510 (Fill_Secondary_DT_Entry): Removed. Its functionality is now provided by
2511 subprogram Register_Primitive.
2512 (Register_Primitive): New subprogram that incorporates the previous
2513 functionalities of Fill_DT_Entry and Fill_Secondary_DT_Entry.
2514 (Build_Common_Dispatching_Select_Statements): Remove formal Typ. This
2515 was only required to call Make_DT_Access_Action, which is now removed.
2516 (Ada_Actions): Removed
2517 (Action_Is_Proc): Removed
2518 (Action_Nb_Arg): Removed
2519 Replace all the calls to Make_DT_Access_Action by direct calls to
2520 Make_Procedure_Call_Statement or Make_Function_Call.
2521 (Set_DTC_Entity_Value): New subprogram.
2522 (Set_All_DT_Position): Add call to new subprogram Set_DTC_Entity_Value.
2523 (Expand_Interface_Thunk): Add missing support for primitives that are
2524 functions with a controlling result (case in which there is no need
2525 to generate the thunk).
2527 * exp_atag.ads, exp_atag.adb
2528 (Build_DT): New subprogram that displaces the pointer to reference the
2529 base of the wrapper record.
2530 (Build_Typeinfo_Offset): Removed.
2531 (RTE_Tag_Node): Removed.
2532 (Build_Common_Dispatching_Select_Statements): Moved here from exp_disp
2533 (Build_Get_RC_Offset): Removed.
2534 (Build_Inherit_Predefined_Prims): Removed.
2535 (Build_Inherit_TSD: Removed.
2536 (Build_New_TSD): Removed.
2537 (Build_Set_External_Tag): Removed.
2538 (Build_Set_Predefined_Prim_Op_Address): Add documentation.
2539 (Build_Set_Prim_Op_Address): Add documentation.
2540 (Build_Set_TSD): Removed.
2542 * rtsfind.ads, rtsfind.adb
2543 (Load_Fail): If load fails and we are not in configurable run-time
2544 mode, then raise Unrecoverable_Error.
2545 (Text_IO_Kludge): Generate an error message if a run-time library is
2546 not available in a given run-time (ie. zfp run-time).
2547 (RTE_Record_Component): Add code to check that the component we search
2548 for is not found in two records in the given run-time package.
2549 (RE_DT_Offset_To_Top_Size, RE_DT_Predef_Prims_Size): Removed
2550 (RE_DT_Predef_Prims_Offset): New entity
2551 (RE_Static_Offset_To_Top): New entity
2552 (RE_HT_Link): New entity.
2553 (System_Address_Image): Addition of this run-time package.
2554 (RE_Address_Image): New entity.
2555 (RE_Abstract_Interface): Removed.
2556 (RE_Default_Prim_Op_Count): Removed.
2557 (RE_DT_Entry_Size): Removed.
2558 (RE_DT_Min_Prologue_Size): Removed.
2559 (RE_DT_Prologue_Size): Removed.
2560 (RE_Ifaces_Table_Ptr): Removed.
2561 (RE_Interface_Data_Ptr): Removed.
2562 (RE_Type_Specific_Data): Removed.
2563 (RE_Primary_DT): Removed.
2564 (RE_Register_Interface_Tag): Removed.
2565 (RE_Set_Offset_Index): Removed.
2566 (RE_Set_OSD): Removed.
2567 (RE_Set_SSD): Removed.
2568 (RE_Set_Signature): Removed.
2569 (RE_Set_Tagged_Kind): Removed.
2570 (RE_Address_Array): New entity.
2571 (RE_DT): New entity.
2572 (RE_Iface_Tag): New entity.
2573 (RE_Interfaces_Table): New entity.
2574 (RE_No_Dispatch_Table): New entity.
2575 (RE_NDT_Prims_Ptr): New entity.
2576 (RE_NDT_TSD): New entity.
2577 (RE_Num_Prims): New entity.
2578 (RE_Offset_To_Top_Function_Ptr): New entity.
2579 (RE_OSD_Table): New entity.
2580 (RE_OSD_Num_Prims): New entity.
2581 (RE_Predef_Prims): New entity
2582 (RE_Predef_Prims_Table_Ptr): New entity.
2583 (RE_Primary_DT): New entity.
2584 (RE_Signature): New entity.
2585 (RE_SSD): New entity.
2586 (RE_TSD): New entity.
2587 (RE_Type_Specific_Data): New entity.
2588 (RE_Tag_Kind): New entity.
2590 2007-06-06 Thomas Quinot <quinot@adacore.com>
2592 * a-textio.ads, a-textio.adb (Write): Add explicit size clause for the
2593 C imported variable.
2594 (Skip_Line): Do not reset Before_LM_PM immediately when Before_LM is set
2597 2007-06-06 Robert Dewar <dewar@adacore.com>
2599 * a-tienio.adb (Get): Adjust buffer size to accomodate one extra
2602 2007-06-06 Vincent Celier <celier@adacore.com>
2604 * a-tifiio.adb (Put, internal): For negative numbers, check that there
2605 is room for at least one digit and the minus sign.
2606 (Put.Put_Character): Never put a character outside of the range of
2609 2007-06-06 Olivier Hainque <hainque@adacore.com>
2610 Eric Botcazou <ebotcazou@adacore.com>
2612 * utils2.c (build_allocator): Provide the extra arguments to
2613 make_aligning_type for super-aligned objects allocated from the default
2614 pool. Leave enough room for a pointer before the aligning field, and
2615 store the system's allocator return value there.
2616 (build_call_alloc_dealloc): When releasing a super-aligned object,
2617 retrieve the system's allocator return value from where build_allocator
2618 has stored it, just ahead of the adjusted address we are passed.
2619 (build_call_raise): Handle properly the generation of line numbers when
2620 the node is marked No_Location.
2621 (compare_elmt_bitpos): Use tree_int_cst_compare. Stabilize the sort
2622 by using DECL_UID on ties.
2623 (build_binary_op) <EQ_EXPR>: Accept fat pointer types with the same
2625 (build_call_raise): Handle converting exception into goto; support new
2627 (build_component_ref): Add new arg to build_call_raise.
2629 2007-06-06 Hristian Kirtchev <kirtchev@adacore.com>
2631 * a-ztflau.adb, a-wtflau.adb, a-tiflau.adb (Load_Real): Do not parse
2632 "." in the case of nnn.xxx when nnn terminates with an underscore.
2633 Parse the remaining "#" or ":" in the case of nnn#.xxx#
2635 2007-06-06 Robert Dewar <dewar@adacore.com>
2637 * a-tigeau.ads, a-tigeau.adb: (Store_Char): Change Buf to IN OUT
2639 2007-06-06 Arnaud Charlet <charlet@adacore.com>
2640 Vincent Celier <celier@adacore.com>
2641 Robert Dewar <dewar@adacore.com>
2643 * bindgen.adb (Gen_Output_File_Ada): Generate pragma No_Run_Time when
2645 (Gen_Output_File_Ada, Gen_Output_File_C): Never use __attribute
2646 ((destructor)) for adafinal, even when switch -a is used.
2647 Do not issue pragma Linker_Destructor for adafinal when switch -a is
2649 (Gen_Object_Files_Options): Add formatting of Linker Options, when
2650 Output_Linker_Option_List is set. Suppress this formatting when
2651 Zero_Formatting is set.
2652 Add case for CLI_Target.
2653 (System_Restrictions_Used): New flag, used to avoid generating with of
2654 System_Restrictions and initialization of the data unless there is
2655 some use of System.Restrictions in the partition.
2656 (Check_System_Restrictions_Used): New procedure
2658 * s-stalib.adb: Remove with of System.Restrictions. No longer needed
2659 since we only with this unit in the binder file if it is used elsewhere
2662 2007-06-06 Vincent Celier <celier@adacore.com>
2664 * bindusg.adb: Add line for @<response file>
2665 Add lines for new switches -R and -Z
2667 * gnatbind.adb (Gnatbind): Do not include sources from the GNAT
2668 hierarchy in the list of files of the closure when -R is used
2669 (Gnatbind): Accept arguments starting with '@' to indicate response
2670 files and take the arguments from the response files.
2671 If List_Closure is set, display the referenced files
2673 2007-06-06 Javier Miranda <miranda@adacore.com>
2674 Robert Dewar <dewar@adacore.com>
2675 Ed Schonberg <schonberg@adacore.com>
2677 * checks.ads, checks.adb (Apply_Address_Clause_Check): Handle case in
2678 which the address-clause is applied to in-mode actuals (allowed by
2680 (Apply_Discriminant_Check): Do not generate a check if the type is
2681 constrained by a current instance.
2682 (Activate_Division_Check): New procedure
2683 (Activate_Overflow_Check): New procedure
2684 (Activate_Range_Check): New procedure
2685 Call these new Activate procedures instead of setting flags directly
2686 (Apply_Array_Size_Check): Removed, no longer needed.
2687 Code clean up: remove obsolete code related to GCC 2.
2688 (Get_E_Length): Protect against bomb in case scope is standard
2689 (Selected_Range_Checks): If the node to be checked is a conversion to
2690 an unconstrained array type, and the expression is a slice, use the
2691 bounds of the slice to construct the required constraint checks.
2692 Improve NOT NULL error messages
2693 (Apply_Constraint_Check): If the context is a null-excluding access
2694 type, diagnose properly the literal null.
2696 2007-06-06 Pascal Obry <obry@adacore.com>
2698 * clean.adb (Clean_Archive): Use untouched casing for the archive name
2699 and the corresponding .deps file.
2700 (Clean_Interface_Copy_Directory): Use untouched casing for the library
2701 src directory. Minor code-clean-up. Use untouched casing for files
2702 read into the library src dir.
2703 (Clean_Library_Directory): Idem.
2704 (Parse_Cmd_Line): Accept new switch -aP
2706 2007-06-06 Javier Miranda <miranda@adacore.com>
2707 Ed Schonberg <schonberg@adacore.com>
2708 Robert Dewar <dewar@adacore.com>
2709 Eric Botcazou <ebotcazou@adacore.com>
2710 Arnaud Charlet <charlet@adacore.com>
2712 * einfo.ads, einfo.adb (Available_View): New synthesized attribute
2713 applicable to types that have the With_Type flag set. Returns the
2714 non-limited view of the type, if available, otherwise the type itself.
2715 For class-wide types, there is no direct link in the tree, so we have
2716 to retrieve the class-wide type of the non-limited view of the Etype.
2717 New attributes Static_Initialization and Static_Elaboration_Desired.
2718 Remove the pragma Thread_Body, and the associated flag
2719 Is_Thread_Body in entities, and all related code.
2720 (Suppress_Value_Tracking_On_Call): New flag
2721 E_Exception has Esize and Alignment fields
2722 (Universal_Aliasing): New function.
2723 (Set_Universal_Aliasing): New procedure.
2724 (Write_Entity_Flags): Deal with Universal_Aliasing flag.
2725 (Check_Nested_Access): New procedure.
2726 (Has_Up_Level_Access, Set_Has_Up_Level_Access): New procedures.
2727 (Find_Direct_Name, Note_Possible_Modification): Use Check_Nested_Access.
2728 (Related_Interface): New attribute. Present in dispatch table pointer
2729 components of records. Set to point to the entity of the corresponding
2731 (Is_By_Reference_Type): Recurse on the full view of an incomplete type.
2732 (Original_Access_Type): Remove, not needed.
2733 (Root_Type): Handle properly subtypes of class-wide-types.
2736 * sem_ch4.adb (Analyze_Explicit_Dereference): Add support for
2737 class-wide types visible through limited-with clauses.
2738 (Try_Primitive_Operation): When examining all primitive operations of a
2739 tagged type, do not consider subprograms labeled as hidden unless they
2740 belong to a private generic type with a tagged parent.
2741 (Try_Object_Operation): Extensive rewriting, to handle properly various
2742 overloading cases, when several ancestors may have class-wide operations
2743 that are possible candidates, and when the overloaded functions return
2744 array types and have defaulted parameters so that the call may be
2745 interpreted as an indexing.
2746 (Analyze_Allocator): Remove Mark_Allocator and its invocation.
2747 (Process_Function_Call): use Next, rather than Next_Actual, to analyze
2748 successive actuals before analyzing the call itself.
2749 (Try_Primitive_Operation): A primitive operation is compatible with the
2750 prefix if the prefix has a synchronized type and the type of the formal
2751 is its corresponding record, as can be the case when the primitive
2752 operation is declared outside of the body of the type.
2753 (Traverse_Homonyms): New subprocedure of Try_Class_Wide_Operation, to
2754 perform homonym traversal, looking for class-wide operation matches
2755 (formerly done in statements of Try_Class_Wide_Operation). Matches on
2756 access parameters are now restricted to anonymous access types.
2757 (Mark_Allocator): An allocator with a discriminant association parent is
2759 (Try_One_Prefix_Interpretation): If the type of the object is
2760 incomplete, as can be happen when it is a limited view obtained through
2761 a limited_with_clause, the selected component is not part of a prefixed
2763 (Complete_Object_Operation): Diagnose properly an object that is not
2764 aliased when the corresponding controlling formal is an access
2766 (Try_Primitive_Operation, Try_Class_Wide_Operation): Diagnose properly
2767 ambiguous calls in prefixed notation, where two primitives differ only
2768 in that the controlling argument of one is an access parameter.
2770 * sem_ch6.adb (Has_Single_Return): Add guard in code that determines
2771 whether a function that returns an unconstrained type can be inlined.
2772 (Process_Formals): Diagnose properly the illegal use of an incomplete
2773 type in the profile of an access_to_subprogram declaration.
2774 (Check_Synchronized_Overriding): Nothing check for concurrent types, the
2775 operations are attached to the corresponding record.
2776 (Analyze_Subprogram_Specification): Add variables Formal and Formal_Typ.
2777 When processing a primitive of a concurrent type which implements an
2778 interface change the type of all controlling formals to that of the
2779 corresponding record type.
2780 (Check_Synchronized_Overriding): Relax the conditional logic when trying
2781 to determine the tagged type to which a primitive belongs.
2782 (Check_Conventions): Capture condition to ignore a primitive operation
2783 (which is shared between the loop in Check_Conventions and the one in
2784 Check_Convention) in a new local function Skip_Check.
2785 (Check_Convention): Rename Prim_Op to Second_Prim_Op to avoid possible
2786 confusion with Check_Conventions' own Prim_Op local variable.
2787 (Create_Extra_Formals): Test for a tagged result type rather than a
2788 controlling result when determining whether to add a BIP_Alloc_Form
2789 formal and a BIP_Final_List formal to the function.
2790 (Check_Conformance); For parameters that are anonymous access types,
2791 subtype conformance requires that the not null and the constant
2792 indicators must match
2793 (Check_Synchronized_Overriding): New parameter Formal_Typ. Add machinery
2794 to retrieve the appropriate type when processing a concurrent type
2795 declared within a generic. Minor comment reformatting. Change invocation
2796 of Overrides_Synchronized_Primitive to Find_Overridden_Synchronized_Pri-
2798 (Analyze_Subprogram_Body): If the return type of a function is an
2799 anonymous access to the limited view of a class-wide type, and the
2800 non-limited view of the type is available, update the type of the
2801 function so that code can be generated.
2802 (Process_Formals): In case of access-subtype itype whose designated
2803 type is also an itype (situation that happens now with access to
2804 subprograms) we mark the access-type itype with the Has_Delayed_Freeze
2805 attribute to avoid backend problems.
2806 (Check_Return_Subtype_Indication): Replace R_Type with R_Stm_Type in
2807 init of R_Stm_Type_Is_Anon_Access. Also check that base types of the
2808 anonymous types' designated types are same before testing
2809 Subtypes_Statically_Match.
2810 (Create_Extra_Formals): Test for a named access parameter that is a
2811 controlling formal as an additional condition for adding an
2812 accessibility level formal. This can occur in the subp type created for
2813 dispatching calls in Expand_Dispatching_Call, and allows calling
2814 Create_Extra_Formals from that procedure rather than special-casing the
2815 extra formals there.
2816 (Create_Extra_Formals): Add BIP_Alloc_Form and BIP_Final_List formals
2817 when the function has a controlling result.
2818 (Check_Returns): Add much more knowledge of the optimization of local
2819 raise statements to gotos, to retain proper warnings in this case.
2820 (Check_Statement_Sequence): Ignore N_Push_xxx_Label and N_Pop_xxx_Label
2821 nodes when looking for last statement.
2823 * sem_type.ads, sem_type.adb (Specific_Type): Add support for
2824 class-wide types visible through limited with clauses.
2825 (Add_One_Interp): If the operands are anonymous access types, the
2826 predefined operator on universal_access is immediately visibles
2827 (Find_Unique_Type): Handle anonymous access to subprogram types just as
2828 other anonymous access types.
2829 (Disambiguate): Take into account CIL convention.
2830 (Interface_Present_In_Ancestor): Add support for class-wide interfaces.
2832 2007-06-06 Robert Dewar <dewar@adacore.com>
2834 * sinput.ads, sinput.adb, uintp.ads, urealp.adb, stringt.adb,
2835 sem_elim.adb, prj-strt.adb, repinfo.ads, repinfo.adb, namet.ads,
2836 elists.ads, elists.adb, lib.ads, lib.adb (Unlock): New procedure.
2837 Fix lower bound of tables.
2840 * nlists.adb: Ditto.
2841 (Prev_Node, Next_Node): Change index type to Int so that it properly
2842 covers the range First_Node_Id - 1 up.
2844 2007-06-06 Javier Miranda <miranda@adacore.com>
2845 Ed Schonberg <schonberg@adacore.com>
2846 Bob Duff <duff@adacore.com>
2847 Hristian Kirtchev <kirtchev@adacore.com>
2849 * exp_aggr.ads, exp_aggr.adb:
2850 (Build_Record_Aggr_Code): Add missing initialization of secondary tags
2851 in extension aggregates.
2852 (Flatten): Other conditions being met, an aggregate is static if the
2853 low bound given by component associations is different from the low
2854 bound of the base index type.
2855 (Packed_Array_Aggregate_Handled): If the component type is itself a
2856 packed array or record, the front-end must expand into assignments.
2857 (Gen_Ctrl_Actions_For_Aggr): In call to Init_Controller, pass False to
2858 Init_Pr, instead of Ancestor_Is_Expression.
2859 (Gen_Ctrl_Actions_For_Aggr): When processing an aggregate of a
2860 coextension chain root, either generate a list controller or use the
2861 already existing one.
2862 (Static_Array_Aggregate): New procedure to construct a positional
2863 aggregate that can be handled by the backend, when all bounds and
2864 components are compile-time known constants.
2865 (Expand_Record_Aggregate): Force conversion of aggregates of tagged
2866 types covering interface types into assignments.
2867 (Replace_Type): move to Build_Record_Aggr_Code.
2868 (Expand_Record_Aggr_Code): if the target of the aggregate is an
2869 interface type, convert to the definite type of the aggregate itself,
2870 so that needed components are visible.
2871 (Convert_Aggr_In_Object_Decl): If the aggregate has controlled
2872 components and the context is an extended return statement do not
2873 create a transient block for it, to prevent premature finalization
2874 before the return is executed.
2875 (Gen_Assign): Do not generate a call to deep adjust routine if the
2876 component type is itself an array of controlled (sub)-components
2877 initialized with an inner aggregate.
2878 (Component_Check): New name for Static_Check. This name is now more
2879 appropriate, and documentation is added which was missing.
2880 (Component_Check): Add test for bit aligned component value
2881 (Component_Not_OK_For_Backend): Renames Has_Delayed_Nested_Aggregate_Or_
2882 Tagged_Comps, name is more appropriate given added function below.
2883 (Component_Not_OK_For_Backend): Check for bit aligned component ref.
2885 2007-06-06 Hristian Kirtchev <kirtchev@adacore.com>
2886 Javier Miranda <miranda@adacore.com>
2887 Robert Dewar <dewar@adacore.com>
2889 * exp_attr.adb (Expand_N_Attribute_Reference): Case Callable and
2890 Terminated: Add unchecked type conversion from System.Address to
2891 System.Tasking.Task_Id when calling the predefined primitive
2893 Disable new Ada 05 accessibility check for JVM.NET targets, which
2894 cannot be implemented in a practical way.
2895 (Expand_N_Attribute_Reference: case Attribute_Tag): The use of 'Tag in
2896 the sources always references the tag of the actual object. Therefore,
2897 if 'Tag is applied in the sources to class-wide interface objects we
2898 generate code that displaces "this" to reference the base of the object.
2899 (Expand_N_Attribute_Reference, case Size): Return specified size if
2901 (Expand_N_Attribute_Reference): The expansion of the 'Address attribute
2902 has code that displaces the pointer of the object to manage interface
2903 types. However this code must not be executed when the prefix is a
2904 subprogram. This bug caused the wrong expansion of the internally
2905 generated assignment that fills the dispatch table when the primitive
2906 is a function returning a class-wide interface type.
2907 (Expand_N_Attribute_Reference:Attribute_Valid): Remove incorrect call to
2908 Set_Attribute_Name for Name_Unaligned_Valid.
2910 2007-06-06 Ed Schonberg <schonberg@adacore.com>
2911 Gary Dismukes <dismukes@adacore.com>
2913 * exp_ch13.adb (Expand_N_Attribute_Definition_Clause, case 'Address):
2914 If the initialization is the equivalent aggregate of the initialization
2915 procedure of the type, do not remove it.
2916 (Expand_N_Attribute_Definition_Clause): Exclude access variables
2917 initialized to null from having their expression reset to empty and
2918 note this exception in the comment.
2920 2007-06-06 Hristian Kirtchev <kirtchev@adacore.com>
2921 Robert Dewar <dewar@adacore.com>
2922 Ed Schonberg <schonberg@adacore.com>
2923 Gary Dismukes <dismukes@adacore.com>
2925 * exp_ch2.adb: Remove "with" and "use" clauses for Namet and Snames.
2926 Add "with" and "use" clauses for Sem_Attr.
2927 (Expand_Current_Value): Do not replace occurences of attribute
2928 references where the prefix must be a simple name.
2930 * sem_attr.ads, sem_attr.adb: Remove "with" and "use" clauses for
2931 Namet. Add new arrays Attribute_Name_Modifies_Prefix and
2932 Attribute_Requires_Simple_Name_Prefix.
2933 (Name_Modifies_Prefix): Body of new function.
2934 (Requires_Simple_Name_Prefix): Body of new function.
2935 (Resolve_Attribute, case Access): Improve error message for case of
2936 mismatched conventions.
2937 (Analyze_Attribute, case 'Tag): The prefix the attribute cannot be of an
2939 (Analyze_Attribute, case 'Access): If the type of the prefix is a
2940 constrained subtype for a nominal unconstrained type, use its base type
2941 to check for conformance with the context.
2942 (Resolve_Attribute): Remove test of the access type being associated
2943 with a return statement from condition for performing accessibility
2944 checks on access attributes, since this case is now captured by
2945 Is_Local_Anonymous_Access.
2946 (Analyze_Access_Attribute): Set Address_Taken on entity
2947 (Analyze_Attribute, case Address): Set Address_Taken on entity
2948 (OK_Self_Reference): Traverse tree to locate enclosing aggregate when
2949 validating an access attribute whose prefix is a current instance.
2950 (Resolve_Attribute): In case of attributes 'Code_Address and 'Address
2951 applied to dispatching operations, if freezing is required then we set
2952 the attribute Has_Delayed_Freeze in the prefix's entity.
2953 (Check_Local_Access): Set flag Suppress_Value_Tracking_On_Call in
2954 current scope if access of local subprogram taken
2955 (Analyze_Access_Attribute): Check legality of self-reference even if the
2956 expression comes from source, as when a single component association in
2957 an aggregate has a box association.
2958 (Resolve_Attribute, case 'Access): Do not apply accessibility checks to
2959 the prefix if it is a protected operation and the attribute is
2960 Unrestricted_Access.
2961 (Resolve_Attribute, case 'Access): Set the Etype of the attribute
2962 reference to the base type of the context, to force a constraint check
2963 when the context is an access subtype with an explicit constraint.
2964 (Analyze_Attribute, case 'Class): If the prefix is an interface and the
2965 node is rewritten as an interface conversion. leave unanalyzed after
2966 resolution, to ensure that type checking against the context will take
2969 2007-06-06 Ed Schonberg <schonberg@adacore.com>
2970 Javier Miranda <miranda@adacore.com>
2971 Robert Dewar <dewar@adacore.com>
2973 * exp_ch3.adb (Make_Controlling_Function_Wrappers): generate wrapper a
2974 wrapper when the full view of the controlling type of an inherited
2975 function that dispatches on result implements interfaces.
2976 (Expand_N_Object_Declaration): In cases where the type of the
2977 declaration is anonymous access, create finalization list for it.
2978 (Expand_N_Object_Declaration): Generate a persistent_bss directive only
2979 if the object has no explicit initialization, to match description of
2980 functionality of pragam Persistent_BSS.
2981 (Build_Equivalent_Array_Aggregate, Build_Equivalent_Record_Aggregate):
2982 new function to build static aggregates, to replace initialization call
2983 when static initialization is desired.
2984 (Freeze_Type): Generate a list controller for an access type whenever
2985 its designated type has controlled anonymous access discriminants.
2986 (Build_Equivalent_Aggregate): New procedure to compute a static
2987 aggregate to be used as default initialization for composite types,
2988 instead of a generating a call to the initialization procedure for the
2990 (Build_Initialization_Call): When available, replace a call to the
2991 initialization procedure with a copy of the equivalent static aggregate
2993 (Expand_N_Object_Declaration): Use New_Occurrence_Of in generated
2994 declarations for objects of a class-wide interface type, rather than
2995 just identifiers, to prevent visibility problems.
2996 (Expand_N_Object_Declaration): When expanding the declaration for an
2997 object of a class-wide interface type, preserve the homonym chain of
2998 the original entity before exchanging it with that of the generated
2999 renaming declaration.
3000 (Freeze_Enumeration_Type): Don't raise CE if No_Exception_Propagation
3001 active, because there is no way to handle the exception.
3002 (Freeze_Record_Type): In case of CPP_Class types add a call to Make_DT
3003 to do a minimum decoration of the Access_Disp_Table list.
3004 (Expand_Record_Controller): Avoid the addition of the controller between
3005 the component containing the tag of a secondary dispatch table and its
3006 adjacent component that stores the offset to the base of the object.
3007 This latter component is only generated when the parent type has
3008 discriminants ---documented in Add_Interface_Tag_Components).
3009 (Apply_Array_Size_Check): Removed, no longer needed.
3010 (Expand_N_Full_Type_Declaration): If the type has anonymous access
3011 components, create a Master_Entity for it only if it contains tasks.
3012 (Build_Init_Procedure): Suppress the tag assignment compiling under
3014 (Freeze_Record_Type): Remove code associated with creation of dispatch
3016 (Init_Secondary_Tags): Update type of actuals when generating calls to
3017 Ada.Tags.Set_Offset_To_Top
3018 (Stream_Operation_OK): Disable use of streams compiling under no
3020 (Expand_N_Object_Declaration): Don't do Initialize_Scalars initalization
3021 if Has_Init_Expression set.
3022 (Build_Init_Procedure): Replace call to Fill_DT_Entry by call to
3023 Register_Primitive, which provides the same functionality.
3024 (Requires_Init_Proc): Return false in case of interface types.
3025 (Add_Secondary_Tables): Use the new attribute Related_Interface to
3027 (Predefined_Primitive_Freeze): Do not assume that an internal entity
3028 is always associated with a predefined primitive because the internal
3029 entities associated with interface types are not predefined primitives.
3030 Therefore, the call to Is_Internal is replaced by a call to the
3031 function Is_Predefined_Dispatching_Operation.
3032 (Make_Eq_If): When generating the list of comparisons for the
3033 components of a given variant, omit the controller component that is
3034 present if the variant has controlled components.
3036 2007-06-06 Javier Miranda <miranda@adacore.com>
3037 Hristian Kirtchev <kirtchev@adacore.com>
3038 Bob Duff <duff@adacore.com>
3040 * exp_ch4.adb (Complete_Coextension_Finalization): Add machinery to
3041 handle the creation of finalization lists and calls for nested
3042 coextensions when the root of the chains is part of a return statement.
3043 (Inside_A_Return_Statement): New function inside Complete_Coextension_
3045 (Expand_Record_Equality): Skip components that are interface types.
3046 (Displace_Allocator_Pointer): Add missing support for interface subtypes
3047 (Expand_N_Allocator): Replace invocation of Is_Local_Access_Discriminant
3048 with Rewrite_Coextension. Change the condition for detecting coextension
3050 (Is_Local_Access_Discriminant): Removed.
3051 (Rewrite_Coextension): New routine which rewrites a static coextension
3052 as a temporary and uses its unrestricted access in the construction of
3054 (Complete_Coextension_Finalization): New routine. Generate finalization
3055 attachment calls to all delayed coextensions.
3056 (Expand_N_Allocator): Call Complete_Coextension_Finalization whenever
3057 the allocator is not a coextension itself and has delayed coextensions.
3058 If the current allocator is controlled, but also a coextension, delay
3059 the generation of the finalization attachment call.
3060 Rename local variable "Node" to "Nod" in order to avoid confusion with
3062 (Expand_Allocator_Expression): Call Adjust for initialized allocators of
3063 limited types that are not inherently limited. Such an allocator is
3064 illegal, but is generated by the expander for a return statement, to
3065 copy the result onto the secondary stack. This is the only case where a
3066 limited object can be copied. Generate code to displace the pointer
3067 to the object if the qualified expression is a class-wide interface
3068 object. Such displacement was missing and hence the copy of the object
3070 (Apply_Accessibility_Check): Handle allocated objects initialized in
3072 (Displace_Allocator_Pointer): Subsidiary procedure to Expand_N_Allocator
3073 and Expand_Allocator_Expression. Allocating class-wide interface objects
3074 this routine displaces the pointer to the allocated object to reference
3075 the component referencing the corresponding secondary dispatch table.
3076 Expand_Allocator_Expression): Add missing support to allocate class-wide
3077 interface objects initialized with a qualified expression.
3078 (Get_Allocator_Final_List): Test for an anonymous access type that is a
3079 function result type, and use the finalization list associated with the
3080 function scope in that case (such an anonymous type should not be
3081 treated like an access parameter's type).
3083 2007-06-06 Ed Schonberg <schonberg@adacore.com>
3084 Gary Dismukes <dismukes@adacore.com>
3085 Javier Miranda <miranda@adacore.com>
3087 * exp_ch5.adb (Expand_N_Assignment_Statement): For the assignment of a
3088 controlled type, use Make_Handler_For_Ctrl_Operation to construct the
3089 required exception handler.
3090 (Expand_Simple_Function_Return, Expand_N_Return_Statement): Handle
3091 properly the case of a function whose return type is a limited
3092 class-wide interface type. Modify the code of the accessibility
3093 check to handle class-wide interface objects. In this case we need to
3094 displace "this" to reference the primary dispatch table to get access
3095 to the TSD of the object (to evaluate its accessibility level).
3096 (Expand_N_Extended_Return_Statement): Test for a tagged result type
3097 rather than a controlling result as one of the conditions for
3098 generating tests of the implicit BIP_Alloc_Form formal. The
3099 initialization assignment is also handled according to whether the
3100 result is tagged instead of controlling.
3101 In the case where the init assignment is inserted in the "then" part of
3102 the allocation conditional, rewrite the target to be a dereference of
3103 the implicit BIP_Object_Access formal.
3104 If the returned value is unconstrained and created on the secondary
3105 stack, mark the enclosing block and function so that the secondary
3106 stack is not reclaimed on return.
3107 Treat returns from functions with controlling results similarly to
3108 returns from functions with unconstrained result subtypes.
3109 If the object returned is unconstrained, and an allocator must be
3110 created for it, analyze the allocator once the block for the extended
3111 return is installed, to ensure that finalizable components
3112 of the expression use the proper finalization list. Guard the call to
3113 Move_Final_List with a check that there is something to finalize.
3114 (Make_Tag_Ctrl_Assignment): Use "old" handling
3115 of controlled type assignment for virtual machines, since new code uses
3116 unsupported features (such as direct access to bytes in memory).
3118 2007-06-06 Gary Dismukes <dismukes@adacore.com>
3119 Ed Schonberg <schonberg@adacore.com>
3121 * exp_ch6.ads, exp_ch6.adb (Expand_Call): When adding an extra
3122 accessibility actual, check for the case of an aliased object that has
3123 been rewritten as an Access attribute, and assign Prev to Prev_Orig so
3124 we fall into processing for the attribute rather than the name of the
3126 (Expand_Inline_Call): If an actual is a literal, and the corresponding
3127 formal has its address taken in the body, create a temporary to capture
3128 value. If the return type is a limited interface, do not treat the
3129 return value as Controlled.
3130 (Is_In_Place_Function): If the return type is a limited interface,
3131 treat as returning in place. The actual returned object may not always
3132 be limited, but the caller has to assume that it is returned in place.
3133 (Add_Final_List_Actual_To_Build_In_Place_Call): If the call is the
3134 context of an allocator, use the correct finalization chain (that is,
3135 the chain belonging to the access type, rather than the chain belonging
3136 to the current scope).
3137 (Add_Alloc_Form_Actual_To_Build_In_Place_Call): Test for a tagged
3138 result type rather than a controlling result as a precondition for
3139 adding an allocation form actual to a build-in-place call.
3140 (Add_Final_List_Actual_To_Build_In_Place_Call): Ditto.
3141 (Freeze_Subprogram): Code cleanup. Remove all the code that register the
3142 primitive in the dispatch tables. This work is now done by Make_DT when
3144 (Register_Predefined_DT_Entry): Removed.
3145 (Add_Return): If end label is not present, use sloc of last statement
3146 for generated return statement in procedure, for better gdb behavior
3148 (Add_Access_Actual_To_Build_In_Place_Call): Set parent fields of the
3149 object address nodes to ensure proper processing by routines like
3151 (Expand_Call): Fix generation of validity check for parameter
3152 (Add_Alloc_Form_Actual_To_Build_In_Place_Call): Return without passing
3153 the allocation form parameter if the result subtype is constrained,
3154 except when the function has a controlling result.
3155 (Add_Final_List_Actual_To_Build_In_Place_Call): Test Controlled_Type
3156 rather than Is_Controlled and Has_Controlled_Component, since we want to
3157 include class-wide result types in this treatment. Also test for a
3158 controlling result, since that also requires passing a finalization
3160 (Make_Build_In_Place_Call_In_Allocator): Call Add_Alloc_Form_Actual_*
3161 even when the result subtype is constrained, to handle calls involving
3162 controlling results.
3163 (Make_Build_In_Place_Call_In_Anonymous_Context): Add_Alloc_Form_Actual_*
3164 is now called even when the result subtype is constrained, to handle
3165 calls involving controlling results.
3166 (Make_Build_In_Place_Call_In_Assignment): Remove test for Is_Constrained
3167 on call to Add_Alloc_Form_Actual_To_Build_In_Place_Call (that procedure
3168 now performs the test).
3169 (Make_Build_In_Place_Call_In_Object_Declaration):
3170 Add_Alloc_Form_Actual_* is now called even when the result subtype is
3171 constrained, to handle calls involving controlling results.
3172 (Add_Return): Accomodate rewritten pattern from local raise to goto
3173 transformation, so that we still recognize an transfer statement
3174 and do the right thing here in that case.
3175 (Expand_N_Subprogram_Body): Add dummy Push/Pop_xxx_Label nodes at start
3176 and end of subprogram code.
3177 (Register_Interface_DT_Entry, Register_Predefined_DT_Entry): Add missing
3178 support for primitives that are functions (without formals) with a
3180 (Inherited_From_Formal): If the actual subtype has not generic parent
3181 type, it is not an actual for a formal derived type, and there is no
3182 operation to inherit from the formal.
3184 2007-06-06 Ed Schonberg <schonberg@adacore.com>
3185 Thomas Quinot <quinot@adacore.com>
3187 * exp_ch7.ads, exp_ch7.adb (Expand_Cleanup_Actions): Set Sloc of
3188 inserted cleanup code appropriately for GDB use.
3189 (Make_Deep_Proc): Use Make_Handler_For_Ctrl_Operation to create
3190 exception handler for Deep_Adjust or Deep_Finalize.
3191 (Make_Handler_For_Ctrl_Operation): New subprogram. When runtime entity
3192 Raise_From_Controlled_Operation is available, use a call to that
3193 subprogram instead of a plain "raise Program_Error" node to raise
3194 Program_Error if an exception is propagated from an Adjust or Finalize
3196 (Insert_Actions_In_Scope_Around): If the statement to be wrapped
3197 appears in the optional statement list of a triggering alternative, the
3198 scope actions can be inserted directly there, and not in the list that
3199 includes the asynchronous select itself.
3201 2007-06-06 Ed Schonberg <schonberg@adacore.com>
3202 Robert Dewar <dewar@adacore.com>
3203 Hristian Kirtchev <kirtchev@adacore.com>
3205 * exp_ch9.ads, exp_ch9.adb (Build_Protected_Entry): Set sloc of
3206 generated exception handler appropriately when debugging generated code.
3207 Deal properly with No_Exception_Propagation restriction mode.
3208 (Expand_N_Abort_Statement): Add an unchecked type conversion from
3209 System.Address to System.Tasking.Task_Id when processing the result of
3210 the predefined primitive _disp_get_task_id.
3211 (Expand_N_Asynchronous_Select): Clarify comment.
3212 (Expand_N_Protected_Type_Declaration): Minor code cleanup.
3213 (Find_Parameter_Type): New routine inside Type_Conformant_Parameters.
3214 (Type_Conformant_Parameters): New parameter Prim_Op_Typ. Code cleanup.
3215 (Add_Private_Declarations, Build_Protected_Body): Use proper slocs for
3216 privals and for generated call to Complete_Entry_Body, for better gdb
3218 (Copy_Result_Type): Utility to construct a parameter and result profile
3219 for protected functions whose return type is an anonymous access to
3221 (Build_Protected_Sub_Spec and Expand_Access_Protected_Subprogram_Type):
3223 (Build_Task_Activation_Call): Insert Activate_Tasks call at proper
3224 point when the local-raise-to-goto transformation has taken place.
3226 2007-06-06 Javier Miranda <miranda@adacore.com>
3227 Nicolas Setton <setton@adacore.com>
3229 * exp_dbug.adb (Get_Encoded_Name): Modified to continue providing its
3230 functionality when the backend is generating code.
3231 Otherwise any serious error
3232 reported by the backend calling the frontend routine Error_Msg
3233 changes the Compilation_Mode to Check_Semantics, disables the
3234 functionality of this routine and causes the generation of
3235 spureous additional errors.
3237 * exp_dbug.ads (Pointers to Unconstrained Arrays): Document the
3238 debugging information now generated by the compiler for fat-pointer
3240 Document the contents of DW_AT_producer in the GNAT Vendor extensions to
3242 Document GNAT Vendor extensions to DWARF 2/3 and the "-gdwarf+" switch.
3244 2007-06-06 Thomas Quinot <quinot@adacore.com>
3246 * exp_dist.ads, exp_dist.adb (Make_Transportable_Check): New subprogram
3247 (GARLIC_Support.Build_Subprogram_Receiving_Stubs,
3248 PolyORB_Support.Build_Subprogram_Receiving_Stubs):
3249 For a remote call to a function with a classwide return type, apply an
3250 E.4(18) check to the returned value.
3251 (Add_RACW_Primitive_Declarations_And_Bodies): Do not generate stubs for
3252 stream attributes of the designated type of an RACW, as they are not
3253 dispatching primitive operations.
3255 2007-06-06 Geert Bosch <bosch@adacore.com>
3257 * exp_fixd.adb (Integer_Literal): Add optional argument to construct a
3259 (Do_Divide_Fixed_Fixed): Add comments to indicate Frac is always
3261 (Do_Divide_Fixed_Universal): Handle case of negative Frac.
3262 (Do_Multiply_Fixed_Fixed): Add coments to indicate Frac is always
3264 (Do_Multiply_Fixed_Universal): Handle case of negative Frac.
3266 2007-06-06 Javier Miranda <miranda@adacore.com>
3268 * exp_imgv.adb (Expand_Value_Attribute): Disable compilation of this
3269 attribute compiling package Ada.Tags under No_Run_Time_Mode.
3271 2007-06-06 Javier Miranda <miranda@adacore.com>
3273 * exp_intr.adb (Expand_Unc_Deallocation): Add missing support for
3274 deallocation of class-wide interface objects.
3275 (Expand_Dispatching_Constructor_Call): Take into account that if the
3276 result of the dispatching constructor is an interface type, the
3277 function returns a class-wide interface type; otherwise the returned
3278 object would be actual. The frontend previously accepted returning
3279 interface types because Expand_Interface_Actuals silently performed
3280 the management of the returned type "as if" it were a class-wide
3282 (Expand_Dispatching_Constructor_Call): Replace call to
3283 Make_DT_Access_Action by direct call to Make_Function_Call.
3285 2007-06-06 Robert Dewar <dewar@adacore.com>
3286 Ed Schonberg <schonberg@adacore.com>
3288 * exp_pakd.adb (Expand_Packed_Not): Use RM_Size rather than ESize to
3289 compute masking constant, since we now set Esize properly to the
3291 (Create_Packed_Array_Type): Set proper Esize value adjusted as required
3292 to match the alignment.
3293 (Create_Packed_Array_Type): Use Short_Short_Unsigned as base type for
3294 packed arrays of 8 bits or less.
3296 * freeze.adb (Freeze_Entity): When freezing the formals of a
3297 subprogram, freeze the designated type of a parameter of an access type
3298 only if it is an access parameter.
3299 Increase size of C convention enumeration object
3300 (Freeze_Entity, array type case): Make sure Esize value is properly
3301 adjusted for the alignment if it is known.
3302 (Freeze_Entity, array type case): When checking bit packed arrays for
3303 the size being incorrect, check RM_Size, not Esize.
3304 (Freeze_Record_Type): Check for bad discriminated record convention
3305 (In_Exp_Body): Return true if the body is generated for a subprogram
3306 renaming, either an attribute renaming or a renaming as body.
3307 (Check_Itype): If the designated type of an anonymous access component
3308 is a non-protected subprogram type, indicate that it is frozen, to
3309 prevent out-of-scope freeze node at some subsequent call.
3310 (Freeze_Subprogram): On OpenVMS, reject descriptor passing mechanism
3311 only if the subprogram is neither imported nor exported, as well as the
3312 NCA descriptor class if the subprogram is exported.
3314 2007-06-06 Ed Schonberg <schonberg@adacore.com>
3315 Arnaud Charlet <charlet@adacore.com>
3316 Robert Dewar <dewar@adacore.com>
3317 Gary Dismukes <dismukes@adacore.com>
3319 * exp_prag.adb (Expand_Pragma_Import_Or_Interface): Remove properly a
3320 default initialization on an imported object, when there is no
3321 initialization call generated for it.
3322 (Expand_Pragma_Assert): Add handling of No_Exception_Propagation
3325 * snames.h, snames.ads, snames.adb, par-prag.adb: New pragma
3326 Static_Elaboration_Desired.
3327 Remove pragma Thread_Body.
3328 Implement a new pragma No_Body
3329 Removes the Explicit_Overriding pragma
3330 Remove Optional_Overriding pragma
3331 (Prag): Deal with Universal_Aliasing.
3332 (Name_CIL, Name_CIL_Constructor, Convention_CIL,
3333 Pragma_CIL_Constructor): New names.
3335 * sem_cat.adb (Validate_Object_Declaration): An initialization that
3336 uses the equivalent aggregate of a type must be treated as an implicit
3338 (Get_Categorization): Check a unit for pragma Preelaborate only if it
3339 has none of the other categories.
3340 (Process_Import_Or_Interface_Pragma): Report an error for an attempt
3341 to apply Import to an object renaming declaration.
3343 * sem_prag.adb (Process_Import_Or_Interface): Warn that a type imported
3344 from a C++ class should be declared as limited and that it will be
3345 considererd limited.
3346 (Analyze_Pragma): Warn that a type specified with pragma CPP_Class
3347 should be declared as limited and that it will be considererd limited.
3348 (Ada_2005_Pragma): New procedure, used to deal with Ada 2005 pragmas
3349 (Analyze_Pragma, case Export): Diagnose export of enumeration literal
3350 (Analyze_Pragma): Deal with Universal_Aliasing.
3351 (Sig_Flags): Likewise.
3352 (Set_Encoded_Interface_Name): Suppress encoding when compiling for AAMP.
3353 (Overflow_Checks_Unsuppressed): New flag.
3354 (Process_Suppress_Unsuppress): Set Overflow_Checks_Unsuppressed.
3355 (Analyze_Pragma [case Pack]): Ignore pragma Pack and post warning in
3356 case of JVM or .NET targets, and compiling user code.
3357 Add debugging convenience routine rv
3359 2007-06-06 Robert Dewar <dewar@adacore.com>
3361 * exp_strm.adb (Make_Field_Attributes): Avoid _Parent components that
3363 (Build_Elementary_Input_Call): For floating-point use right type in the
3364 absence of strange size or stream size clauses.
3365 (Build_Elementary_Write_Call): Same fix
3366 (Has_Stream_Standard_Rep): Returns False if Stream_Size attribute
3367 set to value that does not match base type size.
3369 2007-06-06 Ed Schonberg <schonberg@adacore.com>
3371 * exp_util.ads, exp_util.adb (Expand_Subtype_From_Expr): In Ada2005, an
3372 object of a limited type can be initialized with a call to a function
3373 that returns in place. If the limited type has unknown discriminants,
3374 and the underlying type is a constrained composite type, build an actual
3375 subtype from the function call, as is done for private types.
3376 (Side_Effect_Free): An expression that is the renaming of an object or
3377 whose prefix is the renaming of a object, is not side-effect free
3378 because it may be assigned through the renaming and its value must be
3379 captured in a temporary.
3380 (Has_Controlled_Coextensions): New routine.
3381 (Expand_Subtype_From_Expr): Do nothing if type is a limited interface,
3382 as is done for other limited types.
3383 (Non_Limited_Designated_Type): new predicate.
3384 (Make_CW_Equivalent_Type): Modified to handle class-wide interface
3386 Remove all handling of with_type clauses.
3388 * par-ch10.adb: Remove all handling of with_type clauses.
3390 * lib-load.ads, lib-load.adb (Load_Main_Source): Do not get the
3391 checksum if the main source could not be parsed.
3392 (Loat_Unit): When processing a child unit, determine properly whether
3393 the parent unit is a renaming when the parent is itself a child unit.
3394 Remove handling of with_type clauses.
3396 * sinfo.ads, sinfo.adb (Is_Static_Coextension): New function.
3397 (Set_Is_Static_Coextension): New procedure.
3398 (Has_Local_Raise): New function
3399 (Set_Has_Local_Raise): New procedure
3400 (Renaming_Exception): New field
3401 (Has_Init_Expression): New flag
3402 (Delay_Finalize_Attach): Remove because flag is obsolete.
3403 (Set_Delay_Finalize_Attach): Remove because flag is obsolete.
3404 Remove all handling of with_type clauses.
3405 (Exception_Junk): Can now be set in N_Block_Statement
3407 2007-06-06 Vincent Celier <celier@adacore.com>
3408 Robert Dewar <dewar@adacore.com>
3410 * frontend.adb (Frontend): Return immediately if the main source could
3411 not be parsed, because of preprocessing errors.
3413 * gnat1drv.adb (gnat1drv): Handle RE_Not_Available gracefully.
3414 (Gnat1drv): Exit with errors if the main source could not be parsed,
3415 because of preprocessing errors.
3416 (Check_Rep_Info): New procedure
3418 2007-06-06 Robert Dewar <dewar@adacore.com>
3420 * g-hesorg.ads, g-heasor.ads,
3421 g-busorg.ads, g-bubsor.ads: Update documentation
3422 GNAT.Heap/Bubble_Sort_G is now pure
3424 2007-06-06 Robert Dewar <dewar@adacore.com>
3426 * g-catiio.ads, g-catiio.adb (Image): Check for null picture string
3428 2007-06-06 Robert Dewar <dewar@adacore.com>
3429 Ed Schonberg <schonberg@adacore.com>
3431 * g-comlin.ads, g-comlin.adb:
3432 Add new warning for renaming of function return objects
3434 * opt.adb (Tree_Write, Tree_Read): Use proper expressions for size
3435 (Tree_Read): Use size of object instead of type'object_size, since the
3436 latter is incorrect for packed array types.
3437 (Tree_Write): Same fix
3439 * opt.ads: Add new warning for renaming of function return objects
3440 (Generating_Code): New boolean variable used to indicate that the
3441 frontend as finished its work and has called the backend to process
3442 the tree and generate the object file.
3443 (GCC_Version): Is now private
3444 (Static_Dispatch_Tables): New constant declaration.
3445 (Overflow_Checks_Unsuppressed): New flag.
3446 (Process_Suppress_Unsuppress): Set Overflow_Checks_Unsuppressed.
3447 (List_Closure): New flag for gnatbind (-R)
3448 Zero_Formatting: New flag for gnatbind (-Z)
3449 (Special_Exception_Package_Used): New flag.
3450 (Warn_On_Unrepped_Components): New flag.
3452 * sem_ch8.adb (Check_Library_Unit_Renaming): Check that the renamed
3453 unit is a compilation unit, rather than relying on its scope, so that
3454 Standard can be renamed.
3455 (Analyze_Object_Renaming): Add new warning for renaming of function
3457 Also reject attempt to rename function return object in Ada 83 mode.
3458 (Attribute_Renaming): In case of tagged types, add the body of the
3459 generated function to the freezing actions of the type.
3460 (Find_Type): A protected type is visible right after the reserved word
3461 "is" is encountered in its type declaration. Set the entity and type
3462 rather than emitting an error message.
3463 (New_Scope): Properly propagate Discard_Names to inner scopes
3464 (Check_Nested_Access): New procedure.
3465 (Has_Nested_Access, Set_Has_Nested_Access): New procedures.
3466 (Find_Direct_Name, Note_Possible_Modification): Use Check_Nested_Access.
3468 * sem_warn.ads, sem_warn.adb: Improvements to infinite loop warning
3469 Add new warning for renaming of function return objects
3470 (Check_References): Suppress warnings for objects whose type or
3471 base type has Warnings suppressed.
3472 (Set_Dot_Warning_Switch): Add processing for -gnatw.c/C
3473 (Set_Warning_Switch): Include new -gnatwc in -gnatwa
3475 2007-06-06 Vincent Celier <celier@adacore.com>
3476 Emmanuel Briot <briot@adacore.com>
3477 Olivier Hainque <hainque@adacore.com>
3479 * g-debpoo.ads, g-debpoo.adb (Free_Physically.Free_Blocks): Use the
3480 absolute value of Header.Block_Size when displaying the freed physical
3482 (Allocate): Compute Storage_Address using Integer_Address, not
3483 Storage_Offset, because the range of Storage_Offset may not be large
3485 (Configure): New parameter Low_Level_Traces
3486 (Allocate, Deallocation, Free_Physically): Added low-level traces
3487 (Configure): new parameter Errors_To_Stdout.
3488 (Output_File): new subprogram
3489 (Deallocate, Dereference): Send error messages to the proper stream
3490 (Print_Pool, Print_Info_Stdout): Make sure the output goes to stdout, as
3491 documented. Previous code would send it to the current output file
3492 defined in GNAT.IO, which might not be stdout
3493 (Is_Valid): Adjust comment to mention that a positive reply means that
3494 Header_Of may be used to retrieve the allocation header associated with
3495 the subprogram Storage address argument. Return False early if this
3496 address argument is misaligned.
3498 2007-06-06 Vincent Celier <celier@adacore.com>
3500 * gnatcmd.adb (GNATCmd): Accept switch -aP for commands that accept
3502 (ASIS_Main): New global variable
3503 (Get_Closure): New procedure
3504 (GNATCmd): Set ASIS_Main when -P and -U with a main is used for gnat
3505 check, metric or pretty. Call Get_Closure in this case.
3506 (Check_Files): For GNAT LIST, check all sources of all projects when
3507 All_Projects is True.
3508 (GNATCmd): Accept -U for GNAT LIST
3510 2007-06-06 Vincent Celier <celier@adacore.com>
3512 * gnatlink.adb (Gnatlink): Do not specify -static-libgcc when --LINK=
3514 Correct error message when invocation of the linker fails
3515 Add explicit size clause for the C imported variables
3516 Object_List_File_Supported and Using_GNU_Linker to emphasize that
3517 we expect char size.
3518 Read target parameters earlier, since this is needed to set
3519 Target_VM properly. Also do not use -static/shared-libgcc for non GCC
3522 2007-06-06 Vincent Celier <celier@adacore.com>
3525 Add 3 spaces before the default project directory when displaying
3526 the project search path.
3527 Add new command line switch '-l' to display license information.
3529 2007-06-06 Vasiliy Fofanov <fofanov@adacore.com>
3531 * gmem.c: Add support for timestamps on memory operations.
3533 * memtrack.adb, gnatmem.adb: Add support for timestamps on memory
3534 operations (not used currently, just foundation for future
3535 enhancements). Add possibility to perform full dump of gmem.out file.
3536 (Print_Back_Traces): Declare accesses to root arrays constants since
3537 they aren't modified.
3538 (Print_Back_Traces): allocate root arrays on the heap rather than stack.
3540 2007-06-06 Vincent Celier <celier@adacore.com>
3542 * gnatsym.adb: Update Copyright notice
3543 (Parse_Cmd_Line): Accept new switch -D
3544 (Gnatsym): In Direct policy (switch -D) copy reference file to symbol
3547 * prj.ads (Policy): New policy Direct
3548 (Yes_No_Unknown): New enumeration type
3549 (Project_Data): New component Libgnarl_Needed
3551 * prj-nmsc.adb (Check_For_Source): When recording a source file make
3552 use the untouched pathname casing.
3553 (Get_Directories): Ensure that the Display_Exec_Directory is using the
3554 proper casing on non case-sensitive platforms like Windows.
3555 (Get_Unit): Accept file names x__... and x~... (where x = a, g, i or s)
3556 on all platforms, as it is not possible to know which one is allowed
3557 before processing the project files.
3558 (Check_Stand_Alone_Library): Check that Library_Reference_Symbol_File is
3559 specified when symbol policy is Direct. Check that when there is a
3560 symbol file defined (either by default or with attribute
3561 Library_Symbol_File) it is not the same as the reference symbol file.
3562 (Check_Stand_Alone_Library): Recognize new symbol policy Direct.
3563 (Look_For_Sources): Allow Locally_Removed_Files to be declare in non
3565 (Record_Ada_Source): Record a source that has been locally removed in an
3568 * symbols.ads (Policy): New policy Direct
3570 * symbols-vms.adb (Initialize): Take new policy Direct in case
3573 2007-06-06 Vincent Celier <celier@adacore.com>
3575 * g-os_lib.ads, g-os_lib.adb (Normalize_Pathname.Get_Directory):
3576 Correct obvious bug (return Dir; instead of return Directory;).
3577 (Normalize_Pathname): Use Reference_Dir'Length, not Reference_Dir'Last
3579 2007-06-06 Thomas Quinot <quinot@adacore.com>
3581 * g-pehage.adb (Produce): Open output files in Binary mode, so that
3582 they have UNIX line endings (LF only) even on Windows, and thus pass
3583 all GNAT style checks.
3585 2007-06-06 Emmanuel Briot <briot@adacore.com>
3587 * g-regpat.adb (Quote): Fix improper quoting of '.'
3589 2007-06-06 Thomas Quinot <quinot@adacore.com>
3591 * g-soccon.ads: Add new constant Thread_Blocking_IO, always True by
3592 default, set False on a per-runtime basis.
3593 (Need_Netdb_Buffer): New constant.
3595 * g-socket.ads, g-socket.adb: Import new package
3596 GNAT.Sockets.Thin.Task_Safe_NetDB.
3597 (Raise_Host_Error): Use Host_Error_Message from platform-specific thin
3598 binding to obtain proper message.
3599 (Close_Selector): Use GNAT.Sockets.Thin.Signalling_Fds.Close.
3600 Replace various occurrences of Arry (Arry'First)'Address with the
3601 equivalent Arry'Address (GNAT always follows implementation advice from
3603 (Get_Host_By_Address, Get_Host_By_Name,
3604 Get_Service_By_Name, Get_Service_By_Port): Do not use GNAT.Task_Lock;
3605 instead, rely on platform-specific task safe netdb operations provided
3608 * g-socthi.ads, g-socthi.adb (Initialize): Remove obsolete formal
3609 parameter Process_Blocking_IO.
3610 (Host_Error_Messages): Add stub body.
3611 (GNAT.Sockets.Thin.Signalling_Fds): New procedure Close.
3612 (Safe_Gethostbyname, Safe_Gethostbyaddr, Safe_Getservbyname,
3613 Safe_Getservbyport): Move functions into new child package
3615 (Nonreentrant_Gethostbyname, Nonreentrant_Gethostbyaddr,
3616 Nonreentrant_Getservbyname, Nonreentrant_Getservbyport): New routines.
3617 (In_Addr): Add alignment clause.
3619 2007-06-06 Robert Dewar <dewar@adacore.com>
3621 * g-trasym.ads, g-traceb.ads: Update list of supported targets
3622 Add note about symbolic traceback
3624 2007-06-06 Pascal Obry <obry@adacore.com>
3626 * hostparm.ads (Normalized_CWD): Use the host directory separator
3627 instead of the hardcoded forward slash which is not the proper
3628 character on Windows for example.
3631 2007-06-06 Vincent Celier <celier@adacore.com>
3632 Arnaud Charlet <charlet@adacore.com>
3634 * a-clrefi.adb, a-clrefi.ads: New files
3636 * impunit.adb: Add s-os_lib in the list of user visible units.
3637 (Non_Imp_File_Names_95): Add a-clrefi to this list
3638 Remove obsolete run-time entries.
3639 (Non_Imp_File_Names_05): Add Ada 2005 entries for:
3640 "a-exetim" -- Ada.Execution_Time
3641 "a-extiti" -- Ada.Execution_Time.Timers
3643 * mlib-prj.ads, mlib-prj.adb
3644 (Build_Library): Use untouched object dir and library dir. At the
3645 same time makes sure that the checks are done using the canonical
3646 form. Removes hard-coded directory separator and use the proper host
3648 (Process_Project): Do not look in object directory to check if libgnarl
3649 is needed for a library, if there is no object directory.
3650 (Build_Library): Scan the ALI files to decide if libgnarl is needed for
3652 (Build_Library): When invoking gnatbind, use a response file if the
3653 total size of the arguments is too large.
3655 * Makefile.rtl: (g-sttsne): New object file.
3656 Add entry for a-clrefi, s-utf_32, System.Exceptions
3658 * Make-lang.in: Remove bogus dependency of s-memory.o on memtrack.o.
3659 (GNAT_ADA_OBJS, GNATBIND_OBJS): Add s-except.o.
3660 (GNATBIND_OBJS): Add new objects a-clrefi.o and a-comlin.o
3661 Change g-string to s-string, g-os_lib to s-os_lib
3662 Change all g-utf_32 references to s-utf_32
3664 2007-06-06 Tristan Gingold <gingold@adacore.com>
3665 Olivier Hainque <hainque@adacore.com>
3667 * init.c: Do not adjust IP of an imported VMS exception of ia64.
3668 LIB$STOP is called to raise an exception and the IP of the exception
3669 is the instruction right after the call.
3670 (__gnat_adjust_context_for_raise, AIX): Implement.
3671 (__gnat_error_handler, AIX): Accept SIGINFO related arguments and call
3672 adjust_context_for_raise before Raise_From_Signal_Hanler.
3673 (__gnat_install_handler, AIX): Add SA_SIGINFO to the sa_flags, to ensure
3674 siginfo is passed to the handler, necessary to let the zcx propagation