octave-maintainers
[Top][All Lists]
Advanced

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

Re: 'noreturn' warning in libcruft


From: Michael Goffioul
Subject: Re: 'noreturn' warning in libcruft
Date: Tue, 7 Aug 2012 20:10:15 +0100

On Tue, Aug 7, 2012 at 6:43 PM, Rik <address@hidden> wrote:

>
>
> 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

That's consistent with what's in dumped into config.h (we don't test for the feature, it's solely based on __GNUC__ definition).

Michael.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]