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