CTORs for static elements

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I have a class like:

class f {
public:
  f() : l(-1) { }

private:
  int l;
};

I then have a global static instance of f. Is GCC going to create a CTOR function and call it when the program starts up or is it going to just put f::l into an initialized data area? My other question (not gcc specific) is if this is specified in the C++ language?

Thanks,
Perry


[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux