This is the mail archive of the gcc-help@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]
Other format: [Raw text]

Constructor parameters for global object initialization


Hello,

I just started with developping GCC plugins. It works pretty well,
but there is one case I cannot seem to work out and I don't
find any specific information about it in the internet and GCC
internals docs.

In the case of test.cpp:

class test {
public:
    test(int i) { _x = i; }
private:
    int _x;
};

test glob_test(4);

int main() {
    return 0;
}

How can I get the constructor statement of the VAR_DECL glob_test
and the given parameters? There seems to be no direct access to
any sort of constructor node and no __static_initialization..
FUNCTION_DECL seems to provide this information. debug_tree() does
not provide any hints on where the constructor information can be
found.

Kind regards,
Philipp


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