I have a large codebase that uses a number of unsafe functions, such as gmtime
and strtok
. Rather than trying to search through the codebase and replace these wholesale, I would like to make the compiler emit a warning or error when it sees them (to highlight the problem to maintenance developers). Is this possible with GCC?
I already know about __attribute__((deprecated))
, but AFAIK I can't use it since I don't have control of the header files where these functions are declared.