This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Ada] Remove call to expand_decl

Hi Eric,

there's a call to expand_decl in gcc-interface/utils.c, which is used only 
for setting up some field of CONST_DECLs.  I'm working on removing this 
function, and removing that call from utils.c is seemingly working just 
fine.  It came in with :

2005-11-14  Thomas Quinot  <>
            Olivier Hainque  <>
            Eric Botcazou  <>
        (create_var_decl): call expand_decl for CONST_DECLs, to set MODE, ALIGN
        SIZE and SIZE_UNIT which we need for later back-annotations.

I don't understand the reference to "back-annotations" so I don't really 
know if this need was meanwhile solved differently, or if it's still 
necessary.  As said, there are no testcases in GCC (or in the Ada compiler 
itself) that would exhibit any problem with that setup removed.

Can you think of any or would a patch removing that call be approved?  
I.e. the patch below (regstrapped on x86_64-linux).


	* gcc-interface/utils.c (create_var_decl_1): Remove call to 

Index: ada/gcc-interface/utils.c
--- ada/gcc-interface/utils.c   (revision 187708)
+++ ada/gcc-interface/utils.c   (working copy)
@@ -2227,8 +2227,6 @@ create_var_decl_1 (tree var_name, tree a
       if (global_bindings_p ())
        rest_of_decl_compilation (var_decl, true, 0);
-  else
-    expand_decl (var_decl);

   return var_decl;

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]