People are probably more likely to fix their code if they're told how -- it would be useful to have void new_function() { } void __attribute__((deprecated("use new_function instead")) old_function() { } int main(int argc, char **argv) { old_function(); } resulting in test.cpp: 6: warning: 'old_function' is deprecated (declared at test.cpp:2, use new_function instead)
Confirmed.
Conversely, it would be nice for __attribute__((warning)) and __attribute__((error)) to allow omitting their argument (in other words, it would be nice to have all three of deprecated, warning, and error act consistently and take 0 or 1 arg).
*** This bug has been marked as a duplicate of 36892 ***