public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* c++/6229: gcc 3.1 namespace lookup seems to fail
@ 2002-04-08 7:26 peter.klotz
0 siblings, 0 replies; 2+ messages in thread
From: peter.klotz @ 2002-04-08 7:26 UTC (permalink / raw)
To: gcc-gnats
>Number: 6229
>Category: c++
>Synopsis: gcc 3.1 namespace lookup seems to fail
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: unassigned
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Mon Apr 08 07:26:00 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator: peter.klotz@aon.at
>Release: gcc 3.1 Snapshot
>Organization:
>Environment:
Red Hat Linux 7.2 / i386
>Description:
Uncomment '#define TWO_INSERTERS' in the attached program and everything compiles and runs fine ('manipulator called' is written twice as output).
If the program is compiled as is one obtains the warning
manipulator.cpp: In function `void ns::f()':
manipulator.cpp:29: warning: the address of `void
ns::manipulator(std::ostringstream&)', will always be `true'
The program writes 'manipulator called' only once.
Obviously a wrong inserter gets called, simply by adding an inserter with a non matching signature.
Neither gcc 2.95.3, Borland C++ 5.5.1 nor Comeau 4.3Beta show this behavior.
I have already reported this issue to Red Hat since it is their gcc 3.1-0.23.1 snapshot I am using but got no answer so far.
>How-To-Repeat:
g++ -W -Wall manipulator.cpp -o manipulator
./manipulator
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted:
----gnatsweb-attachment----
Content-Type: application/x-gzip; name="manipulator.tgz"; name="manipulator.tgz"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="manipulator.tgz"
H4sIANmksTwAA+3Sz0vDMBQH8F4d9H94bCCtiLZb52CW3Tx4UXADj6O0qQS7tDTpQMX/3aTruh9M
L7J58Pu5lL685L08sogEL6osUnl5FReFdQye73mjILA8bXQzar6rf833+wNLJwwHw34QmDw/CPyR
Rd5RutlTSRWVRFbxmuXq/fu8hC1ZlheslKfo6mR6XMRZlTAKeS5VyaLFxO5sgrKN6WjCUi4YzZ4f
5/cP07un2d3T1Cwsc56QGY15RWHoSJWMx81p5yQvqU5wLlJ3s8TFS5Pgunbnw+6QljrJm4gWPJ7H
kVThgeSJI1331u58mro6lckiihkJSR9tJ4vNkz5Yry1XL8Z5pSgMqbu1jeIoy1jSNfE6iYkkW1ft
8VQPYn8Ku3f+aRhcqFULZyVTVSlIrk7u6SI8bW+ROnuN7tyi3lQvmR6FHI+32l93+knX19QOyUR0
bT0eLn51tlkyUd1h89dcxFsV/usnDQAAAAAAAAAAAAAAAAAAAADwb3wBHZETJwAoAAA=
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: c++/6229: gcc 3.1 namespace lookup seems to fail
@ 2002-04-10 4:36 Jason Merrill
0 siblings, 0 replies; 2+ messages in thread
From: Jason Merrill @ 2002-04-10 4:36 UTC (permalink / raw)
To: nobody; +Cc: gcc-prs
The following reply was made to PR c++/6229; it has been noted by GNATS.
From: Jason Merrill <jason@redhat.com>
To: "Peter Klotz" <peter.klotz@aon.at>
Cc: <gcc-gnats@gcc.gnu.org>
Subject: Re: c++/6229: gcc 3.1 namespace lookup seems to fail
Date: Wed, 10 Apr 2002 12:30:50 +0100
>>>>> "Peter" == Peter Klotz <peter.klotz@aon.at> writes:
> A final question remains: Why is the operator<< that takes a bool considered
> the best match for my function pointer (why not, for example, the one taking
> an int)?
Because there is a standard conversion from any pointer to bool, but not to
int.
Jason
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2002-04-10 11:36 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-04-08 7:26 c++/6229: gcc 3.1 namespace lookup seems to fail peter.klotz
2002-04-10 4:36 Jason Merrill
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).