Re: [perl #39634] gcc 3.3 has problems with __attribute__((unused))
authorAndy Dougherty <doughera@lafayette.edu>
Mon, 10 Jul 2006 13:16:27 +0000 (09:16 -0400)
committerRafael Garcia-Suarez <rgarciasuarez@gmail.com>
Tue, 11 Jul 2006 07:55:21 +0000 (07:55 +0000)
Message-ID: <Pine.LNX.4.62.0607101312540.24708@fractal.phys.lafayette.edu>

p4raw-id: //depot/perl@28541

perl.h

diff --git a/perl.h b/perl.h
index 9c32f96..94eb860 100644 (file)
--- a/perl.h
+++ b/perl.h
@@ -2604,9 +2604,11 @@ typedef struct clone_params CLONE_PARAMS;
 #    define HASATTRIBUTE_PURE
 #  endif
 #  if __GNUC__ == 3 && __GNUC_MINOR__ >= 4 || __GNUC__ > 3 /* 3.4 -> */
-     /* This actually works for gcc-3.3, but not for g++-3.3. */
 #    define HASATTRIBUTE_UNUSED
 #  endif
+#  if __GNUC__ == 3 && __GNUC_MINOR__ == 3 && !defined(__cplusplus)
+#    define HASATTRIBUTE_UNUSED /* gcc-3.3, but not g++-3.3. */
+#  endif
 #  if __GNUC__ == 3 && __GNUC_MINOR__ >= 4 || __GNUC__ > 3 /* 3.4 -> */
 #    define HASATTRIBUTE_WARN_UNUSED_RESULT
 #  endif