home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!gatech!prism!gg10
- From: gg10@prism.gatech.EDU (GALLOWAY)
- Newsgroups: comp.lang.c++
- Subject: Bug in Sun C++ Demangler
- Message-ID: <64214@hydra.gatech.EDU>
- Date: 23 Jul 92 20:58:19 GMT
- Organization: Georgia Institute of Technology
- Lines: 42
-
- I have found a problem with the demangler used in Sun's SC1.0 C++ 2.1
- (really AT&T cfont 2.1.03). The bug may not be in cfront itself, and only in
- utilities like nm++, dem, c++filt, etc.
-
- A source file to reproduce the error follows:
-
- > cat foo.cc
- void foo(double x1, double y1, double z1, int c1,
- double x2, double y2, double z2, int c2)
- {
- }
-
- > CC -c foo.cc
- "foo.cc", line 1: warning: x1 not used
- "foo.cc", line 1: warning: y1 not used
- "foo.cc", line 1: warning: z1 not used
- "foo.cc", line 1: warning: c1 not used
- "foo.cc", line 2: warning: x2 not used
- "foo.cc", line 2: warning: y2 not used
- "foo.cc", line 2: warning: z2 not used
- "foo.cc", line 2: warning: c2 not used
-
- > nm++ foo.o
- 00000000 T foo(double,double,double,int,double,double,double,double)
- [_foo__FdN21iN31T4]
-
- >> dem _foo__FdN21iN31T4
- _foo__FdN21iN31T4 == _foo(double,double,double,int,double,double,double,double)
-
- >> echo _foo__FdN21iN31T4 | c++filt -v
- Demangler Version 1.5, Date 7/27/88
- foo(double,double,double,int,double,double,double,double)
-
- The last argument of type "double" should be an "int". The "T4" in the
- mangled name says "same type as parameter 4" which is indeed an "int".
- There are several other similar functions which all demangle incorrectly.
-
- I have only posted this to comp.lang.c++. Could someone let me know how, or
- send this on to the proper people at Sun and/or AT&T?
-
- Greg Galloway (gg10@prism.gatech.edu)
- Georgia Tech Research Institute/Electro-Optics Physical Sciences Laboratory
-