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]

Audit Use of Global Variables in C++ Shared Object (GCC Warning?)


Hi All,

I'm interested in finding references to global variables in a compilation unit.

I've found "nm [-D] ..." is helpful for archives and shared objects,
but its only useful if combined with grep and variable naming
conventions. For example, if naming conventions are punned, then "nm
-D mycoollib | grep g_" is useless.

 Does gcc have such a warning? Does anyone have tricks for auditing
the use of globals?

Jeff


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