I am using the -fdump-translation-unit option of GCC to parse C enum/structure/union/arrays. Consider the below code
enum eDAY
{
monday = 0,
tuesday,
wednesday
};
enum eDAY day = monday;
I can get all the members of the enumerator parsing the dump of GCC. But if the below declaration was not present
enum eDAY day = monday;
GCC's dump doesn't have any information about the members of the enumerator. The same problem exists with structures/unions etc. How can I solve this problem. Is there some kind of optimization flag which I need to turn off so that GCC parses all the objects even if it is not used ?