This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Generating a deprecation warning for macros
- From: Florian Weimer <fweimer at redhat dot com>
- To: gcc-help at gcc dot gnu dot org
- Date: Thu, 20 Sep 2012 16:23:27 +0200
- Subject: Generating a deprecation warning for macros
I would like to generate a deprecation warning for macros. In the
header file, I would like to have:
#define FOO 127
/* do something with FOO to mark it deprecated */
And in client code which includes the header,
printf("%d", FOO);
should print a compile-time warning. Is this possible without changing
GCC itself?
--
Florian Weimer / Red Hat Product Security Team