This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
The gcc attribute "deprecated" seems to have been available since gcc 3.1
authorRafael Garcia-Suarez <rgarciasuarez@gmail.com>
Wed, 3 Dec 2008 16:29:09 +0000 (16:29 +0000)
committerRafael Garcia-Suarez <rgarciasuarez@gmail.com>
Wed, 3 Dec 2008 16:29:09 +0000 (16:29 +0000)
So encode this knowledge in perl.h, so we don't rely on the version of
gcc used by Configure to get the macro definition right.

p4raw-id: //depot/perl@34995

perl.h

diff --git a/perl.h b/perl.h
index de4021c..d913929 100644 (file)
--- a/perl.h
+++ b/perl.h
@@ -2732,6 +2732,9 @@ typedef struct clone_params CLONE_PARAMS;
 
 #ifndef PERL_MICRO
 #if defined __GNUC__ && !defined(__INTEL_COMPILER)
+#  if __GNUC__ == 3 && __GNUC_MINOR__ >= 1 || __GNUC__ > 3 /* 3.1 -> */
+#    define HASATTRIBUTE_DEPRECATED
+#  endif
 #  if __GNUC__ >= 3 /* 3.0 -> */ /* XXX Verify this version */
 #    define HASATTRIBUTE_FORMAT
 #    if defined __MINGW32__