[cfe-dev] Bug: false positive on -Wmissing-noreturn

Fariborz Jahanian fjahanian at apple.com
Thu Oct 22 08:59:22 PDT 2009


Looks like a clang bug please file a bug report.  Warning also needs  
improvement; something like:

'function will not return and is a candidate to be declared with  
'noreturn' attribute.
- Fariborz


- Fariborz

On Oct 22, 2009, at 1:42 AM, Max Kellermann wrote:

> Hi,
>
> I'm using clang from svn trunk r84843.  I'm getting the following
> false warning message:
>
> clang -Wmissing-noreturn -c noreturn.c
> noreturn.c:4:1: warning: function could be attribute 'noreturn'
> [-Wmissing-noreturn]
>
> See attached source code.  It is obvious that the function can return,
> since the compiler must not make assumptions on the return values of
> foo().
>
> Max
> <noreturn.c>_______________________________________________
> cfe-dev mailing list
> cfe-dev at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev




More information about the cfe-dev mailing list