1 2001-10-25 Ed Schonberg <schonber@gnat.com>
3 * sem_elab.adb (Check_A_Call): check for renaming before finding the
4 enclosing unit, which may already be different from the calling unit.
6 2001-10-25 Geert Bosch <bosch@gnat.com>
8 * 4gintnam.ads: fix header format.
10 2001-10-25 Ed Schonberg <schonber@gnat.com>
12 * sem_res.adb (Resolve_Call): if the call is actually an indexing
13 operation on the result of a parameterless call, perform elaboration
14 check after the node has been properly rewritten.
16 * sem_ch12.adb (Copy_Generic_Node): after the proper body has been
17 inlined within the generic tree, the defining identifier is not a
20 2001-10-25 Ed Schonberg <schonber@gnat.com>
22 * sem_res.adb (Resolve): special-case resolution of Null in an
23 instance or an inlined body to avoid view conflicts.
25 * sem_ch12.adb (Copy_Generic_Node): for allocators, check for view
26 compatibility by retrieving the access type of the generic copy.
28 2001-10-25 Robert Dewar <dewar@gnat.com>
31 (Analyze_Number_Declaration): Handle error expression.
32 (Signed_Integer_Type_Declaration): Handle error bound.
33 (Analyze_Subtype_Indication): Handle error range.
35 * sem_util.adb (Get_Index_Bounds): Check for Error.
37 2001-10-25 Robert Dewar <dewar@gnat.com>
39 * restrict.adb (Set_No_Run_Time_Mode): Set Discard_Names as default
42 2001-10-25 Pascal Obry <obry@gnat.com>
44 * gnatmem.adb (Read_Next): fix Curs2 value to properly handle quiet
45 mode case for ALLOC case.
47 * gnatmem.adb (Read_Next): correctly fix parsing in Quiet mode on
48 all platforms. Improvement of last change.
50 2001-10-25 Robert Dewar <dewar@gnat.com>
52 * exp_ch4.adb (Expand_N_Allocator): Minor reformatting.
54 2001-10-25 Geert Bosch <bosch@gnat.com>
56 * osint.adb (Is_Relative): Remove duplicate.
58 2001-10-25 Pascal Obry <obry@gnat.com>
60 * osint.adb (Read_Default_Search_Dirs): correctly detect relative
61 pathnames in UNIX and DOS style with drive letter.
62 (Is_Relative): new routine.
64 * osint.adb: Minor reformatting
66 * osint.adb (Is_Relative): implementation using
67 GNAT.OS_Lib.Is_Absolute_Path. Better fix.
69 2001-10-25 Pascal Obry <obry@gnat.com>
71 * g-dirope.adb (Basename): correctly compute offset between the
72 original Path and the translated one.
74 * g-dirope.adb: (Base_Name): add some comments.
76 2001-10-25 Robert Dewar <dewar@gnat.com>
78 * exp_imgv.adb (Expand_Image_Attribute): Defend against bad use
79 in HIE mode, avoids compilation abandoned message
81 * exp_imgv.adb: Correct typo in previous change
83 * exp_imgv.adb: Correct typo in previous change (not my day!)
85 2001-10-25 Robert Dewar <dewar@gnat.com>
87 * s-tpinop.ads: Add 2001 to copyright notice. Fix header format.
89 2001-10-25 Pascal Obry <obry@gnat.com>
91 * g-awk.ads: Move all pragma inlines next to the routine
92 declarations. This is more uniform with other GNAT spec.
94 2001-10-22 Geert Bosch <bosch@gnat.com>
96 * Make-lang.in (gnattools, cross-gnattools): Remove gnatmem.
98 2001-10-19 Geert Bosch <bosch@gnat.com>
100 * Makefile.in (tools, gnattools): Remove gnatmem.
102 2001-10-17 Richard Henderson <rth@redhat.com>
104 * Makefile.in (misc.o): Depend on langhooks.h.
105 * misc.c: Include it.
106 (LANG_HOOKS_INIT, LANG_HOOKS_INIT_OPTIONS): New.
107 (LANG_HOOKS_DECODE_OPTION): New.
108 (lang_hooks): Use LANG_HOOKS_INITIALIZER.
110 2001-10-16 Florian Weimer <fw@deneb.enyo.de>
112 * trans.c (tree_transform): Adjust to recent change in
113 expand_asm_operands to implement named asm operands.
115 2001-10-11 Ed Schonberg <schonber@gnat.com>
117 * exp_ch8.adb (Expand_N_Object_Renaming_Declaration): Bugfix in
118 renaming of discriminant for mutable record type.
120 2001-10-11 Robert Dewar <dewar@gnat.com>
122 * validsw.adb: Properly save -gnatVn status.
124 2001-10-11 Robert Dewar <dewar@gnat.com>
126 * usage.adb: Add lines for V switch.
128 * gnatcmd.adb (COMPILE): Revise translations for -gnatV
129 (/VALIDITY_CHECKING).
131 2001-10-11 Ed Schonberg <schonber@gnat.com>
133 * sem_type.adb (Add_One_Interp): an operator for a type declared in
134 an extension of System is known to be visible.
136 2001-10-11 Ed Schonberg <schonber@gnat.com>
138 * sem_eval.adb (Compare_Fixup): get the bounds of a String_Literal
139 properly. Fixes regression on ACATS C34005G.
141 2001-10-11 Robert Dewar <dewar@gnat.com>
143 * sem_ch5.adb (Analyze_Iteration_Scheme): Suppress warning on null
144 loop in generic instance, since this is likely not very useful.
146 2001-10-11 Robert Dewar <dewar@gnat.com>
148 * restrict.adb (Disallow in No_Run_Time_Mode): Properly specialize
149 the error message for high integrity mode.
151 * rtsfind.adb (RTE): Give message if we try to find an entity that
152 is not available in high integrity mode.
155 (OK_To_Use_In_HIE_Mode): New array.
156 (RTE): May return Empty in high integrity mode.
158 * rtsfind.ads (OK_To_Use_In_No_Run_Time_Mode): New name for
159 OK_To_Use_In_HIE_Mode, now includes System_FAT_xxx.
161 * sem_ch6.adb (Analyze_Subprogram_Body): Kill body in predefined
162 unit if not inlined always and in no runtime mode. Fixes problem
163 caused by new Rtsfind changes.
165 * sem_ch6.adb (Analyze_Subrogram_Body): Do not Check_References if
168 * rtsfind.adb (RTE): Make sure we do not try to load unit after
169 giving message for entity not available in high integrity mode.
171 2001-10-11 Pascal Obry <obry@gnat.com>
173 * impunit.adb: Add GNAT.CRC32.
175 2001-10-11 Ed Schonberg <schonber@gnat.com>
177 * exp_fixd.adb (Expand_Multiply_Fixed_By_Fixed_Giving_Fixed): handle
178 properly the case where one universal operand in a non-static
179 exponentiation of a real literal.
181 2001-10-11 Ed Schonberg <schonber@gnat.com>
183 * exp_ch7.adb (Find_Final_List): for a type appearing in a with_type
184 clause, return the gobal finalization list, for lack of anthing else.
186 2001-10-11 Ed Schonberg <schonber@gnat.com>
188 * exp_ch7.adb (Make_Transient_Block): if statement is within
189 exception handler, always use new transient scope to place Clean
192 2001-10-11 Pascal Obry <obry@gnat.com>
195 (GNAT_ADA_OBJS): add g-crc32.o, a-tags.o, a-stream.o
196 (GNATBIND_OBJS): add g-crc32.o, a-tags.o, a-stream.o
197 (GNATLS_RTL_OBJS): add g-crc32.o
198 (GNATMAKE_RTL_OBJS): add g-crc32.o
201 (CRC_Match): new function.
202 (Get_File_Checksum): renamed Get_File_CRC. Use the GNAT.CRC32 unit
203 instead of the previous simple checksum algorithm.
204 (Time_Stamp_Mismatch): use CRC_Match for comparison.
205 (Set_Source_Table): idem.
208 (Get_File_Checksum): renamed Get_File_CRC as now we compute CRC
209 instead of simple checksum.
210 (CRC_Match): new function.
211 (CRC_Error): new constant.
213 * ali.adb (Scan_ALI): rename variable Chk to CRC as we are handling
214 a CRC now and not a simple checksum. A CRC uses lower-case hex
215 letters, fixes ambiguity in parsing.
217 * ali.ads (Sdep_Record.Checksum): renamed Sdep_Record.CRC as this
218 is what this variable will store.
220 * bcheck.adb: Change reference to chechsum in comments by CRC.
221 (Check_Consistency): Rename Get_File_Checksum to Get_File_CRC.
222 rename All_Checksum_Match to All_CRC_Match. Change due to API
223 renaming since now GNAT does not use a simple checksum but a
224 CRC using GNAT.CRC32.
226 * gnatls.adb: Rename Checksum to CRC in many places, we use a CRC
227 now and not anymore a simple checksum.
229 * lib-load.adb: Use Source_CRC instead of Source_Checksum in many
232 * lib-writ.adb (Write_ALI): Use Source_CRC instead of Source_Checksum.
235 (Restore_Scan_State): rename Checksum to CRC.
236 (Save_Scan_State): idem.
240 (Checksum): rename to CRC.
241 (Saved_Scan_State): Save_Checksum field renamed to Save_CRC
243 * scn-nlit.adb: Rename many Accumulate_Checksum to Update (from
244 GNAT.CRC32). Update copyright notice.
246 * scn-slit.adb: Rename many Accumulate_Checksum to Update (from
247 GNAT.CRC32). Update copyright notice.
250 (Accumulate_Checksum): removed.
251 (Update): new procedure. Add a wide-character into the CRC.
254 (Complete_Source_File_Entry): use CRC32 instead of simple checksum.
255 (Load_File): fix initialization of S (change Source_Checksum to
258 * sinput-p.adb (Load_Project_File): rename Source_Checksum to
259 Source_CRC in S initialization.
261 * sinput.adb (Source_Checksum): renamed to Source_CRC.
263 * sinput.ads (Source_Checksum): renamed to Source_CRC.
264 Update comments for the CRC.
266 * types.adb (Hex): Use lowercase for the letter part.
268 * types.ads (Get_Hex_String): Returns the hexadecimal representation
269 for a word. This is currently used only for CRC. In previous version,
270 the checksum was using a representation with all letter being
271 upper-case. With the new implementation (using CRC) we do not remove
272 the 32th bit of the CRC, so we can have an upper-case starting letter
273 in the CRC. This is not possible to parse in Scan_ALI (ali.adb).
274 It is ambigous since the CRC was optional and could be followed by
275 options like EB, EE. So now this routines uses lower-case letter for
276 the hexadecimal representation. Strange enough only lower case letters
277 where checked in Scan_ALI (even if this was not a possible case).
279 * gnatvsn.ads (Library_Version): changed to 3.15a.
281 * s-crc32.ads: Initial version from GNAT.CRC32. This is the version
284 * s-crc32.adb: Initial version from GNAT.CRC32. This is the version
287 * ali-util.adb: Redo previous change to avoid using word CRC everywhere
288 Add 2001 to copyright notice
289 (Accumulate_Checksum): Modify to use System.CRC32.
291 * ali-util.ads: Redo changes of previous revision to continue to use
292 the word Checksum. Add 2001 to copyright notice.
294 * ali.adb: Undo some of previous changes, not needed.
295 Keep the change for lower case letters in the checksum.
297 * ali.ads: Undo previous change not needed.
299 * bcheck.adb: Undo most of previous change, not needed.
300 But do use Checksums_Match for checksum comparison.
302 * gnatls.adb: Undo most of previous change, not needed.
303 But do use Checksums_Match for comparing checksums.
305 * lib-load.adb: Undo previous change, not needed.
307 * lib-writ.adb: Undo previous change, not needed.
309 * lib-writ.ads: Document that checksums use lower case,
310 not upper case letters.
312 * scans.adb: Undo previous change, not needed
314 * scans.ads: Undo previous change, not needed.
316 * scn-nlit.adb: Undo previous changes, not needed.
318 * scn-slit.adb: Undo previous change, not needed. Fix header format.
321 (Accumulate_Checksum): Use System.CRC32.
322 (Initialize_Checksum): New procedure.
323 Remove other changes of previous revision.
325 * sinput-p.adb: Undo previous change, not needed.
327 * sinput.adb: Undo previous change, not needed.
329 * sinput-l.adb: Undo previous change, not needed.
331 * sinput.ads: Undo previous change, not needed. Keep only comment
332 on new checksum algorithm
334 * Makefile.in: Add s-crc32 as needed, remove g-crc32.
335 Also remove a-tags and a-stream from GNAT sources.
337 * ali.adb (Scan_ALI): fix typo introduce in latest check-in.
339 * Makefile.in (GNATRTL_NONTASKING_OBJS): Add g-crc32.o.
341 2001-10-11 Geert Bosch <bosch@gnat.com>
343 * einfo.h: Regenerate.
345 * nmake.ads: Regenerate.
347 * nmake.adb: Regenerate.
349 * sinfo.h: Regenerate.
351 * treeprs.adb: Regenerate.
353 2001-10-10 Geert Bosch <bosch@gnat.com>
355 * gnat-style.texi: New file describing coding guidelines for Ada.
357 2001-10-10 Ed Schonberg <schonber@gnat.com>
359 * einfo.adb (Write_Entity_Flags): Elaboration_Entity_Required
362 2001-10-10 Geert Bosch <bosch@gnat.com>
364 * snames.ads: Add new names for project facility.
366 * snames.adb: Update to reflect snames.ads changes.
368 * snames.h: Update to reflect snames.ads changes.
370 2001-10-10 Vincent Celier <celier@gnat.com>
373 (Add_Switches): reflect the changes for the switches attributes
374 Default_Switches indexed by the programming language,
375 Switches indexed by the file name.
376 (Collect_Arguments_And_Compile): Idem.
377 Reflect the attribute name changes.
380 (Initialisation_Data): Change the names of some packages and
382 (Initialize): process case insensitive associative arrays.
385 (Attribute_Kind): Remove Both, add Case_Insensitive_Associative_Array.
388 (Parse_Attribute_Declaration): For case insensitive associative
389 arrays, set the index string to lower case.
392 Reflect the changes of the project attributes.
395 Replace Check_Naming_Scheme by Ada_Check and
396 Language_Independent_Check.
399 Replaced Check_Naming_Scheme by 2 procedures:
400 Ada_Check and Language_Independent_Check.
403 (Process_Declarative_Items): For case-insensitive associative
404 arrays, set the index string to lower case.
405 (Recursive_Check): Call Prj.Nmsc.Ada_Check, instead of
406 Prj.Nmsc.Check_Naming_Scheme.
409 (Case_Insensitive): New function
410 (Set_Case_Insensitive): New procedure
413 (Case_Insensitive): New function
414 (Set_Case_Insensitive): New procedure
415 (Project_Node_Record): New flag Case_Insensitive.
418 (Value_Of): new function to get the string value of a single
419 string variable or attribute.
422 (Value_Of): new function to get the string value of a single
423 string variable or attribute.
426 (Ada_Default_Spec_Suffix): New function
427 (Ada_Default_Impl_Suffix): New function
428 Change definitions of several constants to reflect
429 new components of record types.
432 (Naming_Data): Change several components to reflect new
433 elements of naming schemes.
434 (Project_Data): New flags Sources_Present and
435 Language_Independent_Checked.
436 (Ada_Default_Spec_Suffix): New function.
437 (Ada_Default_Impl_Suffix): New function.
440 Modification of predefined names for project manager: added
441 Implementation, Specification_Exceptions, Implementation_Exceptions,
442 Specification_Suffix, Implementation_Suffix, Separate_Suffix,
443 Default_Switches, _Languages, Builder, Cross_Reference,
444 Finder. Removed Body_Part, Specification_Append, Body_Append,
445 Separate_Append, Gnatmake, Gnatxref, Gnatfind, Gnatbind,
448 * prj.ads: (Ada_Default_Spec_Suffix, Ada_Default_Impl_Suffix):
451 * prj-nmsc.adb (Ada_Check): Test that Separate_Suffix is defaulted,
452 not that it is Nil_Variable_Value.
454 * prj.ads: Add ??? for uncommented declarations
456 2001-10-10 Ed Schonberg <schonber@gnat.com>
458 * sem_prag.adb: (Analyze_Pragma, case External): If entity is a
459 constant, do not indicate possible modification, so that gigi can
460 treat it as a bona fide constant.
462 2001-10-10 Robert Dewar <dewar@gnat.com>
464 * sem_prag.adb: Add processing for pragma External.
466 * snames.ads: Add entry for pragma External.
468 * par-prag.adb: Add pragma External.
470 * snames.adb: Updated to match snames.ads.
472 2001-10-10 Ed Schonberg <schonber@gnat.com>
474 * exp_ch4.adb (Expand_N_Allocator): Generate meaningful names for
475 a dynamic task if the allocator appears in an indexed assignment
476 or selected component assignment.
478 * exp_util.adb (Build_Task_Array_Image, Build_Task_Record_Image):
479 For a dynamic task in an assignment statement, use target of
480 assignment to generate meaningful name.
482 2001-10-10 Ed Schonberg <schonber@gnat.com>
484 * einfo.adb (Write_Field19_Name): Body_Entity is also defined for
487 * einfo.ads: Body_Entity is also defined for generic package.
488 Documentation change only
490 * exp_aggr.adb (Build_Array_Aggr_Code): When expanding an
491 others_choice for a discriminated component initialization,
492 convert discriminant references into the corresponding discriminals.
494 * exp_ch3.adb (Get_Simple_Init_Val): Add qualification to aggregate
495 only if original type is private and expression has to be wrapped
499 (Apply_Constraint_Check): Do not perform length check
500 if expression is an aggregate with only an others_choice.
501 (Length_N_Cond): two references to the same in_parameter
502 (typically the discriminal in an init_proc) denote the same value.
503 Two useful optimization uncovered by bugfixes above.
505 2001-10-10 Robert Dewar <dewar@gnat.com>
507 * xeinfo.adb: Change int to char in translation of enumeration types.
508 This fixes a problem in the C representation of component alignment.
509 Add 2001 to copyright notice
511 2001-10-10 Richard Kenner <kenner@gnat.com>
513 * decl.c: (validate_size): Do check size of object of integral type
514 if it is a packed array type.
516 2001-10-10 Richard Kenner <kenner@gnat.com>
518 * decl.c: (gnat_to_gnu_entity, case object): Also materialize
519 VAR_DECL for constant if not Is_Public but -O0.
521 2001-10-10 Richard Kenner <kenner@gnat.com>
523 * misc.c (struct lang_hooks): Add new initializer to match GCC change.
525 2001-10-10 Geert Bosch <bosch@gnat.com>
527 * xnmake.adb (XNmake): Fix handling of -s/-b options. No longer
528 use '/' as switch character, allowing for absolute file names.
530 2001-10-09 Joseph S. Myers <jsm28@cam.ac.uk>
532 * 4gintnam.ads, Make-lang.in, Makefile.in, config-lang.in: Update
535 2001-10-08 Geert Bosch <bosch@gnat.com>
537 * Makefile.in (treeprs.ads, einfo.h, sinfo.h, nmake.adb, nmake.ads):
538 Automatically build utilities when files need to be regenerated.
540 2001-10-08 Geert Bosch <bosch@gnat.com>
542 * xsnames.adb: New utility for updating snames.ads and snames.adb
544 2001-10-08 Zack Weinberg <zack@codesourcery.com>
546 * Make-lang.in (ADAFLAGS): Add -W -Wall.
547 (ADA_FLAGS_TO_PASS): Set ADA_CFLAGS=$(CFLAGS) also.
548 (gnat1): Also depend on attribs.o.
549 (gnatlib, gnatlib-shared): Set CC and ADAC in recursive make.
550 * Makefile.in (X_ADAFLAGS, T_ADAFLAGS): New.
551 (ADAC): Set to @ADAC@ in stage1, $(CC) later.
552 (ADAFLAGS): Add -W -Wall.
553 (ALL_ADAFLAGS, MOST_ADAFLAGS): Add X_ADAFLAGS and T_ADAFLAGS;
556 (.adb.o, .ads.o, a-numaux.o, a-teioed.o, s-interr.o,
557 s-taskin.o, sdefault.o, s-tasdeb.o, s-vaflop.o, a-except.o,
558 s-assert.o, s-stalib.o, s-memory.o, memtrack.o, mlib-tgt.o):
559 Use $(ADAC), not $(CC), as compilation command.
561 (gnattools): Depend directly on tools to build, don't use
563 (gnatlib): Set ADA_CFLAGS=$(GNATLIBCFLAGS) in recursive make.
565 * einfo.h, sinfo.h: New files (autogenerated).
567 2001-10-08 Richard Henderson <rth@redhat.com>
569 * comperr.adb (Abort_In_Progress): New.
570 (Compiler_Abort): Use it to prevent recursion.
572 2001-10-08 Robert Dewar <dewar@gnat.com>
574 * atree.adb: Set Error_Posted in Error node, helps error recovery.
576 * par-endh.adb (Output_End_Expected): We should also not test
577 Error_Posted on the Error node, since now it is always set.
579 * cstand.adb (Create_Standard): Set Etype of Error to Any_Type
580 to help error recovery. Part of general work on 9407-004.
582 * par.adb: Add ??? for misuse of error
585 (Resolve): Defend against Error, fixes 9407-003.
586 (Resolve_Discrete_Subtype_Indication): Defend against Error.
588 * sinfo.ads (N_Error): Now has Etype field (which will be set
589 to Any_Type to help error recovery).
591 2001-10-08 Richard Kenner (kenner@gnat.com)
593 * misc.c (gnat_expand_expr, case UNCHECKED_CONVERT_EXPR):
594 Consistently set MEM attributes from expression; fixes
595 bootstrap failure on x86.
597 2001-10-08 Geert Bosch (bosch@gnat.com)
599 * 5oosinte.adb: Add 2001 to copyright notice.
601 2001-10-08 Geert Bosch (bosch@gnat.com)
603 * ceinfo.adb: Add utility for consistency checking of einfo.ad[bs].
605 * csinfo.adb: Add utility for consistency checking of sinfo.ad[bs].
607 2001-10-07 Joseph S. Myers <jsm28@cam.ac.uk>
609 * 5oosinte.adb: Fix spelling error of "separate" as "seperate".
611 2001-10-05 Geert Bosch (bosch@gnat.com)
613 * adaint.h: Small formatting fix.
615 2001-10-04 Geert Bosch <bosch@gnat.com>
617 * sysdep.c (__gnat_set_binary_mode, __gnat_set_text_mode):
618 Arg is int, not FILE *, in dummy version of functions.
620 * adaint.h (__gnat_set_binary_mode, __gnat_set_text_mode):
621 Arg is int, not FILE *.
623 2001-10-04 Geert Bosch <bosch@gnat.com>
625 * 3lsoccon.ads: Added file, missed with initial check ins.
627 * 4lintnam.ads: Fix header format.
628 Change Linux to GNU/Linux.
630 * 5iosinte.adb: Change Linux to GNU/Linux.
632 * 5iosinte.ads: Change Linux to GNU/Linux.
634 * 5itaprop.adb: Change Linux to GNU/Linux.
636 * 5itaspri.ads: Change Linux to GNU/Linux.
637 Update copyright notice.
639 * 5lintman.adb: Change Linux to GNU/Linux.
641 * 5lml-tgt.adb: Change Linux to GNU/Linux.
643 * 5losinte.ads: Change Linux to GNU/Linux.
645 * 5lsystem.ads: Change Linux to GNU/Linux.
647 * 5qosinte.adb: Change Linux to GNU/Linux.
649 * 5qosinte.ads: Change Linux to GNU/Linux.
651 * 5qparame.ads: Change Linux to GNU/Linux.
653 * 5qtaprop.adb: Change Linux to GNU/Linux.
655 * 5qtaspri.ads: Change Linux to GNU/Linux.
656 Add 2001 to copyright notice.
658 * 5vintman.ads: Change Linux to GNU/Linux.
659 Fix header format. Add 2001 to copyright notice.
661 * g-soccon.ads: Change Linux to GNU/Linux.
663 * g-trasym.ads: Change Linux to GNU/Linux.
664 Add 2001 to copyright notice.
666 * memtrack.adb: Change Linux to GNU/Linux.
668 * s-intman.ads: Change Linux to GNU/Linux.
669 Add 2001 to copyright notice. Fix header format.
671 * s-stache.adb: Change Linux to GNU/Linux.
673 * adaint.c: Change Linux to GNU/Linux.
675 * cio.c: Change Linux to GNU/Linux.
677 * cstreams.c: Change Linux to GNU/Linux.
679 * init.c: Change Linux to GNU/Linux.
681 * gmem.c: Change Linux to GNU/Linux.
683 * tracebak.c: Change Linux to GNU/Linux.
686 2001-10-02 Geert Bosch <bosch@gnat.com>
688 * misc.c (insert_default_attributes): Add dummy version.