[vsipl++] compiler warnings

Jules Bergmann jules at codesourcery.com
Mon Nov 14 15:46:06 UTC 2005



Stefan Seefeld wrote:
> The attached patch silences two more ghs warnings.

Looks good. -- Jules

> 
> Regards,
>         Stefan

>  
> +#if 0

How should we set this?  Via a configure check or based on compiler 
version macros?

How about:

#if __ghs__

> +// Define the macro for those compilers that would complain about
> +// missing return statements in non-void functions.
> +# define VSIP_IMPL_UNREACHABLE_RETURN(expr) return expr;
> +#else
> +# define VSIP_IMPL_UNREACHABLE_RETURN(expr)
> +#endif

We should add a comment with our current knowledge of compiler state:

// GCC: doesn't care
// Intel C++: complains about unreachable returns
// GreenHills: complains about missing unreachable returns



More information about the vsipl++ mailing list