The patch below is required to avoid xlc-11.1 on Linux/ppc64 from
issuing lots of warnings:
"[srcdir]/hwloc-trunk/include/hwloc.h", line 1245.34: 1506-1385 (W) The
attribute "pure" is not a valid type attribute.
The problem appears to be that when the function returns a pointer type,
XLC thinks the attribute is being applied to the return type rather than
the function. That is why no other instances of __hwloc_attribute_pure
need to be reordered.
I am not sure of the risk/reward on applying this change, however.
Gcc seems to be happy enough either way as far as I could tell.
-Paul
--- hwloc-1.5a1r4308/include/hwloc.h~ 2012-02-17 17:45:45.000000000 -0600
+++ hwloc-1.5a1r4308/include/hwloc.h 2012-02-17 17:52:20.000000000 -0600
@@ -1242,7 +1242,7 @@
*
* \return \c NULL if no such key exists.
*/
-static __hwloc_inline const char * __hwloc_attribute_pure
+static __hwloc_inline __hwloc_attribute_pure const char *
hwloc_obj_get_info_by_name(hwloc_obj_t obj, const char *name)
{
unsigned i;
--
Paul H. Hargrove phhargr...@lbl.gov
Future Technologies Group
HPC Research Department Tel: +1-510-495-2352
Lawrence Berkeley National Laboratory Fax: +1-510-486-6900