home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #31 / NN_1992_31.iso / spool / gnu / g / bug / 2076 < prev    next >
Encoding:
Text File  |  1992-12-22  |  1.6 KB  |  64 lines

  1. Newsgroups: gnu.g++.bug
  2. Path: sparky!uunet!cis.ohio-state.edu!galaxy.COM!jackson
  3. From: jackson@galaxy.COM (Bill Jackson)
  4. Subject: Internal compiler error 62.
  5. Message-ID: <9212221720.AA24873@zoe.galaxy.COM>
  6. Sender: gnulists@ai.mit.edu
  7. Organization: GNUs Not Usenet
  8. Distribution: gnu
  9. Date: Tue, 22 Dec 1992 17:20:10 GMT
  10. Approved: bug-g++@prep.ai.mit.edu
  11. Lines: 51
  12.  
  13. ***** Configuration *****
  14.     Machine:    Sun 4/310  (a modified 4/110)
  15.     OS:        SunOS 4.1.1
  16.     Compiler:    gcc version 2.3.1
  17.  
  18.  
  19. ***** Source file test.cc *****
  20. class ClassA {
  21. public:
  22.     typedef ClassA& (*PMFV)(const char*);
  23.     static PMFV setMapper(PMFV);
  24.     static PMFV _mapper;
  25. };
  26.  
  27.  
  28. class ClassB {
  29. public:
  30.     typedef ClassB& (*PMFV)(const char*);
  31. };
  32.  
  33.  
  34. ClassA::PMFV ClassA::setMapper(ClassA::PMFV newFunc)
  35. {
  36.     PMFV oldFunc = _mapper;
  37.     _mapper = newFunc;
  38.  
  39.     return oldFunc;
  40. }
  41.  
  42.  
  43. ***** Output from gcc *****
  44. gcc -g -c test.cc
  45. test.cc: In function `class ClassA&(* static ClassA::setMapper (auto class ClassA&(*)(const char *)))(const char *)':
  46. test.cc:17: Internal compiler error 62.
  47. test.cc:17: Please report this to `bug-g++@prep.ai.mit.edu'.
  48.  
  49.  
  50. ***** Comments *****
  51. If line 17 is changed from
  52.     PMFV oldFunc = _mapper;
  53. to
  54.     ClassA::PMFV oldFunc = _mapper;
  55. then the compiler does not report an error.
  56.  
  57. -------------------------------------------------------------------------
  58. William E. Jackson    | Internet: wjackson%xphoton.uucp@gordian.COM
  59. Excellon Automation    |     UUCP: ...!sun!sunkist!xphoton!wjackson
  60. 242751 Crenshaw Blvd.    |    Voice: (310) 534-6715
  61. Torrance, CA  90505    |      FAX: (310) 534-6707
  62. -------------------------------------------------------------------------
  63.  
  64.