I am working on a project in C that extends an existing library (via standard includes). As the library develops a number of functions, it becomes obsolete. However, this is shown only in the documentation; the code does not put this status in any way.
I would like my project to warn me whenever I try to use one of these deprecated functions, especially since the library is under active development, so I could use something before it is deprecated and not notice when her status has changed. Is there a way I can do this under gcc without changing the library code itself? (First, it changes quite often, so the local version with gcc attributes is impractical.)
Is it possible? It looks like Visual Studio can do this with
#pragma deprecated(X,Y,...)
but i don't think gcc supports this, just
__attribute__ ((deprecated))
in the function declaration itself.
source
share