public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "hv at crypt dot org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug tree-optimization/102329] pointer "maybe uninitialized" right after assignment
Date: Fri, 17 Sep 2021 11:41:34 +0000 [thread overview]
Message-ID: <bug-102329-4-V9weF68VRr@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-102329-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102329
--- Comment #5 from Hugo van der Sanden <hv at crypt dot org> ---
(In reply to Martin Sebor from comment #4)
> For functions like pthread_getspecific() and pthread_setspecific() that do
> not access the object GCC provides attribute access none to suppress the
> warning:
>
> extern __attribute__ ((access (none, 1))) void f1 (const void *pointer);
Well that's not a solution for developers of perl, since these system headers
are not under our control. I'm not sure it's a solution right now for
developers of those system headers either, since adding the attribute yields a
different warning under slightly earlier versions of gcc, eg with gcc-9.2.1:
test.c:8:1: warning: 'access' attribute directive ignored [-Wattributes]
8 | extern int pthread_setspecific (unsigned int key, const void *pointer)
__attribute__ ((access (none, 2)));
| ^~~~~~
I think we still find the original sort of maybe-uninitialized warnings useful,
so we'll probably just do the useless initialization, and the code will run a
bit slower under gcc.
next prev parent reply other threads:[~2021-09-17 11:41 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-09-14 16:49 [Bug c/102329] New: " hv at crypt dot org
2021-09-14 16:56 ` [Bug c/102329] " jakub at gcc dot gnu.org
2021-09-15 3:50 ` [Bug tree-optimization/102329] " hv at crypt dot org
2021-09-15 7:55 ` rguenth at gcc dot gnu.org
2021-09-15 15:44 ` msebor at gcc dot gnu.org
2021-09-17 11:41 ` hv at crypt dot org [this message]
2021-09-20 14:56 ` msebor at gcc dot gnu.org
2021-10-18 13:51 ` fw at gcc dot gnu.org
2021-10-18 21:10 ` [Bug tree-optimization/102329] [11/12 Regression] " pinskia at gcc dot gnu.org
2022-01-20 10:00 ` rguenth at gcc dot gnu.org
2022-04-21 7:50 ` rguenth at gcc dot gnu.org
2023-05-29 10:05 ` [Bug tree-optimization/102329] [11/12/13/14 " jakub at gcc dot gnu.org
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=bug-102329-4-V9weF68VRr@http.gcc.gnu.org/bugzilla/ \
--to=gcc-bugzilla@gcc.gnu.org \
--cc=gcc-bugs@gcc.gnu.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).