public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "redi at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/33925] gcc -Waddress lost some useful warnings
Date: Wed, 18 Apr 2012 17:04:00 -0000 [thread overview]
Message-ID: <bug-33925-4-y2meTUq7sX@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-33925-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33925
--- Comment #5 from Jonathan Wakely <redi at gcc dot gnu.org> 2012-04-18 17:01:23 UTC ---
(In reply to comment #3)
> First, I think the C++ standard forbids a function from having a null
> address:
But GCC extensions allow it, see the weakref attribute:
http://gcc.gnu.org/onlinedocs/gcc/Function-Attributes.html#index-g_t_0040code_007bweakref_007d-attribute-2648
That's used (among other places) by GCC's pthreads abstraction layer to declare
a weak alias to pthread_create, which has a null address unless libpthread is
linked to. Testing whether the address is null (i.. whether the application
was linked to libpthread) is used for important optimisations.
next prev parent reply other threads:[~2012-04-18 17:04 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <bug-33925-4@http.gcc.gnu.org/bugzilla/>
2012-04-18 16:34 ` manu at gcc dot gnu.org
2012-04-18 17:04 ` redi at gcc dot gnu.org [this message]
2012-04-18 17:07 ` redi at gcc dot gnu.org
2012-04-20 12:59 ` manu at gcc dot gnu.org
2021-10-01 18:09 ` msebor at gcc dot gnu.org
2021-10-04 19:20 ` [Bug c++/33925] [10/11/12 Regression] " msebor at gcc dot gnu.org
2021-11-16 12:58 ` rguenth at gcc dot gnu.org
2021-11-19 16:48 ` cvs-commit at gcc dot gnu.org
2021-11-19 16:49 ` [Bug c++/33925] [10/11 " msebor at gcc dot gnu.org
2022-01-26 17:46 ` msebor at gcc dot gnu.org
2007-10-27 17:17 [Bug c++/33925] New: " mec at google dot com
2008-01-31 2:46 ` [Bug c++/33925] " manu at gcc dot gnu dot org
2009-07-31 15:13 ` manu at gcc dot gnu dot org
2009-07-31 16:04 ` mec at google dot com
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-33925-4-y2meTUq7sX@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).