[vsipl++] compiler warnings

Jules Bergmann jules at codesourcery.com
Fri Nov 11 22:21:49 UTC 2005



Stefan Seefeld wrote:
> Working on ghs support I notice that some dummy (i.e. unreachable)
> return statements which we inserted only recently to make icc
> happy now generate warnings with ghs.
> 
> I wonder how to address this and similar issues. A possible
> solution for this particular case seems to be to define an 
> 'UNREACHABLE_RETURN'
> function macro such that
> 
> UNREACHABLE_RETURN(foobar)
> 
> would map to 'return foobar;' for compilers that would complain
> about a missing return, and '' (i.e. nothing) for others warning
> about unreachable statements.
> 
> This macro would be provided by config.hh, so we can adjust it to
> individual compilers.
> 
> Thoughts ?

I don't see any harm in adding such a macro (it would have to be called 
VSIP_IMPL_UNREACHABLE_RETURN of course).

What unreachable returns are you seeing?  Yesterday, two from dist.hpp 
(line 623 and line 633) showed up quite a bit, but that was about it.

				-- Jules




More information about the vsipl++ mailing list