global vs global static in c/c++ AST representation
by gcc frickler
Hi,
does anybody know how to distinguish a global from a global static variable?
eg.
int glob;
static int moduleGlob;
void f() {static int inner;}
All of them go into the bss segment but the static int moduleGlob is
exported with a mangled name to a .so (so it doesn't conflict at link time)
from
https://gcc-python-plugin.readthedocs.org/en/latest/working-with-c.html#f...
i got:
for var in gcc.get_variables():
type_ = var.decl.type
It does not seem to be a attribute of a VAR_DECL or
anywhere near var, var.decl or var.decl.type
the static predicate found on var.decl is just saying it goes in the bss
segment (true in all of the above cases) and got nothing to do with the
static keyword which just controls visibility on link time.
At which pass should this be examined?
Regards
10 years, 11 months
Not able to execute examples - problem with libgcc-c-api.so
by Binkowski, Cassio
Hi all,
I have recently built the plugin from source in a Fedora VM and, when I try
to execute the examples, I get the following error:
*[fedora@localhost gcc-python-plugin]$ ./gcc-with-python
examples/show-gimple.py test.c
cc1: error: cannot load plugin
/home/fedora/Desktop/gcc-python-plugin/python.so
libgcc-c-api.so: cannot open shared object file: No such file or directory*
Seems like a problem with libgcc-c-api.so. However, libgcc seems to be up
to date.
Can you please help?
Thanks
Cassio
PS: Is there a way to build it in MacOS?
10 years, 11 months