home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!mcsun!Germany.EU.net!news.Hamburg.Germany.EU.net!abqhh!keihh!kt
- From: kt@keihh.hanse.de (Kei Thomsen)
- Newsgroups: comp.os.os9
- Subject: Re: Can't get OS-9 C to use procedures as variables!!!
- Message-ID: <JvaKaH@keihh.hanse.de>
- Date: 13 Dec 92 07:13:35 GMT
- References: <101675@netnews.upenn.edu>
- Lines: 45
-
- In article <101675@netnews.upenn.edu> mark@ginger.biophys.upenn.edu (Mark Elliott) writes:
-
-
- > I have OS-9 v2.4 on a 68030 (MVME 147) machine. My "CC" module says
- >that it is Edition #40. The following code crashes (with BUS ERROR) when I run
- >it. On other Unix machines, it runs fine.
-
- >main()
- >{
- > teststruct test;
- > int sayhello();
- >
- > test.x = 5;
- > test.subfunc = *sayhello;
- >
- test.subfunc = sayhello;
- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ This is right (syntax and code)
- > test.subfunc(&test); /*** <--- THIS IS WHERE OS-9 CRASHES ***/
- >
- > exit(0);
- >
- >}
-
- I tried the "old" version with my gcc1.40 and it works, because the
- gcc known, that *sayhello is the same as sayhello.
-
- But the cc doesn't.
-
-
-
-
-
- /\
- |^^|
- |{}|
- _______________/~~\________________
- / Kei Thomsen | | keihh.hanse.de \
- `========--------. .---------========'
- ||||
- Wildermuthring 90 || kt@keihh.hanse.de
- 2000 Hamburg 62 || OS-9 68030
- Home: 040/5205921 || Modem: 040/5200428
- FH-Wedel: || 1200-14400 Baud
- 04103/804841 ,---||---, (V32bis)
- '---<>---'
-