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.