Question: transform function prototypes with non const struct pointers to const?
Any ideas on how to trace call graphs to determine when struct pointer arguments can be converted from non const to const?
Quoted 3 lines · Joe Perches
Any ideas on how to trace call graphs to determine when struct pointer arguments can be converted from non const to const?
I'm not sure that it is quite possible at the moment. You would need to use iteration, which means you need to pass function names and argument positions from one iteration to another. These arguments are currently limited to identifiers. A function name is an identifier, but an argument position is not, ie the n in the metavariable declaration expression list[n] es;
I wonder if what you really want to do is work on the types? It is more approximate, but if values of some type are never assigned, then they can be const.
julia