This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug preprocessor/36906] #pragma GNU poison index()



------- Comment #2 from pinskia at gcc dot gnu dot org  2008-08-11 00:28 -------
Let me expand on what I mean by the attribute deprecated.
See http://gcc.gnu.org/onlinedocs/gcc-4.3.0/gcc/Function-Attributes.html:

deprecated
The deprecated attribute results in a warning if the function is used anywhere
in the source file. This is useful when identifying functions that are expected
to be removed in a future version of a program. The warning also includes the
location of the declaration of the deprecated function, to enable users to
easily find further information about why the function is deprecated, or what
they should do instead. Note that the warnings only occurs for uses:
          int old_fn () __attribute__ ((deprecated));
          int old_fn ();
          int (*fn_ptr)() = old_fn;

results in a warning on line 3 but not line 2.

The deprecated attribute can also be used for variables and types (see Variable
Attributes, see Type Attributes.) 


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36906


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]