home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / comp / os / vms / 21872 < prev    next >
Encoding:
Internet Message Format  |  1993-01-24  |  1.6 KB

  1. Xref: sparky comp.os.vms:21872 comp.lang.c:20145 vmsnet.alpha:146 cern.alpha:32
  2. Path: sparky!uunet!stanford.edu!agate!doc.ic.ac.uk!warwick!uknet!miclon!nreadwin
  3. From: nreadwin@micrognosis.co.uk (Neil Readwin)
  4. Newsgroups: comp.os.vms,comp.lang.c,vmsnet.alpha,cern.alpha
  5. Subject: Re: functions as arguments in DEC C
  6. Message-ID: <C1DCr5.2v1@micrognosis.co.uk>
  7. Date: 24 Jan 93 17:33:04 GMT
  8. References: <1993Jan24.094945.7767@dxcern.cern.ch>
  9. Sender: news@micrognosis.co.uk
  10. Organization: Micrognosis, a division of CSK(UK) Ltd
  11. Lines: 20
  12.  
  13. In article <1993Jan24.094945.7767@dxcern.cern.ch>, burow@dxcern.cern.ch (Burkhard Burow) writes:
  14. |>That's why I need a cast for saying:
  15. |> 'This is a pointer to a function.
  16. |>  I don't give a flying f*** about the type of argument the function returns.'
  17.  
  18. Having spent a little time reading through both the standard and the Rationale
  19. (especially 3.2.2.3), I do not think that ANSI C provides this. This came as
  20. something of a surprise to me.
  21.  
  22. |>          EXCEPT SO FAR FOR DEC C, WHICH I CAN'T CONVINCE, 
  23. |>          BUT I'M HOPING SOMEONE OUT THERE CAN TELL ME HOW.
  24.  
  25. You could try /STANDARD=COMMON. You could also try complaining to Digital
  26. and asking them to make this a warning instead of an error, since it seems
  27. unreasonable to refuse to produce an object file due to this kind of
  28. mismatch. The five other compilers that I have to hand (SunOS, AIX, NeXT
  29. (aka gcc), HP/UX and Ultrix) give a warning about this and continue. Neil.
  30. -- 
  31.  Phone: +44 71 815 5283  E-mail: nreadwin@micrognosis.co.uk
  32.  Anything is a cause for sorrow that my mind or body has made
  33.