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

Sebastian Redl sebastian.redl at getdesigned.at
Sat May 30 10:13:24 PDT 2009


Benjamin Kramer wrote:
> void f3() __attribute__((noreturn));
>
> void f3() {
>   return;
> }
>
> for this test case clang emits an error while gcc just warns.
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.

If we make it a warning, can we at least default it to error severity?

Sebastian



More information about the cfe-commits mailing list