home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / gnu / g / help / 1482 < prev    next >
Encoding:
Internet Message Format  |  1992-11-24  |  1.5 KB

  1. Xref: sparky gnu.g++.help:1482 comp.lang.c++:16806
  2. Newsgroups: gnu.g++.help,comp.lang.c++
  3. Path: sparky!uunet!taumet!steve
  4. From: steve@taumet.com (Steve Clamage)
  5. Subject: Re: demangeling
  6. Message-ID: <1992Nov23.233957.5097@taumet.com>
  7. Organization: TauMetric Corporation
  8. References: <9211231128.AA20601@life.ai.mit.edu>
  9. Date: Mon, 23 Nov 1992 23:39:57 GMT
  10. Lines: 30
  11.  
  12. FLEINERC%CFRUNI51.BITNET@mitvma.mit.edu writes:
  13.  
  14.  
  15. >Does there exist a program to demangle names used by C++ ?
  16. >it should accept for example
  17. >     __ct__7ostreamFv
  18. >and print
  19. >     ostream::ostream()
  20.  
  21. Name mangling is an implementation detail, not part of the definition
  22. of the C++ language.  There is no one way to mangle names, and indeed,
  23. the ARM recommends that different compilers use different mangling
  24. techniques (if they use name mangling at all).
  25.  
  26. The reason for the recommendation is that there are many arbitrary
  27. decisions which an implementation must make, and it is unlikely that
  28. two different implemenations will make them the same way.  If name
  29. mangling were the same, it would be possible to link object files
  30. from incompatible compilers, producing bizarre program failures.  If
  31. the program fails to link, you at least have a clue that the compilers
  32. are incompatible.
  33.  
  34. Thus, there is no one portable demangling program.
  35.  
  36. Many C++ implementations come with a name demangler .  Check
  37. your documentation, or ask your compiler vendor.
  38. -- 
  39.  
  40. Steve Clamage, TauMetric Corp, steve@taumet.com
  41. Vice Chair, ANSI C++ Committee, X3J16
  42.