From: Nathan Sidwell <nathan@codesourcery.com>
To: "Manuel López-Ibáñez" <lopezibanez@gmail.com>
Cc: gcc-patches <gcc-patches@gcc.gnu.org>,
Joseph Myers <jsm@polyomino.org.uk>,
Richard Henderson <rth@redhat.com>
Subject: Re: [PING^2] [C/C++] PR c/4076 -Wunused doesn't warn about static function only called by itself
Date: Fri, 16 Mar 2007 12:38:00 -0000 [thread overview]
Message-ID: <45FA7B26.6080504@codesourcery.com> (raw)
In-Reply-To: <6c33472e0703160352g33bb8b78na852d4fc1530a8be@mail.gmail.com>
Manuel López-Ibáñez wrote:
> I could but I was not able to construct a case where it was necessary.
> How can a static function make a scoped recursive call? Sorry my
> knowledge of C++ is not so good.
namespace { struct X { void Foo () { X::Foo (); }}}
might just cut it. Yes I know anonymous namespaces are not quite the same as
static, and I don't know if we'll check this, but it seems wise to copy the
idiom you've introduced.
nathan
--
Nathan Sidwell :: http://www.codesourcery.com :: CodeSourcery
nathan@codesourcery.com :: http://www.planetfall.pwp.blueyonder.co.uk
next prev parent reply other threads:[~2007-03-16 11:10 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-03-03 11:48 Manuel López-Ibáñez
2007-03-14 23:15 ` [PING^2] " Manuel López-Ibáñez
2007-03-15 10:17 ` Nathan Sidwell
2007-03-16 11:32 ` Manuel López-Ibáñez
2007-03-16 12:38 ` Nathan Sidwell [this message]
2007-03-16 15:21 ` Gabriel Dos Reis
2007-03-17 0:47 ` Manuel López-Ibáñez
2007-03-19 12:16 ` Nathan Sidwell
2007-03-24 17:23 ` Manuel López-Ibáñez
2007-04-03 22:22 ` [PING^3] " Manuel López-Ibáñez
2007-04-09 10:44 ` Nathan Sidwell
2007-03-16 15:29 ` [PING^2] " Gabriel Dos Reis
2007-03-16 15:42 ` Manuel López-Ibáñez
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=45FA7B26.6080504@codesourcery.com \
--to=nathan@codesourcery.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=jsm@polyomino.org.uk \
--cc=lopezibanez@gmail.com \
--cc=rth@redhat.com \
/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).