This is the mail archive of the gcc@gcc.gnu.org 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]

initializing a VAR_DECL...



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."


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