From 226ada7a41dba4d02def08367ed1b66199d6e472 Mon Sep 17 00:00:00 2001 From: Geert Bosch Date: Sun, 16 Dec 2001 01:56:17 +0100 Subject: osint.adb (Create_Debug_File): When an object file is specified... * osint.adb(Create_Debug_File): When an object file is specified, put the .dg file in the same directory as the object file. * osint.adb: Minor reformatting * lib-xref.adb (Output_Instantiation): New procedure to generate instantiation references. * lib-xref.ads: Add documentation of handling of generic references. * ali.adb (Read_Instantiation_Ref): New procedure to read instantiation references * ali.ads: Add spec for storing instantiation references * bindusg.adb: Minor reformatting * switch.adb: Add entry for Latin-5 (Cyrillic ISO-8859-5) * usage.adb: Add entry for Latin-5 (Cyrillic ISO-8859-5) * gnatcmd.adb: Add entry for Latin-5 (Cyrillic ISO-8859-5) * csets.adb: Add entry for Latin-5 (Cyrillic ISO-8859-5) * csets.ads: Fix header format Add 2001 to copyright date Add entry for Latin-5 (Cyrillic ISO-8859-5) * adaint.c: mktemp is a macro on Lynx and can not be used as an expression. * misc.c (gnat_expand_constant): Do not strip UNCHECKED_CONVERT_EXPR if operand is CONSTRUCTOR. * trans.c (tree_transform, case N_Assignment_Statement): Set lineno before emiting check on right-hand side, so that exception information is correct. * utils.c (create_var_decl): Throw away initializing expression if just annotating types and non-constant. * prj-nmsc.adb: (Ada_Check): Migrate drom Ada_Default_... to Default_Ada_... * prj.adb: (Ada_Default_Spec_Suffix, Ada_Default_Impl_Suffix): Remove functions. (Default_Ada_Spec_Suffix, Default_Ada_Impl_Suffix): Move to spec. * prj.ads: (Ada_Default_Spec_Suffix, Ada_Default_Impl_Suffix): Remove functions. (Default_Ada_Spec_Suffix, Default_Ada_Impl_Suffix): Move from body. From-SVN: r48052 --- gcc/ada/utils.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'gcc/ada/utils.c') diff --git a/gcc/ada/utils.c b/gcc/ada/utils.c index e5375b4..089770b 100644 --- a/gcc/ada/utils.c +++ b/gcc/ada/utils.c @@ -6,7 +6,7 @@ * * * C Implementation File * * * - * $Revision: 1.4 $ + * $Revision$ * * * Copyright (C) 1992-2001, Free Software Foundation, Inc. * * * @@ -1314,9 +1314,11 @@ create_var_decl (var_name, asm_name, type, var_init, const_flag, public_flag, any variable elaborations for the elaboration routine. Otherwise, if the initializing expression is not the same as TYPE, generate the initialization with an assignment statement, since it knows how - to do the required adjustents. */ + to do the required adjustents. If we are just annotating types, + throw away the initialization if it isn't a constant. */ - if (extern_flag && TREE_CODE (var_decl) != CONST_DECL) + if ((extern_flag && TREE_CODE (var_decl) != CONST_DECL) + || (type_annotate_only && var_init != 0 && ! TREE_CONSTANT (var_init))) var_init = 0; if (global_bindings_p () && var_init != 0 && ! init_const) -- cgit v1.1