This is the mail archive of the gcc-prs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

c++/6229: gcc 3.1 namespace lookup seems to fail



>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=


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]