Actions

icon Post
text/html Subscribe
text/html Unsubscribe

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [vsipl++] compiler warnings


  • Subject: Re: [vsipl++] compiler warnings
  • From: Jules Bergmann <jules@xxxxxxxxxxxxxxxx>
  • Date: Fri, 11 Nov 2005 17:21:49 -0500



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