[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: 'noreturn' warning in libcruft
From: |
Rik |
Subject: |
Re: 'noreturn' warning in libcruft |
Date: |
Tue, 07 Aug 2012 10:43:36 -0700 |
>
>
> I know what you're trying to do and I know why the return statement will
> never get reached. But I also know that with no-GCC compilers,
> GCC_ATTR_NORETURN will not be defined and this then may generate a
> compiler error as the return statement will now be missing.
>
> So it's basically a choice between getting rid of a GCC warning and
> (possibly) introducing a compilation error with other compilers.
If it is a specific compiler behavior that we are using then why not test
for it as is already done for the GCC_ATTR_NORETURN macro? The following
silences the warning for me and should work with the other compilers that
want a return statement.
#ifndef __GNUC__
F77_RETURN (0)
#endif
--Rik
- 'noreturn' warning in libcruft, Rik, 2012/08/07
- Re: 'noreturn' warning in libcruft, Michael Goffioul, 2012/08/07
- Re: 'noreturn' warning in libcruft, Michael Goffioul, 2012/08/07
- Re: 'noreturn' warning in libcruft, John W. Eaton, 2012/08/07
- Re: 'noreturn' warning in libcruft, Michael Goffioul, 2012/08/07
- Re: 'noreturn' warning in libcruft, John W. Eaton, 2012/08/07
- Re: 'noreturn' warning in libcruft, Rik, 2012/08/07
- Re: 'noreturn' warning in libcruft, John W. Eaton, 2012/08/07
- Re: 'noreturn' warning in libcruft, Rik, 2012/08/07