enumerators in generic tree

Joachim Ullrich joachim.ullrich@siemens.com
Fri Mar 31 16:25:00 GMT 2017

I got the hint, that gcc-help might not be the best mailing list for my 
issue, therefor I post it here again (sorry for double-posting):

I work on a gcc plugin which provides a dependency model of the compiled 
The information is derived by walking the generic tree and collecting 
declarations of and references to all symbols. This works astonishingly 
good except for enumerators.

Enumerators are replaced by its constant value in a very early pass. The 
output generated by -fdump-tree-original doesn't show enumerator symbols 
but the constant value.

My question: is there an option to postpone the replacement of 
enumerators. I.e. to represent the enumerator as a CONST_DECL node 
instead of an INTEGER_CST node in the AST?
If there is no option, are there any other suggestions to solve the 
problem up to "patch" the gcc code?

Currently I am using gcc 4.8.2.


More information about the Gcc mailing list