home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #30 / NN_1992_30.iso / spool / comp / os / os9 / 1523 < prev    next >
Encoding:
Internet Message Format  |  1992-12-13  |  1.5 KB

  1. Path: sparky!uunet!mcsun!Germany.EU.net!news.Hamburg.Germany.EU.net!abqhh!keihh!kt
  2. From: kt@keihh.hanse.de (Kei Thomsen)
  3. Newsgroups: comp.os.os9
  4. Subject: Re: Can't get OS-9 C to use procedures as variables!!!
  5. Message-ID: <JvaKaH@keihh.hanse.de>
  6. Date: 13 Dec 92 07:13:35 GMT
  7. References: <101675@netnews.upenn.edu>
  8. Lines: 45
  9.  
  10. In article <101675@netnews.upenn.edu> mark@ginger.biophys.upenn.edu (Mark Elliott) writes:
  11.  
  12.  
  13. >    I have OS-9 v2.4 on a 68030 (MVME 147) machine. My "CC" module says
  14. >that it is Edition #40. The following code crashes (with BUS ERROR) when I run
  15. >it. On other Unix machines, it runs fine.
  16.  
  17. >main()
  18. >{
  19. >    teststruct    test;
  20. >    int        sayhello();
  21. >    
  22. >    test.x = 5;
  23. >    test.subfunc = *sayhello;
  24. >    
  25.      test.subfunc = sayhello;
  26. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ This is right (syntax and code)
  27. >    test.subfunc(&test);    /*** <--- THIS IS WHERE OS-9 CRASHES ***/
  28. >    
  29. >    exit(0);
  30. >    
  31. >}
  32.  
  33. I tried the "old" version with my gcc1.40 and it works, because the 
  34. gcc known, that *sayhello is the same as sayhello.
  35.  
  36. But the cc doesn't.
  37.  
  38.  
  39.  
  40.  
  41.  
  42.                    /\
  43.                   |^^|
  44.                   |{}|
  45.    _______________/~~\________________
  46.   / Kei Thomsen   |  | keihh.hanse.de \
  47.  `========--------.  .---------========'
  48.                   ||||
  49.  Wildermuthring 90 || kt@keihh.hanse.de
  50.  2000 Hamburg 62   ||    OS-9 68030 
  51.  Home: 040/5205921 || Modem: 040/5200428
  52.  FH-Wedel:         ||  1200-14400 Baud
  53.  04103/804841  ,---||---, (V32bis)
  54.                '---<>---'
  55.