I added a file in source control which had an enum definition as:
enum { OK = 0, ERROR };
But on compilation it was throwing errors like "expected identifier before numeric constant." Did my research on that and the culprit was supposed to be 'OK' which was defined somewhere else in the code. So, i changed OK with say, OK_1, and the issue was, indeed, resolved.
However, I have not been able to find where in my code base was this 'OK' defined before. I ran a grep from top level and couldn't find it. I am pretty sure I have covered all the application related code, but OK wasn't there.
I think it's unlikely that it was a part of some shared library as compilation process didn't even reach linking phase. It could have come from one of the header files maybe.
Is there a way/linux tool that somehow can be tricked to find where this OK is coming from?