๐Ÿš€ go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: de.comp.lang.c++
Article #996

Re: g++ Bug

#996
From: Torsten Vogt
Date: Thu, 14 Dec 1995 09:46
34 lines
1620 bytes
> Hallo,
>
> bei dem folgenden Programm klappt beim GNU g++ 2.5.8 das รœberladen der Funktion
> f nicht. Kann mir jemand sagen, ob dieser Fehler bekannt bzw. behoben ist ?
[...]
>
> void f(A& a, int)
> {
>   cout << "f(int)" << endl << flush;
> }
> void f(A& a, long)
> {
>    cout << "f(long)" << endl << flush;
< }
[...]

Das ist kein Bug im g++, sondern ein "handbook not read error" bzw, etwas 
unfeiner: RTFM !

Der Grund: int's werden vom g++ standardmaessig als long's interpretiert.

Gruss Torsten

-- 
---------------------------------------------------------------------
| Torsten Vogt                                                      |
|  Universitaet Mannheim - Lehrstuhl Praktische Informatik I        |
|  Seminargebaeude A5                                               |
|  D-68131 Mannheim                                                 |
|                                                                   |
|  Tel  : 0049-621/292-5132  Fax: 0049-621/292-5297                 |
|  email: vogt@pi1.informatik.uni-mannheim.de                       |
|  WWW  : http://pi1.informatik.uni-mannheim.de/HomePages/vogt.html |
---------------------------------------------------------------------
Technical Details
Message-ID: <4aorq4$1e1@trumpet.uni-mannheim.de>
Path: arc1-ca.pugleaf.net!news.uni-mannheim.de!pi1!vogt

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!news.uni-mannheim.de!pi1!vogt
From: vogt@pi1.uni-mannheim.de (Torsten Vogt)
Newsgroups: de.comp.lang.c++
Subject: Re: g++ Bug
Date: 14 Dec 1995 09:46:44 GMT
Organization: Universitaet Mannheim
Distribution: world
Message-ID: <4aorq4$1e1@trumpet.uni-mannheim.de>
Reply-To: vogt@pi1.informatik.uni-mannheim.de
NNTP-Posting-Host: pi1.informatik.uni-mannheim.de