Reputation: 39195
On Linux, you can easily tell the linker to emit a warning when the function is linked, e.g. like this:
static const char blah_msg[] __attribute__((section(".gnu.warning.blah"))) =
"blah() is deprecated. Use blub().";
How to implement this warning behaviour on Solaris 10?
(i.e. with Solaris Studio and the Solaris ld
)
Upvotes: 0
Views: 181
Reputation: 4180
Sorry, but I asked the Solaris linker team, and there is no way to do this with the Solaris ld
- using the compiler deprecated attribute is the closest you can do.
Upvotes: 1
Reputation: 16399
How about
cc -V
Per this:
https://blogs.oracle.com/alanc/entry/solaris_11_2_functional_deprecation
The site wants 30 characters minimum - so here SO: I wrote something....sheesh
Upvotes: 0
Reputation: 1
Per the documentation:
deprecated(msg)
Results in a warning if the variable or function is used anywhere in the source file. The optional argument msg must be a string and will be included in the warning message if issued.
Upvotes: 1