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: Mon, 14 Nov 2005 10:46:06 -0500



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