From: Benjamin Kramer <benny.kra@googlemail.com>
To: "Ævar Arnfjörð Bjarmason" <avarab@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: [RFC/PATCH] git-compat-util.h: Don't define NORETURN under __clang__
Date: Tue, 3 Aug 2010 15:35:51 +0200 [thread overview]
Message-ID: <C210797E-AE95-4074-AADE-CD2B518D8202@gmail.com> (raw)
In-Reply-To: <1280840883-24540-1-git-send-email-avarab@gmail.com>
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
\x10-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.
prev parent reply other threads:[~2010-08-03 13:40 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-08-03 13:08 [RFC/PATCH] git-compat-util.h: Don't define NORETURN under __clang__ Ævar Arnfjörð Bjarmason
2010-08-03 13:18 ` Michael J Gruber
2010-08-03 13:35 ` Matthieu Moy
2010-08-03 14:23 ` Matthieu Moy
2010-08-03 21:10 ` Ævar Arnfjörð Bjarmason
2010-08-03 13:35 ` Benjamin Kramer [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=C210797E-AE95-4074-AADE-CD2B518D8202@gmail.com \
--to=benny.kra@googlemail.com \
--cc=avarab@gmail.com \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).