This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
initializing a VAR_DECL...
- To: <gcc at gcc dot gnu dot org>,<gcc-help at gcc dot gnu dot org>
- Subject: initializing a VAR_DECL...
- From: "Jeffrey A. Six" <jeffsix at thecouch dot ncsc dot mil>
- Date: Wed, 18 Jul 2001 10:13:16 -0400
I have a VAR_DECL and I need to initialize it during the compilation process
to a known value (it's an integer, SImode). So, I make a call to
store_init_value right after I construct my VAR_DECL like:
store_init_value(my_var_decl, build_int_2_wide(0, 0));
I think this should cause my VAR_DECL to be initialized to 0. However, this
does not work and gives me a "initializer element is not computable at load
time" when I try to compile I program with this mod. So...my question
is...how do I initialize a VAR_DECL to an initial value? What should I put
as the second argument passed to store_init_value()?
Thanks,
-j6
-------------------------------------------------------------
Jeffrey A. Six
US Department of Defense jeffsix@thecouch.ncsc.mil
"Staff are requested not to use the eye patches in this
first-aid kit to impersonate pirates or other characters.
They are for medical use only."