VC++ 6 IDE
// test.c
#include <stdlib.h>
#ifdef SOMETHING
#define malloc(x) somethingelse(x)
#endif
int f()
{
malloc(10);
}
Note: symbol SOMETHING is *not* defined
Put the caret on 'malloc' from the malloc(10) line.
1) Alt+G shows 3 locations for me:
crtdbg.h
malloc.h
stdlib.h
Why test.c is not listed there (even if I remove #ifdef/#endif)?
2) The Definition field (and the tooltip shown when you type '(' after malloc) shows only one definition
#define malloc(x) somethingelse(x)
However, if I delete the #define malloc line and save the file the Definition field and the tooltip get 'fixed', i.e. they will display 3 alternative definitions from the above 3 locations.