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]

Re: gcc able to output identifiers?


Rainer Hochschild schrieb:
Is there a way that will make gcc provide me with a list of all (C/C++) identifiers used in the source code (i.e. all variables, constants, functions, methods, classes, macros etc.). My intention is to check this output against some regular expressions to identify violations against naming conventions.
Or is there some other way to check the source code for compliance to user-specified naming conventions using a tool from the gcc suite?

Hoi Rainer,


for Macros you can try -E -g3 and have a look at the preprocessor's output .i resp. .ii (or, at your option, something like -save-temp -g3). Note that this will include builtin macros and macros form all included files like stdio.h as well.

Georg-Johann


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