* remove C++ warning about all private c/dtors and no friends?
@ 2003-01-06 19:39 Jason Merrill
2003-01-06 20:18 ` Mark Mitchell
2003-01-06 20:24 ` Gabriel Dos Reis
0 siblings, 2 replies; 4+ messages in thread
From: Jason Merrill @ 2003-01-06 19:39 UTC (permalink / raw)
To: Mark Mitchell; +Cc: gcc, Jason Merrill
This warning gives a false positive for a class like
class A
{
A();
~A();
public:
A* make_A ();
}
and furthermore, seems kind of useless. Surely that's the sort of
situation that will be caught quickly during normal development. Would
anyone object to tearing out this warning?
Jason
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: remove C++ warning about all private c/dtors and no friends?
2003-01-06 19:39 remove C++ warning about all private c/dtors and no friends? Jason Merrill
@ 2003-01-06 20:18 ` Mark Mitchell
2003-01-06 21:29 ` Jason Merrill
2003-01-06 20:24 ` Gabriel Dos Reis
1 sibling, 1 reply; 4+ messages in thread
From: Mark Mitchell @ 2003-01-06 20:18 UTC (permalink / raw)
To: Jason Merrill; +Cc: gcc
--On Monday, January 06, 2003 02:09:03 PM -0500 Jason Merrill
<jason@redhat.com> wrote:
> This warning gives a false positive for a class like
>
> class A
> {
> A();
> ~A();
>
> public:
> A* make_A ();
> }
I assume "make_A" should be static? Otherwise, you still have no way
of making one of these.
> and furthermore, seems kind of useless. Surely that's the sort of
> situation that will be caught quickly during normal development. Would
> anyone object to tearing out this warning?
I would not object.
--
Mark Mitchell mark@codesourcery.com
CodeSourcery, LLC http://www.codesourcery.com
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: remove C++ warning about all private c/dtors and no friends?
2003-01-06 19:39 remove C++ warning about all private c/dtors and no friends? Jason Merrill
2003-01-06 20:18 ` Mark Mitchell
@ 2003-01-06 20:24 ` Gabriel Dos Reis
1 sibling, 0 replies; 4+ messages in thread
From: Gabriel Dos Reis @ 2003-01-06 20:24 UTC (permalink / raw)
To: Jason Merrill; +Cc: Mark Mitchell, gcc
Jason Merrill <jason@redhat.com> writes:
| Would anyone object to tearing out this warning?
Please, go for it!
-- Gaby
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: remove C++ warning about all private c/dtors and no friends?
2003-01-06 20:18 ` Mark Mitchell
@ 2003-01-06 21:29 ` Jason Merrill
0 siblings, 0 replies; 4+ messages in thread
From: Jason Merrill @ 2003-01-06 21:29 UTC (permalink / raw)
To: Mark Mitchell; +Cc: gcc
On Mon, 06 Jan 2003 11:46:37 -0800, Mark Mitchell <mark@codesourcery.com> wrote:
> --On Monday, January 06, 2003 02:09:03 PM -0500 Jason Merrill
> <jason@redhat.com> wrote:
>
>> This warning gives a false positive for a class like
>>
>> class A
>> {
>> A();
>> ~A();
>>
>> public:
>> A* make_A ();
>> }
>
> I assume "make_A" should be static?
Er, yes.
Jason
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2003-01-06 21:28 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-01-06 19:39 remove C++ warning about all private c/dtors and no friends? Jason Merrill
2003-01-06 20:18 ` Mark Mitchell
2003-01-06 21:29 ` Jason Merrill
2003-01-06 20:24 ` Gabriel Dos Reis
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).