public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
From: olly@survex.com
To: gcc-gnats@gcc.gnu.org
Subject: c++/8211: -Weffc++ warns about copyable classes with func ptr members
Date: Sun, 13 Oct 2002 08:56:00 -0000	[thread overview]
Message-ID: <20021013154936.2174.qmail@sources.redhat.com> (raw)


>Number:         8211
>Category:       c++
>Synopsis:       -Weffc++ warns about copyable classes with func ptr members
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    unassigned
>State:          open
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Sun Oct 13 08:56:00 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator:     Olly Betts
>Release:        g++-3.2 (GCC) 3.2.1 20020924 (Debian prerelease)
>Organization:
>Environment:
Linux 2.4.19-686
>Description:
-Weffc++ warns about classes which use the default copy ctor
and assignment operator and contain pointer members.  But the
warning also fires for function pointer members - this would
seem to be incorrect - a function pointer cannot be "freed"
so there aren't really any issues of resource ownership and
deallocation (unless dlclose is counted perhaps, but in
general the warning in this case seems more unhelpful than
helpful as there doesn't seem to be an easy way to suppress
it).
>How-To-Repeat:
Compile the attached file with:

g++ -Weffc++ -c effcpp.cc
>Fix:

>Release-Note:
>Audit-Trail:
>Unformatted:
----gnatsweb-attachment----
Content-Type: application/octet-stream; name="effcpp.cc"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="effcpp.cc"

Y2xhc3MgdGVzdCB7CiAgICB2b2lkICgqZm4pKHZvaWQpOwogICAgdGVzdCh2b2lkICgqZikodm9p
ZCkpIDogZm4oZikge30KfTsK


             reply	other threads:[~2002-10-13 15:56 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-10-13  8:56 olly [this message]
2002-11-04 14:49 bangerth

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=20021013154936.2174.qmail@sources.redhat.com \
    --to=olly@survex.com \
    --cc=gcc-gnats@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).