From: Sebastian Huber <sebastian.huber@embedded-brains.de>
To: Eric Blake <eblake@redhat.com>, newlib@sourceware.org
Subject: Re: [PATCH] headers: avoid bareword attributes
Date: Fri, 25 Aug 2017 08:09:00 -0000 [thread overview]
Message-ID: <463cca95-66b3-4809-714b-9340212571b4@embedded-brains.de> (raw)
In-Reply-To: <99c39477-3bcd-57ab-67f8-6bc84881c77e@redhat.com>
On 24/08/17 21:02, Eric Blake wrote:
> On 08/24/2017 12:44 AM, Sebastian Huber wrote:> Hello Eric,
>> On 17/08/17 03:50, Eric Blake wrote:
>>> Always use the __-decorated form of an attribute name in public
>>> headers, as the bareword form is in the user's namespace, and we
>>> don't want compilation to break just because the user defines the
>>> bareword to mean something else.
>>>
>> did you test the clang thread safety analysis after this patch? It not
>> longer works using clang 3.8. I get now errors like this:
>>
> No, I usually compile with gcc, not clang.
The thread safety analysis development for GCC has been stopped in 2012:
https://gcc.gnu.org/ml/gcc/2012-04/msg00714.html
[...]
>> If I revert this change it works.
> I still think this is more likely to be a bug in clang, but I'm also
> okay if we need to revert this part of the patch since it only affects
> attributes that only clang uses, and since I don't test on clang.
>
I also think that this is a clang bug and I will file a bug report,
however, it will take time to fix this and we should not break existing
clang support for now.
With this test program
void f0(void) __attribute__((noreturn));
void f1(void) __attribute__((__noreturn__));
void f2(int *l) __attribute__((exclusive_lock_function(*l)));
void f3(int *l) __attribute__((__exclusive_lock_function__(*l)));
I get
clang -c test.c
test.c:4:61: error: use of undeclared identifier 'l'
void f3(int *l) __attribute__((__exclusive_lock_function__(*l)));
^
1 error generated.
--
Sebastian Huber, embedded brains GmbH
Address : Dornierstr. 4, D-82178 Puchheim, Germany
Phone : +49 89 189 47 41-16
Fax : +49 89 189 47 41-09
E-Mail : sebastian.huber@embedded-brains.de
PGP : Public key available on request.
Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.
next prev parent reply other threads:[~2017-08-25 7:53 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-17 2:07 Eric Blake
2017-08-17 16:00 ` Corinna Vinschen
2017-08-23 15:53 ` Sebastian Huber
2017-08-23 18:59 ` Eric Blake
2017-08-24 8:23 ` Sebastian Huber
2017-08-24 19:18 ` Eric Blake
2017-08-25 8:09 ` Sebastian Huber [this message]
2017-08-25 12:05 ` Sebastian Huber
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=463cca95-66b3-4809-714b-9340212571b4@embedded-brains.de \
--to=sebastian.huber@embedded-brains.de \
--cc=eblake@redhat.com \
--cc=newlib@sourceware.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 read-only IMAP folder(s) and NNTP newsgroup(s).