[cfe-commits] [PATCH] downgrade an error to a warning to match gcc's behavior

Benjamin Kramer benny.kra at googlemail.com
Sat May 30 10:26:40 PDT 2009


Sebastian Redl wrote:
> Is this a problem in real code? The program is broken, and will be
> completely unpredictable at runtime, depending on the mood of the
> optimizers. I cannot think of a worse thing to let through.

Yes, it causes the umem freebsd port to fail with clang. The offending  
code is available at
https://labs.omniti.com/trac/portableumem/browser/trunk/umem_fail.c?rev=49 
#L176

Some thoughts from #freebsd-clang:

<Ed> well, as we can see, it's part of real code
<Ed> and in some cases the compiler doesn't support noreturn
<Ed> and in that case the compiler will throw warnings about missing  
return statements
<Ed> so in my opinion it makes sense to place return statements there



More information about the cfe-commits mailing list