initializing a VAR_DECL...

Jeffrey A. Six jeffsix@thecouch.ncsc.mil
Wed Jul 18 06:58:00 GMT 2001


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



More information about the Gcc-help mailing list