This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: `initializer element is not constant' issue
On Aug 23, 2001, Gigi Sullivan <sullivan@sikurezza.org> wrote:
>> Is it definetly just impossible?
> Basically I used __attribute__((constructor)) gcc extension.
Yep, that's the only way to do it in C. You can switch to C++, that
introduces the ability to do dynamic initialization of global
variables.
--
Alexandre Oliva Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer aoliva@{cygnus.com, redhat.com}
CS PhD student at IC-Unicamp oliva@{lsd.ic.unicamp.br, gnu.org}
Free Software Evangelist *Please* write to mailing lists, not to me