home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / comp / lang / cplus / 19998 < prev    next >
Encoding:
Internet Message Format  |  1993-01-28  |  3.0 KB

  1. Path: sparky!uunet!munnari.oz.au!metro!basser.cs.su.oz.au!swift!otc!swdev!grahamd
  2. From: grahamd@swdev.research.otca.oz.au (Graham Dumpleton)
  3. Newsgroups: comp.lang.c++
  4. Subject: Re: Was: Template Use <sigh>
  5. Message-ID: <7210@otc.otca.oz>
  6. Date: 27 Jan 93 23:18:53 GMT
  7. References: <1jp50dINNk34@rs6000.bham.ac.uk> <81348@hydra.gatech.EDU> <C1A4n9.1Iz@apollo.hp.com> <7203@otc.otca.oz>
  8. Sender: news@otc.otca.oz
  9. Organization: Technical Development Group, OTC Australia
  10. Lines: 54
  11.  
  12.  
  13.  >  > The cfront auto instantiation system won't bother attempting template
  14.  >  > instantiation if it cannot find its type map, which is the file
  15.  >  > ptrepository/defmap by default.
  16.  > 
  17.  > As well as starting the template instatiation mechanism when there is a non
  18.  > empty defmap file in the first or default repository directory, the AT&T
  19.  > compiler will also start the template instantiation mechanism in a number
  20.  > of other situations also. The list of cases that we have found, including
  21.  > that that you mention, is:
  22.  > 
  23.  >   1) The default repository directory is being used or only one repository
  24.  >   directory is explicitly defined on the command line, and there is a non
  25.  >   empty defmap file in the repository directory.
  26.  > 
  27.  >   2) A single repository is being used and the directory doesn't contain a
  28.  >   non empty defmap file but does contain a user provided nmap file.
  29.  > 
  30.  >   3) Multiple repository directories are defined explicitly on the command
  31.  >   line and the first directory doesn't contain a non empty defmap file or
  32.  >   user defined nmap files but a subsequent repository directory does.
  33.  > 
  34.  > I should point out that the HP C++ compiler version 3.0 (port of AT&T
  35.  > 3.0.1) doesn't start the instantiation mechanism in situations 2 and 3.
  36.  > Someone in HP whom I had mail contact with does know about this now, however
  37.  > whether they are changing their compiler to behave in the same way as the
  38.  > AT&T compiler I do not know. The last I heard was that they were expecting
  39.  > us to lodge a defect report, however since we don't actually have HP
  40.  > machines we haven't had a reason to do that.
  41.  
  42. I got a chance to try out a prerelease version of Sun C++ 3.0.1 under Solaris
  43. 1.1 and it also doesn't start the template instantiator under all three of
  44. the above situations. Like the HP compiler it will only start the template
  45. instantiator under situation 1.
  46.  
  47. When I tried the same work around as for the HP compiler, ie. create a non
  48. empty defmap file containing
  49.  
  50.  >   @dec ____DUMMY____
  51.  >   <____DUMMY____>
  52.  
  53. it did start the template instantiator but then promptly fell over with the
  54. fatal error
  55.  
  56.   CC[ptlink] fatal error: bad argument to slp_add()
  57.  
  58. when trying to read the defmap files in the extra repository directories. I
  59. eventually got it to work by placing an nmap file which we generate in the
  60. repository directory as the defmap file. Since this had all the information
  61. in it which it needed it mean't that it was looking in the extra repository
  62. directories and so was finding what ever it was that was causing it to crash.
  63.  
  64. -- 
  65. Graham Dumpleton (grahamd@swdev.research.otca.oz.au)
  66.