diff options
author | Andy Dougherty <doughera@lafayette.edu> | 2006-06-29 09:41:28 -0400 |
---|---|---|
committer | H.Merijn Brand <h.m.brand@xs4all.nl> | 2006-06-30 05:00:22 +0000 |
commit | 42bf555054770bacf4bf838127bc8a1a352164a9 (patch) | |
tree | b0473b64c77e798ecf4d1d899e3578e2898b8264 /perl.h | |
parent | f9a3ff1adf732e369e54b362e55660c9bb204bd4 (diff) | |
download | perl-42bf555054770bacf4bf838127bc8a1a352164a9.tar.gz |
HASATTRIBUTE_UNUSED works for gcc-3.3, but not for g++-3.3
Subject: Re: [PATCH] Re: [perl #39634] gcc 3.3 has problems with __attribute__((unused))
Message-ID: <Pine.LNX.4.62.0606291327130.16718@fractal.phys.lafayette.edu>
p4raw-id: //depot/perl@28453
Diffstat (limited to 'perl.h')
-rw-r--r-- | perl.h | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -2567,6 +2567,9 @@ typedef struct clone_params CLONE_PARAMS; * http://www.ohse.de/uwe/articles/gcc-attributes.html, * but contrary to this information warn_unused_result seems * not to be in gcc 3.3.5, at least. --jhi + * Also, when building extensions with an installed perl, this allows + * the user to upgrade gcc and get the right attributes, rather than + * relying on the list generated at Configure time. --AD * Set these up now otherwise we get confused when some of the <*thread.h> * includes below indirectly pull in <perlio.h> (which needs to know if we * have HASATTRIBUTE_FORMAT). @@ -2588,7 +2591,8 @@ typedef struct clone_params CLONE_PARAMS; # if __GNUC__ >= 3 /* gcc 3.0 -> */ # define HASATTRIBUTE_PURE # endif -# if __GNUC__ >= 3 /* gcc 3.0 -> */ /* XXX Verify this version */ +# 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__ >= 4 || __GNUC__ > 3 /* 3.4 -> */ |