Open MPI logo

Open MPI Development Mailing List Archives

  |   Home   |   Support   |   FAQ   |   all Development mailing list

Subject: [OMPI devel] 1.5rc5: attribute((noreturn)) and pointers to functions
From: Paul H. Hargrove (PHHargrove_at_[hidden])
Date: 2010-08-25 17:23:01


Building 1.5rc5 with xlc on linux/ppc I see many instances of the
following warnings

"../../../../orte/mca/ess/ess.h", line 61.16: 1506-959 (W) The attribute
"noreturn" is not a valid type attribute and is ignored.
"../../../../orte/mca/errmgr/errmgr.h", line 134.16: 1506-959 (W) The
attribute "noreturn" is not a valid type attribute and is ignored.

This is nearly the same as the Sun C 5.10 warning I reported in
http://www.open-mpi.org/community/lists/devel/2010/08/8323.php

"../../../../openmpi-1.5rc5/orte/mca/ess/ess.h", line 61: warning:
attribute "noreturn" may not be applied to variable, ignored
"../../../../openmpi-1.5rc5/orte/mca/errmgr/errmgr.h", line 138:
warning: attribute "noreturn" may not be applied to variable, ignored

This indicates a common cause and suggests a common solution:

In both cases the configure probe for compiler support for the
"noreturn" attribute has passed. However, in both cases the compiler is
not happy applying this attribute to a pointer-to-function, (though gcc
is apparently fine with this). I believe that the solution to this is
simply to add a "noreturn_funcptr" probe to
opal/config/opal_check_attributes.m4, analogous to the format_funcptr
probe and then define and use a __opal_attribute_noreturn_funcptr__ as
appropriate.

-Paul

-- 
Paul H. Hargrove                          PHHargrove_at_[hidden]
Future Technologies Group
HPC Research Department                   Tel: +1-510-495-2352
Lawrence Berkeley National Laboratory     Fax: +1-510-486-6900