Re: [RFC/PATCH] git-compat-util.h: Don't define NORETURN under __clang__

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

 



On 03.08.2010, at 15:08, Ævar Arnfjörð Bjarmason wrote:

> clang version 1.0 on Debian testing x86_64 defines __GNUC__, but barfs
> on `void __attribute__((__noreturn__))'. E.g.:

This is a bug in clang 1.0 that was fixed in the llvm 2.7/clang 1.5 timeframe, it didn't
recognize attributes on function pointers properly. clang tries to be as compatible with GCC as
possible so it obviously has to define __GNUC__ ;)

> 
>    usage.c:56:1: error: function declared 'noreturn' should not return [-Winvalid-noreturn]
>    }
>    ^
>    1 diagnostic generated.
>    make: *** [usage.o] Error 1

It's a "warning which defaults to an error" you can pacify it by passing -Winvalid-noreturn or
-Wno-invalid-noreturn.

I oppose adding workarounds for obsolete versions of clang, Debian should upgrade their packages to
a more recent release. clang 1.0 had all kinds of weird bugs and shouldn't be used anymore.--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]