public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* Re: c++/8211: -Weffc++ warns about copyable classes with func ptr members
@ 2002-11-04 14:49 bangerth
  0 siblings, 0 replies; 2+ messages in thread
From: bangerth @ 2002-11-04 14:49 UTC (permalink / raw)
  To: gcc-bugs, gcc-prs, nobody, olly

Synopsis: -Weffc++ warns about copyable classes with func ptr members

State-Changed-From-To: open->analyzed
State-Changed-By: bangerth
State-Changed-When: Mon Nov  4 14:49:39 2002
State-Changed-Why:
    Yeah, I think the analysis has a valid point. Whether -Weffc++
    was a good idea from the beginning might be arguable, but if
    it is there, it should not warn in cases there is nothing to
    complain about.
    
    W.

http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=8211


^ permalink raw reply	[flat|nested] 2+ messages in thread

* c++/8211: -Weffc++ warns about copyable classes with func ptr members
@ 2002-10-13  8:56 olly
  0 siblings, 0 replies; 2+ messages in thread
From: olly @ 2002-10-13  8:56 UTC (permalink / raw)
  To: gcc-gnats


>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


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2002-11-04 22:49 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-11-04 14:49 c++/8211: -Weffc++ warns about copyable classes with func ptr members bangerth
  -- strict thread matches above, loose matches on Subject: below --
2002-10-13  8:56 olly

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).