[vsipl++] compiler warnings
Stefan Seefeld
stefan at codesourcery.com
Mon Nov 14 21:31:06 UTC 2005
Stefan Seefeld wrote:
> Jules Bergmann wrote:
>
>>> +#if 0
>>
>>
>>
>> How should we set this? Via a configure check or based on compiler
>> version macros?
>>
>> How about:
>>
>> #if __ghs__
>
>
> I believe I introduced the two offending return statements specifically
> to make icc happy. Thus I'd suggest to replace the #if 0 by something
> like #if __icc__. I'll look into it as soon as I have access to icc
> again.
It appears I introduced these dummy return statements when doing the
initial port to ghs. At the time, we were using --disable-exceptions,
and with that option we would call 'fatal_exception()' instead of
throwing an exception. As it happens that function is marked up
as '__noreturn__', but the markup code was only visible if __GCC__ >= 2.
As it turns out, ghs understands GCC attributes, so this revised patch
simply enables the VSIP_IMPL_NORETURN macro for ghs, too.
This means that now all three supported compilers (gcc, icc, ghs)
recognize the __noreturn__ attribute, and thus no dummy return
statement is needed any more.
The code is tested with gcc as well as ghs, both with and without
--disable-exceptions.
Regards,
Stefan
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ghs.patch
Type: text/x-patch
Size: 1415 bytes
Desc: not available
URL: <http://sourcerytools.com/pipermail/vsipl++/attachments/20051114/69273aeb/attachment.bin>
More information about the vsipl++
mailing list